build: detect compiler upgrade to rerun kconfig
PATCH 1/1 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 value).
--- xen/Kconfig | 2 ++ xen/Makefile | 4 ++++ 2 files changed, 6 insertions(+)
xen/Kconfig +2 -0
@@ -4,6 +4,8 @@ # mainmenu "Xen/$(SRCARCH) $(XEN_FULLVERSION) Configuration" +comment "Compiler: $(CC_VERSION_TEXT)" + source "scripts/Kconfig.include" config BROKEN
xen/Makefile +4 -0
@@ -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))
Signature · 1 line
Anthony PERARD
Quoted 6 lines · Anthony PERARD
This simple comment allows to detect when $(CC) changes version.
Kconfigwill be rerun in this case. (Rerun is forced byinclude/config.auto.cmdwhich detects changes ofCC_VERSION_TEXTvalue).Signed-off-by Anthony PERARD <[email protected]>
I'd suggest s/upgrade/change/ in the subject. When developing with two different compilers, one half of the transitions will be a downgrade.
Quoted 4 lines · Andrew Cooper
Quoted 3 lines · Anthony PERARD
This simple comment allows to detect when $(CC) changes version.
Kconfigwill be rerun in this case. (Rerun is forced byinclude/config.auto.cmdwhich detects changes ofCC_VERSION_TEXT
:-(, there's a typo here, the path should read
"include/config/auto.conf.cmd".
Quoted 6 lines
Quoted 3 lines
value).
Signed-off-by Anthony PERARD <[email protected]>I'd suggest s/upgrade/change/ in the subject. When developing with two different compilers, one half of the transitions will be a downgrade.
Change of $(CC) is already been taken care of ;-). "upgrade" is what Linux choose to call it but "change" might be ok too.
Quoted 1 line
Acked-by Andrew Cooper <[email protected]>
Thanks,
Signature · 1 line
Anthony PERARD
Quoted 6 lines · Anthony PERARD
This simple comment allows to detect when $(CC) changes version.
Kconfigwill be rerun in this case. (Rerun is forced byinclude/config.auto.cmdwhich detects changes ofCC_VERSION_TEXTvalue).Signed-off-by Anthony PERARD <[email protected]>
Well, as said on the other thread, while this is a step forward, it doesn't cover all relevant cases.
Jan