1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00
freebsd-ports/devel/flang/files/patch-runtime_flang_cdexp.c
Johannes M Dieterich ab65c68313 devel/flang, devel/flang-clang: Upgrade to use LLVM5.0 as the backend compiler and use clang from upstream's LLVM5 branch.
While there, also remove all potential calls to sincos() as the function is, in difference to what man (3) sincos reports on HEAD, not available in either 10 or 11 branches.

Reported by:	jrm (sincos issue on 10/11)
Reviewed by:	swills (mentor)
Approved by:	swills (mentor), jrm (tested math/R with it)
Differential Revision:	https://reviews.freebsd.org/D12735
2017-10-23 14:18:15 +00:00

13 lines
328 B
C

--- runtime/flang/cdexp.c.orig 2017-10-19 11:03:03 UTC
+++ runtime/flang/cdexp.c
@@ -24,7 +24,8 @@ ZMPLXFUNC_Z(__mth_i_cdexp)
ZMPLXARGS_Z;
double x, y, z;
x = exp(real);
- __mth_dsincos(imag, &z, &y);
+ z = sin(imag);
+ y = cos(imag);
y *= x;
z *= x;
ZRETURN_D_D(y, z); /* should leave y & z in appropriate