1
1

opal_setup_cc.m4: don't use -finline-functions with clang

Some versions of clang (at least >= 3.5 -- perhaps older versions,
too?) will *warn* about -finline-functions, but still allow it.  This
is very annoying, so check for that warning, too.
Этот коммит содержится в:
Jeff Squyres 2015-03-25 10:31:10 -07:00
родитель 71c28cea65
Коммит a50f103c0f

Просмотреть файл

@ -196,12 +196,26 @@ AC_DEFUN([OPAL_SETUP_CC],[
if test "$GCC" = "yes"; then
CFLAGS_orig="$CFLAGS"
# Note: Some versions of clang (at least >= 3.5 -- perhaps
# older versions, too?) will *warn* about -finline-functions,
# but still allow it. This is very annoying, so check for
# that warning, too.
CFLAGS="$CFLAGS_orig -finline-functions"
add=
AC_CACHE_CHECK([if $CC supports -finline-functions],
[opal_cv_cc_finline_functions],
[AC_TRY_COMPILE([], [],
[opal_cv_cc_finline_functions="yes"],
[opal_cv_cc_finline_functions="yes"
if test -s conftest.err ; then
for i in unused 'not supported' ; do
$GREP -iq "$i" conftest.err
if test $? -eq 0; then
opal_cv_cc_finline_functions="no"
break;
fi
done
fi
],
[opal_cv_cc_finline_functions="no"])])
if test "$opal_cv_cc_finline_functions" = "yes" ; then
add=" -finline-functions"