RTS: Disable warnings in ffi.h
authorPeter Trommler <ptrommler@acm.org>
Wed, 15 Nov 2017 16:38:50 +0000 (11:38 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 15 Nov 2017 17:01:19 +0000 (12:01 -0500)
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

rts/ghc.mk
testsuite/tests/driver/linkwhole/all.T
testsuite/tests/ghci.debugger/scripts/all.T
testsuite/tests/simplCore/should_compile/all.T

index 3ba7e53..690a883 100644 (file)
@@ -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
index 294a879..1562aa8 100644 (file)
@@ -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'])
index de3e7e3..a24a254 100644 (file)
@@ -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'])
index 0b85692..2761a06 100644 (file)
@@ -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