From b54cc8898881d39bcd2be805d53ec26a4041d701 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Thu, 3 Oct 2024 14:30:23 +0200 Subject: [PATCH] [PATCH] rts: Fix invocation of __ieee_set_fp_control() on alpha-linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | Gbp-Pq: Name alpha-fix-ieee_set_fp_control-invocation.patch --- rts/posix/Signals.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 1d96fcfd..06e3bac0 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -21,7 +21,7 @@ #if defined(alpha_HOST_ARCH) # if defined(linux_HOST_OS) -# include +# include # else # include # endif @@ -706,7 +706,11 @@ initDefaultHandlers(void) #endif #if defined(alpha_HOST_ARCH) +# if defined(linux_HOST_OS) + __ieee_set_fp_control(0); +# else ieee_set_fp_control(0); +# endif #endif // ignore SIGPIPE; see #1619 -- 2.30.2