1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-23 12:06:18 +00:00
Lakka-LibreELEC/config/arch.x86_64
Ian Leonard e6cade60d9 buildsystem: remove march and mcpu from LDFLAGS
march and mcpu were added in ~2011. I don't know why. I have seen CFLAGS added
en masse to LDFLAGS when using LTO, but that does not explain these inclusions.

Remove to cleanup LDFLAGS.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2022-09-14 22:36:16 +00:00

31 lines
1.1 KiB
Plaintext

# determines TARGET_CPU, if not forced by user
if [ -z "${TARGET_CPU}" ]; then
TARGET_CPU="x86-64"
fi
# determine architecture's family
TARGET_SUBARCH="x86_64"
TARGET_GCC_ARCH="${TARGET_SUBARCH/-/}"
TARGET_KERNEL_ARCH="x86"
# setup ARCH specific *FLAGS
TARGET_CFLAGS="-march=${TARGET_CPU}"
TARGET_LDFLAGS=""
# build with microarchitecture feature support defined by the TARGET_CPU value
# 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)"