config: don't hardcode toolchain binaries
PATCH 1/1 config: don't hardcode toolchain binaries
Currently the names of the build toolchain binaries are hardcoded in StdGNU.mk, and the values from the environment are ignored.
Switch StdGNU.mk to use '?=' instead of '=', so that values from the environment are used if present, else default to the values provided by the config file.
This change fixes the gitlab CI loop, that was relying on passing custom values in the environment variables for the compiler and the linker.
---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
--- config/StdGNU.mk | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
config/StdGNU.mk +17 -17
@@ -1,27 +1,27 @@ -AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld +AS ?= $(CROSS_COMPILE)as +LD ?= $(CROSS_COMPILE)ld ifeq ($(clang),y) -CC = $(CROSS_COMPILE)clang -CXX = $(CROSS_COMPILE)clang++ -LD_LTO = $(CROSS_COMPILE)llvm-ld +CC ?= $(CROSS_COMPILE)clang +CXX ?= $(CROSS_COMPILE)clang++ +LD_LTO ?= $(CROSS_COMPILE)llvm-ld else -CC = $(CROSS_COMPILE)gcc -CXX = $(CROSS_COMPILE)g++ -LD_LTO = $(CROSS_COMPILE)ld +CC ?= $(CROSS_COMPILE)gcc +CXX ?= $(CROSS_COMPILE)g++ +LD_LTO ?= $(CROSS_COMPILE)ld endif -CPP = $(CC) -E -AR = $(CROSS_COMPILE)ar -RANLIB = $(CROSS_COMPILE)ranlib -NM = $(CROSS_COMPILE)nm -STRIP = $(CROSS_COMPILE)strip -OBJCOPY = $(CROSS_COMPILE)objcopy -OBJDUMP = $(CROSS_COMPILE)objdump -SIZEUTIL = $(CROSS_COMPILE)size +CPP ?= $(CC) -E +AR ?= $(CROSS_COMPILE)ar +RANLIB ?= $(CROSS_COMPILE)ranlib +NM ?= $(CROSS_COMPILE)nm +STRIP ?= $(CROSS_COMPILE)strip +OBJCOPY ?= $(CROSS_COMPILE)objcopy +OBJDUMP ?= $(CROSS_COMPILE)objdump +SIZEUTIL ?= $(CROSS_COMPILE)size # Allow git to be wrappered in the environment GIT ?= git -INSTALL = install +INSTALL ?= install INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p
Signature · 7 lines
2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Roger Pau Monne
Currently the names of the build toolchain binaries are hardcoded in StdGNU.mk, and the values from the environment are ignored.
Switch StdGNU.mk to use '?=' instead of '=', so that values from the environment are used if present, else default to the values provided by the config file.
Quoted 5 lines
This change fixes the gitlab CI loop, that was relying on passing custom values in the environment variables for the compiler and the linker.
Signed-off-by Roger Pau Monné <[email protected]>
Do we know if the CI loop still holds together with this fixed?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 12 lines · Andrew Cooper
Quoted 11 lines · Roger Pau Monne
Currently the names of the build toolchain binaries are hardcoded in StdGNU.mk, and the values from the environment are ignored.
Switch StdGNU.mk to use '?=' instead of '=', so that values from the environment are used if present, else default to the values provided by the config file.
This change fixes the gitlab CI loop, that was relying on passing custom values in the environment variables for the compiler and the linker.
Quoted 5 lines
Quoted 1 line
Signed-off-by Roger Pau Monné <[email protected]>Acked-by Andrew Cooper <[email protected]>Do we know if the CI loop still holds together with this fixed?
Yes, I've done a test-run with this, see:
https://gitlab.com/xen-project/people/royger/xen/pipelines/67882667
No regressions, everything was still OK.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Roger Pau Monne writes ("[PATCH] config: don't hardcode toolchain binaries"):
Quoted 10 lines
Currently the names of the build toolchain binaries are hardcoded in StdGNU.mk, and the values from the environment are ignored.
Switch StdGNU.mk to use '?=' instead of '=', so that values from the environment are used if present, else default to the values provided by the config file.
This change fixes the gitlab CI loop, that was relying on passing custom values in the environment variables for the compiler and the linker.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel