|
1 |
| -From bcf130f097781d162c0461105a12f4c9f412d3e8 Mon Sep 17 00:00:00 2001 |
2 |
| -From: Angelos Kolaitis <angelos.kolaitis@canonical.com> |
3 |
| -Date: Tue, 20 Feb 2024 12:32:27 +0200 |
4 |
| -Subject: [PATCH] Disable static PIE on arm64 |
| 1 | +From c044bd6a172f9d364b8ddad7056a7a3d75e11ddb Mon Sep 17 00:00:00 2001 |
| 2 | +From: Lucian Petrut <lpetrut@cloudbasesolutions.com> |
| 3 | +Date: Fri, 28 Mar 2025 13:01:05 +0000 |
| 4 | +Subject: [PATCH] [PATCH] Disable static PIE on arm64 |
5 | 5 |
|
6 | 6 | Ubuntu does not currently have the rcrt1.o file on arm64
|
7 | 7 | ---
|
8 | 8 | Makefile | 2 +-
|
9 | 9 | 1 file changed, 1 insertion(+), 1 deletion(-)
|
10 | 10 |
|
11 | 11 | diff --git a/Makefile b/Makefile
|
12 |
| -index e3af9bc1..b2b07720 100644 |
| 12 | +index bda0c3a0..b8c1115a 100644 |
13 | 13 | --- a/Makefile
|
14 | 14 | +++ b/Makefile
|
15 |
| -@@ -33,7 +33,7 @@ LDFLAGS_STATIC := -extldflags -static |
| 15 | +@@ -45,7 +45,7 @@ LDFLAGS_STATIC := -extldflags -static |
16 | 16 | # Enable static PIE executables on supported platforms.
|
17 | 17 | # This (among the other things) requires libc support (rcrt1.o), which seems
|
18 | 18 | # to be available only for arm64 and amd64 (Debian Bullseye).
|
19 | 19 | -ifneq (,$(filter $(GOARCH),arm64 amd64))
|
20 | 20 | +ifneq (,$(filter $(GOARCH),amd64))
|
21 |
| - ifeq (,$(findstring -race,$(EXTRA_FLAGS))) |
22 |
| - GO_BUILDMODE_STATIC := -buildmode=pie |
23 |
| - LDFLAGS_STATIC := -linkmode external -extldflags --static-pie |
| 21 | + ifeq (,$(findstring -race,$(EXTRA_FLAGS))) |
| 22 | + GO_BUILDMODE_STATIC := -buildmode=pie |
| 23 | + LDFLAGS_STATIC := -linkmode external -extldflags -static-pie |
24 | 24 | --
|
25 |
| -2.34.1 |
| 25 | +2.43.0 |
0 commit comments