Skip to content

Commit b7a12db

Browse files
committed
GCC < 4.9 is not supported by lack of C11 atomics
1 parent 1ba1118 commit b7a12db

2 files changed

Lines changed: 12 additions & 55 deletions

File tree

configure

Lines changed: 6 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,8 @@ AS_CASE([$enable_warn_error,OCAML__DEVELOPMENT_VERSION],
607607
# - strict no-overflow conditions on signed integer arithmetic
608608
# (the OCaml runtime assumes Java-style behavior of signed integer arith.)
609609
# Concerning optimization level, -O3 is somewhat risky, so take -O2.
610-
# Concerning language version, gnu99 is ISO C99 plus GNU extensions
611-
# that are often used in standard headers. Older GCC versions
612-
# defaults to gnu89, which is not C99. Clang defaults to gnu99 or
613-
# gnu11, which is fine.
610+
# Concerning language version, recent enough versions of GCC and Clang
611+
# default to gnu11 (C11 + GNU extensions) or gnu17, which is fine.
614612

615613
# Note: the vendor macro can not recognize MinGW because it calls the
616614
# C preprocessor directly so no compiler specific macro like __MING32__
@@ -636,32 +634,13 @@ AS_CASE([$host],
636634
[clang-*],
637635
[common_cflags="-O2 -fno-strict-aliasing -fwrapv";
638636
internal_cflags="$cc_warnings -fno-common"],
639-
[gcc-[[012]]-*],
640-
# Some versions known to miscompile OCaml, e,g, 2.7.2.1, some 2.96.
641-
# Plus: C99 support unknown.
637+
[gcc-[[0123]]-*|gcc-4-[[0-8]]],
638+
# No C11 support
642639
[AC_MSG_ERROR(m4_normalize([This version of GCC is too old.
643-
Please use GCC version 4.2 or above.]))],
644-
[gcc-3-*|gcc-4-[[01]]],
645-
# No -fwrapv option before GCC 3.4.
646-
# Known problems with -fwrapv fixed in 4.2 only.
647-
[AC_MSG_WARN(m4_normalize([This version of GCC is rather old.
648-
Reducing optimization level."]));
649-
AC_MSG_WARN([Consider using GCC version 4.2 or above.]);
650-
common_cflags="-std=gnu99 -O";
651-
internal_cflags="$cc_warnings"],
652-
[gcc-4-[[234]]],
653-
# No -fexcess-precision option before GCC 4.5
654-
[common_cflags="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv \
655-
-fno-builtin-memcmp";
656-
internal_cflags="$cc_warnings"],
657-
[gcc-4-*],
658-
[common_cflags="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv \
659-
-fno-builtin-memcmp";
660-
internal_cflags="$cc_warnings -fexcess-precision=standard"],
640+
Please use GCC version 4.9 or above.]), 69)],
661641
[gcc-*],
662642
[common_cflags="-O2 -fno-strict-aliasing -fwrapv";
663-
internal_cflags="$cc_warnings -fno-common \
664-
-fexcess-precision=standard"],
643+
internal_cflags="$cc_warnings -fno-common -fexcess-precision=standard"],
665644
[msvc-*],
666645
[common_cflags="-nologo -O2 -Gy- -MD $cc_warnings"
667646
common_cppflags="-D_CRT_SECURE_NO_DEPRECATE"

0 commit comments

Comments
 (0)