From 81c91662d92bbfb35dfa031362240244c1534938 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 2 May 2016 14:13:33 +0300 Subject: Fix gcc lto. Also rebuild configure. --- configure | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 8 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 46853a217..9e5c01851 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac b947fde. +# From configure.ac b7b45b7c3. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -5153,17 +5153,19 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$enable_lto" != "no" ; then OLD_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -flto" + CFLAGS="$CFLAGS -flto -ffat-lto-objects -Werror" OLD_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -flto" + LDFLAGS="$LDFLAGS -flto -ffat-lto-objects" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto" >&5 -$as_echo_n "checking whether $CC supports -flto... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto -ffat-lto-objects" >&5 +$as_echo_n "checking whether $CC supports -flto -ffat-lto-objects... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5 $as_echo "guessing no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" else @@ -5171,6 +5173,8 @@ else /* end confdefs.h. */ int main(int argc, char **argv){ + (void)argc; + (void)argv; return 0; } @@ -5179,13 +5183,53 @@ if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + CFLAGS="$OLD_CFLAGS -flto -ffat-lto-objects" + LDFLAGS="$OLD_LDFLAGS -flto -ffat-lto-objects" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - CFLAGS="$OLD_CFLAGS" - LDFLAGS="$OLD_LDFLAGS" + CFLAGS="$OLD_CFLAGS -flto" + LDFLAGS="$OLD_LDFLAGS -flto" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto" >&5 +$as_echo_n "checking whether $CC supports -flto... " >&6; } + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5 +$as_echo "guessing no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv){ + (void)argc; + (void)argv; + return 0; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -8346,7 +8390,7 @@ Linux* ) LIBS="$LIBS -ldl" ;; FreeBSD*) - CPPFLAGS="$CPPFLAGS -D__FREEBSD__" + CPPFLAGS="$CPPFLAGS -D__FREEBSD__ -fvisibility=hidden" ;; NetBSD*) CPPFLAGS="$CPPFLAGS -D__NETBSD__" -- cgit v1.2.3-60-g2f50