[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1001314: mozjs78: FTBFS on armhf: '-mfloat-abi=hard': selected architecture lacks an FPU



On 08/12/2021 09:48, Simon McVittie wrote:
On Wed, 08 Dec 2021 at 09:41:29 +0000, Simon McVittie wrote:
At a guess, perhaps the problem is that the mozjs build system is explicitly
specifying -march=armv7-a when it should be something like
-march=armv7-a+vfpv3 or accepting the compiler's default?

Looks like this might be the same issue fixed by
https://github.com/alexcrichton/cc-rs/commit/b2f6b146b75299c444e05bbde50d03705c7c4b6e

Certainly looks like it to me.

The Debian gcc packages changed how they specify floating point options,
they now use "-march" to set both the CPU and FPU rather than using
seperate "-march" and "-mfpu" options.

The result of this change is if you manually set "-march" then it
overrides the built-in defaults for both the CPU and FPU rather than
only overriding the CPU. If your new "-march" setting doesn't specify
a FPU and you don't set a seperate "-mpfpu" option then you end up
with an invalid configuration (hard float ABI selected but no FPU
selected).

The default -march value on Debian armhf is "armv7-a+fp". You should
*NOT* use "armv7-a+vfpv3" as that specifies the version of vfpv3
with 32 double precision registers which is above the Debian baseline.

https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html


Reply to: