mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
CMakeParseImplicitLinkInfo: Avoid using GCC's "Configured with" line
The `gcc -v` output includes a "Configured with" line about its own
build environment. Use it only for the fallback from commit 78b7ba6494
(LinkerId: Fix detection of linker tool for GNU on SunOS sparc32,
2023-12-19, v3.29.0-rc1~176^2~8).
This commit is contained in:
@@ -125,7 +125,7 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex)
|
||||
elseif("${line}" MATCHES "^export XL_LINKER=(.*/${linker})[ \t]*$") # IBM XL
|
||||
set(linker_tool "${CMAKE_MATCH_1}")
|
||||
string(APPEND log " link line: [${line}] ==> linker [${linker_tool}]\n")
|
||||
elseif("${line}" MATCHES "--with-ld=") # GNU
|
||||
elseif("${line}" MATCHES "^Configured with: ") # GNU
|
||||
# The GNU compiler reports how it was configured.
|
||||
# This does not account for -fuse-ld= so use it only as a fallback.
|
||||
if("${line}" MATCHES " --with-ld=([^ ]+/${linker})( |$)")
|
||||
|
||||
Reference in New Issue
Block a user