From 7c7514b206a0ac94f107395eef991d2eea4072a7 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Nov 2011 08:30:53 +0000 Subject: [PATCH] * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp cannot work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/mkmf.rb | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index c2b4683e47..816440886c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 8 17:30:50 2011 Nobuyoshi Nakada + + * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp + cannot work. + Tue Nov 8 14:50:55 2011 NAKAMURA Usaku * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 4ac6d944b0..5c688cfbec 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -418,6 +418,9 @@ def cpp_command(outfile, opt="") conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote, 'arch_hdrdir' => $arch_hdrdir.quote, 'top_srcdir' => $top_srcdir.quote) + if $universal and (arch_flag = conf['ARCH_FLAG']) and !arch_flag.empty? + conf['ARCH_FLAG'] = arch_flag.gsub(/(?:\G|\s)-arch\s+\S+/, '') + end RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}", conf) end