summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-12 07:22:21 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-12 07:22:21 +0000
commit8424452c698aecb77c7f7d4af354a53f70d4f472 (patch)
tree85ca08f60589a711d26a68a86b7bbf37e07b17d9 /lib/mkmf.rb
parentf74ba9cc07830413d3d50203cd149be68805ac0b (diff)
merge revision(s) 53566:
* configure.in: improve ICC (Intel C Compiler) support. * configure.in (CXX): The name of icc's c++ compiler is `icpc`. * configure.in (warnings): Add `-diag-disable=2259` to suppress noisy warnings: "non-pointer conversion from "..." to "..." may lose significant bits". * configure.in (optflags): Add `-fp-model precise` like -fno-fast-math. * lib/mkmf.rb: icc supports -Werror=division-by-zero and -Werror=deprecated-declarations, but doesn't support -Wdivision-by-zero and -Wdeprecated-declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index d8bc1b525d..3c944eecf5 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2475,6 +2475,9 @@ site-install-rb: install-rb
if $warnflags = CONFIG['warnflags'] and CONFIG['GCC'] == 'yes'
# turn warnings into errors only for bundled extensions.
config['warnflags'] = $warnflags.gsub(/(\A|\s)-Werror[-=]/, '\1-W')
+ if /icc\z/ =~ config['CC']
+ config['warnflags'].gsub!(/(\A|\s)-W(?:division-by-zero|deprecated-declarations)/, '\1')
+ end
RbConfig.expand(rbconfig['warnflags'] = config['warnflags'].dup)
config.each do |key, val|
RbConfig.expand(rbconfig[key] = val.dup) if /warnflags/ =~ val