diff --git a/CMakeLists.txt b/CMakeLists.txt index fc6b8e702f8..2879659cb62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -400,6 +400,11 @@ if (FLB_SYSTEM_MACOS) include(cmake/macos-setup.cmake) endif() +# Build for SystemZ - s390x arch +if (FLB_SYSTEM_LINUX) + include(cmake/s390x.cmake) +endif () + # Extract Git commit information for debug output. # Note that this is only set when cmake is run, the intent here is to use in CI for verification of releases so is acceptable. # For a better solution see https://jonathanhamberg.com/post/cmake-embedding-git-hash/ but this is simple and easy. diff --git a/cmake/s390x.cmake b/cmake/s390x.cmake new file mode 100644 index 00000000000..a570319c240 --- /dev/null +++ b/cmake/s390x.cmake @@ -0,0 +1,6 @@ +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(SystemZ|s390x)") + message(STATUS "Forcing characters to be signed, as on x86_64.") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char") + message(STATUS "Cannot build WAMR on this platform, so WASM support is disabled.") + set(FLB_WASM OFF) +endif ()