- Use -flto compiler flag for link time optimization, if supported.

git-svn-id: file:///svn/unbound/trunk@2427 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2011-06-14 08:39:53 +00:00
parent 608f82a1cd
commit 139ab47dc6
3 changed files with 35 additions and 0 deletions

31
configure vendored
View file

@ -5617,6 +5617,37 @@ $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto" >&5
$as_echo_n "checking whether $CC supports -flto... " >&6; }
cache=`echo flto | sed 'y%.=/+-%___p_%'`
if eval "test \"\${cv_prog_cc_flag_$cache+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
echo 'void f(){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -flto -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
eval "cv_prog_cc_flag_$cache=no"
fi
rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
:
CFLAGS="$CFLAGS -flto"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
:
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then :

View file

@ -225,6 +225,7 @@ case "$debug_enabled" in
# nothing to do.
;;
esac
ACX_CHECK_COMPILER_FLAG(flto, [CFLAGS="$CFLAGS -flto"])
AC_C_INLINE
ACX_CHECK_FORMAT_ATTRIBUTE

View file

@ -1,3 +1,6 @@
14 June 2011: Wouter
- Use -flto compiler flag for link time optimization, if supported.
12 June 2011: Wouter
- IPv6 service address for d.root-servers.net (2001:500:2D::D).