diff options
| author | Li Zhou <li.zhou@windriver.com> | 2026-04-08 16:40:52 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-09 13:51:26 +0000 |
| commit | 6eacd900611a08487f72112163f34be339277b7f (patch) | |
| tree | 03b9a820dc73c005a7ecfd3e31593cfe9ead79bc /recipes-devtools/yq | |
| parent | 327bc4131e0ee6116bc9e38fe01c872580be92d0 (diff) | |
| download | meta-virtualization-6eacd900611a08487f72112163f34be339277b7f.tar.gz | |
yq: fix do_compile failure caused by CGO_ENABLED="0"
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>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-devtools/yq')
| -rw-r--r-- | recipes-devtools/yq/yq_git.bb | 4 |
1 files changed, 4 insertions, 0 deletions
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}" | |||
| 35 | inherit go goarch ptest | 35 | inherit go goarch ptest |
| 36 | inherit go-mod-discovery | 36 | inherit go-mod-discovery |
| 37 | 37 | ||
| 38 | # GO's internal linker doesn't support PIE for linux 32 bits target, | ||
| 39 | # so -buildmode=pie requires external (cgo) linking on ARM and x86. | ||
| 40 | GOBUILDFLAGS:remove = "-buildmode=pie" | ||
| 41 | |||
| 38 | do_compile() { | 42 | do_compile() { |
| 39 | cd ${S}/src/import | 43 | cd ${S}/src/import |
| 40 | 44 | ||
