From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Michael Ellerman <mpe@ellerman•id.au>, linuxppc-dev@ozlabs•org
Subject: Re: powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler
Date: Mon, 31 Jul 2017 16:31:40 +1000 (AEST) [thread overview]
Message-ID: <3xLV3K04sNz9tWH@ozlabs.org> (raw)
In-Reply-To: <1501075144-20582-1-git-send-email-mpe@ellerman.id.au>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]
On Wed, 2017-07-26 at 13:19:04 UTC, Michael Ellerman wrote:
> Historically the boot wrapper was always built 32-bit big endian, even
> for 64-bit kernels. That was because old firmwares didn't necessarily
> support booting a 64-bit image. Because of that arch/powerpc/boot/Makefile
> uses CROSS32CC for compilation.
>
> However when we added 64-bit little endian support, we also added
> support for building the boot wrapper 64-bit. However we kept using
> CROSS32CC, because in most cases it is just CC and everything works.
>
> However if the user doesn't specify CROSS32_COMPILE (which no one ever
> does AFAIK), and CC is *not* biarch (32/64-bit capable), then CROSS32CC
> becomes just "gcc". On native systems that is probably OK, but if we're
> cross building it definitely isn't, leading to eg:
>
> gcc ... -m64 -mlittle-endian -mabi=elfv2 ... arch/powerpc/boot/cpm-serial.c
> gcc: error: unrecognized argument in option ‘-mabi=elfv2’
> gcc: error: unrecognized command line option ‘-mlittle-endian’
> make: *** [zImage] Error 2
>
> To fix it, stop using CROSS32CC, because we may or may not be building
> 32-bit. Instead setup a BOOTCC, which defaults to CC, and only use
> CROSS32_COMPILE if it's set and we're building for 32-bit.
>
> Fixes: 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper")
> Signed-off-by: Michael Ellerman <mpe@ellerman•id.au>
Applied to powerpc fixes.
https://git.kernel.org/powerpc/c/65c5ec11c25eff6ba6e9b1cbfff014
cheers
prev parent reply other threads:[~2017-07-31 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 13:19 [PATCH] powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler Michael Ellerman
2017-07-28 6:34 ` Cyril Bur
2017-07-31 6:31 ` Michael Ellerman [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=3xLV3K04sNz9tWH@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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