Update -Wno-long-double test to support clang.
This prevents bazillions of warnings from clang tha -Wno-long-double isn't supported. The warning that clang issues when it see -Wno-long-double is does not use any of the words we were looking for, so I added "unknown" to the list of words to look for. I also re-indented the two m4 tests so that they're a bit more readable. cmr=v1.7.4:reviewer=brbarret:subject=Update -Wno-long-double test to support clang This commit was SVN r29681.
Этот коммит содержится в:
родитель
4964a5e98b
Коммит
05f4f62db1
@ -148,14 +148,15 @@ AC_DEFUN([OPAL_SETUP_CC],[
|
|||||||
[ompi_cv_cc_wno_long_double],
|
[ompi_cv_cc_wno_long_double],
|
||||||
[AC_TRY_COMPILE([], [],
|
[AC_TRY_COMPILE([], [],
|
||||||
[
|
[
|
||||||
dnl Alright, the -Wno-long-double did not produce any errors...
|
dnl So -Wno-long-double did not produce any errors...
|
||||||
dnl Well well, try to extract a warning regarding unrecognized or ignored options
|
dnl We will try to extract a warning regarding
|
||||||
|
dnl unrecognized or ignored options
|
||||||
AC_TRY_COMPILE([], [long double test;],
|
AC_TRY_COMPILE([], [long double test;],
|
||||||
[
|
[
|
||||||
ompi_cv_cc_wno_long_double="yes"
|
ompi_cv_cc_wno_long_double="yes"
|
||||||
if test -s conftest.err ; then
|
if test -s conftest.err ; then
|
||||||
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
|
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
|
||||||
for i in invalid ignor unrecognized ; do
|
for i in unknown invalid ignor unrecognized ; do
|
||||||
$GREP -iq $i conftest.err
|
$GREP -iq $i conftest.err
|
||||||
if test "$?" = "0" ; then
|
if test "$?" = "0" ; then
|
||||||
ompi_cv_cc_wno_long_double="no"
|
ompi_cv_cc_wno_long_double="no"
|
||||||
@ -165,7 +166,8 @@ AC_DEFUN([OPAL_SETUP_CC],[
|
|||||||
fi
|
fi
|
||||||
],
|
],
|
||||||
[ompi_cv_cc_wno_long_double="no"])],
|
[ompi_cv_cc_wno_long_double="no"])],
|
||||||
[ompi_cv_cc_wno_long_double="no"])])
|
[ompi_cv_cc_wno_long_double="no"])
|
||||||
|
])
|
||||||
|
|
||||||
CFLAGS="$CFLAGS_orig"
|
CFLAGS="$CFLAGS_orig"
|
||||||
if test "$ompi_cv_cc_wno_long_double" = "yes" ; then
|
if test "$ompi_cv_cc_wno_long_double" = "yes" ; then
|
||||||
|
@ -111,24 +111,28 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[
|
|||||||
AC_CACHE_CHECK([if $CXX supports -Wno-long-double],
|
AC_CACHE_CHECK([if $CXX supports -Wno-long-double],
|
||||||
[opal_cv_cxx_wno_long_double],
|
[opal_cv_cxx_wno_long_double],
|
||||||
[AC_TRY_COMPILE([], [],
|
[AC_TRY_COMPILE([], [],
|
||||||
[dnl Alright, the -Wno-long-double did not produce any errors...
|
[
|
||||||
dnl Well well, try to extract a warning regarding unrecognized or ignored options
|
dnl So -Wno-long-double did not produce any errors...
|
||||||
|
dnl We will try to extract a warning regarding
|
||||||
|
dnl unrecognized or ignored options
|
||||||
AC_TRY_COMPILE([], [long double test;],
|
AC_TRY_COMPILE([], [long double test;],
|
||||||
[
|
[
|
||||||
opal_cv_cxx_wno_long_double="yes"
|
ompi_cv_cxx_wno_long_double="yes"
|
||||||
if test -s conftest.err ; then
|
if test -s conftest.err ; then
|
||||||
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
|
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
|
||||||
for i in invalid ignor unrecognized ; do
|
for i in unknown invalid ignor unrecognized ; do
|
||||||
$GREP -iq $i conftest.err
|
$GREP -iq $i conftest.err
|
||||||
if test "$?" = "0" ; then
|
if test "$?" = "0" ; then
|
||||||
opal_cv_cxx_wno_long_double="no",
|
ompi_cv_cxx_wno_long_double="no"
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
],
|
],
|
||||||
[opal_cv_cxx_wno_long_double="no"])],
|
[ompi_cv_cxx_wno_long_double="no"])],
|
||||||
[opal_cv_cxx_wno_long_double="no"])])
|
[ompi_cv_cxx_wno_long_double="no"])
|
||||||
|
])
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS_orig"
|
CXXFLAGS="$CXXFLAGS_orig"
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
if test "$opal_cv_cxx_wno_long_double" = "yes" ; then
|
if test "$opal_cv_cxx_wno_long_double" = "yes" ; then
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user