summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 02:35:36 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 02:35:36 +0000
commit47434dc12f90431fabfc7e9b1829ee0437bdee0a (patch)
treea08396a2c096f25bf1b95759b3a39cb3ba5f5282 /lib/mkmf.rb
parent3b25c2066a5f4044bc3c462f225287eee0f888a1 (diff)
* lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
(1.9.3 behavior) [ruby-core:55752] [Bug #8595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 146225d4d5..8179974034 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1747,6 +1747,7 @@ SRC
# 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
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",