Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2912051ioo; Tue, 24 May 2022 08:39:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe2eNiDHY17Ag84r20wYDR8cHHn15p/7/Kq8RDQ5VwUeiOg/BvKHz07Gl3hQYf8Ed+X1ly X-Received: by 2002:a17:90b:4c09:b0:1df:b7a0:e5f9 with SMTP id na9-20020a17090b4c0900b001dfb7a0e5f9mr5191763pjb.76.1653406764994; Tue, 24 May 2022 08:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653406764; cv=none; d=google.com; s=arc-20160816; b=Tn7fy+tpi4o+OvKwdBxFVE3rDrWr34X0r8OF+56lM1D3hqbUUcUVrIAgI1oh/SLUuZ 7jburJGAASEYzhx3pb3oS7PViPVNyde3gCGnp8NEFZP9ykMlqWdcLH9VzvVYMt12XTrk g4HbJAyP+IWZvHNgq4ADMl1j94BrZ0NpM9Wsnm8g+p5LJEuS82YKrNYS0D9qAQL53zU6 OHnKxAdrasnefQt/maUPsEm/3T1PND4jE+93K6CFGl7GD8oHPTk8FlD4chBF3WhoUf5i AbS6iPAeyxwrkRel6dq/I+efZHiA9MUPtTleGX4eJdvnrnUz99NYprJakoRI+q2mjnuD 2IJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xMiFso9QA0kUUWC75AY2q6qTxHP5m2kIRsDzFSKKWlc=; b=acqInHSciXvNNXO3xBBNZOSMa1jow4Vw7hKlIt8ZgNns/OiuKcI+0zSk2NnMVnDS76 WRK1u9/MKX+vprue1sLdMB0QLqjpBeJGtCAGoxtz8jOsE0K70kjY1LbEx8gGl99q8AX1 7I0CKtGT7hukTzkeYfHATSugL8Nf972AWyqmvwPw/7lQV1JuMZufMPZtOyO/B1WzqUmS Dw9MbW6Qn8yNLvgCvwBvPF251dA1lguxOReXmf6dg9hiJHiGt7T6Ni7jnaF/7zn0X9Y1 cy6QCmCQ4jc9qhTdDbrASgdWcC7cWmSeJEXLADWMQcw6iATllckvz958y5e+aRktt0Uc 06vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I86vb4PB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170903018b00b001621c48d6c4si10897913plg.556.2022.05.24.08.39.09; Tue, 24 May 2022 08:39:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I86vb4PB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235807AbiEXJk0 (ORCPT + 99 others); Tue, 24 May 2022 05:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235791AbiEXJkN (ORCPT ); Tue, 24 May 2022 05:40:13 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85EA966C9E for ; Tue, 24 May 2022 02:40:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DFEC8CE19E6 for ; Tue, 24 May 2022 09:40:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE16DC385AA; Tue, 24 May 2022 09:40:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653385209; bh=XsiPB+YmgXZsRlXprg01ZA3bkNDDn/VDzc7T4K91VkQ=; h=From:To:Cc:Subject:Date:From; b=I86vb4PBaO9vScyygfzJ8J4eaAUxqUdt7VKo32RX6XV/TOxkMEZwtuXWPvTR8XawH cJdtEIJqjJPQsHGQ4lXTeP3jZXjTM2KWg0JC8TgtO0vxfiae/eAAEPzn24QfYX0mSW bdZ7FzX0Kgs+xoXpwknpvubbysG7H8dR1EZFn1WRrGGB3Y8x6ybPgwJkMN6YNSLFjo 7+OrKyweIoplXE66LAsGUuqo+Kd8jvCoszAcHZBsKc846Y5P7jbL5uYZKjazxfZuxH lktWa1+wA1mxXpRwTDcfpWX9BVn34w3o2Wkhfa1sVHdP7Ac1ZNxKkkx4JmS34X5kRr HN5mXjfCaK4rQ== Received: by pali.im (Postfix) id 392A09ED; Tue, 24 May 2022 11:40:06 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler Date: Tue, 24 May 2022 11:39:39 +0200 Message-Id: <20220524093939.30927-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc e500 compiler does not support -mcpu=powerpc option. When it is specified then gcc throws compile error: gcc: error: unrecognized argument in option ‘-mcpu=powerpc’ gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native So do not set -mcpu=powerpc option when CONFIG_E500 is set. Correct option -mcpu=8540 for CONFIG_E500 is set few lines below in that Makefile. Signed-off-by: Pali Rohár Cc: stable@vger.kernel.org --- arch/powerpc/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index eb541e730d3c..87f9f29ac9d2 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -22,11 +22,16 @@ ifdef CONFIG_PPC32 # or platform code sets later on the command line, but they are needed # to set a sane 32-bit cpu target for the 64-bit cross compiler which # may default to the wrong ISA. +# Never set -mcpu=powerpc option for gcc e500 compiler because this +# option is unsupported and throws error. The correct option for +# CONFIG_E500 is -mcpu=8540 and it is set few lines below. +ifndef CONFIG_E500 KBUILD_CFLAGS += -mcpu=powerpc KBUILD_AFLAGS += -mcpu=powerpc endif endif endif +endif ifdef CONFIG_PPC_BOOK3S_32 KBUILD_CFLAGS += -mcpu=powerpc -- 2.20.1