[oe] [STABLE][PATCH] ruby-native: fix building with gcc 4.4.x

Khem Raj raj.khem at gmail.com
Fri Jan 22 06:52:52 UTC 2010


On Thu, Jan 21, 2010 at 10:37 PM, Marcin Juszkiewicz
<marcin at juszkiewicz.com.pl> wrote:
> From: Marcin Juszkiewicz <marcin at buglabs.net>
>
> Looks like gcc 4.4.x do not like the way Ruby programmers used
> preprocessor.
>
> This change is not present in .dev due to different versions of Ruby.
>
> Signed-off-by: Marcin Juszkiewicz <marcin at buglabs.net>
> ---
>  recipes/ruby/files/gcc44.patch    |   23 +++++++++++++++++++++++
>  recipes/ruby/ruby-native_1.8.5.bb |    5 +++++
>  2 files changed, 28 insertions(+), 0 deletions(-)
>  create mode 100644 recipes/ruby/files/gcc44.patch
>
> diff --git a/recipes/ruby/files/gcc44.patch b/recipes/ruby/files/gcc44.patch
> new file mode 100644
> index 0000000..b8f8ee4
> --- /dev/null
> +++ b/recipes/ruby/files/gcc44.patch
> @@ -0,0 +1,23 @@
> +---
> + math.c |    4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
> +
> +--- ruby-1.8.5.orig/math.c
> ++++ ruby-1.8.5/math.c
> +@@ -32,13 +32,15 @@ domain_check(x, msg)
> +           rb_sys_fail(msg);
> +       }
> +       if (isnan(x)) {
> + #if defined(EDOM)
> +           errno = EDOM;
> +-#elif define(ERANGE)
             ^^^^^^
this is the problem, it should be '#elif defined' and then it should work.

Thx

-Khem




More information about the Openembedded-devel mailing list