Skip to content

Commit e8f84c7

Browse files
committed
cross-gdb: Add LZMA support configuration
This commit adds a new configuration for enabling the LZMA compression support through the liblzma, which is required by the GDB's "mini debuginfo" feature. Note that this configuration is not enabled by default because it is a niche feature and requires the liblzma, which is currently not built by the crosstool-ng for the host (gdb also keeps this feature disabled by default unless liblzma is available for the host). Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent e1d175f commit e8f84c7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

config/debug/gdb.in.cross

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ config GDB_CROSS_PYTHON_BINARY
8585
help message in gdb's configure script for the --with-python option
8686
for further guidance.
8787

88+
config GDB_CROSS_LZMA
89+
bool
90+
prompt "Build GDB with LZMA"
91+
help
92+
Build GDB with liblzma, a compression library supporting the LZMA
93+
algorithm. LZMA is used by the GDB's "mini debuginfo" feature, which is
94+
only useful on the platforms using the ELF object file format.
95+
96+
Note that crosstool-ng does not build liblzma for the host and you are
97+
responsible for providing this library on the build system.
98+
8899
config GDB_CROSS_EXTRA_CONFIG_ARRAY
89100
string
90101
prompt "Cross-gdb extra config"

scripts/build/debug/300-gdb.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ do_debug_gdb_build_cross()
5959
cross_extra_config+=("--disable-sim")
6060
fi
6161

62+
if [ "${CT_GDB_CROSS_LZMA}" = "y" ]; then
63+
cross_extra_config+=("--with-lzma")
64+
else
65+
cross_extra_config+=("--without-lzma")
66+
fi
67+
6268
if ${CT_HOST}-gcc --version 2>&1 | grep clang; then
6369
# clang detects the line from gettext's _ macro as format string
6470
# not being a string literal and produces a lot of warnings - which

0 commit comments

Comments
 (0)