diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-20 20:50:09 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-20 20:57:07 -0700 |
commit | 5a2c38a8cf33fc811b66e25ab3c970eb6ff5bfe8 (patch) | |
tree | f17a84386c43afb70f5a62fc41bce09069706d22 /doc | |
parent | 82590e5121136414c78d17454d666084d7b19302 (diff) |
Expand on `long double` hack a bit
Diffstat (limited to 'doc')
-rw-r--r-- | doc/software.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/software.md b/doc/software.md index 10511f2..e863711 100644 --- a/doc/software.md +++ b/doc/software.md @@ -17,8 +17,15 @@ On glibc systems, you must make sure to include `crtbegin.o` and `crtend.o` from gcc at the end of `startfiles` and beginning of `endfiles` respectively. -On musl systems, you must define `long double` to match `double` to -avoid errors in unused `static inline` functions in musl's `math.h`. +On musl systems, you must define `long double` to match `double` (as +below) to avoid errors in unused `static inline` functions in musl's +`math.h`. Note: this is a hack and won't be ABI-incompatible with musl; +things will break if any functions with `long double` get called. + +```diff +-struct type typeldouble = {.kind = TYPELDOUBLE, .size = 16, .align = 16}; // XXX: not supported by qbe ++struct type typeldouble = {.kind = TYPELDOUBLE, .size = 8, .align = 8, .repr = &f64}; +``` Requires several patches available here: https://github.com/michaelforney/binutils-gdb/ |