From ea2f804cf60ad00b1faa0b596a5712cef686bee0 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 25 Jan 2024 08:47:05 +0200 Subject: [PATCH] Build: Use sh instead of ls for ELF configuration On RHEL variants, if coreutils-single is installed, ls is a script that contains: #!/usr/bin/coreutils --coreutils-prog-shebang=ls Replace ls with sh, which is supposed to be a binary (or a symlink to one) everywhere. Pick-to: 6.6 Change-Id: I2a43ac9e3332a470951bbf3335f2fdf3ae5c698c Reviewed-by: Thiago Macieira (cherry picked from commit 1026e2c98c602ec51bcb722a6597bc7a37a4e6ab) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index ffe670aeea8..fb9ff76b315 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -418,7 +418,7 @@ set_source_files_properties( # Find ELF interpreter and define a macro for that: if ((LINUX OR HURD) AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS) if (NOT DEFINED ELF_INTERPRETER) - execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/ls + execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/sh RESULT_VARIABLE readelf_ok OUTPUT_VARIABLE readelf_output )