mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Check for ignored thread compiler options to reduce compiler noise.
This commit is contained in:
parent
8a54a51863
commit
8becd824aa
@ -129,17 +129,31 @@ for flag in $acx_pthread_flags; do
|
||||
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
||||
[acx_pthread_ok=yes], [acx_pthread_ok=no])
|
||||
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
# Don't use options that are ignored by the compiler.
|
||||
# We find them by checking stderror.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
|
||||
# we continue with more flags because Linux needs -lpthread
|
||||
# for libpq builds on PostgreSQL. The test above only
|
||||
# tests for building binaries, not shared libraries.
|
||||
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
|
||||
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
|
||||
else acx_pthread_ok=no
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AC_MSG_RESULT($acx_pthread_ok)
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
# we continue with more flags because Linux needs -lpthread
|
||||
# for libpq builds on PostgreSQL. The test above only
|
||||
# tests for building binaries, not shared libraries.
|
||||
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
|
||||
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
28
configure
vendored
28
configure
vendored
@ -13325,18 +13325,32 @@ acx_pthread_ok=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
# Don't use options that are ignored by the compiler.
|
||||
# We find them by checking stderror.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
|
||||
# we continue with more flags because Linux needs -lpthread
|
||||
# for libpq builds on PostgreSQL. The test above only
|
||||
# tests for building binaries, not shared libraries.
|
||||
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
|
||||
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
|
||||
else acx_pthread_ok=no
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
|
||||
echo "${ECHO_T}$acx_pthread_ok" >&6
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
# we continue with more flags because Linux needs -lpthread
|
||||
# for libpq builds on PostgreSQL. The test above only
|
||||
# tests for building binaries, not shared libraries.
|
||||
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
|
||||
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user