mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@53566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e580847ce8
commit
9bed6e8e8e
3 changed files with 22 additions and 1 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
Sun Jan 17 21:15:30 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* 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.
|
||||
|
||||
Sun Jan 17 20:40:10 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* string.c: Any kind of option is now taking the new code path for
|
||||
|
|
|
@ -265,6 +265,7 @@ AS_CASE(["$build_os"],
|
|||
[xgcc-4.2|x/usr/bin/gcc-4.2], [: ${CXX=g++-4.2}],
|
||||
[xgcc|x/usr/bin/gcc], [: ${CXX=g++}],
|
||||
[xcc|x/usr/bin/cc], [: ${CXX=c++}],
|
||||
[xicc], [: ${CXX=icpc}],
|
||||
[xclang|x/usr/bin/clang], [: ${CXX=clang++}])
|
||||
])
|
||||
test -z "$CC" || ac_cv_prog_CC="$CC"
|
||||
|
@ -812,6 +813,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
|
|||
extra_warning="$extra_warning -Wno-maybe-uninitialized"
|
||||
fi
|
||||
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
|
||||
-diag-disable=2259 \
|
||||
-Wno-missing-field-initializers \
|
||||
-Wunused-variable \
|
||||
-Werror=pointer-arith \
|
||||
|
@ -952,7 +954,7 @@ if test "$GCC" = yes; then
|
|||
])
|
||||
|
||||
# disable fast-math
|
||||
for oflag in -fno-fast-math; do
|
||||
for oflag in -fno-fast-math -fp-model\ precise; do
|
||||
RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)])
|
||||
done
|
||||
fi
|
||||
|
|
|
@ -2484,6 +2484,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
|
||||
|
|
Loading…
Add table
Reference in a new issue