[cmake-developers] [CMake 0016135]: RPATH linker flags no longer set correctly for SunOS PathScale compiler since cmake 3.1
Mantis Bug Tracker
mantis at public.kitware.com
Fri Jun 3 12:47:29 EDT 2016
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
======================================================================
More information about the cmake-developers
mailing list