From 7c65adb21b318895a2fbf726eff371bd26670251 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 21 Oct 2024 10:45:25 +0300 Subject: [PATCH] Use specific compiler flags for ARM64 Signed-off-by: Martin Tzvetanov Grigorov --- recipes/centrifuge-core/build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/centrifuge-core/build.sh b/recipes/centrifuge-core/build.sh index 0a82cdd89c045f..73f452132276d3 100644 --- a/recipes/centrifuge-core/build.sh +++ b/recipes/centrifuge-core/build.sh @@ -7,9 +7,18 @@ export CPATH=${PREFIX}/include mkdir -p $PREFIX/bin +case $(uname -m) in + aarch64 | arm64) + ARCH_FLAGS="POPCNT_CAPABILITY=0 RELEASE_FLAGS=\"${CXXFLAGS} -fsigned-char\"" + ;; + *) + ARCH_FLAGS="RELEASE_FLAGS=\"${CXXFLAGS}\"" + ;; +esac + sed "/^GCC/d;/^CC =/d;/^CPP =/d;/^CXX =/d" < Makefile > Makefile.new mv Makefile.new Makefile cat Makefile -make -j"${CPU_COUNT}" CC=$CC CXX=$CXX RELEASE_FLAGS="$CXXFLAGS" +make -j"${CPU_COUNT}" CC=$CC CXX=$CXX "${ARCH_FLAGS[@]}" make install prefix=$PREFIX