Only add -woff 3970 to C[XX]FLAGS when using SGI mipsPro 7.4.4 or later.

Previous mipsPro versions don't give this warning but do warn about "unknown
warning number 3970" if we use this -woff which is even more annoying than
original warning we tried to suppress.

This is a forward port of r45896 which somehow was only applied to 2.8 branch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-28 11:09:21 +00:00
parent d0204feee6
commit 321f760bc3
2 changed files with 179 additions and 8 deletions

136
configure vendored
View File

@@ -24691,10 +24691,142 @@ if test "x$SUNCC" = xyes; then
fi
if test "x$SGICC" = "xyes"; then
CFLAGS="-woff 3970 $CFLAGS"
{ echo "$as_me:$LINENO: checking if cc version is 7.4.4 or greater" >&5
echo $ECHO_N "checking if cc version is 7.4.4 or greater... $ECHO_C" >&6; }
if test "${wx_cv_prog_sgicc744+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#if _SGI_COMPILER_VERSION >= 744
chock me: mipsPro is 7.4.4 or later
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
wx_cv_prog_sgicc744=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
wx_cv_prog_sgicc744=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $wx_cv_prog_sgicc744" >&5
echo "${ECHO_T}$wx_cv_prog_sgicc744" >&6; }
if test "x$wx_cv_prog_sgicc744" = "xyes"; then
CFLAGS="-woff 3970 $CFLAGS"
fi
fi
if test "x$SGICXX" = "xyes"; then
CXXFLAGS="-woff 3970 $CXXFLAGS"
{ echo "$as_me:$LINENO: checking if CC version is 7.4.4 or greater" >&5
echo $ECHO_N "checking if CC version is 7.4.4 or greater... $ECHO_C" >&6; }
if test "${wx_cv_prog_sgicxx744+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#if _SGI_COMPILER_VERSION >= 744
chock me: mipsPro is 7.4.4 or later
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
wx_cv_prog_sgicxx744=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
wx_cv_prog_sgicxx744=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ echo "$as_me:$LINENO: result: $wx_cv_prog_sgicxx744" >&5
echo "${ECHO_T}$wx_cv_prog_sgicxx744" >&6; }
if test "x$wx_cv_prog_sgicxx744" = "xyes"; then
CXXFLAGS="-woff 3970 $CXXFLAGS"
fi
fi
if test "x$HPCC" = "xyes"; then