1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Remove the option to build thread_test.c outside configure.

Theoretically one could go into src/test/thread and build/run this
program there.  In practice, that hasn't worked since 96bf88d52,
and probably much longer on some platforms (likely including just
the sort of hoary leftovers where this test might be of interest).
While it wouldn't be too hard to repair the breakage, the fact that
nobody has noticed for two years shows that there is zero usefulness
in maintaining this build pathway.  Let's get rid of it and decree
that thread_test.c is *only* meant to be built/used in configure.

Given that decision, it makes sense to put thread_test.c under config/
and get rid of src/test/thread altogether, so that's what I did.

In passing, update src/test/README, which had been ignored by some
not-so-recent additions of subdirectories.

Discussion: https://postgr.es/m/227659.1603041612@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2020-10-21 12:08:48 -04:00
parent 555eb1a4f0
commit 8a2121185b
10 changed files with 20 additions and 128 deletions

11
configure vendored
View File

@ -18992,23 +18992,21 @@ $as_echo_n "checking thread safety of required library functions... " >&6; }
_CFLAGS="$CFLAGS"
_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
$as_echo "maybe" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/test/thread on the target machine.
" >&5
$as_echo "$as_me: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/test/thread on the target machine.
" >&2;}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "$srcdir/src/test/thread/thread_test.c"
#include "$srcdir/config/thread_test.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@ -19017,9 +19015,8 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "thread test program failed
This platform is not thread-safe. Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety." "$LINENO" 5
This platform is not thread-safe. Check the file 'config.log' for the
exact reason, or use --disable-thread-safety to disable thread safety." "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext