crosstool-ng/packages/gdb/10.2/0001-uclibc-no-gettimeofday-clobber.patch
Alexey Brodkin 5463ab4bf6 gdb: Add gdb-10.2
In GDB 10.x gdbserver was promoted to the top-level folder,
see https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=919adfe8409211c726c1d05b47ca59890ee648f1
Which means it is no longer a subfolder in "gdb" and so we have to
build gdbserver now exactly in the same way as normal native GDB.

One interesting detail is gdbserver doesn't need to deal with target
description in .xml so it doesn't depend on libexpat on target,
thus we need to move libexpat explicit selection from do_gdb_backend()
to its callers when building native [full] gdb as well as cross-gdb
for the host.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
[cp: support old/new layout, regenerate patches]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 10:12:56 +12:00

36 lines
1.5 KiB
Diff

Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise.
This patch helps building x86_64-unknown-linux-uclibc toolchains, the final
gdb-native step otherwise fails when linking the libinproctrace.so
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: Alexey Neyman <stilor@att.net>
---
gnulib/configure | 2 ++
gnulib/import/m4/gettimeofday.m4 | 2 ++
2 files changed, 4 insertions(+)
--- a/gnulib/configure
+++ b/gnulib/configure
@@ -20745,6 +20745,8 @@
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # Guess all is fine on uclibc systems.
+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess all is fine on musl systems.
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.
--- a/gnulib/import/m4/gettimeofday.m4
+++ b/gnulib/import/m4/gettimeofday.m4
@@ -105,6 +105,8 @@
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # Guess all is fine on uclibc systems.
+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess all is fine on musl systems.
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.