Skip to content

Accept GNU ld snapshot versions without a release suffix - #1871

Open
subpop wants to merge 1 commit into
swiftlang:mainfrom
subpop:fix-gnu-ld-version-regex
Open

subpop wants to merge 1 commit into
swiftlang:mainfrom
subpop:fix-gnu-ld-version-regex

Conversation

@subpop

@subpop subpop commented Oct 17, 2026

Copy link
Copy Markdown

GNU ld detection requires the version banner printed by
ld -version_details/-v to end in a dash-separated distro release
suffix, e.g. "GNU ld version 2.41-28.fc43". Pre-release snapshot
builds of binutils, such as Fedora Rawhide's, print a bare dotted
version with no such suffix, e.g. "GNU ld version 2.47.50.20260921".

Neither existing regex matches that string, so linker discovery fails
and raises a hard build error for every linker invocation.

Make the trailing release suffix optional, using a non-capturing group
so the regex's output type still unifies with its sibling in the same
array, so both forms are accepted.

[Put a one line description of your change into the PR title, please be specific]

[Explain the context, and why you're making that change. What is the problem you're trying to solve.]

[Tests can be run by commenting @swift-ci test on the pull request, for more information see this]

GNU ld detection requires the version banner printed by
`ld -version_details`/`-v` to end in a dash-separated distro release
suffix, e.g. "GNU ld version 2.41-28.fc43". Pre-release snapshot
builds of binutils, such as Fedora Rawhide's, print a bare dotted
version with no such suffix, e.g. "GNU ld version 2.47.50.20260921".

Neither existing regex matches that string, so linker discovery fails
and raises a hard build error for every linker invocation.

Make the trailing release suffix optional, using a non-capturing group
so the regex's output type still unifies with its sibling in the same
array, so both forms are accepted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants