From: "sorah (Shota Fukumori)" Date: 2013-07-02T12:19:02+09:00 Subject: [ruby-core:55757] [Backport 200 - Backport #8596] r41734 Issue #8596 has been updated by sorah (Shota Fukumori). r41734 can't apply to ruby_2_0_0 as it is, use this patch: diff --git a/lib/mkmf.rb b/lib/mkmf.rb index d4d5846..6fec4bd 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", ---------------------------------------- Backport #8596: r41734 https://bugs.ruby-lang.org/issues/8596#change-40251 Author: sorah (Shota Fukumori) Status: Open Priority: Normal Assignee: nagachika (Tomoyuki Chikanaga) Category: Target version: Please backport r41734 -- http://bugs.ruby-lang.org/