summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--ext/date/extconf.rb2
-rw-r--r--lib/mkmf.rb4
-rw-r--r--win32/Makefile.sub2
4 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f1fb122e6..052e2f1aa1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Apr 10 11:44:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/date/extconf.rb: check warnings.
+
+ * lib/mkmf.rb (try_cflags): pass options to try_compile.
+
+ * win32/Makefile.sub (WERRORFLAG): make unknown command line
+ options an error.
+
Fri Apr 10 08:00:17 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_process.rb: unfortunately, windows is not POSIX...
diff --git a/ext/date/extconf.rb b/ext/date/extconf.rb
index 6f479eaa26..cb346dfcd9 100644
--- a/ext/date/extconf.rb
+++ b/ext/date/extconf.rb
@@ -1,5 +1,5 @@
require 'mkmf'
-if try_cflags("-std=iso9899:1999")
+if try_cflags("-std=iso9899:1999", :werror => true)
$CFLAGS += " " << "-std=iso9899:1999"
end
create_makefile('date_core')
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 67af386bfa..ba3240d0a3 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -621,8 +621,8 @@ MSG
$CFLAGS = cflags unless ret
end
- def try_cflags(flags)
- try_compile(MAIN_DOES_NOTHING, flags)
+ def try_cflags(flags, *opts)
+ try_compile(MAIN_DOES_NOTHING, flags, *opts)
end
def with_ldflags(flags)
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index b8bd25bd31..82c8b416c7 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -208,7 +208,7 @@ WARNFLAGS = -W2 -wd4996 -we4028 -we4142
WARNFLAGS = -W2
!endif
!endif
-WERRORFLAG = -WX
+WERRORFLAG = -WX -weD9002
!if !defined(CFLAGS)
CFLAGS = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) $(COMPILERFLAG)
!endif