All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Tony Breeds <tony@bakeyournoodle.com>,
	Guenter Roeck <linux@roeck-us.net>,
	LKML <linux-kernel@vger.kernel.org>,
	LAKML <linux-arm-kernel@lists.infradead.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: Updating kernel.org cross compilers?
Date: Sun, 30 Apr 2017 00:29:57 -0500	[thread overview]
Message-ID: <20170430052957.GJ19687@gate.crashing.org> (raw)
In-Reply-To: <92b5ff36-ad2b-10bc-de4f-4774babd9625@arm.com>

Hi,

On Wed, Apr 26, 2017 at 03:14:16PM +0100, Andre Przywara wrote:
> It seems that many people (even outside the Linux kernel community) use
> the cross compilers provided at kernel.org/pub/tools/crosstool.
> The latest compiler I find there is 4.9.0, which celebrated its third
> birthday at the weekend, also has been superseded by 4.9.4 meanwhile.
> 
> So I took Segher's buildall scripts from [1] and threw binutils 2.28 and
> GCC 6.3.0 at them.

Happy to see people are still using these!

> After removing --enable-sjlj-exceptions from build-gcc

This was needed to build some targets.  It does prevent aarch64 from
building without patch.

> and adding --disable-multilib (for building x86-64 on a x86-64
> box without 32-bit libs)

Why is this needed?  What error are you seeing.

> I was able to build (bare-metal) toolchains for
> all architectures except arc, m68k, tilegx and tilepro.

arc needs a more recent GCC; the other probably as well.  GCC 7 should
be out very soon, you probably want to wait for that :-)

> $ ./buildall --toolchain
> $ PATH=$PATH:/opt/cross/bin
> $ ./buildall --kernel

You should have the target dir in your PATH before doing anything else.
Is this not documented?  Hrm I guess not, let me fix that.

> And what is a good build setup, so that the binaries run on as many
> systems as possible?

Run contrib/download_prerequisites in the gcc source dir: this will
make GMP, MPFR, MPC statically linked, and use a version of each that
is known to work (and work correctly).

> [1] http://git.infradead.org/users/segher/buildall.git/

I'll push some changes that make aarch64 work out-of-the-box in a
minute.  It does some other things as well (e.g., make ia64 work again
after *that* change); more changes are still needed to make sh4 work
without patches.


Segher

WARNING: multiple messages have this Message-ID (diff)
From: segher@kernel.crashing.org (Segher Boessenkool)
To: linux-arm-kernel@lists.infradead.org
Subject: Updating kernel.org cross compilers?
Date: Sun, 30 Apr 2017 00:29:57 -0500	[thread overview]
Message-ID: <20170430052957.GJ19687@gate.crashing.org> (raw)
In-Reply-To: <92b5ff36-ad2b-10bc-de4f-4774babd9625@arm.com>

Hi,

On Wed, Apr 26, 2017 at 03:14:16PM +0100, Andre Przywara wrote:
> It seems that many people (even outside the Linux kernel community) use
> the cross compilers provided at kernel.org/pub/tools/crosstool.
> The latest compiler I find there is 4.9.0, which celebrated its third
> birthday at the weekend, also has been superseded by 4.9.4 meanwhile.
> 
> So I took Segher's buildall scripts from [1] and threw binutils 2.28 and
> GCC 6.3.0 at them.

Happy to see people are still using these!

> After removing --enable-sjlj-exceptions from build-gcc

This was needed to build some targets.  It does prevent aarch64 from
building without patch.

> and adding --disable-multilib (for building x86-64 on a x86-64
> box without 32-bit libs)

Why is this needed?  What error are you seeing.

> I was able to build (bare-metal) toolchains for
> all architectures except arc, m68k, tilegx and tilepro.

arc needs a more recent GCC; the other probably as well.  GCC 7 should
be out very soon, you probably want to wait for that :-)

> $ ./buildall --toolchain
> $ PATH=$PATH:/opt/cross/bin
> $ ./buildall --kernel

You should have the target dir in your PATH before doing anything else.
Is this not documented?  Hrm I guess not, let me fix that.

> And what is a good build setup, so that the binaries run on as many
> systems as possible?

Run contrib/download_prerequisites in the gcc source dir: this will
make GMP, MPFR, MPC statically linked, and use a version of each that
is known to work (and work correctly).

> [1] http://git.infradead.org/users/segher/buildall.git/

I'll push some changes that make aarch64 work out-of-the-box in a
minute.  It does some other things as well (e.g., make ia64 work again
after *that* change); more changes are still needed to make sh4 work
without patches.


Segher

  parent reply	other threads:[~2017-04-30  5:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 14:14 Updating kernel.org cross compilers? Andre Przywara
2017-04-26 14:14 ` Andre Przywara
2017-04-30  3:37 ` Guenter Roeck
2017-04-30  3:37   ` Guenter Roeck
2017-04-30  5:29 ` Segher Boessenkool [this message]
2017-04-30  5:29   ` Segher Boessenkool
2017-05-09 14:59   ` Andre Przywara
2017-05-09 14:59     ` Andre Przywara
2017-05-09 16:26     ` Guenter Roeck
2017-05-09 16:26       ` Guenter Roeck
2017-05-09 22:18     ` Segher Boessenkool
2017-05-09 22:18       ` Segher Boessenkool
2017-05-10  7:58       ` Arnd Bergmann
2017-05-10  7:58         ` Arnd Bergmann
2017-05-10 13:40         ` Segher Boessenkool
2017-05-10 13:40           ` Segher Boessenkool
2017-05-10 19:32           ` Arnd Bergmann
2017-05-10 19:32             ` Arnd Bergmann
2017-05-23 18:15     ` Chris Metcalf
2017-05-23 18:15       ` Chris Metcalf

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=20170430052957.GJ19687@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=andre.przywara@arm.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tony@bakeyournoodle.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.