Permalink
Browse files

generate conftest with '-fobjc-gc-only' flag. fix #1486

  • Loading branch information...
1 parent ab9d058 commit e35df75944e7a13d16f019e2ed1e4ce2406b06af @Watson1978 Watson1978 committed Mar 24, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/mkmf.rb
View
@@ -174,7 +174,8 @@ def map_dir(dir, map = nil)
COUTFLAG = CONFIG['COUTFLAG']
CPPOUTFILE = CONFIG['CPPOUTFILE']
-CONFTEST_C = "conftest.c".freeze
+# XXX MacRuby : generate as objc to enable '-fobjc-gc-only'
+CONFTEST_C = "conftest.m".freeze
class String
# Wraps a string in escaped quotes if it contains whitespace.
@@ -382,8 +383,8 @@ def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
'arch_hdrdir' => "#$arch_hdrdir",
'top_srcdir' => $top_srcdir.quote,
'INCFLAGS' => "#$INCFLAGS",
- 'CPPFLAGS' => "#$CPPFLAGS",
- 'CFLAGS' => "#$CFLAGS",
+ 'CPPFLAGS' => "#$CPPFLAGS -fobjc-gc-only", # XXX MacRuby
+ 'CFLAGS' => "#$CFLAGS -fobjc-gc-only", # XXX MacRuby
'ARCH_FLAG' => "#$ARCH_FLAG",
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
'LIBPATH' => libpathflag(libpath),

0 comments on commit e35df75

Please sign in to comment.