Project

General

Profile

Actions

Bug #8595

closed

mkmf.rb pkg_config modifies $LDFLAGS

Added by sorah (Sorah Fukumori) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
[ruby-core:55752]

Description

=begin
mkmf.rb's pkg_config modifies $LDFLAGS after 2.0.0 (r35605 ?) like the following:

ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

p $LDFLAGS #=> "-L. -rdynamic -Wl,-export-dynamic"
p pkg_config('libxml-2.0') #=> ["-I/usr/include/libxml2 ", "", "-lxml2 "]
p $LDFLAGS #=> "-L. -rdynamic -Wl,-export-dynamic "

ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

p $LDFLAGS #=> "-L. -fstack-protector -rdynamic -Wl,-export-dynamic"
p pkg_config('libxml-2.0') #=> ["-I/usr/include/libxml2", "", "-lxml2"]
p $LDFLAGS #=> "-lxml2 "

2.0.0 + my patch

p $LDFLAGS #=> "-L. -fstack-protector -rdynamic -Wl,-export-dynamic"
p pkg_config('libxml-2.0') #=> ["-I/usr/include/libxml2", "", "-lxml2"]
p $LDFLAGS #=> "-L. -fstack-protector -rdynamic -Wl,-export-dynamic "

attached patch fixes this to 1.9.3 behaviour.

I'll commit this if there's no problem.

=end


Files

a.patch (826 Bytes) a.patch sorah (Sorah Fukumori), 07/02/2013 11:07 AM
b.patch (1.23 KB) b.patch sorah (Sorah Fukumori), 07/02/2013 11:20 AM

Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8596: r41734Closednagachika (Tomoyuki Chikanaga)07/02/2013Actions

Updated by sorah (Sorah Fukumori) over 10 years ago

  • Description updated (diff)
  • ruby -v changed from ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] to ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

Updated by sorah (Sorah Fukumori) over 10 years ago

oops, sorry, forgot to attach the patch

Actions #3

Updated by sorah (Sorah Fukumori) over 10 years ago

Updating patch because I uploaded older one:

  • Don't append libs into $LDFLAGS
Actions #4

Updated by sorah (Sorah Fukumori) over 10 years ago

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

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


  • lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
    (1.9.3 behavior) [ruby-core:55752] [Bug #8595]

Updated by sorah (Sorah Fukumori) over 10 years ago

  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

  • Backport changed from 1.9.3: DONTNEED, 2.0.0: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0