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

ruby-changes:29682

From: sorah <ko1@a...>
Date: Tue, 2 Jul 2013 11:35:47 +0900 (JST)
Subject: [ruby-changes:29682] sorah:r41734 (trunk): * lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs

sorah	2013-07-02 11:35:36 +0900 (Tue, 02 Jul 2013)

  New Revision: 41734

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

  Log:
    * lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
              (1.9.3 behavior) [ruby-core:55752] [Bug #8595]

  Modified files:
    trunk/ChangeLog
    trunk/lib/mkmf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41733)
+++ ChangeLog	(revision 41734)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul  2 11:14:36 2013  Shota Fukumori  <sorah@c...>
+
+	* lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
+          (1.9.3 behavior) [ruby-core:55752] [Bug #8595]
+
 Tue Jul  2 00:39:59 2013  Tanaka Akira  <akr@f...>
 
 	* ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismached
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 41733)
+++ lib/mkmf.rb	(revision 41734)
@@ -1747,6 +1747,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1747
       # default to package specific config command, as a last resort.
       get = proc {|opt| `#{pkgconfig} --#{opt}`.strip}
     end
+    orig_ldflags = $LDFLAGS
     if get and option
       get[option]
     elsif get and try_ldflags(ldflags = get['libs'])
@@ -1754,7 +1755,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1755
       libs = get['libs-only-l']
       ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
       $CFLAGS += " " << cflags
-      $LDFLAGS += " " << ldflags
+      $LDFLAGS = [orig_ldflags, ldflags].join(' ')
       $libs += " " << libs
       Logging::message "package configuration for %s\n", pkg
       Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",

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

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