Skip to contentSkip to conversation

tools: Honor Config.mk debug value, rather than setting our own

PATCH In review George Dunlap 4 participants 7 messages Sep 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: Honor Config.mk debug value, rather than setting our own

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

---

This is functionally a regression in 4.6, and so should be considered for inclusion in 4.6.

CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>
CC Roger Pau Monne <[email protected]>
CC Euan Harris <[email protected]>
---
 tools/configure    | 26 --------------------------
 tools/configure.ac |  1 -
 2 files changed, 27 deletions(-)
tools/configure +0 -26
index 428b3a5..884ce0a 100755
@@ -707,7 +707,6 @@ rombios
 qemu_traditional
 blktap2
 LINUX_BACKEND_MODULES
-debug
 seabios
 ovmf
 xsmpolicy
@@ -798,7 +797,6 @@ enable_ocamltools
 enable_xsmpolicy
 enable_ovmf
 enable_seabios
-enable_debug
 with_linux_backend_modules
 enable_blktap2
 enable_qemu_traditional
@@ -1473,7 +1471,6 @@ Optional Features:
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
-  --disable-debug         Disable debug build of tools (default is ENABLED)
   --enable-blktap2        Enable blktap2, (DEFAULT is on for Linux, otherwise
                           off)
   --enable-qemu-traditional
@@ -4114,29 +4111,6 @@ seabios=$ax_cv_seabios
 
 
 
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug;
-fi
-
-
-if test "x$enable_debug" = "xno"; then :
-
-    ax_cv_debug="n"
-
-elif test "x$enable_debug" = "xyes"; then :
-
-    ax_cv_debug="y"
-
-elif test -z $ax_cv_debug; then :
-
-    ax_cv_debug="y"
-
-fi
-debug=$ax_cv_debug
-
-
-
 
 # Check whether --with-linux-backend-modules was given.
 if test "${with_linux_backend_modules+set}" = set; then :
tools/configure.ac +0 -1
index 7daec99..6c70040 100644
@@ -83,7 +83,6 @@ AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
-AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
 
 AC_ARG_WITH([linux-backend-modules],
     AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"],
Signature · 1 line
1.9.1
#1 lore raw
Quoted 9 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

Quoted 6 lines

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

Having debug enabled for tools by default for releases is arguably a bug for previous releases as well, so I think this should be considered for backport if this solution is acceptable.

-George

Acked-by on v1 1/1
#2 lore raw
In reply to George Dunlap
Quoted 9 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

Quoted 6 lines

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

Quoted 89 lines

---

This is functionally a regression in 4.6, and so should be considered for inclusion in 4.6.

CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>
CC Roger Pau Monne <[email protected]>
CC Euan Harris <[email protected]>
---
 tools/configure    | 26 --------------------------
 tools/configure.ac |  1 -
 2 files changed, 27 deletions(-)
tools/configure +0 -3
index 428b3a5..884ce0a 100755
@@ -707,7 +707,6 @@ rombios
 qemu_traditional
 blktap2
 LINUX_BACKEND_MODULES
-debug
 seabios
 ovmf
 xsmpolicy
@@ -798,7 +797,6 @@ enable_ocamltools
 enable_xsmpolicy
 enable_ovmf
 enable_seabios
-enable_debug
 with_linux_backend_modules
 enable_blktap2
 enable_qemu_traditional
@@ -1473,7 +1471,6 @@ Optional Features:
   --disable-xsmpolicy     Disable XSM policy compilation (default is 
 ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
-  --disable-debug         Disable debug build of tools (default is 
 ENABLED)
   --enable-blktap2        Enable blktap2, (DEFAULT is on for Linux, 

otherwise
off)
--enable-qemu-traditional

tools/configure +0 -23
@@ -4114,29 +4111,6 @@ seabios=$ax_cv_seabios
 
 
 
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug;
-fi
-
-
-if test "x$enable_debug" = "xno"; then :
-
-    ax_cv_debug="n"
-
-elif test "x$enable_debug" = "xyes"; then :
-
-    ax_cv_debug="y"
-
-elif test -z $ax_cv_debug; then :
-
-    ax_cv_debug="y"
-
-fi
-debug=$ax_cv_debug
-
-
-
 
 # Check whether --with-linux-backend-modules was given.
 if test "${with_linux_backend_modules+set}" = set; then :
tools/configure.ac +0 -1
index 7daec99..6c70040 100644
@@ -83,7 +83,6 @@ AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml 
 tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
-AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
 
 AC_ARG_WITH([linux-backend-modules],
     AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"],
Acked-by on v1 1/1
#3 lore raw
In reply to George Dunlap
Quoted 9 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

Quoted 6 lines

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

#4 lore raw
Quoted 10 lines · Wei Liu
Quoted 9 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

Quoted 8 lines
Quoted 6 lines

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

Release-ack too?

#5 lore raw
Quoted 16 lines · Ian Campbell
Quoted 15 lines · Wei Liu
Quoted 14 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add macro debugging information') exposed a bug whereby the autoconf stuff in tools was setting its own debug value (defaulting to ENABLED, even for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build will fail (because debug builds default to on).

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles. So simply remove the tools/configure debug option and everything falls into place naturally.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Release-ack too?

#6 lore raw
Quoted 22 lines · Wei Liu
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Wei Liu
Quoted 19 lines · George Dunlap

Changeset 1166ecf ('tools/Rules.mk: Don't optimize debug builds; add
macro debugging information') exposed a bug whereby the autoconf stuff
in tools was setting its own debug value (defaulting to ENABLED, even
for releases) instead of honoring the value set in Config.mk.

After that changeset, if the global build has -D_FORTIFY_SOURCE enabled (as is the default in CentOS 7 rpmbuild), then the tools build
will fail (because debug builds default to on).

There should be only one place to specify whether to build debug or not, and Config.mk is already included by the relevant makefiles.
So
simply remove the tools/configure debug option and everything falls into place naturally.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Release-ack too?

Thx, applied.