[oe-commits] Khem Raj : libnl_1.1.bb: Fix the build when libnl2 is staged

git version control git at git.openembedded.org
Thu Sep 23 14:53:46 UTC 2010


Module: openembedded.git
Branch: master
Commit: 1fc3b764c48de84260fe9560c66930388cbaa058
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1fc3b764c48de84260fe9560c66930388cbaa058

Author: Khem Raj <raj.khem at gmail.com>
Date:   Wed Sep 22 15:02:53 2010 -0700

libnl_1.1.bb: Fix the build when libnl2 is staged

Currently linker would search for libnl in sysroot
first before linking in the one thats build with libnl
this patch directs ld to link in with the one thats
build and not look for the one in sysroot.

As a result we can compile libnl and libnl2 alongside

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../libnl/files/dont-link-libnl-from-sysroot.patch |   26 ++++++++++++++++++++
 recipes/libnl/libnl_1.1.bb                         |    6 +---
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/recipes/libnl/files/dont-link-libnl-from-sysroot.patch b/recipes/libnl/files/dont-link-libnl-from-sysroot.patch
new file mode 100644
index 0000000..beb6361
--- /dev/null
+++ b/recipes/libnl/files/dont-link-libnl-from-sysroot.patch
@@ -0,0 +1,26 @@
+Index: libnl-1.1/src/Makefile
+===================================================================
+--- libnl-1.1.orig/src/Makefile	2008-01-14 07:48:45.000000000 -0800
++++ libnl-1.1/src/Makefile	2010-09-22 14:58:46.820826001 -0700
+@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ]
+     include ../Makefile.opts
+ endif
+ 
+-LDFLAGS	+= -L../lib -lnl utils.o
++LDFLAGS	+= ../lib/libnl.so utils.o
+ CIN 	:= $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c)
+ TOOLS	:= $(CIN:%.c=%)
+ 
+Index: libnl-1.1/tests/Makefile
+===================================================================
+--- libnl-1.1.orig/tests/Makefile	2008-01-14 07:48:45.000000000 -0800
++++ libnl-1.1/tests/Makefile	2010-09-22 14:58:46.820826001 -0700
+@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ]
+     include ../Makefile.opts
+ endif
+ 
+-LDFLAGS	+= -L../lib -lnl ../src/utils.o
++LDFLAGS	+= ../lib/libnl.so ../src/utils.o
+ CIN 	:= $(wildcard test-*.c)
+ TOOLS	:= $(CIN:%.c=%)
+ 
diff --git a/recipes/libnl/libnl_1.1.bb b/recipes/libnl/libnl_1.1.bb
index 06059ca..f1b2a9d 100644
--- a/recipes/libnl/libnl_1.1.bb
+++ b/recipes/libnl/libnl_1.1.bb
@@ -3,10 +3,7 @@ SECTION = "libs/network"
 LICENSE = "LGPL"
 HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
 
-# If you get errors like : undefined reference to `nl_handle_alloc
-# do a bitbake -c clean libnl2
-
-PR = "r3"
+PR = "r4"
 
 inherit autotools pkgconfig
 
@@ -18,6 +15,7 @@ SRC_URI = "\
   file://fix-includes.patch \
   file://respect-ldflags.patch \
   file://netlink-local-fix.patch \
+  file://dont-link-libnl-from-sysroot.patch \
 "
 
 





More information about the Openembedded-commits mailing list