summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD11
1 files changed, 10 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bbccf0e98e16..3a1b29b014e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -63,7 +63,16 @@ _localmodcfg=
# 39. Generic-x86-64-v4 (GENERIC_CPU4) (NEW)
# 40. Intel-Native optimizations autodetected by GCC (MNATIVE_INTEL) (NEW)
# 41. AMD-Native optimizations autodetected by GCC (MNATIVE_AMD) (NEW)
-_subarch=36
+if [ -z ${_subarch+x} ]; then
+ cpu=`grep vendor_id /proc/cpuinfo | awk -F: '{print $2}' | tail -1`
+ if [ $cpu == 'GenuineIntel' ]; then
+ _subarch=40
+ elif [ $cpu == 'AuthenticAMD' ]; then
+ _subarch=41
+ else
+ _subarch=36
+ fi
+fi
### IMPORTANT: Do no edit below this line unless you know what you're doing