aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2013-10-11 21:56:16 +0000
committerRoland McGrath <roland@gnu.org>2013-10-11 21:56:16 +0000
commit2b64b5511a0d0814eb3938cff986edf493a7b362 (patch)
tree2aaf7c766c20f163736daaa0c70bb44f01413fec /gold/configure.ac
parent43819297ce3e76908a840fa66159ca83c1560fe5 (diff)
downloadgdb-2b64b5511a0d0814eb3938cff986edf493a7b362.zip
gdb-2b64b5511a0d0814eb3938cff986edf493a7b362.tar.gz
gdb-2b64b5511a0d0814eb3938cff986edf493a7b362.tar.bz2
gold/
* configure.ac (MERGE_CONSTANTS_FLAG): New check. * configure: Regenerate. * Makefile.in: Regenerate. * testsuite/merge_string_literals_1.c: Renamed to have .cc suffix. * testsuite/merge_string_literals_2.c: Likewise. * testsuite/Makefile.am (merge_string_literals_1.o, merge_string_literals_2.o): Update deps. (AM_CFLAGS, AM_CXXFLAGS): Use $(MERGE_CONSTANTS_FLAG) in place of literal -fmerge-constants. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index e3e10b3..4cc9569 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -7,12 +7,12 @@ dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
-dnl
+dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
-dnl
+dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; see the file COPYING3. If not see
dnl <http://www.gnu.org/licenses/>.
@@ -338,6 +338,19 @@ dnl Whether we can test -mcmodel=medium.
AM_CONDITIONAL(MCMODEL_MEDIUM,
[test "$target_cpu" = "x86_64" -a "$have_mcmodel_medium" = "yes" -a "$gold_cv_prog_gcc41" = "yes"])
+AC_CACHE_CHECK([whether $CC supports -fmerge-constants],
+ [gold_cv_merge_constants], [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fmerge-constants"
+AC_COMPILE_IFELSE([const char *s = "foo";],
+ [have_merge_constants=yes],
+ [have_merge_constants=no])
+CFLAGS="$save_CFLAGS"])
+AC_SUBST([MERGE_CONSTANTS_FLAG])
+AS_IF([test "$gold_cv_merge_constants" = yes],
+ [MERGE_CONSTANTS_FLAG=-fmerge-constants],
+ [MERGE_CONSTANTS_FLAG=])
+
dnl Test for __thread support.
AC_CACHE_CHECK([for thread support], [gold_cv_c_thread],
[AC_COMPILE_IFELSE([__thread int i = 1;],