workaround gcc bug 46926 by providing a dumb sincos implementation
authorRich Felker <dalias@aerifal.cx>
Sat, 19 Feb 2011 22:56:57 +0000 (17:56 -0500)
committerRich Felker <dalias@aerifal.cx>
Sat, 19 Feb 2011 22:56:57 +0000 (17:56 -0500)
note that this library itself is built with -ffreestanding so sincos.c
should not be miscompiled even if the gcc used to compile musl has
this bug.

src/linux/sincos.c [new file with mode: 0644]

diff --git a/src/linux/sincos.c b/src/linux/sincos.c
new file mode 100644 (file)
index 0000000..b69ffce
--- /dev/null
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <math.h>
+
+void sincos(double t, double *y, double *x)
+{
+       *y = sin(t);
+       *x = cos(t);
+}