x11-libs/qt-* configure scripts default to automatic detection of NEON support on ARM, which only checks whether or not the compiler returns an error when NEON instructions are requested. This does not work on Nvidia Tegra2, which is armv7a but without support for NEON. Explicit disabling of NEON instructions is supported via -no-neon configure switch, though. Suggestion is to amend qt4-build.eclass with support for USE=-neon, patch to follow shortly. Reproducible: Always
Created attachment 302881 [details, diff] Trivial addition to qt4-build.eclass to pass -no-neon when USE=-neon
The patch looks good but the "myconf" line should be placed further down, right after the "case "$(tc-arch)"" statement
Can you please elaborate a bit more? What problems does this cause? Build failure? Runtime crash? Note that qt checks at runtime if cpu-specific optimizations can be used, the configure results are used only to decide whether to compile neon code or not.
(In reply to comment #3) > Can you please elaborate a bit more? What problems does this cause? Build > failure? Runtime crash? It's causing runtime crashes in certain Qt-based programs (not all). Unfortunately, it would be difficult for me to reproduce a crash now, as I compile stuff natively on a Toshiba AC100 (which is still not too fast). > Note that qt checks at runtime if cpu-specific optimizations can be used, the > configure results are used only to decide whether to compile neon code or not. NEON instructions require -mfpu=neon, which on armv7a-hardfloat* causes generated code to be calltime-incompatible with the rest of the system (built with -mfpu=vfpv3-d16) if it uses any floating-point functions. So it's not only about optimizations in this case.
Created attachment 302945 [details, diff] Trivial addition to qt4-build.eclass to pass -no-neon when USE=-neon Moved the myconf line further down as Markos suggested, also included a descriptive comment.
Seems like this could be reported upstream too. Anyway, you said you compiled the rest of the system with -mfpu=vfpv3-d16, which should cause the configure check to fail... Could you provide the relevant portion of build.log for qt-gui?
Sorry for the fuss. Just checked compilation with and without my patch, and both work as expected. In fact, revision 1.113 on 2011-12-31 made the configure tests behave correctly by passing correct C{,XX}FLAGS, which now results in the NEON check failing with -mfloat-abi=hard -mfpu=vfpv3-d16. So, my local overrides are no longer necessary, which I haven't noticed :-) Thanks for your work, guys!