https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/119573
gmake is GNU make where make is not GNU compatible. This leads to a lot of tests failing to build with errors like: ``` make: "<...>/Makefile.rules" line 569: Invalid line type ``` See https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html for the platform names. Tested on Linux and FreeBSD. Not tested on NetBSD, but the logic was always "if netbsd or freebsd use gmake" so I think I'm safe to assume NetBSD will be fine with this. >From 4bec90c17bde6b70eca304801989ec1dc2a48097 Mon Sep 17 00:00:00 2001 From: David Spickett <david.spick...@linaro.org> Date: Wed, 11 Dec 2024 15:16:46 +0000 Subject: [PATCH] [lldb] Require gmake on FreeBSD and NetBSD gmake is GNU make where make is not GNU compatible. This leads to a lot of tests failing to build with errors like: ``` make: "<...>/Makefile.rules" line 569: Invalid line type ``` See https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html for the platform names. Tested on Linux and FreeBSD. Not tested on NetBSD, but the logic was always "if netbsd or freebsd use gmake" so I think I'm safe to assume NetBSD will be fine with this. --- lldb/test/API/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 36f4973ad9a452..66eccff297a999 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -52,11 +52,18 @@ set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_TOOLS_BINARY_DIR}/dsymutil${CMAKE_EXECUTA if(LLDB_TEST_MAKE) set(LLDB_DEFAULT_TEST_MAKE ${LLDB_TEST_MAKE}) else() - find_program(LLDB_DEFAULT_TEST_MAKE make gmake) + set(MAKE_NAMES "gmake") + + # "make" on FreeBSD and NetBSD is not GNU make compatible. + if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + list(APPEND MAKE_NAMES "make") + endif() + + find_program(LLDB_DEFAULT_TEST_MAKE NAMES ${MAKE_NAMES}) if(LLDB_DEFAULT_TEST_MAKE) message(STATUS "Found make: ${LLDB_DEFAULT_TEST_MAKE}") else() - message(STATUS "Not found: make") + message(STATUS "Did not find one of: ${MAKE_NAMES}") message(WARNING "Many LLDB API tests require 'make' tool. Please provide it in Path " "or pass via LLDB_TEST_MAKE.") _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits