remove --gc-sections for mac os x builds
authorFelix Fietkau <nbd@nbd.name>
Sat, 2 Jul 2016 08:16:34 +0000 (10:16 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 2 Jul 2016 08:16:34 +0000 (10:16 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
CMakeLists.txt

index 0301db5655b0a4e37dc810950f6c6209d9b87575..f2ff51ec9f01f1e9cd37a980c4dfcd8db3313e5b 100644 (file)
@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 2.6)
 PROJECT(jsonpath C)
 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-error=unused-variable -ffunction-sections -D_GNU_SOURCE)
 
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections")
+IF(NOT APPLE)
+  SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections")
+ENDIF()
 
 IF(APPLE)
   INCLUDE_DIRECTORIES(/opt/local/include)