Bug #8595
closedmkmf.rb pkg_config modifies $LDFLAGS
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
Updated by sorah (Sorah Fukumori) over 11 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 11 years ago
oops, sorry, forgot to attach the patch
Updated by sorah (Sorah Fukumori) over 11 years ago
Updating patch because I uploaded older one:
- Don't append libs into $LDFLAGS
Updated by sorah (Sorah Fukumori) over 11 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 11 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 11 years ago
- Backport changed from 1.9.3: DONTNEED, 2.0.0: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONE