aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker-distribution/files/0001-build-use-to-use-cross-go-compiler.patch
blob: 0f00b9986feec94cadf5539dbf202730950d4706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 9c27a12dc0bc62b95d7ecf003e7d241b36c3f2e6 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Tue, 30 Jun 2020 23:35:05 -0400
Subject: [PATCH] build: use  to use cross go compiler

We shouldn't be invoking 'go' as the compiler, but instead use
${GO} which tracks our cross build go compiler for the architecture.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: distribution/Makefile
===================================================================
--- distribution.orig/Makefile
+++ distribution/Makefile
@@ -60,7 +60,7 @@ version/version.go:
 
 bin/%: cmd/% FORCE ## build individual binary
 	@echo "$(WHALE) $@${BINARY_SUFFIX}"
-	@go build -buildmode=pie ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} --ldflags '-extldflags "-Wl,-z,now" -s' ${GO_TAGS}  ./$<
+	@${GO} build -buildmode=pie ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} --ldflags '-extldflags "-Wl,-z,now" -s' ${GO_TAGS}  ./$<
 
 binaries: $(BINARIES) ## build binaries
 	@echo "$(WHALE) $@"