[前][次][番号順一覧][スレッド一覧]

ruby-changes:36834

From: nobu <ko1@a...>
Date: Sun, 21 Dec 2014 16:15:19 +0900 (JST)
Subject: [ruby-changes:36834] nobu:r48915 (trunk): fiddle: do not disturb other checks

nobu	2014-12-21 16:15:04 +0900 (Sun, 21 Dec 2014)

  New Revision: 48915

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48915

  Log:
    fiddle: do not disturb other checks
    
    * ext/fiddle/extconf.rb: add the local ffi library and header just
      before create_makefile, not to disturb other checks.
      also prepend the extension path name to the local library name
      for static linked ext.

  Modified files:
    trunk/ext/fiddle/extconf.rb
Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb	(revision 48914)
+++ ext/fiddle/extconf.rb	(revision 48915)
@@ -33,8 +33,6 @@ begin https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L33
     libffi.lib = "#{libffi.builddir}/.libs"
     libffi.a = "#{libffi.lib}/libffi.#{$LIBEXT}"
     libffi.cflags = RbConfig.expand("$(CFLAGS)", CONFIG.merge("warnflags"=>""))
-    $LIBPATH.unshift libffi.lib
-    $INCFLAGS << " -I" << libffi.include
     ver = ver[/libffi-(.*)/, 1]
   end
 end
@@ -79,6 +77,11 @@ types.each do |type, signed| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L77
   end
 end
 
+if libffi
+  $LIBPATH.unshift libffi.lib
+  $INCFLAGS << " -I" << libffi.include
+  $LOCAL_LIBS.prepend("#{libffi.a} ").strip!
+end
 create_makefile 'fiddle' do |conf|
   next conf unless libffi
   if $gnumake
@@ -102,6 +105,8 @@ create_makefile 'fiddle' do |conf| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L105
 end
 
 if libffi
+  $LIBPATH.pop
+  $LOCAL_LIBS.prepend("ext/fiddle/")
   args = [$make, *sysquote($mflags)]
   Logging::open do
     Logging.message("%p\n", args)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]