-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: update base image to Fedora 41 #244
Open
bcressey
wants to merge
1
commit into
bottlerocket-os:develop
Choose a base branch
from
bcressey:fedora-41
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,46 @@ | ||
From 46ec67413008607e2150e3395668e54e538c5b6b Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <[email protected]> | ||
Date: Wed, 19 Jun 2024 10:18:58 +0200 | ||
Subject: [PATCH] Default to ld.bfd on ARM64 | ||
|
||
--- | ||
src/cmd/link/internal/ld/lib.go | 20 +++++++------------- | ||
1 file changed, 7 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go | ||
index eab74dc328..b401f58727 100644 | ||
--- a/src/cmd/link/internal/ld/lib.go | ||
+++ b/src/cmd/link/internal/ld/lib.go | ||
@@ -1620,22 +1620,16 @@ func (ctxt *Link) hostlink() { | ||
} | ||
|
||
if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" { | ||
- // On ARM64, the GNU linker will fail with | ||
- // -znocopyreloc if it thinks a COPY relocation is | ||
- // required. Switch to gold. | ||
- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962 | ||
- // https://go.dev/issue/22040 | ||
- altLinker = "gold" | ||
- | ||
- // If gold is not installed, gcc will silently switch | ||
- // back to ld.bfd. So we parse the version information | ||
- // and provide a useful error if gold is missing. | ||
+ // Use ld.bfd as the default linker | ||
+ altLinker = "bfd" | ||
+ | ||
+ // Provide a useful error if ld.bfd is missing | ||
name, args := flagExtld[0], flagExtld[1:] | ||
- args = append(args, "-fuse-ld=gold", "-Wl,--version") | ||
+ args = append(args, "-fuse-ld=bfd", "-Wl,--version") | ||
cmd := exec.Command(name, args...) | ||
if out, err := cmd.CombinedOutput(); err == nil { | ||
- if !bytes.Contains(out, []byte("GNU gold")) { | ||
- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out) | ||
+ if !bytes.Contains(out, []byte("GNU ld")) { | ||
+ log.Fatalf("ARM64 external linker must be ld.bfd, but is not: %s", out) | ||
} | ||
} | ||
} | ||
-- | ||
2.45.1 | ||
|
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,46 @@ | ||
From 46ec67413008607e2150e3395668e54e538c5b6b Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <[email protected]> | ||
Date: Wed, 19 Jun 2024 10:18:58 +0200 | ||
Subject: [PATCH] Default to ld.bfd on ARM64 | ||
|
||
--- | ||
src/cmd/link/internal/ld/lib.go | 20 +++++++------------- | ||
1 file changed, 7 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go | ||
index eab74dc328..b401f58727 100644 | ||
--- a/src/cmd/link/internal/ld/lib.go | ||
+++ b/src/cmd/link/internal/ld/lib.go | ||
@@ -1620,22 +1620,16 @@ func (ctxt *Link) hostlink() { | ||
} | ||
|
||
if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" { | ||
- // On ARM64, the GNU linker will fail with | ||
- // -znocopyreloc if it thinks a COPY relocation is | ||
- // required. Switch to gold. | ||
- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962 | ||
- // https://go.dev/issue/22040 | ||
- altLinker = "gold" | ||
- | ||
- // If gold is not installed, gcc will silently switch | ||
- // back to ld.bfd. So we parse the version information | ||
- // and provide a useful error if gold is missing. | ||
+ // Use ld.bfd as the default linker | ||
+ altLinker = "bfd" | ||
+ | ||
+ // Provide a useful error if ld.bfd is missing | ||
name, args := flagExtld[0], flagExtld[1:] | ||
- args = append(args, "-fuse-ld=gold", "-Wl,--version") | ||
+ args = append(args, "-fuse-ld=bfd", "-Wl,--version") | ||
cmd := exec.Command(name, args...) | ||
if out, err := cmd.CombinedOutput(); err == nil { | ||
- if !bytes.Contains(out, []byte("GNU gold")) { | ||
- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out) | ||
+ if !bytes.Contains(out, []byte("GNU ld")) { | ||
+ log.Fatalf("ARM64 external linker must be ld.bfd, but is not: %s", out) | ||
} | ||
} | ||
} | ||
-- | ||
2.45.1 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the context in the linked issues, I assume upstream will probably also converge back to
bfd
. Seems like the reason for the switch togold
in the first place is resolved upstream, andgold
is on a deprecation path.