Revert "build: enable LTO and _FORTIFY_SOURCE with optimization"

This reverts commit 27bcc9111b.

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.
This commit is contained in:
Lucas De Marchi 2015-01-26 19:07:12 -02:00
parent 01f9bc6dee
commit c677bf2c7d

View File

@ -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 \