Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/gnuplot: fix build failures on undefined FE_UNDERFLOW
@ 2024-09-24 15:36 Edgar Bonet
  2024-09-27 12:09 ` [Buildroot] [PATCH v2 " Edgar Bonet
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar Bonet @ 2024-09-24 15:36 UTC (permalink / raw)
  To: buildroot; +Cc: Michael Fischer, Anthony Viallard

Gnuplot carries the implicit assumption that, if the header fenv.h is
available, then it must define FE_UNDERFLOW. This assumption fails on
mips, mips64, nios2 and microblaze.

Fixes:
 - https://autobuild.buildroot.org/results/76a97b62e01c9778b31c52ad8d391ec54158643e
 - https://autobuild.buildroot.org/results/184d3e6ff0c2edc6511c55c858e7f8567a6c4738
 - https://autobuild.buildroot.org/results/ce018eef26faca25c260be94afc49e06a8b6ba2d
 - https://autobuild.buildroot.org/results/d43be86091c9bd9163c145264151532f0f485528
 - https://autobuild.buildroot.org/results/8568504e6b217c75f3309f5389ad55dd338d8600
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
---
 ...002-only-use-FE_UNDERFLOW-if-defined.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/gnuplot/0002-only-use-FE_UNDERFLOW-if-defined.patch

diff --git a/package/gnuplot/0002-only-use-FE_UNDERFLOW-if-defined.patch b/package/gnuplot/0002-only-use-FE_UNDERFLOW-if-defined.patch
new file mode 100644
index 0000000000..d288d01c0a
--- /dev/null
+++ b/package/gnuplot/0002-only-use-FE_UNDERFLOW-if-defined.patch
@@ -0,0 +1,31 @@
+From 0e2af8ab7ee444f30beda91151fec7d359ccffc6 Mon Sep 17 00:00:00 2001
+From: Edgar Bonet <bonet@grenoble.cnrs.fr>
+Date: Tue, 24 Sep 2024 15:38:56 +0200
+Subject: [PATCH 1/1] Only use FE_UNDERFLOW if it is defined
+
+According to fenv(3), the macro FE_UNDERFLOW is defined by fenv.h only
+if the implementation supports handling of the underflow exception. Do
+not assume the presence of fenv.h implies FE_UNDERFLOW is defined.
+
+Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
+Upstream: https://sourceforge.net/p/gnuplot/patches/816/
+---
+ src/complexfun.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/complexfun.c b/src/complexfun.c
+index a87d773c5..1d3c9aaf0 100644
+--- a/src/complexfun.c
++++ b/src/complexfun.c
+@@ -86,7 +86,7 @@
+ 	int_error(NO_CARET, "%s: error present on entry (errno %d %s)", who, errno, strerror(errno));
+ #endif
+ 
+-#ifdef HAVE_FENV_H
++#ifdef FE_UNDERFLOW
+ #define handle_underflow( who, var ) \
+     if (errno) { \
+ 	if (fetestexcept(FE_UNDERFLOW)) { \
+-- 
+2.34.1
+
-- 
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-20 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 15:36 [Buildroot] [PATCH 1/1] package/gnuplot: fix build failures on undefined FE_UNDERFLOW Edgar Bonet
2024-09-27 12:09 ` [Buildroot] [PATCH v2 " Edgar Bonet
2024-10-31 19:54   ` Thomas Petazzoni via buildroot
2024-11-20 21:41   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox