View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016135 | CMake | CMake | public | 2016-06-03 12:47 | 2016-06-10 14:21 | ||||
Reporter | Michał Górny | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | SunOS | OS | openindiana | OS Version | 5.11 | ||||
Product Version | CMake 3.5.2 | ||||||||
Target Version | CMake 3.7 | Fixed in Version | CMake 3.7 | ||||||
Summary | 0016135: 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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | 0001-Platform-add-flag-definitions-for-PathScale-compiler.patch [^] (3,160 bytes) 2016-06-05 15:31 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0041133) Michał Górny (reporter) 2016-06-03 12:54 |
Ok, the non-GNU rules can't be used since they pass wrong flags like -PIC. |
(0041134) Brad King (manager) 2016-06-03 13:26 |
Currently we have: $ ls Modules/Platform/SunOS* Modules/Platform/SunOS.cmake Modules/Platform/SunOS-GNU-C.cmake Modules/Platform/SunOS-GNU.cmake Modules/Platform/SunOS-GNU-CXX.cmake Modules/Platform/SunOS-GNU-Fortran.cmake One will need to create equivalents to the SunOS-GNU* modules for SunOS-PathScale*, just as we already have Linux-PathScale*. |
(0041136) Michał Górny (reporter) 2016-06-05 15:33 |
Thank you for your explanation. I have written and tested modules based on Linux-PathScale and SunOS, and attached a patch adding them. Is there any chance this fix could go into 3.6? It'd be really great to be able to have PathScale compiler working with the next CMake release. |
(0041138) Brad King (manager) 2016-06-06 09:00 |
Thanks, I've applied the patch: Platform: add flag definitions for PathScale compiler on SunOS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcfe121f [^] I've also queued it for merge to 'release' for inclusion in 3.6.0-rc2. |
(0041157) Kitware Robot (administrator) 2016-06-10 14:21 |
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-06-03 12:47 | Michał Górny | New Issue | |
2016-06-03 12:54 | Michał Górny | Note Added: 0041133 | |
2016-06-03 13:26 | Brad King | Note Added: 0041134 | |
2016-06-05 15:31 | Michał Górny | File Added: 0001-Platform-add-flag-definitions-for-PathScale-compiler.patch | |
2016-06-05 15:33 | Michał Górny | Note Added: 0041136 | |
2016-06-06 09:00 | Brad King | Note Added: 0041138 | |
2016-06-06 09:00 | Brad King | Assigned To | => Brad King |
2016-06-06 09:00 | Brad King | Status | new => resolved |
2016-06-06 09:00 | Brad King | Resolution | open => fixed |
2016-06-06 09:00 | Brad King | Fixed in Version | => CMake 3.7 |
2016-06-06 09:00 | Brad King | Target Version | => CMake 3.7 |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041157 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |