configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 75450b3affc424cccfc68eae13a3271204108b09 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Wed Nov 17 11:43:00 2021 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Wed Nov 17 14:11:57 2021 +0100 disable split debug if --enable-lto https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88389 is right that split-debug doesn't make sense with LTO. Without -ffat-lto-objects or with Clang .o files aren't even really object files that would be normally usable. Since gcc complains if the combination is used, explicitly avoid it. Change-Id: I76992e94f4790238e5aaee691b5cec54fd0ef3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125379 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/configure.ac b/configure.ac index 1872faaafbd7..7ebeeaf6e62f 100644 --- a/configure.ac +++ b/configure.ac @@ -4557,8 +4557,16 @@ AC_SUBST(LD_GC_SECTIONS) HAVE_GSPLIT_DWARF= if test "$enable_split_debug" != no; then + use_split_debug= + if test -n "$ENABLE_LTO"; then + true # Inherently incompatible, since no debug info is created while compiling, GCC complains. + elif test "$enable_split_debug" = yes; then + use_split_debug=1 dnl Currently by default enabled only on Linux, feel free to set test_split_debug above also for other platforms. - if test "$enable_split_debug" = yes -o \( "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL" \); then + elif test "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then + use_split_debug=1 + fi + if test -n "$use_split_debug"; then AC_MSG_CHECKING([whether $CC_BASE supports -gsplit-dwarf]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -gsplit-dwarf" @@ -4574,7 +4582,7 @@ if test "$enable_split_debug" != no; then fi fi fi - if test -z "$HAVE_GCC_SPLIT_DWARF" -a "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then + if test -z "$HAVE_GCC_SPLIT_DWARF" -a "$test_split_debug" = "yes" -a -n "$use_split_debug"; then AC_MSG_WARN([Compiler is not capable of creating split debug info, linking will require more time and disk space.]) add_warning "Compiler is not capable of creating split debug info, linking will require more time and disk space." fi