openbsd-ports/lang/ghc/patches/patch-testsuite_driver_testlib_py
kili b2e79ee47e Update to ghc-7.4.2, but keep it marked as broken (and not only for amd64).
Most of the -nopie changes are from pascal@ (thanks); I only had to
merge them for ghc-7.4 and tweak configure and mk/config.mk.in.
2012-09-02 19:53:46 +00:00

34 lines
1.6 KiB
Plaintext

$OpenBSD: patch-testsuite_driver_testlib_py,v 1.4 2012/09/02 19:53:46 kili Exp $
--- testsuite/driver/testlib.py.orig Wed Feb 1 19:11:16 2012
+++ testsuite/driver/testlib.py Sat Jun 9 21:39:34 2012
@@ -1472,6 +1472,13 @@ def compare_outputs( kind, normaliser, expected_file,
actual_raw = read_no_crs(actual_file)
actual_str = normaliser(actual_raw)
+ # Strip OpenBSDs linker warnings about strcpy(3) & friends.
+ if config.os == 'openbsd':
+ actual_str = re.sub('.*: In function .*:\n+(.*:[0-9]+:[0-9]+:\n)?:? *warning: .* is .* misused, please use .*\n',
+ '', actual_str)
+ actual_str = re.sub('.*/libgmp\.so\.[0-9]*\.[0-9]*: warning: .* is .* misused, please use .*\n',
+ '', actual_str)
+
if expected_str == actual_str:
return 1
else:
@@ -1494,13 +1501,13 @@ def compare_outputs( kind, normaliser, expected_file,
# (including newlines) so the diff would be hard to read.
# This does mean that the diff might contain changes that
# would be normalised away.
- r = os.system( 'diff -uw ' + expected_file_for_diff + \
+ r = os.system( 'diff -auw ' + expected_file_for_diff + \
' ' + actual_file )
# If for some reason there were no non-whitespace differences,
# then do a full diff
if r == 0:
- r = os.system( 'diff -u ' + expected_file_for_diff + \
+ r = os.system( 'diff -au ' + expected_file_for_diff + \
' ' + actual_file )
if config.accept: