Apply reduceing binary size of package
authorjc815.lee <jc815.lee@samsung.com>
Fri, 16 Aug 2013 05:06:59 +0000 (14:06 +0900)
committerjc815.lee <jc815.lee@samsung.com>
Fri, 16 Aug 2013 05:25:58 +0000 (14:25 +0900)
[model]
[binary_type]
[customer]
[issue#]
[problem]
[cause]
[solution]
[team] F/W
[request] i.palachev@samsung.com - Tizen Toolchain Team
[horizontal_expansion]

Change-Id: I4f6142289ce789c40d8fb8cc4ccdd718e2c6b49d
Signed-off-by: jc815.lee <jc815.lee@samsung.com>
CMakeLists.txt

index 323e67d..9e8a8bd 100644 (file)
@@ -15,6 +15,10 @@ SET(TARGET_VCORE_LIB "cert-svc-vcore")
 SET(TARGET_SIGN_TOOL "dpkg-pki-sig")
 
 # compiler options
+SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}")
+
 SET(CMAKE_C_FLAGS_RELEASE "-fvisibility=hidden -Wall -O2")
 SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++0x -Wall -O2")