mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Changed -flto check to support clang compiler.
git-svn-id: file:///svn/unbound/trunk@2438 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
ff23baadcc
commit
4f68378640
4 changed files with 305 additions and 322 deletions
|
|
@ -2,7 +2,8 @@
|
||||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||||
# BSD licensed.
|
# BSD licensed.
|
||||||
#
|
#
|
||||||
# Version 11
|
# Version 12
|
||||||
|
# 2011-06-23 Add ACX_CHECK_FLTO to check -flto.
|
||||||
# 2010-08-16 Fix FLAG_OMITTED for AS_TR_CPP changes in autoconf-2.66.
|
# 2010-08-16 Fix FLAG_OMITTED for AS_TR_CPP changes in autoconf-2.66.
|
||||||
# 2010-07-02 Add check for ss_family (for minix).
|
# 2010-07-02 Add check for ss_family (for minix).
|
||||||
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
|
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
|
||||||
|
|
@ -32,6 +33,7 @@
|
||||||
# ACX_DETERMINE_EXT_FLAGS_UNBOUND - find out which flags enable BSD and POSIX.
|
# ACX_DETERMINE_EXT_FLAGS_UNBOUND - find out which flags enable BSD and POSIX.
|
||||||
# ACX_CHECK_FORMAT_ATTRIBUTE - find cc printf format syntax.
|
# ACX_CHECK_FORMAT_ATTRIBUTE - find cc printf format syntax.
|
||||||
# ACX_CHECK_UNUSED_ATTRIBUTE - find cc variable unused syntax.
|
# ACX_CHECK_UNUSED_ATTRIBUTE - find cc variable unused syntax.
|
||||||
|
# ACX_CHECK_FLTO - see if cc supports -flto and use it if so.
|
||||||
# ACX_LIBTOOL_C_ONLY - create libtool for C only, improved.
|
# ACX_LIBTOOL_C_ONLY - create libtool for C only, improved.
|
||||||
# ACX_TYPE_U_CHAR - u_char type.
|
# ACX_TYPE_U_CHAR - u_char type.
|
||||||
# ACX_TYPE_RLIM_T - rlim_t type.
|
# ACX_TYPE_RLIM_T - rlim_t type.
|
||||||
|
|
@ -383,6 +385,16 @@ int test() {
|
||||||
|
|
||||||
])dnl End of ACX_DETERMINE_EXT_FLAGS_UNBOUND
|
])dnl End of ACX_DETERMINE_EXT_FLAGS_UNBOUND
|
||||||
|
|
||||||
|
dnl Check if CC supports -flto.
|
||||||
|
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.
|
||||||
|
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)])
|
||||||
|
])
|
||||||
|
|
||||||
dnl Check the printf-format attribute (if any)
|
dnl Check the printf-format attribute (if any)
|
||||||
dnl result in HAVE_ATTR_FORMAT.
|
dnl result in HAVE_ATTR_FORMAT.
|
||||||
dnl Make sure you also include the AHX_CONFIG_FORMAT_ATTRIBUTE.
|
dnl Make sure you also include the AHX_CONFIG_FORMAT_ATTRIBUTE.
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ case "$debug_enabled" in
|
||||||
# nothing to do.
|
# nothing to do.
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
ACX_CHECK_COMPILER_FLAG(flto, [CFLAGS="$CFLAGS -flto"])
|
ACX_CHECK_FLTO
|
||||||
|
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
ACX_CHECK_FORMAT_ATTRIBUTE
|
ACX_CHECK_FORMAT_ATTRIBUTE
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
23 June 2011: Wouter
|
||||||
|
- Changed -flto check to support clang compiler.
|
||||||
|
|
||||||
17 June 2011: Wouter
|
17 June 2011: Wouter
|
||||||
- tag 1.4.11rc1 created.
|
- tag 1.4.11rc1 created.
|
||||||
- remove warning about signed/unsigned from flex (other flex version).
|
- remove warning about signed/unsigned from flex (other flex version).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue