summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-08 18:29:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-11 08:57:55 +0000
commit99db9f2295eb9a8b3288df9798a292b8d6e1b854 (patch)
treea38dd7e7d297275a856fe37db2eb663000cf5bff
parent436ee0989d1bc321886fac5a3507fc1d16650abd (diff)
Make --enable-symbols orthogonal to --enable-debug/-dbgutil
Change-Id: I523bc1d848e40489370eefe00046e0a257ed2505 Reviewed-on: https://gerrit.libreoffice.org/27058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--bridges/Library_cpp_uno.mk2
-rw-r--r--configure.ac22
-rw-r--r--external/icu/ExternalProject_icu.mk4
-rw-r--r--solenv/gbuild/LinkTarget.mk4
4 files changed, 17 insertions, 15 deletions
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 0293511e40b6..ebb8323bcfc3 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -236,7 +236,7 @@ bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
endif
endif
-bridges_DEBUGINFO_FLAGS := $(if $(filter-out 0,$(gb_DEBUGLEVEL))$(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
+bridges_DEBUGINFO_FLAGS := $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
$(eval $(call gb_Library_use_libraries,$(gb_CPPU_ENV)_uno,\
cppu \
diff --git a/configure.ac b/configure.ac
index 11bb4680446c..a91de785034a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1150,9 +1150,9 @@ AC_ARG_ENABLE(selective-debuginfo,
AC_ARG_ENABLE(symbols,
AS_HELP_STRING([--enable-symbols],
- [Include debugging symbols in output while preserve optimization.
- This enables -g compiler flag for GCC or equivalent,
- without changing anything else compared to productive code.]))
+ [Generate debug information.
+ By default, enabled for --enable-debug and --enable-dbgutil, disabled
+ otherwise.]))
AC_ARG_ENABLE(runtime-optimizations,
AS_HELP_STRING([--disable-runtime-optimizations],
@@ -4034,14 +4034,16 @@ AC_SUBST(ENABLE_DEBUGINFO_FOR)
dnl Check for enable symbols option
dnl ===================================================================
-AC_MSG_CHECKING([whether to include symbols while preserve optimization])
-if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
- ENABLE_SYMBOLS="TRUE"
- if test -n "$ENABLE_DBGUTIL"; then
- AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
- elif test -n "$ENABLE_DEBUG"; then
- AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
+AC_MSG_CHECKING([whether to generate debug information])
+if test -z "$enable_symbols"; then
+ if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+ enable_symbols=yes
+ else
+ enable_symbols=no
fi
+fi
+if test "$enable_symbols" != no; then
+ ENABLE_SYMBOLS=TRUE
AC_MSG_RESULT([yes])
else
ENABLE_SYMBOLS=
diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index 113e9d3377c4..b0578c4bc590 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -52,14 +52,14 @@ else # $(OS)
icu_CFLAGS:=" \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
- $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
+ $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
- $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
+ $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 7ddd82e189e5..4e2c2bff5b7c 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -44,8 +44,8 @@ gb_LinkTarget__debug_enabled = \
# debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
# in the list of libraries of ENABLE_DEBUGINFO_FOR
-gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)))
-gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)))
+gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
+gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
# similar for LDFLAGS, use linker optimization flags in non-debug case,
# but moreover strip debug from libraries for which debuginfo is not wanted