Skip to content

Commit

Permalink
Use specific compiler flags for ARM64
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Oct 21, 2024
1 parent 559e3d8 commit 7c65adb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion recipes/centrifuge-core/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7c65adb

Please sign in to comment.