mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
oci-image-tools: use GO flags/compiler from recipe
The image tools were not building with the oe/cross GO compiler and flags. As such, you could end up with a binary on target with the wong elf interpreter (the host one). With this, we properly use the settings from our build. We also bump the SRCREV to pickup a few minor fixes to the package. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
4d6edd4fc5
commit
986d873e7f
|
@ -0,0 +1,31 @@
|
|||
From 7e6bfc9657f9fd83c170d5bf3721d54bf9e88074 Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
Date: Sun, 13 Oct 2019 15:35:08 -0400
|
||||
Subject: [PATCH] tool: respect GO and GOBUILDFLAGS when building
|
||||
|
||||
Ensure that the building of the tools respect the go compiler and
|
||||
build flags from our environemnt. Otherwise, we'll use the host
|
||||
settings for each and end up with a binary that cannot be run on
|
||||
the target.
|
||||
|
||||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/import/Makefile b/src/import/Makefile
|
||||
index bacb341..1bfe021 100644
|
||||
--- a/src/import/Makefile
|
||||
+++ b/src/import/Makefile
|
||||
@@ -27,7 +27,7 @@ check-license:
|
||||
|
||||
.PHONY: tool
|
||||
tool:
|
||||
- go build -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool
|
||||
+ $(GO) build $(GOBUILDFLAGS) $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool
|
||||
|
||||
|
||||
all: tool man
|
||||
--
|
||||
2.19.1
|
||||
|
|
@ -13,9 +13,10 @@ DEPENDS = "\
|
|||
"
|
||||
|
||||
SRC_URI = "git://github.com/opencontainers/image-tools.git \
|
||||
file://0001-config-make-Config.User-mapping-errors-a-warning.patch"
|
||||
file://0001-config-make-Config.User-mapping-errors-a-warning.patch \
|
||||
file://0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch"
|
||||
|
||||
SRCREV = "e324098b70c87495404be6f341be459d2dfde64e"
|
||||
SRCREV = "93db3b16e6738bf9b8bee47d86ac93be5340838b"
|
||||
PV = "0.2.0-dev+git${SRCPV}"
|
||||
GO_IMPORT = "import"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user