1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

mkmf.rb: split --libs

* lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option
  is not available.  patch in [ruby-core:69428] by Hans Mackowiak.
  [ruby-core:69421] [Bug #11201]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-06-01 13:01:52 +00:00
parent 4777bdce27
commit 5c18ffe29a
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Mon Jun 1 22:01:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option
is not available. patch in [ruby-core:69428] by Hans Mackowiak.
[ruby-core:69421] [Bug #11201]
Mon Jun 1 21:18:24 2015 Koichi Sasada <ko1@atdot.net>
* gc.c (gc_mark_children): remove a garbage character

View file

@ -1818,11 +1818,18 @@ SRC
cflags = get['cflags']
end
libs = get['libs-only-l']
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
$CFLAGS += " " << cflags
$CXXFLAGS += " " << cflags
$LDFLAGS = [orig_ldflags, ldflags].join(' ')
if cflags
$CFLAGS += " " << cflags
$CXXFLAGS += " " << cflags
end
if libs
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
else
libs, ldflags = Shellwords.shellwords(ldflags).partition {|s| s =~ /-l([^ ]+)/ }.map {|l|l.quote.join(" ")}
end
$libs += " " << libs
$LDFLAGS = [orig_ldflags, ldflags].join(' ')
Logging::message "package configuration for %s\n", pkg
Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
cflags, ldflags, libs