[commit: ghc] master: configure: Don't hard-code strip tool (65f7d87)
git at git.haskell.org
git at git.haskell.org
Tue Sep 26 02:44:27 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/65f7d87a9bd43a6dfc077fbcb8781de07dd335c1/ghc
>---------------------------------------------------------------
commit 65f7d87a9bd43a6dfc077fbcb8781de07dd335c1
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Sep 25 18:41:23 2017 -0400
configure: Don't hard-code strip tool
For reasons that I don't entirely understand we didn't previously detect
`strip` using autoconf. This naturally broke during cross-compilation.
How did this ever work? I have no idea.
Test Plan: Try cross-compiling
Reviewers: austin, hvr, angerman
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4008
>---------------------------------------------------------------
65f7d87a9bd43a6dfc077fbcb8781de07dd335c1
configure.ac | 7 +++++++
distrib/configure.ac.in | 6 ++++++
mk/config.mk.in | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5eae83d..009bea0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -605,6 +605,13 @@ fi
RanlibCmd="$RANLIB"
RANLIB="$RanlibCmd"
+dnl ** which strip to use?
+dnl --------------------------------------------------------------
+AC_CHECK_TARGET_TOOL([STRIP], [strip])
+StripCmd="$STRIP"
+AC_SUBST([StripCmd])
+
+
dnl ** which libtool to use?
dnl --------------------------------------------------------------
# The host normalization on Windows breaks autoconf, it no longer
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 9a94cf2..509e74e 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -178,6 +178,12 @@ dnl ** how to invoke `ar' and `ranlib'
FP_PROG_AR_SUPPORTS_ATFILE
FP_PROG_AR_NEEDS_RANLIB
+dnl ** which strip to use?
+dnl --------------------------------------------------------------
+AC_CHECK_TARGET_TOOL([STRIP], [strip])
+StripCmd="$STRIP"
+AC_SUBST([StripCmd])
+
dnl ** Have libdw?
dnl --------------------------------------------------------------
dnl Check for a usable version of libdw/elfutils
diff --git a/mk/config.mk.in b/mk/config.mk.in
index ac1512e..92661a3 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -775,7 +775,7 @@ else ifeq "$(TARGETPLATFORM)" "arm-unknown-linux"
# The hack of using `:` to disable stripping is implemented by ghc-cabal.
STRIP_CMD = :
else
-STRIP_CMD = strip
+STRIP_CMD = @StripCmd@
endif
PATCH_CMD = @PatchCmd@
TAR_CMD = @TarCmd@
More information about the ghc-commits
mailing list