diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-12-07 13:06:20 -0200 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-12-07 13:06:20 -0200 |
commit | 608948a2d3f3d7dd7a0dfe070697b8601a19b333 (patch) | |
tree | 52a08bee2e3fccaa85d2b530f8f1ebba69983377 | |
parent | 5ca6880defa1f04f754000c89bf08ea8173456e7 (diff) | |
download | mariadb-git-608948a2d3f3d7dd7a0dfe070697b8601a19b333.tar.gz |
Bug#57991: Compiler flag change build error : adler32.c
Do not use the same maintainer mode flags for both GCC and ICC.
The -Wall option for ICC enables more warnings than its GCC
counterpart.
-rw-r--r-- | config/ac-macros/maintainer.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4 index b4d2f08e558..5b6ec591e60 100644 --- a/config/ac-macros/maintainer.m4 +++ b/config/ac-macros/maintainer.m4 @@ -15,8 +15,11 @@ AC_DEFUN([MY_MAINTAINER_MODE], [ # Set warning options required under maintainer mode. AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [ + # Detect ICC posing as GCC. + AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], + [INTEL_COMPILER=no], [INTEL_COMPILER=yes]) # Setup GCC warning options. - AS_IF([test "$GCC" = "yes"], [ + AS_IF([test "$GCC" = "yes" -a "$INTEL_COMPILER" = "no"], [ C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror" CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter" C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement" |