X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure;h=4d9fc2a4e0e37e769f333c9fcf45038d880636f6;hb=1a6c552d12026ee85c819dfe6f2c83bc59aaa28f;hp=d452fa7c2b448df2d908d85e5c26ed2174999cde;hpb=90d4f2330e4aa883d164d4ca4401b70443006950;p=gcc.git diff --git a/configure b/configure index d452fa7c2b4..4d9fc2a4e0e 100755 --- a/configure +++ b/configure @@ -556,7 +556,6 @@ enable_option_checking=no ac_subst_vars='LTLIBOBJS LIBOBJS compare_exclusions -POSTSTAGE1_CONFIGURE_FLAGS stage2_werror_flag stage1_checking stage1_cflags @@ -647,11 +646,11 @@ extra_host_libiberty_configure_flags clooginc clooglibs islinc -isllibs poststage1_ldflags poststage1_libs -stage1_libs stage1_ldflags +stage1_libs +extra_isl_gmp_configure_flags extra_mpc_mpfr_configure_flags extra_mpc_gmp_configure_flags extra_mpfr_configure_flags @@ -752,8 +751,6 @@ enable_libada enable_libssp enable_static_libjava enable_bootstrap -enable_build_with_cxx -enable_build_poststage1_with_cxx with_mpc with_mpc_include with_mpc_lib @@ -766,15 +763,15 @@ with_gmp with_gmp_include with_gmp_lib with_host_libstdcxx -with_stage1_ldflags with_stage1_libs +with_stage1_ldflags with_boot_libs with_boot_ldflags +with_cloog with_isl with_isl_include with_isl_lib enable_isl_version_check -with_cloog with_cloog_include with_cloog_lib enable_cloog_version_check @@ -1470,9 +1467,6 @@ Optional Features: --enable-static-libjava[=ARG] build static libjava [default=no] --enable-bootstrap enable bootstrapping [yes if native build] - --enable-build-with-cxx build with C++ compiler instead of C compiler - --enable-build-poststage1-with-cxx - build stages 2 and 3 with C++, not C --disable-isl-version-check disable check for ISL version --disable-cloog-version-check @@ -1520,22 +1514,22 @@ Optional Packages: --with-gmp-lib=PATH specify directory for the installed GMP library --with-host-libstdcxx=L use linker arguments L to link with libstdc++ when linking with PPL + --with-stage1-libs=LIBS libraries for stage1 --with-stage1-ldflags=FLAGS linker flags for stage1 - --with-stage1-libs=LIBS libraries for stage1 --with-boot-libs=LIBS libraries for stage2 and later --with-boot-ldflags=FLAGS linker flags for stage2 and later + --with-cloog=PATH Specify prefix directory for the installed CLooG-ISL + package. Equivalent to + --with-cloog-include=PATH/include plus + --with-cloog-lib=PATH/lib --with-isl=PATH Specify prefix directory for the installed ISL package. Equivalent to --with-isl-include=PATH/include plus --with-isl-lib=PATH/lib --with-isl-include=PATH Specify directory for installed ISL include files --with-isl-lib=PATH Specify the directory for the installed ISL library - --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL - package. Equivalent to - --with-cloog-include=PATH/include plus - --with-cloog-lib=PATH/lib --with-cloog-include=PATH Specify directory for installed CLooG include files --with-cloog-lib=PATH Specify the directory for the installed CLooG @@ -1771,6 +1765,52 @@ fi } # ac_fn_cxx_try_compile +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_cxx_try_link + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2704,7 +2744,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 # -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -2723,6 +2763,7 @@ libgcj="target-libffi \ # the host libraries and the host tools (which may be a cross compiler) # Note that libiberty is not a target library. target_libraries="target-libgcc \ + target-libbacktrace \ target-libgloss \ target-newlib \ target-libgomp \ @@ -2921,7 +2962,7 @@ case "${ENABLE_GOLD}" in if test "$is_elf" = "yes"; then # Check for target supported by gold. case "${target}" in - i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* | tilegx*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -3141,6 +3182,15 @@ $as_echo "yes" >&6; } fi fi +# Disable libquadmath for some systems. +case "${target}" in + # libquadmath is unused on AIX and libquadmath build process use of + # LD_LIBRARY_PATH can break AIX bootstrap. + powerpc-*-aix* | rs6000-*-aix*) + noconfigdirs="$noconfigdirs target-libquadmath" + ;; +esac + # Disable libssp for some systems. case "${target}" in avr-*-*) @@ -3158,6 +3208,13 @@ case "${target}" in ;; esac +# Disable libquadmath for some systems. +case "${target}" in + avr-*-*) + noconfigdirs="$noconfigdirs target-libquadmath" + ;; +esac + # Disable libstdc++-v3 for some systems. case "${target}" in *-*-vxworks*) @@ -3498,6 +3555,13 @@ case "${target}" in arm-*-riscix*) noconfigdirs="$noconfigdirs ld target-libgloss" ;; + avr-*-rtems*) + ;; + avr-*-*) + if test x${with_avrlibc} != xno; then + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + fi + ;; c4x-*-* | tic4x-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; @@ -3632,7 +3696,7 @@ case "${target}" in microblaze*) noconfigdirs="$noconfigdirs gprof" ;; - mips*-sde-elf*) + mips*-sde-elf* | mips*-mti-elf*) if test x$with_newlib = xyes; then noconfigdirs="$noconfigdirs gprof" fi @@ -4811,6 +4875,48 @@ if test -z "$LD"; then fi fi +# Check whether -static-libstdc++ -static-libgcc is supported. +have_static_libs=no +if test "$GCC" = yes; then + saved_LDFLAGS="$LDFLAGS" + + LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5 +$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#error -static-libstdc++ not implemented +#endif +int main() {} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; have_static_libs=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + LDFLAGS="$saved_LDFLAGS" +fi + @@ -5108,24 +5214,6 @@ $as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;} ;; esac -# See if we are building gcc with C++. -# Check whether --enable-build-with-cxx was given. -if test "${enable_build_with_cxx+set}" = set; then : - enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval -else - ENABLE_BUILD_WITH_CXX=no -fi - - -# Build stage1 with C and build stages 2 and 3 with C++. -# Check whether --enable-build-poststage1-with-cxx was given. -if test "${enable_build_poststage1_with_cxx+set}" = set; then : - enableval=$enable_build_poststage1_with_cxx; ENABLE_BUILD_POSTSTAGE1_WITH_CXX=$enableval -else - ENABLE_BUILD_POSTSTAGE1_WITH_CXX=yes -fi - - # Used for setting $lt_cv_objdir { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } @@ -5303,6 +5391,7 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" + extra_isl_gmp_configure_flags='--with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp' # Do not test the gmp version. Assume that it is sufficient, since # it is in the source tree, and the library has not been built yet # but it would be included on the link line in the version check below @@ -5327,7 +5416,7 @@ main () #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL) - #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,0) + #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3) choke me #endif @@ -5542,6 +5631,7 @@ fi + # Allow host libstdc++ to be specified for static linking with PPL. # Check whether --with-host-libstdcxx was given. @@ -5556,32 +5646,38 @@ case $with_host_libstdcxx in ;; esac -# Linker flags to use for stage1 or when not boostrapping. +# Libraries to use for stage1 or when not bootstrapping. -# Check whether --with-stage1-ldflags was given. -if test "${with_stage1_ldflags+set}" = set; then : - withval=$with_stage1_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then - stage1_ldflags= +# Check whether --with-stage1-libs was given. +if test "${with_stage1_libs+set}" = set; then : + withval=$with_stage1_libs; if test "$withval" = "no" -o "$withval" = "yes"; then + stage1_libs= else - stage1_ldflags=$withval + stage1_libs=$withval fi else - stage1_ldflags= + stage1_libs=$with_host_libstdcxx fi -# Libraries to use for stage1 or when not bootstrapping. +# Linker flags to use for stage1 or when not bootstrapping. -# Check whether --with-stage1-libs was given. -if test "${with_stage1_libs+set}" = set; then : - withval=$with_stage1_libs; if test "$withval" = "no" -o "$withval" = "yes"; then - stage1_libs= +# Check whether --with-stage1-ldflags was given. +if test "${with_stage1_ldflags+set}" = set; then : + withval=$with_stage1_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then + stage1_ldflags= else - stage1_libs=$withval + stage1_ldflags=$withval fi else - stage1_libs=$with_host_libstdcxx + stage1_ldflags= + # 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 + stage1_ldflags="-static-libstdc++ -static-libgcc" + fi fi @@ -5623,7 +5719,15 @@ fi -# Check for ISL +# GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL. +# Basic setup is inlined here, actual checks are in config/cloog.m4 and +# config/isl.m4 + + +# Check whether --with-cloog was given. +if test "${with_cloog+set}" = set; then : + withval=$with_cloog; +fi # Check whether --with-isl was given. @@ -5632,6 +5736,13 @@ if test "${with_isl+set}" = set; then : fi +# Treat either --without-cloog or --without-isl as a request to disable +# GRAPHITE support and skip all following checks. +if test "x$with_isl" != "xno" && + test "x$with_cloog" != "xno"; then + # Check for ISL + + # Check whether --with-isl-include was given. if test "${with_isl_include+set}" = set; then : withval=$with_isl_include; @@ -5678,14 +5789,8 @@ fi ENABLE_ISL_CHECK=no fi - isllibs="${isllibs} -lisl" - - - -if test "x$with_isl" != "xno"; then - if test "${ENABLE_ISL_CHECK}" = yes ; then _isl_saved_CFLAGS=$CFLAGS _isl_saved_LDFLAGS=$LDFLAGS @@ -5702,10 +5807,7 @@ if test "${gcc_cv_isl+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } + gcc_cv_isl=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5744,7 +5846,6 @@ $as_echo "$gcc_cv_isl" >&6; } - if test "x${with_isl}" = xno; then graphite_requested=no elif test "x${with_isl}" != x \ @@ -5770,15 +5871,9 @@ $as_echo "$gcc_cv_isl" >&6; } fi -fi -# Check for CLOOG - - -# Check whether --with-cloog was given. -if test "${with_cloog+set}" = set; then : - withval=$with_cloog; -fi + if test "x$gcc_cv_isl" != "xno"; then + # Check for CLOOG # Check whether --with-cloog-include was given. @@ -5820,21 +5915,16 @@ fi if test "x${with_cloog_lib}" != x; then clooglibs="-L$with_cloog_lib" fi - if test "x${clooginc}" == x && test "x${clooglibs}" == x \ + if test "x${clooginc}" = x && test "x${clooglibs}" = x \ && test -d ${srcdir}/cloog; then - echo FooBar clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' ' clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -I'${srcdir}'/cloog/include ' fi clooginc="-DCLOOG_INT_GMP ${clooginc}" - clooglibs="${clooglibs} -lcloog-isl ${isllibs}" - - - + clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl" -if test "x$with_cloog" != "xno"; then @@ -5906,12 +5996,30 @@ $as_echo "$gcc_cv_cloog" >&6; } && test "x${clooglibs}" = x \ && test "x${clooginc}" = x ; then - as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5 + as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5 fi + fi +fi + +# If either the ISL or the CLooG check failed, disable builds of in-tree +# variants of both +if test "x$with_isl" = xno || + test "x$with_cloog" = xno || + test "x$gcc_cv_cloog" = xno || + test "x$gcc_cv_isl" = xno; then + noconfigdirs="$noconfigdirs cloog isl" + islinc= + clooginc= + clooglibs= fi + + + + + # Check for LTO support. # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : @@ -5972,7 +6080,7 @@ fi -# By default, C is the only stage 1 language. +# By default, C and C++ are the only stage 1 languages. stage1_languages=,c, # Target libraries that we bootstrap. @@ -6010,15 +6118,14 @@ if test -d ${srcdir}/gcc; then ;; esac - # If bootstrapping, then using --enable-build-with-cxx or - # --enable-build-poststage1-with-cxx requires enabling C++. - case ",$enable_languages,:,$ENABLE_BUILD_WITH_CXX,$ENABLE_BUILD_POSTSTAGE1_WITH_CXX,:$enable_bootstrap" in - *,c++,*:*:*) ;; - *:*,yes,*:yes) + # If bootstrapping, C++ must be enabled. + case ",$enable_languages,:$enable_bootstrap" in + *,c++,*:*) ;; + *:yes) if test -f ${srcdir}/gcc/cp/config-lang.in; then enable_languages="${enable_languages},c++" else - as_fn_error "bootstrapping with --enable-build-with-cxx or --enable-build-poststage1-with-cxx requires c++ sources" "$LINENO" 5 + as_fn_error "bootstrapping requires c++ sources" "$LINENO" 5 fi ;; esac @@ -6113,12 +6220,10 @@ if test -d ${srcdir}/gcc; then fi if test "$language" = "c++"; then - if test "$ENABLE_BUILD_WITH_CXX" = "yes" \ - || test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then - boot_language=yes - fi + boot_language=yes fi + add_this_lang=no case ,${enable_languages}, in *,${language},*) # Language was explicitly selected; include it @@ -6129,10 +6234,9 @@ if test -d ${srcdir}/gcc; then ;; *,all,*) # 'all' was selected, select it if it is a default language - add_this_lang=${build_by_default} - ;; - *) - add_this_lang=no + if test "$language" != "c"; then + add_this_lang=${build_by_default} + fi ;; esac @@ -6656,7 +6760,7 @@ case "${target}" in spu-*-*) target_makefile_frag="config/mt-spu" ;; - mips*-sde-elf*) + mips*-sde-elf* | mips*-mti-elf*) target_makefile_frag="config/mt-sde" ;; mipsisa*-*-elfoabi*) @@ -14207,43 +14311,6 @@ case $build in esac ;; esac -# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. -if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then - saved_CFLAGS="$CFLAGS" - - # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. - CFLAGS="$CFLAGS -fkeep-inline-functions" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fkeep-inline-functions is supported" >&5 -$as_echo_n "checking whether -fkeep-inline-functions is supported... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if (__GNUC__ < 3) \ - || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \ - || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1))) -#error http://gcc.gnu.org/PR29382 -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; stage1_cflags="$stage1_cflags -fkeep-inline-functions" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - CFLAGS="$saved_CFLAGS" -fi - # Enable --enable-checking in stage1 of the compiler. @@ -14278,21 +14345,13 @@ case ${enable_werror} in esac -# If using ENABLE_BUILD_POSTSTAGE1_WITH_CXX, pass -# --enable-build-with-cxx after stage1. -if test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then - POSTSTAGE1_CONFIGURE_FLAGS=--enable-build-with-cxx -else - POSTSTAGE1_CONFIGURE_FLAGS= -fi - - # Specify what files to not compare during bootstrap. 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/*" ;; + powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;; esac