From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/4] package/patchelf: add HOST_FIX_RPATH_HOOK to TARGET_FINALIZE_HOOKS
Date: Mon, 13 Jul 2015 11:32:21 +0300 [thread overview]
Message-ID: <20150713083221.GI2451@tarshish> (raw)
In-Reply-To: <1436775527-2484-3-git-send-email-s.martin49@gmail.com>
Hi Samuel,
On Mon, Jul 13, 2015 at 10:18:45AM +0200, Samuel Martin wrote:
> This patch adds host-patchelf as a target-finalize dependency, and
> introduces the HOST_FIX_RPATH_HOOK hook fixing the ELF files' RPATH of
> the host tree (excluding the sysroot).
>
> After running this hook, the RPATH from any host ELF files is relative to
> the binary location itself.
>
> Note that, we avoid to fix RPATH in the sysroot, and in the external
> toolcahin installation location.
>
> As a first step toward a fully relocatable SDK, this change allows to get
> the toolchain relocatable, but not yet the whole SDK.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
> package/patchelf/patchelf.mk | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
I think that top level Makefile is a more appropriate place for this. The same
goes for patch #3 in this series.
baruch
> diff --git a/package/patchelf/patchelf.mk b/package/patchelf/patchelf.mk
> index 043224d..c831fcd 100644
> --- a/package/patchelf/patchelf.mk
> +++ b/package/patchelf/patchelf.mk
> @@ -10,3 +10,15 @@ PATCHELF_LICENSE = GPLv3+
> PATCHELF_LICENSE_FILES = COPYING
>
> $(eval $(host-autotools-package))
> +
> +target-finalize: host-patchelf
> +
> +define HOST_FIX_RPATH_HOOK
> + $(TOPDIR)/support/scripts/fix_rpaths \
> + set $(HOST_DIR) \
> + --patchelf-program $(HOST_DIR)/usr/bin/patchelf \
> + --libdirs $(HOST_DIR)/usr/lib \
> + --exclude-dirs sysroot opt/ext-toolchain
> +endef
> +
> +TARGET_FINALIZE_HOOKS += HOST_FIX_RPATH_HOOK
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2015-07-13 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 8:18 [Buildroot] [PATCH v2 0/4] Host-package: RPATH fixup Samuel Martin
2015-07-13 8:18 ` [Buildroot] [PATCH v2 1/4] support/scripts: add fix_rpaths Samuel Martin
2015-07-13 8:26 ` Baruch Siach
2015-07-13 8:18 ` [Buildroot] [PATCH v2 2/4] package/patchelf: add HOST_FIX_RPATH_HOOK to TARGET_FINALIZE_HOOKS Samuel Martin
2015-07-13 8:32 ` Baruch Siach [this message]
2015-07-13 8:18 ` [Buildroot] [PATCH v2 3/4] package/patchelf: add TARGET_CLEAR_RPATH_HOOK " Samuel Martin
2015-07-13 8:18 ` [Buildroot] [PATCH v2 4/4] Makefile: staging symlink uses a relative path Samuel Martin
2015-07-16 10:17 ` Jérôme Pouiller
2015-07-19 7:15 ` 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=20150713083221.GI2451@tarshish \
--to=baruch@tkos.co.il \
--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