View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013550CMakeCMakepublic2012-09-19 13:572013-03-04 08:38
ReporterAlexander 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86-64OSLinuxOS VersionopenSUSE 12.1
Product VersionCMake 2.8.9 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0013550: CMAKE_C_COMPILE_OPTIONS_PIE not set for Clang
DescriptionI'm trying to use CMAKE_C_COMPILE_OPTIONS_PIE and CMAKE_CXX_COMPILE_OPTIONS_PIE variables, but they are not set when using Clang.

I found this in /usr/share/cmake/Modules/Compiler/GNU.cmake :

  if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
    set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
  endif()

Clang is a GNU-compatible compiler (I have version 3.1), but it doesn't pass the check.

Thanks
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0031065)
Brad King (manager)
2012-09-19 14:19

Good catch. I factored out Clang compiler info files to have their own code path:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e34aea9 [^]

Then I used it to add the PIE setting:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ada9efd3 [^]

Thanks!
(0032453)
Robert Maynard (manager)
2013-03-04 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-09-19 13:57 Alexander New Issue
2012-09-19 14:04 Brad King Assigned To => Brad King
2012-09-19 14:04 Brad King Status new => assigned
2012-09-19 14:19 Brad King Note Added: 0031065
2012-09-19 14:19 Brad King Status assigned => resolved
2012-09-19 14:19 Brad King Resolution open => fixed
2012-09-19 14:19 Brad King Fixed in Version => CMake 2.8.10
2012-09-19 14:19 Brad King Target Version => CMake 2.8.10
2013-03-04 08:38 Robert Maynard Note Added: 0032453
2013-03-04 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team