All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v8 07/14] toolchain: add post-install hooks making the toolchain relocatable
Date: Sun, 17 Apr 2016 23:38:24 +0200	[thread overview]
Message-ID: <1460929111-15615-8-git-send-email-s.martin49@gmail.com> (raw)
In-Reply-To: <1460929111-15615-1-git-send-email-s.martin49@gmail.com>

This change adds the required dependency and post-target-install hooks
to render the toolchain relocatable.

Notes:
- Although the toolchain package is a virtual package, it does support
  hooks.
- This has to be post-target-install hooks because the toolchain package
  is handled as a "target" package.

Ultimately, this patch allows to generate relocatable toolchains, just
by doing:

  $ make menuconfig
  $ make toolchain

Then, this toolchain can be used/shared/deployed anywhere*.

*: on any Linux system with an ABI-compatible set of system libraries
   (usually including: glibc, libgcc, zlib, flex and libsigsegv).

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>

---
changes v7->v8:
- none

changes v6->v7:
- new patch
---
 toolchain/toolchain/toolchain.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk
index c22713b..618aa64 100644
--- a/toolchain/toolchain/toolchain.mk
+++ b/toolchain/toolchain/toolchain.mk
@@ -12,6 +12,11 @@ endif
 
 TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO
 
+# dependency and hooks needed to make the toolchain relocatable
+TOOLCHAIN_DEPENDENCIES += host-patchelf
+TOOLCHAIN_POST_INSTALL_TARGET_HOOKS += HOST_SANITIZE_RPATH_HOOK \
+	STAGING_SANITIZE_RPATH_HOOK
+
 $(eval $(virtual-package))
 
 toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
-- 
2.8.0

  parent reply	other threads:[~2016-04-17 21: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
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 ` Samuel Martin [this message]
2016-04-18 19:33   ` [Buildroot] [PATCH v8 07/14] toolchain: add post-install hooks making the toolchain relocatable 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=1460929111-15615-8-git-send-email-s.martin49@gmail.com \
    --to=s.martin49@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.