Skip to content

Commit d573777

Browse files
build: cmake: fix UNICODE-escaped characters on aarch64 (#8851)
Signed-off-by: Rama Malladi <[email protected]>
1 parent 4acffc2 commit d573777

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
config:
128128
- name: "Aarch64 actuated testing"
129129
flb_option: "-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
130-
omit_option: "-DFLB_WITHOUT_flb-it-utils=1 -DFLB_WITHOUT_flb-it-pack=1"
130+
omit_option: ""
131131
global_option: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
132132
unit_test_option: "-DFLB_TESTS_INTERNAL=On"
133133
compiler: gcc

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ endif()
3030
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
3131
set(FLB_SYSTEM_LINUX On)
3232
add_definitions(-DFLB_SYSTEM_LINUX)
33+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)")
34+
set(FLB_LINUX_ON_AARCH64 On)
35+
add_definitions(-DFLB_LINUX_ON_AARCH64)
36+
endif()
3337
endif()
3438

3539
# Update CFLAGS
@@ -317,6 +321,12 @@ if (FLB_SYSTEM_LINUX)
317321
include(cmake/s390x.cmake)
318322
endif ()
319323

324+
# Enable signed char support on Linux AARCH64 if specified
325+
if (FLB_LINUX_ON_AARCH64)
326+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
327+
message(STATUS "Enabling signed char")
328+
endif()
329+
320330
# Extract Git commit information for debug output.
321331
# 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.
322332
# For a better solution see https://jonathanhamberg.com/post/cmake-embedding-git-hash/ but this is simple and easy.

0 commit comments

Comments
 (0)