diff options
author | Cary Coutant <ccoutant@google.com> | 2014-04-02 15:04:36 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2014-04-02 15:04:36 -0700 |
commit | ae447ddd12cf05bc5bef90c4a3f53239b5bcf2f9 (patch) | |
tree | cf2c145cc7017f573dbe7e37b39d201f373a1570 /gold/configure | |
parent | 0a899fd5acf97c0c9af7c6548e2c0e132148cf78 (diff) | |
download | gdb-ae447ddd12cf05bc5bef90c4a3f53239b5bcf2f9.zip gdb-ae447ddd12cf05bc5bef90c4a3f53239b5bcf2f9.tar.gz gdb-ae447ddd12cf05bc5bef90c4a3f53239b5bcf2f9.tar.bz2 |
Modify gold testsuite to disable plugins added by GCC driver.
GCC 4.8 now adds linker plugin options by default, which conflict with the
--incremental tests in the testsuite. This patch checks whether the compiler
supports the -fno-use-linker-plugin option, and adds it to all link
commands.
2014-04-02 Cary Coutant <ccoutant@google.com>
* configure.ac (HAVE_PUBNAMES): Use C instead of C++.
(HAVE_NO_USE_LINKER_PLUGIN): Check for -fno-use-linker-plugin.
* configure: Regenerate.
* testsuite/Makefile.am (OPT_NO_PLUGINS): New macro for
-fno-use-linker-plugin.
(LINK1, CXXLINK1): Add it to the link command.
* testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/configure')
-rwxr-xr-x | gold/configure | 76 |
1 files changed, 52 insertions, 24 deletions
diff --git a/gold/configure b/gold/configure index 2257324..f61307b 100755 --- a/gold/configure +++ b/gold/configure @@ -594,10 +594,12 @@ LTLIBOBJS MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE -HAVE_PUBNAMES_FALSE -HAVE_PUBNAMES_TRUE DLOPEN_LIBS CXXCPP +HAVE_NO_USE_LINKER_PLUGIN_FALSE +HAVE_NO_USE_LINKER_PLUGIN_TRUE +HAVE_PUBNAMES_FALSE +HAVE_PUBNAMES_TRUE HAVE_ZLIB_FALSE HAVE_ZLIB_TRUE LIBOBJS @@ -6991,6 +6993,50 @@ cat >>confdefs.h <<_ACEOF _ACEOF +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -gpubnames" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_pubnames=yes +else + have_pubnames=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" + if test "$have_pubnames" = "yes"; then + HAVE_PUBNAMES_TRUE= + HAVE_PUBNAMES_FALSE='#' +else + HAVE_PUBNAMES_TRUE='#' + HAVE_PUBNAMES_FALSE= +fi + + +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_no_use_linker_plugin=yes +else + have_no_use_linker_plugin=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" + if test "$have_no_use_linker_plugin" = "yes"; then + HAVE_NO_USE_LINKER_PLUGIN_TRUE= + HAVE_NO_USE_LINKER_PLUGIN_FALSE='#' +else + HAVE_NO_USE_LINKER_PLUGIN_TRUE='#' + HAVE_NO_USE_LINKER_PLUGIN_FALSE= +fi + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7515,28 +7561,6 @@ $as_echo "#define HAVE_STAT_ST_MTIM 1" >>confdefs.h fi -save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -Werror -gpubnames" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int i; -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - have_pubnames=yes -else - have_pubnames=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CXXFLAGS="$save_CXXFLAGS" - if test "$have_pubnames" = "yes"; then - HAVE_PUBNAMES_TRUE= - HAVE_PUBNAMES_FALSE='#' -else - HAVE_PUBNAMES_TRUE='#' - HAVE_PUBNAMES_FALSE= -fi - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7837,6 +7861,10 @@ if test -z "${HAVE_PUBNAMES_TRUE}" && test -z "${HAVE_PUBNAMES_FALSE}"; then as_fn_error "conditional \"HAVE_PUBNAMES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_NO_USE_LINKER_PLUGIN_TRUE}" && test -z "${HAVE_NO_USE_LINKER_PLUGIN_FALSE}"; then + as_fn_error "conditional \"HAVE_NO_USE_LINKER_PLUGIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |