-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure_flags.sh
executable file
·30 lines (25 loc) · 1006 Bytes
/
configure_flags.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
CPU=$1
if [ "${CPU}" = "arm1176jzf-s" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=. -mcpu=${CPU} -mfpu=vfp -mfloat-abi=hard"
elif [ "${CPU}" = "cortex-a53" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=. -mcpu=${CPU} -mfpu=neon-fp-armv8 -mfloat-abi=hard"
elif [ "${CPU}" = "cortex-a7" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=. -mcpu=${CPU} -mfpu=neon-vfpv4 -mfloat-abi=hard"
elif [ "${CPU}" = "cortex-a72" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=. -mcpu=${CPU} -mfpu=neon-fp-armv8 -mfloat-abi=hard"
elif [ "${CPU}" = "generic" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=."
elif [ "${CPU}" = "nocpuspecific" ]; then
export CXXFLAGS="-g -O2 -fdebug-prefix-map=$(pwd)=."
else
echo "unknown core: ${CPU}"
exit 1
fi
if [[ "${CPU}" = "nocpuspecific" ]]; then
export BUCKET=r2cloud
else
export BUCKET="r2cloud/cpu-${CPU}"
fi
export ASMFLAGS="${CXXFLAGS} -mthumb"
export CFLAGS=${CXXFLAGS}