Commit 5836aff0 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4871] fix problems using clang on linux

use TOKU_ALLOW_DEPRECATED
don't use PIE


git-svn-id: file:///svn/toku/tokudb@44595 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0ab470f1
...@@ -20,8 +20,8 @@ add_c_defines( ...@@ -20,8 +20,8 @@ add_c_defines(
_LARGEFILE64_SOURCE _LARGEFILE64_SOURCE
) )
if (CMAKE_SYSTEM_NAME MATCHES Darwin) if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_C_COMPILER_ID MATCHES Clang)
message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin. TODO: remove this.") message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin and with clang. TODO: remove this.")
add_c_defines(TOKU_ALLOW_DEPRECATED) add_c_defines(TOKU_ALLOW_DEPRECATED)
endif () endif ()
...@@ -153,10 +153,10 @@ endfunction(maybe_add_gcov_to_libraries) ...@@ -153,10 +153,10 @@ endfunction(maybe_add_gcov_to_libraries)
## good for binaries ## good for binaries
function(add_common_options_to_binary_targets) function(add_common_options_to_binary_targets)
foreach(tgt ${ARGN}) foreach(tgt ${ARGN})
add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
if (CMAKE_C_COMPILER_ID STREQUAL Clang) if (CMAKE_C_COMPILER_ID STREQUAL Clang)
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -Wl,-pie") add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden")
else () else ()
add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -pie") add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -pie")
endif () endif ()
endforeach(tgt) endforeach(tgt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment