[Scummvm-git-logs] scummvm master -> ff220fffa58142b5a049bcc5067538442ea7c677

bonki bonki at users.noreply.github.com
Sun Jul 8 11:59:43 CEST 2018


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

Summary:
fd612a537d CONFIGURE: Reword compiler flag checks
ff220fffa5 CONFIGURE: Use -Wno-pragma-pack only when available


Commit: fd612a537d643026f830cd401d1bf08a7a46f21c
    https://github.com/scummvm/scummvm/commit/fd612a537d643026f830cd401d1bf08a7a46f21c
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-07-08T11:46:03+02:00

Commit Message:
CONFIGURE: Reword compiler flag checks

Changed paths:
    configure


diff --git a/configure b/configure
index fdc0706..dac4374 100755
--- a/configure
+++ b/configure
@@ -2090,7 +2090,7 @@ esac
 
 # If possible, we want to use -Wglobal-constructors
 # However, not all compilers support that, so check whether the active one does.
-echocheck "whether -Wglobal-constructors work"
+echocheck "whether C++ compiler accepts -Wglobal-constructors"
 cat > $TMPC << EOF
 int main() { return 0; }
 EOF
@@ -2107,7 +2107,7 @@ echo $_global_constructors
 # change the way we instantiate the singleton classes as done in PR #967.
 # Note: we check the -Wundefined-var-template as gcc does not error out on unknown
 # -Wno-xxx flags.
-echocheck "whether -Wno-undefined-var-template work"
+echocheck "whether C++ compiler accepts -Wno-undefined-var-template"
 cat > $TMPC << EOF
 int main() { return 0; }
 EOF


Commit: ff220fffa58142b5a049bcc5067538442ea7c677
    https://github.com/scummvm/scummvm/commit/ff220fffa58142b5a049bcc5067538442ea7c677
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-07-08T11:57:39+02:00

Commit Message:
CONFIGURE: Use -Wno-pragma-pack only when available

Changed paths:
    configure


diff --git a/configure b/configure
index dac4374..cd10153 100755
--- a/configure
+++ b/configure
@@ -167,6 +167,7 @@ _build_hq_scalers=yes
 _enable_prof=no
 _global_constructors=no
 _no_undefined_var_template=no
+_no_pragma_pack=no
 _bink=yes
 _cloud=auto
 # Default vkeybd/keymapper/eventrec options
@@ -1914,24 +1915,6 @@ fi
 
 if test "$have_clang" = yes; then
 	add_line_to_config_mk 'HAVE_CLANG = 1'
-	_clang_major=`gcc_get_define __clang_major__`
-	#_clang_minor=`gcc_get_define __clang_minor__`
-
-	# clang 6.0 enables -Wpragma-pack which warns when leaving an included file
-	# which changes the current alignment.
-	# Our common/pack-{start,end}.h trigger this and it cannot easily and portably
-	# be disabled inside pack-{start,end}.h so we disable it globally for now.
-
-	# But macOS clang is numbered according to the OS version, so exclude it
-
-	case $_host_os in
-		darwin*)
-			# Leave it as is
-		;;
-		*)
-			test "$_clang_major" -ge 6 append_var CXXFLAGS "-Wno-pragma-pack"
-		;;
-	esac
 
 	# clang does accept all gcc options we use, so we keep have_gcc
 fi
@@ -2118,6 +2101,20 @@ if test "$_no_undefined_var_template" = yes; then
 fi
 echo $_no_undefined_var_template
 
+# Vanilla clang 6 enables the new -Wpragma-pack which warns when leaving an
+# included file which changes the current alignment.
+# As our common/pack-{start,end}.h trigger this we disable this warning.
+# Because there is no correlation between the version reported by Apple Xcode
+# clang and vanilla clang we cannot rely on the __clang_major__/clang_minor__
+# macros.
+# Note: as above, we check for -Wpragma-pack as not all compilers error out on
+# unknown -Wno-xxx flags.
+echocheck "whether C++ compiler accepts -Wno-pragma-pack"
+echo "int main() { return 0; }" >$TMPC
+cc_check -Wpragma-pack -Werror && _no_pragma_pack=yes
+test "$_no_pragma_pack" = yes && append_var CXXFLAGS "-Wno-pragma-pack"
+echo $_no_pragma_pack
+
 echo_n "Checking for $_host_alias-strings... " >> "$TMPLOG"
 if `which $_host_alias-strings >/dev/null 2>&1`; then
 	_strings=$_host_alias-strings





More information about the Scummvm-git-logs mailing list