[Libreoffice-commits] core.git: 2 commits - configure.ac
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 10:06:40 UTC 2019
configure.ac | 105 ++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 69 insertions(+), 36 deletions(-)
New commits:
commit aec51c7f99d6ad0028eebda0213a632b090f6fcf
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Dec 19 11:15:40 2018 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Feb 4 11:06:29 2019 +0100
make --enable-split-debug the default for debug builds, if available
Currently done only on Linux, as I'm unsure about the status on other platforms,
and it seems that on Darwin the test passes successfully but later there are
problems. Feel free to add your platform.
https://lists.freedesktop.org/archives/libreoffice/2018-June/080437.html
https://lists.freedesktop.org/archives/libreoffice/2018-July/080484.html
Change-Id: I232ead45a1aff15cc738c612750ac28aedc08e83
Reviewed-on: https://gerrit.libreoffice.org/65425
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/configure.ac b/configure.ac
index 45e4595ef08b..fff0cab68623 100644
--- a/configure.ac
+++ b/configure.ac
@@ -554,6 +554,7 @@ test_dbus=yes
test_fontconfig=yes
test_cairo=no
test_gdb_index=no
+test_split_debug=no
# Default values, as such probably valid just for Linux, set
# differently below just for Mac OSX, but at least better than
@@ -607,6 +608,7 @@ linux-gnu*|k*bsd*-gnu*)
test_kde5=yes
test_gtk3_kde5=yes
test_gdb_index=yes
+ test_split_debug=yes
if test "$enable_fuzzers" != yes; then
test_freetype=yes
test_fontconfig=yes
@@ -1130,9 +1132,9 @@ libo_FUZZ_ARG_ENABLE(debug,
extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
libo_FUZZ_ARG_ENABLE(split-debug,
- AS_HELP_STRING([--enable-split-debug],
- [Uses split debug information (-gsplit-dwarf compile flag). Saves disk space and build time,
- but requires tools that support it (both build tools and debuggers).]))
+ AS_HELP_STRING([--disable-split-debug],
+ [Disable using split debug information (-gsplit-dwarf compile flag). Split debug information
+ saves disk space and build time, but requires tools that support it (both build tools and debuggers).]))
libo_FUZZ_ARG_ENABLE(gdb-index,
AS_HELP_STRING([--disable-gdb-index],
@@ -3867,9 +3869,10 @@ else
fi
AC_SUBST(ENABLE_DEBUG)
-if test "$enable_split_debug" = yes; then
- HAVE_GSPLIT_DWARF=
- if test "$GCC" = "yes"; then
+HAVE_GSPLIT_DWARF=
+if test "$enable_split_debug" != no; then
+ 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
AC_MSG_CHECKING([whether $CC supports -gsplit-dwarf])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -gsplit-dwarf"
@@ -3878,11 +3881,19 @@ if test "$enable_split_debug" = yes; then
if test "$HAVE_GCC_SPLIT_DWARF" = "TRUE"; then
AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
+ if test "$enable_split_debug" = yes; then
+ AC_MSG_ERROR([no])
+ else
+ AC_MSG_RESULT([no])
+ fi
fi
fi
- AC_SUBST(HAVE_GCC_SPLIT_DWARF)
+ if test -z "$HAVE_GCC_SPLIT_DWARF" -a "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; 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
fi
+AC_SUBST(HAVE_GCC_SPLIT_DWARF)
ENABLE_GDB_INDEX=
if test "$enable_gdb_index" != "no"; then
commit bf63a95b981a9055e5c462cc85732629ce6b98b8
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Dec 19 11:05:54 2018 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Feb 4 11:06:18 2019 +0100
make --enable-gdb-index the default for debug builds, if supported
Currently only done on Linux, I'm not sure about the status on other platforms,
feel free to add your platform.
https://lists.freedesktop.org/archives/libreoffice/2018-June/080437.html
https://lists.freedesktop.org/archives/libreoffice/2018-July/080484.html
Change-Id: I5997f54e530c8078250eb7c116cb6bd2604e7925
Reviewed-on: https://gerrit.libreoffice.org/65424
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/configure.ac b/configure.ac
index f9149ebb9ddd..45e4595ef08b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -553,6 +553,7 @@ test_cups=yes
test_dbus=yes
test_fontconfig=yes
test_cairo=no
+test_gdb_index=no
# Default values, as such probably valid just for Linux, set
# differently below just for Mac OSX, but at least better than
@@ -605,6 +606,7 @@ linux-gnu*|k*bsd*-gnu*)
build_gstreamer_0_10=yes
test_kde5=yes
test_gtk3_kde5=yes
+ test_gdb_index=yes
if test "$enable_fuzzers" != yes; then
test_freetype=yes
test_fontconfig=yes
@@ -1133,9 +1135,9 @@ libo_FUZZ_ARG_ENABLE(split-debug,
but requires tools that support it (both build tools and debuggers).]))
libo_FUZZ_ARG_ENABLE(gdb-index,
- AS_HELP_STRING([--enable-gdb-index],
- [Creates debug information in the gdb index format, which makes gdb start faster.
- Requires the gold or lld linker.]))
+ AS_HELP_STRING([--disable-gdb-index],
+ [Disables creating debug information in the gdb index format, which makes gdb start faster.
+ The feature requires the gold or lld linker.]))
libo_FUZZ_ARG_ENABLE(sal-log,
AS_HELP_STRING([--enable-sal-log],
@@ -3180,31 +3182,6 @@ printf ("hello world\n");
fi
AC_SUBST(USE_LD)
-ENABLE_GDB_INDEX=
-if test "$enable_gdb_index" = "yes"; then
- AC_MSG_CHECKING([whether $CC supports -ggnu-pubnames])
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror -ggnu-pubnames"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ AC_MSG_RESULT( yes )],[ AC_MSG_ERROR( no )])
-
- AC_MSG_CHECKING([whether $CC supports -Wl,--gdb-index])
- ldflags_save=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,--gdb-index"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
-#include <stdio.h>
- ],[
-printf ("hello world\n");
- ])], ENABLE_GDB_INDEX=TRUE, [])
- if test "$ENABLE_GDB_INDEX" = "TRUE"; then
- AC_MSG_RESULT( yes )
- else
- AC_MSG_ERROR( no )
- fi
- CFLAGS=$save_CFLAGS
- LDFLAGS=$ldflags_save
-fi
-AC_SUBST(ENABLE_GDB_INDEX)
-
HAVE_LD_BSYMBOLIC_FUNCTIONS=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([for -Bsymbolic-functions linker support])
@@ -3907,6 +3884,51 @@ if test "$enable_split_debug" = yes; then
AC_SUBST(HAVE_GCC_SPLIT_DWARF)
fi
+ENABLE_GDB_INDEX=
+if test "$enable_gdb_index" != "no"; then
+ dnl Currently by default enabled only on Linux, feel free to set test_gdb_index above also for other platforms.
+ if test "$enable_gdb_index" = yes -o \( "$test_gdb_index" = "yes" -o -n "$ENABLE_DEBUG$ENABLE_DBGUTIL" \); then
+ AC_MSG_CHECKING([whether $CC supports -ggnu-pubnames])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Werror -ggnu-pubnames"
+ have_ggnu_pubnames=
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[have_ggnu_pubnames=TRUE],[have_ggnu_pubnames=])
+ if test "$have_ggnu_pubnames" != "TRUE"; then
+ if test "$enable_gdb_index" = "yes"; then
+ AC_MSG_ERROR( no, --enable-gdb-index not supported )
+ else
+ AC_MSG_RESULT( no )
+ fi
+ else
+ AC_MSG_RESULT( yes )
+ AC_MSG_CHECKING([whether $CC supports -Wl,--gdb-index])
+ ldflags_save=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,--gdb-index"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+ ],[
+printf ("hello world\n");
+ ])], ENABLE_GDB_INDEX=TRUE, [])
+ if test "$ENABLE_GDB_INDEX" = "TRUE"; then
+ AC_MSG_RESULT( yes )
+ else
+ if test "$enable_gdb_index" = "yes"; then
+ AC_MSG_ERROR( no )
+ else
+ AC_MSG_RESULT( no )
+ fi
+ fi
+ LDFLAGS=$ldflags_save
+ fi
+ CFLAGS=$save_CFLAGS
+ fi
+ if test -z "$ENABLE_GDB_INDEX" -a "$test_gdb_index" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+ AC_MSG_WARN([Linker is not capable of creating gdb index, debugger startup will be slow.])
+ add_warning "Linker is not capable of creating gdb index, debugger startup will be slow."
+ fi
+fi
+AC_SUBST(ENABLE_GDB_INDEX)
+
if test "$enable_sal_log" = yes; then
ENABLE_SAL_LOG=TRUE
fi
More information about the Libreoffice-commits
mailing list