e2fsprogs: use -ffunction-sections, -fdata-sections, --gc-sections
authorFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jun 2013 11:26:55 +0000 (11:26 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jun 2013 11:26:55 +0000 (11:26 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37066

package/utils/e2fsprogs/Makefile

index 783648c..e1e9aff 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" \