From: Felix Fietkau Date: Tue, 21 Feb 2017 13:33:14 +0000 (+0100) Subject: mbedtls: add --function-sections and --data-sections to CFLAGS X-Git-Tag: v17.01.1~60 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2e8545333a356a413c44fd8c673039807b780c42;p=openwrt%2Fstaging%2Fxback.git 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 --- 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 \