From: Theodore Ts'o Date: Thu, 9 Aug 2018 02:16:07 +0000 (-0400) Subject: Fix LTO builds so debugging information is preserved X-Git-Tag: v1.45.0~52 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=49715704499ad3c3fed48e304c016c07f124bde6;p=tools%2Fe2fsprogs.git Fix LTO builds so debugging information is preserved Signed-off-by: Theodore Ts'o --- diff --git a/configure b/configure index 1493e15..f5092e3 100755 --- a/configure +++ b/configure @@ -13763,7 +13763,7 @@ if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then $as_echo_n "checking if C compiler supports LTO... " >&6; } OLD_CFLAGS="$CFLAGS" OLD_LDFLAGS="$LDFLAGS" - LTO_FLAGS="-flto -ffat-lto-objects" + LTO_FLAGS="-g -flto -ffat-lto-objects" CFLAGS="$CFLAGS $LTO_FLAGS" LDFLAGS="$LDFLAGS $LTO_FLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.ac b/configure.ac index fe717d0..54bd1fe 100644 --- a/configure.ac +++ b/configure.ac @@ -1305,7 +1305,7 @@ if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then AC_MSG_CHECKING([if C compiler supports LTO]) OLD_CFLAGS="$CFLAGS" OLD_LDFLAGS="$LDFLAGS" - LTO_FLAGS="-flto -ffat-lto-objects" + LTO_FLAGS="-g -flto -ffat-lto-objects" CFLAGS="$CFLAGS $LTO_FLAGS" LDFLAGS="$LDFLAGS $LTO_FLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([])],