Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC PATCH v3 00/10] Make the SDK relocatable
Date: Thu, 29 Jun 2017 10:02:15 +0200	[thread overview]
Message-ID: <681841f3-9d91-a2fe-d2ea-1282de1844e7@grandegger.com> (raw)
In-Reply-To: <d0246c22-0486-a095-0bf4-77cc14784997@grandegger.com>

Hello Arnout,

about rpath sanitazion of patchelf and m4...

Am 29.06.2017 um 08:13 schrieb Wolfgang Grandegger:
> 
> 
> Am 28.06.2017 um 21:33 schrieb Arnout Vandecappelle:
>>
>>
>> On 28-06-17 14:36, Wolfgang Grandegger wrote:
>>>
>>>
>>> Am 28.06.2017 um 13:16 schrieb Arnout Vandecappelle:
>>>>
>>>>
>>>> On 28-06-17 12:57, Wolfgang Grandegger wrote:
>>>> [snip]
>>>>> The list is built with "comm -13 ...". While implementing that way, 
>>>>> I realized
>>>>> that I need patchelf for the host as very first package. Any idea 
>>>>> how that could
>>>>> achieved?
>>>>
>>>>    host-patchelf should be added to DEPENDENCIES_HOST_PREREQ so it 
>>>> gets built
>>>> before all the rest. In the instrumentation hook, you should also 
>>>> skip the
>>>> sanitization when the package is not in DEPENDENCIES_HOST_PREREQ.
>>>
>>> I thought all host binaries must have an rpath to <path>/usr/lib, 
>>> which should
>>> be replaced with "$ORIGIN/../../../usr/lib"
>>
>>   Only if they use a library in $HOST_DIR/usr/lib - otherwise 
>> sanitize-rpath will
>> remove the rpatch completely, no?
> 
> Makes sense.
> 
>>   DEPENDENCIES_HOST_PREREQ contains only a few packages, none of which 
>> are linked
>> with any library in $HOST_DIR/usr/lib. At least I think so.
> 
> In may case it only contains "patchelf", which needs rpath sanitation.
> 
>>>>    That means that those packages will not get sanitized - which 
>>>> shouldn't be
>>>> necessary since they anyway don't have an rpath. But perhaps it's a 
>>>> good idea
>>>> then to add a readelf-based check for them that verifies they don't 
>>>> have
>>>> DT_RUNPATH or DT_RPATH. The latter is just a nice-to-have, though, 
>>>> so don't
>>>> worry about it at first.
>>>
>>> See above.
>>>
>>> Even with setting DEPENDENCIES_HOST_PREREQ to patchelf at the first 
>>> place, some
>>> packages are required in advance to build patchelf :(.
>>
>>   Really? Which ones? patchelf has no dependencies.
> 
>    host-m4-1.4.18
>    host-libtool-2.4.6
>    host-autoconf-2.69
>    host-automake-1.15
>    host-patchelf-29c085fd9d3fc972f75b3961905d6b4ecce7eb2b
> 
> Here is the order in which the packages are built. Patchelf needs 
> automake and friends. The "host-m4" binary m4 has an rpath;
> 
> <buildroot-build-dir>/host/usr/lib
> 
> The others have perl scripts only. Hence, we need to sanitize the 
> "host-m4" package after patchelf is available. Not too bad.

Neither patchelf nor m4 uses libraries from /usr/lib and therefore the 
rpath is empty. A mistake in my scripts confused me... sorry for the noise.

Wolfgang.

> 
> Wolfgang.

  reply	other threads:[~2017-06-29  8:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  7:54 [Buildroot] [RFC PATCH v3 00/10] Make the SDK relocatable Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 01/10] package/patchelf: use most recent version as a base for rpath sanitation Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 02/10] package/patchelf: add patch for rpath sanitation under a root directory Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 03/10] support/scripts: add fix-rpath script to sanitize the rpath Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 04/10] core: sanitize RPATH in host tree at the very end of the build Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 05/10] core: sanitize RPATH in target tree at the end of the target finalization Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 06/10] support/scripts: add reloacte-sdk.sh script for SDK relocation Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 07/10] core: install relocation script and location at the end of the build Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 08/10] external-toolchain: check if a buildroot SDK has already been relocated Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 09/10] support/scripts: check-host-rpath now handles $ORIGIN as well Wolfgang Grandegger
2017-03-23  7:54 ` [Buildroot] [RFC PATCH v3 10/10] package/qt5base: provide "qt.conf" to make "qmake" relocatable Wolfgang Grandegger
2017-04-12 13:59 ` [Buildroot] [RFC PATCH v3 00/10] Make the SDK relocatable Arnout Vandecappelle
2017-04-27  9:37   ` Wolfgang Grandegger
2017-06-21  7:59     ` Wolfgang Grandegger
2017-06-21 21:03       ` Arnout Vandecappelle
2017-06-21 21:06         ` Arnout Vandecappelle
2017-06-27 10:54           ` Wolfgang Grandegger
2017-06-27 22:41             ` Arnout Vandecappelle
2017-06-28  6:51               ` Wolfgang Grandegger
2017-06-28 10:44                 ` Arnout Vandecappelle
2017-06-28 10:59                   ` Wolfgang Grandegger
2017-06-22  6:37         ` Wolfgang Grandegger
2017-06-27 22:47           ` Arnout Vandecappelle
2017-06-28  6:40             ` Peter Korsgaard
2017-06-28  6:45             ` Wolfgang Grandegger
2017-06-28 10:41               ` Arnout Vandecappelle
2017-06-28 10:57                 ` Wolfgang Grandegger
2017-06-28 11:16                   ` Arnout Vandecappelle
2017-06-28 12:36                     ` Wolfgang Grandegger
2017-06-28 19:33                       ` Arnout Vandecappelle
2017-06-29  6:13                         ` Wolfgang Grandegger
2017-06-29  8:02                           ` Wolfgang Grandegger [this message]
2017-06-30  8:50                             ` Wolfgang Grandegger
2017-06-30  9:14                               ` Wolfgang Grandegger
2017-06-30 10:25                                 ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=681841f3-9d91-a2fe-d2ea-1282de1844e7@grandegger.com \
    --to=wg@grandegger.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox