Sign in Join

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

Mailing lists / fpc-pascal / 2007-04

Fcp for arm linux for EABI

54 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

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

Jose Pascual

Hi,

I'll appreciate from you any answer to next questions:

Is Fpc for arm linux compatible with EABI?
Is Fpc for arm FP hardware or soft-float?

How version of toolchain for arm I should install? (softfloat version?)

any comments will be welcome.

best regards

Jose Pascual

Reply by email

Henry Vermaak
to Jose Pascual
Jose Pascual wrote
Hi,

hello

Show quoted text 5 lines
I'll appreciate from you any answer to next questions: Is Fpc for arm linux compatible with EABI? Is Fpc for arm FP hardware or soft-float?

it depends what you compile it for. i'd guess that the pre-compiled one is for fpu. you can compile fpc for arm with -CfSOFT if you need a soft float one. there are some bugs at the moment for soft float (see mantis).

How version of toolchain for arm I should install? (softfloat version?)

this depends what you need. i'd recommend that you use the toolchain supplied by the operating system that you use on your arm device. that will be the toolchain they use to compile all the packages, so you can be sure that your program will be compatible with the libraries on your arm device.

debian supplies a toolchain (afaik) and on slugos you'll have to use the "master make file" to download and build it from source.

dan kegel's crosstool is also a possibility.

Show quoted text 7 lines
any comments will be welcome. best regards Jose Pascual

henry

Reply by email

Henry Vermaak
to Jose Pascual: I'll appreciate from you any answer to next questions: Is Fpc for arm linux compatible…
Jose Pascual wrote 8 lines
Hi, I'll appreciate from you any answer to next questions: Is Fpc for arm linux compatible with EABI? Is Fpc for arm FP hardware or soft-float? How version of toolchain for arm I should install? (softfloat version?)

see this for pre-compiled toolchains and see the faq for some info on the arm abi and what it entails:

http://www.codesourcery.com/gnu_toolchains/arm/download.html

henry

Reply by email

Henry Vermaak
to Jose Pascual: I'll appreciate from you any answer to next questions: Is Fpc for arm linux compatible…
Jose Pascual wrote
Hi,

hello

Show quoted text 5 lines
I'll appreciate from you any answer to next questions: Is Fpc for arm linux compatible with EABI? Is Fpc for arm FP hardware or soft-float?

it depends what you compile it for. i'd guess that the pre-compiled one is for fpu. you can compile fpc for arm with -CfSOFT if you need a soft float one. there are some bugs at the moment for soft float (see mantis).

How version of toolchain for arm I should install? (softfloat version?)

this depends what you need. i'd recommend that you use the toolchain supplied by the operating system that you use on your arm device. that will be the toolchain they use to compile all the packages, so you can be sure that your program will be compatible with the libraries on your arm device.

debian supplies a toolchain (afaik) and on slugos you'll have to use the "master make file" to download and build it from source.

dan kegel's crosstool is also a possibility.

Show quoted text 7 lines
any comments will be welcome. best regards Jose Pascual

henry

Reply by email

Jose Pascual
to Henry Vermaak

Hi,

I have using a toolchain Eabi for ppcarm and I have found a problem with assembler generate code from fpc
because is generating sfm,stfd,lfm,ldfd instructions in .s file so eabi-as (assembler) is generating errors like
.
.
Error: selected processor does not support `sfm f4,1,[r11,#-64]' .
.
.

Need a ppcarm with soft-float? or can I use ppcarm 2.0.4 downloaded from freepascal web page with some switch to
avoid ppcarm generate this assembler instructions?

thank you
best regards

Show quoted text 51 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: miércoles, 25 de abril de 2007 14:32 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] Fcp for arm linux for EABI On 25/04/07, Jose Pascual wrote: > Hi, hello > > I'll appreciate from you any answer to next questions: > > Is Fpc for arm linux compatible with EABI? > Is Fpc for arm FP hardware or soft-float? it depends what you compile it for. i'd guess that the pre-compiled one is for fpu. you can compile fpc for arm with -CfSOFT if you need a soft float one. there are some bugs at the moment for soft float (see mantis). > > How version of toolchain for arm I should install? (softfloat version?) > this depends what you need. i'd recommend that you use the toolchain supplied by the operating system that you use on your arm device. that will be the toolchain they use to compile all the packages, so you can be sure that your program will be compatible with the libraries on your arm device. debian supplies a toolchain (afaik) and on slugos you'll have to use the "master make file" to download and build it from source. dan kegel's crosstool is also a possibility. > any comments will be welcome. > > best regards > > > Jose Pascual > henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Daniël Mantione
to Jose Pascual

Op Thu, 26 Apr 2007, schreef Jose Pascual:

Show quoted text 16 lines
Hi, I have using a toolchain Eabi for ppcarm and I have found a problem with assembler generate code from fpc because is generating sfm,stfd,lfm,ldfd instructions in .s file so eabi-as (assembler) is generating errors like . . Error: selected processor does not support `sfm f4,1,[r11,#-64]' . . . Need a ppcarm with soft-float? or can I use ppcarm 2.0.4 downloaded from freepascal web page with some switch to avoid ppcarm generate this assembler instructions?

The version 2.0.4 on the Free Pascal web page is able to use softfloat.

Daniël

Reply by email

Henry Vermaak
to Henry Vermaak

hi jose

Henry Vermaak wrote 7 lines
On 26/04/07, Daniël Mantione wrote: > > The version 2.0.4 on the Free Pascal web page is able to use softfloat. > are you supposed to compile the rtl for softfloat, too?

i don't remember 2.0.4 working on softfloat for me, but maybe i messed up somewhere. i'd use 2.3.1 if i were you.

henry

Reply by email

Jose Pascual
to Henry Vermaak

Hi,

2.3.1 version ? is development snap? donwload from? or make from scratch?

how can I say to fpc to compile my pp file for softfloat avoiding to generate asm problem?

thank,
best regards

Show quoted text 26 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: jueves, 26 de abril de 2007 12:34 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] Fcp for arm linux for EABI hi jose On 26/04/07, Henry Vermaak wrote: > On 26/04/07, Daniël Mantione wrote: > > > > The version 2.0.4 on the Free Pascal web page is able to use softfloat. > > > > are you supposed to compile the rtl for softfloat, too? > i don't remember 2.0.4 working on softfloat for me, but maybe i messed up somewhere. i'd use 2.3.1 if i were you. henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Henry Vermaak
to Jose Pascual
Jose Pascual wrote
Hi, 2.3.1 version ? is development snap? donwload from? or make from scratch?

