nspr failed to build on x86_64: | x86_64-poky-linux-gcc -m64 --sysroot=/buildarea2/lyangERROR: Function failed: do_compile (see /buildarea2/lyang1/tenth/tmp/work/x86_64-poky-linux/nspr-4.8.9-r2/temp/log.do_compile.9790 for further information) | 1/tenth/tmp/sysroots/qemux86-64 -m32 -o prfdcach.o -c -fvisibility=hidden -O2 -pipe -g -feliminate-unused-debug-types -Wall -g -fno-inline -fPIC -UNDEBUG -DDEBUG_lyang1 -DDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -Di386=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -D_REENTRANT=1 -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_ -I../../../dist/include/nspr -I/buildarea2/lyang1/tenth/tmp/work/x86_64-poky-linux/nspr-4.8.9-r2/nspr-4.8.9/mozilla/nsprpub/pr/include -I/buildarea2/lyang1/tenth/tmp/work/x86_64-poky-linux/nspr-4.8.9-r2/nspr-4.8.9/mozilla/nsprpub/pr/include/private prfdcach.c | In file included from /buildarea2/lyang1/tenth/tmp/sysroots/qemux86-64/usr/include/features.h:388:0, | from /buildarea2/lyang1/tenth/tmp/sysroots/qemux86-64/usr/include/pthread.h:23, | from /buildarea2/lyang1/tenth/tmp/work/x86_64-poky-linux/nspr-4.8.9-r2/nspr-4.8.9/mozilla/nsprpub/pr/include/private/primpl.h:50, | from prfdcach.c:38: | /buildarea2/lyang1/tenth/tmp/sysroots/qemux86-64/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory This is because there are both '-m64' and '-m32' in gcc's options, and the later one is used, but what we need is '-m64' since it is x86_64, this is caused by an incorrect logic in configure.in.
Fixed in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7b01671f54f70c28c98457058c51ffefcb07c0e8