aboutsummaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2019-06-12 12:07:23 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2019-07-02 09:43:58 +1000
commitfad189d1f6c2919dbde5433c6c15548eefef75e8 (patch)
treec0bc4b5cf592775bf9557179b5bca2c6b7188c93 /pc-bios
parent7d0e02405fc02a181319b1ab8681d2f72246b7c6 (diff)
downloadqemu-fad189d1f6c2919dbde5433c6c15548eefef75e8.zip
qemu-fad189d1f6c2919dbde5433c6c15548eefef75e8.tar.gz
qemu-fad189d1f6c2919dbde5433c6c15548eefef75e8.tar.bz2
spapr/rtas: Force big endian compile for rtas
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 <aik@ozlabs.ru> Message-Id: <20190612020723.96802-1-aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/spapr-rtas/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/pc-bios/spapr-rtas/Makefile b/pc-bios/spapr-rtas/Makefile
index f26dd42..4b9bb12 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)$@")