MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012601 | CMake | CMake | public | 2011-11-30 06:58 | 2012-04-02 10:10 |
Reporter | doob | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | Linux x86_64 | OS | Linux OpenSuse | OS Version | 11.4 |
Product Version | CMake 2.8.6 | ||||
Target Version | Fixed in Version | ||||
Summary | 0012601: CLang with Opiton -working-directory leads CMake to ommit fPIC in CXX_FLAGS for shared libs | ||||
Description | I tried using CLang as drop in replacement for GCC with CMake and it worked just fine. (CLang Version 3.0) I just set CLang/CLang++ as the native C/CXX compiler in CMake. However since qtcreator didn't recognized the paths given by warning and error messages from CLang I forced CLang to output absolute paths always by setting -working-directory "/" to output paths relative to the root directory. However this seams to fool some internal setup/path detection or whatever process of CMake. If I use CLang together with -working-directory "/" I can't build shared libraries anymore, because CMake somehow fails on setting the proper fPIC flags then. | ||||
Steps To Reproduce | On a shared library target building project: - set clang/clang++ as the native C/CXX compiler in CMake - build the project ---> everything should be fine ---> grep -l -R fPIC . will show you that fPIC is actually in the compile line. Look into your ./**/flags.make files. - add -working-directory "/" to C/CXX flags in CMake - make rebuild_cache - build the project ---> linker complains about missing fPIC on your object files with something like: relocation R_X86_64_32S against `.bss' can not be used when making a shared object ---> grep -l -R fPIC . will show you that fPIC is missing in the compile line. Look into your ./**/flags.make files. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-11-30 06:58 | doob | New Issue | |||
2011-11-30 09:07 | Brad King | Note Added: 0027873 | |||
2011-11-30 09:07 | Brad King | Status | new => resolved | ||
2011-11-30 09:07 | Brad King | Resolution | open => suspended | ||
2011-11-30 09:07 | Brad King | Assigned To | => Brad King | ||
2012-04-02 10:10 | David Cole | Note Added: 0029054 | |||
2012-04-02 10:10 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|