| 1 |
From: Maximiliano Curia <[email protected]> |
| 2 |
Date: Sat, 15 Aug 2026 18:00:00 +0000 |
| 3 |
Subject: Only use the qemu test wrapper when actually cross-compiling |
| 4 |
|
| 5 |
--- |
| 6 |
CMakeLists.txt | 6 +++--- |
| 7 |
1 file changed, 3 insertions(+), 3 deletions(-) |
| 8 |
|
| 9 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 10 |
index 22b21d2..d3f0efc 100644 |
| 11 |
--- a/CMakeLists.txt |
| 12 |
+++ b/CMakeLists.txt |
| 13 |
@@ -231,19 +231,19 @@ endif() # BROTLI_DISABLE_TESTS |
| 14 |
if (NOT BROTLI_DISABLE_TESTS AND BROTLI_BUILD_TOOLS) |
| 15 |
# If our compiler is a cross-compiler that we know about (arm/aarch64), |
| 16 |
# then we need to use qemu to execute the tests. |
| 17 |
|
| 18 |
+ if (CMAKE_CROSSCOMPILING AND "${CMAKE_C_COMPILER}" MATCHES "^.*/arm-linux-gnueabihf-.*$") |
| 19 |
message(STATUS "Detected arm-linux-gnueabihf cross-compilation") |
| 20 |
set(BROTLI_WRAPPER "qemu-arm") |
| 21 |
set(BROTLI_WRAPPER_LD_PREFIX "/usr/arm-linux-gnueabihf") |
| 22 |
endif() |
| 23 |
|
| 24 |
|
| 25 |
+ if (CMAKE_CROSSCOMPILING AND "${CMAKE_C_COMPILER}" MATCHES "^.*/arm-linux-gnueabi-.*$") |
| 26 |
message(STATUS "Detected arm-linux-gnueabi cross-compilation") |
| 27 |
set(BROTLI_WRAPPER "qemu-arm") |
| 28 |
set(BROTLI_WRAPPER_LD_PREFIX "/usr/arm-linux-gnueabi") |
| 29 |
endif() |
| 30 |
|
| 31 |
|
| 32 |
+ if (CMAKE_CROSSCOMPILING AND "${CMAKE_C_COMPILER}" MATCHES "^.*/aarch64-linux-gnu-.*$") |
| 33 |
message(STATUS "Detected aarch64-linux-gnu cross-compilation") |
| 34 |
set(BROTLI_WRAPPER "qemu-aarch64") |
| 35 |
set(BROTLI_WRAPPER_LD_PREFIX "/usr/aarch64-linux-gnu") |