aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/mkmf.rb6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 64fea3dd57..c24e6ba30c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Feb 14 17:31:50 2016 Lars Kanis <lars@greiz-reinsdorf.de>
+
+ * lib/mkmf.rb (with_{cpp,c,ld}flags): copy caller strings not to
+ be modified, in append_{cpp,c,ld}flags respectively.
+ [Fix GH-1246]
+
Sun Feb 14 16:18:57 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (setup_exception): set the cause only if it is explicitly
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 924ca2f019..6e23db8575 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -603,7 +603,7 @@ MSG
def with_cppflags(flags)
cppflags = $CPPFLAGS
- $CPPFLAGS = flags
+ $CPPFLAGS = flags.dup
ret = yield
ensure
$CPPFLAGS = cppflags unless ret
@@ -625,7 +625,7 @@ MSG
def with_cflags(flags)
cflags = $CFLAGS
- $CFLAGS = flags
+ $CFLAGS = flags.dup
ret = yield
ensure
$CFLAGS = cflags unless ret
@@ -647,7 +647,7 @@ MSG
def with_ldflags(flags)
ldflags = $LDFLAGS
- $LDFLAGS = flags
+ $LDFLAGS = flags.dup
ret = yield
ensure
$LDFLAGS = ldflags unless ret