diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-08 02:24:51 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-08 15:45:42 -0500 |
commit | 46f900c065f65013ae58a97f3b991a7e0c5ab669 (patch) | |
tree | bfa940b2425bdeb5444cec377eb84ebd15109ba4 /sim/mips/configure | |
parent | 8fc48b79618af335d6cea1d1d149668340298b81 (diff) | |
download | gdb-46f900c065f65013ae58a97f3b991a7e0c5ab669.zip gdb-46f900c065f65013ae58a97f3b991a7e0c5ab669.tar.gz gdb-46f900c065f65013ae58a97f3b991a7e0c5ab669.tar.bz2 |
sim: require a C11 compiler
With GDB requiring a C++11 compiler now, this hopefully shouldn't
be a big deal. It's been 10 years since C11 came out, so should
be plenty of time to upgrade.
This will allow us to start cleaning up random header logic and
many of our non-standard custom types.
Diffstat (limited to 'sim/mips/configure')
-rwxr-xr-x | sim/mips/configure | 68 |
1 files changed, 54 insertions, 14 deletions
diff --git a/sim/mips/configure b/sim/mips/configure index ec780b6..7180ced 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -691,6 +691,7 @@ CCDEPMODE DEPDIR am__leading_dot PACKAGE +C_DIALECT RANLIB AR HDEFINES @@ -8681,6 +8682,55 @@ else fi +# Require C11 or newer. Autoconf-2.70 provides ac_cv_prog_cc_c11 when using +# AC_PROG_CC, but we're still using Autoconf-2.69, and the newest it understands +# is C99. So handle it ourselves. +: +C_DIALECT= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C11 is supported by default" >&5 +$as_echo_n "checking whether C11 is supported by default... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "C11 support not found" +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -std=c11 support" >&5 +$as_echo_n "checking for -std=c11 support... " >&6; } + ac_save_CC="$CC" + CC="$CC -std=c11" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "C11 support not found" +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CC="$ac_save_CC" + C_DIALECT="-std=c11" + +else + as_fn_error $? "C11 is required" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + # Some of the common include files depend on bfd.h, and bfd.h checks # that config.h is included first by testing that the PACKAGE macro # is defined. @@ -12097,16 +12147,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - haiku*) version_type=linux need_lib_prefix=no @@ -12223,7 +12263,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux need_lib_prefix=no need_version=no @@ -12912,7 +12952,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12915 "configure" +#line 12955 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13018,7 +13058,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13021 "configure" +#line 13061 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14074,7 +14114,7 @@ if test ${sim_gen} = MULTI; then cat << __EOF__ > multi-run.c /* Main entry point for MULTI simulators. - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2021 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |