1
1

Fix for gcc 2.96 inline problem. Stupid gcc!

This commit was SVN r1266.
Этот коммит содержится в:
George Bosilca 2004-06-15 17:10:47 +00:00
родитель d1292b7887
Коммит acd1ec3d1f

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

@ -189,9 +189,33 @@ OMPI_C_GET_ALIGNMENT(void *, OMPI_ALIGNMENT_VOID_P)
# Check for other compiler characteristics
#
if test "$GCC" = "yes"; then
# gcc 2.96 will emit oodles of warnings if you use "inline" with
# -pedantic (which we do in developer builds). However,
# "__inline__" is ok. So we have to force gcc to select the
# right one. If you use -pedantic, the AC_C_INLINE test will fail
# (because it names a function foo() -- without the (void)). So
# we turn off all the picky flags, turn on -ansi mode (which is
# implied by -pedantic), and set warnings to be errors. Hence,
# this does the following (for 2.96):
#
# - causes the check for "inline" to emit a warning, which then
# fails
# - checks for __inline__, which then emits no error, and works
#
# This also works nicely for gcc 3.x because "inline" will work on
# the first check, and all is fine. :-)
CFLAGS_save="$CFLAGS"
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi"
fi
AC_C_INLINE
AC_C_RESTRICT
OMPI_C_WEAK_SYMBOLS
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save"
fi
# If we want the profiling layer:
# - If the C compiler has weak symbols, use those.