[oe-commits] Ross Burton : pseudo: warn twice if the 32-bit toolchain appears broken

git at git.openembedded.org git at git.openembedded.org
Thu Sep 26 16:03:02 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 51950fcbe4b98bdbb8b3dde88a8729e540d9609f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=51950fcbe4b98bdbb8b3dde88a8729e540d9609f

Author: Ross Burton <ross.burton at intel.com>
Date:   Thu Sep 26 11:41:36 2013 +0100

pseudo: warn twice if the 32-bit toolchain appears broken

Putting a warning at the top of do_compile is useful but not everyone reads the
file from beginning to end, so use a trap to put the message at the bottom too.

[ YOCTO #4919 ]

Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/pseudo/pseudo.inc |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index a287629..0471cd6 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -56,9 +56,7 @@ maybe_make32() {
 	fi
 	if $make32; then
 		if ! [ -e "/usr/include/gnu/stubs-32.h" ]; then
-			bbwarn "Can't find stubs-32.h, but usually need it to build 32-bit libpseudo."
-			bbwarn "If the build fails, install 32-bit developer packages."
-			bbwarn "If you are using 32-bit binaries, the 32-bit libpseudo is NOT optional."
+			warn_32bit_missing
 		else
 			bbnote "Attempting to build 32-bit libpseudo.so for ${PN}."
 		fi
@@ -68,6 +66,12 @@ maybe_make32() {
 	fi
 }
 
+warn_32bit_missing() {
+	bbwarn "Can't find stubs-32.h, but usually need it to build 32-bit libpseudo."
+	bbwarn "If the build fails, install 32-bit developer packages."
+	bbwarn "If you are using 32-bit binaries, the 32-bit libpseudo is NOT optional."
+}
+
 # Two below are the same
 # If necessary compile for the alternative machine arch.  This is only 
 # necessary in a native build.
@@ -83,7 +87,10 @@ do_compile_prepend_class-native () {
 		make ${MAKEOPTS} distclean || :
 
 		./configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
+		save_traps=$(trap)
+		trap 'warn_32bit_missing' 0
 		oe_runmake ${MAKEOPTS} libpseudo
+		eval "$save_traps"
 		# prevent it from removing the lib, but remove everything else
 		make 'LIB=foo' ${MAKEOPTS} distclean 
 	fi



More information about the Openembedded-commits mailing list