linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Mark Brown <broonie@kernel.org>,
	linux-toolchains@vger.kernel.org,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: gcc 5 & 6 & others already out of date?
Date: Fri, 14 Oct 2022 08:37:52 +0200	[thread overview]
Message-ID: <87k052q5a7.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAKwvOdnP=FTzhm1S-_ZyQaF+LGYkF1DWUekRzvEmxAr=u=FTCQ@mail.gmail.com> (Nick Desaulniers's message of "Thu, 13 Oct 2022 14:03:30 -0700")

* Nick Desaulniers:

> On Thu, Oct 13, 2022 at 11:44 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * Jason A. Donenfeld:
>>
>> > It's also easy, nearly trivial, to download toolchains. Arnd provides a
>> > bunch with his crosstool. "Must use a toolchain from your distro" is a
>> > requirement that affects nobody.
>>
>> But not everything will be built with the cross-compiler.  For the
>> kernel build tools and other userspace components, you'll need a native
>> toolchain that can build programs that can actually run on the build
>> host.
>
> ... when using GCC. We don't have this pain when using clang.
>
> https://docs.kernel.org/kbuild/llvm.html#llvm-utilities
>
> i.e.
> $ make ARCH=arm LLVM=1
>
> will build with one instance of a clang binary (and ld.lld and
> llvm-objcopy etc.) for Target AND Host.  No need for multiple
> toolchain binaries.

I'm sure it's nice if it works.  But someone has to do the distribution
integration work.  If that has already happened upstream, that's great.
(There are many little details which may or may not matter for kernel
builds, e.g., static libraries have to be PIC or PIE because Clang now
defaults to PIE links.)

But it's also sort of irrelevant in the context of this thread.
<https://llvm.org/docs/GettingStarted.html#software> says GCC 7 is
required, and this:

| LLVM is very demanding of the host C++ compiler, and as such tends to
| expose bugs in the compiler. We also attempt to follow improvements
| and developments in the C++ language and library reasonably
| closely. As such, we require a modern host C++ toolchain, both
| compiler and standard library, in order to build LLVM.

So a LLVM build from upstream sources won't be an easy escape hatch if
the kernel bumps toolchain version requirements.

Historically, GCC has been much more conservative when it comes to host
toolchain requirements.  But there are other traps (fixincludes can have
nasty side effects, for example).

I'm not saying the kernel shouldn't change version requirements.  But I
do think it's unreasonable to expect that people will be able to build
their own newer toolchains from upstream sources as a workaround.

Thanks,
Florian


  reply	other threads:[~2022-10-14  6:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13  1:36 gcc 5 & 6 & others already out of date? Jason A. Donenfeld
2022-10-13 12:22 ` David Laight
2022-10-13 12:59 ` Mark Brown
2022-10-13 15:23   ` Jason A. Donenfeld
2022-10-13 16:18     ` Willy Tarreau
2022-10-14  4:28       ` David Laight
2022-10-14  5:27         ` Willy Tarreau
2022-10-13 16:26     ` Mark Brown
2022-10-13 16:37       ` Jason A. Donenfeld
2022-10-13 16:51         ` Willy Tarreau
2022-10-13 17:16         ` Mark Brown
2022-10-13 18:38           ` Florian Weimer
2022-10-13 20:23             ` Mark Brown
2022-10-14  6:15               ` Florian Weimer
2022-10-13 18:39     ` Florian Weimer
2022-10-13 21:03       ` Nick Desaulniers
2022-10-14  6:37         ` Florian Weimer [this message]
2022-10-13 21:08 ` Nick Desaulniers
2022-10-14  1:31   ` Jason A. Donenfeld
2022-10-14 11:13   ` Mark Brown

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=87k052q5a7.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=broonie@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=ndesaulniers@google.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;
as well as URLs for NNTP newsgroup(s).