krb5 commit: Allow WARN_CFLAGS override for Solaris
Greg Hudson
ghudson at mit.edu
Mon Jul 24 11:36:59 EDT 2017
https://github.com/krb5/krb5/commit/96d049903bdf465147f74b24cf5f8e8f5843e11e
commit 96d049903bdf465147f74b24cf5f8e8f5843e11e
Author: Will Fiveash <will.fiveash at oracle.com>
Date: Tue Jul 18 18:24:18 2017 -0500
Allow WARN_CFLAGS override for Solaris
In aclocal.m4, do not set WARN_CFLAGS and WARN_CXXFLAGS for the
Solaris native compiler if those variables were already set by the
user. (We already did the same for gcc warning flags.)
[ghudson at mit.edu: rewrote commit message]
src/aclocal.m4 | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index a6c188d..d6d1279 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -630,8 +630,16 @@ else
# works, but it also means that declaration-in-code warnings won't
# be issued.
# -v -fd -errwarn=E_DECLARATION_IN_CODE ...
- WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED"
- WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64"
+ if test "x$krb5_ac_warn_cflags_set" = xset ; then
+ AC_MSG_NOTICE(not adding extra warning flags because WARN_CFLAGS was set)
+ else
+ WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED"
+ fi
+ if test "x$krb5_ac_warn_cxxflags_set" = xset ; then
+ AC_MSG_NOTICE(not adding extra warning flags because WARN_CXXFLAGS was set)
+ else
+ WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64"
+ fi
fi
fi
AC_SUBST(WARN_CFLAGS)
More information about the cvs-krb5
mailing list