From cb78470af1e556ad2a41e4d9f572d07c3f5d359e Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Mon, 18 Aug 2025 08:40:04 -0500 Subject: [PATCH] add -fPIC to all builds --- lib/build.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/build.sh b/lib/build.sh index 9062e9f..223c1af 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -109,13 +109,10 @@ set_compile_opts() { if [[ ${HOSTTYPE} == "x86_64" ]]; then arch_flags+=("-march=${CPU}") elif [[ ${HOSTTYPE} == "aarch64" ]]; then - arch_flags+=( - "-mcpu=${CPU}" - "-fPIC" - ) + arch_flags+=("-mcpu=${CPU}") fi - C_FLAGS+=("${arch_flags[@]}") + C_FLAGS+=("${arch_flags[@]}" "-fPIC") CXX_FLAGS=("${C_FLAGS[@]}") CPP_FLAGS=("${C_FLAGS[@]}") RUSTFLAGS+=("-C target-cpu=${CPU}")