From 5a2c38a8cf33fc811b66e25ab3c970eb6ff5bfe8 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 20 Apr 2019 20:50:09 -0700 Subject: Expand on `long double` hack a bit --- doc/software.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc') 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/ -- cgit v1.2.3