The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16135 
====================================================================== 
Reported By:                Michał Górny
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16135
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-06-03 12:47 EDT
Last Modified:              2016-06-03 12:47 EDT
====================================================================== 
Summary:                    RPATH linker flags no longer set correctly for SunOS
PathScale compiler since cmake 3.1
Description: 
We've recently upgraded CMake and noticed that our project stopped building
correctly. After timesome debugging, I've found out that after CMake upgrade,
CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG is no longer set correctly. This happens on
SunOS-5 system with PathScale compiler in use, and it started to happen in
cmake-3.1.

It looks that the correct linker flags are being set in two modules:
Platform/SunOS.cmake and Platform/SunOS-GNU.cmake.

The former of the files does not apply the linker flags since it is restricted
to apply to SunOS-4 only.

The latter of the files used to apply before cmake-3.1. However, since cmake-3.1
it is no longer used when PathScale compiler is in use.

Steps to Reproduce: 
1. Download PathScale compiler
(http://www.pathscale.com/ekopath-compiler-suite),

2. echo 'message(FATAL_ERROR "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}")' >
CMakeLists.txt

3. cmake . -DCMAKE_C_COMPILER=/opt/ekopath/bin/pathcc

With cmake-3.0.2 and older, it will print: -Wl,-R

With cmake-3.1.3 and newer, it will print an empty string

Additional Information: 
This probably could be fixed two ways: either by applying the 'GNU' rules for
PathScale compiler, or by extending the SunOS rules to SunOS-5. I don't know
which one is more correct here.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-06-03 12:47 Michał Górny   New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to