X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgcc.git;a=blobdiff_plain;f=configure;h=b7897446c7007cee025de21fb77f9755c34db96d;hp=68940c1ffd1449a3a57c8971e46b9d2d666f8e89;hb=e09092000a8ad3e28639a15ee4bca77e4b1edbdf;hpb=de6abd8514fa7a2bed078935fd950f8cb8dee45c diff --git a/configure b/configure index 68940c1ffd14..b7897446c700 100755 --- a/configure +++ b/configure @@ -806,6 +806,7 @@ with_gmp with_gmp_include with_gmp_lib with_stage1_libs +with_static_standard_libraries with_stage1_ldflags with_boot_libs with_boot_ldflags @@ -1579,6 +1580,9 @@ Optional Packages: --with-gmp-include=PATH specify directory for installed GMP include files --with-gmp-lib=PATH specify directory for the installed GMP library --with-stage1-libs=LIBS libraries for stage1 + --with-static-standard-libraries + use -static-libstdc++ and -static-libgcc + (default=auto) --with-stage1-ldflags=FLAGS linker flags for stage1 --with-boot-libs=LIBS libraries for stage2 and later @@ -2789,7 +2793,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 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" # 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) @@ -3209,7 +3213,7 @@ if test x$enable_libgomp = x ; then ;; *-*-darwin* | *-*-aix*) ;; - nvptx*-*-*) + nvptx*-*-* | amdgcn*-*-*) ;; *) noconfigdirs="$noconfigdirs target-libgomp" @@ -3353,9 +3357,16 @@ case "${target}" in # No hosted I/O support. noconfigdirs="$noconfigdirs target-libssp" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-libssp" + ;; powerpc-*-aix* | rs6000-*-aix*) noconfigdirs="$noconfigdirs target-libssp" ;; + pru-*-*) + # No hosted I/O support. + noconfigdirs="$noconfigdirs target-libssp" + ;; rl78-*-*) # libssp uses a misaligned load to trigger a fault, but the RL78 # doesn't fault for those - instead, it gives a build-time error @@ -3376,6 +3387,10 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then # VxWorks uses the Dinkumware C++ library. noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; + amdgcn*-*-*) + # Not ported/fails to build when using newlib. + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; arm*-wince-pe*) # the C++ libraries don't build on top of CE's C libraries noconfigdirs="$noconfigdirs target-libstdc++-v3" @@ -3383,12 +3398,43 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then avr-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; ft32-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; esac fi +# Disable C++ on systems where it is known to not work. +# For testing, you can override this with --enable-languages=c++. +case ,${enable_languages}, in + *,c++,*) + ;; + *) + case "${target}" in + bpf-*-*) + unsupported_languages="$unsupported_languages c++" + ;; + esac + ;; +esac + +# Disable Objc on systems where it is known to not work. +# For testing, you can override this with --enable-languages=objc. +case ,${enable_languages}, in + *,objc,*) + ;; + *) + case "${target}" in + bpf-*-*) + unsupported_languages="$unsupported_languages objc" + ;; + esac + ;; +esac + # Disable D on systems where it is known to not work. # For testing, you can override this with --enable-languages=d. case ,${enable_languages}, in @@ -3397,6 +3443,9 @@ case ,${enable_languages}, in *) case "${target}" in *-*-darwin*) + unsupported_languages="$unsupported_languages d" + ;; + bpf-*-*) unsupported_languages="$unsupported_languages d" ;; esac @@ -3429,6 +3478,9 @@ case "${target}" in # See . unsupported_languages="$unsupported_languages fortran" ;; + bpf-*-*) + unsupported_languages="$unsupported_languages fortran" + ;; esac # Disable libffi for some systems. @@ -3475,6 +3527,9 @@ case "${target}" in arm*-*-symbianelf*) noconfigdirs="$noconfigdirs target-libffi" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-libffi" + ;; cris-*-* | crisv32-*-*) case "${target}" in *-*-linux*) @@ -3521,11 +3576,30 @@ esac # Disable the go frontend on systems where it is known to not work. Please keep # this in sync with contrib/config-list.mk. case "${target}" in -*-*-darwin* | *-*-cygwin* | *-*-mingw*) +*-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* ) unsupported_languages="$unsupported_languages go" ;; esac +# Only allow gdbserver on some systems. +if test -d ${srcdir}/gdbserver; then + if test x$enable_gdbserver = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbserver support" >&5 +$as_echo_n "checking for gdbserver support... " >&6; } + if (srcdir=${srcdir}/gdbserver; \ + . ${srcdir}/configure.srv; \ + test -n "$UNSUPPORTED") + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + noconfigdirs="$noconfigdirs gdbserver" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi +fi + # Disable libgo for some systems where it is known to not work. # For testing, you can easily override this with --enable-libgo. if test x$enable_libgo = x; then @@ -3537,6 +3611,9 @@ if test x$enable_libgo = x; then *-*-cygwin* | *-*-mingw*) noconfigdirs="$noconfigdirs target-libgo" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-libgo" + ;; esac fi @@ -3574,6 +3651,9 @@ case "${target}" in powerpc*-*-*) libgloss_dir=rs6000 ;; + pru-*-*) + libgloss_dir=pru + ;; sparc*-*-*) libgloss_dir=sparc ;; @@ -3605,6 +3685,9 @@ case "${target}" in sparc-*-sunos4*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; *-*-aix*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; @@ -3718,6 +3801,9 @@ case "${target}" in # newlib is not 64 bit ready noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; + bpf-*-*) + noconfigdirs="$noconfigdirs target-libobjc target-libbacktrace" + ;; sh*-*-pe|mips*-*-pe|*arm-wince-pe) noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" ;; @@ -3847,6 +3933,9 @@ case "${target}" in noconfigdirs="$noconfigdirs ld gas gdb gprof sim" noconfigdirs="$noconfigdirs $target_libraries" ;; + pdp11-*-*) + noconfigdirs="$noconfigdirs gdb gprof" + ;; powerpc-*-aix*) # copied from rs6000-*-* entry noconfigdirs="$noconfigdirs gprof" @@ -5434,10 +5523,10 @@ $as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;} ;; esac -# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a -# C++98 compiler can still start the bootstrap. +# When bootstrapping with GCC, build stage 1 in C++11 mode to ensure that a +# C++11 compiler can still start the bootstrap. if test "$enable_bootstrap:$GXX" = "yes:yes"; then - CXX="$CXX -std=gnu++98" + CXX="$CXX -std=c++11" fi # Used for setting $lt_cv_objdir @@ -5692,7 +5781,7 @@ int main () { - #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0) + #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0) choke me #endif @@ -5709,7 +5798,7 @@ int main () { - #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2) + #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,6) choke me #endif @@ -5802,9 +5891,9 @@ main () int t; mpfr_init (n); mpfr_init (x); - mpfr_atan2 (n, n, x, GMP_RNDN); - mpfr_erfc (n, x, GMP_RNDN); - mpfr_subnormalize (x, t, GMP_RNDN); + mpfr_atan2 (n, n, x, MPFR_RNDN); + mpfr_erfc (n, x, MPFR_RNDN); + mpfr_subnormalize (x, t, MPFR_RNDN); mpfr_clear(n); mpfr_clear(x); mpc_init2 (c, 53); @@ -5835,11 +5924,11 @@ rm -f core conftest.err conftest.$ac_objext \ # The library versions listed in the error message below should match # the HARD-minimums enforced above. if test x$have_gmp != xyes; then - as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. + as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at -ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also +https://gcc.gnu.org/pub/gcc/infrastructure/. See also http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header @@ -5870,6 +5959,23 @@ fi +# Whether or not to use -static-libstdc++ and -static-libgcc. The +# default is yes if gcc is being built; no otherwise. The reason for +# this default is that gdb is sometimes linked against GNU Source +# Highlight, which is a shared library that uses C++ exceptions. In +# this case, -static-libstdc++ will cause crashes. + +# Check whether --with-static-standard-libraries was given. +if test "${with_static_standard_libraries+set}" = set; then : + withval=$with_static_standard_libraries; +else + with_static_standard_libraries=auto +fi + +if test "$with_static_standard_libraries" = auto; then + with_static_standard_libraries=$have_compiler +fi + # Linker flags to use for stage1 or when not bootstrapping. # Check whether --with-stage1-ldflags was given. @@ -5884,7 +5990,8 @@ else # In stage 1, default to linking libstdc++ and libgcc statically with GCC # if supported. But if the user explicitly specified the libraries to use, # trust that they are doing what they want. - if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then + if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ + -a "$have_static_libs" = yes; then stage1_ldflags="-static-libstdc++ -static-libgcc" fi fi @@ -6382,9 +6489,13 @@ $as_echo "$as_me: WARNING: GNAT is required to build $language" >&2;} 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 + case $target in + *mingw*) ;; + *) + case ${add_this_lang}:${language}:${host_shared} in + yes:jit:no) + # PR jit/64780: explicitly specify --enable-host-shared as_fn_error $? " Enabling language \"jit\" requires --enable-host-shared. @@ -6395,17 +6506,19 @@ 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." "$LINENO" 5 - ;; - all:jit:no) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-host-shared required to build $language" >&5 + ;; + all:jit:no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-host-shared required to build $language" >&5 $as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2;} - add_this_lang=unsupported - ;; - *:jit:no) - # Silently disable. - add_this_lang=unsupported - ;; - esac + 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 @@ -7230,6 +7343,18 @@ esac CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` +# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing +# else does, only include them if one of these is built. The Makefile +# provides the ordering, so it's enough here to add to the list. +case " ${configdirs} " in + *\ gdb\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; + *\ gdbserver\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; +esac + # Strip out unwanted targets. # While at that, we remove Makefiles if we were started for recursive @@ -15353,8 +15478,8 @@ fi compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" case "$target" in hppa*64*-*-hpux*) ;; - hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/* | gcc/function-tests.o" ;; - powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;; + hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;; + powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;; esac