From patchwork Wed Dec 26 14:15:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 1018681 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43PwVn6ZSJz9s55 for ; Thu, 27 Dec 2018 01:35:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=decadent.org.uk Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43PwVn4Jk4zDqNP for ; Thu, 27 Dec 2018 01:35:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=decadent.org.uk X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=decadent.org.uk (client-ip=88.96.1.126; helo=shadbolt.e.decadent.org.uk; envelope-from=ben@decadent.org.uk; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=decadent.org.uk X-Greylist: delayed 1122 seconds by postgrey-1.36 at bilbo; Thu, 27 Dec 2018 01:34:01 AEDT Received: from shadbolt.e.decadent.org.uk (shadbolt.e.decadent.org.uk [88.96.1.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43PwT53P7NzDqLj for ; Thu, 27 Dec 2018 01:34:01 +1100 (AEDT) Received: from ben by shadbolt.decadent.org.uk with local (Exim 4.89) (envelope-from ) id 1gc9xn-0001ml-O9; Wed, 26 Dec 2018 14:15:12 +0000 Date: Wed, 26 Dec 2018 14:15:11 +0000 From: Ben Hutchings To: linuxppc-dev@lists.ozlabs.org Message-ID: <20181226141511.3ag7uf6rvdgzlmxt@decadent.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@decadent.org.uk X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shadbolt.decadent.org.uk X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=disabled version=3.4.2 Subject: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on shadbolt.decadent.org.uk) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: debian-kernel@lists.debian.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" GCC for Debian's "powerpcspe" architecture only supports 32-bit SPE targets, and using -mcpu=powerpc or -mcpu=powerpc64 is a fatal error. * Change the test for a biarch compiler to pass both the -m32 and -m64 options, so that it doesn't catch 32-bit-only compilers * Add an ifdef CONFIG_PPC64 around the 64-bit CPU option definitions Signed-off-by: Ben Hutchings --- arch/powerpc/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 488c9edffa58..c2e815863500 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -12,7 +12,7 @@ # Rewritten by Cort Dougan and Paul Mackerras # -HAS_BIARCH := $(call cc-option-yn, -m32) +HAS_BIARCH := $(call cc-option-yn, -m32 -m64) # Set default 32 bits cross compilers for vdso and boot wrapper CROSS32_COMPILE ?= @@ -166,6 +166,7 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD)) CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata) +ifdef CONFIG_PPC64 ifdef CONFIG_PPC_BOOK3S_64 ifdef CONFIG_CPU_LITTLE_ENDIAN CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8 @@ -177,6 +178,7 @@ endif else CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 endif +endif ifdef CONFIG_FUNCTION_TRACER CC_FLAGS_FTRACE := -pg