summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 14:36:24 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 14:36:24 +0000
commit4090bd7b510cd745ffd88943a87bfb6e94537ead (patch)
tree65c15720f6f45d07944a26c8a254d6c9352e5eab /lib
parent157dd91713ff9068d7e77e2649f5ac4d65cef6b6 (diff)
merge revision(s) 41734,41737: [Backport #8596]
* 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/branches/ruby_2_0_0@41758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index d4d5846bfc..6fec4bd8f4 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1709,12 +1709,13 @@ SRC
# default to package specific config command, as a last resort.
get = proc {|opt| `#{pkgconfig} --#{opt}`.strip}
end
+ orig_ldflags = $LDFLAGS
if get and try_ldflags(ldflags = get['libs'])
cflags = get['cflags']
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",