diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 94bf9596..a9dbd6dd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -19,7 +19,7 @@ jobs: matrix: config: - {arch: x86_64, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"} - - {arch: aarch64, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"} + - {arch: aarch64, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"} steps: - name: Setup Alpine Linux @@ -246,8 +246,8 @@ jobs: strategy: matrix: config: - - {os: ubuntu-20.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections"} - - {os: ubuntu-22.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections"} + - {os: ubuntu-20.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"} + - {os: ubuntu-22.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"} steps: - name: Install dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index 61864c64..2a705e43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -359,3 +359,11 @@ if (STATIC_BINARY OR STATIC_LIBS) else() target_link_libraries(${CMAKE_PROJECT_NAME} debug ${ZMQ_LIBRARY_DEBUG} debug ${UV_LIBRARY_DEBUG} debug ${CURL_LIBRARY_DEBUG} optimized ${ZMQ_LIBRARY} optimized ${UV_LIBRARY} optimized ${CURL_LIBRARY} ${LIBS}) endif() + +message(STATUS "Summary of build options: + Target system: ${CMAKE_SYSTEM_NAME} (${CMAKE_SYSTEM_PROCESSOR}) + C compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID}) + CXX compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_ID}) + C_FLAGS: ${CMAKE_C_FLAGS} + CXX_FLAGS: ${CMAKE_CXX_FLAGS} +") diff --git a/cmake/flags.cmake b/cmake/flags.cmake index bd2c59e8..f4c9f3aa 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -8,6 +8,10 @@ set(CMAKE_C_STANDARD_REQUIRED ON) if (CMAKE_CXX_COMPILER_ID MATCHES GNU) set(GENERAL_FLAGS "-pthread") + if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv8-a)$") + set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769 -mfix-cortex-a53-843419") + endif() + if (DEV_WITH_TSAN) set(GENERAL_FLAGS "${GENERAL_FLAGS} -fno-omit-frame-pointer -fsanitize=thread") endif()