summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-02-05 04:28:25 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-02-05 04:28:25 +0000
commit0f5046b8b48b7f6b9c343aab99d4b1314586802c (patch)
tree11f92be12ac009d7f56238fdf7b687123c204c40
parentbd03b445d0be0f45bb597c40cbfed49818c6a0df (diff)
configure: add test for cygwin64
Makefile: fix compilation of checkstack tests/callback: fix compilation git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--Makefile5
-rwxr-xr-xconfigure7
-rw-r--r--testsuite/tests/callback/Makefile12
3 files changed, 14 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 12d8a75e3..1c7a07ea5 100644
--- a/Makefile
+++ b/Makefile
@@ -821,9 +821,8 @@ alldepend::
# Check that the stack limit is reasonable.
checkstack:
- @if $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) \
- -o tools/checkstack tools/checkstack.c; \
- then tools/checkstack; \
+ @if $(MKEXE) -o tools/checkstack$(EXE) tools/checkstack.c; \
+ then tools/checkstack$(EXE); \
else :; \
fi
@rm -f tools/checkstack
diff --git a/configure b/configure
index d1e46bc6d..1be4682a3 100755
--- a/configure
+++ b/configure
@@ -375,10 +375,15 @@ case "$bytecc,$target" in
*,powerpc-*-aix*)
bytecccompopts="-D_XOPEN_SOURCE=500";;
*gcc*,*-*-cygwin*)
+ case $target in
+ i686-*) flavor=cygwin;;
+ x86_64-*) flavor=cygwin64;;
+ *) err "unknown cygwin variant";;
+ esac
bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
dllccompopts="-U_WIN32 -DCAML_DLL"
if test $with_sharedlibs = yes; then
- flexlink="flexlink -chain cygwin -merge-manifest -stack 16777216"
+ flexlink="flexlink -chain $flavor -merge-manifest -stack 16777216"
flexdir=`$flexlink -where | dos2unix`
if test -z "$flexdir"; then
wrn "flexlink not found: native shared libraries won't be available."
diff --git a/testsuite/tests/callback/Makefile b/testsuite/tests/callback/Makefile
index 58b5ed8aa..d89c53263 100644
--- a/testsuite/tests/callback/Makefile
+++ b/testsuite/tests/callback/Makefile
@@ -31,9 +31,9 @@ common:
run-byte: common
@printf " ... testing 'bytecode':"
@$(OCAMLC) $(COMPFLAGS) -c tcallback.ml
- @$(OCAMLC) $(COMPFLAGS) -o ./program -custom unix.cma \
+ @$(OCAMLC) $(COMPFLAGS) -o ./program$(EXE) -custom unix.cma \
callbackprim.$(O) tcallback.cmo
- @./program >bytecode.result
+ @./program$(EXE) >bytecode.result
@$(DIFF) reference bytecode.result \
&& echo " => passed" || echo " => failed"
@@ -42,9 +42,9 @@ run-opt: common
@if $(BYTECODE_ONLY); then : ; else \
printf " ... testing 'native':"; \
$(OCAMLOPT) $(COMPFLAGS) -c tcallback.ml; \
- $(OCAMLOPT) $(COMPFLAGS) -o ./program unix.cmxa callbackprim.$(O) \
- tcallback.cmx; \
- ./program >native.result; \
+ $(OCAMLOPT) $(COMPFLAGS) -o ./program$(EXE) unix.cmxa \
+ callbackprim.$(O) tcallback.cmx; \
+ ./program$(EXE) >native.result; \
$(DIFF) reference native.result \
&& echo " => passed" || echo " => failed"; \
fi
@@ -54,6 +54,6 @@ promote: defaultpromote
.PHONY: clean
clean: defaultclean
- @rm -f *.result ./program
+ @rm -f *.result ./program$(EXE)
include $(BASEDIR)/makefiles/Makefile.common