diff options
author | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-01 17:32:13 +0000 |
---|---|---|
committer | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-01 17:32:13 +0000 |
commit | 1c7d1abad0d62bd111fb9c0ea13a59ed9ca6fc0a (patch) | |
tree | 401f578c95f3933d1ab829b6155c3ac0bb9cc30f /configure.ac | |
parent | ddfcdfb306bb20763f9de3fdc63adbd49e2ace1c (diff) | |
parent | 2208a4cbe6f3c15add9dae87d15aae461ea6c6cc (diff) | |
download | ocaml-1c7d1abad0d62bd111fb9c0ea13a59ed9ca6fc0a.tar.gz |
Merge commit '2208a4cbe6f3c15add9dae87d15aae461ea6c6cc' into parallel_minor_gc_4_11b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index fcf8cdd2ba..957dcd8635 100644 --- a/configure.ac +++ b/configure.ac @@ -569,35 +569,48 @@ AS_CASE([$enable_warn_error,AC_PACKAGE_VERSION], # in the macro itself, too AS_CASE([$host], [*-*-mingw32], - [internal_cflags="-Wno-unused $gcc_warnings" - # TODO: see whether the code can be fixed to avoid -Wno-unused - common_cflags="-O -mms-bitfields" - internal_cppflags='-DUNICODE -D_UNICODE' - internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=" - internal_cppflags="${internal_cppflags}\$(WINDOWS_UNICODE)"], + [AS_CASE([$ocaml_cv_cc_vendor], + [gcc-[[01234]]-*], + [AC_MSG_ERROR(m4_normalize([This version of Mingw GCC is too old. + Please use GCC version 5 or above.]))], + [gcc-*], + [internal_cflags="-Wno-unused $gcc_warnings" + # TODO: see whether the code can be fixed to avoid -Wno-unused + common_cflags="-O2 -fno-strict-aliasing -fwrapv \ +-fexcess-precision=standard -mms-bitfields" + internal_cppflags='-DUNICODE -D_UNICODE' + internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=" + internal_cppflags="${internal_cppflags}\$(WINDOWS_UNICODE)"], + [AC_MSG_ERROR([Unsupported C compiler for a Mingw build])])], [AS_CASE([$ocaml_cv_cc_vendor], [clang-*], [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; internal_cflags="$gcc_warnings -fno-common"], - [gcc-[012]-*], + [gcc-[[012]]-*], # Some versions known to miscompile OCaml, e,g, 2.7.2.1, some 2.96. # Plus: C99 support unknown. - [AC_MSG_ERROR([This version of GCC is too old. - Please use GCC version 4.2 or above.])], - [gcc-3-*|gcc-4-[01]], + [AC_MSG_ERROR(m4_normalize([This version of GCC is too old. + Please use GCC version 4.2 or above.]))], + [gcc-3-*|gcc-4-[[01]]], # No -fwrapv option before GCC 3.4. # Known problems with -fwrapv fixed in 4.2 only. - [AC_MSG_WARN([This version of GCC is rather old. - Reducing optimization level."]); + [AC_MSG_WARN(m4_normalize([This version of GCC is rather old. + Reducing optimization level."])); AC_MSG_WARN([Consider using GCC version 4.2 or above.]); common_cflags="-std=gnu99 -O"; internal_cflags="$gcc_warnings"], - [gcc-4-*], + [gcc-4-[[234]]], + # No -fexcess-precision option before GCC 4.5 [common_cflags="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv \ -fno-builtin-memcmp"; internal_cflags="$gcc_warnings"], + [gcc-4-*], + [common_cflags="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv \ +-fno-builtin-memcmp -fexcess-precision=standard"; + internal_cflags="$gcc_warnings"], [gcc-*], - [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; + [common_cflags="-O2 -fno-strict-aliasing -fwrapv \ +-fexcess-precision=standard"; internal_cflags="$gcc_warnings -fno-common"], [msvc-*], [common_cflags="-nologo -O2 -Gy- -MD $gcc_warnings" @@ -1033,20 +1046,18 @@ AS_CASE(["$arch,$system"], [s390x,elf], [default_as="${toolpref}as -m 64 -march=$model" default_aspp="${toolpref}gcc -c -Wa,-march=$model"], - [arm,freebsd|arm64,freebsd], - [default_as="${toolpref}cc -c" - default_aspp="${toolpref}cc -c"], - [*,dragonfly], - [default_as="${toolpref}as" - default_aspp="${toolpref}cc -c"], [*,freebsd], + [default_as="${toolpref}cc -c -Wno-trigraphs" + default_aspp="${toolpref}cc -c -Wno-trigraphs"], + [*,dragonfly], [default_as="${toolpref}as" default_aspp="${toolpref}cc -c"], [amd64,*|arm,*|arm64,*|i386,*], - [default_as="${toolpref}as" - AS_CASE([$ocaml_cv_cc_vendor], - [clang-*], [default_aspp="${toolpref}clang -c -Wno-trigraphs"], - [default_aspp="${toolpref}gcc -c"])]) + [AS_CASE([$ocaml_cv_cc_vendor], + [clang-*], [default_as="${toolpref}clang -c -Wno-trigraphs" + default_aspp="${toolpref}clang -c -Wno-trigraphs"], + [default_as="${toolpref}as" + default_aspp="${toolpref}gcc -c"])]) AS_IF([test "$with_pic"], [fpic=true |