All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Joel Stanley <joel@jms.id.au>,
	Buildroot Mailing List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [RFC] package/go: switch to gcc go instead of go-bootstrap
Date: Thu, 26 May 2022 09:43:22 +0200	[thread overview]
Message-ID: <20220526074322.GA451036@scaer> (raw)
In-Reply-To: <20220525234312.643dfc03@windsurf>

On 2022-05-25 23:43 +0200, Thomas Petazzoni spake thusly:
> Hello Christian,
> 
> On Wed, 25 May 2022 14:07:38 -0700
> Christian Stewart <christian@paral.in> wrote:
> 
> > I propose that we switch to using Gccgo:
> > 
> >  - build gcc and/or use external toolchain
> >     - add flags to enable the "go" language in Gcc
> >     - GCC 11 or later
> 
> The problem I see with this is that many external toolchains do not
> provide Go support. While this will probably evolve over time, this is
> not something that we can reasonably require right now.
> 
> So I believe we probably don't have much other choice but to provide a
> path that consists in building Go in multiple stages: first Go 1.4,
> then a version of Go that is the last one that can be built with Go
> 1.4, and use that one to build the latest version of Go.
> 
> What do others think?

I don't much like that we do need a multi-stage bootstrap, but this
looks like the measiest path forward. Except that the second-stage
bootstrap golang compiler will have to be installed "over" the
first-stage one, so we'd need to be careful whether they would install
a conflicting set of files.

Then, long-term, the gccgo path looks the most forward-looking solution,
but it is probably a bit more complex to handle, as the gcc package is
not trivial to extend (but just enabling go should not be *that* complex
either, hopefully).

For internal toolchains, we alrady have a flag to enable C++; for
externa l toolchains, we also have a flag for C++, D, and Fortran. We
can add a similar flag for go. People usign an external toolchain
without go support won't be able to use go packages, the same they won't
be able to use C++ with an external tolchain that laxk a C++ compiler
(even though this is pretty rare nowadays, tbh).

So, in the end, maybe the gccgo path is not that scary.

Still, I wonder what go level gccgo provides: is it a complete
replacement for the golang compiler? Will we have (or do we already
have) go packages that can't be built with gccgo but require golang?
Or the ther way around?

If so, do we plan on suporting that case (e.g.: depends on GO_IS_GOLANG,
or even: depends on GO_IS_GCCGO)?

Or do we plan on using gccgo just to build golang?

Regards,
Yann E. MORIN.

> Thomas
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-05-26  7:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 21:07 [Buildroot] [RFC] package/go: switch to gcc go instead of go-bootstrap Christian Stewart via buildroot
2022-05-25 21:43 ` Thomas Petazzoni via buildroot
2022-05-26  2:17   ` Joel Stanley
2022-05-26 13:46     ` Thomas Petazzoni via buildroot
2022-05-27  0:30       ` Christian Stewart via buildroot
2022-05-26  7:43   ` Yann E. MORIN [this message]

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=20220526074322.GA451036@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=joel@jms.id.au \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.