Project

General

Profile

Actions

Backport #8596

closed

r41734

Added by sorah (Sorah Fukumori) almost 11 years ago. Updated almost 11 years ago.


Description

Please backport r41734


Related issues 1 (0 open1 closed)

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

Updated by sorah (Sorah Fukumori) almost 11 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",
    
Actions #2

Updated by nagachika (Tomoyuki Chikanaga) almost 11 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]
Actions

Also available in: Atom PDF

Like0
Like0Like0