diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2019-10-09 10:42:00 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-06-26 15:56:38 +0100 |
commit | 1776e3e59ca6200dff981894361b8b49cb453766 (patch) | |
tree | bc9088101bf5941ecfb9455f668af46beaf53484 /gdb/ctfread.c | |
parent | d1c361252ba4902046fd7725f880fa166e88e3e4 (diff) | |
download | gdb-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/ctfread.c')
-rw-r--r-- | gdb/ctfread.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c index e296b13..f44cbec 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -81,6 +81,9 @@ #include "block.h" #include "ctfread.h" #include "psympriv.h" + +#if ENABLE_LIBCTF + #include "ctf.h" #include "ctf-api.h" @@ -1485,3 +1488,13 @@ elfctf_build_psymtabs (struct objfile *of) scan_partial_symbols (fp, of); } + +#else + +void +elfctf_build_psymtabs (struct objfile *of) +{ + /* Nothing to do if CTF is disabled. */ +} + +#endif /* ENABLE_LIBCTF */ |