diff options
author | David Ostrovsky <david@ostrovsky.org> | 2012-11-03 21:06:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-11-23 23:42:39 +0000 |
commit | 47cf2c9441d2d73c8626ba42dcbad0331274cf43 (patch) | |
tree | 135ba482bc179330638e6fd688bb8113f2b33ca2 /configure.ac | |
parent | 80086a82883239cad5a6e667c8ff174623e190a2 (diff) |
restore --enable-symbols option
Currently there are 4 different debug options:
--enable-dbgutil (the recommended one)
--enable-debug
--enable-selective-debuginfo
--enable-symbols (for advanced users only)
In this table the properties of each option is shown:
----------------------------------------
options\properties | O | S | D | T | U |
----------------------------------------
production-code | x | - | - | - | - |
----------------------------------------
--enable-symbols | x | x | - | - | - |
----------------------------------------
--enable-debug | - | x | x | x | - |
----------------------------------------
--enable-dbgutil | - | x | x | x | x |
----------------------------------------
where
O: optimization
S: debug symbols
D: debug STL
T: trace facility
U: additional debug utility (object counting)
Note:
--enable-selective-debuginfo has the same properties as --enable-debug
Change-Id: Ib8a28c6162f47526d6bb33f81f53835cd11894b2
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index b9c4d16cde01..add46ca0c8be 100644 --- a/configure.ac +++ b/configure.ac @@ -757,12 +757,6 @@ AC_ARG_ENABLE(assert-always-abort, [make assert() abort even in release code.]), ,) -AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug], - [Include debugging information, disable compiler optimization and inlining plus - extra debugging code like assertions. Extra large build! (enables -g compiler flag - and dmake debug=true).])) - AC_ARG_ENABLE(dbgutil, AS_HELP_STRING([--enable-dbgutil], [Provide debugging support from --enable-debug and include additional debugging @@ -771,6 +765,12 @@ AC_ARG_ENABLE(dbgutil, Note that this makes the build ABI incompatible, it is not possible to mix object files or libraries from a --enable-dbgutil and a --disable-dbgutil build.])) +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Include debugging information, disable compiler optimization and inlining plus + extra debugging code like assertions. Extra large build! (enables -g compiler flag + and dmake debug=true).])) + AC_ARG_ENABLE(selective-debuginfo, AS_HELP_STRING([--enable-selective-debuginfo], [If --enable-debug or --enable-dbgutil is used, build debugging information @@ -780,6 +780,12 @@ AC_ARG_ENABLE(selective-debuginfo, more general, and disabling takes precedence). Example: --enable-selective-debuginfo="all -sw/ -Library_sc".])) +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.])) + AC_ARG_ENABLE(compiler-plugins, AS_HELP_STRING([--enable-compiler-plugins], [Enable compiler plugins that will perform additional checks during @@ -3351,6 +3357,27 @@ if test -n "$ENABLE_DEBUG"; then fi 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]) + fi + AC_MSG_RESULT([yes]) +else + if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then + ENABLE_SYMBOLS="FALSE" + else + ENABLE_SYMBOLS= + fi + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_SYMBOLS) + dnl Check for explicit C/CXX/OBJC/OBJCXX/LDFLAGS. We by default use the ones specified dnl by our build system, but explicit override is possible. AC_MSG_CHECKING(for explicit CFLAGS) |