@@ -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() {
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 <khem.raj@oss.qualcomm.com> --- meta-oe/recipes-support/procmail/procmail_3.24.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)