dropbear: use -ffunction-sections, -fdata-sections and --gc-sections, saves 19k uncom...
[openwrt.git] / package / dropbear / Makefile
index 07df03c..bb1230c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=0.52
-PKG_RELEASE:=2
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
@@ -17,6 +17,8 @@ PKG_SOURCE_URL:= \
        http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
 PKG_MD5SUM:=1c69ec674481d7745452f68f2ea5597e
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/dropbear/Default
@@ -63,6 +65,9 @@ CONFIGURE_ARGS += \
        --disable-pututxline \
        --disable-zlib
 
+TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 define Build/Configure
        $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
        $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
@@ -70,12 +75,12 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                LD="$(TARGET_CC)" \
                PROGRAMS="dropbear dbclient dropbearkey scp" \
                MULTI=1 SCPPROGRESS=1
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                LD="$(TARGET_CC)" \
                PROGRAMS="dropbearconvert"
This page took 0.028889 seconds and 4 git commands to generate.