| 1 | --- configure.in.orig 2007-07-16 15:14:00.000000000 +0200 |
| 2 | +++ configure.in 2007-07-16 15:20:48.000000000 +0200 |
| 3 | @@ -1379,7 +1379,7 @@ |
| 4 | ;; |
| 5 | darwin*) |
| 6 | LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib' |
| 7 | - LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace' |
| 8 | + LIBRUBY_LDSHARED='cc $(CFLAGS) -dynamiclib -undefined suppress -flat_namespace' |
| 9 | LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)' |
| 10 | LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib' |
| 11 | ;; |
| 12 | @@ -1620,7 +1620,8 @@ |
| 13 | "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") |
| 14 | AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}") |
| 15 | else |
| 16 | - arch="${target_cpu}-${target_os}" |
| 17 | + darwin_version=`sysctl -n kern.sysv.shmseg` |
| 18 | + arch="universal-darwin${darwin_version}.0" |
| 19 | AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}") |
| 20 | fi |
| 21 | |
| 22 | --- lib/mkmf.rb.orig 2007-07-13 11:10:23.000000000 +0200 |
| 23 | +++ lib/mkmf.rb 2007-07-13 11:10:47.000000000 +0200 |
| 24 | @@ -286,7 +286,7 @@ |
| 25 | |
| 26 | def cpp_command(outfile, opt="") |
| 27 | Config::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}", |
| 28 | - CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) |
| 29 | + CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)).gsub(/-arch \w+/, '') |
| 30 | end |
| 31 | |
| 32 | def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) |
| 33 | --- defines.h.orig 2007-07-17 09:29:34.000000000 +0200 |
| 34 | +++ defines.h 2007-07-17 09:31:42.000000000 +0200 |
| 35 | @@ -102,6 +102,16 @@ |
| 36 | #endif |
| 37 | #endif |
| 38 | |
| 39 | +#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) |
| 40 | +/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may |
| 41 | + result in a different endian. Instead trust __BIG_ENDIAN__ and |
| 42 | + __LITTLE_ENDIAN__ which are set correctly by -arch. */ |
| 43 | +#undef WORDS_BIGENDIAN |
| 44 | +#ifdef __BIG_ENDIAN__ |
| 45 | +#define WORDS_BIGENDIAN |
| 46 | +#endif |
| 47 | +#endif |
| 48 | + |
| 49 | #ifdef __NeXT__ |
| 50 | /* NextStep, OpenStep, Rhapsody */ |
| 51 | #ifndef S_IRUSR |
| 52 | @@ -155,13 +165,6 @@ |
| 53 | #ifndef S_ISREG |
| 54 | #define S_ISREG(mode) (((mode) & (0170000)) == (0100000)) |
| 55 | #endif |
| 56 | -/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may |
| 57 | - result in a different endian. Instead trust __BIG_ENDIAN__ and |
| 58 | - __LITTLE_ENDIAN__ which are set correctly by -arch. */ |
| 59 | -#undef WORDS_BIGENDIAN |
| 60 | -#ifdef __BIG_ENDIAN__ |
| 61 | -#define WORDS_BIGENDIAN |
| 62 | -#endif |
| 63 | #ifndef __APPLE__ |
| 64 | /* NextStep, OpenStep (but not Rhapsody) */ |
| 65 | #ifndef GETPGRP_VOID |