Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1251imw; Mon, 4 Jul 2022 04:12:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tegAiBKwxZQ2wDt10i2MzaZCdVDS8st7R4VvHBIZlmEYvLjmM2Y+7kWMfLa3j1Lm+e+AES X-Received: by 2002:a17:902:ba90:b0:16a:2863:fb85 with SMTP id k16-20020a170902ba9000b0016a2863fb85mr35748796pls.15.1656933146764; Mon, 04 Jul 2022 04:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656933146; cv=none; d=google.com; s=arc-20160816; b=XkDunBCFmVzzumPo6nJ1iNQ4lQ6ghRJ1mB7BCsaKC45HqCW4H4d0fpkr62GDrdA1o9 OALCBiVU/a2rXSDJjvghEkKlINVmo83buONRPtAQ6c40wYPzYCEkezvOntAGfXuSrDWx KfPVnqQcd8P4O9Ye8z3udLXTwXB13R3GcweeoMvVWfRUPhH1oIqVWZB0IdpOTLP+aDsS JfQDCuT3+8CT+nPX5W89x2X6GD6PG0Pukf8lxvFedU7FyFlYiftSjUF6jH4xMwBAtf3u 5tFT0Z3d3h4lJV7oQTprsKh6xZuDJulcTr9x+vNw5AZ37s7rpaGqwfl/stVS+UJ/ISbV 6t2A== 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:references:in-reply-to:user-agent:subject:cc:to:from :date; bh=MW+2h3P+WQN9stH6aBjo2GXfOIQw7BA2idJugGv1JZA=; b=Gqr8r+ZU6INsPek3xbKNZgBHLnDegqVp27BgY1HdX5Db7WtGsWuuOWsgu7JyxhdrK1 gSRjTVIrgFkXNJZX9BOrcZel1G0iEWPneMsoYV82snSk68/+8M/4t72HujIz6BnUSTVq wMYetWHSEEPY5BjcIgEPWxRL3xwhXMzVMpV6ufSRpfxvz5SSuZ69RYq1vriu2IE21PsT QptbTX8JsPdPVp3INjMLxt7zV33G0QWR19s5l+tzChh6pqnag1HcPWwJ6CqjLlTwpNFX IQ2LZyk3G/ESLcWYfGeBRjQCMzO/YSH8KN9IUxb0pHro8iKyNffki4j3Lyf+bBGrHFjl iQmw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a17090a8a0700b001ef8edb8659si1003278pjn.186.2022.07.04.04.12.14; Mon, 04 Jul 2022 04:12:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbiGDKZ1 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Jul 2022 06:25:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234493AbiGDKZF (ORCPT ); Mon, 4 Jul 2022 06:25:05 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06E4EE32 for ; Mon, 4 Jul 2022 03:23:36 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Lc22W5T6qz4xYN; Mon, 4 Jul 2022 20:23:31 +1000 (AEST) Date: Mon, 04 Jul 2022 20:23:29 +1000 From: Michael Ellerman To: =?ISO-8859-1?Q?Pali_Roh=E1r?= CC: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler User-Agent: K-9 Mail for Android In-Reply-To: <20220702094405.tp7eo4df7fjvn2ng@pali> References: <20220524093939.30927-1-pali@kernel.org> <20220702094405.tp7eo4df7fjvn2ng@pali> Message-ID: <8D562851-304F-4153-9194-426CC22B7FF2@ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,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 On 2 July 2022 7:44:05 pm AEST, "Pali Rohár" wrote: >On Tuesday 24 May 2022 11:39:39 Pali Rohár wrote: >> 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 > >Michael, do you have any objections about this patch? I don't particularly like it :) From the discussion with Segher, it sounds like this is a problem with a specific build of gcc that you're using, not a general problem with gcc built with e500 support. Keying it off CONFIG_E500 means it will fix your problem, but not anyone else who has a different non-e500 compiler that also doesn't support -mcpu=powerpc (for whatever reason). So I wonder if a better fix is to use cc-option when setting -mcpu=powerpc. cheers