Bionic bindings for AArch64 and a Glibc/AArch64 fix#2148
Bionic bindings for AArch64 and a Glibc/AArch64 fix#2148dlang-bot merged 2 commits intodlang:masterfrom joakim-noah:aarch64
Conversation
|
Thanks for your pull request, @joakim-noah! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2148" |
| alias int key_t; | ||
| alias c_long suseconds_t; | ||
| alias c_long useconds_t; | ||
| alias uint useconds_t; // Updated in Lollipop |
There was a problem hiding this comment.
So the bindings will only ever support one version of Android?
There was a problem hiding this comment.
No, I believe every version since uses this now, just noting the version where the switch was made.
src/rt/sections_android.d
Outdated
| memcpy(p, pbeg, pend - pbeg); | ||
| *pary = p[0 .. pend - pbeg]; | ||
| } | ||
| }*/ |
There was a problem hiding this comment.
Just remove it if it is no longer used.
There was a problem hiding this comment.
This and all subsequent comments are because this pull is a Work-In-Progress, as noted in the OP. I'll clean it up once the functionality is set.
src/rt/sections_android.d
Outdated
| void* _tlsend; | ||
| size_t __bss_end__; | ||
|
|
||
| }extern |
There was a problem hiding this comment.
Avoids linker issues related to emulated TLS, just a hack for now.
src/core/sys/posix/signal.d
Outdated
| else version (CRuntime_Bionic) | ||
| { | ||
| enum SIGRTMIN = 32; | ||
| //enum SIGRTMIN = 32; |
There was a problem hiding this comment.
Remove rather than comment out?
src/core/stdc/stdlib.d
Outdated
| @trusted | ||
| { | ||
| version(CRuntime_Bionic) | ||
| version(none) |
ibuclaw
left a comment
There was a problem hiding this comment.
On the surface, it looks like there are a couple quick-fix or debug related changes here that need cleaning up.
| enum F_GETLK = 5; | ||
| enum F_SETLK = 6; | ||
| enum F_SETLKW = 7; | ||
| } |
There was a problem hiding this comment.
This turned up when trying to run this Phobos test on linux/AArch64, dug this fix out of the Glibc headers. It appears Glibc uses these constants on AArch64 regardless of whether __USE_FILE_OFFSET64 is set or not, just like on x64.
I don't want to go digging through the rat's nest of platform-specific Glibc headers to figure out why this is, so I just added this exception. If someone wants to do that digging and suggest a better way to normalize this, I'd be glad to make that change.
| } | ||
| } | ||
| else version (linux) | ||
| else version (CRuntime_Bionic) |
There was a problem hiding this comment.
I switched this to linux a couple years ago, maybe thinking it matched the kernel APIs, but now see that it doesn't. All other C runtimes that usually run on linux have their own version blocks above, so nobody other than Bionic users were likely using this.
|
ping @ibuclaw, no longer WIP, this pull is ready to go. |
| int __libc_current_sigrtmax(); | ||
| } | ||
|
|
||
| @property int SIGRTMIN() nothrow @nogc { |
There was a problem hiding this comment.
It's a straight copy-and-paste of the Glibc block above, as Bionic switched to using the same function-calling scheme as Glibc. If you'd prefer that both blocks use template functions, I can modify them to that, don't care.
Comments have been addressed; other platform SIGRTMIN implementations aren't templates either.
|
I don't know what's up with CircleCI, it can't build dmd? Would closing and re-opening this pull get it to kick off again and start working? |
Should work now as the compiler has been upgraded by #2205 |
|
This is fallout from Walter insisting on requiring an updated bootstrap compiler for no good reason – I've restarted the build. |
|
Thanks, now to cherry pick to ldc, which actually has an AArch64 backend. |
This is WIP, as right now it assumes llvm's brand of emulated TLS, which cannot be passed to the GC, so that part will have to change. Just putting this up early in case @ZombineDev or someone else wants to help with the Android/AArch64 port.