aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-10-09 10:42:00 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-06-26 15:56:38 +0100
commit1776e3e59ca6200dff981894361b8b49cb453766 (patch)
treebc9088101bf5941ecfb9455f668af46beaf53484 /gdb/configure
parentd1c361252ba4902046fd7725f880fa166e88e3e4 (diff)
downloadgdb-1776e3e59ca6200dff981894361b8b49cb453766.zip
gdb-1776e3e59ca6200dff981894361b8b49cb453766.tar.gz
gdb-1776e3e59ca6200dff981894361b8b49cb453766.tar.bz2
Fix --enable-libctf and --disable-static
This fixes test runs and compilation when --disable-libctf, --disable-static, or --enable-shared are passed. Changes since v2: Use GCC_ENABLE and fix indentation. Fix prototype using 'void'. Use 'unsupported' and gdb_caching_proc. Changes since v3: Adapt to upstream changes providing skip_ctf_tests. Changes since v4: Adapt to upstream changes in the seven months (!) since I last looked at this. gdb/ChangeLog * configure.ac: Add --enable-libctf: handle --disable-static properly. * acinclude.m4: sinclude ../config/enable.m4. * Makefile.in (aclocal_m4_deps): Adjust accordingly. (LIBCTF): Substitute in. (CTF_DEPS): New, likewise. (CLIBS): libctf needs symbols from libbfd: move earlier. (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath flags. * ctfread.c: Surround in ENABLE_LIBCTF. (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub. * configure: Regenerate. * config.in: Likewise. gdb/testsuite/ChangeLog * configure.ac: Add --enable-libctf. * aclocal.m4: sinclude ../config/enable.m4. * Makefile.in (site.exp): Add enable_libctf to site.exp. * lib/gdb.exp (skip_ctf_tests): Use it. * gdb.base/ctf-constvars.exp: Error message tweak. * gdb.base/ctf-ptype.exp: Likewise. * configure: Regenerate.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure40
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index ef10aa7..e8bfdbc 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -631,6 +631,9 @@ GDB_NM_FILE
LTLIBXXHASH
LIBXXHASH
HAVE_LIBXXHASH
+CTF_DEPS
+LIBCTF
+ENABLE_LIBCTF
LTLIBBABELTRACE
LIBBABELTRACE
HAVE_LIBBABELTRACE
@@ -917,6 +920,7 @@ with_babeltrace
with_libbabeltrace_prefix
with_libbabeltrace_type
with_xxhash
+enable_libctf
with_libxxhash_prefix
with_libxxhash_type
enable_unit_tests
@@ -1583,6 +1587,7 @@ Optional Features:
gcc is used
--enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
--enable-sim link gdb with simulator
+ --enable-libctf Handle .ctf type-info sections [default=yes]
--enable-unit-tests Enable the inclusion of unit tests when compiling
GDB
@@ -18561,6 +18566,41 @@ else
fi
+ # Check whether --enable-libctf was given.
+if test "${enable_libctf+set}" = set; then :
+ enableval=$enable_libctf;
+ case "$enableval" in
+ yes|no) ;;
+ *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
+ esac
+
+else
+ enable_libctf=yes
+fi
+
+
+if test x${enable_static} = xno; then
+ LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
+ CTF_DEPS="../libctf/.libs/libctf.so"
+else
+ LIBCTF="../libctf/.libs/libctf.a"
+ CTF_DEPS="$LIBCTF"
+fi
+if test "${enable_libctf}" = yes; then
+
+$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
+
+else
+ LIBCTF=
+ CTF_DEPS=
+fi
+
+
+
+
+# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
+# empty version.
+
if test "x$with_xxhash" != "xno"; then