[oe] [PATCH] iproute2-2.6.31: fix cross compile

Johan Hovold johan.hovold at lundinova.se
Sun Jun 13 12:15:31 UTC 2010


Compilation failed (e.g. on missing xtables.h) due to configure script
using host gcc instead of cross compiler.

Signed-off-by: Johan Hovold <johan.hovold at lundinova.se>
---
 .../iproute2-2.6.31/fix-cross-compile.patch        |   38 ++++++++++++++++++++
 recipes/iproute2/iproute2_2.6.31.bb                |    1 +
 2 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 recipes/iproute2/iproute2-2.6.31/fix-cross-compile.patch

diff --git a/recipes/iproute2/iproute2-2.6.31/fix-cross-compile.patch b/recipes/iproute2/iproute2-2.6.31/fix-cross-compile.patch
new file mode 100644
index 0000000..c7e89f5
--- /dev/null
+++ b/recipes/iproute2/iproute2-2.6.31/fix-cross-compile.patch
@@ -0,0 +1,38 @@
+--- a/configure	2010-06-13 13:48:33.000000000 +0200
++++ b/configure	2010-06-13 13:48:42.000000000 +0200
+@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
+ 	return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1 
++$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1 
+ if [ $? -eq 0 ]
+ then
+     echo "TC_CONFIG_ATM:=y" >>Config
+@@ -47,7 +47,7 @@ int main(int argc, char **argv)
+ 
+ EOF
+ 
+-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
++if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
+ then
+ 	echo "TC_CONFIG_XT:=y" >>Config
+ 	echo "using xtables"
+@@ -84,7 +84,7 @@ int main(int argc, char **argv) {
+ }
+ 
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+ 
+ if [ $? -eq 0 ]
+ then
+@@ -124,7 +124,7 @@ int main(int argc, char **argv) {
+ }
+ 
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+ 
+ if [ $? -eq 0 ]
+ then
diff --git a/recipes/iproute2/iproute2_2.6.31.bb b/recipes/iproute2/iproute2_2.6.31.bb
index b952fa5..1100b27 100644
--- a/recipes/iproute2/iproute2_2.6.31.bb
+++ b/recipes/iproute2/iproute2_2.6.31.bb
@@ -4,6 +4,7 @@ PR = "${INC_PR}.0"
 
 SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
 	   file://new-flex-fix.patch \
+	   file://fix-cross-compile.patch \
 	  "
 
 S = "${WORKDIR}/iproute2-${PV}"
-- 
1.7.1





More information about the Openembedded-devel mailing list