Remove gdb/testsuite/configure

I didn't see a strong reason to have a separate configure script in
gdb/testsuite, so this patch removes it.  The few relevant configury
bits are moved into gdb's configure script.  Some of the old
testsuite/configure script (e.g., the header check) is dead code.

This also adds a Makefile rule to rebuild lib/pdtrace.  This was
missing from the old code.

'read1' is now a dependency of check-read1, rather than extra code at
configure time.

Finally, the old "ENABLE_LIBCTF" subst in gdb/configure was not used;
nor was the variable defined, so this was always empty.  However, the
lower-case variant was used by the testsuite, so this patch renames
the subst.

gdb/ChangeLog
2021-06-01  Tom Tromey  <tromey@adacore.com>

	* configure.ac: Copy some code from testsuite/configure.ac.
	(enable_libctf): Subst this, not ENABLE_LIBCTF.
	* configure: Rebuild.

gdb/testsuite/ChangeLog
2021-06-01  Tom Tromey  <tromey@adacore.com>

	* aclocal.m4, configure.ac, configure: Remove.
	* Makefile.in (EXTRA_RULES): Remove.
	($(abs_builddir)/site.exp site.exp): Don't depend on
	config.status.
	(distclean maintainer-clean realclean, Makefile): Update.
	(config.status): Remove target.
	(lib/pdtrace): New target.
	(all): Don't depend on EXTRA_RULES.
	(check-read1): Depend on read1.so, expect-read1.
This commit is contained in:
Tom Tromey
2021-06-01 08:11:30 -06:00
parent 17d305ef8f
commit f99d1d3749
8 changed files with 141 additions and 4961 deletions

88
gdb/configure vendored
View File

@@ -619,10 +619,14 @@ ac_includes_default="\
# include <unistd.h>
#endif"
enable_option_checking=no
ac_header_list=
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
NM_TRANSFORM_NAME
GAS_TRANSFORM_NAME
READELF_TRANSFORM_NAME
STRIP_TRANSFORM_NAME
GCORE_TRANSFORM_NAME
GDB_TRANSFORM_NAME
XSLTPROC
@@ -633,7 +637,7 @@ LIBXXHASH
HAVE_LIBXXHASH
CTF_DEPS
LIBCTF
ENABLE_LIBCTF
enable_libctf
LTLIBBABELTRACE
LIBBABELTRACE
HAVE_LIBBABELTRACE
@@ -664,6 +668,7 @@ GDBTKLIBS
X_LIBS
X_LDFLAGS
X_CFLAGS
subdirs
TK_XINCLUDES
TK_DEPS
TK_LIBRARY
@@ -771,7 +776,7 @@ PKG_CONFIG_PATH
PKG_CONFIG
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
RPATH_ENVVAR
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
@@ -876,6 +881,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
enable_shared
enable_targets
enable_64_bit_bfd
enable_gdbmi
@@ -956,8 +962,7 @@ DEBUGINFOD_LIBS
YACC
YFLAGS
XMKMF'
ac_subdirs_all='testsuite
gdbtk'
ac_subdirs_all='gdbtk'
# Initialize some variables set by options.
ac_init_help=
@@ -1583,6 +1588,7 @@ Optional Features:
sometimes confusing) to the casual installer
--enable-plugins Enable support for plugins
--disable-largefile omit support for large files
--enable-shared build shared libraries deault=yes
--enable-targets=TARGETS
alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -6597,9 +6603,34 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
# Enable shared libraries.
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then :
enableval=$enable_shared;
else
enable_shared=yes
fi
subdirs="$subdirs testsuite"
# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
# such that we can find the shared libraries in the build tree.
if test $enable_shared = no; then
# The variable `RPATH_ENVVAR' itself is not likely to be used on any
# platform.
RPATH_ENVVAR=RPATH_ENVVAR
else
# The variable `LD_LIBRARY_PATH' is used on most platforms.
RPATH_ENVVAR=LD_LIBRARY_PATH
# The following exceptions are taken from Libtool 1.4.3.
case $host_os in
aix*)
if test $host_cpu != ia64; then
RPATH_ENVVAR=LIBPATH
fi ;;
darwin* | rhapsody*)
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
esac
fi
# Check whether to support alternative target configurations
@@ -18274,7 +18305,9 @@ $as_echo "${private_dir}" >&6; }
CONFIG_OBS="${CONFIG_OBS} gdbres.o"
fi
subdirs="$subdirs gdbtk"
subdirs="$subdirs gdbtk"
fi
fi
@@ -19788,6 +19821,44 @@ ac_config_files="$ac_config_files gcore"
ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
# Transform the name of some programs for the testsuite/lib/pdtrace
# test tool.
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
STRIP_TRANSFORM_NAME=`echo strip | sed -e "$gdb_ac_transform"`
if test "x$STRIP_TRANSFORM_NAME" = x; then
STRIP_TRANSFORM_NAME=strip
fi
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
READELF_TRANSFORM_NAME=`echo readelf | sed -e "$gdb_ac_transform"`
if test "x$READELF_TRANSFORM_NAME" = x; then
READELF_TRANSFORM_NAME=readelf
fi
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
GAS_TRANSFORM_NAME=`echo as | sed -e "$gdb_ac_transform"`
if test "x$GAS_TRANSFORM_NAME" = x; then
GAS_TRANSFORM_NAME=as
fi
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
NM_TRANSFORM_NAME=`echo nm | sed -e "$gdb_ac_transform"`
if test "x$NM_TRANSFORM_NAME" = x; then
NM_TRANSFORM_NAME=nm
fi
ac_config_files="$ac_config_files testsuite/lib/pdtrace"
ac_config_files="$ac_config_files testsuite/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -20517,6 +20588,8 @@ do
"gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
"testsuite/lib/pdtrace") CONFIG_FILES="$CONFIG_FILES testsuite/lib/pdtrace" ;;
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -21147,6 +21220,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
"nm.h":L) echo > stamp-nmh ;;
"gcore":F) chmod +x gcore ;;
"testsuite/lib/pdtrace":F) chmod +x testsuite/lib/pdtrace ;;
esac
done # for ac_tag