Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6666193rwl; Wed, 22 Mar 2023 13:48:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+lqn8E41H+Jo9iXkblxZMueZG2CmPSJ3KC4QuVZg50nJqumuHPYdPjsHyN06LxyL2l/qaU X-Received: by 2002:aa7:9821:0:b0:626:2cc8:311e with SMTP id q1-20020aa79821000000b006262cc8311emr4420088pfl.12.1679518136648; Wed, 22 Mar 2023 13:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679518136; cv=none; d=google.com; s=arc-20160816; b=RQAUzWXBOzw58dL3BSBSGub1Txox9pAxei3GjP8GfDk9KLz/trd791tx0pSNDPgcqA WYbkder7ZqDIo7wBwEGSAJGRaW4GC4au3W/cSLan9ivsjH3QaAPKtjShkZfS2a+rQlm0 Y/jfP/oh6SUTDD4LKAwbBG97+LUbfwIFz/Uu5Uk5RwUY9OtskDO5mLOkjQqXF58UaDEq iHmJ1sGjFb7QbSh0NT4eb5sSdz9EKI0rP34t7MMnm5e4FXobZvwtoESDtOZYWIcf4ynT ocUu+zvzqSCdC/dqNQtSr0uIaTLywSIh1ak5rEP0UBJYpdYLZoUjdrlfPtXZLascbYYP HXwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=y7KGEtsJAgfKUzpsRjpa/kySpxeG1vzj91nQT7+xlSA=; b=WoaXvMTzy4PtLpcRzEAbrqWbqShxw42hlZDTILHNvSUwmQmnMpybRrsbCVhjK7ploR orIaNw7pXuSUcz5v4vYG6GGyZBBQ/ayRojZckWPTxF03pqgUriasUGUvzvcDsIH6+PZm gUn0Nmy9ziLJQSGvYE475+tT7zSRgkO1k8xpMdT8aEf8W94NaQC5MKC3gwITxS3gX9hM zoo9gMrhMpFTCUwC6rrTF1b58WAGzvlIpKZxFJheItMdpdeb5ZA/JNYAm466s+T2VL/W uFc02qLnh7esoWqVS9Wi6X4C+6qnO4ixz/cCIOIRVwyYpYsdZ4/BNcamcFusc4cwaQY+ PCJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fDOSKjSI; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a056a00125100b00593ac87bbadsi16389819pfi.202.2023.03.22.13.48.44; Wed, 22 Mar 2023 13:48:56 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=fDOSKjSI; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbjCVUn7 (ORCPT + 99 others); Wed, 22 Mar 2023 16:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbjCVUnj (ORCPT ); Wed, 22 Mar 2023 16:43:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654F8943B0; Wed, 22 Mar 2023 13:36:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02E8662294; Wed, 22 Mar 2023 20:36:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5F4DC433D2; Wed, 22 Mar 2023 20:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679517362; bh=hE2w4AlCqCQiTuP+k7QtxIGexqc4E4HzGht5f7pSXto=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fDOSKjSIElrDPJuw6V2b2pglkrc/0ueVTVDsGM6sjNnd/PEuyhyJb1T6RtmV1aHqw SIMoOiO6x65Ses4hsJQZF94mB6hA7ICejIHxunue3Z85uEVWnrhGzOxUThl2h/doRC 5oheGbKWN+MG3tF6qkvUdB50x9TLnvfL0nZGwVHRKP2bkaxMHkNP3C9EZaMLyiXs7R gp417KrBcHyxqrIzwCWjHRTbVTnHWbai2lB29mDvmZgyIbrbygElvVJUDTShIvS53c vHMb8rlRuy2Ln1AVBPCfxuFK8iEG3e0+0gMFUrxdvrOXc6UDSTuTp6TUE5tub1nwJj 88QkxWs2wLYAQ== Date: Wed, 22 Mar 2023 13:36:00 -0700 From: Nathan Chancellor To: Kalle Valo Cc: Linus Torvalds , Linux Kernel Mailing List , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-toolchains@vger.kernel.org, llvm@lists.linux.dev Subject: Re: Linux 6.3-rc3 Message-ID: <20230322203600.GA2837284@dev-arch.thelio-3990X> References: <20230320180501.GA598084@dev-arch.thelio-3990X> <20230320185337.GA615556@dev-arch.thelio-3990X> <87pm91uf9c.fsf@kernel.org> <20230322163637.GA918620@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230322163637.GA918620@dev-arch.thelio-3990X> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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, Mar 22, 2023 at 09:36:37AM -0700, Nathan Chancellor wrote: > On Wed, Mar 22, 2023 at 02:44:47PM +0200, Kalle Valo wrote: > > Nathan Chancellor writes: > > > > > On Mon, Mar 20, 2023 at 11:26:17AM -0700, Linus Torvalds wrote: > > >> On Mon, Mar 20, 2023 at 11:05 AM Nathan Chancellor wrote: > > >> > > > >> > On the clang front, I am still seeing the following warning turned error > > >> > for arm64 allmodconfig at least: > > >> > > > >> > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > > >> > if (syncpt_irq < 0) > > >> > ^~~~~~~~~~ > > >> > > >> Hmm. I do my arm64 allmodconfig builds with gcc, and I'm surprised > > >> that gcc doesn't warn about this. > > > > > > Perhaps these would make doing allmodconfig builds with clang more > > > frequently less painful for you? > > > > > > https://lore.kernel.org/llvm/20230319235619.GA18547@dev-arch.thelio-3990X/ > > > > Thank you, at least for me this is really helpful. > > Really glad to hear! I hope this helps make testing and verifying > changes with clang and LLVM easier for developers and maintainers. > > > I tried now clang for the first time but seeing a strange problem. > > > > I prefer to define the compiler in GNUmakefile so it's easy to change > > compilers and I don't need to remember the exact command line. So I have > > this in the top level GNUmakefile (all the rest commented out): > > > > LLVM=/opt/clang/llvm-16.0.0/bin/ > > > > If I run 'make oldconfig' it seems to use clang but after I run just > > 'make' it seems to switch back to the host GCC compiler and ask for GCC > > specific config questions again. Workaround for this seems to be adding > > 'export LLVM' to GNUmakefile, after that also 'make' uses clang as > > expected. > > Interesting... I just tested with a basic GNUmakefile and everything > seems to work fine without an export. At the same time, the export > should not hurt anything, so as long as it works, that is what matters. Ah, the export is needed so that mixed-build works properly (see lines 324 to 361 in Makefile), as 'make' will be called to process each target individually; without the export, LLVM is not set for the subsequent 'make' calls, so gcc is called. I just saw the same behavior as you did while testing with $ make -j(nproc) clean defconfig all without the export (GCC was used instead of LLVM). > $ gcc --version > fish: Unknown command: gcc > > > $ fd -t x . $CBL_TC_LLVM_STORE/16.0.0/bin -x basename > clang-16 > llvm-nm > llvm-objdump > llvm-objcopy > llvm-symbolizer > llvm-strings > llvm-readobj > llvm-dwarfdump > lld > llvm-ar > > > $ cat GNUmakefile > LLVM := $(CBL_TC_LLVM_STORE)/16.0.0/bin/ > > include Makefile > > > $ make -sj(nproc) defconfig > > > $ head -13 .config > # > # Automatically generated file; DO NOT EDIT. > # Linux/x86 6.3.0-rc3 Kernel Configuration > # > CONFIG_CC_VERSION_TEXT="ClangBuiltLinux clang version 16.0.0" > CONFIG_GCC_VERSION=0 > CONFIG_CC_IS_CLANG=y > CONFIG_CLANG_VERSION=160000 > CONFIG_AS_IS_LLVM=y > CONFIG_AS_VERSION=160000 > CONFIG_LD_VERSION=0 > CONFIG_LD_IS_LLD=y > CONFIG_LLD_VERSION=160000 > > > $ make -sj(nproc) init/main.o > > > $ $CBL_TC_LLVM_STORE/16.0.0/bin/llvm-readelf -p .comment init/main.o > String dump of section '.comment': > [ 1] ClangBuiltLinux clang version 16.0.0 > > > I added an informational print and I always saw the correct value: > > diff --git a/Makefile b/Makefile > index a2c310df2145..070394c4cb8c 100644 > --- a/Makefile > +++ b/Makefile > @@ -431,6 +431,7 @@ HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null) > HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null) > > ifneq ($(LLVM),) > +$(info LLVM: $(LLVM)) > ifneq ($(filter %/,$(LLVM)),) > LLVM_PREFIX := $(LLVM) > else ifneq ($(filter -%,$(LLVM)),) > > If you have any further issues, please do not hesitate to reach out! > > Cheers, > Nathan >