diff options
author | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-03 15:37:51 +0000 |
---|---|---|
committer | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-03 15:37:51 +0000 |
commit | 2c134e3dcf7cb76fd6a90434fc885be2315b9ae9 (patch) | |
tree | ee1ac1c92694e864e53caca9382747fe7451433e /configure.ac | |
parent | 86fbc7e8d59311cc18818616c18d6fca39e0ecda (diff) | |
parent | c24198550aab88f105db94a101cf189aa701bbe1 (diff) | |
download | ocaml-2c134e3dcf7cb76fd6a90434fc885be2315b9ae9.tar.gz |
Merge commit 'c24198550aab88f105db94a101cf189aa701bbe1' into parallel_minor_gc_4_12
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index e955fd4aba..ae814c65bf 100644 --- a/configure.ac +++ b/configure.ac @@ -568,18 +568,20 @@ AS_IF( AS_CASE([$ocaml_cv_cc_vendor], [xlc-*], - [outputobj='-o $(EMPTY)'; gcc_warnings="-qflag=i:i"], # all warnings enabled + [outputobj='-o $(EMPTY)' + warn_error_flag='' + cc_warnings='-qflag=i:i'], # all warnings enabled [msvc-*], [outputobj='-Fo' warn_error_flag='-WX' - gcc_warnings=''], + cc_warnings=''], [outputobj='-o $(EMPTY)' warn_error_flag='-Werror' - gcc_warnings='-Wall -Wdeclaration-after-statement']) + cc_warnings='-Wall -Wdeclaration-after-statement']) AS_CASE([$enable_warn_error,AC_PACKAGE_VERSION], [yes,*|,*+dev*|,*+multicore*], - [gcc_warnings="$gcc_warnings $warn_error_flag"]) + [cc_warnings="$cc_warnings $warn_error_flag"]) # We select high optimization levels, provided we can turn off: # - strict type-based aliasing analysis (too risky for the OCaml runtime) @@ -603,7 +605,7 @@ AS_CASE([$host], [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 \ + [internal_cflags="-Wno-unused $cc_warnings \ -fexcess-precision=standard" # TODO: see whether the code can be fixed to avoid -Wno-unused common_cflags="-O2 -fno-strict-aliasing -fwrapv -mms-bitfields" @@ -614,7 +616,7 @@ AS_CASE([$host], [AS_CASE([$ocaml_cv_cc_vendor], [clang-*], [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; - internal_cflags="$gcc_warnings -fno-common"], + internal_cflags="$cc_warnings -fno-common"], [gcc-[[012]]-*], # Some versions known to miscompile OCaml, e,g, 2.7.2.1, some 2.96. # Plus: C99 support unknown. @@ -627,29 +629,29 @@ AS_CASE([$host], Reducing optimization level."])); AC_MSG_WARN([Consider using GCC version 4.2 or above.]); common_cflags="-std=gnu99 -O"; - internal_cflags="$gcc_warnings"], + internal_cflags="$cc_warnings"], [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"], + internal_cflags="$cc_warnings"], [gcc-4-*], [common_cflags="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv \ -fno-builtin-memcmp"; - internal_cflags="$gcc_warnings -fexcess-precision=standard"], + internal_cflags="$cc_warnings -fexcess-precision=standard"], [gcc-*], [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; - internal_cflags="$gcc_warnings -fno-common \ + internal_cflags="$cc_warnings -fno-common \ -fexcess-precision=standard"], [msvc-*], - [common_cflags="-nologo -O2 -Gy- -MD $gcc_warnings" + [common_cflags="-nologo -O2 -Gy- -MD $cc_warnings" common_cppflags="-D_CRT_SECURE_NO_DEPRECATE" internal_cppflags='-DUNICODE -D_UNICODE' internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=" internal_cppflags="${internal_cppflags}\$(WINDOWS_UNICODE)"], [xlc-*], [common_cflags="-O5 -qtune=balanced -qnoipa -qinline $CFLAGS"; - internal_cflags="$gcc_warnings"], + internal_cflags="$cc_warnings"], [common_cflags="-O"])]) internal_cppflags="-DCAML_NAME_SPACE $internal_cppflags" |