Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1297954rwb; Wed, 16 Nov 2022 15:25:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6wCZ2IMCCnR0orwCOZrEpt1b7VpT8o7j86YZnG6weP0iTv6K+ZaUqntb5srpjhkwjLKh1C X-Received: by 2002:aa7:d356:0:b0:461:ac48:a5ec with SMTP id m22-20020aa7d356000000b00461ac48a5ecmr21068607edr.193.1668641152115; Wed, 16 Nov 2022 15:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668641152; cv=none; d=google.com; s=arc-20160816; b=d3CMqhtRfsGY6EdWewx5tYQBOInIl/jm49N0CIS4niqnMffRgacGAvtxXap2FuIW4w jlNlO53/F69TbKC252SkGNnBQEoMjXIlAdMP9vPTBa/jNMrXT3VIsCsT7TvzKVg0AZAc caZj34TtLhIrVjPCZZLYjetYZbSAILnLsdVUxJ2PBMBW5KQeKcDlsMEMgaTnDkdwpOc0 uZkt1dvqSCdXxYbLCi9Vvm6tlNAox+eRO5Q1QnXnlqC75nQOQDaoaWaeXhIZlxvrBL+C B91rp2DupJeUGHG9p3l9hAN6e0Yj2vDWgKJppc9BjchKwNtgI/JL+reVjZrs3ag5V3j3 1Y0A== 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=6/uZ+ThofFLV0o5Tr1f+GtX311JSydF+TNhDZdXxL+Y=; b=pWWRIUoZPaSTKklAM+SIt8kKV1mhDqKoRFaPItQ/IgMuVqexz7bt5CoVWabUNS7y3O 3JhelgNEch45fsux0oH4He5A5S/33GwRxY8GfG+FOKhMdD6DeZgfA1NwRvo/x1rPctTY uswU7Ui+oTwhKzxaZRDkAJ2ClB0tI4ZSDqtvl1woz+puYvnqyrIbiOWN86mbRPbe/mWx fInqj+CnkmqhQkj6i2cb1xWRUW8ie2YV4f6v2/iAVNHMI1Lysn7B+IJL4riXlU7u86LJ bEqve8q/rb+5YBTT1Vg6EfzK3l5o/3J6Bi72U+2A8tpmwZr+W0XFpfgsixccIswj5nua hyMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=sw25RevS; 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 js13-20020a17090797cd00b0078de51e658esi7627785ejc.208.2022.11.16.15.25.30; Wed, 16 Nov 2022 15:25:52 -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=sw25RevS; 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 S233423AbiKPXLN (ORCPT + 90 others); Wed, 16 Nov 2022 18:11:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233551AbiKPXLM (ORCPT ); Wed, 16 Nov 2022 18:11:12 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0AF48759 for ; Wed, 16 Nov 2022 15:11:11 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id b11so67915pjp.2 for ; Wed, 16 Nov 2022 15:11:11 -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=6/uZ+ThofFLV0o5Tr1f+GtX311JSydF+TNhDZdXxL+Y=; b=sw25RevSzPxyBTlqYrV7fZBs1zlbP4R/PRdnjJiozTdyYdVEgfjiN6sq3QvpQnKmYb A9KrAmO8LUSsUg9QWILrOJIZQgbJD3EVfVq/OTKCiRW+0hMAAfGBQS+8d8bOwO5P86A9 cQ+ULosSAcn8mGQ7oWXdMyc5kh+hHkbH5qY/aMafHKvBy6BYXeV7TWVZ0YbdBFnu8PKV 7mBB3IvjzV9Xx6ODVxqv8/Lhkl55Bke5K7MmTUJUiC8vbHuU/oqeWqf+TjU6T/zkzr3e ztN78L8GLBHOc2ZDEo2a2Vhq0gUVbwv0fiQChVobCObCzPTMp+YcuufmUN0GBPORipUS /1pQ== 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=6/uZ+ThofFLV0o5Tr1f+GtX311JSydF+TNhDZdXxL+Y=; b=loCKSqrnI87H/RuA5nXgdQC39yad6eYgHgPHqyXsPXkk6uZuMNhZPSR+OiJJa3MzIf 4V6xkbuwvmUHHecjubttfci35twNaXfXJXs2r+IDjUO/NkmCrR/Gq1YPiyAI4YL/3Qwm eIBldvn23ywH00bV5WO5WdG8QhunT7QJCQKgyWuNshDf3rO8dMIbBcE1wRSii679FxjH AAeEBfge7wtLH/g/pESzNVDAdMj0Qc+LZIjQjr5gV3U+QSqDbGYVcoR4fuj40t9wknFT /VIabnOEAJrn8VIhApWPI6VXXeDt0ajuWCoXvVL05v8/fN5LAzeg2dKJNkWU/rOA0INm iPLQ== X-Gm-Message-State: ANoB5pmK4u3EZVRNuxtKIxocipR6hx9WrsGCMtumQR8Js7zksNfsB65v mJcP956iaEAyAAi3fpxFX4xk/e2H0apIYC2bOi3Kd1RzMktHYw== X-Received: by 2002:a17:902:7086:b0:186:de87:7ffd with SMTP id z6-20020a170902708600b00186de877ffdmr34381plk.94.1668640270546; Wed, 16 Nov 2022 15:11:10 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Wed, 16 Nov 2022 15:10:59 -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 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- > > 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