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

* [Buildroot] [PATCH v2 1/1] package/gnuplot: fix build failures on undefined FE_UNDERFLOW
  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 ` Edgar Bonet
  2024-10-31 19:54   ` Thomas Petazzoni via buildroot
  2024-11-20 21:41   ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Edgar Bonet @ 2024-09-27 12:09 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
microblaze{,el}, mips{,64}{,el}, nios2 and or1k.

Fixes:
  - https://autobuild.buildroot.org/results/aa177c4f4f7c7429f052cebbf54f7027e4b2cabd/
  - https://autobuild.buildroot.org/results/868ca441daa2485b997f307edeede31dd229bfc2/
  - https://autobuild.buildroot.org/results/0a152cbfe23703bc5012098864d7fd5608775882/
  - https://autobuild.buildroot.org/results/d43be86091c9bd9163c145264151532f0f485528/
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
---
Changes v1 -> v2:
  - replaced the submitted patch with the version accepted upstream
    (different title and slightly different contents)
  - removed Upstream: link to the submitted patch
  - added Upstream: links to the accepted commits (for 'master' and the
    'branch-6-0-stable' maintenance branch)
  - in the commit log, updated the list of architectures where the build
    fails
  - in the commit log, updated Fixes: links to point to the latest
    failure on each architecture family

 .../0002-check-for-defined-FE_UNDERFLOW.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/gnuplot/0002-check-for-defined-FE_UNDERFLOW.patch

diff --git a/package/gnuplot/0002-check-for-defined-FE_UNDERFLOW.patch b/package/gnuplot/0002-check-for-defined-FE_UNDERFLOW.patch
new file mode 100644
index 0000000000..e84c72aaed
--- /dev/null
+++ b/package/gnuplot/0002-check-for-defined-FE_UNDERFLOW.patch
@@ -0,0 +1,32 @@
+From 806641b5ef504488f871b5cbd9e5c356d67d0bd1 Mon Sep 17 00:00:00 2001
+From: Edgar Bonet <bonet@grenoble.cnrs.fr>
+Date: Tue, 24 Sep 2024 20:03:18 -0700
+Subject: [PATCH] check for defined(FE_UNDERFLOW)
+
+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/gnuplot-main/ci/926d2c26d31f4b69feda372c76a28643ef45359d/
+Upstream: https://sourceforge.net/p/gnuplot/gnuplot-main/ci/806641b5ef504488f871b5cbd9e5c356d67d0bd1/
+---
+ src/complexfun.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/complexfun.c b/src/complexfun.c
+index 7a5d9a13f..7ddb4ed60 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
++#if defined (HAVE_FENV_H) && defined (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

* Re: [Buildroot] [PATCH v2 1/1] package/gnuplot: fix build failures on undefined FE_UNDERFLOW
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-31 19:54 UTC (permalink / raw)
  To: Edgar Bonet; +Cc: buildroot, Michael Fischer, Anthony Viallard

On Fri, 27 Sep 2024 14:09:01 +0200
Edgar Bonet <bonet@grenoble.cnrs.fr> wrote:

> Gnuplot carries the implicit assumption that, if the header fenv.h is
> available, then it must define FE_UNDERFLOW. This assumption fails on
> microblaze{,el}, mips{,64}{,el}, nios2 and or1k.
> 
> Fixes:
>   - https://autobuild.buildroot.org/results/aa177c4f4f7c7429f052cebbf54f7027e4b2cabd/
>   - https://autobuild.buildroot.org/results/868ca441daa2485b997f307edeede31dd229bfc2/
>   - https://autobuild.buildroot.org/results/0a152cbfe23703bc5012098864d7fd5608775882/
>   - https://autobuild.buildroot.org/results/d43be86091c9bd9163c145264151532f0f485528/
> Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
> ---
> Changes v1 -> v2:
>   - replaced the submitted patch with the version accepted upstream
>     (different title and slightly different contents)
>   - removed Upstream: link to the submitted patch
>   - added Upstream: links to the accepted commits (for 'master' and the
>     'branch-6-0-stable' maintenance branch)
>   - in the commit log, updated the list of architectures where the build
>     fails
>   - in the commit log, updated Fixes: links to point to the latest
>     failure on each architecture family

Applied to master, thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] package/gnuplot: fix build failures on undefined FE_UNDERFLOW
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2024-11-20 21:41 UTC (permalink / raw)
  To: Edgar Bonet; +Cc: buildroot, Michael Fischer, Anthony Viallard

>>>>> "Edgar" == Edgar Bonet <bonet@grenoble.cnrs.fr> writes:

 > Gnuplot carries the implicit assumption that, if the header fenv.h is
 > available, then it must define FE_UNDERFLOW. This assumption fails on
 > microblaze{,el}, mips{,64}{,el}, nios2 and or1k.

 > Fixes:
 >   - https://autobuild.buildroot.org/results/aa177c4f4f7c7429f052cebbf54f7027e4b2cabd/
 >   - https://autobuild.buildroot.org/results/868ca441daa2485b997f307edeede31dd229bfc2/
 >   - https://autobuild.buildroot.org/results/0a152cbfe23703bc5012098864d7fd5608775882/
 >   - https://autobuild.buildroot.org/results/d43be86091c9bd9163c145264151532f0f485528/
 > Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
 > ---
 > Changes v1 -> v2:
 >   - replaced the submitted patch with the version accepted upstream
 >     (different title and slightly different contents)
 >   - removed Upstream: link to the submitted patch
 >   - added Upstream: links to the accepted commits (for 'master' and the
 >     'branch-6-0-stable' maintenance branch)
 >   - in the commit log, updated the list of architectures where the build
 >     fails
 >   - in the commit log, updated Fixes: links to point to the latest
 >     failure on each architecture family

Committed to 2024.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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