Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1299802rwb; Wed, 16 Nov 2022 15:27:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf5YU0iKgu8WOv+8r9iU9wTx3UGUAI3zjZ2YdS7NWGF8NPBtHs73XJaTFfaOuz+LL/26fKMw X-Received: by 2002:a17:906:37da:b0:78d:8b89:caaa with SMTP id o26-20020a17090637da00b0078d8b89caaamr55939ejc.431.1668641277960; Wed, 16 Nov 2022 15:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668641277; cv=none; d=google.com; s=arc-20160816; b=n+Xg0RkF+zAXsShB9edZO4CZA8IhAfN96sAjwED2WSSmys9lgS34kGvfd7nRbsWfxc uFG7fz2VEFDO2tqG7XeqeabM08VP74S5V9slPMMqy7husc6XmBP3u6IH8hXTtVGypW/K oIc7u1b48E9/D/gxWfLN8BcLecuvIn0BYFbvN7jS0rN7vWBLmcmj67V7zG/j3DwzjiyZ Iq2qwbKRNdzdKMG29FEeJHVxDENNBEAm2bRByddls/41LBLcFREJAjA7WwGF+gblBckD bS5yM8XhoT/VZbRxU/ixyRU68+EJccYg+a05esf/ktTOTPPCBZfzbgAE+/b1dsoWGKQg 278w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lOpUt4MEJD12Cx7f2vbHFt5WAvFTf2t/WiLzrqLvSWE=; b=Izpw/iHEqJaSjDoS6VlY1e27NEkYX1mFq+Zz3hzd/LuDeHUoN3B0SEhRUAGEI3QC2F /ta1eC6OEIJjweOMx4GhgevyMnrokeREa1BSzpNDPsYIZtuMyaffIvuFROs1nRZLUJzl /cozF4lj9HmE2JUgSMn/tSsOaAy6ChDB/hOQLeuJoYbs/gtBitf70jC8b/BIzffBf6bF URgyiKeUaYS9P4nMA9EaD/5uQzSx09k1SH1ePbs9xaiD00EpG0t2o9evpPMT7qYyKlIO pgQXdcgU1CNgzi93OBfhptjHbOpf3HRTrOUFLpYKjzdNabG2nj1yjiRow88VWQulWrRT KEUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=DIlI543K; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a056402268100b0045c9f2adb6bsi16761929edd.606.2022.11.16.15.27.36; Wed, 16 Nov 2022 15:27:57 -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=@google.com header.s=20210112 header.b=DIlI543K; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233893AbiKPXMM (ORCPT + 90 others); Wed, 16 Nov 2022 18:12:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiKPXMK (ORCPT ); Wed, 16 Nov 2022 18:12:10 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F4948759 for ; Wed, 16 Nov 2022 15:12:09 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id n17so345543pgh.9 for ; Wed, 16 Nov 2022 15:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lOpUt4MEJD12Cx7f2vbHFt5WAvFTf2t/WiLzrqLvSWE=; b=DIlI543KOUa7IEfy+QPTu5triJKIlMWH2SLf+ZUpGlw7Cbt+AtaIPQ6401eYKCACSq M/orPGBoXiCcalGNKWlsY7xgn5CPX1tqN+bw2DtWJtQC2Zy0xii7b3bkJiL00eqA3y+l uNcLndMqQtdewduelBatcW1vbHZM2aw+vE19i4sFnzegEnA0xxRmuUkifWwASF7NILHB 9nh631rIt8XQMdlB0DjEazJzWrlp9qheZyCXOYHusv8eYqvdarIrQubBVI4A1SagTKk9 GRKPAZtfcy7WRE4C/X9mf6pNGEFEl4chz9AhjQTl6zFz1j+U6o6XGgd9foKWvLsBFbQT edkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lOpUt4MEJD12Cx7f2vbHFt5WAvFTf2t/WiLzrqLvSWE=; b=q5Jco7nma2LTI81DtJiOgv+Xkx4iwOh/dIuZEnEOghe01D47FTYYZGzDPo7UsrQM6w SVLOd1Q0QRAteCkR3+FryzpAi/ci2hFM6kwx0PYGLoDphbY+nVieQq3nM7AURYzStEdN BVfV+54xVa2Y7+5xQ+J4MM3IjeLGLvHnm+iMnSZhmZsqkpJrXOloQpipCZ8dvl7sIXqj ZzG9E8p5knt75ljnEwrn+zZTKuZ/FmAT1w1yPOEuRHm+H1f1n4gOvD+7Aq0gZlFJ81gQ Ysc3ucfmqI+fRnpLQMJXbSrx/+2rosz+WGzYBrWqvVoZ9YWJuW5Ey5e5DDmvH4B1YEUG CMNg== X-Gm-Message-State: ANoB5pkyKS81MF1essYP3fwbH8XLe91CyVXaohAJL1x8KjbVx/uWOOD0 HBXvLHc2IkeryRxTiKzjTC0Xfn3fgDvzHcaxgiaozQ== X-Received: by 2002:a62:1a05:0:b0:56c:1277:d056 with SMTP id a5-20020a621a05000000b0056c1277d056mr295541pfa.23.1668640328441; Wed, 16 Nov 2022 15:12:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Wed, 16 Nov 2022 15:11:57 -0800 Message-ID: Subject: Re: kbuild: check the minimum compiler version in Kconfig To: Florian Fainelli Cc: Masahiro Yamada , "linux-kernel@vger.kernel.org" , Paul Gortmaker , Nathan Chancellor , ojeda@kernel.org, sedat.dilek@gmail.com, clang-built-linux , Manoj Gupta Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 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 > > > > > > Setting HOSTCC three times is done by buildroot, it does it through make > > flags, and then variables passed to make etc. clearly we could change > > that, but that's out of scope is not it? > > -- > > Florian > > > > > -- > Thanks, > ~Nick Desaulniers -- Thanks, ~Nick Desaulniers