cmake: modules/FindGnuLd: support an additional obselete version format
A legacy build of GNU ld emits the following version string: GNU ld version 2.17.50.0.9 20070103 This patch fixes the regex parsing so that the version number is correctly extracted from the string. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit is contained in:
parent
8b59dcfd11
commit
6d63d4d904
1 changed files with 3 additions and 2 deletions
|
@ -87,10 +87,11 @@ if(GNULD_LINKER)
|
|||
# - "GNU ld (GNU Binutils for Ubuntu) 2.34"
|
||||
# - "GNU ld (Zephyr SDK 0.15.2) 2.38"
|
||||
# - "GNU ld (Gentoo 2.39 p5) 2.39.0"
|
||||
# - "GNU ld version 2.17.50.0.9 20070103"
|
||||
string(REGEX MATCH
|
||||
"GNU ld \\(.+\\) ([0-9]+[.][0-9]+[.]?[0-9]*).*"
|
||||
"GNU ld (\\(.+\\)|version) ([0-9]+[.][0-9]+[.]?[0-9]*).*"
|
||||
out_var ${gnuld_version_output})
|
||||
set(GNULD_VERSION_STRING ${CMAKE_MATCH_1} CACHE STRING "GNU ld version" FORCE)
|
||||
set(GNULD_VERSION_STRING ${CMAKE_MATCH_2} CACHE STRING "GNU ld version" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue