[Buildroot] [PATCH v7 2/9] support/scripts: add fix-rpath script to sanitize the rpath
Arnout Vandecappelle
arnout at mind.be
Thu Jul 20 14:19:45 UTC 2017
On 20-07-17 16:08, Wolfgang Grandegger wrote:
> Hello Arnout,
>
> Am 20.07.2017 um 15:45 schrieb Arnout Vandecappelle:
>>
>>
>> On 20-07-17 11:03, Wolfgang Grandegger wrote:
>>> case "${tree}" in
>>> host)
>>> ...
>>> # we always want $ORIGIN-based rpaths to make it relocatable.
>>
>> Perfect. Just please start the sentence with a capital (it ends with a .)
>
> Well, I followed the style of the original script... just to be consistent...
> otherwise we will have an ugly mix.
There is no original script, only an original author :-)
So indeed, fix it script-wide please.
[snip]
>>> As I said, the execution time comes form scanning for ELF files. The rest
>>> doesn't
>>> matter a lot.
>>
>> Instead of the patch you attached, it might actually make more sense to create
>> a tiny C file that does this, and execute that as part of the find command. Or
>> you could just create support/scripts/elfmagic with those 4 bytes and use "cmp
>> -n 4 {} ${0%/*}/elfmagic".
>
> Yes, I had that idea as well and I have already hacked something. The problem is
> that it does not check if it does have an rpath.
Well, you could do that particular check in the find -exec and keep the
--print-rpath check in the while loop.
> "cmp" is not faster, I already
> tried!
OK good. Might be a good idea to keep track of the things you already tried in
the cover letter.
Regards,
Arnout
>
>> By the way, I believe filtering with -exec is much faster than doing it with
>> while/if. Unfortunately you can't use that with patchelf --print-rpath because
>> the output of patchelf would be mixed up with the find output.
>
> I already tried various other solutions.
>
> Just preparing v8...
>
> Wolfgang.
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
More information about the buildroot
mailing list