summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-02-26 16:11:40 +0100
committerMaria Matejka <mq@ucw.cz>2019-02-26 16:11:40 +0100
commit0d12aa48363802e751d3b9a4afd6eb090592d7a3 (patch)
treecb5c70e9398d53b88cd15bb8e9fa29d79deff269
parent2915e711f77d68dff756babd19af8da1677c4549 (diff)
Build: No link time optimization when debug is enabled
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6b5fc233..7013a34e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,14 +137,18 @@ if test "$bird_cflags_default" = yes ; then
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_missing_init], [-Wno-missing-field-initializers], [-Wall -Wextra])
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_fno_strict_aliasing], [-fno-strict-aliasing])
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_fno_strict_overflow], [-fno-strict-overflow])
- BIRD_CHECK_GCC_OPTION([bird_cv_c_option_flto], [-flto])
+ if test "$enable_debug" = no; then
+ BIRD_CHECK_GCC_OPTION([bird_cv_c_option_flto], [-flto])
+ fi
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wno-parentheses"
BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_pointer_sign], [-Wno-pointer-sign])
BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_missing_init], [-Wno-missing-field-initializers])
BIRD_ADD_GCC_OPTION([bird_cv_c_option_fno_strict_aliasing], [-fno-strict-aliasing])
BIRD_ADD_GCC_OPTION([bird_cv_c_option_fno_strict_overflow], [-fno-strict-overflow])
- BIRD_ADD_GCC_OPTION([bird_cv_c_option_flto], [-flto])
+ if test "$enable_debug" = no; then
+ BIRD_ADD_GCC_OPTION([bird_cv_c_option_flto], [-flto])
+ fi
fi
AC_MSG_CHECKING([CFLAGS])
AC_MSG_RESULT([$CFLAGS])