uboot-envtools: pass target cflags
authorNicolas Thill <nico@openwrt.org>
Tue, 18 Feb 2014 22:11:24 +0000 (22:11 +0000)
committerNicolas Thill <nico@openwrt.org>
Tue, 18 Feb 2014 22:11:24 +0000 (22:11 +0000)
SVN-Revision: 39629

package/boot/uboot-envtools/Makefile
package/boot/uboot-envtools/patches/001-honor_opt_flags.patch [new file with mode: 0644]

index 8f05288..631032c 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2013.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
@@ -41,6 +41,7 @@ define Build/Compile
        touch $(PKG_BUILD_DIR)/include/config.h
        $(MAKE) -C $(PKG_BUILD_DIR) \
                HOSTCC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \
+               HOSTOPTFLAGS="$(TARGET_CFLAGS)" \
                HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
                env
 endef
diff --git a/package/boot/uboot-envtools/patches/001-honor_opt_flags.patch b/package/boot/uboot-envtools/patches/001-honor_opt_flags.patch
new file mode 100644 (file)
index 0000000..16c3920
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/config.mk
++++ b/config.mk
+@@ -62,7 +62,8 @@ PLATFORM_LDFLAGS =
+ #########################################################################
+-HOSTCFLAGS    = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
++HOSTOPTFLAGS  = -O2 -fomit-frame-pointer
++HOSTCFLAGS    = -Wall -Wstrict-prototypes $(HOSTOPTFLAGS) \
+                 $(HOSTCPPFLAGS)
+ HOSTSTRIP     = strip