[Scummvm-cvs-logs] scummvm master -> 177b1c0b65f4fb171dd79323eb57cfcfda3783f5

wjp wjp at usecode.org
Wed Dec 23 22:40:15 CET 2015


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
582c726f4c CONFIGURE: Always disable have_gcc when using Intel compiler
d28ec8a4a4 CONFIGURE: Report clang compiler version
177b1c0b65 Merge pull request #638 from wjp/compiler_version


Commit: 582c726f4cc13edbf8bd3e0d4663a9819975e954
    https://github.com/scummvm/scummvm/commit/582c726f4cc13edbf8bd3e0d4663a9819975e954
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2015-12-20T18:23:18+01:00

Commit Message:
CONFIGURE: Always disable have_gcc when using Intel compiler

This fixes configure if icc is set to gcc-compatibility mode, which
is the default.

Changed paths:
    configure



diff --git a/configure b/configure
index d28b411..e0d412d 100755
--- a/configure
+++ b/configure
@@ -1686,23 +1686,33 @@ LD=$CXX
 #
 echocheck "compiler version"
 
-# We first check whether we have an Intel compiler here, since the Intel compiler
-# can also fake itself as an gcc (to ease compatibility with common Linux etc.
-# programs).
+# Some compilers pretend to be gcc to ease compatibility with
+# common Linux etc. programs. We first check for some of these here.
+have_gcc=no
+cc_check_define __GNUC__ && have_gcc=yes
 have_icc=no
 cc_check_define __INTEL_COMPILER && have_icc=yes
+have_clang=no
+cc_check_define __clang__ && have_clang=yes
 
 if test "$have_icc" = yes; then
 	add_line_to_config_mk 'HAVE_ICC = 1'
 
-	# Make ICC error our on unknown command line options instead of printing
+	# Make ICC error out on unknown command line options instead of printing
 	# a warning. This is for example required to make the -Wglobal-destructors
 	# detection work correctly.
 	append_var CXXFLAGS "-diag-error 10006,10148"
+
+	# ICC doesn't accept all gcc options, so we disable have_gcc, even if
+	# ICC does have the gcc-compatibility defines.
+	have_gcc=no
 fi
 
-have_gcc=no
-cc_check_define __GNUC__ && have_gcc=yes
+if test "$have_clang" = yes; then
+	add_line_to_config_mk 'HAVE_CLANG = 1'
+
+	# clang does accept all gcc options we use, so we keep have_gcc
+fi
 
 if test "$have_gcc" = yes; then
 	add_line_to_config_mk 'HAVE_GCC = 1'
@@ -1710,10 +1720,6 @@ if test "$have_gcc" = yes; then
 	_cxx_minor=`gcc_get_define __GNUC_MINOR__`
 	cxx_version="`( $CXX -dumpversion ) 2>&1`"
 
-	if test -n "`gcc_get_define __clang__`"; then
-		add_line_to_config_mk 'HAVE_CLANG = 1'
-	fi
-
 	if test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \
 	   test "$_cxx_major" -gt 2 ; then
 		cxx_version="$cxx_version, ok"


Commit: d28ec8a4a480246ff6a4f18e5fd9659ed8bb1747
    https://github.com/scummvm/scummvm/commit/d28ec8a4a480246ff6a4f18e5fd9659ed8bb1747
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2015-12-20T18:35:41+01:00

Commit Message:
CONFIGURE: Report clang compiler version

Our previous code printed the gcc version clang is pretending to be.

Changed paths:
    configure



diff --git a/configure b/configure
index e0d412d..e1ee583 100755
--- a/configure
+++ b/configure
@@ -1720,7 +1720,17 @@ if test "$have_gcc" = yes; then
 	_cxx_minor=`gcc_get_define __GNUC_MINOR__`
 	cxx_version="`( $CXX -dumpversion ) 2>&1`"
 
-	if test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \
+	if test "$have_clang" = yes; then
+		# Clang sets a gcc version number for compatibility.
+		# We keep that as _cxx_minor/_cxx_major for later
+		# compiler version checks.
+
+		# For the version reported in the configure log (cxx_version),
+		# we get the actual clang version.
+		cxx_version=`gcc_get_define __clang_version__`
+		cxx_version="`echo "${cxx_version}" | sed -e 's/"\([^ ]\+\) .*/\1/'`"
+		cxx_version="clang $cxx_version, ok"
+	elif test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \
 	   test "$_cxx_major" -gt 2 ; then
 		cxx_version="$cxx_version, ok"
 		cxx_verc_fail=no


Commit: 177b1c0b65f4fb171dd79323eb57cfcfda3783f5
    https://github.com/scummvm/scummvm/commit/177b1c0b65f4fb171dd79323eb57cfcfda3783f5
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2015-12-23T22:39:44+01:00

Commit Message:
Merge pull request #638 from wjp/compiler_version

Improve compiler version checks

Changed paths:
    configure









More information about the Scummvm-git-logs mailing list