mbedtls: add --function-sections and --data-sections to CFLAGS
authorFelix Fietkau <nbd@nbd.name>
Tue, 21 Feb 2017 13:33:14 +0000 (14:33 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 21 Feb 2017 15:05:03 +0000 (16:05 +0100)
This allows binaries that links these libraries statically to be reduced
by using --gc-sections on link

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/libs/mbedtls/Makefile

index 12b97da..a7d698c 100644 (file)
@@ -48,6 +48,8 @@ endef
 
 PKG_INSTALL:=1
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+
 CMAKE_OPTIONS += \
        -DCMAKE_BUILD_TYPE:String="Release" \
        -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \