summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/mpfr/mpfr/0001-include-math.h-to-use-predefined-_Float128-definitio.patch44
-rw-r--r--meta/recipes-support/mpfr/mpfr_4.2.1.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-support/mpfr/mpfr/0001-include-math.h-to-use-predefined-_Float128-definitio.patch b/meta/recipes-support/mpfr/mpfr/0001-include-math.h-to-use-predefined-_Float128-definitio.patch
new file mode 100644
index 0000000000..0dcbdce0db
--- /dev/null
+++ b/meta/recipes-support/mpfr/mpfr/0001-include-math.h-to-use-predefined-_Float128-definitio.patch
@@ -0,0 +1,44 @@
1From 4f2af1afce6edb4ba1dfc9bb4849c9f300efe213 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 26 Dec 2024 19:44:12 -0800
4Subject: [PATCH] include math.h to use predefined _Float128 definition
5
6glibc has added this patch [1] which defines __HAVE_FLOAT128 for clang
7therefore include math.h to avoid defining _Float128 during configure if
8not needed.
9
10Fixes
11cannot combine with previous '__float128' declaration specifier
12
13[1] https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/x86/bits/floatn.h;h=ba030d270a73c71f166083b30dbaf89371ff49fa;hp=e661abaea469b8b916fd312cc42382ad4c5e220f;hb=d773aff467840f5ed305e40c180466e90bd88183;hpb=b2556550a0f952b2a841a0b4bddc999c2df1b233
14
15Upstream-Status: Submitted [https://sympa.inria.fr/sympa/arc/mpfr/2024-12/msg00001.html]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 acinclude.m4 | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/acinclude.m4 b/acinclude.m4
22index 3d7910517..65c4eb9fd 100644
23--- a/acinclude.m4
24+++ b/acinclude.m4
25@@ -805,8 +805,9 @@ dnl the "undefined reference" error disappear.
26 if test "$enable_float128" != no; then
27 AC_MSG_CHECKING(if _Float128 with hex constants is supported)
28 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
29-volatile _Float128 x = 0x1.fp+16383f128;
30-return x == 0;
31+ #include <math.h>
32+ volatile _Float128 x = 0x1.fp+16383f128;
33+ return x == 0;
34 ]])],
35 [AC_MSG_RESULT(yes)
36 AC_DEFINE([MPFR_WANT_FLOAT128],1,[Build float128 functions])],
37@@ -816,6 +817,7 @@ dnl Use the q suffix in this case.
38 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
39 #define _Float128 __float128
40 ]], [[
41+#include <math.h>
42 volatile _Float128 x = 0x1.fp+16383q;
43 return x == 0;
44 ]])],
diff --git a/meta/recipes-support/mpfr/mpfr_4.2.1.bb b/meta/recipes-support/mpfr/mpfr_4.2.1.bb
index 9558eab828..423ac46783 100644
--- a/meta/recipes-support/mpfr/mpfr_4.2.1.bb
+++ b/meta/recipes-support/mpfr/mpfr_4.2.1.bb
@@ -14,6 +14,7 @@ CVE_PRODUCT = "gnu_mpfr"
14DEPENDS = "gmp autoconf-archive-native" 14DEPENDS = "gmp autoconf-archive-native"
15 15
16SRC_URI = "https://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz" 16SRC_URI = "https://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz"
17SRC_URI += "file://0001-include-math.h-to-use-predefined-_Float128-definitio.patch"
17SRC_URI[sha256sum] = "277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2" 18SRC_URI[sha256sum] = "277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2"
18 19
19UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/" 20UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"