[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH qemu REPOST] spapr/rtas: Force big endian compile
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH qemu REPOST] spapr/rtas: Force big endian compile for rtas |
Date: |
Wed, 12 Jun 2019 16:07:46 +1000 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On Wed, Jun 12, 2019 at 12:07:23PM +1000, Alexey Kardashevskiy wrote:
> At the moment the rtas's Makefile uses generic QEMU rules which means
> that when QEMU is compiled on a little endian system, the spapr-rtas.bin
> is compiled as little endian too which is incorrect as it is always
> executed in big endian mode.
>
> This enforces -mbig by defining %.o:%.S rule as spapr-rtas.bin is
> a standalone guest binary which should not depend on QEMU flags anyway.
>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
Applied to ppc-for-4.1, thanks.
> ---
> pc-bios/spapr-rtas/Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/pc-bios/spapr-rtas/Makefile b/pc-bios/spapr-rtas/Makefile
> index f26dd428b79e..4b9bb1230658 100644
> --- a/pc-bios/spapr-rtas/Makefile
> +++ b/pc-bios/spapr-rtas/Makefile
> @@ -14,8 +14,11 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/spapr-rtas)
>
> build-all: spapr-rtas.bin
>
> +%.o: %.S
> + $(call quiet-command,$(CCAS) -mbig -c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
> +
> %.img: %.o
> - $(call quiet-command,$(CC) -nostdlib -o $@
> $<,"Building","$(TARGET_DIR)$@")
> + $(call quiet-command,$(CC) -nostdlib -mbig -o $@
> $<,"Building","$(TARGET_DIR)$@")
>
> %.bin: %.img
> $(call quiet-command,$(OBJCOPY) -O binary -j .text $<
> $@,"Building","$(TARGET_DIR)$@")
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature