Pass TARGET_CFLAGS using and external variable instead a sed expression that can...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 5 Nov 2009 11:55:00 +0000 (11:55 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 5 Nov 2009 11:55:00 +0000 (11:55 +0000)
Signed-off: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>

SVN-Revision: 18311

package/iproute2/Makefile
package/iproute2/patches/110-extra-ccopts.patch [new file with mode: 0644]

index da18b4b0fc6b86d869098299090eecfc85fd3829..b36b95bc9bc8a854966eb1cbb9f1201901bfe79c 100644 (file)
@@ -41,7 +41,6 @@ $(call Package/iproute2/Default)
 endef
 
 define Build/Configure
-       $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
        $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
        $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
                $(PKG_BUILD_DIR)/Makefile
@@ -53,8 +52,8 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
-       $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
+       $(MAKE) -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" EXTRA_CCOPTS="$(TARGET_CFLAGS)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
+       $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) EXTRA_CCOPTS="$(TARGET_CFLAGS)" KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
 endef
 
 define Build/InstallDev
diff --git a/package/iproute2/patches/110-extra-ccopts.patch b/package/iproute2/patches/110-extra-ccopts.patch
new file mode 100644 (file)
index 0000000..b1edc6a
--- /dev/null
@@ -0,0 +1,11 @@
+--- ./Makefile.old     2009-10-18 21:14:18.344641842 +0200
++++ ./Makefile 2009-10-18 21:14:33.558618672 +0200
+@@ -22,7 +22,7 @@
+ CC = gcc
+ HOSTCC = gcc
+-CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
++CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall $(EXTRA_CCOPTS)
+ CFLAGS = $(CCOPTS) -I../include $(DEFINES)
+ YACCFLAGS = -d -t -v