-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable runc static PIE builds on arm64 (#143)
- Loading branch information
1 parent
30fbadc
commit 2bb03b0
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#!/bin/bash | ||
|
||
VERSION="${2}" | ||
|
||
export INSTALL="${1}/bin" | ||
mkdir -p "${INSTALL}" | ||
|
||
# Ensure `runc --version` prints the right commit hash from upstream | ||
export COMMIT="$(git describe --long --always "${VERSION}")" | ||
|
||
make BUILDTAGS="seccomp apparmor" EXTRA_LDFLAGS="-s -w" static | ||
cp runc "${INSTALL}/runc" |
25 changes: 25 additions & 0 deletions
25
build-scripts/components/runc/patches/v1.1.12/0001-Disable-static-PIE-on-arm64.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From bcf130f097781d162c0461105a12f4c9f412d3e8 Mon Sep 17 00:00:00 2001 | ||
From: Angelos Kolaitis <[email protected]> | ||
Date: Tue, 20 Feb 2024 12:32:27 +0200 | ||
Subject: [PATCH] Disable static PIE on arm64 | ||
|
||
Ubuntu does not currently have the rcrt1.o file on arm64 | ||
--- | ||
Makefile | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index e3af9bc1..b2b07720 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -33,7 +33,7 @@ LDFLAGS_STATIC := -extldflags -static | ||
# Enable static PIE executables on supported platforms. | ||
# This (among the other things) requires libc support (rcrt1.o), which seems | ||
# to be available only for arm64 and amd64 (Debian Bullseye). | ||
-ifneq (,$(filter $(GOARCH),arm64 amd64)) | ||
+ifneq (,$(filter $(GOARCH),amd64)) | ||
ifeq (,$(findstring -race,$(EXTRA_FLAGS))) | ||
GO_BUILDMODE_STATIC := -buildmode=pie | ||
LDFLAGS_STATIC := -linkmode external -extldflags --static-pie | ||
-- | ||
2.34.1 |