[Buildroot] Bug in RPATH fixing logic
Wolfgang Grandegger
wg at grandegger.com
Sun Nov 12 19:35:39 UTC 2017
Am 12.11.2017 um 20:04 schrieb Wolfgang Grandegger:
> Am 12.11.2017 um 19:03 schrieb Peter Korsgaard:
>>>>>>> "Thomas" == Thomas Petazzoni
>>>>>>> <thomas.petazzoni at free-electrons.com> writes:
>>
>> > Hello,
>> > On Sun, 12 Nov 2017 18:15:12 +0100, Peter Korsgaard wrote:
>>
>> >> > So this happens because the ARC binutils version is fetched
>> from Git,
>> >> > so we need to have host-flex installed, and binutils detects
>> the flex
>> >> > library and decides to use it.
>> >>
>> >> And there is no configure flag to disable that?
>>
>> > Not that I can see.
>>
>> Ok.
>>
>> >> Is there a way to get binutils to use soft links instead of hard
>> links?
>>
>> > How would this solve the problem?
>>
>> Well, the problem is that the binary gets processed twice in different
>> directories because of the hard link, so if it instead was a softlink it
>> woud get ignored by the RPATH logic and only get fixed up once - Right?
>
> Yes, soft links are ignored (only find -type f). $ORIGIN will not work
> with hard-linked binary files in different levels of the file hierarchy.
Well, adding a proper $ORIGIN/... for each link to the RPATH would work
but detecting if other hard links exist is a bit tricky and would take
time. If the references count (number of hardlinks to a particular
inode) is greater than 1, we could process them in a special way. Not
sure if it's worth the effort.
Wolfgang.
More information about the buildroot
mailing list