[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig

This simple comment allows to detect when $(CC) changes version.
Kconfig will be rerun in this case. (Rerun is forced by
include/config.auto.cmd which detects changes of CC_VERSION_TEXT

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
 xen/Kconfig  | 2 ++
 xen/Makefile | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/xen/Kconfig b/xen/Kconfig
index 073042f46730..4ffa2f90a267 100644
--- a/xen/Kconfig
+++ b/xen/Kconfig
@@ -4,6 +4,8 @@
 mainmenu "Xen/$(SRCARCH) $(XEN_FULLVERSION) Configuration"
+comment "Compiler: $(CC_VERSION_TEXT)"
 source "scripts/Kconfig.include"
 config BROKEN
diff --git a/xen/Makefile b/xen/Makefile
index e5f7b1ae13bc..6dadb3afc119 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -277,6 +277,10 @@ $(foreach base,arch/x86/mm/guest_walk_% \
                arch/x86/mm/shadow/guest_%, \
     $(foreach ext,o i s,$(call build-intermediate,$(base).$(ext))))
+# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
+# and from include/config/auto.conf.cmd to detect the compiler upgrade.
+export CC_VERSION_TEXT := $(shell $(CC) --version 2>/dev/null | head -n 1)
 kconfig := oldconfig config menuconfig defconfig allyesconfig allnoconfig \
        nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig \
        randconfig $(notdir $(wildcard arch/$(SRCARCH)/configs/*_defconfig))
Anthony PERARD



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.