-
Notifications
You must be signed in to change notification settings - Fork 18k
question: ARM v5 not working on Android with clang #29729
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
Comments
Did you set the GOARM env var? |
Sure I did, check example commands. My guess 'go' using extended commands set even when limited by GOARM=5. I even tried to complie booth GOARM=5 and GOARM=7 - file size is different. |
We have a continuous build running against real ARMv5 hardware, so I suspect a problem with your environment. When you say "Using NDK r16b", I assume that's some Android thing? Maybe @eliasnaur can help. But we don't officially support the Android layers. ARMv5 works fine for the Go SDK, at least. Maybe you're missing some cross-compilation flags for clang. |
Support for the "armeabi" ABI that targets armv5 and armv6 was removed in the latest NDK, r17 ( https://developer.android.com/ndk/guides/abis). If Google doesn't want to support armeabi anymore, I don't think it is worth it for Go, sorry. |
Related to build issues, without CC 'go' also failed on OSX:
|
That's expected; the macOS compiler can't target GOOS=android. |
Ok. I figured it out. But here is a problem. When compiling a library 'go build' gives no flags to control '-Wl,-z,relro'. This flag should not be used when compiled for armv5 (otherwise it crahes). I have to modify toolchain to make it work. 'relro' hardcoded in golang source. |
|
Oh, sorry, we are passing relro, and you need to turn it off?
|
Yep, I need to turn it off. Here is no way except having standalone custom toolchain with cut the option using bash wrapper or recompiling golang from source. PS: ok it working... |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Trying to run "hello world" on armv6l, crosscompiling as ARMV5, getting SIGILL or SIGSEGV
Using NDK r16b:
Officially ARMv5 supported by Golang, and I'd like to see CPU supported list expanding and not shrinking. Golang promising, and can be better then 'C' unless it will not stop growing...
crash
OutputThe text was updated successfully, but these errors were encountered: