runc-opencontainer: Fix typo in Makefile for static-pie option
PATCH 1/1 runc-opencontainer: Fix typo in Makefile for static-pie option
From: Deepak Rathore <[email protected]>
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 <[email protected]>
--- ...-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
recipes-containers/runc/files/0001-Makefile-fix-typo-in-LDFLAGS_STATIC.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 6f20df5de2c6eb2343202c55e4a8b3d9a4feff10 Mon Sep 17 00:00:00 2001 +From: CrazyMax <[email protected]> +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 <[email protected]> +(cherry picked from commit 2e44a2028077685cde67d7988f95ce66110be5ae) +Signed-off-by: Deepak Rathore <[email protected]> +--- + 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 +
recipes-containers/runc/runc-opencontainers_git.bb +1 -0
@@ -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"
Signature · 1 line
2.44.3