Bug 18810 – root/ctfloat depends upon backend

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-04-29T12:50:43Z
Last change time
2019-04-08T04:46:34Z
Keywords
pull
Assigned to
No Owner
Creator
Richard Cattermole

Comments

Comment #0 by alphaglosined — 2018-04-29T12:50:43Z
For Windows using -m64 or -m32mscoff root/ctfloat depends upon the backend for the symbols ld_sprint and strtold_dm. They are defined in el.c and strtold.c. This is a blocker for dmd as a library depending upon how it is used. LDC[0] has outright removed both symbols. [0] https://github.com/ldc-developers/ldc/blob/a9c76cff3af12aca3d5335633f14fd51a7416682/dmd/root/ctfloat.d#L38
Comment #1 by kinke — 2018-11-12T20:43:59Z
In the meantime, ld_sprint is now in D (dmd.root.longdouble), while strtold_dm is still in C.
Comment #2 by bugzilla — 2018-12-14T04:04:19Z
Why not just add strtold_dm.c to the LDC project? I'm not sure why it has to be translated to be D to be useful in LDC?
Comment #3 by kinke — 2018-12-14T11:28:18Z
Just to be clear, LDC itself has no need for ld_sprint or strtold_dm. We let LLVM do the parsing and printing (in arbitrary precision). DMD needs it for building with an LDC host compiler on Windows, as LDC uses a double-precision `real` on Windows/MSVC targets.
Comment #4 by dlang-bot — 2019-04-07T12:59:29Z
@rainers updated dlang/dmd pull request #9573 "translate strtold.c to strtold.d" fixing this issue: - fix Issue 18810 - root/ctfloat depends upon backend translate strtold.c to D https://github.com/dlang/dmd/pull/9573
Comment #5 by dlang-bot — 2019-04-08T04:46:34Z
dlang/dmd pull request #9573 "translate strtold.c to strtold.d" was merged into master: - 67d7642915bb73949876b5091e9fa1f05a568d6b by Rainer Schuetze: fix Issue 18810 - root/ctfloat depends upon backend translate strtold.c to D https://github.com/dlang/dmd/pull/9573