[commit: ghc] master: Don't error on GCC inlining warning in rts (93f40cb)

git at git.haskell.org git at git.haskell.org
Wed Jun 22 13:19:14 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/93f40cb9b93b0308b211eaf4ad8f2fee6cb1b5aa/ghc

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

commit 93f40cb9b93b0308b211eaf4ad8f2fee6cb1b5aa
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Wed Jun 22 06:22:45 2016 -0700

    Don't error on GCC inlining warning in rts
    
    The warning for reference:
    ```
    rts/RaiseAsync.c: In function ‘throwToMsg’:
    
    rts/SMPClosureOps.h:65:0: error:
         error: inlining failed in call to ‘lockClosure’: call is unlikely
    and code size would grow
    
    rts/RaiseAsync.c:305:0: error:  error: called from here
    
    rts/SMPClosureOps.h:65:0: error:
         error: inlining failed in call to ‘lockClosure’: call is unlikely
    and code size would grow
    ```
    
    This warning triggers on `gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)`
    and it doesn't trigger with new GCCs.
    
    Test Plan: build ghc/rts
    
    Reviewers: bgamari, simonmar, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2353


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

93f40cb9b93b0308b211eaf4ad8f2fee6cb1b5aa
 mk/warnings.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mk/warnings.mk b/mk/warnings.mk
index 61d60ab..5ca097f 100644
--- a/mk/warnings.mk
+++ b/mk/warnings.mk
@@ -21,13 +21,14 @@ ifeq "$(GccLT46)" "NO"
 ifneq "$(HostOS_CPP)" "mingw32"
 SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable
 endif
-# gcc 4.6 gives 3 warning for giveCapabilityToTask not being inlined
-SRC_CC_WARNING_OPTS += -Wno-error=inline
 endif
 
 ifeq "$(GccLT44)" "NO"
 # Suppress the warning about __sync_fetch_and_nand (#9678).
 libraries/ghc-prim/cbits/atomic_CC_OPTS += -Wno-sync-nand
+# gcc 4.6 gives 3 warnings for giveCapabilityToTask not being inlined
+# gcc 4.4 gives 2 warnings for lockClosure not being inlined
+SRC_CC_WARNING_OPTS += -Wno-error=inline
 endif
 
 else



More information about the ghc-commits mailing list