there's one from 2007-03-10. i haven't tried it, though.

ftp://ftp.freepascal.org/pub/fpc/snapshot/v23/arm-linux/fpc-2.3.1.arm-linux.tar.gz

i don't know if this will be ok with softfloat. i personally use svn and compile it myself like this (from base fpc dir):

make clean crossall CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux- CROSSBINDIR=/opt/slugosle/bin OPT="-CfSOFT"

sudo make crossinstall INSTALL_PREFIX=/usr CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux-
CROSSBINDIR=/opt/slugosle/bin OPT="-CfSOFT"

if you pick up problems and need to hack the Makefile.fpc around, just run fpcmake -rTall to regenerate all the Makefiles.

how can I say to fpc to compile my pp file for softfloat avoiding to generate asm problem?

then, there will be a ppcrossarm in /usr/lib/fpc/2.3.1/ that you can call, specifying the -XParm-linux- -CfSOFT option when you build your application. make sure you've added your crossbin dir to your path.

if you get the asm problem again, post here so that some of the fpc devels can comment on it.

thank, best regards

good luck
henry

Reply by email

Henry Vermaak
to Henry Vermaak

another thing that's important to do when you're using svn is edit compiler/systems/i_linux.pas. go to the arm_linux section and remove the tf_smartlink_sections from the flags. you can also edit the endianness of the target here (endian_little or endian_big). see for example my diff for my big endian arm:

svn diff -r HEAD
compiler/systems/i_linux.pas
Index: compiler/systems/i_linux.pas
=================================================================== --- compiler/systems/i_linux.pas (revision 7167) +++ compiler/systems/i_linux.pas (working copy) @@ -525,7 +525,7 @@

             name         : 'Linux for ARM';
             shortname    : 'Linux';
             flags        :

[tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, -
tf_use_function_relative_addresses,tf_requires_proper_alignment,tf_smartlink_sections]; +
tf_use_function_relative_addresses,tf_requires_proper_alignment];

             cpu          : cpu_arm;
             unit_env     : 'LINUXUNITS';
             extradefines : 'UNIX;HASUNIX';

@@ -558,7 +558,7 @@

             res          : res_none;
             dbg          : dbg_stabs;
             script       : script_unix;

- endian : endian_little;
+ endian : endian_big;
alignment :
(

                 procalign       : 4;

henry

Reply by email

Jose Pascual
to Henry Vermaak: there's one from 2007-03-10. i haven't tried it, though.…

Thank you for so much information Henry,

one question, You make compiler from scratch with -CfSOFT option, what it means, that compiler generated
is capable to use -CfSOFT option or compiler generated is softfloat?

best regards
Jftp://ftp.freepascal.org/pub/fpc/snapshot/v23ose Pascual

Show quoted text 52 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: jueves, 26 de abril de 2007 14:47 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] Fcp for arm linux for EABI On 26/04/07, Jose Pascual wrote: > Hi, > > 2.3.1 version ? is development snap? donwload from? or make from scratch? > there's one from 2007-03-10. i haven't tried it, though. ftp://ftp.freepascal.org/pub/fpc/snapshot/v23/arm-linux/fpc-2.3.1.arm- linux.tar.gz i don't know if this will be ok with softfloat. i personally use svn and compile it myself like this (from base fpc dir): make clean crossall CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux- CROSSBINDIR=/opt/slugosle/bin OPT="-CfSOFT" sudo make crossinstall INSTALL_PREFIX=/usr CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux- CROSSBINDIR=/opt/slugosle/bin OPT="-CfSOFT" if you pick up problems and need to hack the Makefile.fpc around, just run fpcmake -rTall to regenerate all the Makefiles. > how can I say to fpc to compile my pp file for softfloat avoiding to > generate asm problem? > then, there will be a ppcrossarm in /usr/lib/fpc/2.3.1/ that you can call, specifying the -XParm-linux- -CfSOFT option when you build your application. make sure you've added your crossbin dir to your path. if you get the asm problem again, post here so that some of the fpc devels can comment on it. > thank, > best regards > good luck henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Jose Pascual
to Henry Vermaak: another thing that's important to do when you're using svn is edit…

Which toolchain are you using for ARM?
I suppose you are using kernel for arm with EABI activate and libc with EABI is it right?
which version of kernel?
which arm?

I'm using (begin to use for EABI) gcc 4.1.1-glibc 2.5-EABI (armv4t), kernel 2.6.19 with EABI and
ARM920T (at91rm9200)

