From: Michael Ellerman <mpe@ellerman.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 4/4] powerpc/Makefile: Auto detect cross compiler
Date: Thu, 07 Dec 2023 15:48:30 +1100 [thread overview]
Message-ID: <87y1e6ehy9.fsf@mail.lhotse> (raw)
In-Reply-To: <20231206162556.GK19790@gate.crashing.org>
Segher Boessenkool <segher@kernel.crashing.org> writes:
> On Wed, Dec 06, 2023 at 10:55:48PM +1100, Michael Ellerman wrote:
>> Look for various combinations, matching:
>> powerpc(64(le)?)?(-unknown)?-linux(-gnu)?-
>>
>> There are more possibilities, but the above is known to find a compiler
>> on Fedora and Ubuntu (which use linux-gnu-), and also detects the
>> kernel.org cross compilers (which use linux-).
>
> $ sh ../config.sub powerpc64-linux
> powerpc64-unknown-linux-gnu
>
> I am very very lazy, so buildall uses short names everywhere :-)
I used to use just ppc64-gcc :)
I can add more variants but didn't want to add too many unless someone
is actually using them.
> Btw, can you build the kernel for a config that differs in 32/64 or
> BE/LE with the default your compiler uses? There is no reason this
> shouldn't work (you don't use any system libraries), but you need to
> use the correct compiler command-line flags for that always.
Yes it should work. I've tested at least ppc64le/ppc64/ppc defconfigs.
There have been bugs in the past but AFAIK we have fixed all of them,
though there's probably some still lurking for more obscure configs.
> Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Thanks.
cheers
next prev parent reply other threads:[~2023-12-07 4:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 11:55 [PATCH 1/4] powerpc/Makefile: Don't use $(ARCH) unnecessarily Michael Ellerman
2023-12-06 11:55 ` [PATCH 2/4] powerpc/vdso: No need to undef powerpc for 64-bit build Michael Ellerman
2023-12-06 16:18 ` Segher Boessenkool
2023-12-06 11:55 ` [PATCH 3/4] powerpc/Makefile: Default to ppc64le_defconfig when cross building Michael Ellerman
2023-12-06 11:55 ` [PATCH 4/4] powerpc/Makefile: Auto detect cross compiler Michael Ellerman
2023-12-06 16:25 ` Segher Boessenkool
2023-12-07 4:48 ` Michael Ellerman [this message]
2023-12-21 10:38 ` [PATCH 1/4] powerpc/Makefile: Don't use $(ARCH) unnecessarily Michael Ellerman
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=87y1e6ehy9.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=segher@kernel.crashing.org \
/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).