mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
Silence annoying ABI change warning.
* configure.ac [GCC]: Pass -Wno-psabi for gcc >= 4.6. Avoid some gcc option tests for gcc >= 4.6 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
66585314e3
commit
d04399a6a8
29
configure.ac
29
configure.ac
@ -1290,12 +1290,24 @@ AC_SUBST(W32SOCKLIBS)
|
|||||||
#
|
#
|
||||||
AC_MSG_NOTICE([checking for cc features])
|
AC_MSG_NOTICE([checking for cc features])
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
|
# Check whether gcc does not emit a diagnositc for unknow -Wno-*
|
||||||
|
# options. This is the case for gcc >= 4.6
|
||||||
|
AC_MSG_CHECKING([if gcc ignores unknown -Wno-* options])
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6 )
|
||||||
|
#kickerror
|
||||||
|
#endif]],[])],[_gcc_silent_wno=yes],[_gcc_silent_wno=no])
|
||||||
|
AC_MSG_RESULT($_gcc_silent_wno)
|
||||||
|
|
||||||
# Note that it is okay to use CFLAGS here because this are just
|
# Note that it is okay to use CFLAGS here because this are just
|
||||||
# warning options and the user should have a chance of overriding
|
# warning options and the user should have a chance of overriding
|
||||||
# them.
|
# them.
|
||||||
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
||||||
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
|
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
|
||||||
|
if test x"$_gcc_silent_wno" = xyes ; then
|
||||||
|
_gcc_wopt=yes
|
||||||
|
else
|
||||||
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
|
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
|
||||||
_gcc_cflags_save=$CFLAGS
|
_gcc_cflags_save=$CFLAGS
|
||||||
CFLAGS="-Wno-missing-field-initializers"
|
CFLAGS="-Wno-missing-field-initializers"
|
||||||
@ -1303,9 +1315,11 @@ if test "$GCC" = yes; then
|
|||||||
[_gcc_wopt=yes],[_gcc_wopt=no])
|
[_gcc_wopt=yes],[_gcc_wopt=no])
|
||||||
AC_MSG_RESULT($_gcc_wopt)
|
AC_MSG_RESULT($_gcc_wopt)
|
||||||
CFLAGS=$_gcc_cflags_save;
|
CFLAGS=$_gcc_cflags_save;
|
||||||
|
fi
|
||||||
if test x"$_gcc_wopt" = xyes ; then
|
if test x"$_gcc_wopt" = xyes ; then
|
||||||
CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
|
CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
|
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
|
||||||
_gcc_cflags_save=$CFLAGS
|
_gcc_cflags_save=$CFLAGS
|
||||||
CFLAGS="-Wdeclaration-after-statement"
|
CFLAGS="-Wdeclaration-after-statement"
|
||||||
@ -1320,12 +1334,17 @@ if test "$GCC" = yes; then
|
|||||||
CFLAGS="$CFLAGS -Wall"
|
CFLAGS="$CFLAGS -Wall"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$_gcc_silent_wno" = xyes ; then
|
||||||
|
_gcc_psign=yes
|
||||||
|
else
|
||||||
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
|
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
|
||||||
_gcc_cflags_save=$CFLAGS
|
_gcc_cflags_save=$CFLAGS
|
||||||
CFLAGS="-Wno-pointer-sign"
|
CFLAGS="-Wno-pointer-sign"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[_gcc_psign=yes],[_gcc_psign=no])
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
|
||||||
|
[_gcc_psign=yes],[_gcc_psign=no])
|
||||||
AC_MSG_RESULT($_gcc_psign)
|
AC_MSG_RESULT($_gcc_psign)
|
||||||
CFLAGS=$_gcc_cflags_save;
|
CFLAGS=$_gcc_cflags_save;
|
||||||
|
fi
|
||||||
if test x"$_gcc_psign" = xyes ; then
|
if test x"$_gcc_psign" = xyes ; then
|
||||||
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
||||||
fi
|
fi
|
||||||
@ -1339,6 +1358,14 @@ if test "$GCC" = yes; then
|
|||||||
if test x"$_gcc_psign" = xyes ; then
|
if test x"$_gcc_psign" = xyes ; then
|
||||||
CFLAGS="$CFLAGS -Wpointer-arith"
|
CFLAGS="$CFLAGS -Wpointer-arith"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The undocumented option -Wno-psabi suppresses the annoying
|
||||||
|
# "the ABI of passing union with long double has changed in GCC 4.4"
|
||||||
|
# which is emitted in estream-printf.c but entirely irrelvant
|
||||||
|
# because that union is local to the file.
|
||||||
|
if test x"$_gcc_silent_wno" = xyes ; then
|
||||||
|
CFLAGS="$CFLAGS -Wno-psabi"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user