This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] btrace: fix the non-native build
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: mircea dot gherzan at intel dot com, tromey at redhat dot com, gdb-patches at sourceware dot org, markus dot t dot metzger at intel dot com
- Date: Wed, 21 Aug 2013 15:59:07 +0200
- Subject: Re: [PATCH] btrace: fix the non-native build
- References: <1376405154-13435-1-git-send-email-mircea dot gherzan at intel dot com> <201308131503 dot r7DF31S2005371 at glazunov dot sibelius dot xs4all dot nl>
On Tue, 13 Aug 2013 17:03:01 +0200, Mark Kettenis wrote:
> > From: Mircea Gherzan <mircea.gherzan@intel.com>
> > Date: Tue, 13 Aug 2013 16:45:54 +0200
> >
> > When building on a non-Linux host for a Linux target, the build fails
> > because the linux-btrace object is not built/linked.
You should have included your config and error message.
> > 2013-08-09 Mircea Gherzan <mircea.gherzan@intel.com>
> >
> > gdb/
> > * configure.tgt: Add linux-btrace.o to gdb_target_obs for i386
> > and x86_64 Linux targets.
> > * config/i386/linux.mh (NATDEPFILES): Remove linux-btrace.o.
> > * config/i386/linux64.mh (NATDEPFILES): Remove linux-btrace.o.
>
> Nope. linux-btrace.c contains native code that should only ever be
> linked into a native GDB.
Technically linux-btrace.c defines:
linux_disable_btrace
linux_enable_btrace
linux_read_btrace
linux_supports_btrace
which are only used from amd64-linux-nat.c and i386-linux-nat.c which both are
also present in NATDEPFILES.
I have tested build on x86_64-unknown-netbsd5.1 (gcc70.fsffrance.org) for both
FSF GDB HEAD and for v4 patchset by Markus Metzger and it all builds fine.
(gdbserver is off-topic here, the patch does not modify any gdbserver-related
files.)
Jan