From nobody Mon Feb 9 06:26:42 2026 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 BEA8F2C030E for ; Tue, 23 Dec 2025 17:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509252; cv=none; b=cT84A/Fv4my4Ajz/A28KxZikHsNT5WlZ+Lq7RwGX/1Kil4vuiX/AauUOgXZYPMRE757klzebr5VAV1h7A4Q8a9NNtVd3E4GqQL61Ruc4i1qyHpbahMuo7/U6rs/0gtzUxnBa6rxEcIjqitlkqC72CJAglttUfG2l/BlKfzH6l1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509252; c=relaxed/simple; bh=U71eWv+lZlEigAhVYCviXUXxQA3e+e5qTV+RSri9qqo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NZj7Zi5H8wgtClu2wqXhD9AKxcybj4D4ssGepNHW/6vlbCB98SLuHH604qxtfFP/W49O3w2H8gtLzUS/8jJYTro5ddTGswMIViqeKnuFuDnjWHY12l/k5wgCyiIwYzABUQ90LttETE6N1js5hZUKaJGR1GgAUOy0ssQFVxg/JeY= 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=MQsjl3JH; arc=none smtp.client-ip=209.85.221.65 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="MQsjl3JH" Received: by mail-wr1-f65.google.com with SMTP id ffacd0b85a97d-42fbc305552so4283661f8f.0 for ; Tue, 23 Dec 2025 09:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766509248; x=1767114048; 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=MBD5hyInNJ1zU+FPwr6XKENm1lWydxvpThAe0QY6n2o=; b=MQsjl3JHY1u4bguvRcxufbsdHMPBtYxUOvWGeY0VP6MYVd2V/rwfWmBQ02vQOd5BFu oxFxiqlK67uAk+afnFFY51rV+pRcuNZVqB3GemuYKN8bN/LIrtBNHSmyvos3VY5HDzSD UcQ4hkexTpNwO7RRu0HBFx0aB6RfqqONRckvVMjwrk65eQRBAQzSYZgOe8tr+lvWEfXQ OZiwspVwY/8wzTUWlACYYmTUjhKbjymmIfFGaRdmdw9OaXFjjPMORsDFIcajWbbMk+8S +LTcTn3CPXuZKc0Uiqk8M0sF3PkYuNu6GS+Bi8+t022Yhr55C/Klz7VlojxjxTugwhJ5 015g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766509248; x=1767114048; 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=MBD5hyInNJ1zU+FPwr6XKENm1lWydxvpThAe0QY6n2o=; b=JHHb+XjVWYp+jRWtCbFlda7m9X8VC4OA4RDWXbMi09mzGOsRTA6KZ34DSK4QhLwUe2 t3XnMztUUZkv8k6IKijVt7b0//XWBwP9zSzL3SBteNcstn23WhHgpVRDOu+qOvI/hHLY NpmvmnC1K7Lh+663pppjr1aO1EG2HYZ+En7LJ9iDvwAnTD/CGB+7ZHcznxoOcy9w7CoR qt8qXJLTxLEa+3TDSziIM8SqQFYipgB/vQG5Tah4u797cnUmuAXrYARvultP+1VHT9qE /bHONs/QCM1gHyi7Ue0e10vo3QQqNs+JaejNewfvOpBsg4dG9w/J1jlUzrwfFg3xh59i aGKw== X-Forwarded-Encrypted: i=1; AJvYcCU60/b8gmHwOjWJ3ACzB5Dt0v/TY2iAHHEMMvcQSBbe0efghqSzEHTb2RBkdQWqcpbKiF+AkfgVjmxlCKM=@vger.kernel.org X-Gm-Message-State: AOJu0YxDFC1zqArwbqROZN8LRVP98H0gy5Cxs4oz0Srt8UM02hlD4si5 pRKo5QtgOtNiZEiVYRusxzr9ViOx206/tKwdSF7DNxAv5LX+dtp8a0pIBOE5Gr0vjW0= X-Gm-Gg: AY/fxX6wlRTWjjA4ypf9gybTMl//XkvnLHnKNjlyLbGQT0bdwb97rFh6id7Mevc33Pe JYM9v3nLNaT2Fwi8QS03jSxOHSVIMyZJ8F7TyZTx6p3wX5hRHVscyf59FoceZKo6TphUFzcKu8H K2vHAtvs9JNlZCsVMX+1i26IFik3etQdQ2m034NElAwH+Uarey3AX7WUCRfPdF92ADnJuUGxUF6 zqbcoWvTsK9FQBRYXU5bVVA6QlRD1vMuf3yrwyRx6laQZV1mPqmVsxodg5361x4YxyhpolOM7g5 GSXb3cFVRFZ98Pf85Vp+8y1zpkQc1lz9pgkqp045Hs+b+mcdkoPo6B0iYQkVpqKb+pgwNrwcwi5 ozE2JdY4Q5BH83q9lTihVajln4UBR3ef9F4bCXFGaVfvIklIroBmw8+eaVbIZWscN9pUk8OjtyU x5uV4S/iKlw7vVobctbtww X-Google-Smtp-Source: AGHT+IHdxuaNfoOArrhJfQGMxJD7NTPYAUwkN7KhO+ZEUCIEmGuIhQs3mIG7HIDmUEghx29uGdFspA== X-Received: by 2002:a5d:5442:0:b0:432:7068:18a with SMTP id ffacd0b85a97d-43270680252mr939319f8f.20.1766509247919; Tue, 23 Dec 2025 09:00:47 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aef7sm28895137f8f.7.2025.12.23.09.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 09:00:47 -0800 (PST) From: James Clark Date: Tue, 23 Dec 2025 17:00:24 +0000 Subject: [PATCH 1/5] perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting 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: <20251223-james-libbfd-feat-check-v1-1-0e901ba32ed9@linaro.org> References: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> In-Reply-To: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Leo Yan , Justin Stitt Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Roberto Sassu , Alexei Starovoitov , Andres Freund , Andrii Nakryiko , Daniel Borkmann , John Fastabend , KP Singh , Martin KaFai Lau , Nick Terrell , Song Liu , bpf@vger.kernel.org, llvm@lists.linux.dev, Arnaldo Carvalho de Melo , James Clark , Nick Desaulniers , Quentin Monnet , Stanislav Fomichev X-Mailer: b4 0.14.0 From: Roberto Sassu As the building mechanism is now able to retry detection with different combinations of linking flags, setting FEATURE_CHECK_LDFLAGS-disassembler-four-args and FEATURE_CHECK_LDFLAGS-disassembler-init-styled is not necessary anymore, so remove it. Committer notes: Use the same technique to find the set of bfd-related libraries to link as = in: 3308ffc5016e6136 ("tools, build: Retry detection of bfd-related features") Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andres Freund Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20220719170555.2576993-3-roberto.sassu@huaw= ei.com Signed-off-by: Arnaldo Carvalho de Melo [Cherry pick to fix accidental removal in commit ad5f604e186a] Signed-off-by: James Clark --- tools/perf/Makefile.config | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index bd9f4804d56b..ea6636a09a95 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -379,8 +379,8 @@ ifneq ($(TCMALLOC),) endif =20 ifeq ($(FEATURES_DUMP),) -# We will display at the end of this Makefile.config, using $(call feature= _display_entries) -# As we may retry some feature detection here, see the disassembler-four-a= rgs case, for instance +# We will display at the end of this Makefile.config, using $(call feature= _display_entries), +# as we may retry some feature detection here. FEATURE_DISPLAY_DEFERRED :=3D 1 include $(srctree)/tools/build/Makefile.feature else @@ -927,8 +927,6 @@ ifdef BUILD_NONDISTRO =20 ifeq ($(feature-libbfd), 1) EXTLIBS +=3D -lbfd -lopcodes - FEATURE_CHECK_LDFLAGS-disassembler-four-args =3D -lbfd -lopcodes -ldl - FEATURE_CHECK_LDFLAGS-disassembler-init-styled =3D -lbfd -lopcodes -ldl else # we are on a system that requires -liberty and (maybe) -lz # to link against -lbfd; test each case individually here @@ -940,13 +938,9 @@ ifdef BUILD_NONDISTRO =20 ifeq ($(feature-libbfd-liberty), 1) EXTLIBS +=3D -lbfd -lopcodes -liberty - FEATURE_CHECK_LDFLAGS-disassembler-four-args +=3D -liberty -ldl - FEATURE_CHECK_LDFLAGS-disassembler-init-styled +=3D -liberty -ldl else ifeq ($(feature-libbfd-liberty-z), 1) EXTLIBS +=3D -lbfd -lopcodes -liberty -lz - FEATURE_CHECK_LDFLAGS-disassembler-four-args +=3D -liberty -lz -ldl - FEATURE_CHECK_LDFLAGS-disassembler-init-styled +=3D -liberty -lz -= ldl endif endif $(call feature_check,disassembler-four-args) @@ -1324,6 +1318,6 @@ endif =20 # re-generate FEATURE-DUMP as we may have called feature_check, found out # extra libraries to add to LDFLAGS of some other test and then redo those -# tests, see the block about libbfd, disassembler-four-args, for instance. +# tests. $(shell rm -f $(FEATURE_DUMP_FILENAME)) $(foreach feat,$(FEATURE_TESTS),$(shell echo "$(call feature_assign,$(feat= ))" >> $(FEATURE_DUMP_FILENAME))) --=20 2.34.1 From nobody Mon Feb 9 06:26:42 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 573D9345758 for ; Tue, 23 Dec 2025 17:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509253; cv=none; b=q2dDwr9/UcCk7bluZf1Z1ArHYFkG5YImgl7WBXwoNCMXwk55eot4bOqINVsa0AAtr1CAY5XQZCzWhuyAkkai0zUtQf6ayVfAKjAWHdiv3W8d+OQUR28guK0btMRBn1RvfvlwBGRV3GHW665euBDk/LbHvCcUTuffiE/y4yBXEJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509253; c=relaxed/simple; bh=pUYrmgn7uq9Mo0NK2QK9zsQpEV/O2MlR+EPzwebQhY8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q7jvbxrYZhdFsn0Ih4Mv35m0+UDkZT9QbUnJagKR2MSS+QOw/+Zcr3yfYqbS6KRDbQEXqj8oHE0GL0kdkBltbn2gTF0nxZBPVzK3RrJXTJ+2kKgTTw/jf2Kps5ppnpQ6quGBzXl+JapSGfx4uf9NhCuvDNZ/tP4MVfP9lDjxFNw= 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=GqQsQRIm; arc=none smtp.client-ip=209.85.128.44 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="GqQsQRIm" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-47d1d8a49f5so23921155e9.3 for ; Tue, 23 Dec 2025 09:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766509249; x=1767114049; 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=jY15ct2AtdcJrqbdqFR5HlO/a9tT55YDM1xtJfQUjyU=; b=GqQsQRImFltZ+cGurCFIOC8j+srxTT9D+RyQOv+BmuRy6bttNubYJs7Tt6r15u9AJD ByrWvBfeJOoxmaPKmqZsMNbesAhAmlUF5sPxFHGkteEFdamqSrWr7kg5nzuAvx2V0xOQ fNF4c62HyiJCVaySrRyOsCWS4XZAIzNhL3Fmf8jo0RHkZ/7ZKhkK9GdbjNN/Zr3OrODu /5ev42A63tWT2KkQkoTjhiWlm8ZQZRc5FjkzgYV106lwzgxVLbpMb9ZK4ChRW1QT5Yu1 l+kh62t7tY9QFM/no+ZoxzxaRmXpcYbrWNHVNglWxvjvTNw1oztLBKoFf6YQW5xOn35O 00Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766509249; x=1767114049; 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=jY15ct2AtdcJrqbdqFR5HlO/a9tT55YDM1xtJfQUjyU=; b=EZmHKMJpq+d2t8H0quxFh35wGyAguE6l7RpFyAtv9ljYwtdRzhcOKNUcVOVlxJ6CPB Fi0eIEB/3oTD+vvhMokWnL4uVUePUjeiHxno1FjfBi6twZGpOmzg9JV9qL648SDP0sFh E2noL4gfIjkwsryAojzZ0OCAOLe576pBoCybHTG9gtZesZVV7be0PX8ch3tFdlw8Z3Kp JnKgNdQEhzr2iXcMasqgXGtWNoD1DaqaoOFIe6urU87eCAVgEOnLBr/mYLALJkIKBcxw VpG/QBLgYb1qNHg3mOHOkA5otdGHEBvuGYhrv86/FaYAXVNkRhaSLi+GP9w5ygitDH+4 +A8Q== X-Forwarded-Encrypted: i=1; AJvYcCXuXEst4V7fAn7ZCtk0zYW9AcWAAcMkfg3ie1mtp97rnwd6/LuWpSpXN2v759ZDamoIJKrFKrhY2jCpWzM=@vger.kernel.org X-Gm-Message-State: AOJu0Yxgdy6Ssx62CEz1Ke8kHc425pPhpt6cH4NSARUgl03vSlNU1Zzx E2F70E+uLaBkEvl1Z0aSFDi6QIIWnMA3XSjU+FYzRcQO+g1xgES7tPIZnxeRFJid+LU= X-Gm-Gg: AY/fxX6+tL4qvkhXSIPR39h0+ZN/3fgHpz/2+dhz33LN/bOK7nh1yZ1NL1wuBAW6MdH OCF4YlKeKFDLsrEUpcTK8DzNPb4o3qYQb3KtplX2J8YeRNioKXbrW2b+G7xN6GE9k6BVn7J3kiP 5vhQREcpAVTkdjq62QTs6/vKcTZLV7q0Smjy9VVlEy2QwAZAvx5kXTEvGeya1oRYzapEhbFvJdh I7oOPYWuThJ1zkGWRKBsbQIwKpYaq7+wYeWa9aw357mWTH8NQeocVQf3nhYYeMDpLMLd1fyXTfZ p/uSoYL75ISsaA8XMWYSVedp/Fj9xxjrrASJK3a66cdepbNoTNQEiKzbQ1Pw7bnKZ70avm4g3rj fZcSdmFeKLMcvBcKpjE+gDVUvISNnKuyhmhuCgtPLEaq0INSYajSWb32R7CHfRCO/4KaWrMSYLj IiOKekALEbsHOKmW8AzlV8 X-Google-Smtp-Source: AGHT+IE2RrxdNBawOcJgC1lywM/+u8T2O5P9U9OWWUIJAKyrwXRhaIEa/RxLHYXY0F/IIfkkW6BZWA== X-Received: by 2002:a05:600c:1d1d:b0:471:d2f:7987 with SMTP id 5b1f17b1804b1-47d1958f9c5mr146273855e9.26.1766509249044; Tue, 23 Dec 2025 09:00:49 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aef7sm28895137f8f.7.2025.12.23.09.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 09:00:48 -0800 (PST) From: James Clark Date: Tue, 23 Dec 2025 17:00:25 +0000 Subject: [PATCH 2/5] perf build: Do all non-distro feature checks in one go 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: <20251223-james-libbfd-feat-check-v1-2-0e901ba32ed9@linaro.org> References: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> In-Reply-To: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Leo Yan , Justin Stitt Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 None of the if statements or variable assignments in the non-distro block actually affect the feature checks. Just do them all in one place so the flow isn't obscured. Signed-off-by: James Clark --- tools/perf/Makefile.config | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index ea6636a09a95..594fe3ecfee0 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -923,36 +923,28 @@ ifneq ($(NO_JEVENTS),1) endif =20 ifdef BUILD_NONDISTRO + # call all detections now so we get correct status in VF output $(call feature_check,libbfd) + $(call feature_check,disassembler-four-args) + $(call feature_check,disassembler-init-styled) + $(call feature_check,libbfd-buildid) + $(call feature_check,libbfd-liberty) + $(call feature_check,libbfd-liberty-z) =20 + # we may be on a system that requires -liberty and (maybe) -lz + # to link against -lbfd; test each case individually here ifeq ($(feature-libbfd), 1) EXTLIBS +=3D -lbfd -lopcodes - else - # we are on a system that requires -liberty and (maybe) -lz - # to link against -lbfd; test each case individually here - - # call all detections now so we get correct - # status in VF output - $(call feature_check,libbfd-liberty) - $(call feature_check,libbfd-liberty-z) - - ifeq ($(feature-libbfd-liberty), 1) - EXTLIBS +=3D -lbfd -lopcodes -liberty - else - ifeq ($(feature-libbfd-liberty-z), 1) - EXTLIBS +=3D -lbfd -lopcodes -liberty -lz - endif - endif - $(call feature_check,disassembler-four-args) - $(call feature_check,disassembler-init-styled) + else ifeq ($(feature-libbfd-liberty), 1) + EXTLIBS +=3D -lbfd -lopcodes -liberty + else ifeq ($(feature-libbfd-liberty-z), 1) + EXTLIBS +=3D -lbfd -lopcodes -liberty -lz endif =20 CFLAGS +=3D -DHAVE_LIBBFD_SUPPORT CXXFLAGS +=3D -DHAVE_LIBBFD_SUPPORT $(call detected,CONFIG_LIBBFD) =20 - $(call feature_check,libbfd-buildid) - ifeq ($(feature-libbfd-buildid), 1) CFLAGS +=3D -DHAVE_LIBBFD_BUILDID_SUPPORT else --=20 2.34.1 From nobody Mon Feb 9 06:26:42 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.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 3BF05346784 for ; Tue, 23 Dec 2025 17:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509254; cv=none; b=BHj10QX3Pa6awvG8Gcn2elqEnGK0QBBiYOn4Aq6tnU4qc9Q5bZVcGtd2paV6STy1Cr3NKeO0+leNNRmud3fPpHGQklzjrf79KBKm9LpfID2Ysc/fICWWs5n6TsBNZPIPBNR116aT4vD6yCQH/Jn1+Kg19t3VYIOz5Fb1OYqlj6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509254; c=relaxed/simple; bh=HvQuAl5BIsUEtR0z3TF9FUuo1K9HZfq6C51NE7ALywM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EgTKfO4W5XvCmnjJRZ6qh4RY6i49Pt9RATlVNf4Ql1K6gLyxZ4YQM+J1nLf5qrgXeD2D80juUl75+D8d2vqDqiNtXRNo2qV1c7fyu/amGQUggDSrmyvqK8j5Ab+nPnApMUD5TiPXxiw9CCqMsB+pyFcfHkhdALZ03e/nLHF8RHQ= 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=qhMScNo+; arc=none smtp.client-ip=209.85.221.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="qhMScNo+" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-42fbc305552so4283705f8f.0 for ; Tue, 23 Dec 2025 09:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766509250; x=1767114050; 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=UTJM3s/XdCccJiJB0tNPahzzj1p09azMnSbzBQkmBSg=; b=qhMScNo+giJTfU4fCRGs0/r0PkN7fYsqTEySSXhzH1VW5g06LsX35k4z7ASuXOfpXd hDYtd9S8vqzaa3i4IOweRyo13zDqFbNZxRsMB3LDrHHbDVLGGr67yIBpI3q+9ukgAw/7 2WGGrJoL3IYesRPtlLxrwtRcrfLTkLP0XE8J1DNP4fzG14uFYP5JLm2/tBkR/fzHlL0c I3b00KLGbwKL0Pfitq1ev9UILNUwEBItDGhkx4izElnJtAsMun/zc8EjlDRFAyVJ2a7T o9TvTBh2SByMa2YUw1AfvKprPwqItBnaQT8NZx2aTPg5VYssnEuxLERiDRfA+PWiDrhk lYqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766509250; x=1767114050; 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=UTJM3s/XdCccJiJB0tNPahzzj1p09azMnSbzBQkmBSg=; b=k+uaYAUJSX8bC7wmltcTTYeJcV69w3T+pItcsJNuZ+igwUvAa5YYKan5xG/Sh76MEA L6Mx7AZTUyYdk80QyZdkJIhDbo0UEl9GEDpV2XhZoHttDcsH31sfFuMS+XoZ593V42xH 37HppkV/4IVeeWEhjW02PVv3PLmGc2ARg9DYBaEwGCTpqe99Aby93opkELx26wN9rf/x dIGHvA1BVuZdUIrTdXVfJqj/S2Id6YMAGwk3BkkxMRFCq8eC/LWeGA4cjiukiPOOVIDa QOjfXIzHI/6/5VQKWjGvQ/zGsgGbx901ReDuHodMP7bquhMJadjsCFAEvvz43hxwNNQN i78A== X-Forwarded-Encrypted: i=1; AJvYcCXOj3WqX4UeibEXEzHnfLp1MyizkfLss+cYHCNmh8YOfg22m5GSMcJESOLyc/Q4vcUVIyRzMOqorZStuFo=@vger.kernel.org X-Gm-Message-State: AOJu0YwpMZYGrglA33NBuH+of5N62IVccox29oWWLmXsEUXNB1enCXKR wT1DILsjbBcv222vxyCImW4QWlOadOaDsGcz0FwDXz8BYujbiNu7oIv33pgVAC1wJDs= X-Gm-Gg: AY/fxX6+bHICHHutEDd00R9WBcBxfAqbetb04h1G5GlAlgv/RFtmqtw3Ak2nlZzvJ5i izdETDWSWZTdIHCufI0KjYf2CUtB2WIe4KSVRlMgGryCpY+JIMmxFNbtCRohGoi8OxIPNL2l0bp 0ceIPCR41RpiDsynnGXcyTxNNlGbFVJS25GVm0EHqM1RWRI3P6hyLf22bnCkj2pn7+6t9cMJtds 2huyNm7K0L0QXhFaXaKfSd/fI1HjfrQcgs4ewMRM3nUNXbowIYNMYN+WJuT6HzJ5YOB51VemgPe tBnlM56WjdeF3SSH0KqTyKGArKztRVDUJMIwi/811Ej9P0PL6alG+6nyo9DMaHMA8x8UBBaE5nu HPV4eFB/1XIGpqcRCUtQTUriWAmCFVSafe4l9OTTiSUtQpiD0uRv75L61ECuzOipXtRgM/kfpYr aKWPfF6SgEXbr9WrS38+OG X-Google-Smtp-Source: AGHT+IFMmSNtuwzw5XtsQ5n3BxiXKo6WM82ZPjsLwEsdsqvNmRq9sHEX+kMDMqzpXsuiU6kNsh7ojw== X-Received: by 2002:a05:6000:2211:b0:42b:396e:27fd with SMTP id ffacd0b85a97d-4324e4fda01mr17632693f8f.38.1766509250512; Tue, 23 Dec 2025 09:00:50 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aef7sm28895137f8f.7.2025.12.23.09.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 09:00:50 -0800 (PST) From: James Clark Date: Tue, 23 Dec 2025 17:00:26 +0000 Subject: [PATCH 3/5] perf build: Remove unused libbfd-buildid feature test 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: <20251223-james-libbfd-feat-check-v1-3-0e901ba32ed9@linaro.org> References: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> In-Reply-To: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Leo Yan , Justin Stitt Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 HAVE_LIBBFD_BUILDID_SUPPORT isn't used in the codebase so remove the feature test that sets it. Signed-off-by: James Clark --- tools/build/Makefile.feature | 1 - tools/build/feature/Makefile | 4 ---- tools/build/feature/test-libbfd-buildid.c | 8 -------- tools/perf/Makefile.config | 7 ------- 4 files changed, 20 deletions(-) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index a7f030fc5e83..20422853d1ac 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -71,7 +71,6 @@ FEATURE_TESTS_BASIC :=3D \ gettid \ glibc \ libbfd \ - libbfd-buildid \ libelf \ libelf-getphdrnum \ libelf-gelf_getnote \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 87a5a908d6fa..63a97cdf78a3 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -13,7 +13,6 @@ FILES=3D \ test-gtk2-infobar.bin \ test-hello.bin \ test-libbfd.bin \ - test-libbfd-buildid.bin \ test-disassembler-four-args.bin \ test-disassembler-init-styled.bin \ test-reallocarray.bin \ @@ -267,9 +266,6 @@ $(OUTPUT)test-libpython.bin: $(OUTPUT)test-libbfd.bin: $(BUILD_BFD) =20 -$(OUTPUT)test-libbfd-buildid.bin: - $(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz - $(OUTPUT)test-disassembler-four-args.bin: $(BUILD_BFD) -lopcodes || $(BUILD_BFD) -lopcodes -liberty || \ $(BUILD_BFD) -lopcodes -liberty -lz diff --git a/tools/build/feature/test-libbfd-buildid.c b/tools/build/featur= e/test-libbfd-buildid.c deleted file mode 100644 index 157644b04c05..000000000000 --- a/tools/build/feature/test-libbfd-buildid.c +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include - -int main(void) -{ - bfd *abfd =3D bfd_openr("Pedro", 0); - return abfd && (!abfd->build_id || abfd->build_id->size > 0x506564726f); -} diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 594fe3ecfee0..5ff98b89c39a 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -927,7 +927,6 @@ ifdef BUILD_NONDISTRO $(call feature_check,libbfd) $(call feature_check,disassembler-four-args) $(call feature_check,disassembler-init-styled) - $(call feature_check,libbfd-buildid) $(call feature_check,libbfd-liberty) $(call feature_check,libbfd-liberty-z) =20 @@ -945,12 +944,6 @@ ifdef BUILD_NONDISTRO CXXFLAGS +=3D -DHAVE_LIBBFD_SUPPORT $(call detected,CONFIG_LIBBFD) =20 - ifeq ($(feature-libbfd-buildid), 1) - CFLAGS +=3D -DHAVE_LIBBFD_BUILDID_SUPPORT - else - $(warning Old version of libbfd/binutils things like PE executable pro= filing will not be available) - endif - ifeq ($(feature-disassembler-four-args), 1) CFLAGS +=3D -DDISASM_FOUR_ARGS_SIGNATURE endif --=20 2.34.1 From nobody Mon Feb 9 06:26:42 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.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 481E73469F7 for ; Tue, 23 Dec 2025 17:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509255; cv=none; b=awP/uQBMR/yt77jS/gnMT4X1U9YxuItaddDqQKA4QCoNh3GKTFHQPZVMBbGgZazUQLZjRzZKl54t2ELtDlq1wW/z86ZYva28aWnkaFx+UzEOa3w7+gabL28jY244O/aNKcfWwsfdkEE4cgOuRodNrKSQUFXL0eWikPV6yansA6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509255; c=relaxed/simple; bh=FFeSBw1FMWIEtAaxrXlCm7QCuERTPjJL7GMbZA4DOXE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EjadZfqNu3Iz8qn73NmIda/YX9kKY4wbq/mQPlnqWlQHtgJ/3yLaPaHT+CLoX6Sn9glXMPWRaKz5oSR4uLd3U3WRKVHURfFUBYCZ3TudZgUkPfsKY5cG2a1ufV/UnVTk9tgRZkue6fpgSleHimj5H/vwsAYf1FkfbwTp+Cun+bI= 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=P9XFvVQC; arc=none smtp.client-ip=209.85.221.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="P9XFvVQC" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-42fb5810d39so2612205f8f.2 for ; Tue, 23 Dec 2025 09:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766509251; x=1767114051; 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=lZbTgcsl8S8+ff6/2oxkJI2TdhWxaQ+JXfess3SxhOo=; b=P9XFvVQCWhyHQa+MAfWIglYXc92IMA1nfKZrraQ7WVf6oKmV/fKDLmPSiTiwPOj1AI fp+h76SgtDFwhtaL0vbGsVESCO/c/zjI8TZAdHHm2JxdXjcW3N6OPvAZIwbiSDHm1UPi RjUdo6+q78N299zGbxAslOdEGnjFdSEW4qiuYiH21QRH/NSi9vNviVIffOvw4jlUJ06U KwqGgnxzyF+2P6LzImRUcUCMsfDFZACKu1R3981CaHs5fq/Ui/adVNCJ+YzXAa5ApQWG yHU2MhdqEyj8VztgO7bmr0Pr8hgCsn4BRJ1N7+8XpTmYnXOht0ggbQsZRa22VGyYJUxY qIYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766509251; x=1767114051; 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=lZbTgcsl8S8+ff6/2oxkJI2TdhWxaQ+JXfess3SxhOo=; b=A/7jkFFDZF3UnF/O6zurzOKk302iqmUDbRuz2VpL92t7uMq0SJAdikm/mjDbv+OxqR UjaWAIXyeAlHeoGRyZCcwNmS3dRFtCX4UYp70dXDRSdLl1stAzU1JPawEuliaVl1TjWq IZJ7wLqCY5avLiuDY2HtTCqJ09P3mcDYNorBxn9TOQZ+6InY2NXNcUGt4GH2F8javaz/ K6Dsq+cSG16AziJilmuBrankP8f+hQbzfAyxIlczDR6i24z0TaNCcoYIroinzFdj85rq T1G5dVn49+VHP9hKEXyd36mhDJVtqyGvieuQ/vnW31xKWiBFsNjwgjxXjtprdCFR0GP8 WFZw== X-Forwarded-Encrypted: i=1; AJvYcCVWQmPjXnoEIo5NmVs5Z6mn0F0LZOziR+q04KOI0DvQqPtlX+pEBnMNxquE6ObGm/csjIuK7rbpGjGZVbo=@vger.kernel.org X-Gm-Message-State: AOJu0YyMOhx1HsQnafWxjKD/x1hKy2eF5MQ6A2HInz6o90T8jqbbzzm3 Fw5GsDPoTTsvCmTI+zxafIXvf5p8gleV3xL6p5clzj1yzsFFa+FY2b5RzMrpUsZ7zRk= X-Gm-Gg: AY/fxX4ONZ/K5gTEsI1ISFG5Ks4KOu9moUgqrLLInS497xWYrIguafqtOncVTKUrL/H KkqxcWNJO3GtJCmxNk6kSJlKifj/saA5n+n1WyBPEAfA5oXzXUgw1K7mIB6eGdiHuZ9qOf3mok8 ESj4UuGHQzQF22Xvqcac1GuVUX/N1Puo7/+lX+/46gNIRolSIBDohGtGXYeE4L2y0qfUVLnukGN Ov7wNtNNNINFo1TwcPjfQfkspAfkYVpSseoZhVdXOQKww7AAul/qxh09gNYNgXyImIhFWMPwIHO 7Jy2NVNPZP/fhUwgLbTHPBQ0QWtcsIa3DhwsKiV6b6zO8fTGeia1zUXlQI3h/mI/hvV3A8l1L0H Q0d6GaxqqvvuaRnekXSNCRj56Si8srXuBYeY0cxk37ZOgxNv4mA9428NMX90R3+4mFRMo2yQeX5 kZDpPt21tGO6m33ryegEoC X-Google-Smtp-Source: AGHT+IHw266VIWmJq0XwT5qBef2T7bpj04WK99XObIIN7F2sHc70CND9LIepKuuHduut7Wrf49Jg3A== X-Received: by 2002:a05:6000:2907:b0:429:b751:7935 with SMTP id ffacd0b85a97d-4324e704a80mr17902125f8f.56.1766509251502; Tue, 23 Dec 2025 09:00:51 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aef7sm28895137f8f.7.2025.12.23.09.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 09:00:51 -0800 (PST) From: James Clark Date: Tue, 23 Dec 2025 17:00:27 +0000 Subject: [PATCH 4/5] perf build: Feature test for libbfd thread safety API 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: <20251223-james-libbfd-feat-check-v1-4-0e901ba32ed9@linaro.org> References: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> In-Reply-To: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Leo Yan , Justin Stitt Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 The non-distro build requires libbfd 2.42 since commit b72b8132d8fd ("perf libbfd: Ensure libbfd is initialized prior to use"). Add a feature test so that it's obvious why the build fails if this criteria isn't met. Signed-off-by: James Clark --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-libbfd-threadsafe.c | 18 ++++++++++++++++++ tools/perf/Makefile.config | 5 +++++ 4 files changed, 28 insertions(+) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 20422853d1ac..d94548fff489 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -71,6 +71,7 @@ FEATURE_TESTS_BASIC :=3D \ gettid \ glibc \ libbfd \ + libbfd-threadsafe \ libelf \ libelf-getphdrnum \ libelf-gelf_getnote \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 63a97cdf78a3..731b19b84f4f 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -13,6 +13,7 @@ FILES=3D \ test-gtk2-infobar.bin \ test-hello.bin \ test-libbfd.bin \ + test-libbfd-threadsafe.bin \ test-disassembler-four-args.bin \ test-disassembler-init-styled.bin \ test-reallocarray.bin \ @@ -266,6 +267,9 @@ $(OUTPUT)test-libpython.bin: $(OUTPUT)test-libbfd.bin: $(BUILD_BFD) =20 +$(OUTPUT)test-libbfd-threadsafe.bin: + $(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz + $(OUTPUT)test-disassembler-four-args.bin: $(BUILD_BFD) -lopcodes || $(BUILD_BFD) -lopcodes -liberty || \ $(BUILD_BFD) -lopcodes -liberty -lz diff --git a/tools/build/feature/test-libbfd-threadsafe.c b/tools/build/fea= ture/test-libbfd-threadsafe.c new file mode 100644 index 000000000000..fe97f95f6f06 --- /dev/null +++ b/tools/build/feature/test-libbfd-threadsafe.c @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +static bool lock(void *unused) +{ + return true; +} + +static bool unlock(void *unused) +{ + return true; +} + +int main(void) +{ + /* Check for presence of new thread safety API (version 2.42) */ + return !bfd_thread_init(lock, unlock, NULL); +} diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 5ff98b89c39a..1e35fbb5215d 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -927,9 +927,14 @@ ifdef BUILD_NONDISTRO $(call feature_check,libbfd) $(call feature_check,disassembler-four-args) $(call feature_check,disassembler-init-styled) + $(call feature_check,libbfd-threadsafe) $(call feature_check,libbfd-liberty) $(call feature_check,libbfd-liberty-z) =20 + ifneq ($(feature-libbfd-threadsafe), 1) + $(error binutils 2.42 or later is required for non-distro builds) + endif + # we may be on a system that requires -liberty and (maybe) -lz # to link against -lbfd; test each case individually here ifeq ($(feature-libbfd), 1) --=20 2.34.1 From nobody Mon Feb 9 06:26:42 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 3930B346A14 for ; Tue, 23 Dec 2025 17:00:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509256; cv=none; b=KuShzWAja3ay4gy2g8hX7qY+Jwm9pYAPg31L1Tzd7OMHVJg1yVHySfDeKJrj4s7eVxDj0JoUvp8T6rUMh9+AxfbR7zsVgEP6uNJ/eT24DYFViUNbqoIRlB6aF5UwMe6PvvxENUsXaQbAYJNLfaK2KON8gt8etM79osZaoepDnEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766509256; c=relaxed/simple; bh=0umdUXyTX5rgSuGain8DW3LGBh7mYqc+EdcYA++gvKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V3faKmmIDiDrxftpfzqrserGbK8OKbbYPefeB48+dHjsUo74/CKE2ehB8Eq17n4coPYYC4xHWA59ZZLtMMC+YlQY35r0KfDRc9Lcem7XUacbEOkh15xURrVoIe2EEOzSWoA5aImpy5Zujr7skXrz1UqtOiYr5CmlhJgaos9O48k= 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=x1XSo8p+; arc=none smtp.client-ip=209.85.128.51 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="x1XSo8p+" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-477a1c28778so59586925e9.3 for ; Tue, 23 Dec 2025 09:00:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766509253; x=1767114053; 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=BMhU1Ise8/cj2uC/iqpEOfTTyoX7j88WyHRNEPk+wjQ=; b=x1XSo8p+JwayqQbC81UyMQE+K12s83oCP2hiiPqMHldzuNtCXny2bl3Y/F+xUZ419X A/VsUmcPN+Jfe4jijSpzBUWZnPcPgL+sb/GT/gc0b4D4AK8swfl8nk7BiRuFQsgZIiq1 A1xIidyhaId7rHKXG0l9OM02LX5BiXV16Tovjzdz5nYXKbzyOA5jEj20Fw7w9SM7bg7f h66IztXpfm8VTP3ocRnDDH7w0SQBe6LdfZpyklvHXBtsshPNbs2EsHAM40+WnXK2xVG7 TjLO4vgOWChNRGVOoqU7VZBtFX7nOeszepYm2c7Iv0Po9pqskXMwLviQyIxG03s1Vuxg l6Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766509253; x=1767114053; 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=BMhU1Ise8/cj2uC/iqpEOfTTyoX7j88WyHRNEPk+wjQ=; b=g2/v8cJUzCz5LWsiUqXEQ0mUNr9U0aaPacXrlVY7IyMv8dzNb5EVO9KPEBok7EZaRi f7Lmsetd1WfjCskrE1o4v7exyQn0Bap0P0GC8TBxNcJYTdvLZHiSd13YQ1r9A1aOJNNv rITrWok6ZaDtjXTi9Orv0yNWVSfm8L8E6f2ovuFaqhxGO8kk/p8HYwSKC1oZZrWY2a4p qLqgkkAr+RC3QJc2HeSdM48c2xJYel8R/ec6lTgl/HxD8r5Nm9fq0JTLMkGBbdBQJfNi WCXCSYS+B/Lwbv1lY5ZenRiL4XXRVKeFFOxouws0tU/A5iZGXn+7i7Xo+ZA9JtTVwvdc 8CNw== X-Forwarded-Encrypted: i=1; AJvYcCVaGD8lVjXIfuDUPHHkf3vKon3BW285ujoAfuNFYIYCjW2IQ/BH33n16tlmmMTvOEG1z7k1yahX0b3l/IU=@vger.kernel.org X-Gm-Message-State: AOJu0YwDmN9bHWA2M92s3Oz0yy7MFq/ERd8AoINkYbbrxr/E/XUT/qgr x3WRH2T7ykw/injGt+eW0Io954uP9rV1h+xBWZT7B0YAGykaZ4iYMrmMTc/wNwHmugE= X-Gm-Gg: AY/fxX5mOxi8ne70PxTr5fUKx/EWYSMxwmvDup4xBGBTl5WqGN1ZXhSKGwmLsJge14z yls2vE5F3unoBRzkv71v6PRfa0L8Y75nsOABpSfuGlNavOd2bmURrQilxbQyqqWf/S4yfMXNajV p6cy9R3l6ciQL6crjW7G8hXuZcUJelY2PJ2+MtZfzbLS5W8JfKm0XmMxcdykuumZGZ8lQ/IrSEm 2gy0Fy5GqzwEk3jS2d8SAWHceTIcYVfjq4HVvwSh2ZOGgZZZZh9ZaDz5v1wFUILlwd93RSMIx2w cXfxZ9IxBYlE0pabjB12WwcMvbjR/HtXzHexb3co/aL3LZMFLY7MHc33AAkeiIrn/GdzYoONnJr OQrNPRlP/o9Xx9KynuOHacFuRsE0YVk9gxlrZYEyZBkBcoxJt0+I65cP5MrkW6xkFTvHHYecGlX zAf1KXh9AizxqHk6nB/jPU X-Google-Smtp-Source: AGHT+IEmXyr4Uj9u2sWEA01aAu2FLZncuAO3EyjxyoVdSQ4fiNDLouXhbcKF21puEyCjFiiIWbg4AQ== X-Received: by 2002:a05:600c:8b11:b0:477:55ce:f3bc with SMTP id 5b1f17b1804b1-47d2d273515mr83353075e9.19.1766509252601; Tue, 23 Dec 2025 09:00:52 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aef7sm28895137f8f.7.2025.12.23.09.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 09:00:52 -0800 (PST) From: James Clark Date: Tue, 23 Dec 2025 17:00:28 +0000 Subject: [PATCH 5/5] perf build: Skip nondistro build test if libbfd is old 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: <20251223-james-libbfd-feat-check-v1-5-0e901ba32ed9@linaro.org> References: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> In-Reply-To: <20251223-james-libbfd-feat-check-v1-0-0e901ba32ed9@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Leo Yan , Justin Stitt Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 Non distro builds now require a new version of libbfd, so skip the test if the library is too old. The grep test isn't a strong as the feature test in test-libbfd-threadsafe.c, but there seems to be precedent for feature testing this way here and it's good enough for the build-test rule. If the function exists but returns an error it will be picked up by the feature test when attempting the build. Signed-off-by: James Clark --- tools/perf/tests/make | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 6641701e4828..36411b4b6d2b 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -124,6 +124,9 @@ make_minimal +=3D NO_LIBDW_DWARF_UNWIND=3D1 NO_L= IBBPF=3D1 make_minimal +=3D NO_SDT=3D1 NO_JVMTI=3D1 NO_LIBZSTD=3D1 make_minimal +=3D NO_LIBCAP=3D1 NO_CAPSTONE=3D1 =20 +# binutils 2_42 and newer have bfd_thread_init() +new_libbfd :=3D $(shell echo '#include ' | $(CC) -E -x c - | grep b= fd_thread_init) + # $(run) contains all available tests run :=3D make_pure # Targets 'clean all' can be run together only through top level @@ -137,7 +140,9 @@ MAKE_F :=3D $(MAKE) -f $(MK) endif run +=3D make_python_perf_so run +=3D make_debug +ifneq ($(new_libbfd),) run +=3D make_nondistro +endif run +=3D make_extra_tests run +=3D make_jevents_all run +=3D make_no_bpf_skel --=20 2.34.1