Skip to content

Commit

Permalink
mbedtls: add --function-sections and --data-sections to CFLAGS
Browse files Browse the repository at this point in the history
This allows binaries that links these libraries statically to be reduced
by using --gc-sections on link

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Feb 21, 2017
1 parent adeae0e commit 7df0069
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/libs/mbedtls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 7df0069

Please sign in to comment.