[commit: testsuite] master: Fix T7037 on Win64 (dde7816)

Ian Lynagh igloo at earth.li
Tue Feb 5 22:45:52 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/dde7816cde5112c685c11e563d40234a7ee07cda

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

commit dde7816cde5112c685c11e563d40234a7ee07cda
Author: Ian Lynagh <igloo at earth.li>
Date:   Tue Feb 5 21:34:59 2013 +0000

    Fix T7037 on Win64

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

 tests/rts/Makefile     |    7 ++++++-
 tests/rts/T7037_main.c |    5 +----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/rts/Makefile b/tests/rts/Makefile
index 2eb952d..5d663d1 100644
--- a/tests/rts/Makefile
+++ b/tests/rts/Makefile
@@ -48,11 +48,16 @@ T5423:
 T6006_setup :
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c T6006.hs
 
+ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+T7037_CONST = const
+else
+T7037_CONST =
+endif
 .PHONY: T7037
 T7037:
 	$(RM) 7037.o 7037.hi 7037$(exeext)
 	"$(TEST_HC)" $(TEST_HC_OPTS) T7037.hs -v0
-	"$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS)) T7037_main.c -v0 -o T7037_main -no-hs-main
+	"$(TEST_HC)" -optc-DT7037_CONST=$(T7037_CONST) $(filter-out -rtsopts, $(TEST_HC_OPTS)) T7037_main.c -v0 -o T7037_main -no-hs-main
 	./T7037_main
 
 T7040_ghci_setup :
diff --git a/tests/rts/T7037_main.c b/tests/rts/T7037_main.c
index c195834..ce7fa65 100644
--- a/tests/rts/T7037_main.c
+++ b/tests/rts/T7037_main.c
@@ -2,9 +2,6 @@
 #include <unistd.h>
 
 int main(int argc, char *argv[]) {
-#ifdef __MINGW32__
-    const
-#endif
-    char * args[2] = {"T7037", NULL};
+    T7037_CONST char * args[2] = {"T7037", NULL};
     execv("./T7037", args);
 }





More information about the ghc-commits mailing list