From nobody Sat Nov 23 21:44:24 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 778391A9B23 for ; Fri, 8 Nov 2024 21:46:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731102409; cv=none; b=ffhhgIN48deWdMjdCGJ0yH1En5gNgfvYYyRef76G0qi1Fze13fiO5IYyuahIlb+t4LQ+tEGW1VAls8t5XgKcgr0KLqMPFMvD9z91AgMp+SCmTPvIyuwDHz/cPZjZyVeoZ5N2KQlZ9ftZM15kXyCbfhHjRykVdWDwKIj/cO2t3OI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731102409; c=relaxed/simple; bh=AEoUzhmLxJcYmOfM0szL/LZNxLfEvuOcRuf2OVTMz3k=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=sPplnRX+th/dYyqR1pbrAhThJBcBI7+sYAS/U8Dbl/PJd1rdRVbbrLNOSJsuqODxsuti0yioj54kmYwJHrnqaKRBJ8I6BgHwH02svtQx7NGZhm5TGti3qVFV5rTQi6aGT4p+ursUlHV/J2Hr4eCJABGOI/O0hBg1pUrUR2O8c60= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--xur.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=31KB9MjX; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--xur.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="31KB9MjX" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e30daaf5928so5078839276.1 for ; Fri, 08 Nov 2024 13:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731102406; x=1731707206; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=rXaV9HHpw5oBXk26XdBSn67dU41wttYgvf+/bW2x+x0=; b=31KB9MjX/02J7FCpyT+UUEhaP0Q7+f2/Xn+vxjmFMdQ9otUN4Lr4onD83acKJgiicg qGMP7TY4KMj46S3dLbDU8dL7OVPAVPFcfu9bqCFBQIgYygDS8Uq8Lz7B53JrKLIITbg4 iKzKctoG5xm1fKHTEIx+7T6HSE7QvGczNWDtIdTYCBuNgvlpyHY7eFTgz+q6RyC8dXZ4 s2dxiHsPfpG0mhF4dVJc6v4N6QCmc2S6tT2G6+NycltyMW+rzWy+74joGIzZ3Tdmnn9S a1nDlxrhJYPf2ZrMeYIYJiznHYVJ+h2tPwQiqRxy/LfGHAxy4gizI7apis9C6bXkWUGf NFrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731102406; x=1731707206; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rXaV9HHpw5oBXk26XdBSn67dU41wttYgvf+/bW2x+x0=; b=H9X0mGcUh35FqQsIePkhuEEW8oejxRJEF5Pfldo2VcvVQeUgkRn44OMXTMcZf4EOSq ttgs3oezED3oC9D4uAySgYJdxsRQK55FJGh51iiPNp62ZzuvSWgUjnhQ2RUEiXNinjnW SkvjbhgnVoB0qgIYYNbiNKxHscH0CVwfBfx/WyVeSBxYXcA5kv/UWUCcrrBCMHMDESi5 du0+nSjIrpOtMgoZeTrwg3dih+BIhg55YFfJCdfJ3ZnLOe4i05zBTSUgch9UmLa7EY3S W/swetMZTGq7pcKaCVmBHXzhuXWybB+uO/Q+edoukRVEU7MWMQPQiXIwhBYleq4GHl/E He9A== X-Forwarded-Encrypted: i=1; AJvYcCWroY5YANaSOwflj+BLNaMrSFIvlzlmMMOczcUdmgITyfnstXndZDdiZly2311PCNaQa2e++gcHlkI4r24=@vger.kernel.org X-Gm-Message-State: AOJu0YzNUITC3cFFhwxh9tB3NFqhT7Fsit/idDlRxO9nNy1V9eNE9PJU 0Y/6wMoOvI4cotX2ODwENTJakIsTnc1nFUc55oykIYFCvAKAcDj+oMc7LnPcxbRKMA== X-Google-Smtp-Source: AGHT+IFB86PGUSKJ+j1W7yv6YKMRSZZhNrTjWnqgSnyhBOaULLB3J3ivCKnVz34+e2hMdcyuXkGnsb4= X-Received: from xur.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:2330]) (user=xur job=sendgmr) by 2002:a05:6902:4f2:b0:e30:cdd0:fc0e with SMTP id 3f1490d57ef6-e337f8e881dmr5357276.5.1731102406545; Fri, 08 Nov 2024 13:46:46 -0800 (PST) Date: Fri, 8 Nov 2024 13:46:40 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog Message-ID: <20241108214640.1159739-1-xur@google.com> Subject: [PATCH v2] kbuild: Fix Propeller build option From: Rong Xu To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rong Xu , Han Shen , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The '-fbasic-block-sections=3Dlabels' option has been deprecated in tip of tree clang (20.0.0) [1]. While the option still works, a warning is emitted: clang: warning: argument '-fbasic-block-sections=3Dlabels' is deprecated,= use '-fbasic-block-address-map' instead [-Wdeprecated] Add a version check to set the proper option. Link: https://github.com/llvm/llvm-project/pull/110039 [1] Signed-off-by: Rong Xu Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor --- scripts/Makefile.propeller | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller index 344190717e47..48a660128e25 100644 --- a/scripts/Makefile.propeller +++ b/scripts/Makefile.propeller @@ -5,7 +5,14 @@ ifdef CLANG_PROPELLER_PROFILE_PREFIX CFLAGS_PROPELLER_CLANG :=3D -fbasic-block-sections=3Dlist=3D$(CLANG_PROP= ELLER_PROFILE_PREFIX)_cc_profile.txt -ffunction-sections KBUILD_LDFLAGS +=3D --symbol-ordering-file=3D$(CLANG_PROPELLER_PROFILE_P= REFIX)_ld_profile.txt --no-warn-symbol-ordering else - CFLAGS_PROPELLER_CLANG :=3D -fbasic-block-sections=3Dlabels + # Starting with Clang v20, the '-fbasic-block-sections=3Dlabels' option = is + # deprecated. Use the recommended '-fbasic-block-address-map' option. + # Link: https://github.com/llvm/llvm-project/pull/110039 + ifeq ($(call clang-min-version, 200000),y) + CFLAGS_PROPELLER_CLANG :=3D -fbasic-block-address-map + else + CFLAGS_PROPELLER_CLANG :=3D -fbasic-block-sections=3Dlabels + endif endif =20 # Propeller requires debug information to embed module names in the profil= es. @@ -21,7 +28,11 @@ ifdef CONFIG_LTO_CLANG_THIN ifdef CLANG_PROPELLER_PROFILE_PREFIX KBUILD_LDFLAGS +=3D --lto-basic-block-sections=3D$(CLANG_PROPELLER_PRO= FILE_PREFIX)_cc_profile.txt else - KBUILD_LDFLAGS +=3D --lto-basic-block-sections=3Dlabels + ifeq ($(call test-ge, $(CONFIG_LLD_VERSION), 200000),y) + KBUILD_LDFLAGS +=3D --lto-basic-block-address-map + else + KBUILD_LDFLAGS +=3D --lto-basic-block-sections=3Dlabels + endif endif endif =20 base-commit: 0dcc2d1066150787017a71f035145c566597dec7 --=20 2.47.0.277.g8800431eea-goog