Message ID | 20190726133331.91482-4-roger.pau@citrix.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | build: honor toolchain related environment vars | expand |
On 26.07.2019 15:33, Roger Pau Monne wrote: > --- a/config/StdGNU.mk > +++ b/config/StdGNU.mk > @@ -1,8 +1,6 @@ > # Use Clang/LLVM instead of GCC? > clang ?= n > > -AS = $(CROSS_COMPILE)as > -LD = $(CROSS_COMPILE)ld > ifeq ($(clang),y) > gcc := n > DEF_CC = clang > @@ -28,19 +26,21 @@ HOSTCC ?= $(DEF_CC) > HOSTCXX ?= $(DEF_CXX) > 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 > +AS ?= $(CROSS_COMPILE)as > +LD ?= $(CROSS_COMPILE)ld > +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 This does affect more than just the toolchain part of the tree, doesn't it? Irrespective of this my point made for patch 2 applies here as well. Furthermore, if we were to go this route, then SunOS.mk would want similar massaging. Jan
diff --git a/config/StdGNU.mk b/config/StdGNU.mk index b3072f5b13..cab7369f12 100644 --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -1,8 +1,6 @@ # Use Clang/LLVM instead of GCC? clang ?= n -AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld ifeq ($(clang),y) gcc := n DEF_CC = clang @@ -28,19 +26,21 @@ HOSTCC ?= $(DEF_CC) HOSTCXX ?= $(DEF_CXX) 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 +AS ?= $(CROSS_COMPILE)as +LD ?= $(CROSS_COMPILE)ld +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
Don't force the usage of the hardcoded toolchain values if those are already set on the environment. Note that as part of the change the definition of AS and LD is moved after the setting of compiler related variables. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: George Dunlap <George.Dunlap@eu.citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Julien Grall <julien.grall@arm.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Tim Deegan <tim@xen.org> Cc: Wei Liu <wl@xen.org> --- config/StdGNU.mk | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)