From: Wouter Wijngaards Date: Tue, 1 Nov 2011 13:39:38 +0000 (+0000) Subject: - fix -flto detection on Lion for llvm-gcc. X-Git-Tag: release-1.4.14rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939c103a736e879519a1d4de4dc2848ba7c464a8;p=thirdparty%2Funbound.git - fix -flto detection on Lion for llvm-gcc. git-svn-id: file:///svn/unbound/trunk@2537 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index c319a2bc9..0690d9902 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -2,7 +2,8 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 14 +# Version 15 +# 2011-11-01 Fix FLTO test for llvm on Lion. # 2011-08-01 Fix nonblock test (broken at v13). # 2011-08-01 Fix autoconf 2.68 warnings # 2011-06-23 Add ACX_CHECK_FLTO to check -flto. @@ -394,7 +395,14 @@ AC_DEFUN([ACX_CHECK_FLTO], [AC_MSG_CHECKING([if $CC supports -flto]) BAKCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -flto" -AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [AC_MSG_RESULT(yes)], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + CFLAGS="$BAKCFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi +], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)]) ]) dnl Check the printf-format attribute (if any) diff --git a/doc/Changelog b/doc/Changelog index 9ea409a04..eb8be376b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,7 @@ - documentation for new options: ssl-upstream, ssl-service-key and ssl-service.pem. - iana portlist updated. + - fix -flto detection on Lion for llvm-gcc. 31 October 2011: Wouter - dns over ssl support, ssl-service-pem and ssl-service-key files