summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake6
-rw-r--r--Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in6
2 files changed, 12 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 234fb7f..80e0218 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -126,6 +126,12 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
foreach(lib IN LISTS implicit_libs_tmp)
if("${lib}" MATCHES "^(crt.*\\.o|gcc.*|System.*)$")
set(log "${log} remove lib [${lib}]\n")
+ elseif(IS_ABSOLUTE "${lib}")
+ get_filename_component(abs "${lib}" ABSOLUTE)
+ if(NOT "x${lib}" STREQUAL "x${abs}")
+ set(log "${log} collapse lib [${lib}] ==> [${abs}]\n")
+ endif()
+ list(APPEND implicit_libs "${abs}")
else()
list(APPEND implicit_libs "${lib}")
endif()
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index 31488c0..e28d102 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -99,6 +99,12 @@ set(linux64_test1_libs "${linux64_gcc_libs}")
set(linux64_test1_dirs "${linux64_gcc_dirs}")
list(APPEND platforms linux64_test1)
+# sunCC dummy.cxx -v # extra slashes
+set(linux64_test2_text "/usr/bin/ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/sun/sunstudio12/prod/lib/amd64//crti.o /opt/sun/sunstudio12/prod/lib/amd64/crt1x.o /opt/sun/sunstudio12/prod/lib/amd64/values-xa.o dummy.o -Y \"/opt/sun/sunstudio12/prod/lib//amd64:/lib64:/usr//lib64\" -Qy -lc /opt/sun/sunstudio12/prod/lib/amd64//libc_supp.a /opt/sun/sunstudio12/prod/lib/amd64/crtn.o")
+set(linux64_test2_libs "c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a")
+set(linux64_test2_dirs "/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64")
+list(APPEND platforms linux64_test2)
+
#-----------------------------------------------------------------------------
# Mac