diff options
author | antman666 | 2021-08-05 14:53:14 +0800 |
---|---|---|
committer | antman666 | 2021-08-05 14:53:14 +0800 |
commit | cde8041f5b3eb4da35b2e3000db5e958e80666cd (patch) | |
tree | 230b547bbc02a2bef77a66f493693fd4de2d2fec | |
parent | 45b2aeb2688f0e7ddfa49555546343a3c8ab45b9 (diff) | |
download | aur-cde8041f5b3eb4da35b2e3000db5e958e80666cd.tar.gz |
set native automatically
-rw-r--r-- | PKGBUILD | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |