[Buildroot] [PATCH] toolchain-external: Introduce gdb_copy option

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Nov 18 08:11:44 UTC 2019


Hello,

On Mon, 18 Nov 2019 11:00:47 +0300
Evgeniy Didin <Evgeniy.Didin at synopsys.com> wrote:

> Some prebuilt toolchains provide full gdb debugger for a target as
> well as gdbserver. Lets add separate option for gdb the same way as
> it was done for gdbserver. With this change there will be no need
> to build gdb package, this will reduce build time.
> 
> Signed-off-by: Evgeniy Didin <Evgeniy.Didin at synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> Cc: arc-buildroot at synopsys.com

Thanks for your contribution and proposal. However, I'm wondering if
this really works properly in the general case. Indeed, gdb is often
linked against additional libraries: ncurses, expat, python, zlib,
lzma, etc.

Here you are only copying the gdb binary itself, but not the libraries
it might depend on. But even if you were copying those libraries, they
would potentially conflict with the ones built by Buildroot.

So I'm not sure if there's really a good way to re-use a gdb built by
an external toolchain.

In your specific case, is the gdb binary statically linked ? Or at
least statically linked against all libraries except the C library ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list