[commit: ghc] master: RTS: Disable warnings in ffi.h (8b1020e)

git at git.haskell.org git at git.haskell.org
Wed Nov 15 20:05:44 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8b1020ed21ec8af1accdd900f0d48c3c92b6ed83/ghc

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

commit 8b1020ed21ec8af1accdd900f0d48c3c92b6ed83
Author: Peter Trommler <ptrommler at acm.org>
Date:   Wed Nov 15 11:38:50 2017 -0500

    RTS: Disable warnings in ffi.h
    
    The update of GHC's in-tree libffi causes warnings about
    undefined macros and hence validate fails.
    
    Also mark broken tests that have a ticket.
    
    Fixes #14353
    
    Test Plan: ./validate (on AIX and powerpc if possible)
    
    Reviewers: bgamari, hvr, erikd, simonmar
    
    Reviewed By: bgamari
    
    Subscribers: snowleopard, rwbarton, thomie
    
    GHC Trac Issues: #14353, #11259, #14455, #11261
    
    Differential Revision: https://phabricator.haskell.org/D4181


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

8b1020ed21ec8af1accdd900f0d48c3c92b6ed83
 rts/ghc.mk                                     | 9 ++++++++-
 testsuite/tests/driver/linkwhole/all.T         | 6 ++++--
 testsuite/tests/ghci.debugger/scripts/all.T    | 6 ++++--
 testsuite/tests/simplCore/should_compile/all.T | 4 +++-
 4 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/rts/ghc.mk b/rts/ghc.mk
index 3ba7e53..690a883 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -457,15 +457,22 @@ endif
 endif
 
 # add CFLAGS for libffi
-# ffi.h triggers prototype warnings, so disable them here:
 ifeq "$(UseSystemLibFFI)" "YES"
 LIBFFI_CFLAGS = $(addprefix -I,$(FFIIncludeDir))
 else
 LIBFFI_CFLAGS =
 endif
+# ffi.h triggers prototype warnings, so disable them here:
 rts/Interpreter_CC_OPTS += -Wno-strict-prototypes $(LIBFFI_CFLAGS)
 rts/Adjustor_CC_OPTS    += -Wno-strict-prototypes $(LIBFFI_CFLAGS)
 rts/sm/Storage_CC_OPTS  += -Wno-strict-prototypes $(LIBFFI_CFLAGS)
+# ffi.h triggers undefined macro warnings on PowerPC, disable those:
+# this matches substrings of powerpc64le, including "powerpc" and "powerpc64"
+ifneq "$(findstring $(TargetArch_CPP), powerpc64le)" ""
+rts/Interpreter_CC_OPTS += -Wno-undef
+rts/Adjustor_CC_OPTS    += -Wno-undef
+rts/sm/Storage_CC_OPTS  += -Wno-undef
+endif
 
 # inlining warnings happen in Compact
 rts/sm/Compact_CC_OPTS += -Wno-inline
diff --git a/testsuite/tests/driver/linkwhole/all.T b/testsuite/tests/driver/linkwhole/all.T
index 294a879..1562aa8 100644
--- a/testsuite/tests/driver/linkwhole/all.T
+++ b/testsuite/tests/driver/linkwhole/all.T
@@ -1,3 +1,5 @@
-test('linkwhole', [extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']),
-                   when(opsys('mingw32'), skip)],
+test('linkwhole',
+     [extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']),
+      when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)),
+      when(opsys('mingw32'), skip)],
      run_command, ['$MAKE -s --no-print-directory linkwhole'])
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index de3e7e3..a24a254 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -21,7 +21,8 @@ test('print018', extra_files(['../Test.hs']), ghci_script, ['print018.script'])
 test('print019', extra_files(['../Test.hs']), ghci_script, ['print019.script'])
 test('print020', extra_files(['../HappyTest.hs']), ghci_script, ['print020.script'])
 test('print021', normal, ghci_script, ['print021.script'])
-test('print022', normal, ghci_script, ['print022.script'])
+test('print022', when(arch('powerpc64'), expect_broken(14455)), ghci_script,
+     ['print022.script'])
 test('print023', extra_files(['../Test.hs']), ghci_script, ['print023.script'])
 test('print024', extra_files(['../Test.hs']), ghci_script, ['print024.script'])
 test('print025', normal, ghci_script, ['print025.script'])
@@ -95,4 +96,5 @@ test('getargs', extra_files(['../getargs.hs']), ghci_script, ['getargs.script'])
 test('T7386', normal, ghci_script, ['T7386.script'])
 test('T8557', normal, ghci_script, ['T8557.script'])
 test('T12458', normal, ghci_script, ['T12458.script'])
-test('T13825-debugger', normal, ghci_script, ['T13825-debugger.script'])
+test('T13825-debugger', when(arch('powerpc64'), expect_broken(14455)),
+      ghci_script, ['T13825-debugger.script'])
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 0b85692..2761a06 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -267,7 +267,9 @@ test('T12600',
      normal,
      run_command,
      ['$MAKE -s --no-print-directory T12600'])
-test('T13658', normal, compile, ['-dcore-lint'])
+test('T13658',
+     [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))],
+     compile, ['-dcore-lint'])
 test('T13708', normal, compile, [''])
 
 # thunk should inline here, so check whether or not it appears in the Core



More information about the ghc-commits mailing list