On 2016-12-26 22:52 +0100, Gaudenz Steinlin wrote: > > Hi > > The build of the most recent version of ceph fails on armel[1]. As far > as I understand the log, the first failure (a bit above the end of the > log) is because armel does not support NEON (-mfpu=neon) despite the > configure check for this succeeding. > > The autotools based build system uses the following check: > AX_CHECK_COMPILE_FLAG(-mfpu=neon, ax_cv_support_neon_ext=yes, []) > > Is it correct that for armel NEON has to be disabled or this there a way > to support NEON instructions on armel? You cannot assume neon is present on armel hardware, and more significantly its use is not supported by the ABI. I presume the check is testing the build machine, which is not relevant in this case. (The same machines build armel and armhf, IIRC and are relatively modern, so at least some of them have neon available). Neon must be disabled on armel. If a piece of software cannot do this, and requires neon unconditionally then it is not suitable for armel. > And how could I fix the above test to correctly disable NEON for > armel. The check for neon is 'correct' in the narrow sense that it determines whether the installed compiler can run with this flag set. This should fail the same way it does later when the build is tried - I don't know why it isn't. Explicitly checking for the combination of '-mfpu-neon -mfloat-abi=softp' should have the desired effect (give an error at test time so it doesn't try to build the extra plugin). It's not clear why this is not already the effective test. Patching the build to simply not use -mfpu=neon (nor check for it) will result in a non-neon build on armel as the armel gcc defaults are correct. Note that neon may not be present on armhf machines either, so building with an alternate fallback code path (run-time determined) there is correct, but you'll generally get away with it, as most machines do in fact have this unit. We probably have a lot of software not dealing with this properly. > AFAICS the build failure appears if a source file uses > "#include <arm_neon.h>". > > AFAIU the build tries to build a plugin with NEON instructions to be > used depending on runtime detection. Wookey -- Principal hats: Linaro, Debian, Wookware, ARM http://wookware.org/
Attachment:
signature.asc
Description: Digital signature