From 827092c2ec925ea3a024dcda9ccfd738e351e6ba Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Tue, 26 Sep 2023 22:54:10 -0700 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-containers/docker-compose/docker-compose_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'recipes-containers') 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 ?= "" include relocation.inc +GOBUILDFLAGS:append = " -mod=vendor" do_compile() { cd ${S}/src/import @@ -50,8 +51,6 @@ do_compile() { export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export GOFLAGS="-mod=vendor -trimpath" - # our copied .go files are to be used for the build ln -sf vendor.copy vendor # inform go that we know what we are doing @@ -60,7 +59,7 @@ do_compile() { GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}" GO_BUILDTAGS="" mkdir -p ./bin - ${GO} build $GOFLAGS -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd + ${GO} build ${GOBUILDFLAGS} -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd } do_install() { -- cgit v1.2.3-54-g00ecf