Issue 18810 - root/ctfloat depends upon backend
Summary: root/ctfloat depends upon backend
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2018-04-29 12:50 UTC by Richard (Rikki) Andrew Cattermole
Modified: 2019-04-08 04:46 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Richard (Rikki) Andrew Cattermole 2018-04-29 12:50:43 UTC
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 kinke 2018-11-12 20:43:59 UTC
In the meantime, ld_sprint is now in D (dmd.root.longdouble), while strtold_dm is still in C.
Comment 2 Walter Bright 2018-12-14 04:04:19 UTC
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 kinke 2018-12-14 11:28:18 UTC
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 Dlang Bot 2019-04-07 12:59:29 UTC
@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 Dlang Bot 2019-04-08 04:46:34 UTC
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