xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] config: don't hardcode toolchain binaries
@ 2019-06-25 13:39 Roger Pau Monne
  2019-06-25 13:41 ` Andrew Cooper
  2019-06-25 13:45 ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Roger Pau Monne @ 2019-06-25 13:39 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, Jan Beulich, 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.

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 | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 039274ea61..c9624b043c 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -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
-- 
2.20.1 (Apple Git-117)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] config: don't hardcode toolchain binaries
  2019-06-25 13:39 [Xen-devel] [PATCH] config: don't hardcode toolchain binaries Roger Pau Monne
@ 2019-06-25 13:41 ` Andrew Cooper
  2019-06-25 13:43   ` Roger Pau Monné
  2019-06-25 13:45 ` Ian Jackson
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2019-06-25 13:41 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Tim Deegan, Ian Jackson, Julien Grall,
	Jan Beulich

On 25/06/2019 14:39, Roger Pau Monne wrote:
> 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.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

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

Do we know if the CI loop still holds together with this fixed?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] config: don't hardcode toolchain binaries
  2019-06-25 13:41 ` Andrew Cooper
@ 2019-06-25 13:43   ` Roger Pau Monné
  0 siblings, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2019-06-25 13:43 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Tim Deegan, Ian Jackson, Julien Grall,
	Jan Beulich, xen-devel

On Tue, Jun 25, 2019 at 02:41:09PM +0100, Andrew Cooper wrote:
> On 25/06/2019 14:39, Roger Pau Monne wrote:
> > 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.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> 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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] config: don't hardcode toolchain binaries
  2019-06-25 13:39 [Xen-devel] [PATCH] config: don't hardcode toolchain binaries Roger Pau Monne
  2019-06-25 13:41 ` Andrew Cooper
@ 2019-06-25 13:45 ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2019-06-25 13:45 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Jan Beulich, xen-devel

Roger Pau Monne writes ("[PATCH] 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.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-06-25 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 13:39 [Xen-devel] [PATCH] config: don't hardcode toolchain binaries Roger Pau Monne
2019-06-25 13:41 ` Andrew Cooper
2019-06-25 13:43   ` Roger Pau Monné
2019-06-25 13:45 ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).