summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-03 09:43:59 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-03 09:43:59 +0000
commitf81db3c80ee49b0259cb8641630beeca58cb6af4 (patch)
tree6a5478aba5fac097d6455c104e73a71f335c41be
parentbf571987ecdb9faf350ee3bcd772fca5a3e79f85 (diff)
merge revision(s) 50717: [Backport #11201]
* 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/branches/ruby_2_1@51123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/mkmf.rb15
-rw-r--r--version.h2
3 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 68a1d9e062..38bde0de91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jul 3 18:40:48 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]
+
Fri Jul 3 18:32:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compile.c (iseq_compile_each): out of range NTH_REF is always
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index f5c462b58e..7a59e572bf 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1756,11 +1756,18 @@ SRC
elsif 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
- $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
diff --git a/version.h b/version.h
index a1c78c09d3..2f8239ec96 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.7"
#define RUBY_RELEASE_DATE "2015-07-03"
-#define RUBY_PATCHLEVEL 373
+#define RUBY_PATCHLEVEL 374
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 7