X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=088e735c5dba53bb4b725a3e3a56e63c41378949;hb=0a541e746c71fe21eb72bae61a9ead541ed7e98d;hp=a67801371a4eabd38e5d99398e17134e5166447c;hpb=5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed;p=gcc.git diff --git a/configure.ac b/configure.ac index a67801371a4..088e735c5db 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ m4_include(config/acx.m4) m4_include(config/override.m4) m4_include(config/proginstall.m4) m4_include(config/elf.m4) +m4_include(config/ax_cxx_compile_stdcxx.m4) m4_include([libtool.m4]) m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) @@ -131,7 +132,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment #f -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libelf libiconv libctf" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -139,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr # binutils, gas and ld appear in that order because it makes sense to run # "make check" in that particular order. # If --enable-gold is used, "gold" may replace "ld". -host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools" +host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools" # these libraries are built for the target environment, and are built after # the host libraries and the host tools (which may be a cross compiler) @@ -723,9 +724,6 @@ case ,${enable_languages}, in ;; *) case "${target}" in - *-*-darwin*) - unsupported_languages="$unsupported_languages d" - ;; bpf-*-*) unsupported_languages="$unsupported_languages d" ;; @@ -1037,6 +1035,7 @@ case "${target}" in ;; *-*-freebsd*) if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \ + && ! test -d ${srcdir}/gmp \ && test -f /usr/local/include/gmp.h; then with_gmp=/usr/local fi @@ -1463,9 +1462,16 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in esac # When bootstrapping with GCC, build stage 1 in C++11 mode to ensure that a -# C++11 compiler can still start the bootstrap. +# C++11 compiler can still start the bootstrap. Otherwise, if building GCC, +# require C++11 (or higher). if test "$enable_bootstrap:$GXX" = "yes:yes"; then CXX="$CXX -std=c++11" +elif test "$have_compiler" = yes; then + AX_CXX_COMPILE_STDCXX(11) + + if test "${build}" != "${host}"; then + AX_CXX_COMPILE_STDCXX(11, [], [], [_FOR_BUILD]) + fi fi # Used for setting $lt_cv_objdir @@ -2079,9 +2085,14 @@ if test -d ${srcdir}/gcc; then esac # Disable jit if -enable-host-shared not specified - case ${add_this_lang}:${language}:${host_shared} in - yes:jit:no) - # PR jit/64780: explicitly specify --enable-host-shared + # but not if building for Mingw. All code in Windows + # is position independent code (PIC). + case $target in + *mingw*) ;; + *) + case ${add_this_lang}:${language}:${host_shared} in + yes:jit:no) + # PR jit/64780: explicitly specify --enable-host-shared AC_MSG_ERROR([ Enabling language "jit" requires --enable-host-shared. @@ -2092,16 +2103,18 @@ If you want to build both the jit and the regular compiler, it is often best to do this via two separate configure/builds, in separate directories, to avoid imposing the performance cost of --enable-host-shared on the regular compiler.]) - ;; - all:jit:no) - AC_MSG_WARN([--enable-host-shared required to build $language]) - add_this_lang=unsupported - ;; - *:jit:no) - # Silently disable. - add_this_lang=unsupported - ;; - esac + ;; + all:jit:no) + AC_MSG_WARN([--enable-host-shared required to build $language]) + add_this_lang=unsupported + ;; + *:jit:no) + # Silently disable. + add_this_lang=unsupported + ;; + esac + ;; + esac # Disable a language that is unsupported by the target. case "${add_this_lang}: $unsupported_languages " in @@ -2798,7 +2811,7 @@ fi # or bootstrap-ubsan, bootstrap it. if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then case "$BUILD_CONFIG" in - *bootstrap-asan* | *bootstrap-ubsan* ) + *bootstrap-hwasan* | *bootstrap-asan* | *bootstrap-ubsan* ) bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer, bootstrap_fixincludes=yes ;;