[fpc-pascal] Linker script doesn't search in /usr/lib32 when cross compiling from x86_64 to i386

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jan 19 14:34:42 CET 2015


On 11 Jan 2015, at 08:53, leledumbo wrote:

> 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.

Because we don't use the linker's "-T" option (the one the linker  
warning refers to), the link.res should be added to the built-in  
linker script of your system rather than replace it. This built-in  
linker script should already contain the default library paths. Run  
"ld -m elf_i386 --verbose" to see this built-in linker script. The  
default directories are listed via SEARCH_DIR() near the top.

I don't know what could have changed in FPC to cause your observed  
change. Did you perhaps also regenerate your fpc.cfg configuration  
file when updating? Maybe something changed in that regard.


Jonas



More information about the fpc-pascal mailing list