[前][次][番号順一覧][スレッド一覧]

ruby-changes:41492

From: naruse <ko1@a...>
Date: Sun, 17 Jan 2016 21:19:42 +0900 (JST)
Subject: [ruby-changes:41492] naruse:r53566 (trunk): * configure.in: improve ICC (Intel C Compiler) support.

naruse	2016-01-17 21:20:15 +0900 (Sun, 17 Jan 2016)

  New Revision: 53566

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53566

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/lib/mkmf.rb
Index: configure.in
===================================================================
--- configure.in	(revision 53565)
+++ configure.in	(revision 53566)
@@ -265,6 +265,7 @@ AS_CASE(["$build_os"], https://github.com/ruby/ruby/blob/trunk/configure.in#L265
       [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 https://github.com/ruby/ruby/blob/trunk/configure.in#L813
 	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 https://github.com/ruby/ruby/blob/trunk/configure.in#L954
     ])
 
     # 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
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 53565)
+++ lib/mkmf.rb	(revision 53566)
@@ -2484,6 +2484,9 @@ site-install-rb: install-rb https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2484
     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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53565)
+++ ChangeLog	(revision 53566)
@@ -1,3 +1,19 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jan 17 21:15:30 2016  NARUSE, Yui  <naruse@r...>
+
+	* 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@i...>
 
 	* string.c: Any kind of option is now taking the new code path for

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]