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 over 1 year ago. Updated over 1 year ago.

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

0%

Category:build
Target version:-
Resolution:wontfix

Description

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.

History

#2 Updated by Johnathan Corgan over 1 year ago

  • Status changed from New to Feedback

#3 Updated by Sylvain Munaut over 1 year 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 over 1 year 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 over 1 year 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