mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
The debug option in Config.mk affects hypervisor, tools and stubdom by appending different flags to CFLAGS. Mini-os under extra is not affected because it already has its own build system when it is separated from xen.git. It is undesirable because now hypervisor build is affected by both Kconfig and debug. Disentangle the semantics of debug by pushing relevant options to individual sub-systems. For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG. For tools, flags are moved from config/*.mk into tools/Rules.mk. For stubdom, because it unilaterally sets debug=y before including top-level Config.mk, we only need to move the debug build set of flags into stubdom Makefile. Specifically there are some considerations on what flags are picked: 1. we don't need -fno-optimize-sibling-calls anymore because gcc doc indicates that it is not enabled for -O1, which we already set in the debug build. 2. for tools we use -O0 -g3 in Rules.mk because they already take precedence over the flags set in config/*.mk. 3. for hypervisor we don't add -fno-omit-frame-pointer to debug build because that's controlled by CONFIG_FRAME_POINTER. This patch doesn't intend to tune those flags, but to provide identical set of effective flags as before. The debug option in Config.mk will only affect tools components after this patch is applied. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com>