summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-10-01 10:54:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-02 10:09:48 +0100
commitefa2caab22e5c9b37132f869c91b8cbb400df1ee (patch)
tree969f887f7193b1f32a3ad91708007f17b717d3fd /meta
parent42627175955260a26db549db5ec5813c2339aa99 (diff)
downloadpoky-efa2caab22e5c9b37132f869c91b8cbb400df1ee.tar.gz
ruby: configure mis-detects isnan/isinf on musl
The configure script does not detect isnan/isinf as macros as is the case in musl: checking for isinf... no checking for isnan... no Backport an upstream patch from 2.7.0-preview1 to address this: checking whether isinf is declared... yes checking whether isnan is declared... yes (From OE-Core rev: b1afaccdba31341cace4b8d84d118ca76098587e) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch101
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.5.5.bb1
2 files changed, 102 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
new file mode 100644
index 0000000000..4cc1fa027f
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
@@ -0,0 +1,101 @@
1From 3a8189530312e81d6c005c396565f985a47f3383 Mon Sep 17 00:00:00 2001
2From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
3Date: Fri, 8 Feb 2019 07:22:55 +0000
4Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ruby-core:91487] [Bug #15595]
10
11git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
12
13---
14Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94]
15(modified so as to apply cleanly here)
16Signed-off-by: André Draszik <andre.draszik@jci.com>
17---
18 aclocal.m4 | 1 +
19 configure.ac | 13 ++++---------
20 tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++
21 3 files changed, 18 insertions(+), 9 deletions(-)
22 create mode 100644 tool/m4/ruby_replace_funcs.m4
23
24diff --git a/aclocal.m4 b/aclocal.m4
25index 18ba297b05..2a907b3467 100644
26--- a/aclocal.m4
27+++ b/aclocal.m4
28@@ -13,3 +13,4 @@
29
30 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
31 m4_include([acinclude.m4])
32+m4_include([tool/m4/ruby_replace_funcs.m4])
33diff --git a/configure.ac b/configure.ac
34index 8a7cee55b8..b97c5b3cc9 100644
35--- a/configure.ac
36+++ b/configure.ac
37@@ -1189,9 +1189,6 @@ main()
38 ac_cv_func_fsync=yes
39 ac_cv_func_seekdir=yes
40 ac_cv_func_telldir=yes
41- ac_cv_func_isinf=yes
42- ac_cv_func_isnan=yes
43- ac_cv_func_finite=yes
44 ac_cv_func_lchown=yes
45 ac_cv_func_link=yes
46 ac_cv_func_readlink=yes
47@@ -1239,9 +1236,6 @@ main()
48 [netbsd*], [ LIBS="-lm $LIBS"
49 ],
50 [dragonfly*], [ LIBS="-lm $LIBS"
51- # isinf() and isnan() are macros on DragonFly.
52- ac_cv_func_isinf=yes
53- ac_cv_func_isnan=yes
54 ],
55 [aix*],[ LIBS="-lm $LIBS"
56 ac_cv_func_round=no
57@@ -2213,11 +2207,8 @@ AC_REPLACE_FUNCS(dup2)
58 AC_REPLACE_FUNCS(erf)
59 AC_REPLACE_FUNCS(explicit_bzero)
60 AC_REPLACE_FUNCS(ffs)
61-AC_REPLACE_FUNCS(finite)
62 AC_REPLACE_FUNCS(flock)
63 AC_REPLACE_FUNCS(hypot)
64-AC_REPLACE_FUNCS(isinf)
65-AC_REPLACE_FUNCS(isnan)
66 AC_REPLACE_FUNCS(lgamma_r)
67 AC_REPLACE_FUNCS(memmove)
68 AC_REPLACE_FUNCS(nextafter)
69@@ -2229,6 +2220,10 @@ AC_REPLACE_FUNCS(strlcpy)
70 AC_REPLACE_FUNCS(strstr)
71 AC_REPLACE_FUNCS(tgamma)
72
73+RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
74+RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
75+RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
76+
77 # for missing/setproctitle.c
78 AS_CASE(["$target_os"],
79 [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
80diff --git a/tool/m4/ruby_replace_funcs.m4 b/tool/m4/ruby_replace_funcs.m4
81new file mode 100644
82index 0000000000..d0612e29a0
83--- /dev/null
84+++ b/tool/m4/ruby_replace_funcs.m4
85@@ -0,0 +1,13 @@
86+# -*- Autoconf -*-
87+dnl RUBY_REPLACE_FUNC [func] [included]
88+AC_DEFUN([RUBY_REPLACE_FUNC], [dnl
89+ AC_CHECK_DECL([$1],dnl
90+ [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl
91+ [AC_REPLACE_FUNCS($1)],dnl
92+ [$2])dnl
93+])
94+
95+dnl RUBY_REPLACE_FUNCS [funcs] [included]
96+AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl
97+ m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl
98+])
99--
1002.23.0.rc1
101
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 4082b02f14..341329a6a1 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -1,6 +1,7 @@
1require ruby.inc 1require ruby.inc
2 2
3SRC_URI += " \ 3SRC_URI += " \
4 file://0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \
4 file://run-ptest \ 5 file://run-ptest \
5 " 6 "
6 7