Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-03

problem compiling svn-fpc for arm-linux

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,
Since a while I'm experiencing problems compiling fpc from svn for arm-linux. When "make CPU_TARGET=arm OS_TARGET=linux all" arrives at assembling system.pp for arm it gives following errors : /home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE -Us -Sg system.pp
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s: Assembler messages:
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51628: Error: unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51636: Error: unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51643: Error: unrecognized symbol type ""
...(about 40 similar lines)
When I look in system.s at those lines they are all similar to : .section .bss
.balign 2
.globl operatingsystem_result
.type operatingsystem_result,@object
.size operatingsystem_result,2
operatingsystem_result:
.zero 2
More specific, the error-lines point to the @object construct. Is there any way I can avoid these errors ?
I used revision 2898 of fpc. My arm-linux-as is version 2.14. Thanks for any help,
Koenraad Lelong.

Reply by email

Koenraad Lelong
to Peter Vreman
Peter Vreman wrote 7 lines
>More specific, the error-lines point to the @object construct. >Is there any way I can avoid these errors ? >I used revision 2898 of fpc. My arm-linux-as is version 2.14. Use the latest binutils 2.16.1

I downloaded and compiled them from http://www.gnuarm.com, then compiled fpc with it, with no success. Tried again from www.gnu.org, same result. Do I have to specify some option ?
Regards,
Koenraad Lelong.

Reply by email

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote 11 lines
Peter Vreman schreef: >> More specific, the error-lines point to the @object construct. >> Is there any way I can avoid these errors ? >> I used revision 2898 of fpc. My arm-linux-as is version 2.14. > > Use the latest binutils 2.16.1 > I downloaded and compiled them from http://www.gnuarm.com, then compiled fpc with it, with no success. Tried again from www.gnu.org, same result. Do I have to specify some option ?

I asked about this on This is what
Russel King replied :
<quote>

Show quoted text 12 lines
> The assembler stumbles on the line containing @object : > .section .bss > .balign 2 > .globl operatingsystem_result > .type operatingsystem_result,@object > .size operatingsystem_result,2 > operatingsystem_result: > .zero 2 > > This is what I get : > ...fpc/rtl/units/arm-linux/system.s:51162: Error: unrecognized symbol > type ""

This program is buggy - '@' is used as the comment character for ARM, so everything after that is ignored. The assembler therefore sees:

.type operatingsystem_result,

which is garbage. The GNU assembler targetted for ARM accepts '#' or '%' here, not '@'.
</quote>
Is there anyone who can give a hint where to look to fix this ? Regards,
Koenraad Lelong.

Reply by email

Jonas Maebe
to Koenraad Lelong
Koenraad Lelong wrote 10 lines
This program is buggy - '@' is used as the comment character for ARM, so everything after that is ignored. The assembler therefore sees: .type operatingsystem_result, which is garbage. The GNU assembler targetted for ARM accepts '#' or '%' here, not '@'. </quote> Is there anyone who can give a hint where to look to fix this ?

Remove "tf_needs_symbol_type" from system_arm_linux_info in compiler/ systems/i_linux.pas

Or alternatively have a look at the output of gcc -S and if it does generate some sort of symbol type information, change compiler/ aggas.pas:590 based on "if (target_info.system system_arm_linux) then ... else ..."

Jonas

Reply by email

Koenraad Lelong
to Jonas Maebe
Jonas Maebe wrote 24 lines
On 19 Mar 2006, at 10:07, Koenraad Lelong wrote: > This program is buggy - '@' is used as the comment character for ARM, so > everything after that is ignored. The assembler therefore sees: > > .type operatingsystem_result, > > which is garbage. The GNU assembler targetted for ARM accepts '#' or > '%' here, not '@'. > </quote> > Is there anyone who can give a hint where to look to fix this ? Remove "tf_needs_symbol_type" from system_arm_linux_info in compiler/ systems/i_linux.pas Or alternatively have a look at the output of gcc -S and if it does generate some sort of symbol type information, change compiler/ aggas.pas:590 based on "if (target_info.system system_arm_linux) then ... else ..." Jonas

