[Buildroot] Bug in RPATH fixing logic

Wolfgang Grandegger wg at grandegger.com
Mon Nov 13 18:04:47 UTC 2017


Hello,

Am 13.11.2017 um 18:36 schrieb Yann E. MORIN:
> Peter, All,
> 
> On 2017-11-13 14:50 +0100, Peter Korsgaard spake thusly:
>>>>>>> "Wolfgang" == Wolfgang Grandegger <wg at grandegger.com> writes:
>>   > This means: A symbolic link would work.
>> Ok, great - Makes sense. I wonder how much effort it wil be to get
>> binutils to generate symbolic links instead of hard links.
> 
> No way.

Well, the attached patch fixes the issue with the binary utilities (ld,
ar, objdump, as, ...). I think only the fixes in "binutils/Makefile.in" and
"gas/Makefile.in" are need, IIRC. And in the fixes did not break the
build, at least. Will do more checks...

> We'll have to provide post-install hooks to do the de-hardlinking step
> ourselves.

> Also, as Wolfgang noticed, gcc is also affected by the hardlink issue.

No, with the patch above I get:

./bin/x86_64-buildroot-linux-gnu-gcc-6.4.0.br_real: Device: 811h/2065d	Inode: 64370910    Links: 3
./bin/x86_64-buildroot-linux-gnu-g++.br_real: Device: 811h/2065d	Inode: 64370887    Links: 2
./bin/x86_64-buildroot-linux-gnu-gcc.br_real: Device: 811h/2065d	Inode: 64370910    Links: 3
./bin/x86_64-buildroot-linux-gnu-c++.br_real: Device: 811h/2065d	Inode: 64370887    Links: 2
./bin/x86_64-buildroot-linux-gnu-cc.br_real: Device: 811h/2065d	Inode: 64370910    Links: 3
./x86_64-buildroot-linux-gnu/sysroot/usr/libexec/getconf/XBS5_LP64_OFF64: Device: 811h/2065d	Inode: 72747785    Links: 4
./x86_64-buildroot-linux-gnu/sysroot/usr/libexec/getconf/POSIX_V6_LP64_OFF64: Device: 811h/2065d	Inode: 72747785    Links: 4
./x86_64-buildroot-linux-gnu/sysroot/usr/libexec/getconf/POSIX_V7_LP64_OFF64: Device: 811h/2065d	Inode: 72747785    Links: 4
./x86_64-buildroot-linux-gnu/sysroot/usr/bin/getconf: Device: 811h/2065d	Inode: 72747785    Links: 4
./x86_64-buildroot-linux-gnu/sysroot/usr/lib/dri/i965_dri.so: Device: 811h/2065d	Inode: 72748076    Links: 2
./x86_64-buildroot-linux-gnu/sysroot/usr/lib/dri/i915_dri.so: Device: 811h/2065d	Inode: 72748076    Links: 2

The gcc hard links are all in the same directory. Just "getconf" remains,
but the RPATH is already empty.

Wolfgang.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-use-symbolic-instead-of-hard-links.patch
Type: text/x-patch
Size: 6710 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171113/d079cb1b/attachment.bin>


More information about the buildroot mailing list