summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-06-13 15:26:37 +0200
committerJo-Philipp Wich <jow@openwrt.org>2014-06-13 15:26:37 +0200
commit960dafd0b61eb14032d13c1562566618be55133f (patch)
treee74c16c63da46a13be36c65ae9e930bbb8c809de
parentf1e3aeb2526ea28db34c7bc714277c1dff26e5fc (diff)
downloadjsonpath-960dafd0b61eb14032d13c1562566618be55133f.tar.gz
build: use -ffunction-sections and --gc-sections
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22042e1..ef1a089 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 2.6)
PROJECT(jsonpath C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -ffunction-sections)
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections")
IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)