openbsd-ports/devel/frama-c/patches/patch-configure_in
2019-09-07 17:11:53 +00:00

44 lines
1.3 KiB
Plaintext

$OpenBSD: patch-configure_in,v 1.2 2019/09/07 17:11:53 chrisz Exp $
Use system threads if available - even on bytecode builds.
Vmthreads are broken and deprecated.
Index: configure.in
--- configure.in.orig
+++ configure.in
@@ -446,23 +446,19 @@ else
EXE=
fi
- if test "$OCAMLBEST" = opt; then
- # OCaml native threads
- AC_MSG_CHECKING([OCaml native threads])
- echo "let f = Thread.create (fun () -> ())" > test_native_threads.ml
- if ($OCAMLOPT -thread -o test_native_threads unix.cmxa threads.cmxa \
- test_native_threads.ml) 2> /dev/null ;
- then
- HAS_NATIVE_THREADS=yes
- AC_MSG_RESULT([ok.]);
- else
- HAS_NATIVE_THREADS=no
- AC_MSG_WARN([unsupported.]);
- fi
- rm -f test_native_threads*;
+ AC_MSG_CHECKING([OCaml native threads])
+ echo "let f = Thread.create (fun () -> ())" > test_native_threads.ml
+ if
+ ($OCAMLC -thread -o test_native_threads unix.cma threads.cma \
+ test_native_threads.ml) 2> /dev/null
+ then
+ HAS_NATIVE_THREADS=yes
+ AC_MSG_RESULT([ok.]);
else
- HAS_NATIVE_THREADS=no; # no native compilation anyway
+ HAS_NATIVE_THREADS=no
+ AC_MSG_WARN([unsupported.]);
fi
+ rm -f test_native_threads*;
fi
# C and POSIX standard headers used by C bindings.