mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
test flto for clang (test #2)
git-svn-id: file:///svn/unbound/trunk@3585 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
72f13cb3df
commit
7489a2c31e
2 changed files with 4 additions and 6 deletions
|
|
@ -421,13 +421,12 @@ AC_DEFUN([ACX_CHECK_FLTO], [
|
|||
AS_IF([test "x$enable_flto" != "xno"], [
|
||||
AC_MSG_CHECKING([if $CC supports -flto])
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -flto -Werror"
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
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 -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
rm -f conftest conftest.c conftest.o
|
||||
|
|
|
|||
5
configure
vendored
5
configure
vendored
|
|
@ -5859,7 +5859,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
|
||||
$as_echo_n "checking if $CC supports -flto... " >&6; }
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -flto -Werror"
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
|
@ -5873,12 +5873,11 @@ main ()
|
|||
_ACEOF
|
||||
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 -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
else
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue