From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51317217F5C; Thu, 7 Nov 2024 20:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731012309; cv=none; b=gR9ntX7pLRp7eOKsyN4vlvVWWIIdoOF1QQIUWi6pjGI+htgOXR+HfpM9aDEdq4kaD3tCJpo2gw5z2y/pJb7K0hbZGbKEa2Riad4HNTn078aZyFZy+sFyAXj1ZzEXi3B2EOyVeV+NPrdByW+L5fmKxdNCLaie+o5Fg4rJ0WEk5No= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731012309; c=relaxed/simple; bh=TOAtp4toshHubG+QWf7mLLFWC4nu6LMEdHwXu5eYJ7k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JNZfRlvG6uI3a9ph4HUMafgejEF/ErsMhA+scxuv75yifgiH1Ccrl4/F+Off8ez1nC4rsgIUFJ+cHVfM765W48AW2vIIJ6JfUz1jTkcPZPatDPHDvaUeHK5mBNRbKrOhycNZeuZ/jMNTqZOgF2XvPlBohqTou2zXbYyEviQ97zU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DmQfYSyN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DmQfYSyN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61555C4CECC; Thu, 7 Nov 2024 20:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731012308; bh=TOAtp4toshHubG+QWf7mLLFWC4nu6LMEdHwXu5eYJ7k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DmQfYSyN557ZaAA1bJb7ExxyPTgjDfFF5PZfAM2GMCgFO1N4mF+tOBYp/kOjjVDxz RI2Zj4OpJRUVWYH1p8b4kSSWkeD0m/QkyhUV70moN4DKQgatFPQQrK50oNHuRr9EDa P+y2dE7kps+GGe75B/WvphIQZZV5uGwL8R49YIWf/5AuYXkDu7I1YBiU6k10ak13Td RPjXGHq2KH/vFUvxx3nMypKkvLGtXimNb8xoARX8Hxlgimohj2PDzNXCBCqescvea7 h4Qm0FfqlcWtMcbfQGSv3YNPKJamU8OWi386Gx/K/ZMz4hnbRcOXVKmeW0LvfBdHKt 4LOAqFqHvlcGg== Date: Thu, 7 Nov 2024 13:45:04 -0700 From: Nathan Chancellor To: Rong Xu Cc: Alice Ryhl , Andrew Morton , Arnd Bergmann , Bill Wendling , Borislav Petkov , Breno Leitao , Brian Gerst , Dave Hansen , David Li , Han Shen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Jonathan Corbet , Josh Poimboeuf , Juergen Gross , Justin Stitt , Kees Cook , Masahiro Yamada , "Mike Rapoport (IBM)" , Nick Desaulniers , Nicolas Schier , "Paul E. McKenney" , Peter Zijlstra , Sami Tolvanen , Thomas Gleixner , Wei Yang , workflows@vger.kernel.org, Miguel Ojeda , Maksim Panchenko , "David S. Miller" , Andreas Larsson , Yonghong Song , Yabin Cui , Krzysztof Pszeniczny , Sriraman Tallam , Stephane Eranian , x86@kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v7 7/7] Add Propeller configuration for kernel build Message-ID: <20241107204504.GA3432398@thelio-3990X> References: <20241102175115.1769468-1-xur@google.com> <20241102175115.1769468-8-xur@google.com> Precedence: bulk X-Mailing-List: workflows@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241102175115.1769468-8-xur@google.com> Hi Rong, On Sat, Nov 02, 2024 at 10:51:14AM -0700, Rong Xu wrote: > diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller > new file mode 100644 > index 0000000000000..344190717e471 > --- /dev/null > +++ b/scripts/Makefile.propeller > @@ -0,0 +1,28 @@ > +# SPDX-License-Identifier: GPL-2.0 > + > +# Enable available and selected Clang Propeller features. > +ifdef CLANG_PROPELLER_PROFILE_PREFIX > + CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=list=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt -ffunction-sections > + KBUILD_LDFLAGS += --symbol-ordering-file=$(CLANG_PROPELLER_PROFILE_PREFIX)_ld_profile.txt --no-warn-symbol-ordering > +else > + CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels > +endif It appears that '-fbasic-block-sections=labels' has been deprecated in the main branch of LLVM, as I see a warning repeated over and over when building allmodconfig: clang: warning: argument '-fbasic-block-sections=labels' is deprecated, use '-fbasic-block-address-map' instead [-Wdeprecated] https://github.com/llvm/llvm-project/commit/7b7747dc1d3da1a829503ea9505b4cecce4f5bda Sorry that I missed this during testing, as I was only using clang-19 at the time. I think you can send a fixup on top of Masahiro's branch: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kbuild > +# Propeller requires debug information to embed module names in the profiles. > +# If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO, > +# as the option should already be set. > +ifndef CONFIG_DEBUG_INFO > + ifndef CONFIG_AUTOFDO_CLANG > + CFLAGS_PROPELLER_CLANG += -gmlt > + endif > +endif > + > +ifdef CONFIG_LTO_CLANG_THIN > + ifdef CLANG_PROPELLER_PROFILE_PREFIX > + KBUILD_LDFLAGS += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt > + else > + KBUILD_LDFLAGS += --lto-basic-block-sections=labels I think this might have a similar problem but I have not tested. > + endif > +endif > + > +export CFLAGS_PROPELLER_CLANG Cheers, Nathan