[oe-commits] Khem Raj : iproute2: Use $CC in configure tests.

git version control git at git.openembedded.org
Tue Dec 15 13:46:18 UTC 2009


Module: openembedded.git
Branch: martin_jansa/srcpv
Commit: 27e3eff536a83312ad24052570d5056f8bfe8544
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=27e3eff536a83312ad24052570d5056f8bfe8544

Author: Khem Raj <raj.khem at gmail.com>
Date:   Mon Dec 14 11:19:24 2009 -0800

iproute2: Use $CC in configure tests.

* Switch to INC_PR
* honor LDFLAGS env var.
* Use CC env var in configure tests
  currently it uses native gcc which
  is wrong in cross compilation context.
* Fix PR 5147

Signed-off-by: Erik Boto <erik.boto at gmail.com>
Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../iproute2-2.6.29/use-cross-compiler.patch       |   53 ++++++++++++++++++++
 recipes/iproute2/iproute2.inc                      |    2 +
 recipes/iproute2/iproute2_2.6.18.bb                |    2 +-
 recipes/iproute2/iproute2_2.6.20.bb                |    2 +-
 recipes/iproute2/iproute2_2.6.22.bb                |    2 +-
 recipes/iproute2/iproute2_2.6.29.bb                |    3 +-
 6 files changed, 60 insertions(+), 4 deletions(-)

diff --git a/recipes/iproute2/iproute2-2.6.29/use-cross-compiler.patch b/recipes/iproute2/iproute2-2.6.29/use-cross-compiler.patch
new file mode 100644
index 0000000..be5d31d
--- /dev/null
+++ b/recipes/iproute2/iproute2-2.6.29/use-cross-compiler.patch
@@ -0,0 +1,53 @@
+Patch to tc/Makefile is from 
+http://bugs.gentoo.org/236861
+
+configure patch is based on suggestion from
+PR 5117
+
+http://bugs.openembedded.org/show_bug.cgi?id=5147
+
+-Khem
+Index: iproute2-2.6.29/configure
+===================================================================
+--- iproute2-2.6.29.orig/configure	2009-12-14 11:07:42.000000000 -0800
++++ iproute2-2.6.29/configure	2009-12-14 11:08:38.000000000 -0800
+@@ -16,7 +16,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
+@@ -49,7 +49,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
+@@ -81,7 +81,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
+Index: iproute2-2.6.29/tc/Makefile
+===================================================================
+--- iproute2-2.6.29.orig/tc/Makefile	2009-12-14 11:10:27.000000000 -0800
++++ iproute2-2.6.29/tc/Makefile	2009-12-14 11:11:39.000000000 -0800
+@@ -100,7 +100,7 @@ clean:
+ 	rm -f emp_ematch.yacc.output
+ 
+ q_atm.so: q_atm.c
+-	$(CC) $(CFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
++	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
+ 
+ %.yacc.c: %.y
+ 	$(YACC) $(YACCFLAGS) -o $@ $<
diff --git a/recipes/iproute2/iproute2.inc b/recipes/iproute2/iproute2.inc
index 8c8519f..9792bad 100644
--- a/recipes/iproute2/iproute2.inc
+++ b/recipes/iproute2/iproute2.inc
@@ -4,6 +4,8 @@ SECTION = "base"
 LICENSE = "GPL"
 DEPENDS = "flex-native bison-native"
 
+INC_PR = "r3"
+
 # Set the DATE in the .bb file
 SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}-${DATE}.tar.gz"
 
diff --git a/recipes/iproute2/iproute2_2.6.18.bb b/recipes/iproute2/iproute2_2.6.18.bb
index d442a09..32e8711 100644
--- a/recipes/iproute2/iproute2_2.6.18.bb
+++ b/recipes/iproute2/iproute2_2.6.18.bb
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "${INC_PR}.0"
 
 require iproute2.inc
 
diff --git a/recipes/iproute2/iproute2_2.6.20.bb b/recipes/iproute2/iproute2_2.6.20.bb
index e72dfcc..dd1a504 100644
--- a/recipes/iproute2/iproute2_2.6.20.bb
+++ b/recipes/iproute2/iproute2_2.6.20.bb
@@ -1,6 +1,6 @@
 require iproute2.inc
 
-PR = "r2"
+PR = "${INC_PR}.0"
 DATE = "070313"
 
 SRC_URI_append = " file://new-flex-fix.patch;patch=1 \
diff --git a/recipes/iproute2/iproute2_2.6.22.bb b/recipes/iproute2/iproute2_2.6.22.bb
index 1ee0ce7..55e3a75 100644
--- a/recipes/iproute2/iproute2_2.6.22.bb
+++ b/recipes/iproute2/iproute2_2.6.22.bb
@@ -1,6 +1,6 @@
 require iproute2.inc
 
-PR = "r1"
+PR = "${INC_PR}.0"
 DATE = "070710"
 
 SRC_URI_append = " file://new-flex-fix.patch;patch=1 \
diff --git a/recipes/iproute2/iproute2_2.6.29.bb b/recipes/iproute2/iproute2_2.6.29.bb
index d02573a..d38dde8 100644
--- a/recipes/iproute2/iproute2_2.6.29.bb
+++ b/recipes/iproute2/iproute2_2.6.29.bb
@@ -1,10 +1,11 @@
 require iproute2.inc
 
-PR = "r1"
+PR = "${INC_PR}.0"
 
 SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
 	   file://new-flex-fix.patch;patch=1 \
 	   file://compilation-fix.patch;patch=1 \
+	   file://use-cross-compiler.patch;patch=1 \
 	  "
 
 S = "${WORKDIR}/iproute2-${PV}"





More information about the Openembedded-commits mailing list