diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-05-07 20:58:44 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-08 11:30:25 +0200 |
commit | c8fa9bd8849f0503b3803465e8ce119581e11e33 (patch) | |
tree | 610b39465070109f7b6c6515349ed0f651e9a105 /configure.in | |
parent | ae17a1966d58faaa7350a85f7e91f16ee3fd1fb5 (diff) |
dis-entangle --enable-symbols and --enable-debug:
OOo used to use debug level this way:
0 is default for product build
1 for --enable-dbgutil
2 for environment variable debug=t, regardless of dbgutil setting
in LO these have now morphed into:
0 is default for product build
1 for environment variable debug=t
2 for --enable-dbgutil (at some intermediate stage in the past)
1 for --enable-dbgutil (today)
This has caused a lot of confusion and some things were not converted
properly, including a check in LinkTarget.mk.
Developers should use --enable-debug to get useful information,
including full debug info and assertions.
--enable-symbols is not intended for developers, but for people
who need their builds to be able to produce useful stack traces;
--enable-symbols is for example set unconditionally in the Fedora RPM
spec, and for this purpose disabling of inlining is not wanted.
It is unlikely that somebody wants symbols for only part of the build,
and consequently a different mechanism is used to set the corresponding
flags: they are set into global gb_LinkTarget_C{,XX}FLAGS.
So move the selective symbol feature back to --enable-debug.
(this substantially reverts db8df57acd601ed084bd0122683e1bd066a4f143)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/configure.in b/configure.in index 43a6544b1eae..750899b8fd99 100644 --- a/configure.in +++ b/configure.in @@ -610,12 +610,8 @@ AC_ARG_ENABLE(atl, AC_ARG_ENABLE(symbols, AS_HELP_STRING([--enable-symbols], [Include debugging symbols in output. WARNING - a complete build needs - a lot of space (roughly 10 GiB) and takes much longer (enables -g compiler flag). - You can also use this switch as follows: - --enable-symbols="all -sw/ -Library_sc" to enable symbols only for - the specified gbuild-build targets (all means everything, - prepended - means not to enable, / appended means everything in the directory, - there is no ordering and removal disabling takes precedence).]), + a lot of space (roughly 10 GiB) and takes much longer (enables -g + compiler flag for GCC or equivalent).]), ,) AC_ARG_ENABLE(werror, @@ -626,15 +622,25 @@ AC_ARG_ENABLE(werror, AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], - [Include debugging symbols from --enable-symbols plus extra debugging - code. Extra large build! (enables -g compiler flag and dmake debug=true) + [Include debugging symbols like with --enable-symbols, disable compiler + optimization and inlining plus extra debugging code like assertions. + Extra large build! (enables -g compiler flag and dmake debug=true) If you need even more verbose output, build a module with - "build -- debug=true dbglevel=2".])) + "build -- debug=true dbglevel=2". + You can also use this switch as follows: + --enable-debug="all -sw/ -Library_sc" to enable symbols only for + the specified gbuild-build targets (all means everything, - prepended + means not to enable, / appended means everything in the directory, + there is no ordering, more specific overrides more general, and + disabling takes precedence).])) AC_ARG_ENABLE(dbgutil, AS_HELP_STRING([--enable-dbgutil], [Include additional debugging utilities, such as assertions, object - counting, etc. Larger build. Independent from --enable-debug])) + counting, etc. Larger build. Independent from --enable-debug. + Note that this option makes the build ABI incompatible: + It is not possible to mix object files or libraries from a + --enable-dgbutil and a --disalbe-dbgutil build.])) AC_ARG_ENABLE(linkoo, AS_HELP_STRING([--disable-linkoo], @@ -3529,13 +3535,23 @@ dnl Set the ENABLE_DEBUG variable. dnl =================================================================== AC_MSG_CHECKING([whether to do a debug build]) if test -n "$enable_debug" && test "$enable_debug" != "no"; then - ENABLE_DEBUG="TRUE" + if test "$enable_debug" = "y" || test "$enable_debug" = "yes"; then + ENABLE_DEBUG="TRUE" + ENABLE_DEBUG_FOR=all + AC_MSG_RESULT([yes]) + else + ENABLE_DEBUG="" + ENABLE_DEBUG_FOR="$enable_debug" + AC_MSG_RESULT([for $enable_debug]) + fi AC_MSG_RESULT([yes]) else ENABLE_DEBUG="" + ENABLE_DEBUG_FOR="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DEBUG) +AC_SUBST(ENABLE_DEBUG_FOR) dnl Determine whether to use linkoo for the smoketest installation @@ -3567,20 +3583,12 @@ dnl =================================================================== AC_MSG_CHECKING([whether to include symbols]) if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then ENABLE_SYMBOLS="TRUE" - if test "$enable_symbols" = "y" || test "$enable_symbols" = "yes"; then - ENABLE_SYMBOLS_FOR=all - AC_MSG_RESULT([yes]) - else - ENABLE_SYMBOLS_FOR="$enable_symbols" - AC_MSG_RESULT([for $enable_symbols]) - fi + AC_MSG_RESULT([yes]) else ENABLE_SYMBOLS= - ENABLE_SYMBOLS_FOR= AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_SYMBOLS) -AC_SUBST(ENABLE_SYMBOLS_FOR) if test "$enable_headless" = "yes"; then # be sure to do not mess with uneeded stuff |