gdb: build native gdb with static libexpat

Use --with-libexpat-type=static to search for static libexpat in gdb
native. This should fix #2230.

Signed-off-by: Michał Zagórski <zagura6+github@gmail.com>
This commit is contained in:
Michał Zagórski 2024-11-19 07:36:02 +01:00 committed by Chris Packham
parent ab5c23ce70
commit 9c444f4ca6

View File

@ -175,8 +175,14 @@ do_debug_gdb_build()
# where libexpat for build platform lives, which is
# unacceptable for cross-compiling.
#
native_extra_config+=("--with-expat=${CT_BUILDTOOLS_PREFIX_DIR}")
native_extra_config+=("--with-expat=y")
native_extra_config+=("--with-libexpat-prefix=${CT_BUILDTOOLS_PREFIX_DIR}")
# Without specifying libexpat type, configure would look for -lexpat
# and try to link with shared library, set library type explicitly.
if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then
native_extra_config+=("--with-libexpat-type=static")
fi
do_gdb_backend \
buildtype=native \
subdir=${subdir} \