summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-06-19 23:07:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-06-19 23:07:47 -0700
commit0b20117e9624412004e4309228dcc54756ddfd50 (patch)
tree278a70addde74c49ea5c419dac2da554e6374a51 /configure.ac
parent500dce5f4d2a08570177d9b1019fa922f07e8508 (diff)
downloademacs-0b20117e9624412004e4309228dcc54756ddfd50.tar.gz
Port to GCC 4.9.0 with link time optimization.
* configure.ac (CFLAGS): With link time optimization, use -ffat-lto-objects if supported; otherwise Emacs won't build with GCC 4.9.0. Fixes: debbugs:17806
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 702b8570577..e9400047edc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -777,6 +777,12 @@ if test "${enableval}" != "no"; then
AC_MSG_RESULT([$ac_lto_supported])
if test "$ac_lto_supported" = "yes"; then
CFLAGS="$CFLAGS $LTO"
+ dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
+ dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
+ dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
+ dnl dump core on Fedora 20, so play it safe for now.
+ gl_COMPILER_OPTION_IF([-ffat-lto-objects],
+ [CFLAGS="$CFLAGS -ffat-lto-objects"])
fi
fi)