The issue is seen on x86 type of machines passing -march=bdverX (X=3,4 etc) flags but in general this should cause a problem when freshly built target modules are tried for an import during the cross build process. Aiding the PYTHONPATH (in PYTHON_FOR_BUILD) with CROSSPYTHONPATH which contains the native modules path resolves the issue. The issue can be reproduced on qemux86-64 builds by adding TUNE_CCARGS_pn-python=" -m64 -march=bdver4 -msse3 -mfpmath=sse" to local.conf. Although the failure is shown in do_install this actually is a compilation issue and can be confirmed by running do_compile a second time. An RFC patch (http://patchwork.openembedded.org/patch/106561/) was sent to OE-Core mailing list and then resent with RFC removed (http://patchwork.openembedded.org/patch/106627/) which I believe takes care of the issue correctly but both went un-answered.
Just to add that this can be confirmed through dev-shell once the build fails. bitbake -c devshell python edit the (srcdir)/setup.py script to first import sys and the print sys.path which is the path python is going to use for imports. The path does not contain references to sysroot (native) python modules location and then the interpreter tries to import from target's build dir.
I can confirm this isn't working, I do find it interesting this is necessary, since when executing python-native from a devshell and printing sys.path, one can see that it DOES include CROSSPYTHONPATH, but when it is executed via the makefile to install sharedmods, it doesn't, causing the failure, so I am just wondering if there might be a better fix, in the meantime, the patch seems to work.
Fixed here: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a1fa8d9ac53625737aab29b4e5e1687fc01bdfc2
Verified on master: 36b43b233c841b3c09fc17e04686b4b758780963