All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0"
@ 2026-04-08  8:40 Li Zhou
  2026-04-09 13:52 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhou @ 2026-04-08  8:40 UTC (permalink / raw)
  To: meta-virtualization

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-virtualization][PATCH] yq: fix do_compile failure caused by CGO_ENABLED="0"
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2026-04-09 13:52 UTC (permalink / raw)
  To: li.zhou; +Cc: meta-virtualization

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]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-09 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.