From patchwork Wed Jun 12 02:07:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1114256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Nqzm3blXz9s3l for ; Wed, 12 Jun 2019 12:08:52 +1000 (AEST) Received: from localhost ([::1]:56306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hash0-0002NW-EL for incoming@patchwork.ozlabs.org; Tue, 11 Jun 2019 22:08:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57440) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hasgE-0002Kw-U3 for qemu-devel@nongnu.org; Tue, 11 Jun 2019 22:08:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hasgD-0003ku-Vh for qemu-devel@nongnu.org; Tue, 11 Jun 2019 22:08:02 -0400 Received: from ozlabs.ru ([107.173.13.209]:50020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hasgD-0003jl-QQ; Tue, 11 Jun 2019 22:08:01 -0400 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 0F609AE80011; Tue, 11 Jun 2019 22:07:27 -0400 (EDT) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Wed, 12 Jun 2019 12:07:23 +1000 Message-Id: <20190612020723.96802-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 107.173.13.209 Subject: [Qemu-devel] [PATCH qemu REPOST] spapr/rtas: Force big endian compile for rtas X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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)$@")