From: Li Zhou <li.zhou@windriver.com>
To: meta-virtualization@lists.yoctoproject.org
Subject: [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0"
Date: Wed, 8 Apr 2026 16:40:52 +0800 [thread overview]
Message-ID: <20260408084052.693958-1-li.zhou@windriver.com> (raw)
New version of yq need set CGO_ENABLED="0" when compiling,
and this causes do_compile failure for 32 bits target as below:
-buildmode=pie requires external (cgo) linking, but cgo is not enabled
Tool go's internal linker doesn't support PIE for linux 32 bits target,
so -buildmode=pie requires external (cgo) linking on ARM and x86.
To fix this conflict with CGO_ENABLED="0", remove "-buildmode=pie"
from GOBUILDFLAGS.
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
recipes-devtools/yq/yq_git.bb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/recipes-devtools/yq/yq_git.bb b/recipes-devtools/yq/yq_git.bb
index ac19f2c4..759cd616 100644
--- a/recipes-devtools/yq/yq_git.bb
+++ b/recipes-devtools/yq/yq_git.bb
@@ -35,6 +35,10 @@ GO_MOD_DISCOVERY_GIT_REF = "${SRCREV_yq}"
inherit go goarch ptest
inherit go-mod-discovery
+# GO's internal linker doesn't support PIE for linux 32 bits target,
+# so -buildmode=pie requires external (cgo) linking on ARM and x86.
+GOBUILDFLAGS:remove = "-buildmode=pie"
+
do_compile() {
cd ${S}/src/import
--
2.51.2
next reply other threads:[~2026-04-08 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 8:40 Li Zhou [this message]
2026-04-09 13:52 ` [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0" Bruce Ashfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408084052.693958-1-li.zhou@windriver.com \
--to=li.zhou@windriver.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.