> The weird thing is that the linker only looks at /lib and /usr/lib, but not /usr/lib32, which should be the location of 32-bit libraries on 64-bit system. Using -Cn, I can see that link.res doesn't contain path to /usr/lib32, and manually changing it makes the linking success.
OK, this one can be solved by explicitly stating /usr/lib32 via -Fl in fpc.cfg (but even then the linker script still adds /lib and /usr/lib to the SEARCH_DIR). The actual problem that makes the linking fail is the two inputs: /lib/crti.o /lib/crtn.o This is because /lib is a symlink to /usr/lib in 64-bit systems. Changing the symlink to /usr/lib32 makes the linking works, but obviously not an elegant solution. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Linker-script-doesn-t-search-in-usr-lib32-when-cross-compiling-from-x86-64-to-i386-tp5720749p5720757.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal