X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=configure;h=e02123c36f488d3cda075f335563506d2dd2fb14;hb=7f0ae84c80aae6fe8f7573343fe1ab455d18b5d8;hp=3e95ce50ffb15a53e3d7aa66515937d1bd22d43c;hpb=79b377b3cf3a0e71e1e4710c4ee1e65e7a27a5d4;p=deliverable%2Fbinutils-gdb.git diff --git a/configure b/configure index 3e95ce50ff..e02123c36f 100755 --- a/configure +++ b/configure @@ -690,6 +690,7 @@ extra_mpc_gmp_configure_flags extra_mpfr_configure_flags gmpinc gmplibs +LIBDEBUGINFOD do_compare GNATMAKE GNATBIND @@ -790,6 +791,7 @@ enable_libssp enable_libstdcxx enable_liboffloadmic enable_bootstrap +with_debuginfod with_mpc with_mpc_include with_mpc_lib @@ -802,6 +804,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 @@ -1552,6 +1555,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build-libsubdir=DIR Directory where to find libraries for build system --with-system-zlib use installed libz + --with-debuginfod Enable debuginfo lookups with debuginfod + (auto/yes/no) --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib @@ -1572,6 +1577,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 @@ -1917,6 +1925,52 @@ fi as_fn_set_status $ac_retval } # ac_fn_c_try_link + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -5429,6 +5483,92 @@ gmplibs="-lmpc -lmpfr -lgmp" gmpinc= have_gmp=no +# Check for debuginfod + + +# Enable debuginfod + +# Check whether --with-debuginfod was given. +if test "${with_debuginfod+set}" = set; then : + withval=$with_debuginfod; +else + with_debuginfod=auto +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 +$as_echo_n "checking whether to use debuginfod... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 +$as_echo "$with_debuginfod" >&6; } + +if test "${with_debuginfod}" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 +$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debuginfod_begin in -ldebuginfod" >&5 +$as_echo_n "checking for debuginfod_begin in -ldebuginfod... " >&6; } +if ${ac_cv_lib_debuginfod_debuginfod_begin+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldebuginfod $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char debuginfod_begin (); +int +main () +{ +return debuginfod_begin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_debuginfod_debuginfod_begin=yes +else + ac_cv_lib_debuginfod_debuginfod_begin=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_debuginfod_debuginfod_begin" >&5 +$as_echo "$ac_cv_lib_debuginfod_debuginfod_begin" >&6; } +if test "x$ac_cv_lib_debuginfod_debuginfod_begin" = xyes; then : + have_debuginfod_lib=yes +fi + + ac_fn_c_check_decl "$LINENO" "debuginfod_begin" "ac_cv_have_decl_debuginfod_begin" "#include +" +if test "x$ac_cv_have_decl_debuginfod_begin" = xyes; then : + have_debuginfod_h=yes +fi + + if test "x$have_debuginfod_lib" = "xyes" -a \ + "x$have_debuginfod_h" = "xyes"; then + +$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h + + LIBDEBUGINFOD="-ldebuginfod" + + else + + if test "$with_debuginfod" = yes; then + as_fn_error $? "debuginfod is missing or unusable" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&5 +$as_echo "$as_me: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&2;} + fi + fi +fi + + # Specify a location for mpc # check for this first so it ends up on the link line before mpfr. @@ -5583,8 +5723,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then # Check for the recommended and required versions of GMP. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of gmp.h" >&5 $as_echo_n "checking for the correct version of gmp.h... " >&6; } - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gmp.h" int @@ -5824,6 +5963,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. @@ -5838,7 +5994,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 @@ -7184,6 +7341,14 @@ esac CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` +# gdb depends on gnulib, but as nothing else does, only include it if +# gdb is built. +if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then + # The Makefile provides the ordering, so it's enough here to add + # gnulib to the list. + configdirs="${configdirs} gnulib" +fi + # Strip out unwanted targets. # While at that, we remove Makefiles if we were started for recursive