Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen via Gdb <gdb@sourceware.org>
To: Tom Kacvinsky <tkacvins@gmail.com>, gdb@sourceware.org
Subject: Re: Building GDB
Date: Wed, 21 Feb 2024 17:03:55 +0100	[thread overview]
Message-ID: <4bc0b7ee-4b2b-4902-94fb-586c71ba816e@redhat.com> (raw)
In-Reply-To: <CAG_eJLcG543uBO9gEiV-061Za0RU3qPpT=7F0pWjFFDHV181ow@mail.gmail.com>

On 20/02/2024 00:55, Tom Kacvinsky via Gdb wrote:
> On Mon, Feb 19, 2024 at 6:01 PM Levente via Gdb <gdb@sourceware.org> wrote:
>
>> Hi all,
>>
>>
>>
>> I'm putting together a toolchain for AVR micro-controllers, and want to
>> build GDB without binutils. I checked out the source, and when I'm on
>> the binutils-2_42 tag, the build fails with this:
>>
>> CXX    tui/tui-command.o
>> In file included from ../../gdb/tui/tui-data.h:28,
>>                     from ../../gdb/tui/tui-command.c:24:
>> ../../gdb/../gdbsupport/gdb-checked-static-cast.h: In instantiation of
>> ‘T gdb::checked_static_cast(V*) [with T = tui_cmd_window*; V =
>> tui_win_info]’:
>> ../../gdb/tui/tui-command.c:65:15:   required from here
>> ../../gdb/../gdbsupport/gdb-checked-static-cast.h:63:14: error: cannot
>> convert from pointer to base class ‘tui_win_info’ to pointer to derived
>> class ‘tui_cmd_window’ because the base is virtual
>>       63 |   T result = static_cast<T> (v);
>>          |              ^~~~~~~~~~~~~~~~~~
>> make[2]: *** [Makefile:1930: tui/tui-command.o] Error 1
>>
>>
>> So I decided to build gdb and binutils separately from different
>> commits. I can disable GDB by specifying --without-gdb.

Note that this isn't the only top-level component built for GDB only. 
 From an email in January, the full list of components to be disabled 
is: --disable-gdb --disable-gdbserver --disable-libbacktrace 
--disable-libdecnumber --disable-readline --disable-sim

>>
>> The question is, how can I build GDB without binutils?
>>
>> So here is what I want to do:
>>
>> check out binutils-2_42
>> configure/build/install binutils
>> clean the repo
>> chec out gdb-14.1-release
>> configure/build/install gcc
>>
>> How can I do this?
>>
> I did this as follows (through experimentation)
>
> git checkout gdb-14.1-release
> mkdir build
> cd build
> ../configure --disable-binutils --disable-gas --disable-ld --disable-gprof
> --disable-gprofng --prefix=/your/path/here
>
> This will build the bits necessary for building gdb, then build gcore, gdb,
> gdb-add-index and gdbserver.
>
> There might be a better - that is, official - way of doing this.
>
> Tom
>
There was some chat of adding a single option to disable all of GDB and 
all of binutils, but I don't think that was ever implemented... or if it 
was, it escaped my notice.

-- 
Cheers,
Guinevere Larsen
She/Her/Hers


  reply	other threads:[~2024-02-21 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 23:00 Levente via Gdb
2024-02-19 23:55 ` Tom Kacvinsky via Gdb
2024-02-21 16:03   ` Guinevere Larsen via Gdb [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-20 13:38 Building gdb Tim Bedding
2005-10-20 13:45 ` sjhill
2005-10-20 14:06   ` Mark Kettenis
2005-10-20 13:49 ` Eli Zaretskii
2005-10-20 13:53   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bc0b7ee-4b2b-4902-94fb-586c71ba816e@redhat.com \
    --to=gdb@sourceware.org \
    --cc=blarsen@redhat.com \
    --cc=tkacvins@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox