# configure.ac for GCC
# Process this file with autoconf to generate a configuration script.
-# Copyright (C) 1997-2019 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#This file is part of GCC.
AC_DEFINE_UNQUOTED(ENABLE_VTABLE_VERIFY, $vtable_verify,
[Define 0/1 if vtable verification feature is enabled.])
+AC_ARG_ENABLE(analyzer,
+[AS_HELP_STRING([--disable-analyzer],
+ [disable -fanalyzer static analyzer])],
+if test x$enable_analyzer = xno; then
+ analyzer=0
+else
+ analyzer=1
+fi,
+analyzer=1)
+AC_DEFINE_UNQUOTED(ENABLE_ANALYZER, $analyzer,
+[Define 0/1 if static analyzer feature is enabled.])
+
AC_ARG_ENABLE(objc-gc,
[AS_HELP_STRING([--enable-objc-gc],
[enable the use of Boehm's garbage collector with
ACX_PKGVERSION([GCC])
ACX_BUGURL([https://gcc.gnu.org/bugs/])
+# Allow overriding the default URL for documentation
+AC_ARG_WITH(documentation-root-url,
+ AS_HELP_STRING([--with-documentation-root-url=URL],
+ [Root for documentation URLs]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([documentation root URL not specified]) ;;
+ no) AC_MSG_ERROR([documentation root URL not specified]) ;;
+ *) DOCUMENTATION_ROOT_URL="$withval"
+ ;;
+ esac],
+ DOCUMENTATION_ROOT_URL="https://gcc.gnu.org/onlinedocs/gcc/"
+)
+AC_SUBST(DOCUMENTATION_ROOT_URL)
+
# Sanity check enable_languages in case someone does not run the toplevel
# configure # script.
AC_ARG_ENABLE(languages,
enable_hsa=1
else
enable_offloading=1
+ case "$tgt" in
+ *-intelmicemul-*)
+ omp_device_property=omp-device-properties-i386
+ omp_device_property_tmake_file="${omp_device_property_tmake_file} \$(srcdir)/config/i386/t-omp-device"
+ ;;
+ gcn*-*)
+ omp_device_property=omp-device-properties-gcn
+ omp_device_property_tmake_file="${omp_device_property_tmake_file} \$(srcdir)/config/gcn/t-omp-device"
+ ;;
+ nvptx*-*)
+ omp_device_property=omp-device-properties-nvptx
+ omp_device_property_tmake_file="${omp_device_property_tmake_file} \$(srcdir)/config/nvptx/t-omp-device"
+ ;;
+ esac
+ omp_device_properties="${omp_device_properties} ${tgt}=${omp_device_property}"
+ omp_device_property_deps="${omp_device_property_deps} ${omp_device_property}"
fi
if test x"$offload_targets" = x; then
offload_targets="$offload_targets,$tgt"
fi
done
+AC_SUBST(omp_device_properties)
+AC_SUBST(omp_device_property_deps)
+
AC_DEFINE_UNQUOTED(OFFLOAD_TARGETS, "$offload_targets",
[Define to offload targets, separated by commas.])
if test x"$enable_offloading" != x; then
ZW_CREATE_DEPDIR
AC_CONFIG_COMMANDS([gccdepdir],[
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR
- for lang in $subdirs c-family common
+ for lang in $subdirs c-family common analyzer
do
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoq \
popen sysconf strsignal getrusage nl_langinfo \
gettimeofday mbstowcs wcswidth mmap setlocale \
- gcc_UNLOCKED_FUNCS madvise)
+ gcc_UNLOCKED_FUNCS madvise mallinfo)
if test x$ac_cv_func_mbstowcs = xyes; then
AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
#endif
])
+gcc_AC_CHECK_DECLS(mallinfo, , ,[
+#include "ansidecl.h"
+#include "system.h"
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+])
+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "ansidecl.h"
#include "system.h"
if test x$host = x$build
then
build_auto=auto-host.h
+ HAVE_AUTO_BUILD='# '
else
# We create a subdir, then run autoconf in the subdir.
# To prevent recursion we set host and build for the new
GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
${realsrcdir}/configure \
--enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
+ ${enable_obsolete+--enable-obsolete="$enable_obsolete"} \
+ ${enable_option_checking+--enable-option-checking="$enable_option_checking"} \
+ --target=$target_alias --host=$build_alias \
+ --build=$build_alias || exit # retaining $tempdir
# We just finished tests for the build machine, so rename
# the file auto-build.h in the gcc directory.
cd ..
rm -rf $tempdir
build_auto=auto-build.h
+ HAVE_AUTO_BUILD=
fi
AC_SUBST(build_subdir)
+AC_SUBST(HAVE_AUTO_BUILD)
tm_file="${tm_file} defaults.h"
tm_p_file="${tm_p_file} tm-preds.h"
tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
fi
done
-tmake_file="${tmake_file_}"
+tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
out_object_file=`basename $out_file .c`.o
common_out_object_file=`basename $common_out_file .c`.o
[AC_DEFINE(HAVE_GAS_DISCRIMINATOR, 1,
[Define if your assembler supports the .loc discriminator sub-directive.])])
+# Catch the newlib flag of the same name so we can gate GCC features on it.
+AC_ARG_ENABLE(newlib-nano-formatted-io,
+[AS_HELP_STRING([--enable-newlib-nano-formatted-io], [Use nano version
+ formatted IO])],
+[case "${enableval}" in
+ yes|no)
+ ;;
+ *)
+ AC_MSG_ERROR([unknown newlib-nano-formatted-io setting $enableval])
+ ;;
+esac], [])
+
# Thread-local storage - the check is heavily parameterized.
conftest_s=
tls_first_major=
[ .machine ppc7400])
if test x$gcc_cv_as_machine_directive != xyes; then
echo "*** This target requires an assembler supporting \".machine\"" >&2
- echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
+ echo you can get it from: https://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
test x$build = x$target && exit 1
fi
;;
[AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1,
[Define if your assembler supports .gnu_attribute.])])
- gcc_GAS_CHECK_FEATURE([tls marker support],
- gcc_cv_as_powerpc_tls_markers, [2,20,0],,
- [ bl __tls_get_addr(x@tlsgd)],,
- [AC_DEFINE(HAVE_AS_TLS_MARKERS, 1,
- [Define if your assembler supports arg info for __tls_get_addr.])])
-
gcc_GAS_CHECK_FEATURE([prologue entry point marker support],
gcc_cv_as_powerpc_entry_markers, [2,26,0],-a64 --fatal-warnings,
[ .reloc .,R_PPC64_ENTRY; nop],,
[.mspabi_attribute 4,1],,
[AC_DEFINE(HAVE_AS_MSPABI_ATTRIBUTE, 1,
[Define if your assembler supports .mspabi_attribute.])])
+ if test x$enable_newlib_nano_formatted_io = xyes; then
+ AC_DEFINE(HAVE_NEWLIB_NANO_FORMATTED_IO, 1, [Define if GCC has been
+configured with --enable-newlib-nano-formatted-io.])
+ fi
+ ;;
+ nios2-*-*)
+ # Versions 2.33 and earlier lacked support for the %gotoff relocation
+ # syntax that is documented in the ABI specification.
+ gcc_GAS_CHECK_FEATURE([support for %gotoff relocations in constant data],
+ gcc_cv_as_nios2_gotoff_relocation,,,
+[ .extern foo
+ .data
+ .long %gotoff(foo)],,
+ [AC_DEFINE(HAVE_AS_NIOS2_GOTOFF_RELOCATION, 1,
+ [Define if your assembler supports %gotoff relocation syntax.])])
;;
riscv*-*-*)
gcc_GAS_CHECK_FEATURE([.attribute support],
AC_ARG_WITH(long-double-128,
[AS_HELP_STRING([--with-long-double-128],
[use 128-bit long double by default])],
- gcc_cv_target_ldbl128="$with_long_double_128",
+ gcc_cv_target_ldbl128="$with_long_double_128", [
+ case "$target" in
+ s390*-*-linux-musl*)
+ gcc_cv_target_ldbl128=yes
+ ;;
+ powerpc*-*-linux-musl*)
+ gcc_cv_target_ldbl128=no
+ ;;
+ *)]
[GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [
[gcc_cv_target_ldbl128=no
grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
$target_header_dir/bits/wordsize.h > /dev/null 2>&1 \
&& gcc_cv_target_ldbl128=yes
- ]])])
+ ]])]
+ [
+ ;;
+ esac
+ ])
;;
esac
if test x$gcc_cv_target_ldbl128 = xyes; then
[Define if your target C Library provides the AT_HWCAP value in the TCB])
fi
+# Check if the target LIBC handles PT_GNU_STACK.
+gcc_cv_libc_gnustack=unknown
+case "$target" in
+ mips*-*-linux*)
+ GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], )
+ ;;
+esac
+if test x$gcc_cv_libc_gnustack = xyes; then
+ AC_DEFINE(TARGET_LIBC_GNUSTACK, 1,
+ [Define if your target C Library properly handles PT_GNU_STACK])
+fi
+
AC_MSG_CHECKING(dl_iterate_phdr in target C library)
gcc_cv_target_dl_iterate_phdr=unknown
case "$target" in
all_languages=
all_compilers=
all_outputs='Makefile'
-# List of language makefile fragments.
+# List of language configure and makefile fragments.
+all_lang_configurefrags=
all_lang_makefrags=
# Additional files for gengtype
all_gtfiles="$target_gtfiles"
esac
$ok || continue
+ all_lang_configurefrags="$all_lang_configurefrags \$(srcdir)/$gcc_subdir/config-lang.in"
all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
if test -f $srcdir/$gcc_subdir/lang.opt; then
lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
AC_SUBST(srcdir)
AC_SUBST(all_compilers)
AC_SUBST(all_gtfiles)
+AC_SUBST(all_lang_configurefrags)
AC_SUBST(all_lang_makefrags)
AC_SUBST(all_languages)
AC_SUBST(all_selected_languages)
AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT,
[The default for -fdiagnostics-color option])
+# Specify what should be the default of -fdiagnostics-urls option.
+AC_ARG_WITH([diagnostics-urls],
+[AC_HELP_STRING([--with-diagnostics-urls={never,auto,auto-if-env,always}],
+ [specify the default of -fdiagnostics-urls option
+ auto-if-env stands for -fdiagnostics-urls=auto if
+ GCC_URLS or TERM_URLS environment variable is present and
+ -fdiagnostics-urls=never otherwise])],
+[case x"$withval" in
+ xnever)
+ DIAGNOSTICS_URLS_DEFAULT=DIAGNOSTICS_URL_NO
+ ;;
+ xauto)
+ DIAGNOSTICS_URLS_DEFAULT=DIAGNOSTICS_URL_AUTO
+ ;;
+ xauto-if-env)
+ DIAGNOSTICS_URLS_DEFAULT=-1
+ ;;
+ xalways)
+ DIAGNOSTICS_URLS_DEFAULT=DIAGNOSTICS_URL_YES
+ ;;
+ *)
+ AC_MSG_ERROR([$withval is an invalid option to --with-diagnostics-urls])
+ ;;
+ esac],
+[DIAGNOSTICS_URLS_DEFAULT=DIAGNOSTICS_URL_AUTO])
+AC_DEFINE_UNQUOTED(DIAGNOSTICS_URLS_DEFAULT, $DIAGNOSTICS_URLS_DEFAULT,
+ [The default for -fdiagnostics-urls option])
+
# Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
# of jit/jit-playback.c.
gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`