[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH v2] build: detect compiler change to rerun kconfig
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Mon, 20 Mar 2023 15:28:36 +0000
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 20 Mar 2023 15:29:04 +0000
- Ironport-data: A9a23:D9MMD6/XEOA4d4p+Fq4IDrUD9n6TJUtcMsCJ2f8bNWPcYEJGY0x3z GAbXGGGaP7ZZTeke99+atm28R8HvsfVmNdlS1E4qyk8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kI/1BjOkGlA5AdmPqka5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklkx NlDFT5XYyqquNi8xJGJaMJJjfwKeZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGOkcUUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0Mxh7J/ D2coT+R7hcyF4CY5hHYwmmVvczTnhH0BNgAEqSXz6s/6LGU7jNKU0BHPbehmtGph0j7V99BJ kg8/is1sbN05EGtVsP6XRCzvDiDpBF0c9haHvA+6QqN4rHJ+AvfDW8BJhZDddgnuckeVTEsk FiTkLvBHidzubeYTXac8La8rj6oPyURa2gYakcsUg8t89Tl5oYpgXryos1LSfDvyIevQHepn m7M9XJl71kOsSIV/4+K2Av6jWihnLH2dAQxxTf1dUeu1iosMeZJeLeUBUjnAedoddjGHwHb4 SBby6By/8hVU8jTyXXlrPElWejwuq3baGC0bUtHRcFJyti7x5K0kWm8ChlaLVwhDMsLcCSBj KT76VIIv8870JdHgMZKj2ON5ycCl/KI+SzNDKy8Uza3SsEZmPW7ENxGPxbMjwgBb3TAYYlgY MzGIK5A/F4RCLh9zSreetrxJYQDn3hkrUuKHMCT8vhS+ebGDJJjYetfYQTmgyFQxP/snTg5B P4FZpHSlUoECL2Wj+u+2dd7EG3m5EMTXfjew/G7vMbZSua6MAnN08Ps/I4=
- Ironport-hdrordr: A9a23:5074h6svGN0yGkpRxdCusWP77skDddV00zEX/kB9WHVpmwKj5q eTdZUgpHnJYVMqMk3I9urwW5VoLUm9yXcX2+gs1NWZLWvbUQKTRekI0WKI+UyEJ8SRzJ846U 6iScRD4R/LYGSSQfyU3OBwKbgd/OU=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This simple comment allows to detect when $(CC) changes version.
Kconfig will be rerun in this case. (Rerun is forced by
include/config/auto.conf.cmd which detects changes of CC_VERSION_TEXT
value).
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
Technically, it was acked by Andrew:
https://lore.kernel.org/xen-devel/20200326135621.687685-1-anthony.perard@xxxxxxxxxx/t/#ma1171775b9938bcdffc80b2fcb8d2a883cd3e32a
v2:
- s/upgrade/change/ in subject and in the comment in the Makefile
- Fix path in commit description
---
xen/Kconfig | 2 ++
xen/Makefile | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/xen/Kconfig b/xen/Kconfig
index 134e6e68ad..756c7842e9 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 2710d7327e..12c6891a79 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -326,6 +326,10 @@ ifdef building_out_of_srctree
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
endif
+# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
+# and from include/config/auto.conf.cmd to detect the compiler change.
+export CC_VERSION_TEXT := $(shell $(CC) --version 2>/dev/null | head -n 1)
+
ifeq ($(config-build),y)
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
--
Anthony PERARD
|