-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
porting to the s390x/SystemZ architecture #4171
Comments
The intention is to use this issue to track the work required and keep the various teams working on it in sync. |
Awesome, most of the changes to druntime I assume are independent of LDC (i.e. they could in theory be used by GDC)? If so they should be targeted upstream to |
for the record, those are the linking errors I am seeing
|
ack |
Thx for taking this on! - I assume you've already handled Line 65 in 10fa03f
__float128 , while the host compiler (LDC I assume) mangles it as long double . The extern(C++) mangle can be changed here: Line 1769 in 10fa03f
'g' apparently).
|
yes, I did, as
|
but let's the s390x toolchains guys to chime in ... |
and there is progress, no more missing
|
👍
Okay so the SysZ C ABI seems to use some In order not to have to implement a proper ABI right from the start, I would focus on using an apparently working GDC as host compiler, and try to incrementally fix the failing tests, which include various ABI, varargs and C[++] interop tests. LDC itself as mixed D/C++ code base is significantly harder to get working than a regular D-only project, where the ABI doesn't really matter yet. Edit: I.e., most tests need to pass before LDC can build itself for a new platform. |
Did you ever end up submitting any of the s390x fixes upstream? Even if the work is incomplete, it would be nice to get some of the fixes in so that other people could pick up the work more easily. |
Because of the requirement for D language compiler to be available across all platforms Fedora supports, I have started to look into what's missing in the s390x support in LDC. I have a dirty/interim patchset to move forward in the build and here is the summary of the changes I made so far:
runtime/druntime/src/rt/sections_elf_shared.d
TLS_DTV_OFFSET
definitiongetTLSRange()
because the expected__tls_get_addr()
doesn't exist, see https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libphobos/libdruntime/gcc/sections/elf.d;h=5819811f3fec8ad0e34cb4e3b76a1fcf2d3d515d;hb=HEAD#l1086runtime/druntime/src/rt/dwarfeh.d
is missing the platform's EH register numbersruntime/druntime/src/core/thread/osthread.d
callWithStackShell()
runtime/druntime/src/core/threadasm.S
fiber_switchContext
__ibmz_get_tls_offset()
needed bygetTLSRange()
gen/target.cpp
- add mapping of real / long double type to LLVMIt allows me to build the bootstrap compiler, but later fails due some missing
__float128
methods/functions inlibldc.a
.update 2022-09-16
runtime/druntime/src/core/thread/fiber.d
- implementinitStack()
The text was updated successfully, but these errors were encountered: