[fpc-pascal] Mipsel compilation: changing elf flags?!
Heiko Tietze
heiko_tietze at web.de
Tue Apr 23 22:39:09 CEST 2013
>If OP could identify the correct parameter for ld it might be possible to use
fpc's -k option.
What am I supposed to do? ld has myriads of options. I don't set any
intentional (/usr/local/bin/mipsel-linux-ld is just a softlink to
.../mipsel/bin/ld)
>RE: [fpc-devel] FPC for MIPS
>Pierre Free Pascal Tue, 15 Jan 2013 07:59:00 -0800
> I updated ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/mipsel-linux/ ...
svn up (Revision 24313)
export PP=
make "OPT=-O- -g" -C compiler mipsel
sudo mv compiler/ppcmipsel /usr/lib/fpc/2.6.2/ppcmipsel
{I don't want to corrupt my standard compiler}
export PP=/usr/lib/fpc/2.6.2/ppcmipsel
mv rtl/units/mipsel-linux/ /usr/lib/fpc/2.6.2/units/
ppcmipsel -vt bogus
|Configfile search: /home/tietze/.fpc.cfg
|Reading options from file /home/tietze/.fpc.cfg
|Path "/usr/lib/fpc/2.7.1/units/mipsel-linux/httpd22/" not found
|Path "/usr/lib/fpc/2.7.1/units/mipsel-linux/" not found
|Path "/usr/lib/fpc/2.7.1/units/mipsel-linux/*/" not found
|Path "/usr/lib/fpc/2.7.1/units/mipsel-linux/rtl/" not found
|Path "/usr/lib/fpc/2.6.2/units/mipsel-linux/*/" not found
|Path "/usr/lib/fpc/2.6.2/units/mipsel-linux/rtl/" not found
|Free Pascal Compiler version 2.7.1 [2013/04/23] for mipsel
|Copyright (c) 1993-2013 by Florian Klaempfl and others
|Path "/usr/lib/fpc/2.7.1/units/mipsel-linux/rtl/" not found
|Searching file /lib/ld.so.1... not found
|Searching file /lib/ld-uClibc.so.0... not found
|Compiler: /usr/lib/fpc/2.6.2/ppcmipsel
|Target OS: Linux for MIPSEL
|Using executable path: /usr/lib/fpc/2.6.2/
|Using unit path: /usr/lib/fpc/2.6.2/units/mipsel-linux/
|Using unit path: /usr/lib/fpc/2.6.2/
|Using library path: /usr/local/mipsel/lib/
|Using library path: /usr/lib/fpc/2.6.2/units/mipsel-linux/
|Using library path: /usr/lib/fpc/2.6.2/
|Using object path: /usr/lib/fpc/2.6.2/units/mipsel-linux/
|Using object path: /usr/lib/fpc/2.6.2/
|Compiling bogus
ppcmipsel hello.pp
|Free Pascal Compiler version 2.7.1 [2013/04/23] for mipsel
|Copyright (c) 1993-2013 by Florian Klaempfl and others
|Target OS: Linux for MIPSEL
|Compiling hello.pp
|Assembling hello
|Linking hello
|/usr/local/bin/mipsel-linux-ld: warning: link.res contains output sections;
did you forget -T?
|/usr/local/bin/mipsel-linux-ld: hello.o: warning: linking abicalls files with
non-abicalls files
|/usr/local/bin/mipsel-linux-ld: /usr/lib/fpc/2.6.2/units/mipsel-
linux/system.o: warning: linking abicalls files with non-abicalls files
|3 lines compiled, 0.1 sec
more .fpc.cfg
|#ifdef cpumipsel
|-Xd
|-Fl/usr/local/mipsel/lib
|-Pmipsel
|-Cg
|-CfSOFT
|-Fu/usr/lib/fpc/2.6.2/units/$fpctarget
|-Fu/usr/lib/fpc/2.6.2/units/$fpctarget/*
|-Fu/usr/lib/fpc/2.6.2/units/$fpctarget/rtl
|#endif
readelf -h hello
|ELF Header:
| Magic: 7f 45 4c 46 01 01 01 00 01 00 00 00 00 00 00 00
| Class: ELF32
| Data: 2's complement, little endian
| Version: 1 (current)
| OS/ABI: UNIX - System V
| ABI Version: 1
| Type: EXEC (Executable file)
| Machine: MIPS R3000
| Version: 0x1
| Entry point address: 0x401210
| Start of program headers: 52 (bytes into file)
| Start of section headers: 41624 (bytes into file)
| Flags: 0x50001005, noreorder, cpic, o32, mips32
| Size of this header: 52 (bytes)
| Size of program headers: 32 (bytes)
| Number of program headers: 3
| Size of section headers: 40 (bytes)
| Number of section headers: 9
| Section header string table index: 8
Execution still fails on the Fritz!Box.
PS: Please CC' me any reply; I dislike mailinglists ;-)
More information about the fpc-pascal
mailing list