diff options
author | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2023-06-02 22:39:54 +0200 |
---|---|---|
committer | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2023-10-05 22:58:11 -0300 |
commit | 740ce35025a5a37d78b0ee2a363c35534eaa1a2a (patch) | |
tree | bf785d620679fa4a8ee56ecbe5495bdb7748f138 /gdb/configure | |
parent | 1aa39bcc2eadd5eaedd9126974b3bda46c154abb (diff) | |
download | gdb-740ce35025a5a37d78b0ee2a363c35534eaa1a2a.zip gdb-740ce35025a5a37d78b0ee2a363c35534eaa1a2a.tar.gz gdb-740ce35025a5a37d78b0ee2a363c35534eaa1a2a.tar.bz2 |
gdb/configure.ac: Add option --with-additional-debug-dirs
If you want to install GDB in a custom prefix, have it look for debug info
in that prefix but also in the distro's default location (typically,
/usr/lib/debug) and run the GDB testsuite before doing "make install", you
have a bit of a problem:
Configuring GDB with '--prefix=$PREFIX' sets the GDB 'debug-file-directory'
parameter to $PREFIX/lib/debug. Unfortunately this precludes GDB from
looking for distro-installed debug info in /usr/lib/debug. For regular GDB
use you could set debug-file-directory to $PREFIX:/usr/lib/debug in
$PREFIX/etc/gdbinit so that GDB will look in both places, but if you want
to run the testsuite then that doesn't help because in that case GDB runs
with the '-nx' option.
There's the configure option '--with-separate-debug-dir' to set the default
value for 'debug-file-directory', but it accepts only one directory and not
a list. I considered modifying it to accept a list, but it's not obvious
how to do that because its value is also used by BFD, as well as processed
for "relocatability".
I thought it was simpler to add a new option to specify a list of
additional directories that will be appended to the debug-file-directory
setting.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gdb/configure b/gdb/configure index 2d07e0c..1cbc356 100755 --- a/gdb/configure +++ b/gdb/configure @@ -906,6 +906,7 @@ enable_fast_install with_gnu_ld enable_libtool_lock with_separate_debug_dir +with_additional_debug_dirs with_gdb_datadir with_relocated_sources with_auto_load_dir @@ -1660,6 +1661,9 @@ Optional Packages: --with-separate-debug-dir=PATH look for global separate debug info in this path [LIBDIR/debug] + --with-additional-debug-dirs=PATHs + colon-separated list of additional directories to + search for separate debug info --with-gdb-datadir=PATH look for global separate data files in this path [DATADIR/gdb] --with-relocated-sources=PATH @@ -11479,7 +11483,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11482 "configure" +#line 11486 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11585,7 +11589,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11588 "configure" +#line 11592 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17886,6 +17890,17 @@ _ACEOF + +# Check whether --with-additional-debug-dirs was given. +if test "${with_additional_debug_dirs+set}" = set; then : + withval=$with_additional_debug_dirs; +cat >>confdefs.h <<_ACEOF +#define ADDITIONAL_DEBUG_DIRS "${withval}" +_ACEOF + +fi + + # We can't pass paths as command line arguments. # Mingw32 tries to be clever and will convert the paths for us. # For example -DBINDIR="/usr/local/bin" passed on the command line may get |