[commit: ghc] master: config.mk.in: Disable stripping by default on ARM (353e97a)

git at git.haskell.org git at git.haskell.org
Wed Dec 23 22:51:50 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/353e97a37da98ccd174429fad348efbf01ace96c/ghc

>---------------------------------------------------------------

commit 353e97a37da98ccd174429fad348efbf01ace96c
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Wed Dec 23 23:51:02 2015 +0100

    config.mk.in: Disable stripping by default on ARM
    
    The Cortex A8 hardware apparently has a bug which ld.gold will try to
    correct; however in order to do so it must have unstripped executables
    lest we see warnings of the form (see #10376, #10464),
    
        /usr/bin/ld.gold: warning: cannot scan executable section 1 of ...
        for Cortex-A8 erratum because it has no mapping symbols.
    
    Consequently we disabling stripping by default on this architecture.
    
    A bit more discussion about this issue can be found in this [Android
    issue](http://code.google.com/p/android/issues/detail?id=40794).
    
    Test Plan: Try validating on ARM
    
    Reviewers: erikd, austin, thomie
    
    Reviewed By: austin, thomie
    
    Differential Revision: https://phabricator.haskell.org/D1599
    
    GHC Trac Issues: #10376, #10464


>---------------------------------------------------------------

353e97a37da98ccd174429fad348efbf01ace96c
 mk/config.mk.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index d7cd05b..fd0bb51 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -755,6 +755,17 @@ endif
 
 ifeq "$(TARGETPLATFORM)" "x86_64-unknown-mingw32"
 STRIP_CMD      = $(TOP)/inplace/mingw/bin/strip.exe
+else ifeq "$(TARGETPLATFORM)" "arm-unknown-linux"
+# The Cortex A8 hardware apparently has a bug which ld.gold will check for;
+# however in order to do so it must have unstripped executables lest we
+# see warnings of the form (see #10376, #10464),
+#
+#     /usr/bin/ld.gold: warning: cannot scan executable section 1 of ... for
+#     Cortex-A8 erratum because it has no mapping symbols.
+#
+# Consequently we disabling stripping by default on this architecture.
+# The hack of using `:` to disable stripping is implemented by ghc-cabal.
+STRIP_CMD      = :
 else
 STRIP_CMD      = strip
 endif



More information about the ghc-commits mailing list