[PATCH] Do not pass -allow-shlib-undefined to the Solaris linker

Xan López xan at igalia.com
Mon Jun 22 09:30:38 PDT 2015


The option is not supported.

FWIW, with this patch the vanilla Solaris build works save for one
minor bug where two C++ libraries (LTO, libclang) fail to link because
CMake is using gcc instead of g++ for the "link binary". I'm still
trying to figure out whether that's a CMake bug (only happens in
Solaris) or not, but it's easy enough to workaround for those
interested (just edit the link.txt files).
-------------- next part --------------
>From 7ad56c6a238480c6b64e78a828a30ed32b90709f Mon Sep 17 00:00:00 2001
From: Xan Lopez <xan at igalia.com>
Date: Mon, 22 Jun 2015 08:08:48 -0400
Subject: [PATCH] CMake: do not pass -allow-shlib-undefined to Solaris linker

It is not supported.
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index da73149..3194197 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -530,7 +530,7 @@ endif()
 # check its symbols. This is wasteful (the check was done when foo.so
 # was created) and can fail since it is not the dynamic linker and
 # doesn't know how to handle search paths correctly.
-if (UNIX AND NOT APPLE)
+if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
   set(CMAKE_EXE_LINKER_FLAGS
       "${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
 endif()
-- 
2.4.3



More information about the llvm-commits mailing list