mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
config/arch.x86_64: updated TARGET_CPU & TARGET_FEATURES
This commit is contained in:
parent
2366034f33
commit
35d4939701
@ -1,24 +1,30 @@
|
|||||||
# determines TARGET_CPU, if not forced by user
|
# determines TARGET_CPU, if not forced by user
|
||||||
if [ -z "$TARGET_CPU" ]; then
|
if [ -z "${TARGET_CPU}" ]; then
|
||||||
TARGET_CPU=core2
|
TARGET_CPU="x86-64"
|
||||||
fi
|
|
||||||
|
|
||||||
# 64bit userland
|
|
||||||
if [ -z "${TARGET_FEATURES}" ]; then
|
|
||||||
TARGET_FEATURES="64bit"
|
|
||||||
else
|
|
||||||
TARGET_FEATURES+=" 64bit"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine architecture's family
|
# determine architecture's family
|
||||||
TARGET_SUBARCH=x86_64
|
TARGET_SUBARCH="x86_64"
|
||||||
|
|
||||||
TARGET_GCC_ARCH="${TARGET_SUBARCH/-/}"
|
TARGET_GCC_ARCH="${TARGET_SUBARCH/-/}"
|
||||||
TARGET_KERNEL_ARCH=x86
|
TARGET_KERNEL_ARCH="x86"
|
||||||
|
|
||||||
# setup ARCH specific *FLAGS
|
# setup ARCH specific *FLAGS
|
||||||
TARGET_CFLAGS="-march=$TARGET_CPU"
|
TARGET_CFLAGS="-march=${TARGET_CPU}"
|
||||||
TARGET_LDFLAGS="-march=$TARGET_CPU"
|
TARGET_LDFLAGS="-march=${TARGET_CPU}"
|
||||||
|
|
||||||
# build with SIMD support ( yes / no )
|
# build with microarchitecture feature support defined by the TARGET_CPU value
|
||||||
TARGET_FEATURES+=" mmx sse sse2"
|
# see https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/home for further details
|
||||||
|
TARGET_FEATURES="64bit cmov cx8 fpu fxsr mmx osfxsr sce sse sse2"
|
||||||
|
TARGET_FEATURES_X86_64_V2="cmpxchg16b lahf-sahf popcnt sse3 sse4_1 sse4_2 ssse3"
|
||||||
|
TARGET_FEATURES_X86_64_V3="avx avx2 bmi1 bmi2 f16c fma lzcnt movbe osxsave"
|
||||||
|
if [ "${TARGET_CPU}" = "x86-64" ]; then
|
||||||
|
TARGET_FEATURES+=" no_sahf"
|
||||||
|
elif [ "${TARGET_CPU}" = "x86-64-v2" ]; then
|
||||||
|
TARGET_FEATURES+=" ${TARGET_FEATURES_X86_64_V2}"
|
||||||
|
elif [ "${TARGET_CPU}" = "x86-64-v3" ]; then
|
||||||
|
TARGET_FEATURES+=" ${TARGET_FEATURES_X86_64_V2} ${TARGET_FEATURES_X86_64_V3}"
|
||||||
|
else
|
||||||
|
TARGET_FEATURES+=" UNKNOWN_ADDITIONAL_CPU_SPECIFIC_FEATURES"
|
||||||
|
fi
|
||||||
|
TARGET_FEATURES="$(echo ${TARGET_FEATURES} | xargs -n1 | sort -u | xargs)"
|
||||||
|
@ -6,10 +6,15 @@
|
|||||||
# generated code.
|
# generated code.
|
||||||
case $TARGET_ARCH in
|
case $TARGET_ARCH in
|
||||||
x86_64)
|
x86_64)
|
||||||
# (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3
|
# Valid TARGET_CPU values as defined at:
|
||||||
# athlon-fx amdfam10 barcelona
|
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||||
# (Intel CPUs) atom core2 nocona
|
# x86-64 A generic CPU with 64-bit extensions.
|
||||||
#
|
#
|
||||||
|
# x86-64-v2 e.g. AMD CPU - Bulldozer - (bdver1)
|
||||||
|
# Intel CPU - Nehalem - (nehalem)
|
||||||
|
#
|
||||||
|
# x86-64-v3 e.g. AMD CPU - Bulldozer GEN4 - (bdver4)
|
||||||
|
# Intel CPU - Haswell - (haswell)
|
||||||
TARGET_CPU="x86-64"
|
TARGET_CPU="x86-64"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user