summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2020-11-20 18:45:44 +0000
committerDavid Allsopp <david.allsopp@metastack.com>2020-11-24 13:37:27 +0000
commitf9d6289f6852a6e12b2e9151c54ba0f39fa054d8 (patch)
tree60bbd625793cf2ee764e05d4cf4ef2247e6f6f7b
parentcc4946008f7b9d5769d1cac7c9d05afffc87f896 (diff)
downloadocaml-f9d6289f6852a6e12b2e9151c54ba0f39fa054d8.tar.gz
Allow lib-bigarray-2/bigarrfml.ml to run on 32-bit
-rw-r--r--testsuite/tests/lib-bigarray-2/bigarrfml.ml4
-rw-r--r--testsuite/tests/lib-bigarray-2/call-gfortran.sh7
2 files changed, 9 insertions, 2 deletions
diff --git a/testsuite/tests/lib-bigarray-2/bigarrfml.ml b/testsuite/tests/lib-bigarray-2/bigarrfml.ml
index 40020b237c..63bbf1d3f0 100644
--- a/testsuite/tests/lib-bigarray-2/bigarrfml.ml
+++ b/testsuite/tests/lib-bigarray-2/bigarrfml.ml
@@ -8,7 +8,7 @@ script = "sh ${test_source_directory}/has-gfortran.sh"
** setup-ocamlc.byte-build-env
*** script
-script = "gfortran -c bigarrf.f"
+script = "sh ${test_source_directory}/call-gfortran.sh ${cc} -c bigarrf.f"
**** ocamlc.byte
all_modules = "bigarrf.o bigarrfstub.c bigarrfml.ml"
***** run
@@ -18,7 +18,7 @@ stdout = "${output}"
** setup-ocamlopt.byte-build-env
*** script
-script = "gfortran -c bigarrf.f"
+script = "sh ${test_source_directory}/call-gfortran.sh ${cc} -c bigarrf.f"
**** ocamlopt.byte
all_modules = "bigarrf.o bigarrfstub.c bigarrfml.ml"
***** run
diff --git a/testsuite/tests/lib-bigarray-2/call-gfortran.sh b/testsuite/tests/lib-bigarray-2/call-gfortran.sh
new file mode 100644
index 0000000000..5a250eb46c
--- /dev/null
+++ b/testsuite/tests/lib-bigarray-2/call-gfortran.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# This somewhat hackily passes any extra words in CC to gfortran
+# This means for a 32-bit build (configured with CC="gcc -m32" the -m32
+# gets passed to gfortran)
+shift 1
+gfortran "$@"