[fpc-pascal] Cross compiling x86_64 on i386 Linux.

Jonas Maebe jonas.maebe at elis.ugent.be
Thu May 31 09:59:06 CEST 2012

Bruce Tulloch wrote on Thu, 31 May 2012:

> On 31/05/12 01:40, Jonas Maebe wrote:
>> That's correct. It seems that -XR isn't completely implemented on  
>> Linux in the compiler. Could you try, *instead* of using -XR, to  
>> use -k--sysroot=/full/path/to/crossroot/ ?
> I replaced the -XR option with
>   -k--sysroot=/mnt/engels
> and that works (ie, you are correct, -XR does not appear to pass the
> sysroot to the linker)

No, on Linux it prepends the search paths with the -XR path internally  
in the compiler. The reason is that not all GNU binutils builds  
support the --sysroot parameter, and especially when -XR was  
implemented it wasn't very commonplace yet. That should probably be  

> which does not right to me. It looks like --sysroot is not analogous to
> chroot as far as the linker is concerned and symlinks are dereferenced
> literally.

That's correct, --sysroot is not the same as a chroot, and I doubt it  
was ever meant to be. All it does is prepend the sysroot path to all  
searched files. It seems quite reasonable to me that in certain  
situations someone would want to set up their library directory with  
symlinks pointing to other locations on their system (e.g. for sharing  
files located elsewhere).

So if you want to simply copy files from another system, you'll indeed  
have to change some symlinks. You can try filing a bug with binutils  
of course, but I don't think it will be considered a bug (although you  
can always ask to add an option to get the behaviour you want).


More information about the fpc-pascal mailing list