summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-21 14:33:14 +0100
committerJo-Philipp Wich <jo@mein.io>2017-03-01 20:37:37 +0100
commit2e8545333a356a413c44fd8c673039807b780c42 (patch)
tree11a371199ad054cf7701e7623b16244c885b220a
parente3021e0308cccd721a2e4b06f9a7e4aafb31f35e (diff)
downloadmtk-20170518-2e8545333a356a413c44fd8c673039807b780c42.zip
mtk-20170518-2e8545333a356a413c44fd8c673039807b780c42.tar.gz
mtk-20170518-2e8545333a356a413c44fd8c673039807b780c42.tar.bz2
mbedtls: add --function-sections and --data-sections to CFLAGS
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>
-rw-r--r--package/libs/mbedtls/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 12b97da..a7d698c 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -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 \