From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: li.zhou@windriver.com
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0"
Date: Thu, 9 Apr 2026 13:52:10 +0000 [thread overview]
Message-ID: <adevClwFTTJx0xnq@gmail.com> (raw)
In-Reply-To: <20260408084052.693958-1-li.zhou@windriver.com>
merged.
Bruce
In message: [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0"
on 08/04/2026 Li Zhou via lists.yoctoproject.org wrote:
> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9688): https://lists.yoctoproject.org/g/meta-virtualization/message/9688
> Mute This Topic: https://lists.yoctoproject.org/mt/118721968/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
prev parent reply other threads:[~2026-04-09 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 8:40 [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0" Li Zhou
2026-04-09 13:52 ` Bruce Ashfield [this message]
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=adevClwFTTJx0xnq@gmail.com \
--to=bruce.ashfield@gmail.com \
--cc=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.