Skip to content

Commit

Permalink
cmake: fix UNICODE-escaped characters on aarch64
Browse files Browse the repository at this point in the history
Signed-off-by: Rama Malladi <[email protected]>
  • Loading branch information
RamaMalladiAWS committed Sep 12, 2024
1 parent 58c1330 commit 9d75cf4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
config:
- name: "Aarch64 actuated testing"
flb_option: "-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
omit_option: "-DFLB_WITHOUT_flb-it-utils=1 -DFLB_WITHOUT_flb-it-pack=1"
omit_option: ""
global_option: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
unit_test_option: "-DFLB_TESTS_INTERNAL=On"
compiler: gcc
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(FLB_SYSTEM_LINUX On)
add_definitions(-DFLB_SYSTEM_LINUX)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)")
set(FLB_LINUX_ON_AARCH64 On)
add_definitions(-DFLB_LINUX_ON_AARCH64)
endif()
endif()

# Update CFLAGS
Expand Down Expand Up @@ -301,6 +305,12 @@ if (FLB_SYSTEM_LINUX)
include(cmake/s390x.cmake)
endif ()

# Enable signed char support on Linux AARCH64 if specified
if (FLB_LINUX_ON_AARCH64)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
message(STATUS "Enabling signed char")
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.
Expand Down

0 comments on commit 9d75cf4

Please sign in to comment.