summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-10-01 18:24:28 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-10-01 18:24:28 +0300
commit132d917eb04ef857e36ff250c719b5b541932f7f (patch)
treea2acfb51ff6779b2dff0dc2ca20a75ac2a500c06
parentc7e08ddccb34949128a1a7906bdc51c950ffbb70 (diff)
remove -rdynamic gcc flag
This reduces the exe sizes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6306852..d9bc30c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,10 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif()
endif()
+# HACK: cmake always adds "-rdynamic", this removes it
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
+
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
# static link libc