-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
armv7l should not default to NEON enabled #1752
Comments
|
We ran into this at Debian too, since all armhf builders there are without NEON support. |
|
Does this affect actual code generation? In particular is the compiler still able to output NEON code? If yes, then we can enable this for package building, otherwise, I'm not willing to cripple the compiler just because the armhf builders lack NEON. I can always do a bin-NMU from a system that works properly. |
|
@markos Yes, but then you will output a compiler in the Debian archive which is unable to compile anything in Debian, which is even worse - currently, all reverse-dependencies on LDC on armhf are FTBFSing because of that. |
|
In that case, we could set default D_FLAGS in dpkg-buildflags that set this to all auto-builders, so that all D packages will be built without NEON by default. But I really would not want to cripple the compiler itself, because 90% of all ARM users will have a SoC with NEON and will expect to be able to use it. If we exclude this, they're just going to skip the packaged LDC. |
|
We can not set global |
|
ok, let's wait for @redstar to assure that disabling NEON in the compiler won't exclude NEON code generation entirely and if that's true, I'm not against disabling it with custom flags initially and then via some DFLAGS_LDC in dpkg-buildflags |
|
What does Clang do? IIRC the (micro)arch detection code was adapted from there. |
|
LDC built with itself using |
|
ok, I'll do it in a while. @kinke unfortunately by default, it built itself with neon enabled, which is why it failed on the neon-less buildds, causing the whole problem. Still, thanks for the hint! |
|
Yep I know that the actual issue here is the CPU/features detection, and to fix it we'll probably have to do what clang does. Pretty messy stuff for ARM apparently... |
So messy that our current logic, which is supposed to be a copy of what Clang does, apparently isn't comprehensive. ;) |
|
As far as I can tell, clang does things a substantially more elaborate way, see their huge Targets.cpp file. LLVM provides a |
|
Just ran into this again, and debugged it from scratch as it has been just long enough for this to slip from memory. The root cause seems to be that pretty much all of the ARMv7-A processors out there feature ARM Cortex-A cores, which come with NEON. Only Marvell and Nvidia seem to have rolled their own cores without NEON support. And LLVM doesn't even have an ARMv7-A CPU without NEON in |
|
I believe the most sensible option is to implicitly add the |
|
I'd prefer to go with LLVM/Clang behaviour in cases like this. See relevant discussion for Clang here: Is it really necessary to pessimize codegen for armv7 by default, or could Debian just add |
|
llvm switched to |
I moved the ARM buildbot slave to a different server. The new one is based on a Marvell PJ4 core. This is an ARMv7 architecture but without the NEON feature. The triple is
armv7l-unknown-linux-gnueabihf, like my old krait-based board. LLVM is not aware of this CPU. Indriver/targetmachine.cpp, functiongetARMTargetCPU(), thecortex-a8CPU is used for thearmv7larchitecture. This is an inappropriate choice because this CPU has the NEON feature enabled. Every D application crashes during startup.My work around was to use the options
-mcpu=generic -mattr=+v7,-neonbut this is really cumbersome.The text was updated successfully, but these errors were encountered: