From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5082BC433F5 for ; Thu, 31 Mar 2022 23:13:32 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KTzcp5mfcz3c2V for ; Fri, 1 Apr 2022 10:13:30 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4KTzcH2Xbdz2xY0 for ; Fri, 1 Apr 2022 10:13:02 +1100 (AEDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 22VN9xvA024790; Thu, 31 Mar 2022 18:09:59 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 22VN9wEn024789; Thu, 31 Mar 2022 18:09:58 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 31 Mar 2022 18:09:58 -0500 From: Segher Boessenkool To: Murilo Opsfelder =?iso-8859-1?Q?Ara=FAjo?= Subject: Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU Message-ID: <20220331230958.GA614@gate.crashing.org> References: <20220330112437.540214-1-joel@jms.id.au> <815770fb-3247-baab-f8ca-eed7b99213d1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <815770fb-3247-baab-f8ca-eed7b99213d1@gmail.com> User-Agent: Mutt/1.4.2.3i 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: linuxppc-dev@lists.ozlabs.org, Joel Stanley Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Mar 30, 2022 at 11:05:19PM -0300, Murilo Opsfelder Araújo wrote: > I think it was a fortunate coincidence that the default cpu type of your > gcc is > compatible with your system. If the distro gcc moves its default to a > newer cpu > type than your system, this bug would happen again. Indeed. But why would you use a GCC from a distro that requires p10 when you target something older? > The command "gcc -v |& grep with-cpu" will show you the default cpu type > for 32 > and 64-bit that gcc was configured. Only if it was configured with --with-cpu*. Most people do not. If someone builds compilers with non-default defaults like this, they had better communicate that clearly to all their users, to avoid confusion and disappointments. There should be some easy way to show this default with GCC, but there currently is none. I'll see what I can do (just to make my own life easier, we frequently get bug reports from people who use a different -mcpu= than what they think they do :-) ) Segher