public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Building GDB
@ 2024-02-19 23:00 Levente
  2024-02-19 23:55 ` Tom Kacvinsky
  0 siblings, 1 reply; 8+ messages in thread
From: Levente @ 2024-02-19 23:00 UTC (permalink / raw)
  To: gdb

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.

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?



Thanks,
Lev

-- 
Levente Kovacs
Senior Electronic Engineer

W: http://levente.logonex.eu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building GDB
  2024-02-19 23:00 Building GDB Levente
@ 2024-02-19 23:55 ` Tom Kacvinsky
  2024-02-21 16:03   ` Guinevere Larsen
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Kacvinsky @ 2024-02-19 23:55 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]

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.
>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building GDB
  2024-02-19 23:55 ` Tom Kacvinsky
@ 2024-02-21 16:03   ` Guinevere Larsen
  0 siblings, 0 replies; 8+ messages in thread
From: Guinevere Larsen @ 2024-02-21 16:03 UTC (permalink / raw)
  To: Tom Kacvinsky, gdb

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building gdb
  2005-10-20 13:45 ` sjhill
@ 2005-10-20 14:06   ` Mark Kettenis
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Kettenis @ 2005-10-20 14:06 UTC (permalink / raw)
  To: sjhill; +Cc: tim.bedding, gdb

> Date: Thu, 20 Oct 2005 07:45:23 -0500 (CDT)
> From: sjhill@realitydiluted.com
> 
> > Is there a way to build if flex is not available?
> > 
> How crippled is your host system then if you do not have flex?
> 

All the world's a VAX^H^H^H^H^HLinux isn't it?

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building gdb
  2005-10-20 13:49 ` Eli Zaretskii
@ 2005-10-20 13:53   ` Daniel Jacobowitz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2005-10-20 13:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tim.bedding, gdb

On Thu, Oct 20, 2005 at 03:49:25PM +0200, Eli Zaretskii wrote:
> > From: "Tim Bedding" <tim.bedding@polyhedra.com>
> > Date: Thu, 20 Oct 2005 14:37:41 +0100
> > 
> > When I build gdb 6.3, I get the output
> >   ada-lex.c missing and flex not available.
> 
> I think someone forgot to commit ada-lex.c to the CVS repository.

It's supposed to be generated in snapshots, not in CVS.  It should
probably be added to either YYFILES or DISTSTUFF.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building gdb
  2005-10-20 13:38 Building gdb Tim Bedding
  2005-10-20 13:45 ` sjhill
@ 2005-10-20 13:49 ` Eli Zaretskii
  2005-10-20 13:53   ` Daniel Jacobowitz
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2005-10-20 13:49 UTC (permalink / raw)
  To: tim.bedding; +Cc: gdb

> From: "Tim Bedding" <tim.bedding@polyhedra.com>
> Date: Thu, 20 Oct 2005 14:37:41 +0100
> 
> When I build gdb 6.3, I get the output
>   ada-lex.c missing and flex not available.

I think someone forgot to commit ada-lex.c to the CVS repository.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Building gdb
  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
  1 sibling, 1 reply; 8+ messages in thread
From: sjhill @ 2005-10-20 13:45 UTC (permalink / raw)
  To: tim.bedding; +Cc: gdb

> Is there a way to build if flex is not available?
> 
How crippled is your host system then if you do not have flex?

-Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Building gdb
@ 2005-10-20 13:38 Tim Bedding
  2005-10-20 13:45 ` sjhill
  2005-10-20 13:49 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Tim Bedding @ 2005-10-20 13:38 UTC (permalink / raw)
  To: gdb

When I build gdb 6.3, I get the output
  ada-lex.c missing and flex not available.

Is there a way to build if flex is not available?

Regards
Tim

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-21 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 23:00 Building GDB Levente
2024-02-19 23:55 ` Tom Kacvinsky
2024-02-21 16:03   ` Guinevere Larsen
  -- 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).