Thanks,
Enclosed you will find a diff that allows me to get past that error, but I have another one. Actually two, this morning I had an 'internal error', but I (stupidly) did another svn-update and now I'm having an offset too large in sysutils :
/home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE ../objpas/sysconst.pp
/home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE -Fi../objpas/sysutils ../unix/sysutils.pp
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s: Assembler messages:
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11815: Error: offset too large -- `sfm f4,1,[r11,#-1152]' /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11862: Error: offset too large -- `lfm f4,1,[r11,#-1152]' sysutils.pp(551,20) Error: Error while assembling exitcode 1 sysutils.pp(551,20) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
make[5]: *** [sysutils.ppu] Fout 1
make[5]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl/linux' make[4]: *** [linux_all] Fout 2
make[4]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl' make[3]: *** [rtl] Fout 2
make[3]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[2]: *** [cycle] Fout 2
make[2]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[1]: *** [compiler_cycle] Fout 2
make[1]: Leaving directory `/home/koenraad/fpc-devel/fpc' make: *** [build-stamp.arm-linux] Fout 2
I'm going to ,
Koenraad Lelong.

Reply by email

Peter Vreman
to Koenraad Lelong
Show quoted text 13 lines
> >Remove "tf_needs_symbol_type" from system_arm_linux_info in compiler/ >systems/i_linux.pas >Or alternatively have a look at the output of gcc -S and if it does >generate some sort of symbol type information, change compiler/ >aggas.pas:590 based on "if (target_info.system system_arm_linux) >then ... else ..." > >Jonas Thanks, Enclosed you will find a diff that allows me to get past that error, but I have another one. Actually two, this morning I had an 'internal error', but I (stupidly) did another svn-update and now I'm

Fixed

Peter

Reply by email

Koenraad Lelong
to Koenraad Lelong: Enclosed you will find a diff that allows me to get past that error, but I have another…
Koenraad Lelong wrote
Jonas Maebe schreef:

...

Show quoted text 31 lines
/home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE ../objpas/sysconst.pp /home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE -Fi../objpas/sysutils ../unix/sysutils.pp /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s: Assembler messages: /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11815: Error: offset too large -- `sfm f4,1,[r11,#-1152]' /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11862: Error: offset too large -- `lfm f4,1,[r11,#-1152]' sysutils.pp(551,20) Error: Error while assembling exitcode 1 sysutils.pp(551,20) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[5]: *** [sysutils.ppu] Fout 1 make[5]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl/linux' make[4]: *** [linux_all] Fout 2 make[4]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl' make[3]: *** [rtl] Fout 2 make[3]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[2]: *** [cycle] Fout 2 make[2]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[1]: *** [compiler_cycle] Fout 2 make[1]: Leaving directory `/home/koenraad/fpc-devel/fpc' make: *** [build-stamp.arm-linux] Fout 2 I'm going to look at this. Regards, Koenraad Lelong.

I got past this error by modifying sysstr.inc (see the enclosed diff). I hope it's an acceptable patch.
Now I'm having internal error 200203271 when compiling buildgtk2.pp/gtkspinbutton.inc. I'm going to ,
Koenraad Lelong.

Reply by email

Florian Klaempfl
to Koenraad Lelong
Koenraad Lelong wrote 37 lines
Koenraad Lelong schreef: > Jonas Maebe schreef: > ... > /home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc > -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. > -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE > ../objpas/sysconst.pp > /home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc > -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. > -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE > -Fi../objpas/sysutils ../unix/sysutils.pp > /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s: Assembler > messages: > /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11815: > Error: offset too large -- `sfm f4,1,[r11,#-1152]' > /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/sysutils.s:11862: > Error: offset too large -- `lfm f4,1,[r11,#-1152]' > sysutils.pp(551,20) Error: Error while assembling exitcode 1 > sysutils.pp(551,20) Fatal: There were 2 errors compiling module, stopping > Fatal: Compilation aborted > make[5]: *** [sysutils.ppu] Fout 1 > make[5]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl/linux' > make[4]: *** [linux_all] Fout 2 > make[4]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl' > make[3]: *** [rtl] Fout 2 > make[3]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' > make[2]: *** [cycle] Fout 2 > make[2]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' > make[1]: *** [compiler_cycle] Fout 2 > make[1]: Leaving directory `/home/koenraad/fpc-devel/fpc' > make: *** [build-stamp.arm-linux] Fout 2 > I'm going to look at this. > Regards, > Koenraad Lelong. I got past this error by modifying sysstr.inc (see the enclosed diff). I hope it's an acceptable patch.

No ;) It solves the problem but not the cause :) I'll look into it when I find time ;)

Show quoted text 28 lines
Now I'm having internal error 200203271 when compiling buildgtk2.pp/gtkspinbutton.inc. I'm going to look at that. Regards, Koenraad Lelong. ------------------------------------------------------------------------ Index: fpc/rtl/objpas/sysutils/sysstr.inc =================================================================== --- fpc/rtl/objpas/sysutils/sysstr.inc (revision 3121) +++ fpc/rtl/objpas/sysutils/sysstr.inc (working copy) @@ -1917,7 +1917,7 @@ Function FormatFloat(Const format: String; Value: Extended): String; Var - buf : Array[0..1024] of char; + buf : Array[0..1023] of char; Begin Buf[FloatToTextFmt(@Buf[0],Value,Pchar(Format))]:=#0; ------------------------------------------------------------------------ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Koenraad Lelong
to Florian Klaempfl
Florian Klaempfl wrote 9 lines
Koenraad Lelong wrote: >Koenraad Lelong schreef: > >>Jonas Maebe schreef: >> > >... >

...

Show quoted text 12 lines
>>I'm going to look at this. >>Regards, >>Koenraad Lelong. > >I got past this error by modifying sysstr.inc (see the enclosed diff). I >hope it's an acceptable patch. No ;) It solves the problem but not the cause :) I'll look into it when I find time ;)

I don't know if it's usefull : those lfm and sfm instructions seem to be limited to 10 bit offsets (max 1024, 4byte boundary, found by trail and error).
I didn't find much information in arm-docs about those floating point register instructions.
Regards,
Koenraad Lelong.

Reply by email