Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v8 04/14] core: add HOST_SANITIZE_RPATH_HOOK to TARGET_FINALIZE_HOOKS
Date: Tue, 19 Apr 2016 01:38:19 +0200	[thread overview]
Message-ID: <57156FEB.6030203@mind.be> (raw)
In-Reply-To: <20160418133325.4892c80b@free-electrons.com>

On 04/18/16 13:33, Thomas Petazzoni wrote:
> Hello,
>
> On Sun, 17 Apr 2016 23:38:21 +0200, Samuel Martin wrote:
>
>> +# RPATH fixing
>> +# - The host hook sets RPATH in host ELF binaries, using relative paths to the
>> +#   library locations.
>> +# - The target hook sanitizes RPATH in target ELF binaries, removing paths
>> +#   pointing to package's build directories or the sysroot's libdirs.
>
> There is nothing in this patch that adds a target hook.
>
>> +PACKAGES += host-patchelf
>> +
>> +define HOST_SANITIZE_RPATH_HOOK
>> +	PATCHELF=$(HOST_DIR)/usr/bin/patchelf \
>> +	READELF=readelf \
>> +		$(TOPDIR)/support/scripts/fix-rpath host $(HOST_DIR)
>> +endef
>> +
>> +TARGET_FINALIZE_HOOKS += HOST_SANITIZE_RPATH_HOOK
>
> I find it somewhat odd that this gets done as a "target finalize" hook
> since it really has nothing to do with finalizing the target. It really
> just needs to be done "at the end of the build".
>
> We could add that as a new target, but it would complexify the
> dependency chain, so maybe adding to TARGET_FINALIZE_HOOKS is the
> easiest solution after all.
>
> One tricky aspect though is that not all host packages are guaranteed
> to be built by the time TARGET_FINALIZE_HOOKS is called. Indeed,
> TARGET_FINALIZE_HOOKS is guaranteed to be called after all *target*
> packages have been built. But if a host package is needed just to
> build a filesystem image for example, it is not guaranteed that it will
> be built before TARGET_FINALIZE_HOOKS is called.

  Actually, it is run after all explicitly selected packages have been built. So 
this is yet another reason to also add Kconfig options for host packages.

  Regards,
  Arnout

>
> Best regards,
>
> Thomas
>


-- 
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

  parent reply	other threads:[~2016-04-18 23:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 21:38 [Buildroot] [PATCH v8 00/14] Relocatable SDK/Build machine leaks: RPATH fixing Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 01/14] core: split variables definition related to in/out-of-tree build from O itself Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 02/14] core: re-enter make if $(CURDIR) or $(O) are not absolute canonical path Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 03/14] support/scripts: add fix-rpath script + a bunch of helpers Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 04/14] core: add HOST_SANITIZE_RPATH_HOOK to TARGET_FINALIZE_HOOKS Samuel Martin
2016-04-18 11:33   ` Thomas Petazzoni
2016-04-18 12:18     ` Samuel Martin
2016-04-18 23:38     ` Arnout Vandecappelle [this message]
2016-04-19  7:21       ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 05/14] core: add {TARGET, STAGING}_SANITIZE_RPATH_HOOK " Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 06/14] package/speex: remove no longer needed hook Samuel Martin
2016-04-18 19:33   ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 07/14] toolchain: add post-install hooks making the toolchain relocatable Samuel Martin
2016-04-18 19:33   ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 08/14] support/scripts: update check-host-rpath to use the shell helpers Samuel Martin
2016-04-18 19:36   ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 09/14] support/scripts/check-host-rpath: silent find command Samuel Martin
2016-04-18 19:36   ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 10/14] support/scripts/check-host-rpath: also check HOST_DIR/{bin, sbin} Samuel Martin
2016-04-18 19:37   ` Thomas Petazzoni
2016-04-17 21:38 ` [Buildroot] [PATCH v8 11/14] support/scripts: add check-host-leaks script + all needed helpers Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 12/14] core: add check-leaks-in-{target, host, staging} targets Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 13/14] support/scripts/check-host-leaks: add option to classify leaks Samuel Martin
2016-04-17 21:38 ` [Buildroot] [PATCH v8 14/14] docs/manual: document how to debug shell script Samuel Martin

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=57156FEB.6030203@mind.be \
    --to=arnout@mind.be \
    --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