Bug #526

Missing -mfpu=neon in CFLAGS/CXXFLAGS when building for ARM and NEON is supported but not gcc's default

Added by Sylvain Munaut almost 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:03/22/2013
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


You get errors like :

/tmp/cc8SYNiA.s:30: Error: selected FPU does not support instruction -- `vmov.f32 q8,#0.0'

And when using verbose mode, you can see there is no -mfpu=neon given to GCC. Retrying the same command with -mfpu=neon makes it compile.

The platform was a zynq, so it does support NEON and cmake properly detected support of it.


#2 Updated by Johnathan Corgan almost 2 years ago

  • Status changed from New to Feedback

#3 Updated by Sylvain Munaut almost 2 years ago

Well yes, using a toolchain file "fixes it" ... but IMHO that's only a work around. The build process does detect neon automatically properly and put the HAS_NEON (or similar) defines, but it doesn't set -mfpu=neon in the CFLAGS and it should do that on its own IMHO.

#4 Updated by Philip Balister almost 2 years ago

Detecting NEON is only part of the problem. You also need to work out the abi and possible the tune setting.

It is much easier (and safer) just to use a toolchain file.

And my cmake sucks :)

#5 Updated by Sylvain Munaut almost 2 years ago

My main point here is the behavior is not consistent. Either it uses neon automatically and it should set that CFLAG. Or it doesn't and expect the use to manually enable it and use a toolchain file. But here it enables assembly neon code automatically but doesn't set the CFLAG.

And my cmake sucks too or there would be a patch attached to this ticket :p

#6 Updated by Johnathan Corgan over 1 year ago

  • Status changed from Feedback to Resolved
  • Resolution set to wontfix

#7 Updated by Johnathan Corgan over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF