[cmake-developers] [CMake 0015673]: CMAKE_C_COMPILER is used to link a CXX shared library on Solaris
Mantis Bug Tracker
mantis at public.kitware.com
Thu Jul 30 11:58:40 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15673
======================================================================
Reported By: Xan López
Assigned To:
======================================================================
Project: CMake
Issue ID: 15673
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-07-30 11:58 EDT
Last Modified: 2015-07-30 11:58 EDT
======================================================================
Summary: CMAKE_C_COMPILER is used to link a CXX shared
library on Solaris
Description:
The SunOS.cmake file has the following:
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o
<TARGET> <OBJECTS> <LINK_LIBRARIES>")
The end result is that CMAKE_C_COMPILER (gcc) is used to link C++ shared
libraries in Solaris. This results in numerous errors. I assume this is just a
typo, and the attached patch just fixes things for me.
This can be reproduced 100% of the time trying to compile LLVM/clang from SVN
HEAD, LTO and clang libs will fail to compile.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-07-30 11:58 Xan López New Issue
2015-07-30 11:58 Xan López File Added:
0001-SunOS-use-CXX-compiler-to-link-CXX-shared-libraries.patch
======================================================================
More information about the cmake-developers
mailing list