aboutsummaryrefslogtreecommitdiffstats
path: root/package
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 /package
parente3021e0308cccd721a2e4b06f9a7e4aafb31f35e (diff)
downloadupstream-2e8545333a356a413c44fd8c673039807b780c42.tar.gz
upstream-2e8545333a356a413c44fd8c673039807b780c42.tar.bz2
upstream-2e8545333a356a413c44fd8c673039807b780c42.zip
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>
Diffstat (limited to 'package')
-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 12b97da243..a7d698c4fc 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 \