From nobody Mon May 25 05:55:43 2026 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 2AEC23E3D9E for ; Mon, 18 May 2026 09:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095054; cv=none; b=DRs1Z1zhqBYq+WrYVDNr/Le6DTOqvUAQ+w9uljKjSKNWk3menDe95b2tQwmN3LrdjSYvR89JYRXsg2njvr6Um90vhF9ZOqrmGe7oS19aUcg/YAmCTH3SRG0+tho942J8nZOYYC2piuE0+xfOgYPRIs+bs3z4SAEAgfM+QypAOsw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095054; c=relaxed/simple; bh=i/0OlfT29DMUOjLxI+zP/lSGgbixizaY1dSO2x2Y5o0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hEpshsqurF2Zb0ib8MEtbD47WBF7ivoPOv/+l1XsShdoAQKF3ylDZUMI9Hx8WBkinG0RSEj0AHIMRgacz+2Kb1oB3pZrNU7qvbMC6viXduF71igj5J2wzcRWj6pDQAu9Z+phrfT+HF77cVZTdc0bUvxN0weO1pEAGlHQ2Q7nZV0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=W0iGl2hc; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W0iGl2hc" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-44509921fbcso1088277f8f.3 for ; Mon, 18 May 2026 02:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095050; x=1779699850; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YYpkMhrLfOeREVg1A6emQSE4RLjyH6VWZIyJ8FRo8sU=; b=W0iGl2hc+IvDGg8O89hdPF4M60uNm6FefAHNtWPf1fpEZDArGSDw1aPxpvmy5WgxAg Z0KRzZl+KWtzrFqWJkjnazhIs5CVcY4BEL/ge66JzVDzl5HiOaLNr0MogRMKMMmG/afe cBP8IgtRAd9wZ3HBxgDb6PHx9AnliIgSSPs8jF2CYy/ZOPEErKg6vY9w/mLBED1fqtvF tHIlaKYYhMVJ5y1cHIwqJvm4EcNI7Uu+LfvY4MZOGVddRPL5sEIKARlgDyBKYUABuEOB LoCzttFdmou+XiXPt+K+IxVkXhcwYgNgd4LcxQ+inNnt+0002fwCwM46M/go0E9rCPz6 1kCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095050; x=1779699850; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YYpkMhrLfOeREVg1A6emQSE4RLjyH6VWZIyJ8FRo8sU=; b=GrWi8TSw2zqmtr0zyMDaVKvCaltnCv06YerVbHwRMfx113AUDqE+R8nmmqRdb7edrd ANhgImqxWU/fxnVAV3N1IOqApDbwCy0PFdB7x1d1PLdEQk5K1wTEQHZmm2gUwSqFQlcK Me2Z7dduyS+Af+J9jyJ2/LTGf2cvLExMUzrSKXwPke1/JKdynZ0f56wJor0RINl5spD3 KX8XEJQnmTNogNnJd5MfZaitY71Rxz8OWgcwIq1wyp5yM9jbcw/gvpyLW44Cy8YL6q8e WJslc5yesf7/Vz6J3az5UHfahYPZO5wbtn7ktVzhSAO/W7NebxX8ZhQSkuo2z/DEgeCP ZhjA== X-Gm-Message-State: AOJu0Yx5YjSDYp01lc4W5qiS2oBeuiK4eHuiYWaaNSPDJ674uv30uGdE pF/MbpNwAz6faKhFn4jChuM5yWB+NDhwjzMZheir1bgGq3z0VV2AVcDGO3F9peVHpPk= X-Gm-Gg: Acq92OH4OHWkCtM4W1SD43NzxplzcCq/gkbHJ4VthqsBAkCXza+Hc4oU/yvVGlB5WQx DHnIJ1aD4smWcNHMrOa/eU/dahU/NcxaqYR0ZrwHQseUqDrOsTfcnOtRWM3FgsRZ2T3YVFFeC3E yO4TgP8lwidxoD8QuMt1/3OIpeU8q28Ht2PvWTq8L4Y4lv5BiZLaaRNFpTy8eVMcEJ1R48JatnC 3Oa8OLfVsVgzCL9BF0HZoAFCuqojvLf+XzBAoOvaalpyluvPlTpdEjHbFahCnq3K9I5kju1D881 /yqMNukYUY7XZYmCuXNAPGMzrSjMjVkrgINTcNFOILW1UXj9Ha2jwwLddAq/m6EC+otnQXl2sPE 5iMY1NiViWiZWaA4msp2sroQlsT6KTf+7xa6Ey/3lvYRE7t239/NESDLtK//Fm9w93w0Ih6oSKl gyCYHIC+STnAso083gK7gZQD6lCSCf5kLn X-Received: by 2002:a05:6000:2083:b0:43e:a9ba:b194 with SMTP id ffacd0b85a97d-45e5c5dd921mr22974719f8f.34.1779095050244; Mon, 18 May 2026 02:04:10 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:09 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:07 +0100 Subject: [PATCH v2 1/6] tools/build: Allow versioning of all LLVM tools defined in Makefile.include Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-1-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 The version of LLVM tools can be given on the build command with LLVM=3D-15, but this isn't applied to all tools. For example $(CC) gets versioned, but $(CLANG) doesn't. This causes a Perf build with LTO=3D1 to fail with an error about mixed clang versions: ld.lld: error: libperf/core.o: Unknown attribute kind (86) (Producer: 'LLVM18.1.8' Reader: 'LLVM 15.0.7') This file has two "ifneq ($(LLVM),)" blocks adjacent to each other, so merge these blocks making it obvious that all tools should be versioned consistently and there is nothing special about each block. This also reveals that ?=3D and "allow-override" are used inconsistently between the blocks. "allow-override" is technically only required for builtin variables, but isn't only used on them, and doesn't do any harm if used on a non-builtin. Make them all "allow-override" for consistency. The only functional difference this will cause is if there is a file level definition of one of the variables followed by an "#include of Makefile.include" which will now overwrite. But this isn't done and in a later commit some of the duplicate definitions will be removed for good measure. There are also some other LLVM tools that are not defined here and will be moved in a later commit. Signed-off-by: James Clark --- tools/scripts/Makefile.include | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 41971a68972d..7022e78208a2 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -61,10 +61,18 @@ $(error Invalid value for LLVM, see Documentation/kbuil= d/llvm.rst) endif =20 $(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) +$(call allow-override,CLANG,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) +$(call allow-override,HOSTCC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) $(call allow-override,AR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) +$(call allow-override,HOSTAR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) $(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) +$(call allow-override,HOSTLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) $(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX)) $(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) +$(call allow-override,LLVM_STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) +$(call allow-override,LLC,$(LLVM_PREFIX)llc$(LLVM_SUFFIX)) +$(call allow-override,LLVM_CONFIG,$(LLVM_PREFIX)llvm-config$(LLVM_SUFFIX)) +$(call allow-override,LLVM_OBJCOPY,$(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFFIX= )) else # Allow setting various cross-compile vars or setting CROSS_COMPILE as a p= refix. $(call allow-override,CC,$(CROSS_COMPILE)gcc) @@ -72,26 +80,21 @@ $(call allow-override,AR,$(CROSS_COMPILE)ar) $(call allow-override,LD,$(CROSS_COMPILE)ld) $(call allow-override,CXX,$(CROSS_COMPILE)g++) $(call allow-override,STRIP,$(CROSS_COMPILE)strip) -endif - -CC_NO_CLANG :=3D $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__= "; echo $$?) =20 -ifneq ($(LLVM),) -HOSTAR ?=3D $(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX) -HOSTCC ?=3D $(LLVM_PREFIX)clang$(LLVM_SUFFIX) -HOSTLD ?=3D $(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX) -else -HOSTAR ?=3D ar -HOSTCC ?=3D gcc -HOSTLD ?=3D ld +# Host versions aren't prefixed +$(call allow-override,HOSTAR,ar) +$(call allow-override,HOSTCC,gcc) +$(call allow-override,HOSTLD,ld) + +# Some tools still require Clang, LLC and/or LLVM utils +$(call allow-override,CLANG,clang) +$(call allow-override,LLC,llc) +$(call allow-override,LLVM_CONFIG,llvm-config) +$(call allow-override,LLVM_OBJCOPY,llvm-objcopy) +$(call allow-override,LLVM_STRIP,llvm-strip) endif =20 -# Some tools require Clang, LLC and/or LLVM utils -CLANG ?=3D clang -LLC ?=3D llc -LLVM_CONFIG ?=3D llvm-config -LLVM_OBJCOPY ?=3D llvm-objcopy -LLVM_STRIP ?=3D llvm-strip +CC_NO_CLANG :=3D $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__= "; echo $$?) =20 # Some tools require bpftool SYSTEM_BPFTOOL ?=3D bpftool --=20 2.34.1 From nobody Mon May 25 05:55:43 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 ACB263E51FC for ; Mon, 18 May 2026 09:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095055; cv=none; b=j/o3i8hyT1LBPaIgClt6wGo1C6K+tRvMJBMN3uVgE/+sWKZpSAVnWZNrhbcgTcUbdb5fDeZPwAAfISQzL6r4sx/rhB8y4iFqNnrI28ATD1cUvamiEwPbdRABRbs0ncvOANwsTQAGK+tk12T5L7HSC6yZ7XXTkpIeY3TQVsise+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095055; c=relaxed/simple; bh=NfaBRDzFvFklhzTH9t4p9EVBdLk/XaHTDMg8o9QY524=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cA0gLJGsCh9PyU8i5Vg32ZffqEHjWyy3D2pX6JpcbOSo51S8yBoxj1pXSJtVe5+5MhFB1hw4QwdvBu09Rtv5LxM5UqsK6kPZO8RXlneheOG6n+8wJ0ZKB/APhrxcYCAiw5s46/yEQguwA4FQj/zPxOwNezsql2Tfq7EAt42sIkQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=uJirnelK; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uJirnelK" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-44e1ebb3122so1083525f8f.2 for ; Mon, 18 May 2026 02:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095052; x=1779699852; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=o4dQGlI0To3jzdG+Zpi+3N86C8iuvnWf5obCtCx/S5c=; b=uJirnelKs1tdcsFLurQKHZ/CCHfP0RfbhTZxz1Cez1jjAiTAJupKKuIyfX9d+mIXrm CIfQ3vl/qG/iI5kEsWWjR7+W71lmVHqyBOCwv9M/F7/BTCSlvPzEtq9H9/Fdj8kZ2MYv duCB7iwt8ODSZUEGRIGEtMYMki+uEz89A9+4DZ1raiJ56Viy9+mNqgGF6hnG5oEck5rq gwweJURY+0a1vwBP9eu+sUUut9Gm8yY1cN+m/UBplilLUVYXUfmQ6eWFDgVY2PTVeqKG BF3vxejlSKCob5G6muIuV8aooNceMGOcgp8ZYTrdHILYSb4CE/LHjaikIZJZyooolU7d Laxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095052; x=1779699852; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=o4dQGlI0To3jzdG+Zpi+3N86C8iuvnWf5obCtCx/S5c=; b=UMBMbEbbnv7Y9bzuUrxe3c6zTGWn2nTEbHYBKQ5TtGswFHHXoFlFLE3hXHRr+Eg6i0 5zKdREqWvnoaenorJD9++x93SfNpPtdYPH8bEuDgDz+vwhr3OlUYoayK23kEujBE/jD/ Zr5PZYtWILxVV4xmGWGwv0wcJr1CjaXzibFNsYMs0pxw7tBfLm4WuqHa5VLHMZ4FEljH +GZ5ZLg/PZJ5AiN6uoLye2LH/zFsfWleRtaeynRg47LaNbQ9Py9XJeZUsbMXA4nVhBt1 F7FOJAbk6k9SXVEAwkwoDzBVRbIXzFEmohCUjLH89Rjds5s0LYxcJgBBn0xVBmWze5L5 UJRg== X-Gm-Message-State: AOJu0YxLlE1G6dPijPwGExs9MuUUS/l+qv82+6jqYNHyHic1d4XkwTdv v6DBkCrRZ6jMorqRHeT7/jm9Uv6g0/IftYCpLRr+aJMJYJgh0LME2JWOOLaJAqkG6Pw= X-Gm-Gg: Acq92OFYapgo/iKeGbAxOeQPuBmXdxtEU0ZiO8OUqTTKcQ93UhJxDurwHaTDPpeTp8T A8el35GSLhT1ieycdIihz4nnlFjVUhEyqu7/+C82MDGNv1G1+4PvnyOV7on7XF0T0I7UUrsfB3f v7LDLO9sj+lpSFhdQz9ll/M26biOby2ZRQn8wtkx/3YiTH3wZvwrBgY5Gx0b7inCTvgXoLfKriO Mvuxfbnfw9iKf+BI6XRmonFCWDX9SRABJ9TyKTmJ3kaj09/wpay4jbYFMeaO5GV6TB82QYfAgXg ir+wIzXHEXjlixDW8jJuvOU/S+u7o2l1WHTz9WdDSXyDTs6+j+gMddlnVTCojwSYFzCpYrwB+6g w63EQVclJk3DAV8TJ2ULEqFHxCYm1JrLCF8sb1ohVWuwbsA+2C6gTRlR9EnRJ2Nu9XnDzfmsNWo nsAWLpdVILpgOBRZTY04VZx/q9rLVeBHrq X-Received: by 2002:a05:600c:828d:b0:48e:6db3:ff2e with SMTP id 5b1f17b1804b1-48fe61eb313mr207432455e9.15.1779095051843; Mon, 18 May 2026 02:04:11 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:11 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:08 +0100 Subject: [PATCH v2 2/6] tools/build: Indent if else blocks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-2-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 These blocks are quite big and unreadable without indentation. Indent them. No functional changes intended. Signed-off-by: James Clark --- tools/scripts/Makefile.include | 76 +++++++++++++++++++++-----------------= ---- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 7022e78208a2..e81e5b479c56 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -52,46 +52,46 @@ define allow-override endef =20 ifneq ($(LLVM),) -ifneq ($(filter %/,$(LLVM)),) -LLVM_PREFIX :=3D $(LLVM) -else ifneq ($(filter -%,$(LLVM)),) -LLVM_SUFFIX :=3D $(LLVM) -else ifneq ($(LLVM),1) -$(error Invalid value for LLVM, see Documentation/kbuild/llvm.rst) -endif + ifneq ($(filter %/,$(LLVM)),) + LLVM_PREFIX :=3D $(LLVM) + else ifneq ($(filter -%,$(LLVM)),) + LLVM_SUFFIX :=3D $(LLVM) + else ifneq ($(LLVM),1) + $(error Invalid value for LLVM, see Documentation/kbuild/llvm.rst) + endif =20 -$(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) -$(call allow-override,CLANG,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) -$(call allow-override,HOSTCC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) -$(call allow-override,AR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) -$(call allow-override,HOSTAR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) -$(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) -$(call allow-override,HOSTLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) -$(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX)) -$(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) -$(call allow-override,LLVM_STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) -$(call allow-override,LLC,$(LLVM_PREFIX)llc$(LLVM_SUFFIX)) -$(call allow-override,LLVM_CONFIG,$(LLVM_PREFIX)llvm-config$(LLVM_SUFFIX)) -$(call allow-override,LLVM_OBJCOPY,$(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFFIX= )) + $(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) + $(call allow-override,CLANG,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) + $(call allow-override,HOSTCC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX)) + $(call allow-override,AR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) + $(call allow-override,HOSTAR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) + $(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) + $(call allow-override,HOSTLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) + $(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX)) + $(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) + $(call allow-override,LLVM_STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) + $(call allow-override,LLC,$(LLVM_PREFIX)llc$(LLVM_SUFFIX)) + $(call allow-override,LLVM_CONFIG,$(LLVM_PREFIX)llvm-config$(LLVM_SUFFIX= )) + $(call allow-override,LLVM_OBJCOPY,$(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFF= IX)) else -# Allow setting various cross-compile vars or setting CROSS_COMPILE as a p= refix. -$(call allow-override,CC,$(CROSS_COMPILE)gcc) -$(call allow-override,AR,$(CROSS_COMPILE)ar) -$(call allow-override,LD,$(CROSS_COMPILE)ld) -$(call allow-override,CXX,$(CROSS_COMPILE)g++) -$(call allow-override,STRIP,$(CROSS_COMPILE)strip) - -# Host versions aren't prefixed -$(call allow-override,HOSTAR,ar) -$(call allow-override,HOSTCC,gcc) -$(call allow-override,HOSTLD,ld) - -# Some tools still require Clang, LLC and/or LLVM utils -$(call allow-override,CLANG,clang) -$(call allow-override,LLC,llc) -$(call allow-override,LLVM_CONFIG,llvm-config) -$(call allow-override,LLVM_OBJCOPY,llvm-objcopy) -$(call allow-override,LLVM_STRIP,llvm-strip) + # Allow setting various cross-compile vars or setting CROSS_COMPILE as a= prefix. + $(call allow-override,CC,$(CROSS_COMPILE)gcc) + $(call allow-override,AR,$(CROSS_COMPILE)ar) + $(call allow-override,LD,$(CROSS_COMPILE)ld) + $(call allow-override,CXX,$(CROSS_COMPILE)g++) + $(call allow-override,STRIP,$(CROSS_COMPILE)strip) + + # Host versions aren't prefixed + $(call allow-override,HOSTAR,ar) + $(call allow-override,HOSTCC,gcc) + $(call allow-override,HOSTLD,ld) + + # Some tools still require Clang, LLC and/or LLVM utils + $(call allow-override,CLANG,clang) + $(call allow-override,LLC,llc) + $(call allow-override,LLVM_CONFIG,llvm-config) + $(call allow-override,LLVM_OBJCOPY,llvm-objcopy) + $(call allow-override,LLVM_STRIP,llvm-strip) endif =20 CC_NO_CLANG :=3D $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__= "; echo $$?) --=20 2.34.1 From nobody Mon May 25 05:55:43 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 397353E5571 for ; Mon, 18 May 2026 09:04:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095058; cv=none; b=mZRq14tYJzBfee4UP1uGDe3ROqjn1LHmEbFW4rrdEci4AQivofQ4XBj8jsDgo8ZLX+YcSXWeipTQYUXJnmvktoULvfGkHKz8+LK1k9HEx35Qmbzm5sOQdbONLB+Wb3n1jqE5UCdbSi2/QIRi6DZsvcD5cJlRTK2svKSVAbN1lOE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095058; c=relaxed/simple; bh=PhCveEiZIdUmcGwyU5spejpP9AhnWoovrQrg6qXZOwg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FLacIfd+VgjY++NU9DfNmeMxoefgtRDUyW9KP0iPxOIDG8F0iXbcY07h3W1TxyyD34PEUCbD27gmBgfmkgjW4CySWJxop5d6pGMpYNHLH0UU0guxbwY6YLhV4Udplo1ZJ4WtxHHrxXCijHW0tbjTkVGt1fwk8/9wG+fOlbqA+XE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oXhACppp; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oXhACppp" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-48e82c23840so14225495e9.3 for ; Mon, 18 May 2026 02:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095054; x=1779699854; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Qi50aH0ofyIVTmJunsbTWM1jEiSwseuTv8Zx+hC3coU=; b=oXhACpppSwkeXkVA3Hcw99exvK/M9DFvoRfTCUberOk9q+p4ISB22bhaC5e2UFX45t XI4d6dVU+fh2RgS1Hf4zFkLGUSY4ZBX39yjc+TUQMiEYPqneS5oTC/2GqKR64HJOUGu+ gt6XY/5VIva4kXvtNbJ7mlI3p8Ln8XJawfPg3SwTZCe4Zdnx/lhWBTvUAyOhMSjROSw8 jcGfX2MKkGGNDxfRK0kMpksudgq+HaNcNCzmnvJIl5/Cs9AHsML8PTXKmMlON0QHPwUY c2O7ItcUMKVM6sPfwEOxA57ZK3a9b8G749JkM6NQxM11uUFb+ea5Jf64w507Cb0n/0OE +k1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095054; x=1779699854; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Qi50aH0ofyIVTmJunsbTWM1jEiSwseuTv8Zx+hC3coU=; b=rWzHtDBoZH2W9XSHrWskdlVETMmWqXhWLmuDanRzF+koMFly0EbBUE59iP63TTYfgk I8tMIOYIq7dbvDaZ3zRq4PWKcIe9+ry3vIMNRaTidVIzE21jmeXICDUWMSpk7B5YIdUv xU4kGd3+CoVFM85NGzB2joIGBhOBR2rwJHjNr7sLvwApzUvYEzd6PzRKSbNBOWn9+lRQ pJeo3EqeuF/yddD85X22gO5sN89hfFCRSXrIG4Z4ToBrwDm5wzeeU8wV45LXwBauvqyi VZY+PBimGpUcFMb2SzQIorMUdhPBlrEV/0eA8Rd8CsX5T1oERCcrLRXDbtyNRJI0eQPG 3elA== X-Gm-Message-State: AOJu0Yxll+4Rym71lbWNHXuosTGHKW1VkQBIOd3rLm+H6A9kP0elBTYn nQyxlGxbU2+GNBW0Li3xdIA2oS+mJVE3apS3Hz73wdD3o7idZ3THaT5ki2UjXpjrIUQ= X-Gm-Gg: Acq92OEUpWQ1rwhvp7w5XJeXR5WbVmPhXJl6nyTZotRBqziZcPJTD/GmK1goXyo5s9m eBepuv2/AyaZoyxQCsjl5Y30kqaMRtr+O4vojp4gRuvvtwZB4ittXuAsBtTfsRQHgONirckEZTs GeA5QZTaPzQJGzWqJE5UEt8QH8f8rHsL2MBtOf3X4Epf7etNqM1EI5Ol7OBc0e2Xuyj/f2zVn2s ebKfBy8xn4qCus2xcAzahqcWOisFwRgb2EOvbkBuF8NHlEhyDtJZy+mHOiFEcvIziQ9FFHbUufF HM3LpPk9aqfYfyzFhyB8tOEnGAJ+0GkT62A7WY4DiufP0XJblkr6huvk8wzo3Com8c4Bj/KIl+U Bqn00nbsuTzxM1CAuIMpG/G13wx+8CxKZ89RGrliq4MWJLKC7HfF9/QJo2Z9YFIsI27OSa3aNBJ bxrjMv0cb4n2a1kgwJvmjkAd3+NNvuPvAZ X-Received: by 2002:a05:600c:8715:b0:490:b07:5f27 with SMTP id 5b1f17b1804b1-4900b07600fmr72330915e9.24.1779095053446; Mon, 18 May 2026 02:04:13 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:13 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:09 +0100 Subject: [PATCH v2 3/6] selftests: Remove unused LLD variable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-3-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 This file was mostly copied from selftests/bpf/Makefile, but the LLD variable is not used here. Also, this copied block didn't get the same fixes as the original one did later. Remove it to avoid confusion and so future fixes don't have to be in two places. Signed-off-by: James Clark --- tools/testing/selftests/hid/Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests= /hid/Makefile index 50ec9e0406ab..96071b4800e8 100644 --- a/tools/testing/selftests/hid/Makefile +++ b/tools/testing/selftests/hid/Makefile @@ -105,13 +105,6 @@ $(MAKE_DIRS): $(call msg,MKDIR,,$@) $(Q)mkdir -p $@ =20 -# LLVM's ld.lld doesn't support all the architectures, so use it only on x= 86 -ifeq ($(SRCARCH),x86) -LLD :=3D lld -else -LLD :=3D ld -endif - DEFAULT_BPFTOOL :=3D $(HOST_SCRATCH_DIR)/sbin/bpftool =20 TEST_GEN_PROGS_EXTENDED +=3D $(DEFAULT_BPFTOOL) --=20 2.34.1 From nobody Mon May 25 05:55:43 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 B425A3E638B for ; Mon, 18 May 2026 09:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095058; cv=none; b=N9cTsh1byqFwpb0QBmZoj8Sni+wiB296P1gY8+aPUxUaouPUOi2uVfL29dTxGn7MjSVrJeZ2voCAEANGaLv2ScB/l4cGVSwD8q1jo0xuFHHsPnj3g/Q5Ri3HMsBoxMwF8k+bNomtpTc2buY/oV8lxcvZaS200TM5Ns4ZeB0Mw4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095058; c=relaxed/simple; bh=XYN2OerTukpjvC5uTpCQ4LBfsGgqw8htnZqoFgokKo0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cx8VAlF0jZURMXdWQdTOJEqaSpyiFSPRs86TnUnhOIk5tfzDOaEo/rESNyBHUo2FNLSIvDE+E8OKrrjGoBZIWqvllMXbR0JOxHFH9tTQeDkEaGoIMFACzseGItHOlMh1sdRMyv2+3wQfiB9WaVOSZ8zVuIkndZWsrKFR1M1fBDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=d3Cc8C5x; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="d3Cc8C5x" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4891d7164ddso10696105e9.3 for ; Mon, 18 May 2026 02:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095055; x=1779699855; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BuYOAkPGvNGtocwKIFKK4r5RpQsaxB3pkCmwnF/UVxs=; b=d3Cc8C5xXYt4HObXlJg7Pwm3gwACAcpZvdleD9FhFr/dgK1u00Cl+RfkTatcilaOfv SiMNRm/gkfnnu0maJ5JQNF2i37jSEs5POx3fPBB+Mr3LZWR/js6uBqeNbi+Ug6qaU9xk YuiGlkCTjoVbfDRH99Bval7gHyL1wxcKFQGsfhcFkgQj0xw9zvkoUgtwCUlH9T9P5HQF 02Wp3pWe6XLVSerO2+H5821JhaECKWZF6sw1KcivNatxrHIyqQL0DBzdsfHW/zWBhEFB qgvVSVi1S7MQv1cXZnWiYhH1aMB+Bm2AtSlK2NOxN9qysKGAR5Yca+RNAjbM7W0PIjTL O7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095055; x=1779699855; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=BuYOAkPGvNGtocwKIFKK4r5RpQsaxB3pkCmwnF/UVxs=; b=kJChJOo0SVjDuugwzWOh4W91gupX+bR0SsqBEBb/KpaYsZc+OXpO/DGlH6OZtwHzEn j/07eq0sK4kfJPYjEpBZLA1/HhR1pAjI+Qn2XGkggdBnWr7aT6KIgJmW909CMHCSBVzr /ks2VNOxOo9B6QanyiObbC5iUcc5FEnEV2Kj5PmI/COSjWjJuDg3pY5q//5nWpJAtuA5 6NvRawA6AjuNf6TztM3m8R2AlboceQn0Zkx3v2vCZ3Bc2c6oAlNdyOKQh4DK7s3KJ1XB txC081haAnm+H7ODYvldAy3tFZ0rvru17oiSwCQbNqURf4gPHbo+BXSav/a+E4S7N2YQ VL7w== X-Gm-Message-State: AOJu0YxFH/Z4XcftuYL83xCTzJDhJ0Qz63WbbgBSIYA5uGpTGLQbNUdv pURnNATZA4id+XIi+hLm2T7Psjn4fRmCS9Wl3zCpzaNKwEEV2hJ5jkxVprK1DOy0ffk= X-Gm-Gg: Acq92OHYnXFPev6gS1nJAR8QW5Y9nbFN2/g12V1MOZo2Bi0l3441V+YXN7lWMi4+vnc CvyROJSAvsGZY9bTIBgrHpFsq4+kWepsYRq74XPCwLyPLFBwHm8zR5DjON+JuWmB4KiAyzKsbGQ gkitYjttBMaG3a1ZSFQk3/tIHmf6AgSKNjOIzEy8JFvo9N7+8tK/+v1LZ2LEvFE1qzbnR74e5PL ukbUbjE6AoisrmJUR5AnGL3pDCQN4n51Y6Cmp32MtNNUomWWLbZ53Cnxhsxd/g6+kKemubNNstz nRL7Q7RZFwx/yDCSjx6XheJWR+iHovhQVH5Sg39xNqS2OCncLmxiE6yztp4vVdIJTPvlCpF9Mlg JLuR0yArSsrIABjA20Pf84vLBXLGC2Br8RFxeGY0MiuokECOoTrrIz6NOlfJiUeDkp6Bcq3VIyp vJNYHCsMTnCkeuYf3zH9nJV8VwYjhQDJzo X-Received: by 2002:a05:600c:8707:b0:48f:fddb:dcd9 with SMTP id 5b1f17b1804b1-48ffddbf75emr124613905e9.27.1779095055065; Mon, 18 May 2026 02:04:15 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:14 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:10 +0100 Subject: [PATCH v2 4/6] tools/build: Allow versioning LLVM readelf Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-4-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 Documentation/kbuild/llvm.rst mentions that readelf is included in the LLVM toolchain, but it's not currently included in this block. Add it so that LLVM=3D... options also apply to readelf. Users in tools/ were Perf which was hardcoding it, and another was the BPF makefile. Both already include Makefile.include so convert them to use the new variable. It also didn't have the cross compile prefix, so either readelf didn't mind opening cross binaries, or it wasn't working for cross builds. Signed-off-by: James Clark Reviewed-by: Ian Rogers --- tools/lib/bpf/Makefile | 8 ++++---- tools/perf/Makefile.perf | 1 - tools/scripts/Makefile.include | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 168140f8e646..180dca9c57c8 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -114,12 +114,12 @@ PC_FILE :=3D $(addprefix $(OUTPUT),$(PC_FILE)) =20 TAGS_PROG :=3D $(if $(shell which etags 2>/dev/null),etags,ctags) =20 -GLOBAL_SYM_COUNT =3D $(shell readelf -s --wide $(BPF_IN_SHARED) | \ +GLOBAL_SYM_COUNT =3D $(shell $(READELF) -s --wide $(BPF_IN_SHARED) | \ cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \ sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}' | \ sort -u | wc -l) -VERSIONED_SYM_COUNT =3D $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.= so | \ +VERSIONED_SYM_COUNT =3D $(shell $(READELF) --dyn-syms --wide $(OUTPUT)libb= pf.so | \ sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}' | \ grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l) @@ -182,12 +182,12 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_SCRIPT) "versioned symbols in $^ ($(VERSIONED_SYM_COUNT))." \ "Please make sure all LIBBPF_API symbols are" \ "versioned in $(VERSION_SCRIPT)." >&2; \ - readelf -s --wide $(BPF_IN_SHARED) | \ + $(READELF) -s --wide $(BPF_IN_SHARED) | \ cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \ sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \ sort -u > $(OUTPUT)libbpf_global_syms.tmp; \ - readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \ + $(READELF) --dyn-syms --wide $(OUTPUT)libbpf.so | \ sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND|ABS/ {print $$NF}'| \ grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | \ diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 0aba14f22a06..63276bf55856 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -215,7 +215,6 @@ FLEX ?=3D flex BISON ?=3D bison STRIP =3D strip AWK =3D awk -READELF ?=3D readelf =20 # include Makefile.config by default and rule out # non-config cases diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index e81e5b479c56..380ad84ac51e 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -73,6 +73,7 @@ ifneq ($(LLVM),) $(call allow-override,LLC,$(LLVM_PREFIX)llc$(LLVM_SUFFIX)) $(call allow-override,LLVM_CONFIG,$(LLVM_PREFIX)llvm-config$(LLVM_SUFFIX= )) $(call allow-override,LLVM_OBJCOPY,$(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFF= IX)) + $(call allow-override,READELF,$(LLVM_PREFIX)llvm-readelf$(LLVM_SUFFIX)) else # Allow setting various cross-compile vars or setting CROSS_COMPILE as a= prefix. $(call allow-override,CC,$(CROSS_COMPILE)gcc) @@ -80,6 +81,7 @@ else $(call allow-override,LD,$(CROSS_COMPILE)ld) $(call allow-override,CXX,$(CROSS_COMPILE)g++) $(call allow-override,STRIP,$(CROSS_COMPILE)strip) + $(call allow-override,READELF,$(CROSS_COMPILE)readelf) =20 # Host versions aren't prefixed $(call allow-override,HOSTAR,ar) --=20 2.34.1 From nobody Mon May 25 05:55:43 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 BD95C3E6DF2 for ; Mon, 18 May 2026 09:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095061; cv=none; b=kv/rdmywATj6bUngOpCUcCg2TYBpkLwF5F4wxX163ojd+aT7yB8et1LLcsFqbGMDakAECd6LME70l886WkIs8/mRJWFFD0VlMn8e7HdfCFp+l2Mylhz6VA7aoCRqjbP/Yf+0MAq47gBoiIpqzIJa5eYLbL1DWMIx912jt4LLNPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095061; c=relaxed/simple; bh=VNADPzNywG/CBzEz1od+vE4Iyn6WTlo+l45ZhJwh9Ms=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F2mKiuFi/gNrl68gXMt2ZWJewyU5Rzw+XwPwTmhBOjtOCT7fc/eoaFqGRKprI6Kua3ENwapYJitaPYX10fh7+927NPkpuFvn7F9W56hfYZH+K2k72Pm9MgYHHPg0uHvznCrM+W78iGrD40Z1ICxnRSL/GKBnjnnXsrsP1yny7CA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sxfCx9wq; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sxfCx9wq" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-43d7e23defbso1015388f8f.0 for ; Mon, 18 May 2026 02:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095057; x=1779699857; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bn8F5gVJpOGPGF8wz0bSPAbJHDWXhciwJhA1pFc6s6s=; b=sxfCx9wqOEw1p2gLRQZSPHrDa22AjIxtqfnfnSSMh+RARllOwCq4NtsGCFlHzGxXD/ HEJ5+8R1tX/AIo+ibR6E7PskrF8ZWNvi5So8HgnqyohvFzbanpU81j7TwIzZhGn2uFID DT4yfKMHpv9Be9JIxt1Tbql7LPc2vIjvV7OGrygD26OgEzYXLzN1qIob43l7tobXb6IT N6cLqii7fV2N2FnIrgOOtVsBOv9D/y2B5phPWeTkHGRHhMF5v3tmNl0A/larnM4Z7nKs YYqmcf86EEf+bOduQiFn+p5ZzoDHBevyhPfajvouiZwD5FDMSmTi/FNQ1QYUNIX1W0TM tTHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095057; x=1779699857; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bn8F5gVJpOGPGF8wz0bSPAbJHDWXhciwJhA1pFc6s6s=; b=n7TXGg8x84WUV5ct6Hw3dd8K4Vf+bRRiOSs3FLYXFmqLHt/1OCqAVK3Kt+M+yMs/EQ bygEzgDOv67r7A41Eu0KfG+n4B+kTU6dV0MaPgnwWlJ0IcvEbU/7YShh2Xyvv6mTnnSF rp+WeYHPj4BKiuvVAMtScjMAy6Tt4P3gAYqzl+s9JI55rwVNQo35Z1srEdPv+wRXOCt1 RxNyr1xFDRqcj0i23oyiIx2SdC0Gkx9AGwUjQMbe7ZG9baHkuCIUByqYRa7otnXtg7sB ySN9+a8+gMm9j6ftH/i9xnXgTx9bZZrf80TzjTvaXC6I1UozCWlaQkskd7a0yXZonFf7 XjSQ== X-Gm-Message-State: AOJu0Yxxq3+9+8kzZHWRIpY3Kirc9WUlcY6nAf61KNmEvVNM+G96Ad0X jIEqB9070damUhNsAEndFbao26/TqIHIEPcmV6LVF0iQEekLB2+30AUPSf5op7Z0cDA= X-Gm-Gg: Acq92OF4TsleXAR0goBOAxcOOX9vPhLJYygUt09BJKyIlXFCF4U4ML+JPvHpcGPP/uQ Vj24CDs8bMZHT0UQrvTT16EvmYuZWqtKOCuWrAI6m4/zDdPYQvrsRJrzd0OYZUhOY/+ye9Ojddk WhpesBxUX/poAN6C49Jz5VxM4t5DUswvWR/08w7D7TI/gbN2iNA5h0UqnQSXjnVIIUPfV1DYMXu 2TV0FIESMDsSq0a82gkOFk7U+add5en7PIZOgoZcBJJT45z3mLz8hbbTxeMxEajYAV9yt98cjrY hwXzD33XP/N/6RXuAhlZOwK+I4M1HWXs3yPB2OuraVQKdUiWRFPVEMC9YoZZKG7YipOrs9Ajuc3 J5d9atg2Mt4aR9wkl49VZs1dmK7AGoobif4easa0gsWIId+nW3k/fgTnwQA7VLHJS71PaUIC3pA uTzFB9CUWtwfXusU/7entOJLSuQG9ZTotW X-Received: by 2002:a05:6000:2c0c:b0:44a:46bc:e5e2 with SMTP id ffacd0b85a97d-45e5c5b3980mr21428210f8f.9.1779095056738; Mon, 18 May 2026 02:04:16 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:16 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:11 +0100 Subject: [PATCH v2 5/6] tools/build: selftests: Allow versioning LLVM lld Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-5-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 Building with LLVM=3D... could result in a different version of lld being used than the main toolchain for liburandom_read.so because it's hardcoded to "lld" in this makefile. Make it consistent with the rest of the LLVM toolchain by adding an LLD variable to Makefile.include. Keep the fallback for other architectures in tools/testing/selftests/bpf/Makefile as it seems like it's something specific to this make rule and shouldn't be global. Clang only accepts either a full path to "/x/x/ld.lld" or "lld-15" style inputs to "-fuse-ld=3D", so the only way to make it work with both prefixed and postfixed paths is to always take the full path. Also I don't think the original use of "lld" over "ld.lld" was significant as this is always a linux build, so that can be changed to make it work in both cases. Signed-off-by: James Clark --- tools/scripts/Makefile.include | 2 ++ tools/testing/selftests/bpf/Makefile | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 380ad84ac51e..5c2d505cba62 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -67,6 +67,7 @@ ifneq ($(LLVM),) $(call allow-override,HOSTAR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)) $(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) $(call allow-override,HOSTLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) + $(call allow-override,LLD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)) $(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX)) $(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) $(call allow-override,LLVM_STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)) @@ -91,6 +92,7 @@ else # Some tools still require Clang, LLC and/or LLVM utils $(call allow-override,CLANG,clang) $(call allow-override,LLC,llc) + $(call allow-override,LLD,ld.lld) $(call allow-override,LLVM_CONFIG,llvm-config) $(call allow-override,LLVM_OBJCOPY,llvm-objcopy) $(call allow-override,LLVM_STRIP,llvm-strip) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests= /bpf/Makefile index 6ef6872adbc3..836e783f0170 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -245,9 +245,9 @@ $(OUTPUT)/%:%.c =20 # LLVM's ld.lld doesn't support all the architectures, so use it only on x= 86 ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 riscv)) -LLD :=3D lld +USE_LD :=3D $(shell command -v $(LLD)) else -LLD :=3D $(shell command -v $(LD)) +USE_LD :=3D $(shell command -v $(LD)) endif =20 # Filter out -static for liburandom_read.so and its dependent targets so t= hat static builds @@ -258,7 +258,7 @@ $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urand= om_read_lib2.c liburandom $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \ $(filter %.c,$^) $(filter-out -static,$(LDLIBS)) \ -Wno-unused-command-line-argument \ - -fuse-ld=3D$(LLD) -Wl,-znoseparate-code -Wl,--build-id=3Dsha1 \ + -fuse-ld=3D$(USE_LD) -Wl,-znoseparate-code -Wl,--build-id=3Dsha1 \ -Wl,--version-script=3Dliburandom_read.map \ -fPIC -shared -o $@ =20 @@ -268,7 +268,7 @@ $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux= .c $(OUTPUT)/liburandom_r $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ -Wno-unused-command-line-argument \ -lurandom_read $(filter-out -static,$(LDLIBS)) -L$(OUTPUT) \ - -fuse-ld=3D$(LLD) -Wl,-znoseparate-code -Wl,--build-id=3Dsha1 \ + -fuse-ld=3D$(USE_LD) -Wl,-znoseparate-code -Wl,--build-id=3Dsha1 \ -Wl,-rpath=3D. -o $@ =20 $(OUTPUT)/sign-file: ../../../../scripts/sign-file.c --=20 2.34.1 From nobody Mon May 25 05:55:43 2026 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 C85823E63B0 for ; Mon, 18 May 2026 09:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095063; cv=none; b=dSmPYLCSCJMUhxuwPY+gIdqTnYyocRKfE7HfZJZmfXsudWfQ9368GZyyNmjd9GLVZZTY6b0qVNmSpNNSmew0JWylXR8XVmbhNbLB4rwnbK/RlDlRY7nMVieO8dLgSInC8RI55lF3jvtFpKI/0L+TCCd9ylx0Pl2mD+EPgef7fJY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779095063; c=relaxed/simple; bh=fzYRY6fdwwtc2iRyj9RCOJMDAIdKHmJQQ+6ehPNKfyY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YVnHNtKpBbbBGNkaX7UP0+E1PY1G7fiV/4LtWrK2tQaZklSkX7XqRYmj0O85IxS9bEzkxJ5jEsv3AY/Dz6Q4+XdDDDbhBCioLI/YtMd7D+uc4aRUAmTGkepDdZ0BE5dfRu8KuOvk3mGzhi6X/gEBzQ52pQTpd8sqrCjzz2m0dR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=knq/CMsC; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="knq/CMsC" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-bd36614d329so298793366b.3 for ; Mon, 18 May 2026 02:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779095059; x=1779699859; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0eZhJfDWaDpr1HIAphXElaRatPY/KQEr+aNnKVotSAw=; b=knq/CMsCVaus/TiINPDj02am41TsRjY4ov+VlTNeAPR4IRhRGHEscb1/UFrRXKafyy V1KhjM1IEjpjEiqV/wXjRCgTFpzYvaZ0bmYcRJNur0Sxxt/xZ5LBuF2LRqq9HcDuNl5f P2QcRTWb5U4qK3faMDXTOBtTsQzIO/k76FXlUwBSLd12jazgWPEnD0ogrP6k2eFBZUWS kK4Z3O2L2u8h1qkA0OHB2ylvK7ElQI7Dj9q6NG9wzog1TUFRwFdUGSevc/1nUXR0V7PO rkxTItUCS6vlUnmUgD5FbohsC4RMQAtT7llysFBxZLMRcEpPnP/vYnUdKheTI7RXLXul BW9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779095059; x=1779699859; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0eZhJfDWaDpr1HIAphXElaRatPY/KQEr+aNnKVotSAw=; b=FD6Gk6KLP2EuqK7iA6nwfVL5mXyBIL5F/NYx09yxgXbu3SiuWEFV66/vp30ynDh9WA yI6UCexdDTUMIJYcWDIYWXiPQn8LDUQUAPiTXhHjuW3alI6/K7IDoXKCVteFoVyMAthB JBu24L3aUFgnWKrn+5UxxtLGf6W8xbweJGt7Re06jUe0o7gOMa07sy6O+aBdaI9FVdq9 9UuWGTwfNR7HIW7L5ezMGpTWyJUt5C336VuP/LEfnP6YIwaDZz53LZqfzFBWQt8FtaSe va2DV+Jsoup0+4TRbZTcjwPFeXjLUCTNJUB3ksXfSPcBLkjRundBenDauS3Ekm9wC8B8 jcqg== X-Gm-Message-State: AOJu0Yxkox2mySOZhX345wp7Efqg4armq4ffafLo8JOZYGvgXrzGJx9+ 6NGYAqI/bJGtyqcEC81FaBvmpVmfI60TzvvNKdAzwTKFAl9hE6npAUAk0pUi9x/CEd4= X-Gm-Gg: Acq92OHw74aQQLnXFnLr/d8QXF1FPRk5MzzuDSrLInx265ySMh4QUmclDii/rNU91oT 0BFdMpnP864dNTmKbozi4lrE1j++YzDB3McjruIJnnUXmYkJQbnYgERm7wb538YwcIEn+p6Hzj1 PVcUACMU63J9WuMJ9X+GmtLVjslKvOdWzTh5UZHhlauA7dO1HV+PSGaoSWLuqDHur816LtWhSH5 Q2oPxKWXW7UM00Ep6Bb13BGg9N25cit2CQjWaCi4BNw2p4ouPJb2Zadr9TI0zgnryYoIeJYeWyC 6H98aPJOe9X3gX3Ux9YeAgSZZeSnuLWV11Buz/qyr0vCokrXI925Cf4kjxlQcDl7OQ9snnhKTEm TycfvC0NcRwRTnCkxsO7mKagk9ULN0KfHqadRqmzo2SmoHYbiPZwbpWIcaNqpW0iK8SzfmpbiLv H89JUv5mCmIanm36pBUYIvj5jzSnq+AS4a X-Received: by 2002:a17:907:c248:b0:ba1:1181:b773 with SMTP id a640c23a62f3a-bd5177ee49dmr801041366b.10.1779095058404; Mon, 18 May 2026 02:04:18 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm35084436f8f.5.2026.05.18.02.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 02:04:18 -0700 (PDT) From: James Clark Date: Mon, 18 May 2026 10:03:12 +0100 Subject: [PATCH v2 6/6] tools/build: selftests: Remove some duplicate toolchain definitions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-james-perf-llvm-version-v2-6-f12cc4f031d8@linaro.org> References: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> In-Reply-To: <20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org> To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , ihor.solodrai@linux.dev Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 Try to remove some, but not all duplicate toolchain definitions. In these instances, their makefiles already include tools/scripts/Makefile.include which defines these in a consistent way. STRIP is the only one that was set with an '=3D', but I don't think it was significant so that difference can be dropped. Signed-off-by: James Clark --- tools/bpf/resolve_btfids/Makefile | 3 --- tools/lib/api/Makefile | 4 ---- tools/lib/subcmd/Makefile | 4 ---- tools/lib/symbol/Makefile | 4 ---- tools/perf/Makefile.perf | 6 ------ tools/testing/selftests/bpf/Makefile | 1 - 6 files changed, 22 deletions(-) diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/M= akefile index 7672208f65e4..6fdb6302e0a2 100644 --- a/tools/bpf/resolve_btfids/Makefile +++ b/tools/bpf/resolve_btfids/Makefile @@ -20,9 +20,6 @@ HOST_OVERRIDES :=3D AR=3D"$(HOSTAR)" CC=3D"$(HOSTCC)" LD= =3D"$(HOSTLD)" ARCH=3D"$(HOSTARCH) CROSS_COMPILE=3D"" CLANG_CROSS_FLAGS=3D"" EXTRA_CFLAGS=3D"$(HOSTCFLAGS= )" =20 RM ?=3D rm -HOSTCC ?=3D gcc -HOSTLD ?=3D ld -HOSTAR ?=3D ar HOSTPKG_CONFIG ?=3D pkg-config CROSS_COMPILE =3D =20 diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile index 8665c799e0fa..a228fdb5adba 100644 --- a/tools/lib/api/Makefile +++ b/tools/lib/api/Makefile @@ -9,10 +9,6 @@ srctree :=3D $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif =20 -CC ?=3D $(CROSS_COMPILE)gcc -AR ?=3D $(CROSS_COMPILE)ar -LD ?=3D $(CROSS_COMPILE)ld - MAKEFLAGS +=3D --no-print-directory =20 INSTALL =3D install diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile index 8703ab487b68..9f1ddcf0504d 100644 --- a/tools/lib/subcmd/Makefile +++ b/tools/lib/subcmd/Makefile @@ -9,10 +9,6 @@ srctree :=3D $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif =20 -CC ?=3D $(CROSS_COMPILE)gcc -LD ?=3D $(CROSS_COMPILE)ld -AR ?=3D $(CROSS_COMPILE)ar - RM =3D rm -f =20 MAKEFLAGS +=3D --no-print-directory diff --git a/tools/lib/symbol/Makefile b/tools/lib/symbol/Makefile index 426b845edfac..d692abe8add6 100644 --- a/tools/lib/symbol/Makefile +++ b/tools/lib/symbol/Makefile @@ -9,10 +9,6 @@ srctree :=3D $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif =20 -CC ?=3D $(CROSS_COMPILE)gcc -AR ?=3D $(CROSS_COMPILE)ar -LD ?=3D $(CROSS_COMPILE)ld - MAKEFLAGS +=3D --no-print-directory =20 INSTALL =3D install diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 63276bf55856..948abfd2ee8d 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -174,11 +174,6 @@ endef =20 LD +=3D $(EXTRA_LDFLAGS) =20 -HOSTCC ?=3D gcc -HOSTLD ?=3D ld -HOSTAR ?=3D ar -CLANG ?=3D clang - # Some distros provide the command $(CROSS_COMPILE)pkg-config for # searching packges installed with Multiarch. Use it for cross # compilation if it is existed. @@ -213,7 +208,6 @@ FIND =3D find INSTALL =3D install FLEX ?=3D flex BISON ?=3D bison -STRIP =3D strip AWK =3D awk =20 # include Makefile.config by default and rule out diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests= /bpf/Makefile index 836e783f0170..f038642b283f 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -3,7 +3,6 @@ include ../../../build/Build.include include ../../../scripts/Makefile.arch include ../../../scripts/Makefile.include =20 -CXX ?=3D $(CROSS_COMPILE)g++ OBJCOPY ?=3D $(CROSS_COMPILE)objcopy =20 CURDIR :=3D $(abspath .) --=20 2.34.1