[fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?
fredvs
fiens at hotmail.com
Sat Sep 3 00:03:01 CEST 2016
Hello Marc.
And thanks to help.
OK, I have investigate more and there is something that disturb me:
When compiling on a FreeBSD 64 bit system using fpc-freebsd-*64*, there is
that message on linking:
[3.069] Searching file /usr/bin/ld... found
[3.069] Using util /usr/bin/ld
[3.069] Executing "/usr/bin/ld -b elf64-x86-64-freebsd -m elf64-x86-64_fbsd
-L. -o ./test ./link.res" *with fpSystem call*
[3.960] 62 lines compiled, 4.0 sec
[3.972] 2 hint(s) issued
OK, it works.
When compiling on a FreeBSD 64 bit system using fpc-freebsd-*32* there is
that message on linking:
[3.069] Searching file /usr/bin/ld... found
[3.069] Using util /usr/bin/ld
[3.069] Executing "/usr/bin/ld -b elf32-i386-freebsd -m elf32-i386-freebsd
-L. -o ./test ./link.res" *with fpSystem call*
[3.960] 62 lines compiled, 4.0 sec
[3.972] 2 hint(s) issued
OK, it works.
When compiling on a FreeBSD 64 bit system using fpc-freebsd-*32*, there is
that message on linking:
3.069] Searching file /usr/bin/ld... found
[3.069] Using util /usr/bin/ld
[3.069] Executing "/usr/bin/ld -b elf32-i386-freebsd -m elf_i386_fbsd -L.
-o ./test ./link.res" *with fpSystem call*
[3.960] 62 lines compiled, 6.0 sec
[3.972] 2 hint(s) issued
OK, it works.
But when compiling on a FreeBSD 64 bit system using fpc-*linux-64*, there is
that message on linking:
[4.438] Searching file /bin/ld... found
[4.438] Using util /bin/ld
[4.438] Executing "/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64
*--dynamic-linker=/lib64/ld-linux-x86-64.so
.2* -L. -o ./test ./link.res"
/bin/ld: warning: ./link.res contains output sections; did you forget -T?
[246.930] test.pas(62,1) Error: Can't call the linker, switching to external
linking
[246.930] test.pas(62,1) Error: Error while linking
[246.930] test.pas(62,1) Fatal: There were 2 errors compiling module,
stopping
[247.070] Fatal: Compilation aborted
So the question is:
What define in fpc.cfg --->
*with fpSystem call*
vs
*--dynamic-linker=/lib64/ld-linux-x86-64.so.2*
This because I want to try when linking using fpc-linux:
[4.438] Executing "/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64
*with fpSystem call* -L. -o ./test ./link.res"
Many thanks.
Fre;D
-----
Many thanks ;-)
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Linking-to-Linux-on-a-FreeBSD-system-with-Linux-emulated-tp5726205p5726233.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list