[Buildroot] [PATCH v7 3/9] core: sanitize RPATH in staging tree at the end of target finalization
Arnout Vandecappelle
arnout at mind.be
Wed Jul 19 23:31:21 UTC 2017
On 05-07-17 18:53, Wolfgang Grandegger wrote:
> We need that pachelf utility for RPATH sanitization.
>
> Signed-off-by: Wolfgang Grandegger <wg at grandegger.com>
> ---
> Makefile | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index a22e87f..cdc3a64 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -456,6 +456,9 @@ else
> export BR_NO_CCACHE
> endif
>
> +# We need patchelf for RPATH sanitization
> +PACKAGES += host-patchelf
This really should be a separate patch. Also, I would do it differently.
Instead of adding it explicitly to PACKAGES, add a Config.in.host for patchelf,
with a hidden symbol BR2_PACKAGE_HOST_PATCHELF, and default it to y. We want to
create Config.in.host files with hidden symbols for all host packages, so doing
it that way is already a step in the right direction.
> +
> # Scripts in support/ or post-build scripts may need to reference
> # these locations, so export them so it is easier to use
> export BR2_CONFIG
> @@ -720,6 +723,9 @@ endif
> $(call MESSAGE,"Executing post-build script $(s)"); \
> $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
>
> + @$(call MESSAGE,"Sanitizing RPATH in staging tree")
> + $(TOPDIR)/support/scripts/fix-rpath staging
I don't think we should do this in target-finalize. But I'll discuss this in
patch 5.
Regards,
Arnout
> +
> .PHONY: target-post-image
> target-post-image: $(TARGETS_ROOTFS) target-finalize
> @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
>
--
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