add -fPIC to all builds

This commit is contained in:
2025-08-18 08:40:04 -05:00
parent f3ff751430
commit cb78470af1

View File

@@ -109,13 +109,10 @@ set_compile_opts() {
if [[ ${HOSTTYPE} == "x86_64" ]]; then if [[ ${HOSTTYPE} == "x86_64" ]]; then
arch_flags+=("-march=${CPU}") arch_flags+=("-march=${CPU}")
elif [[ ${HOSTTYPE} == "aarch64" ]]; then elif [[ ${HOSTTYPE} == "aarch64" ]]; then
arch_flags+=( arch_flags+=("-mcpu=${CPU}")
"-mcpu=${CPU}"
"-fPIC"
)
fi fi
C_FLAGS+=("${arch_flags[@]}") C_FLAGS+=("${arch_flags[@]}" "-fPIC")
CXX_FLAGS=("${C_FLAGS[@]}") CXX_FLAGS=("${C_FLAGS[@]}")
CPP_FLAGS=("${C_FLAGS[@]}") CPP_FLAGS=("${C_FLAGS[@]}")
RUSTFLAGS+=("-C target-cpu=${CPU}") RUSTFLAGS+=("-C target-cpu=${CPU}")