diff options
author | Maria Matejka <mq@ucw.cz> | 2019-02-27 14:40:05 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-02-27 14:40:05 +0100 |
commit | a68442e0563f5b756f9a7323cea44a25ce048738 (patch) | |
tree | ff6d96f142e5f3b351fc39fb01128107b4190756 /aclocal.m4 | |
parent | f249d0b84c840242a084966999a1d228c603b431 (diff) |
Fixed link time optimizer check for FreeBSD
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -131,6 +131,30 @@ AC_DEFUN([BIRD_CHECK_ANDROID_LOG], ) ]) +AC_DEFUN([BIRD_CHECK_LTO], +[ + bird_tmp_cflags="$CFLAGS" + bird_tmp_ldflags="$CFLAGS" + CFLAGS="-flto" + LDFLAGS="-flto" + + AC_CACHE_CHECK( + [whether link time optimizer is available], + [bird_cv_c_lto], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM()], + [bird_cv_c_lto=yes], + [bird_cv_c_lto=no] + ) + ] + ) + + CFLAGS="$bird_tmp_cflags" + LDFLAGS="$bird_tmp_ldflags" +]) + + AC_DEFUN([BIRD_CHECK_GCC_OPTION], [ bird_tmp_cflags="$CFLAGS" |