Show quoted text 46 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: jueves, 26 de abril de 2007 14:54 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] Fcp for arm linux for EABI another thing that's important to do when you're using svn is edit compiler/systems/i_linux.pas. go to the arm_linux section and remove the tf_smartlink_sections from the flags. you can also edit the endianness of the target here (endian_little or endian_big). see for example my diff for my big endian arm: svn diff -r HEAD compiler/systems/i_linux.pas Index: compiler/systems/i_linux.pas =================================================================== --- compiler/systems/i_linux.pas (revision 7167) +++ compiler/systems/i_linux.pas (working copy) @@ -525,7 +525,7 @@ name : 'Linux for ARM'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_use_function_relative_addresses,tf_requires_proper_alignment,tf_smar tlink_sections]; + tf_use_function_relative_addresses,tf_requires_proper_alignment]; cpu : cpu_arm; unit_env : 'LINUXUNITS'; extradefines : 'UNIX;HASUNIX'; @@ -558,7 +558,7 @@ res : res_none; dbg : dbg_stabs; script : script_unix; - endian : endian_little; + endian : endian_big; alignment : ( procalign : 4; henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Luca Olivetti
to Henry Vermaak: there's one from 2007-03-10. i haven't tried it, though.…

En/na Henry Vermaak ha escrit:

Show quoted text 9 lines
On 26/04/07, Jose Pascual wrote: > Hi, > > 2.3.1 version ? is development snap? donwload from? or make from scratch? > there's one from 2007-03-10. i haven't tried it, though. ftp://ftp.freepascal.org/pub/fpc/snapshot/v23/arm-linux/fpc-2.3.1.arm-linux.tar.gz

This is native and it works (at least with my little program under debian etch, so I suppose it generates oabi code). I'm not using floating point.
But I think Jose was looking for a cross compiler.

Bye

Luca

Reply by email

Luca Olivetti
to Luca Olivetti

En/na Luca Olivetti ha escrit:

Show quoted text 16 lines
En/na Henry Vermaak ha escrit: > On 26/04/07, Jose Pascual wrote: >> Hi, >> >> 2.3.1 version ? is development snap? donwload from? or make from >> scratch? >> > > there's one from 2007-03-10. i haven't tried it, though. > > ftp://ftp.freepascal.org/pub/fpc/snapshot/v23/arm-linux/fpc-2.3.1.arm-linux.tar.gz This is native and it works (at least with my little program under debian etch, so I suppose it generates oabi code). I'm not using floating point.

Forget it, I used 2.1.3, not 2.3.1. Duh.

Bye

Luca

Reply by email

Jose Pascual
to Henry Vermaak: another thing that's important to do when you're using svn is edit…

Hi,

in rtl/arm/arm.inc it can read

procedure fpc_cpuinit;
begin
{$if not(defined(wince)) and not(defined(gba)) and not(defined(nds))}
  asm
    rfs r0
    and r0,r0,#0xffe0ffff
    orr r0,r0,#0x00020000
    wfs r0
  end;
{$endif}
end;

altought I'm using a toolchain EABI and Compiling for softfloat -CfSOFT I can make ppc for arm because
rfs and wfs are fpu intruction in ARM and it's contained in this code.

is there some solution for it?

Same thing in rtl/arm/math.inc

{$if not(defined(gba)) and not(defined(nds))}
const
_FPU_MASK_IM = $00010000; { invalid operation } _FPU_MASK_ZM = $00020000; { divide by zero } _FPU_MASK_OM = $00040000; { overflow } _FPU_MASK_UM = $00080000; { underflow } _FPU_MASK_PM = $00100000; { inexact } _FPU_MASK_DM = $00000000; { denormalized operation } _FPU_MASK_ALL = $001f0000; { mask for all flags }

function FPU_GetCW : dword; nostackframe; assembler;
  asm
    rfs r0
  end;
procedure FPU_SetCW(cw : dword); nostackframe; assembler;
  asm
    wfs r0
  end;
{$endif}

thanks,

Jose Pascual,

Show quoted text 46 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: jueves, 26 de abril de 2007 14:54 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] Fcp for arm linux for EABI another thing that's important to do when you're using svn is edit compiler/systems/i_linux.pas. go to the arm_linux section and remove the tf_smartlink_sections from the flags. you can also edit the endianness of the target here (endian_little or endian_big). see for example my diff for my big endian arm: svn diff -r HEAD compiler/systems/i_linux.pas Index: compiler/systems/i_linux.pas =================================================================== --- compiler/systems/i_linux.pas (revision 7167) +++ compiler/systems/i_linux.pas (working copy) @@ -525,7 +525,7 @@ name : 'Linux for ARM'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_use_function_relative_addresses,tf_requires_proper_alignment,tf_smar tlink_sections]; + tf_use_function_relative_addresses,tf_requires_proper_alignment]; cpu : cpu_arm; unit_env : 'LINUXUNITS'; extradefines : 'UNIX;HASUNIX'; @@ -558,7 +558,7 @@ res : res_none; dbg : dbg_stabs; script : script_unix; - endian : endian_little; + endian : endian_big; alignment : ( procalign : 4; henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Jose Pascual
to Jose Pascual

Hi,

I'm making SVN (v2.3.1) FPC version for arm-linux. Finally I make ppcrossarm version for i386 but I can't installed
because make want to install sqlite unit but this unit was not compile during make crossall,

I suppose it's a problem in make files,
any suggestion?

thank you in advanced
best regards

Jose Pascual

Reply by email

Jose Pascual
to Jose Pascual

Hi,

I'm sorry I'm wrong, problem is not in sqlite, is in fcl-base,

please see in next dump screen,

.
.
.
make[6]: Leaving directory
`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/dbase' make -C src/sqlite all
make[6]: Entering directory
`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/sqlite' make[6]: No se hace nada para `all'.
make[6]: Leaving directory
`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/sqlite' fpcmake -p -Tarm-linux Makefile.fpc
Processing Makefile.fpc
Error: Target "linux", package "fcl-base" not found make[5]: *** [fpc_install] Error 1
make[5]: Leaving directory
`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db' make[4]: *** [fcl-db_install] Error 2
.
.
.

thank you,

Jose Pascual

Show quoted text 34 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Jose Pascual Enviado el: viernes, 27 de abril de 2007 11:21 Para: 'FPC-Pascal users discussions' Asunto: [fpc-pascal] some problem in SVN FPC for arm linux (v 2.3.1) Hi, I'm making SVN (v2.3.1) FPC version for arm-linux. Finally I make ppcrossarm version for i386 but I can't installed because make want to install sqlite unit but this unit was not compile during make crossall, I suppose it's a problem in make files, any suggestion? thank you in advanced best regards Jose Pascual _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Informacisn de NOD32, revisisn 2222 (20070426) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Peter Vreman
to Jose Pascual
Show quoted text 17 lines
. make[6]: Leaving directory `/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/dbase' make -C src/sqlite all make[6]: Entering directory `/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/sqlite' make[6]: No se hace nada para `all'. make[6]: Leaving directory > > I'm making SVN (v2.3.1) FPC version for arm-linux. Finally I make > ppcrossarm > version for i386 but I can't installed > because make want to install sqlite unit but this unit was not compile > during make crossall, > > I suppose it's a problem in make files, > any suggestion?

You need to build and install the current (from 2.3.1) fpcmake first.

Peter

Reply by email

josepascual (almudi
to Peter Vreman
Show quoted text 21 lines
>. >make[6]: Leaving directory >`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/dbase' >make -C src/sqlite all >make[6]: Entering directory >`/tmp/freepascal/svn/fpc_26_04_2007/packages/fcl-db/src/sqlite' >make[6]: No se hace nada para `all'. >make[6]: Leaving directory > > > > I'm making SVN (v2.3.1) FPC version for arm-linux. Finally I make > > ppcrossarm > > version for i386 but I can't installed > > because make want to install sqlite unit but this unit was not compile > > during make crossall, > > > > I suppose it's a problem in make files, > > any suggestion? You need to build and install the current (from 2.3.1) fpcmake first.

SVN version? or which? I can build snv version but install.

Reply by email

Henry Vermaak
to josepascual (almudi
Show quoted text 7 lines
> > You need to build and install the current (from 2.3.1) fpcmake first. > SVN version? or which? I can build snv version but install.

cd utils/fpcm
make clean all
sudo make install

then try making the cross compiler again.

henry

Reply by email

Henry Vermaak
to josepascual (almudi: I have done it, I'm going to svn/fpc/ directory and I run fpcmake -Tarm-linux. question:…
josepascual wrote 9 lines
I have done it, I'm going to svn/fpc/ directory and I run fpcmake -Tarm-linux. question: a) should I run fpcmake -pw -Tarm-linux? b) or should I run fpcmake -rpw -Tarm-linux? (recursive) c) or only fpcmake -Tarm-linux

fpcmake -rTall

you shouldn't have to do this if you haven't modified Makefile.fpc in any of the directories. it doesn't hurt, though.

thanks, Jose Pascual

henry

Reply by email

josepascual (almudi
to Henry Vermaak: cd utils/fpcm make clean all sudo make install then try making the cross compiler again.…
Show quoted text 15 lines
> > > > You need to build and install the current (from 2.3.1) fpcmake first. > > > > SVN version? or which? I can build snv version but install. > > cd utils/fpcm make clean all sudo make install then try making the cross compiler again.

I have done it, I'm going to svn/fpc/ directory and I run fpcmake -Tarm-linux.

question:
a) should I run fpcmake -pw -Tarm-linux?
b) or should I run fpcmake -rpw -Tarm-linux? (recursive) c) or only fpcmake -Tarm-linux

thanks,
Jose Pascual

Reply by email

josepascual (almudi
to Henry Vermaak: fpcmake -rTall you shouldn't have to do this if you haven't modified Makefile.fpc in any…
Show quoted text 15 lines
On 01/05/07, josepascual (almudi) wrote: > > I have done it, I'm going to svn/fpc/ directory and I run fpcmake > -Tarm-linux. > > question: > a) should I run fpcmake -pw -Tarm-linux? > b) or should I run fpcmake -rpw -Tarm-linux? (recursive) > c) or only fpcmake -Tarm-linux > fpcmake -rTall you shouldn't have to do this if you haven't modified Makefile.fpc in any of the directories. it doesn't hurt, though.

I have downloaded SVN version for 2.1.3. I have no patch anything as other times before,

I'm compiling with -CfSOFT (I want to generate a ppcrossarm eabi)

make clean crossall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=/usr/local/arm/gcc-4.1.1-glibc-2.5-gnueabi/bin/ BINUTILSPREFIX=armv4t-crosstool-linux-gnueabi-
PP=/usr/local/lib/fpc/2.1.1/ppc386 OPT="-CfSOFT"
.
.
.
/trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s: Assembler messages:
/trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12610: Error: selected processor does not support `rfs r0'
/trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12613: Error: selected processor does not support `wfs r0'
system.pp(335) Error: Error while assembling exitcode 1 system.pp(335) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
.
.
.

I resolved it other times removing assembler code in rtl/arm/mathu.inc and rtl/arm/arm.inc for rfs and wfs arm instruction,

but Is it correct?

extracted from rtl/arm/mathu.inc
.
.
{$if not(defined(gba)) and not(defined(nds))}
const
_FPU_MASK_IM = $00010000; { invalid operation } _FPU_MASK_ZM = $00020000; { divide by zero } _FPU_MASK_OM = $00040000; { overflow } _FPU_MASK_UM = $00080000; { underflow } _FPU_MASK_PM = $00100000; { inexact } _FPU_MASK_DM = $00000000; { denormalized operation } _FPU_MASK_ALL = $001f0000; { mask for all flags }

function FPU_GetCW : dword; nostackframe; assembler;
  asm
    rfs r0
  end;

procedure FPU_SetCW(cw : dword); nostackframe; assembler; asm
wfs r0

  end;

{$endif}
.
.
.

What is gba and nds?

extracted from rtl/arm/arm.inc

procedure fpc_cpuinit;
begin
{$if not(defined(wince)) and not(defined(gba)) and not(defined(nds))}
  asm
    rfs r0
    and r0,r0,#0xffe0ffff
    orr r0,r0,#0x00020000
    wfs r0
  end;
{$endif}
end;

Reply by email

Henry Vermaak
to josepascual (almudi
josepascual wrote 23 lines
I have downloaded SVN version for 2.1.3. I have no patch anything as other times before, I'm compiling with -CfSOFT (I want to generate a ppcrossarm eabi) make clean crossall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=/usr/local/arm/gcc-4.1.1-glibc-2.5-gnueabi/bin/ BINUTILSPREFIX=armv4t-crosstool-linux-gnueabi- PP=/usr/local/lib/fpc/2.1.1/ppc386 OPT="-CfSOFT" . . . /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s: Assembler messages: /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12610: Error: selected processor does not support `rfs r0' /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12613: Error: selected processor does not support `wfs r0' system.pp(335) Error: Error while assembling exitcode 1 system.pp(335) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted .

there might be a problem with your binutils. are you sure you're using the right binutils for your device? what device are you using, exactly?

henry

Reply by email

Henry Vermaak
to Henry Vermaak
Henry Vermaak wrote 29 lines
On 01/05/07, josepascual (almudi) wrote: > > I have downloaded SVN version for 2.1.3. I have no patch anything as other > times before, > > I'm compiling with -CfSOFT (I want to generate a ppcrossarm eabi) > > make clean crossall CPU_TARGET=arm OS_TARGET=linux > CROSSBINDIR=/usr/local/arm/gcc-4.1.1-glibc-2.5-gnueabi/bin/ > BINUTILSPREFIX=armv4t-crosstool-linux-gnueabi- > PP=/usr/local/lib/fpc/2.1.1/ppc386 OPT="-CfSOFT" > . > . > . > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s: Assembler > messages: > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12610: Error: > selected processor does not support `rfs r0' > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12613: Error: > selected processor does not support `wfs r0' > system.pp(335) Error: Error while assembling exitcode 1 > system.pp(335) Fatal: There were 2 errors compiling module, stopping > Fatal: Compilation aborted > . there might be a problem with your binutils. are you sure you're using the right binutils for your device? what device are you using, exactly?

actually, rfs is a floating point co-processor instruction (if i'm not mistaken). can you try this with latest fpc trunk, please, as -CfSOFT might be broken for your fpc. follow the instructions on http://www.freepascal.org/develop.var#svn to get the latest trunk.

henry

Reply by email

Henry Vermaak
to josepascual (almudi: I'm using a ARM920T (at91rm9200) with arm core ARMv4T My toolchain is from…
josepascual wrote 13 lines
I'm using a ARM920T (at91rm9200) with arm core ARMv4T My toolchain is from http://www.freaknet.org/martin/crosstool/packages/ " armv4t-crosstool-linux-gnueabi 4.1.1 4.1.1 2.5 6.5 48.7 MiB 49.0 MiB The libraries are compiled for, and the default compiler target is armv4t instead of the usual armv5t. " rfs, wfs are floating point instruction for arm so it's not possible to compile for a eabi (softfloat) version of ppccrossarm-eabi (softfloat) what do you think?

it should be possible, since i'm using fpc for arm softfloat here. see if you can get it to work with latest trunk.

Reply by email

josepascual (almudi
to Henry Vermaak: there might be a problem with your binutils. are you sure you're using the right…
Show quoted text 31 lines
> I have downloaded SVN version for 2.1.3. I have no patch anything as other > times before, > > I'm compiling with -CfSOFT (I want to generate a ppcrossarm eabi) > > make clean crossall CPU_TARGET=arm OS_TARGET=linux > CROSSBINDIR=/usr/local/arm/gcc-4.1.1-glibc-2.5-gnueabi/bin/ > BINUTILSPREFIX=armv4t-crosstool-linux-gnueabi- > PP=/usr/local/lib/fpc/2.1.1/ppc386 OPT="-CfSOFT" > . > . > . > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s: Assembler > messages: > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12610: Error: > selected processor does not support `rfs r0' > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12613: Error: > selected processor does not support `wfs r0' > system.pp(335) Error: Error while assembling exitcode 1 > system.pp(335) Fatal: There were 2 errors compiling module, stopping > Fatal: Compilation aborted > . there might be a problem with your binutils. are you sure you're using the right binutils for your device? what device are you using, exactly?

I'm using a ARM920T (at91rm9200) with arm core ARMv4T My toolchain is from http://www.freaknet.org/martin/crosstool/packages/ "
armv4t-crosstool-linux-gnueabi 4.1.1 4.1.1 2.5 6.5 48.7 MiB 49.0 MiB The libraries are compiled for, and the default compiler target is armv4t instead of the usual armv5t.
"
rfs, wfs are floating point instruction for arm so it's not possible to compile for a eabi (softfloat) version
of ppccrossarm-eabi (softfloat)

what do you think?

Reply by email

josepascual (almudi
to Henry Vermaak: actually, rfs is a floating point co-processor instruction (if i'm not mistaken). can…
Show quoted text 48 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: martes, 01 de mayo de 2007 13:36 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] some problem in SVN FPC for arm linux (v 2.3.1) On 01/05/07, Henry Vermaak wrote: > On 01/05/07, josepascual (almudi) wrote: > > > > I have downloaded SVN version for 2.1.3. I have no patch anything as other > > times before, > > > > I'm compiling with -CfSOFT (I want to generate a ppcrossarm eabi) > > > > make clean crossall CPU_TARGET=arm OS_TARGET=linux > > CROSSBINDIR=/usr/local/arm/gcc-4.1.1-glibc-2.5-gnueabi/bin/ > > BINUTILSPREFIX=armv4t-crosstool-linux-gnueabi- > > PP=/usr/local/lib/fpc/2.1.1/ppc386 OPT="-CfSOFT" > > . > > . > > . > > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s: Assembler > > messages: > > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12610: Error: > > selected processor does not support `rfs r0' > > /trabajo/x86/freepascal/svn/fpc/rtl/units/arm-linux/system.s:12613: Error: > > selected processor does not support `wfs r0' > > system.pp(335) Error: Error while assembling exitcode 1 > > system.pp(335) Fatal: There were 2 errors compiling module, stopping > > Fatal: Compilation aborted > > . > > there might be a problem with your binutils. are you sure you're > using the right binutils for your device? what device are you using, > exactly? > actually, rfs is a floating point co-processor instruction (if i'm not mistaken). can you try this with latest fpc trunk, please, as -CfSOFT might be broken for your fpc. follow the instructions on http://www.freepascal.org/develop.var#svn to get the latest trunk.

I have donwloaded SVN, I have built and install for i386-linux so I have a i386-linux version 2.3.1

I have made again crosscompiling using 2.3.1/ppc386 with CfSOFT and error appear again. I think it can be
a error $IF, perhaps code with rfs and wfs shouldn't be compile with CfSOFT flag.

Reply by email

josepascual (almudi
to Henry Vermaak: it should be possible, since i'm using fpc for arm softfloat here. see if you can get it…
Show quoted text 29 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Henry Vermaak Enviado el: martes, 01 de mayo de 2007 13:40 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] some problem in SVN FPC for arm linux (v 2.3.1) On 01/05/07, josepascual (almudi) wrote: > I'm using a ARM920T (at91rm9200) with arm core ARMv4T > My toolchain is from http://www.freaknet.org/martin/crosstool/packages/ > " > armv4t-crosstool-linux-gnueabi 4.1.1 4.1.1 2.5 6.5 48.7 MiB 49.0 MiB > The libraries are compiled for, and the default compiler target is armv4t > instead of the usual armv5t. > " > rfs, wfs are floating point instruction for arm so it's not possible to > compile for a eabi (softfloat) version > of ppccrossarm-eabi (softfloat) > > what do you think? > it should be possible, since i'm using fpc for arm softfloat here. see if you can get it to work with latest trunk.

So can it be only a problem with eabi? (i'm a little confuse with eabi and softfloat)

Reply by email

josepascual (almudi
to Henry Vermaak: it should be possible, since i'm using fpc for arm softfloat here. see if you can get it…

I have build cross compiling for arm ppc v2.3.1 but install,

I have resolved previuos install problem using 2.3.1 fpc i386-linux, but now I have a different new problem with make crossinstall for arm-linux:

/usr/bin/install -m 755 -d /usr/local/lib/fpc/2.3.1/units/arm-linux/fppkg /usr/bin/install -c -m 644 units/arm-linux/pkgwget.ppu units/arm-linux/pkglnet.ppu units/arm-linux/pkglibcurl.ppu units/arm-linux/fprepos.ppu units/arm-linux/fpxmlrep.ppu units/arm-linux/pkgoptions.ppu units/arm-linux/pkgglobals.ppu units/arm-linux/pkgmessages.ppu units/arm-linux/pkghandler.ppu units/arm-linux/pkgmkconv.ppu units/arm-linux/pkgdownload.ppu units/arm-linux/pkgarchive.ppu units/arm-linux/pkgfpmake.ppu units/arm-linux/pkgcommands.ppu
/usr/local/lib/fpc/2.3.1/units/arm-linux/fppkg
/usr/bin/install: no se puede efectuar `stat' sobre <units/arm-linux/fpxmlrep.ppu>: No existe el fichero o el directorio /usr/bin/install: no se puede efectuar `stat' sobre <units/arm-linux/pkgmkconv.ppu>: No existe el fichero o el directorio /usr/bin/install: no se puede efectuar `stat' sobre <units/arm-linux/pkgarchive.ppu>: No existe el fichero o el directorio /usr/bin/install: no se puede efectuar `stat' sobre <units/arm-linux/pkgfpmake.ppu>: No existe el fichero o el directorio /usr/bin/install: no se puede efectuar `stat' sobre <units/arm-linux/pkgcommands.ppu>: No existe el fichero o el directorio make[5]: *** [fpc_install] Error 1
make[5]: Leaving directory `/trabajo/x86/freepascal/svn/fpc/utils/fppkg' make[4]: *** [fppkg_install] Error 2
make[4]: Leaving directory `/trabajo/x86/freepascal/svn/fpc/utils' make[3]: *** [utils_install] Error 2
make[3]: Leaving directory `/trabajo/x86/freepascal/svn/fpc' make[2]: *** [installother] Error 2
make[2]: Leaving directory `/trabajo/x86/freepascal/svn/fpc' make[1]: *** [install] Error 2
make[1]: Leaving directory `/trabajo/x86/freepascal/svn/fpc' make: *** [crossinstall] Error 2

any suggestion?

Jose Pascual

Reply by email

Henry Vermaak
to josepascual (almudi

On 01/05/07, josepascual (almudi) wrote:
...
...

make: *** [crossinstall] Error 2 any suggestion?

nope, i had this problem, too and couldn't fix it. but, you will probably find that you can use your /usr/lib/fpc/2.3.1/ppcrossarm now.

Jose Pascual

henry

Reply by email

josepascual (almudi
to Henry Vermaak
Show quoted text 11 lines
On 01/05/07, josepascual (almudi) wrote: ... ... > make: *** [crossinstall] Error 2 > > any suggestion? > nope, i had this problem, too and couldn't fix it. but, you will probably find that you can use your /usr/lib/fpc/2.3.1/ppcrossarm now.

Yes, there is it,

I'm begining to use it. (to optain ppcrossarm I have had to delete all the problematic asm lines in arm.inc and mathu.inc)

thank you henry,

Jose Pascual

Reply by email

Henry Vermaak
to josepascual (almudi

hi jose

Show quoted text 7 lines
Yes, there is it, I'm begining to use it. (to optain ppcrossarm I have had to delete all the problematic asm lines in arm.inc and mathu.inc) thank you henry,

florian made a change to those files today. it would be nice if you can test the change by doing svn update and then building ppcrossarm again.

Jose Pascual

good luck!

henry

Reply by email

josepascual (almudi
to Henry Vermaak
Show quoted text 20 lines
hi jose > > Yes, there is it, > > I'm begining to use it. (to optain ppcrossarm I have had to delete all the > problematic asm lines in arm.inc and mathu.inc) > > thank you henry, florian made a change to those files today. it would be nice if you can test the change by doing svn update and then building ppcrossarm again. > > Jose Pascual > good luck!

Yes, We have had good luck :-)

only resolving problem with make crossinstall
Jose Pascual

Reply by email

Helmut Hartl

Hello,

> there might be a problem with your binutils. are you sure you're > using the right binutils for your device? what device are you using, > exactly?

What binutils for crosscompiling are you using for the NSLU2? Where do you obtain them?

Thank you,

helmut

Reply by email

Henry Vermaak
to Helmut Hartl: What binutils for crosscompiling are you using for the NSLU2? Where do you obtain them?…
Helmut Hartl wrote 9 lines
Hello, > > there might be a problem with your binutils. are you sure you're > > using the right binutils for your device? what device are > you using, > > exactly? What binutils for crosscompiling are you using for the NSLU2? Where do you obtain them?

i used the "mastermakefile" to build the tool chain:

http://www.nslu2-linux.org/wiki/Development/MasterMakefile

this makefile builds the firmware for the slug, so it builds the toolchain first. if you hit any problems with interworking, grep your gcc sources for "interwork" and read the documentation on this. there's a couple of options that you can pass to the linker regarding thumb interworking that might come in handy for you.

this is the _only_ toolchain that worked for me, since i had to link against external libs. if you're writing a stand-alone fpc app, you might get away by using any old binutils.

Thank you, helmut

henry

Reply by email

Luca Olivetti
to josepascual (almudi: Is there some fpc/pascal unit which implements semaphores for windows and linux (without…

En/na josepascual (almudi) ha escrit:

hi there, Is there some fpc/pascal unit which implements semaphores for windows and linux (without libc unit)?

have a look at syncobjs

Show quoted text 6 lines
and Is there some fpc/pascal unit which implement some logfile (in order to write log information during application run) for windows and linux (without libc unit)?

eventlog?

Bye

Luca

Reply by email

josepascual (almudi
to Luca Olivetti: En/na josepascual (almudi) ha escrit: have a look at syncobjs eventlog? Bye Luca
Show quoted text 8 lines
En/na josepascual (almudi) ha escrit: > hi there, > > Is there some fpc/pascal unit which implements semaphores for windows and > linux (without libc unit)? have a look at syncobjs

semaphores inside?

Show quoted text 10 lines
> > and > > Is there some fpc/pascal unit which implement some logfile (in order to > write log information during application run) for windows and linux (without > libc unit)? eventlog?

Some documentation about it?

Show quoted text 12 lines
Bye -- Luca _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Información de NOD32, revisión 2234 (20070502) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Helmut Hartl

Hello again Henry,

> > i used the "mastermakefile" to build the tool chain: > http://www.nslu2-linux.org/wiki/Development/MasterMakefile >

I followed the
http://www.nslu2-linux.org/wiki/HowTo/CrossCompileWithCentOS Worked for me for CentOS 5, i built the slugosle 4.4 and flashed it. Then i copy'ed the generated crosstoolchain and used it to make a cross compileing fpc 2.3.1 from svn head.

Many thanks for your help !!
A simple "FPC only Hello World" programm compiled works perfect on the NSLU2.

> this is the _only_ toolchain that worked for me, since i had > to link against external libs. if you're writing a > stand-alone fpc app, you might get away by using any old binutils. >

But a you predicted :-( i now have problems linking against an external library.
I want to use unit "dynlibs" to dynamically load the "libc.so.6" on the NLSU2
(i have done this under i386 linux sucessfully)

But i get the following error:

Free Pascal Compiler version 2.3.1 [2007/05/03] for arm Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for ARM
Compiling nslu_test.lpr
Assembling nslu_test
Linking nslu_test
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_fini'
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_init'
nslu_test.lpr(6,17) Error: Error while linking
nslu_test.lpr(6,17) Fatal: There were 1 errors compiling module, stopping

The source is:
---
program nslu_test;
{$mode objfpc}{$H+}
uses dynlibs;
begin
 writeln('Hello');
end.
---

Have you again any hints for me ?

Thanks,

helmut

Reply by email

Marco van de Voort
to Helmut Hartl
Show quoted text 5 lines
But a you predicted :-( i now have problems linking against an external library. I want to use unit "dynlibs" to dynamically load the "libc.so.6" on the NLSU2 (i have done this under i386 linux sucessfully)

dynlibs links statically to libc.so.6 to access dlopen et al.

Reply by email

Henry Vermaak
to Helmut Hartl: I followed the http://www.nslu2-linux.org/wiki/HowTo/CrossCompileWithCentOS Worked for me…
Helmut Hartl wrote 6 lines
But a you predicted :-( i now have problems linking against an external library. I want to use unit "dynlibs" to dynamically load the "libc.so.6" on the NLSU2 (i have done this under i386 linux sucessfully)

why do you want to load libc dynamically? may you can try the following approach (scroll to bottom):

http://community.freepascal.org:10000/docs-html/prog/progse53.html#x240-24300012.3

henry

Reply by email

Helmut Hartl
why do you want to load libc dynamically? may you can try the following approach (scroll to bottom): http://community.freepascal.org:10000/docs-html/prog/progse53

Well - that was what i would like to do - I thougt i try it using libc, as i hade some old code who was doing it just that way.

But also the following:

program nslu_test;
{$mode objfpc}{$H+}
{$linklib c}
begin
 writeln('Hello');
end.
ppcrossarm -XParm-linux- -CfSOFT nslu_test.lpr -Xd -Xr/usr/armlib

Fails with:

Free Pascal Compiler version 2.3.1 [2007/05/03] for arm Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for ARM
Compiling nslu_test.lpr
Assembling nslu_test
Linking nslu_test
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_fini'
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_init'
nslu_test.lpr(7,17) Error: Error while linking
nslu_test.lpr(7,17) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

Am i using the compiler switches wrong?
In "/usr/armlib" are the objects files of the slugosle build process ...

Thank you,

helmut

Reply by email

Henry Vermaak
to Helmut Hartl
Helmut Hartl wrote 38 lines
Well - that was what i would like to do - I thougt i try it using libc, as i hade some old code who was doing it just that way. But also the following: program nslu_test; {$mode objfpc}{$H+} {$linklib c} begin writeln('Hello'); end. > ppcrossarm -XParm-linux- -CfSOFT nslu_test.lpr -Xd -Xr/usr/armlib Fails with: Free Pascal Compiler version 2.3.1 [2007/05/03] for arm Copyright (c) 1993-2007 by Florian Klaempfl Target OS: Linux for ARM Compiling nslu_test.lpr Assembling nslu_test Linking nslu_test /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_fini' /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_init' nslu_test.lpr(7,17) Error: Error while linking nslu_test.lpr(7,17) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Am i using the compiler switches wrong? In "/usr/armlib" are the objects files of the slugosle build process ...

i vaguely remember getting this kind of problem too. my arm-linux-ld for the slug doesn't like my fpc object a last
resort i used the --allow-shlib-undefined option for ld and that worked for me...

Thank you, helmut

henry

Reply by email

Helmut Hartl
Show quoted text 13 lines
> linux (v 2.3.1) > > nslu_test.lpr Assembling nslu_test Linking nslu_test > > /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function > > `_haltproc': > > : undefined reference to `_fini' > > /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function > > `_haltproc': > > : undefined reference to `_init' > > i vaguely remember getting this kind of problem too. my > arm-linux-ld for the slug doesn't like my fpc object files > at all. as a last resort i used the --allow-shlib-undefined > option for ld and that worked for me...

Well - Thank you -> It now works and i got libc, sockets, ssl and much of our code to run on the SLUG
(I am really happy with possibilities of the crossarm compiler!!) Now we have strange problems with range errors and so on, needs further investigations ...

To circumvent the above mentioned error it is necessary to replace (copy over) cprt0.o with prt0.o as
It seems that _fini and _init are not needed (strange ?) i found a message from 2005 in the fpc list, in which this method was described.

BTW: I use the head revision of slugosle (openembedded) we took little endian because debian chose that too.
If it helps you can download an archive of my compiled binutils under http://zeosdownloads.firmos.at/downloads/

Regards,
helmut

Reply by email

Henry Vermaak
to Helmut Hartl
Helmut Hartl wrote 5 lines
Well - Thank you -> It now works and i got libc, sockets, ssl and much of our code to run on the SLUG (I am really happy with possibilities of the crossarm compiler!!) Now we have strange problems with range errors and so on, needs further investigations ...

excellent!

To circumvent the above mentioned error it is necessary to replace (copy over) cprt0.o with prt0.o as It seems that _fini and _init are not needed (strange ?) i found a message from 2005 in the fpc list, in which this method was described.

i didn't really look into this and i think it might be hard to investigate. my programs seem to work as expected (to an extent) when passing this option to ld. it only happens when i link to the slug libraries, though.

Show quoted text 8 lines
BTW: I use the head revision of slugosle (openembedded) we took little endian because debian chose that too. If it helps you can download an archive of my compiled binutils under http://zeosdownloads.firmos.at/downloads/ Regards, helmut

henry

Reply by email

Florian Klaempfl
to Helmut Hartl: Well - that was what i would like to do - I thougt i try it using libc, as i hade some…
Show quoted text 40 lines
> why do you want to load libc dynamically? may you can try > the following approach (scroll to bottom): > http://community.freepascal.org:10000/docs-html/prog/progse53 Well - that was what i would like to do - I thougt i try it using libc, as i hade some old code who was doing it just that way. But also the following: program nslu_test; {$mode objfpc}{$H+} {$linklib c} begin writeln('Hello'); end. > ppcrossarm -XParm-linux- -CfSOFT nslu_test.lpr -Xd -Xr/usr/armlib Fails with: Free Pascal Compiler version 2.3.1 [2007/05/03] for arm Copyright (c) 1993-2007 by Florian Klaempfl Target OS: Linux for ARM Compiling nslu_test.lpr Assembling nslu_test Linking nslu_test /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_fini' /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_init' nslu_test.lpr(7,17) Error: Error while linking nslu_test.lpr(7,17) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Am i using the compiler switches wrong? In "/usr/armlib" are the objects files of the slugosle build process ...

What libc do you use?

Reply by email

Helmut Hartl
Florian Klaempfl wrote
What libc do you use?

/lib/libc.so.6
GNU C Library development release version 2.3.90, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.1.
Compiled on a Linux 2.6.18 system on 2007-05-03.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others Support for some architectures added on, not maintained in glibc core.
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

During the make process (openembedded) the library seems to get patched.

helmut

Reply by email

josepascual (almudi
to Helmut Hartl: Well - that was what i would like to do - I thougt i try it using libc, as i hade some…

hi,

search *.o files in your crosstools and add diretory to ppcarm with -Fl

f.e.

find /usr/local/arm/armlinux/gcc-3.4.1-glibc-2.3.2 -name "*.o"

Show quoted text 61 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Helmut Hartl Enviado el: viernes, 04 de mayo de 2007 19:56 Para: FPC-Pascal users discussions Asunto: RE: [fpc-pascal] some problem in SVN FPC for arm linux (v 2.3.1) > why do you want to load libc dynamically? may you can try > the following approach (scroll to bottom): > http://community.freepascal.org:10000/docs-html/prog/progse53 Well - that was what i would like to do - I thougt i try it using libc, as i hade some old code who was doing it just that way. But also the following: program nslu_test; {$mode objfpc}{$H+} {$linklib c} begin writeln('Hello'); end. > ppcrossarm -XParm-linux- -CfSOFT nslu_test.lpr -Xd -Xr/usr/armlib Fails with: Free Pascal Compiler version 2.3.1 [2007/05/03] for arm Copyright (c) 1993-2007 by Florian Klaempfl Target OS: Linux for ARM Compiling nslu_test.lpr Assembling nslu_test Linking nslu_test /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_fini' /usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_init' nslu_test.lpr(7,17) Error: Error while linking nslu_test.lpr(7,17) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Am i using the compiler switches wrong? In "/usr/armlib" are the objects files of the slugosle build process ... Thank you, helmut _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Informacisn de NOD32, revisisn 2239 (20070504) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email