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.ac | |
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.ac')
-rw-r--r-- | gold/configure.ac | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index 803cf46..7ad7302 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -520,6 +520,25 @@ dnl multiple declarations of functions like basename when compiling dnl with C++. AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp]) +dnl Check if gcc supports the -gpubnames option. +dnl Use -Werror in case of compilers that make unknown -g options warnings. +dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS +dnl gets set later by default Autoconf magic to include -Werror. (We are +dnl assuming here that there is no compiler that groks -gpubnames +dnl but does not grok -Werror.) +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -gpubnames" +AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no]) +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes") + +dnl Check if gcc supports the -fno-use-linker-plugin option. +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin" +AC_COMPILE_IFELSE([int i;], [have_no_use_linker_plugin=yes], [have_no_use_linker_plugin=no]) +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(HAVE_NO_USE_LINKER_PLUGIN, test "$have_no_use_linker_plugin" = "yes") + AC_LANG_PUSH(C++) AC_CHECK_HEADERS(unordered_set unordered_map) @@ -601,18 +620,6 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then [Define if struct stat has a field st_mtim with timespec for mtime]) fi -dnl Check if gcc supports the -gpubnames option. -dnl Use -Werror in case of compilers that make unknown -g options warnings. -dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS -dnl gets set later by default Autoconf magic to include -Werror. (We are -dnl assuming here that there is no compiler that groks -gpubnames -dnl but does not grok -Werror.) -save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -Werror -gpubnames" -AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no]) -CXXFLAGS="$save_CXXFLAGS" -AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes") - AC_LANG_POP(C++) AC_CHECK_HEADERS(locale.h) |