Yocto Meta Virtualization
 help / color / mirror / Atom feed
* [meta-virtualization][scarthgap][PATCH] runc-opencontainer: Fix typo in Makefile for static-pie option
@ 2025-08-23  8:27 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
  0 siblings, 0 replies; 2+ messages in thread
From: Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2025-08-23  8:27 UTC (permalink / raw)
  To: meta-virtualization; +Cc: deeratho

From: Deepak Rathore <deeratho@cisco.com>

runc-opencontainer build is failing with clang toolchain due to typo
error for --static-pie option.

Build Error Logs:
| running x86_64-oe-linux-clang failed: exit status 1
| x86_64-oe-linux-clang: error: unknown argument '--static-pie'; did you mean '-static-pie'?
|
| make: *** [Makefile:69: static] Error 1
| ERROR: oe_runmake failed

Fixed it by replacing --static-pie with -static-pie in LDFLAGS_STATIC.

Signed-off-by: Deepak Rathore <deeratho@cisco.com>
---
 ...-Makefile-fix-typo-in-LDFLAGS_STATIC.patch | 30 +++++++++++++++++++
 .../runc/runc-opencontainers_git.bb           |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 recipes-containers/runc/files/0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch

diff --git a/recipes-containers/runc/files/0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch b/recipes-containers/runc/files/0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch
new file mode 100644
index 00000000..bfcfd533
--- /dev/null
+++ b/recipes-containers/runc/files/0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch
@@ -0,0 +1,30 @@
+From 6f20df5de2c6eb2343202c55e4a8b3d9a4feff10 Mon Sep 17 00:00:00 2001
+From: CrazyMax <crazy-max@users.noreply.github.com>
+Date: Tue, 14 Feb 2023 21:27:26 +0100
+Subject: [PATCH] Makefile: fix typo in LDFLAGS_STATIC
+
+Upstream-Status: Backport [https://github.com/opencontainers/runc/commit/2e44a2028077]
+
+Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
+(cherry picked from commit 2e44a2028077685cde67d7988f95ce66110be5ae)
+Signed-off-by: Deepak Rathore <deeratho@cisco.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/src/import/Makefile
+===================================================================
+--- git.orig/src/import/Makefile
++++ git/src/import/Makefile
+@@ -36,7 +36,7 @@ LDFLAGS_STATIC := -extldflags -static
+ ifneq (,$(filter $(GOARCH),arm64 amd64))
+ 	ifeq (,$(findstring -race,$(EXTRA_FLAGS)))
+ 		GO_BUILDMODE_STATIC := -buildmode=pie
+-		LDFLAGS_STATIC := -linkmode external -extldflags --static-pie
++		LDFLAGS_STATIC := -linkmode external -extldflags -static-pie
+ 	endif
+ endif
+ # Enable static PIE binaries on supported platforms.
+-- 
+2.42.0
+
diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb
index 6eef2c8f..4c831502 100644
--- a/recipes-containers/runc/runc-opencontainers_git.bb
+++ b/recipes-containers/runc/runc-opencontainers_git.bb
@@ -4,6 +4,7 @@ SRCREV = "2c9f5602f0ba3d9da1c2596322dfc4e156844890"
 SRC_URI = " \
     git://github.com/opencontainers/runc;branch=release-1.1;protocol=https \
     file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \
+    file://0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch \
     "
 RUNC_VERSION = "1.1.14"
 
-- 
2.44.3



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

end of thread, other threads:[~2025-09-04  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250822175400.1677499-1-deeratho@cisco.com>
2025-09-04  1:12 ` [meta-virtualization][scarthgap][PATCH] runc-opencontainer: Fix typo in Makefile for static-pie option Bruce Ashfield
2025-08-23  8:27 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox