Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp427900pxb; Wed, 13 Jan 2021 07:08:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxD3JPdcGWtMSANdiWOsxnwtxZwTHGlzLCnuQ5hJDjDq1ehwMt3ukqiTPj6GiRM+5DbzA+M X-Received: by 2002:a50:cdc8:: with SMTP id h8mr2156047edj.293.1610550490460; Wed, 13 Jan 2021 07:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610550490; cv=none; d=google.com; s=arc-20160816; b=geZa/EKVwAjptgA/LFYm340nshPWCVAeHiqZ2Yn/3KHXiisN28B/sIPOHOrz5gLD3w MP/VIdzI1VVm7IXjej0iPzDyQVIB8J4V6uRXHWSfnu6bNuq0KadpJun6FFmkipkN5/Nq 0lIc2r1Ng0ov2cH15dloKiKywGMddbA4lGnrUpvVThqwkAihhCAJRpG51SDXR85Zl7KY s0EO0xKIcsNXr1O/lFP7lWU522tSfB8D2tGyZ2NpWEkkbrsXlQyGJ64JY1QGd4uA1iT9 GX+/L5DEj7t1bjdL7ID5UCiXY+wPL+b3ChZUgMs8tKHw3kTLDMQmQg0yxO6ChLjCLeo9 dN9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SyM79x+RbXBVA5FjR6x5/nmWc0NOzEiv4JPSNOcIuRA=; b=KW3GNhiHTg/f8RdPXPBhI+SJsWw5PW4R2ZrsDco71rSSZk0x/CI9WWo9FFLvphzdkh EUg2e0jYcC3MUZzl4nNcyUA836LaAwtRrzPOAPZCpRgNTMoEmAF2zG5sbpL5VkrJmtc5 heqWoxj2oYDPRxN0+I0oj8d/fxia1NYgf4/+pklDqpM2Twa5GW4I+NBIg+kl2weoX/d4 KfuEdyh+dnyvDbwsmsyNAjRfO1tWZgW9O3fsTGDlNtZ1cn+gZ/gomh6PJX6UjKiJAu7j Nlhlr1Y4SbEmAeFtr04akagz+tRaj3FOyi2GswCK7EZWUls5Zdnz60zYvvSDP7MqtjZw jJjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x25si1124171edi.388.2021.01.13.07.07.40; Wed, 13 Jan 2021 07:08:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727272AbhAMPDS (ORCPT + 99 others); Wed, 13 Jan 2021 10:03:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:55238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726584AbhAMPDS (ORCPT ); Wed, 13 Jan 2021 10:03:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65E2623600; Wed, 13 Jan 2021 15:02:35 +0000 (UTC) Date: Wed, 13 Jan 2021 15:02:32 +0000 From: Catalin Marinas To: Linus Torvalds Cc: Will Deacon , Masahiro Yamada , Linux ARM , Android Kernel Team , Linux Kernel Mailing List , Theodore Ts'o , Florian Weimer , Peter Zijlstra , Nick Desaulniers , Russell King , Arnd Bergmann Subject: Re: [PATCH] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Message-ID: <20210113150232.GA27045@gaia> References: <20210112224832.10980-1-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 06:35:50PM -0800, Linus Torvalds wrote: > On Tue, Jan 12, 2021 at 6:14 PM Linus Torvalds > wrote: > > > > Ack. I'll assume I get this the usual ways from the arm64 tree.. > > Oh.. Actually, while you can use my ack if you decide to go this way, > I do wonder if it might not be better to introduce a notion of an > error at Kconfig time, and then we could make this whole GCC_VERSION > check be something that gets covered much earlier - when configuring > the kernel, rather than randomly (ok, very early) when building it. > > We already have the CONFIG_GCC_VERSION config variable, after all. > > And Kconfig already has an error functionality, which it uses for > things like compilers not found etc. > > So something like > > $(error-if,CC_IS_GCC && GCC_VERSION < 90100,"Gcc version too old") > > in the arm64 Kconfig file should do it. $(error-if) seems to expect a y/n as a condition. We do have $(failure) and $(success) but they translate a (shell) command's return code to y/n. Even with something like: config GCC_IS_OLD def_bool CC_IS_GCC && GCC_VERSION < ... I can't get $(error-if,GCC_IS_OLD) to expand the config value, no matter what other. GCC_VERSION is also a config option in your example. I'll queue Will's patch in the meantime. -- Catalin