Sign in Join

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

Mailing lists / fpc-pascal / 2006-10

fpc arm big endian help

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

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

Matt Emson
to Terry Kemp

----- Original Message -----

Earlier message 80 lines
From: "Terry Kemp" To: 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 - > 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 > >