]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use CMAKE_POSITION_INDEPENDENT_CODE not -fPIC
authorKefu Chai <kchai@redhat.com>
Fri, 13 Oct 2017 05:01:59 +0000 (13:01 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Oct 2017 06:02:59 +0000 (14:02 +0800)
we use the global setting of CMAKE_POSITION_INDEPENDENT_CODE for
defining this flag.

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt

index b24d77372061806d76e483c48a55777d9bd9320a..fc3b73a78caf592906be752d814fb4b0e58c42e3 100644 (file)
@@ -511,8 +511,8 @@ if(WITH_TSAN)
     message(FATAL_ERROR "Cannot combine -fsanitize-leak w/-fsanitize-thread")
   endif()
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -pie -ltsan ")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -fPIC")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -fPIC")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
   if(HAVE_JEMALLOC)
     message(FATAL "TSAN does not work well with JeMalloc")
   endif()