Wolfram Sang wrote:
Provide a dummy, no-op version of strip as a lot of makefiles (and install -s)
execute just 'strip' and this leaks in the host version. This approach should
be OK as we do stripping at a later stage anyway and want to keep the
debug-info until then.
looks good, although we use (C) in ptxdist all oder the place. Fix it,
add my Acked-by an push to upstream.
Signed-off-by: Wolfram Sang w.s...@pengutronix.de
---
rules/cross-dummy-strip.in |8
rules/cross-dummy-strip.make | 33 +
rules/post/virtual.make |4
scripts/dummy-strip.sh | 11 +++
4 files changed, 56 insertions(+), 0 deletions(-)
create mode 100644 rules/cross-dummy-strip.in
create mode 100644 rules/cross-dummy-strip.make
create mode 100644 scripts/dummy-strip.sh
diff --git a/rules/cross-dummy-strip.in b/rules/cross-dummy-strip.in
new file mode 100644
index 000..7241dbb
--- /dev/null
+++ b/rules/cross-dummy-strip.in
@@ -0,0 +1,8 @@
+## SECTION=crosstools
+
+config CROSS_DUMMY_STRIP
+ bool
+ default y
+ help
+ Dummy, no-op strip to prevent leak-in of another strip-version.
+ Always selected.
diff --git a/rules/cross-dummy-strip.make b/rules/cross-dummy-strip.make
new file mode 100644
index 000..23864c6
--- /dev/null
+++ b/rules/cross-dummy-strip.make
@@ -0,0 +1,33 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2009 by Wolfram Sang w.s...@pengutronix.de
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+CROSS_PACKAGES-$(PTXCONF_CROSS_DUMMY_STRIP) += cross-dummy-strip
+
+$(STATEDIR)/cross-dummy-strip.extract:
+ @$(call targetinfo)
+ @$(call touch)
+
+$(STATEDIR)/cross-dummy-strip.prepare:
+ @$(call targetinfo)
+ @$(call touch)
+
+$(STATEDIR)/cross-dummy-strip.compile:
+ @$(call targetinfo)
+ @$(call touch)
+
+$(STATEDIR)/cross-dummy-strip.install:
+ @$(call targetinfo)
+ install -D -m 755 $(PTXDIST_TOPDIR)/scripts/dummy-strip.sh
$(PTXCONF_SYSROOT_CROSS)/bin/strip
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/rules/post/virtual.make b/rules/post/virtual.make
index aad92df..b52e513 100644
--- a/rules/post/virtual.make
+++ b/rules/post/virtual.make
@@ -8,6 +8,10 @@
# see the README file.
#
+ifdef PTXCONF_CROSS_DUMMY_STRIP
+$(STATEDIR)/virtual-cross-tools.install:
$(STATEDIR)/cross-dummy-strip.install
+endif
+
ifdef PTXCONF_HOST_FAKEROOT
$(STATEDIR)/virtual-cross-tools.install: $(STATEDIR)/host-fakeroot.install
endif
diff --git a/scripts/dummy-strip.sh b/scripts/dummy-strip.sh
new file mode 100644
index 000..345f443
--- /dev/null
+++ b/scripts/dummy-strip.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+# dummy-strip.sh for PTXdist - Copyright (c) 2009 by Wolfram Sang
C?
+#
+# This scripts gets installed into the cross-environment as a 'dummy'-strip
+# program. As programs like 'install -s' just call 'strip', this prevents
+# leaking in of the host-version of strip. Also, it does intentionally
+# nothing as we want to strip at a later stage.
+#
+echo ptxdist: Discarding 'strip $*'
+exit 0
+
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
--
ptxdist mailing list
ptxdist@pengutronix.de