Simon Kissel wrote:
[Sorry, didn't notice reply-to is set to sender and not the list here]
Skybuck,
thanks for the detailed guide. However, it was simpler than that... with the help from the guys at #fpc, I got ftp://ftp.freepascal.org/pub/fpc/contrib/cross/mingw/mingwcross.zip
Unzipped that to <install>\cross, then got myself some linux libs needed for the dynamic linker (libc.so.6 and friends) and finally I'm able to cross-compile hello world C:\pp\demo\text>fpc -Tlinux -FDc:\pp\cross\i686-linux -XPi686-linux- -Xd -Xc -Fl c:\crosskylix\lib hello.pp
This is with dynamic linking of libc as pthreads is going to be used. The resulting binary is a valid dynamic ELF file:
[EMAIL PROTECTED] /home/scamp# ldd hello libc.so.6 => /lib/libc.so.6 (0x2aade000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x55555000)
So far so good. Sadly it segfaults:
[EMAIL PROTECTED] /home/scamp# strace ./hello execve("./hello", ["./hello"], [/* 26 vars */]) = 0 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++
Static linked binarys work fine, though. Now I only have to find out why everything dynamically linked crashes.
The addresses where the shared libs should be loaded, look very strange usually it's 0x40000000+ ?
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal