mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- configure --disable-flto option (from Robert Edmonds).
git-svn-id: file:///svn/unbound/trunk@2916 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
18e488ec5d
commit
13f2131a97
3 changed files with 42 additions and 25 deletions
|
|
@ -2,7 +2,8 @@
|
||||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||||
# BSD licensed.
|
# BSD licensed.
|
||||||
#
|
#
|
||||||
# Version 23
|
# Version 24
|
||||||
|
# 2013-06-25 FLTO has --disable-flto option.
|
||||||
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
|
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
|
||||||
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
|
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
|
||||||
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
|
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
|
||||||
|
|
@ -407,19 +408,22 @@ int test() {
|
||||||
dnl Check if CC supports -flto.
|
dnl Check if CC supports -flto.
|
||||||
dnl in a way that supports clang and suncc (that flag does something else,
|
dnl in a way that supports clang and suncc (that flag does something else,
|
||||||
dnl but fails to link). It sets it in CFLAGS if it works.
|
dnl but fails to link). It sets it in CFLAGS if it works.
|
||||||
AC_DEFUN([ACX_CHECK_FLTO],
|
AC_DEFUN([ACX_CHECK_FLTO], [
|
||||||
[AC_MSG_CHECKING([if $CC supports -flto])
|
AC_ARG_ENABLE([flto], AS_HELP_STRING([--disable-flto], [Disable link-time optimization]))
|
||||||
BAKCFLAGS="$CFLAGS"
|
AS_IF([test "x$enable_flto" != "xno"], [
|
||||||
CFLAGS="$CFLAGS -flto"
|
AC_MSG_CHECKING([if $CC supports -flto])
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
BAKCFLAGS="$CFLAGS"
|
||||||
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
CFLAGS="$CFLAGS -flto"
|
||||||
CFLAGS="$BAKCFLAGS"
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
AC_MSG_RESULT(no)
|
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
||||||
else
|
CFLAGS="$BAKCFLAGS"
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
else
|
||||||
rm -f conftest conftest.c conftest.o
|
AC_MSG_RESULT(yes)
|
||||||
], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
|
fi
|
||||||
|
rm -f conftest conftest.c conftest.o
|
||||||
|
], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Check the printf-format attribute (if any)
|
dnl Check the printf-format attribute (if any)
|
||||||
|
|
|
||||||
34
configure
vendored
34
configure
vendored
|
|
@ -797,6 +797,7 @@ with_rootcert_file
|
||||||
with_username
|
with_username
|
||||||
enable_checking
|
enable_checking
|
||||||
enable_debug
|
enable_debug
|
||||||
|
enable_flto
|
||||||
enable_shared
|
enable_shared
|
||||||
enable_static
|
enable_static
|
||||||
with_pic
|
with_pic
|
||||||
|
|
@ -1454,6 +1455,7 @@ Optional Features:
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
--enable-checking Enable warnings, asserts, makefile-dependencies
|
--enable-checking Enable warnings, asserts, makefile-dependencies
|
||||||
--enable-debug same as enable-checking
|
--enable-debug same as enable-checking
|
||||||
|
--disable-flto Disable link-time optimization
|
||||||
--enable-shared[=PKGS] build shared libraries [default=yes]
|
--enable-shared[=PKGS] build shared libraries [default=yes]
|
||||||
--enable-static[=PKGS] build static libraries [default=yes]
|
--enable-static[=PKGS] build static libraries [default=yes]
|
||||||
--enable-fast-install[=PKGS]
|
--enable-fast-install[=PKGS]
|
||||||
|
|
@ -5762,11 +5764,19 @@ $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
|
||||||
# nothing to do.
|
# nothing to do.
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
|
|
||||||
|
# Check whether --enable-flto was given.
|
||||||
|
if test "${enable_flto+set}" = set; then :
|
||||||
|
enableval=$enable_flto;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_flto" != "xno"; then :
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
|
||||||
$as_echo_n "checking if $CC supports -flto... " >&6; }
|
$as_echo_n "checking if $CC supports -flto... " >&6; }
|
||||||
BAKCFLAGS="$CFLAGS"
|
BAKCFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -flto"
|
CFLAGS="$CFLAGS -flto"
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -5779,15 +5789,15 @@ main ()
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
|
||||||
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
||||||
CFLAGS="$BAKCFLAGS"
|
CFLAGS="$BAKCFLAGS"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f conftest conftest.c conftest.o
|
rm -f conftest conftest.c conftest.o
|
||||||
|
|
||||||
else
|
else
|
||||||
CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
|
@ -5796,6 +5806,8 @@ fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
|
||||||
$as_echo_n "checking for inline... " >&6; }
|
$as_echo_n "checking for inline... " >&6; }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
25 Jun 2013: Wouter
|
25 Jun 2013: Wouter
|
||||||
- Squelch sendto-permission denied errors when the network is
|
- Squelch sendto-permission denied errors when the network is
|
||||||
not connected, to avoid spamming syslog.
|
not connected, to avoid spamming syslog.
|
||||||
|
- configure --disable-flto option (from Robert Edmonds).
|
||||||
|
|
||||||
18 Jun 2013: Wouter
|
18 Jun 2013: Wouter
|
||||||
- Fix for const string literals in C++ for libunbound, from Karel
|
- Fix for const string literals in C++ for libunbound, from Karel
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue