fad189d1f6
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>
28 lines
619 B
Makefile
28 lines
619 B
Makefile
all: build-all
|
|
# Dummy command so that make thinks it has done something
|
|
@true
|
|
|
|
include ../../config-host.mak
|
|
include $(SRC_PATH)/rules.mak
|
|
|
|
$(call set-vpath, $(SRC_PATH)/pc-bios/spapr-rtas)
|
|
|
|
.PHONY : all clean build-all
|
|
|
|
#CFLAGS += -I$(SRC_PATH)
|
|
#QEMU_CFLAGS = $(CFLAGS)
|
|
|
|
build-all: spapr-rtas.bin
|
|
|
|
%.o: %.S
|
|
$(call quiet-command,$(CCAS) -mbig -c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
|
|
|
|
%.img: %.o
|
|
$(call quiet-command,$(CC) -nostdlib -mbig -o $@ $<,"Building","$(TARGET_DIR)$@")
|
|
|
|
%.bin: %.img
|
|
$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"Building","$(TARGET_DIR)$@")
|
|
|
|
clean:
|
|
rm -f *.o *.d *.img *.bin *~
|