do_configure generates autoconf.h by compiling and running a
small lock-feature probe with the build-host compiler.
The Makefile hardcodes the target networking libs
(-lnet -lnsl, from the libnet/libnsl2 DEPENDS)
into LDFLAGS, but those only exist in the target sysroot,
so the native link fails with

'cannot find -lnet/-lnsl'

The probe does not use them, so override LDFLAGS for this native
step with just what it needs.

Signed-off-by: Khem Raj <[email protected]>
---
 meta-oe/recipes-support/procmail/procmail_3.24.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/procmail/procmail_3.24.bb 
b/meta-oe/recipes-support/procmail/procmail_3.24.bb
index 6767f87db6..01b48cd148 100644
--- a/meta-oe/recipes-support/procmail/procmail_3.24.bb
+++ b/meta-oe/recipes-support/procmail/procmail_3.24.bb
@@ -28,7 +28,13 @@ do_configure() {
     export CFLAGS="${BUILD_CFLAGS}"
     export AR="${BUILD_AR}"
     export AS="${BUILD_AS}"
-    oe_runmake TARGET_CFLAGS="$TARGET_CFLAGS -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64" LDFLAGS0="${BUILD_LDFLAGS}" LOCKINGTEST=100 autoconf.h
+    # autoconf.h is generated by compiling and running a small lock-feature
+    # probe with the build-host compiler. The Makefile hardcodes the target
+    # networking libs (-lnet -lnsl, from the libnet/libnsl2 DEPENDS) into
+    # LDFLAGS, but those only exist in the target sysroot, so the native link
+    # fails with "cannot find -lnet/-lnsl". The probe does not use them, so
+    # override LDFLAGS for this native step with just what it needs.
+    oe_runmake TARGET_CFLAGS="$TARGET_CFLAGS -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64" LDFLAGS0="${BUILD_LDFLAGS}" LDFLAGS="${BUILD_LDFLAGS} 
-lm -ldl -lc" LOCKINGTEST=100 autoconf.h
 }
 
 do_compile() {
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127927): 
https://lists.openembedded.org/g/openembedded-devel/message/127927
Mute This Topic: https://lists.openembedded.org/mt/120018151/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to