[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 2021-12-08 20:11 +0000, peter green wrote:
> 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.

OK. That explains some things I've been noticing recently.

> The default -march value on Debian armhf is "armv7-a+fp". You should

Shouldn't it be "armv7-a+nosimd+fp", because neon is not assumed to be present on armhf?
All neon code has to be gated on a HWCAP check, so the default should exclude it.

I recently found a case where gcc11 helpfully put a neon optimisation
into the init code of a complilation unit (zeroing variables), which
of course means the program crashes on started on non-neon hardware.
To be fair it only did that with -mfpu=neon set, but I'm not sure that it can't happen with a
default march=armv7-a+fp

OK. I just checked and in fact it doesn't do this optimisation if
built with -march=armv7-a+fp so I guess there is an implicit assumption that everything not listed is disabled?
Do we actually know for sure or shall I try and find out from some compiler engineers?

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: