X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=configure.ac;h=544fab3d2097cb1e6bc572cc8c060baa9ec108b6;hb=441af85bd9c68dbc0c2a1dbe23bf07c6cb3c3f5d;hp=c84263c516bc9131565fbaaf4d17d2e77bd9aa8f;hpb=0e65dfbaf3a0299e4837216a103c28625d4b4f1d;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.ac b/configure.ac index c84263c516..544fab3d20 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, -# 2014, 2015, 2016 Free Software Foundation, Inc. +# 2014, 2015, 2016, 2019 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -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/debuginfod.m4) m4_include([libtool.m4]) m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) @@ -1363,6 +1364,9 @@ gmplibs="-lmpc -lmpfr -lgmp" gmpinc= have_gmp=no +# Check for debuginfod +AC_DEBUGINFOD + # Specify a location for mpc # check for this first so it ends up on the link line before mpfr. AC_ARG_WITH(mpc, @@ -1602,6 +1606,19 @@ AC_ARG_WITH(stage1-libs, [stage1_libs=]) AC_SUBST(stage1_libs) +# 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. +AC_ARG_WITH(static-standard-libraries, +[AS_HELP_STRING([--with-static-standard-libraries], + [use -static-libstdc++ and -static-libgcc (default=auto)])], +[], [with_static_standard_libraries=auto]) +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. AC_ARG_WITH(stage1-ldflags, [AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])], @@ -1614,7 +1631,8 @@ AC_ARG_WITH(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 + if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ + -a "$have_static_libs" = yes; then stage1_ldflags="-static-libstdc++ -static-libgcc" fi]) AC_SUBST(stage1_ldflags) @@ -2712,6 +2730,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