Regression: debug not setted correctly in config/Tools.mk of xen 4.6
In latest weeks building xen 4.6 with debug enable qemu trace was missed, today building xen 4.6.0 I found the cause. Even if debug ?= y in Config.mk, config/Tools.mk is not generate correctly, have this line:
debug := @debug@
I not found the exact cause for doing the patch that fix it, can someone help me please?
If can be useful, in my installation I change these 2 line in Config.mk (enable debug and fix python prefix, if I remember good pygrub on debian was not working without):
debug ?= yPYTHON_PREFIX_ARG ?=
configure options used:
./configure --prefix=/usr --disable-blktap1 --disable-qemu-traditional --disable-rombios --with-system-seabios=/usr/share/seabios/bios-256k.bin --with-extra-qemuu-configure-args="--enable-spice --enable-usb-redir" --disable-blktap2 -enable-systemd in attachment the full Tools.mk generated.
Thanks for any reply and sorry for my bad english.
-include $(XEN_ROOT)/config/Paths.mk
CONFIG_RUMP := n
ifeq ($(CONFIG_RUMP),y)XEN_OS := NetBSDRump
endif
# A debug build of tools?
debug := @debug@
# Tools path
BISON := FLEX := PYTHON := python PYTHON_PATH := /usr/bin/python PY_NOOPT_CFLAGS := -O1 PERL := /usr/bin/perl CURL_CONFIG := XML2_CONFIG := BASH := /bin/bash XGETTTEXT := /usr/bin/xgettext AS86 := /usr/bin/as86 LD86 := /usr/bin/ld86 BCC := /usr/bin/bcc IASL := /usr/bin/iasl AWK := /usr/bin/awk FETCHER := /usr/bin/wget -c -O SEABIOS_PATH := /usr/share/seabios/bios-256k.bin OVMF_PATH :=
# Extra folder for libs/includes
PREPEND_INCLUDES := PREPEND_LIB := APPEND_INCLUDES := APPEND_LIB :=
PTHREAD_CFLAGS := -pthread PTHREAD_LDFLAGS := -pthread PTHREAD_LIBS :=
PTYFUNCS_LIBS := -lutil
LIBNL3_LIBS := LIBNL3_CFLAGS := XEN_TOOLS_RPATH := n
# Download GIT repositories via HTTP or GIT's own protocol?
# GIT's protocol is faster and more robust, when it works at all (firewalls
# may block it). We make it the default, but if your GIT repository downloads # fail or hang, please specify GIT_HTTP=y in your environment. GIT_HTTP := n
# Optional components
XENSTAT_XENTOP := y OCAML_TOOLS := n FLASK_POLICY := n CONFIG_OVMF := n CONFIG_ROMBIOS := n CONFIG_SEABIOS := y CONFIG_QEMU_TRAD := n CONFIG_QEMU_XEN := y CONFIG_BLKTAP2 := n
CONFIG_QEMUU_EXTRA_ARGS:= --enable-spice --enable-usb-redir CONFIG_REMUS_NETBUF := n
CONFIG_SYSTEMD := y SYSTEMD_CFLAGS := SYSTEMD_LIBS := -lsystemd XEN_SYSTEMD_DIR := $(prefix)/lib/systemd/system/
XEN_SYSTEMD_MODULES_LOAD := $(prefix)/lib/modules-load.d/
LINUX_BACKEND_MODULES := xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback evtchn gntdev netbk blkbk xen-scsibk usbbk pciback xen-acpi-processor blktap2
#System options
ZLIB := -DHAVE_LZMA -llzma CONFIG_LIBICONV := n CONFIG_GCRYPT := n EXTFS_LIBS := -lext2fs CURSES_LIBS := -lncurses TINFO_LIBS := -ltinfo ARGP_LDFLAGS :=
FILE_OFFSET_BITS :=
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Fabio Fantoni
In latest weeks building xen 4.6 with debug enable qemu trace was missed, today building xen 4.6.0 I found the cause.
Even if debug ?= y in Config.mk,config/Tools.mkis not generate correctly, have this line:
debug := @debug@I not found the exact cause for doing the patch that fix it, can someone help me please?
commit 16181cbb107ea70a72f41982b371c444926f48f2
Author: George Dunlap <[email protected]> Date: Wed Sep 2 10:34:55 2015 +0100
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.
With that change the debug value in Tools.mk.in is not useful anymore -- at least that was the intent.
However the unforeseen consequence is that tools/Makefile includes config/Tools.mk, so the statement "debug := @debug@" shadows the one set in Config.mk. That means we can't ever get a debug build of tools anymore.
I will post a patch to fix that.
Wei.