Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
@ 2015-11-22 15:31 Jonathan Ben-Avraham
  2015-11-22 15:49 ` Yann E. MORIN
  2015-12-19 13:02 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Ben-Avraham @ 2015-11-22 15:31 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do
not use the "install-sh" script for installing executables but instead call the
detected BSD compatible 'install' binary directly with hardcoded '-s' parameter.
This results in a build failure when the host 'strip' is invoked on binaries
compiled for a different arch. The 'install-without-strip' script removes the
'-s' parameter and execs the 'install' binary in PATH to solve this problem.
These autotools packages can then be build under Buildroot by specifying
<package>_CONF_ENV = INSTALL=support/scripts/install-without-strip

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 support/scripts/install-without-strip |   11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 support/scripts/install-without-strip

diff --git a/support/scripts/install-without-strip b/support/scripts/install-without-strip
new file mode 100755
index 0000000..f167c28
--- /dev/null
+++ b/support/scripts/install-without-strip
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+# Needed for autotools packages with hardcoded "install -s"
+
+INSTALL=$(which install)
+if [ -x "${INSTALL}" ]
+then 
+	exec ${INSTALL} $(echo ${@} | sed 's/-s//g')
+fi
+
+echo "error: $0 needs an executable \"install\" in PATH"
+exit 1
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-20  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-22 15:31 [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s' Jonathan Ben-Avraham
2015-11-22 15:49 ` Yann E. MORIN
2015-11-22 16:00   ` Jonathan Ben Avraham
2015-11-22 16:15     ` Yann E. MORIN
2015-12-19 13:02 ` Thomas Petazzoni
2015-12-19 22:42   ` Jonathan Ben Avraham
2015-12-20  8:38     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox