summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2023-09-26 22:54:10 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-10-02 16:15:20 +0000
commit827092c2ec925ea3a024dcda9ccfd738e351e6ba (patch)
tree3a10d73bc4a1e4150073a6001ab8c0f77c6ee3aa
parent7e9472c72b58f66eaf75c53cf0a2d95a54c1fb2e (diff)
downloadmeta-virtualization-827092c2ec925ea3a024dcda9ccfd738e351e6ba.tar.gz
docker-compose: fix textrel QA issue
Fix textrel QA issue like below: ERROR: QA Issue: docker-compose: ELF binary /usr/lib/docker/cli-plugins/ docker-compose has relocations in .text [textrel] The problem could be fixed by adding -buildmode=pie, as this option has already been in GOBUILDFLAGS except for mips and riscv32, let's make use of GOBUILDFLAGS. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/docker-compose/docker-compose_git.bb5
1 files changed, 2 insertions, 3 deletions
diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb
index d528535c..f6a2502a 100644
--- a/recipes-containers/docker-compose/docker-compose_git.bb
+++ b/recipes-containers/docker-compose/docker-compose_git.bb
@@ -38,6 +38,7 @@ PACKAGECONFIG ?= ""
38 38
39include relocation.inc 39include relocation.inc
40 40
41GOBUILDFLAGS:append = " -mod=vendor"
41do_compile() { 42do_compile() {
42 cd ${S}/src/import 43 cd ${S}/src/import
43 44
@@ -50,8 +51,6 @@ do_compile() {
50 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" 51 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
51 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" 52 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
52 53
53 export GOFLAGS="-mod=vendor -trimpath"
54
55 # our copied .go files are to be used for the build 54 # our copied .go files are to be used for the build
56 ln -sf vendor.copy vendor 55 ln -sf vendor.copy vendor
57 # inform go that we know what we are doing 56 # inform go that we know what we are doing
@@ -60,7 +59,7 @@ do_compile() {
60 GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}" 59 GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}"
61 GO_BUILDTAGS="" 60 GO_BUILDTAGS=""
62 mkdir -p ./bin 61 mkdir -p ./bin
63 ${GO} build $GOFLAGS -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd 62 ${GO} build ${GOBUILDFLAGS} -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
64} 63}
65 64
66do_install() { 65do_install() {