make sure LDFLAGS are propagated as well
authorAlexei Starovoitov <ast@fb.com>
Thu, 3 Dec 2015 22:04:16 +0000 (14:04 -0800)
committerAlexei Starovoitov <ast@fb.com>
Thu, 3 Dec 2015 22:06:31 +0000 (14:06 -0800)
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
src/cc/CMakeLists.txt

index e833dc1..1cedf64 100644 (file)
@@ -14,7 +14,7 @@ add_definitions(${LLVM_DEFINITIONS})
 configure_file(libbcc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc @ONLY)
 
 # prune unused llvm static library stuff when linking into the new .so
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--exclude-libs=ALL")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs=ALL")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")