Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig
@ 2020-03-26 13:56 Anthony PERARD
  2020-03-26 14:02 ` Andrew Cooper
  2020-03-26 14:48 ` Jan Beulich
  0 siblings, 2 replies; 4+ messages in thread
From: Anthony PERARD @ 2020-03-26 13:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Andrew Cooper,
	Ian Jackson, George Dunlap, Jan Beulich, Anthony PERARD

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).

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig
  2020-03-26 13:56 [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig Anthony PERARD
@ 2020-03-26 14:02 ` Andrew Cooper
  2020-03-26 14:16   ` Anthony PERARD
  2020-03-26 14:48 ` Jan Beulich
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2020-03-26 14:02 UTC (permalink / raw)
  To: Anthony PERARD, xen-devel
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Ian Jackson,
	George Dunlap, Jan Beulich

On 26/03/2020 13:56, Anthony PERARD wrote:
> 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).
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

I'd suggest s/upgrade/change/ in the subject.  When developing with two
different compilers, one half of the transitions will be a downgrade.

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig
  2020-03-26 14:02 ` Andrew Cooper
@ 2020-03-26 14:16   ` Anthony PERARD
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony PERARD @ 2020-03-26 14:16 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Ian Jackson,
	George Dunlap, Jan Beulich, xen-devel

On Thu, Mar 26, 2020 at 02:02:43PM +0000, Andrew Cooper wrote:
> On 26/03/2020 13:56, Anthony PERARD wrote:
> > 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

:-(, there's a typo here, the path should read
"include/config/auto.conf.cmd".

> > value).
> >
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> 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.

> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks,

-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig
  2020-03-26 13:56 [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig Anthony PERARD
  2020-03-26 14:02 ` Andrew Cooper
@ 2020-03-26 14:48 ` Jan Beulich
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2020-03-26 14:48 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Andrew Cooper,
	Ian Jackson, George Dunlap, xen-devel

On 26.03.2020 14:56, Anthony PERARD wrote:
> 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).
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Well, as said on the other thread, while this is a step forward,
it doesn't cover all relevant cases.

Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 13:56 [Xen-devel] [XEN PATCH] build: detect compiler upgrade to rerun kconfig Anthony PERARD
2020-03-26 14:02 ` Andrew Cooper
2020-03-26 14:16   ` Anthony PERARD
2020-03-26 14:48 ` Jan Beulich

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git