aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/mbedtls/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-21 14:33:14 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-21 16:05:03 +0100
commit7df0069bb5c51907ba54a5342c755ad8e19e57a9 (patch)
treea70e9b654e556cfa06bcc0e01f27996e7226f42a /package/libs/mbedtls/Makefile
parentadeae0e02a8cd0e67fc5ba549591fefb056011e7 (diff)
downloadupstream-7df0069bb5c51907ba54a5342c755ad8e19e57a9.tar.gz
upstream-7df0069bb5c51907ba54a5342c755ad8e19e57a9.tar.bz2
upstream-7df0069bb5c51907ba54a5342c755ad8e19e57a9.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/libs/mbedtls/Makefile')
-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 \