File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
.github/workflows/release Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,15 @@ elif [[ ${OS} =~ "centos" ]]; then
5959 export PATH=" /opt/rh/devtoolset-7/root/usr/bin:$PATH "
6060 PACKAGE_RELEASE=" -DPACKAGE_RELEASE=${RELEASE_NO} .el7"
6161 COMPILER=" -DCMAKE_C_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++"
62+ /opt/rh/devtoolset-7/root/usr/bin/gcc --version
63+ /opt/rh/devtoolset-7/root/usr/bin/g++ --version
6264 elif [[ ${OS} == " centos:8" ]]; then
6365 rm -rf /etc/yum.repos.d/* && curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
64- yum install -y gcc gcc-c++
66+
67+ yum install -y gcc-toolset-9-gcc gcc-toolset-9-gcc-c++
68+ COMPILER=" -DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-9/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-9/root/usr/bin/g++"
69+ /opt/rh/gcc-toolset-9/root/usr/bin/gcc --version
70+ /opt/rh/gcc-toolset-9/root/usr/bin/g++ --version
6571
6672 PACKAGE_RELEASE=" -DPACKAGE_RELEASE=${RELEASE_NO} .el8"
6773 fi
Original file line number Diff line number Diff line change 66)
77enable_language (C)
88
9+ set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" )
10+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -g" )
11+
912# Get CPU arch
1013execute_process (COMMAND uname -m OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
1114if (NOT (${ARCH} STREQUAL x86_64) AND NOT (${ARCH} STREQUAL aarch64) AND NOT (${ARCH} STREQUAL arm64))
@@ -23,7 +26,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -Wall -Werror=sign-compare")
2326set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -Wall -Werror=sign-compare -DOVERLAYBD_VER=${OBD_VER} " )
2427
2528if (${ARCH} STREQUAL aarch64)
26- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char" )
29+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc - fsigned-char -fno-stack-protector -fomit-frame-pointer " )
2730endif ()
2831
2932set (CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc ${CMAKE_CXX_STANDARD_LIBRARIES} " )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ target_include_directories(crc32_lib PUBLIC
1717if (${ARCH} STREQUAL x86_64)
1818 target_compile_options (crc32_lib PUBLIC -msse4.2 -mcrc32)
1919else ()
20- target_compile_options (crc32_lib PUBLIC -march=native -mcpu=generic+crc)
20+ target_compile_options (crc32_lib PRIVATE -march=native -mcpu=generic+crc)
2121endif ()
2222
2323if (ENABLE_DSA OR ENABLE_ISAL)
You can’t perform that action at this time.
0 commit comments