Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1299957rwb; Wed, 16 Nov 2022 15:28:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf58GEDBFLg4HI497l3MTAxxo1AjDF9H/QPLyOJPmC1eXErUgViJw+wcwBffhLK0l199gucf X-Received: by 2002:a17:906:1ed3:b0:7b2:7aef:59ff with SMTP id m19-20020a1709061ed300b007b27aef59ffmr39833ejj.573.1668641289435; Wed, 16 Nov 2022 15:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668641289; cv=none; d=google.com; s=arc-20160816; b=XaKlfrUH2LBbyMKE1X9Ze8XltZ8USp8DUQHZ+2prJHFQVlziZNTNMl6N6/5Ut6hkzb hoENSSJqukNxIBJu4nYyQUnO/9lDaMwXltMtMUha+dd5aqPgcl5RW6bOEy0/C75Cwmy/ qRAPs+SQRDMGgpBSMgEAk7r/LsQVp800SYSAnPC+i/M0GdOMw4j6XELBOUL/KXYlkpEY AqS9Nl3nkBje5MPHyon5V+CAKn/svcF9keEb5hVqTSdolrH0289A3SuwZOQmW18IPjvN YHIfeOWC2Q9LocR0Yl9yuGGLXF7nnR/WucbfUkmcuMXEN44bs45MPeTv2DBrnyE+ytW2 sFvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=E5ndd7ei1Io74IlQNCg2RVaEkTuSWT2qBGbUwsf9a6A=; b=xiKISodeWKLsw4f/C6DQmFJaqUjS4a63uPwepiJ5NGZ9dztZPxIe86fNFPDjKvj5Ev MqCSBfm0AW6WRXX/plObkQqk082M5TMZUNu3yQgDffqsuhgEYiA0Qa/lUEOTl33xv1q7 /oIMUv+04amu/gSfn7le9qw6glFJio7GfiA5Gdf55QN1C2Jjz7QdWxiiXkmlazZ8bTO7 nM5hmq7rbp2qQBxlJEPdx4BKWeWACRl/K34rIQ29uzp1GfWcPxZYZoriSHhWiWiwKPxF ujer6HG0gKncLsvkTkY7XgzenS/0r4nx6xR9DqNwlZexehlT4o81agp4a+I5Y95THRRR mOPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qu9xX9JF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a05640226c200b004683898767dsi6216821edd.111.2022.11.16.15.27.44; Wed, 16 Nov 2022 15:28:09 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=qu9xX9JF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233353AbiKPXQm (ORCPT + 90 others); Wed, 16 Nov 2022 18:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbiKPXQk (ORCPT ); Wed, 16 Nov 2022 18:16:40 -0500 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785A3BE29 for ; Wed, 16 Nov 2022 15:16:39 -0800 (PST) Received: by mail-qt1-x82a.google.com with SMTP id c15so117479qtw.8 for ; Wed, 16 Nov 2022 15:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=E5ndd7ei1Io74IlQNCg2RVaEkTuSWT2qBGbUwsf9a6A=; b=qu9xX9JFKy5ec+Zn86JfnVrvTPOeTV6dVLitbqBNEV5H6OxO3M0ZkQrwKxLpYVE60d eh6dQbJmCtqv4299RJrP2Q4UVMtWv32gv5yIg4cwNS5IEd39y+miraEXBhsHgJjGLrQR yZEU6OEj32doL+QijPBX46ZSEkDtKBC0XVYkSGr5s+1yrSHp0IRU6s54ZJ80arhH17GA V1bttUa9WhFN1zSiIHm7Iphq3w1jQGOeVV+a9pAHqpGJ/Gddoj2EqgxAT5VOz6rjns3q eghi64+NCseYt02+rf7IYkPuyqMzDFdKdglbAXbpvdG2h8CSgvQc5E6Q7vMsLu+WF3nu /6vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=E5ndd7ei1Io74IlQNCg2RVaEkTuSWT2qBGbUwsf9a6A=; b=pDRlceh5J0qG67qdyV5gkQFoDRagnjhG0DVRcCgY9aBANw8c9qSGg67XgOWBvx+7JG EHeN95PsX5Bsg8etB3ioqWjRA+BVjcbNIr7IQH7WVhn+4t+o5x9oqOsi6SwoHe5fCAr5 fLZYODj827xEfRfJCqzYRXvaJfxtAGqPivlYdN8UuMHIz6BkDH0B6+vEoq3gZhKpUalT xS+VzUeqY/tMTVbQ0rTHfk+E3rT8bRiw8ODZgUGix2l5a+ipXY56yS7i+E2esyulAhv0 vFBtrfDUHm0t/VGCnN46lPAtmlTV8W4uoND88nXbF7dCN8CMQVb1Nu+pEPIySmpyAXvs bS1g== X-Gm-Message-State: ANoB5pkPVVL3lCCsZcF/ExrVCOe3djVtjGM5GYGOOLedW/GOsgfQui/L 0EwGUMcUFnoMMR0UtY3EoqrRi1j9WSo= X-Received: by 2002:ac8:738b:0:b0:3a4:f6ab:6670 with SMTP id t11-20020ac8738b000000b003a4f6ab6670mr144692qtp.283.1668640598547; Wed, 16 Nov 2022 15:16:38 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id e7-20020ac84b47000000b0039953dcc480sm9430138qts.88.2022.11.16.15.16.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Nov 2022 15:16:38 -0800 (PST) Message-ID: <15631f6a-dae6-b996-6e74-1bf7304b30a0@gmail.com> Date: Wed, 16 Nov 2022 15:16:32 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: kbuild: check the minimum compiler version in Kconfig Content-Language: en-US To: Nick Desaulniers Cc: Masahiro Yamada , "linux-kernel@vger.kernel.org" , Paul Gortmaker , Nathan Chancellor , ojeda@kernel.org, sedat.dilek@gmail.com, clang-built-linux , Manoj Gupta References: From: Florian Fainelli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 11/16/22 15:11, Nick Desaulniers wrote: > On Wed, Nov 16, 2022 at 3:10 PM Nick Desaulniers > wrote: >> >> On Wed, Nov 16, 2022 at 2:56 PM Florian Fainelli wrote: >>> >>> On 11/16/22 14:48, Nick Desaulniers wrote: >>>> On Wed, Nov 16, 2022 at 1:48 PM Florian Fainelli wrote: >>>>> >>>>> Hi Masahiro, Nick, >>>>> >>>>> The compiler version check performed with >>>>> aec6c60a01d3a3170242d6a99372a388e1136dc6 ("kbuild: check the minimum >>>>> compiler version in Kconfig") can be defeated and prevent running the >>>>> *config targets if specifying LLVM=1 on the command line, in that way: >>>>> >>>>> BR_BINARIES_DIR=/local/users/fainelli/buildroot-llvm/output/arm64/images >>>>> LLVM=1 LLVM_IAS=1 PKG_CONFIG_PATH="" /usr/bin/make -j49 -C >>>>> /local/users/fainelli/buildroot-llvm/output/arm64/build/linux-custom >>>>> HOSTCC="/usr/bin/gcc" >>>>> HOSTCC="/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/ccache >>>>> /usr/bin/gcc -O2 >>>>> -I/local/users/fainelli/buildroot-llvm/output/arm64/host/include >>>>> -DNDEBUG -L/local/users/fainelli/buildroot-llvm/output/arm64/host/lib >>>>> -Wl,-rpath,/local/users/fainelli/buildroot-llvm/output/arm64/host/lib" >>>>> ARCH=arm64 >>>>> INSTALL_MOD_PATH=/local/users/fainelli/buildroot-llvm/output/arm64/target >>>>> CROSS_COMPILE="/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/aarch64-linux-" >>>>> WERROR=0 >>>>> DEPMOD=/local/users/fainelli/buildroot-llvm/output/arm64/host/sbin/depmod >>>>> INSTALL_MOD_STRIP=1 HOSTCC="/usr/bin/gcc" menuconfig >>>>> UPD scripts/kconfig/mconf-cfg >>>>> HOSTCC scripts/kconfig/mconf.o >>>>> HOSTCC scripts/kconfig/lxdialog/checklist.o >>>>> HOSTCC scripts/kconfig/lxdialog/inputbox.o >>>>> HOSTCC scripts/kconfig/lxdialog/menubox.o >>>>> HOSTCC scripts/kconfig/lxdialog/textbox.o >>>>> HOSTCC scripts/kconfig/lxdialog/util.o >>>>> HOSTCC scripts/kconfig/lxdialog/yesno.o >>>>> HOSTLD scripts/kconfig/mconf >>>>> *** >>>>> *** Compiler is too old. >>>>> *** Your Clang version: 10.0.0 >>>>> *** Minimum Clang version: 10.0.1 >>>>> *** >>>>> scripts/Kconfig.include:44: Sorry, this compiler is not supported. >>>>> >>>>> Here, the compiler check is actually checking the host compiler clang >>>>> version installed on my Ubuntu 20.04 system, as opposed to the cross >>>>> compiler clang version that is being used. >>>> >>>> LLVM=1 will use `clang` as found by your $PATH. Where did you express >>>> to make what the "cross compiler clang version" is? (And why do you >>>> set HOSTCC three times) >>> >>> We are setting CROSS_COMPILE to express the cross compiler clang prefix >>> to use. >> >> Can you try setting CLANG_PREFIX rather than CROSS_COMPILE (to the same value)? >> >> CLANG_PREFIX=/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/aarch64-linux- > > sorry, I meant LLVM_PREFIX Same results unfortunately. -- Florian