Re: In stage1 bootstrap assembler claims Error: junk at end of line, first unrecognized character is `/'

Florian Weimer via Gcc-help <[email protected]> Mon, 13 Apr 2026 17:41:45 +0200
Newsgroups gmane.comp.gcc.help
Message-ID <[email protected]>
* Simon Richter:

> Hi,
>
> On 4/10/26 4:47 PM, Dennis Clarke via Gcc-help wrote:
>
>> https://github.com/just-buildsystem/bootstrappable-toolchain/blob/
>> master/doc/BOOTSTRAP.md
>
> That is for a very old gcc. :P
>
> The general direction probably still holds:
>
> 1. build a "freestanding" compiler that only supports C, using the
> "all-host" target.
> 2. use that to build a kernel and libc.
> 3. with installed kernel and libc, compile the actual gcc with all
> languages.
>
> Most of the crt?.o files should be provided by the libc.

Upstream glibc has a script for that which automates this for most of
the ABIs glibc supports:

<https://sourceware.org/cgit/glibc/tree/scripts/build-many-glibcs.py>

There are various other scripts like that, but ours seems to be much
more stable, rarely requiring changes due to (say) ongoing libstdc++
development.  I believe this is not true of some of the alternatives
(which may build faster or with more compiler fatures, granted).

Thanks,
Florian