[fpc-pascal] fpc arm big endian help

2006-10-23 Thread Terry Kemp
Hi all

I'm working on some code for the NSLU2 'slug'.
How do I get ppcarm to compile in big endian mode?
I have done it once before but I've lost the magic wand somewhere.

Do I need to build from source as in a post I saw on devel list...
change system_arm_linux_info.endian to endian_big in 
/pp/compiler/systems/i_linux.pas
then run make clean CPU_TARGET=arm CROSSINSTALL=1
then make crossall CPU_TARGET=arm OS_TARGET=linux

heres one I prepared earlier...
$ file /opt/slugtest
/opt/slugtest: ELF 32-bit MSB executable, ARM, version 1 (ARM), for
GNU/Linux 2.0.0, statically linked, for GNU/Linux 2.0.0, stripped

so I know it worked before - but now...

$ ppcarm -XParm-linux- slugtest.pp
Free Pascal Compiler version 2.0.4 [2006/08/23] for arm
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for ARM
Compiling slugtest.pp
slugtest.pp(26,10) Note: Local variable lK is assigned but never used
slugtest.pp(10,6) Note: Local variable lI not used
Assembling slugtest
Linking slugtest
69 Lines compiled, 0.0 sec

$ file slugtest
slugtest: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux
2.0.0, statically linked, for GNU/Linux 2.0.0, stripped

$ ppcarm -XParmv5b-linux- slugtest.pp
Free Pascal Compiler version 2.0.4 [2006/08/23] for arm
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for ARM
Compiling slugtest.pp
slugtest.pp(26,10) Note: Local variable lK is assigned but never used
slugtest.pp(10,6) Note: Local variable lI not used
Assembling slugtest
Linking slugtest
/home/tkemp/bin/armv5b-linux-ld: 
/usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/prt0.o: compiled for a little 
endian system and target is big endian
/home/tkemp/bin/armv5b-linux-ld: failed to merge target specific data of
file /usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/prt0.o
/home/tkemp/bin/armv5b-linux-ld: 
/usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/system.o: compiled for a little 
endian system and target is big endian
/home/tkemp/bin/armv5b-linux-ld: failed to merge target specific data of
file /usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/system.o... ...

I'm cross compiling from x86_64 if that makes any difference...
fpc-2.0.4-2.fc5
Free Pascal Compiler version 2.0.4 [2006/09/20] for x86_64
Copyright (c) 1993-2006 by Florian Klaempfl

Thanks for any help

Terry

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc arm big endian help

2006-10-23 Thread Matt Emson


- Original Message - 
From: Terry Kemp [EMAIL PROTECTED]

To: fpc-pascal@lists.freepascal.org
Sent: Monday, October 23, 2006 11:14 PM
Subject: [fpc-pascal] fpc arm big endian help



Hi all

I'm working on some code for the NSLU2 'slug'.
How do I get ppcarm to compile in big endian mode?
I have done it once before but I've lost the magic wand somewhere.

Do I need to build from source as in a post I saw on devel list...
change system_arm_linux_info.endian to endian_big in 
/pp/compiler/systems/i_linux.pas

then run make clean CPU_TARGET=arm CROSSINSTALL=1
then make crossall CPU_TARGET=arm OS_TARGET=linux

heres one I prepared earlier...
$ file /opt/slugtest
/opt/slugtest: ELF 32-bit MSB executable, ARM, version 1 (ARM), for
GNU/Linux 2.0.0, statically linked, for GNU/Linux 2.0.0, stripped

so I know it worked before - but now...

$ ppcarm -XParm-linux- slugtest.pp
Free Pascal Compiler version 2.0.4 [2006/08/23] for arm
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for ARM
Compiling slugtest.pp
slugtest.pp(26,10) Note: Local variable lK is assigned but never used
slugtest.pp(10,6) Note: Local variable lI not used
Assembling slugtest
Linking slugtest
69 Lines compiled, 0.0 sec

$ file slugtest
slugtest: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux
2.0.0, statically linked, for GNU/Linux 2.0.0, stripped

$ ppcarm -XParmv5b-linux- slugtest.pp
Free Pascal Compiler version 2.0.4 [2006/08/23] for arm
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for ARM
Compiling slugtest.pp
slugtest.pp(26,10) Note: Local variable lK is assigned but never used
slugtest.pp(10,6) Note: Local variable lI not used
Assembling slugtest
Linking slugtest
/home/tkemp/bin/armv5b-linux-ld: 
/usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/prt0.o: compiled for a little 
endian system and target is big endian

/home/tkemp/bin/armv5b-linux-ld: failed to merge target specific data of
file /usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/prt0.o
/home/tkemp/bin/armv5b-linux-ld: 
/usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/system.o: compiled for a 
little endian system and target is big endian

/home/tkemp/bin/armv5b-linux-ld: failed to merge target specific data of
file /usr/local/lib/fpc/2.0.4/units/arm-linux/rtl/system.o... ...

I'm cross compiling from x86_64 if that makes any difference...
fpc-2.0.4-2.fc5
Free Pascal Compiler version 2.0.4 [2006/09/20] for x86_64
Copyright (c) 1993-2006 by Florian Klaempfl

Thanks for any help

Terry

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.8/489 - Release Date: 20/10/2006




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc arm big endian help

2006-10-23 Thread Matt Emson
Ooops.. this time with a reply.. prt0.o is a bit of assembler IIRC... is 
it compiled for bigendian? That looks to be your issue. Part of the RTL is 
in little endian format and needs to be recompiled. 


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal