Skip to contentSkip to conversation

ruby-native: fix building with gcc 4.4.x

PATCH In review Marcin Juszkiewicz 3 participants 5 messages Jan 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ruby-native: fix building with gcc 4.4.x

From: Marcin Juszkiewicz <[email protected]>

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.

---
 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
recipes/ruby/files/gcc44.patch new file +23 -0
new file mode 100644
index 0000000..b8f8ee4
@@ -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)
++#else
++#if define(ERANGE)
+ 	    errno = ERANGE;
+ #endif
++#endif
+ 	    continue;
+ 	}
+ 	break;
+     }
+ }
recipes/ruby/ruby-native_1.8.5.bb +5 -0
index e4d2a33..f35363d 100644
@@ -1,2 +1,7 @@
 require ruby.inc
 inherit native
+
+PR = "r1"
+
+SRC_URI += " file://gcc44.patch;patch=1 "
+
Signature · 1 line
1.6.6
#1 lore raw
Quoted 23 lines · Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

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.

---
 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

recipes/ruby/files/gcc44.patch new file +3 -0
new file mode 100644
index 0000000..b8f8ee4
@@ -0,0 +1,23 @@
+---
+ math.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)

recipes/ruby/files/gcc44.patch line 13

Quoted 10 lines
recipes/ruby/files/gcc44.patch new file +10 -0
+
+--- 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

#2 lore raw

PATCH 1/1 ruby-native: fix building with gcc 4.4.x

From: Marcin Juszkiewicz <[email protected]>

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.

---
 recipes/ruby/files/gcc44.patch    |   19 +++++++++++++++++++
 recipes/ruby/ruby-native_1.8.5.bb |    5 +++++
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 recipes/ruby/files/gcc44.patch
recipes/ruby/files/gcc44.patch new file +19 -0
new file mode 100644
index 0000000..dc5a608
@@ -0,0 +1,19 @@
+---
+ math.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- ruby-1.8.5.orig/math.c
++++ ruby-1.8.5/math.c
+@@ -32,11 +32,11 @@ domain_check(x, msg)
+ 	    rb_sys_fail(msg);
+ 	}
+ 	if (isnan(x)) {
+ #if defined(EDOM)
+ 	    errno = EDOM;
+-#elif define(ERANGE)
++#elif defined(ERANGE)
+ 	    errno = ERANGE;
+ #endif
+ 	    continue;
+ 	}
+ 	break;
recipes/ruby/ruby-native_1.8.5.bb +5 -0
index e4d2a33..f35363d 100644
@@ -1,2 +1,7 @@
 require ruby.inc
 inherit native
+
+PR = "r1"
+
+SRC_URI += " file://gcc44.patch;patch=1 "
+
Signature · 1 line
1.6.6
Acked-by on v1 1/1
#3 lore raw
Quoted 8 lines · Marcin Juszkiewicz

From: Marcin Juszkiewicz<[email protected]>

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.

Quoted 43 lines
---
  recipes/ruby/files/gcc44.patch    |   19 +++++++++++++++++++
  recipes/ruby/ruby-native_1.8.5.bb |    5 +++++
  2 files changed, 24 insertions(+), 0 deletions(-)

create mode 100644 recipes/ruby/files/gcc44.patch

recipes/ruby/files/gcc44.patch new file +19 -0
new file mode 100644
index 0000000..dc5a608
@@ -0,0 +1,19 @@
+---
+ math.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- ruby-1.8.5.orig/math.c
++++ ruby-1.8.5/math.c
+@@ -32,11 +32,11 @@ domain_check(x, msg)
+ 	    rb_sys_fail(msg);
+ 	}
+ 	if (isnan(x)) {
+ #if defined(EDOM)
+ 	    errno = EDOM;
+-#elif define(ERANGE)
++#elif defined(ERANGE)
+ 	    errno = ERANGE;
+ #endif
+ 	    continue;
+ 	}
+ 	break;
recipes/ruby/ruby-native_1.8.5.bb +5 -0
index e4d2a33..f35363d 100644
@@ -1,2 +1,7 @@
  require ruby.inc
  inherit native
+
+PR = "r1"
+
+SRC_URI += " file://gcc44.patch;patch=1 "
+
Acked-by
#4 lore raw
Quoted 4 lines · Philip Balister
Quoted 3 lines · Marcin Juszkiewicz

From: Marcin Juszkiewicz<[email protected]>

Quoted 9 lines
Quoted 6 lines

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.

Quoted 52 lines
Quoted 41 lines

---
 recipes/ruby/files/gcc44.patch    |   19 +++++++++++++++++++ recipes/ruby/ruby-native_1.8.5.bb |    5 +++++

 2 files changed, 24 insertions(+), 0 deletions(-)

 create mode 100644 recipes/ruby/files/gcc44.patch

recipes/ruby/files/gcc44.patch new file +19 -0
new file mode 100644
index 0000000..dc5a608
@@ -0,0 +1,19 @@
+---
+ math.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- ruby-1.8.5.orig/math.c
++++ ruby-1.8.5/math.c
+@@ -32,11 +32,11 @@ domain_check(x, msg)
+           rb_sys_fail(msg);
+       }
+       if (isnan(x)) {
+ #if defined(EDOM)
+           errno = EDOM;
+-#elif define(ERANGE)
++#elif defined(ERANGE)
+           errno = ERANGE;
+ #endif
+           continue;
+       }
+       break;
recipes/ruby/ruby-native_1.8.5.bb +0 -0
index e4d2a33..f35363d 100644
@@ -1,2 +1,7 @@

 require ruby.inc
 inherit native

recipes/ruby/ruby-native_1.8.5.bb line 7

Quoted 5 lines
recipes/ruby/ruby-native_1.8.5.bb +5 -0
+
+PR = "r1"
+
+SRC_URI += " file://gcc44.patch;patch=1 "
+

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel