e2fsprogs: use -ffunction-sections, -fdata-sections, --gc-sections
[openwrt.git] / package / utils / e2fsprogs / Makefile
index 783648cf635cf826c44ccf84803d20f9fcf20fc0..e1e9aff3f055f5b3b98ee6588603f035fbf65ccb 100644 (file)
@@ -81,7 +81,8 @@ $(call Package/e2fsprogs)
   DEPENDS:= +e2fsprogs
 endef
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
+
 
 CONFIGURE_ARGS += \
        --enable-elf-shlibs     \
@@ -105,6 +106,7 @@ define Build/Compile
                LDFLAGS="" \
                subst
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               LDFLAGS=-Wl,--gc-sections \
                BUILDCC="$(HOSTCC)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \