diff options
author | Joan Figueras | 2022-10-16 20:57:16 +0200 |
---|---|---|
committer | Joan Figueras | 2022-10-16 20:57:16 +0200 |
commit | e6566526b6096a7f0a1d57990f78ba708643b95f (patch) | |
tree | 2d133dc5831afa9d99b4769ac0953110c53d1369 /choose-gcc-optimization.sh | |
parent | b615b6db3da64fd6f72e71220c977796f317c355 (diff) | |
download | aur-e6566526b6096a7f0a1d57990f78ba708643b95f.tar.gz |
Added again clang optional compilation. Simplify makes.
Diffstat (limited to 'choose-gcc-optimization.sh')
-rwxr-xr-x | choose-gcc-optimization.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/choose-gcc-optimization.sh b/choose-gcc-optimization.sh index f10eec54b81d..fe05516c66c6 100755 --- a/choose-gcc-optimization.sh +++ b/choose-gcc-optimization.sh @@ -66,7 +66,7 @@ cat << EOF 98) Intel-Native optimizations autodetected by GCC 99) AMD-Native optimizations autodetected by GCC - 0) Generic (default) + 0) Generic x64-v1 (default) EOF @@ -133,7 +133,16 @@ warning "According to PKGBUILD variable _microarchitecture, your choice is $answ msg "Building this package for microarchitecture: $Microarchitecture$default" sleep 5 +_defaultmicro=$(grep ^CONFIG_LOCALVERSION .config) +if [ -z "${default}" ]; then + _localversion=$(echo ${Microarchitecture,,} | sed -e 's/config_m/-/g' -e 's/config_generic_cpu/-x64v/g') + sed -e "s|^$_defaultmicro|CONFIG_LOCALVERSION=\"$_localversion\"|g" -i .config +fi + sed -e 's|^CONFIG_GENERIC_CPU=y|# CONFIG_GENERIC_CPU is not set|g' -i .config +sed -e 's|^CONFIG_GENERIC_CPU2=y|# CONFIG_GENERIC_CPU2 is not set|g' -i .config +sed -e 's|^CONFIG_GENERIC_CPU3=y|# CONFIG_GENERIC_CPU3 is not set|g' -i .config +sed -e 's|^CONFIG_GENERIC_CPU4=y|# CONFIG_GENERIC_CPU4 is not set|g' -i .config sed -e "s|^# $Microarchitecture is not set|$Microarchitecture=y|g" -i .config echo |