Re: [PATCH] Change gdbserver to use existing gnulib and libiberty

Simon Marchi
2020-02-24T19:46:31Z

On 2020-02-24 9:16 a.m., Tamar Christina wrote:
> Hi Tom,
>
> We're having trouble building cross toolchains after this change.
>
> Before this we were able to build gdb running on HOST but build gdbserver running on TARGET.
>
> After this change we can no longer do this since you can't link objects from different architectures.
>
> Is this not a supported workflow anymore? Any suggestions how to do this after these changes?
>
> Thanks,
> Tamar

Hi Tamar,

When you were building gdb running on HOST and gdbserver running on TARGET, I presume
you were running two configure scripts, like this?

$ .../binutils-gdb/configure --host=x86-foo --target=arm-bar

and in another directory

$ .../binutils-gdb/gdb/gdbserver/configure --host=arm-bar

Now, gdbserver being a proper top-level project (just like gdb and binutils
are), you can do:

$ .../binutils-gdb/configure --host=x86-foo --target=arm-bar

... to configure GDB, and:

$ .../binutils-gdb/configure --target=arm-bar

... to configure GDBserver.

In fact, these commands set up build directories to build the entire
binutils-gdb repository. You could either pass a bunch of --disable-*
options to configure in order to disable the projects you don't want
to build, or build using "make all-gdb" / "make all-gdbserver" to only
build gdb or gdbserver respectively.

Hope that helps.

Simon