diff options
Diffstat (limited to 'scripts/ld-version.sh')
-rwxr-xr-x | scripts/ld-version.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh index a78b804b68..b9513d2244 100755 --- a/scripts/ld-version.sh +++ b/scripts/ld-version.sh @@ -57,9 +57,11 @@ else fi fi -# Some distributions append a package release number, as in 2.34-4.fc32 -# Trim the hyphen and any characters that follow. -version=${version%-*} +# There may be something after the version, such as a distribution's package +# release number (like Fedora's "2.34-4.fc32") or punctuation (like LLD briefly +# added before the "compatible with GNU linkers" string), so remove everything +# after just numbers and periods. +version=${version%%[!0-9.]*} cversion=$(get_canonical_version $version) min_cversion=$(get_canonical_version $min_version) |