Author: jfarrell
Date: Tue Oct  9 00:30:03 2012
New Revision: 1395824

URL: http://svn.apache.org/viewvc?rev=1395824&view=rev
Log:
Thrift-1673: Ruby compile flags for exension for multi arch builds (os x)
Client: rb
Patch: Jake Farrell

Updating extconf to only grab arch flags from ruby binary to stop rvm version 
>= 1.9.x from breaking.


Modified:
    thrift/trunk/lib/rb/ext/extconf.rb

Modified: thrift/trunk/lib/rb/ext/extconf.rb
URL: 
http://svn.apache.org/viewvc/thrift/trunk/lib/rb/ext/extconf.rb?rev=1395824&r1=1395823&r2=1395824&view=diff
==============================================================================
--- thrift/trunk/lib/rb/ext/extconf.rb (original)
+++ thrift/trunk/lib/rb/ext/extconf.rb Tue Oct  9 00:30:03 2012
@@ -22,7 +22,9 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE 
 else
   require 'mkmf'
 
-  $CFLAGS = "-g -O2 -Wall -Werror " + Config::CONFIG["CFLAGS"]
+  $ARCH_FLAGS = Config::CONFIG['CFLAGS'].scan( /(-arch )(\S+)/ ).map{|x,y| x + 
y + ' ' }.join('')
+
+  $CFLAGS = "-g -O2 -Wall -Werror " + $ARCH_FLAGS
 
   have_func("strlcpy", "string.h")
 


Reply via email to