Skip to contentSkip to conversation

nerdctl: add -buildmode=pie to avoid textrel QA error

PATCH In review [email protected] 2 participants 2 messages Feb 4 – Feb 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nerdctl: add -buildmode=pie to avoid textrel QA error

From: Chen Qi <[email protected]>

On qemuarm, building nerdctl fails with QA error about textrel. Add '-buildmode=pie' to fix this issue.

---
 recipes-containers/nerdctl/nerdctl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/nerdctl/nerdctl_git.bb +1 -1
index 1c37bcf8..5429e6e6 100644
@@ -78,7 +78,7 @@ do_compile() {
         export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 
         # -trimpath removes build paths from the binary (required for reproducible builds)
-        oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath -modcacherw" binaries
+        oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath -modcacherw -buildmode=pie" binaries
 }
 
 do_install() {
Signature · 1 line
2.34.1
#1 lore raw

Since I went a different way with the mod cache rw, this patch didn't apply.

I've fixed it up and merged it.

Bruce

In message: [meta-virtualization][PATCH] nerdctl: add -buildmode=pie to avoid textrel QA error

Quoted 36 lines · on 04/02/2026 Chen Qi via lists.yoctoproject.org wrote:

From: Chen Qi <[email protected]>

On qemuarm, building nerdctl fails with QA error about textrel. Add '-buildmode=pie' to fix this issue.

---
 recipes-containers/nerdctl/nerdctl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/nerdctl/nerdctl_git.bb +1 -1
index 1c37bcf8..5429e6e6 100644
@@ -78,7 +78,7 @@ do_compile() {
         export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 
         # -trimpath removes build paths from the binary (required for reproducible builds)
-        oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath -modcacherw" binaries
+        oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath -modcacherw -buildmode=pie" binaries
 }
 
 do_install() {
Signature · 11 lines
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9555): https://lists.yoctoproject.org/g/meta-virtualization/message/9555
Mute This Topic: https://lists.yoctoproject.org/mt/117630466/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-