[commit: ghc] master: Fix the way we call strip on DLLs (9949db0)
Ian Lynagh
igloo at earth.li
Mon May 7 13:51:44 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9949db0a135da28d3d5497b0d31a6a50dad4a8c6
>---------------------------------------------------------------
commit 9949db0a135da28d3d5497b0d31a6a50dad4a8c6
Author: Ian Lynagh <igloo at earth.li>
Date: Sun May 6 19:39:41 2012 +0100
Fix the way we call strip on DLLs
On Win64, "install -s" calls a strip that doesn't understand 64bit
binaries. For some reason, this means the DLLs end up non-executable,
which means executables that use them just segfault.
>---------------------------------------------------------------
ghc.mk | 3 ++-
mk/config.mk.in | 4 ++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ghc.mk b/ghc.mk
index cbe3473..a8c8cee 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -799,7 +799,8 @@ install_libs: $(INSTALL_LIBS)
$(call INSTALL_DATA,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)"); \
$(RANLIB) $(DESTDIR)$(ghclibdir)/`basename $$i` ;; \
*.dll) \
- $(call INSTALL_PROGRAM,-s $(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)") ;; \
+ $(call INSTALL_PROGRAM,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)") ; \
+ $(STRIP_CMD) "$(DESTDIR)$(ghclibdir)"/$$i ;; \
*.so) \
$(call INSTALL_SHLIB,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)") ;; \
*.dylib) \
diff --git a/mk/config.mk.in b/mk/config.mk.in
index fe0feb0..b998946 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -768,7 +768,11 @@ endif
#
REAL_SHELL = $(SHELL)
+ifeq "$(TARGETPLATFORM)" "x86_64-unknown-mingw32"
+STRIP_CMD = $(TOP)/inplace/mingw/bin/x86_64-w64-mingw32-strip.exe
+else
STRIP_CMD = strip
+endif
PATCH_CMD = @PatchCmd@
TAR_CMD = @TarCmd@
BZIP2_CMD = bzip2
More information about the Cvs-ghc
mailing list