From 48eae4808e28cfe8b75076431d9ffb7ce2375913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= Date: Sun, 27 Apr 2025 21:41:38 +0200 Subject: [PATCH] package/pahole: fix build with host-cmake 4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit host-pahole build fails with recent host-cmake versions, producing the following error: CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. The issue can be reproduced with a minimal defconfig: BR2_arm=y BR2_cortex_a7=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_DEFCONFIG="versatile" BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE=y And host-cmake >= 4.0.0 The issue has already been fixed in the upstream pahole project and is included in versions >= 1.28. Fix the issue on the current LTS branch by bringing the fixing commit from upstream. Signed-off-by: Alexis Lothoré Signed-off-by: Arnout Vandecappelle --- ...ists.txt-Require-cmake-3.5-or-higher.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/pahole/0001-CMakeLists.txt-Require-cmake-3.5-or-higher.patch diff --git a/package/pahole/0001-CMakeLists.txt-Require-cmake-3.5-or-higher.patch b/package/pahole/0001-CMakeLists.txt-Require-cmake-3.5-or-higher.patch new file mode 100644 index 0000000000..01f98fcb88 --- /dev/null +++ b/package/pahole/0001-CMakeLists.txt-Require-cmake-3.5-or-higher.patch @@ -0,0 +1,45 @@ +From 12ca11281912c272f931e836b9160ee827250716 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Tue, 26 Nov 2024 14:19:16 -0300 +Subject: [PATCH] CMakeLists.txt: Require cmake 3.5 or higher + +To address this warning from cmake: + +CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): + Compatibility with CMake < 3.5 will be removed from a future version of + CMake. + + Update the VERSION argument value or use a ... suffix to tell + CMake that the project does not need compatibility with older versions. + +Cc: Alan Maguire +Cc: Andrii Nakryiko +Cc: Domenico Andreoli +Cc: Dominique Leuenberger +Cc: Dominique Martinet +Cc: Eduard Zingerman +Cc: Guilherme Amadio +Cc: Jan Alexander Steffens +Cc: Jiri Olsa +Cc: Matthias Schwarzott +Link: https://lore.kernel.org/all/Z0YEFABQejfGTyrj@x1 +Signed-off-by: Arnaldo Carvalho de Melo +Upstream: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=12ca11281912c272f931e836b9160ee827250716 +Signed-off-by: Alexis Lothoré +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1d0dadf6eea7..90fa65c391b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.5) + project(pahole C) + cmake_policy(SET CMP0005 NEW) + +-- +2.49.0 +