From c677bf2c7d4c6b4390dcc5739aec55aecb0cd62e Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 26 Jan 2015 19:07:12 -0200 Subject: [PATCH] Revert "build: enable LTO and _FORTIFY_SOURCE with optimization" This reverts commit 27bcc9111b63e94d091c3fa47e81fe52b806cd3e. Let the distro decide about this flag. It's relatively recent and doesn't work well with gcc 4.[678] making the testsuite to fail. --- configure.ac | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 5948cf3..3dde5d9 100644 --- a/configure.ac +++ b/configure.ac @@ -226,19 +226,9 @@ CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\ -fvisibility=hidden \ -ffunction-sections \ -fdata-sections]) - -AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], - [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ - -flto -ffat-lto-objects])], - [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) - -AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], - [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ - -Wp,-D_FORTIFY_SOURCE=2])], - [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) - AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags") + CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [ \ -Wl,--as-needed \ -Wl,--no-undefined \ -- 2.7.4