Project

General

Profile

Backport #8596

r41734

Added by sorah (Sorah Fukumori) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:55756]

Description

Please backport r41734


Related issues

Related to Ruby master - Bug #8595: mkmf.rb pkg_config modifies $LDFLAGSClosednobu (Nobuyoshi Nakada)07/02/2013Actions

Updated by sorah (Sorah Fukumori) about 7 years ago

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",
#2

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41758.
Shota, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


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]

Also available in: Atom PDF