Skip to content

Commit

Permalink
Disable deprecated generic_v* _cpu_marchs entries on newer graysky2 p…
Browse files Browse the repository at this point in the history
…atches

Following 97227dc

#1002
  • Loading branch information
Tk-Glitch committed Sep 14, 2024
1 parent 97227dc commit 659445d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions customization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ _compileroptlevel="1"
# - "generic" (kernel's default - to share the package between machines with different CPU µarch as long as they are x86-64)
#
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_Levels)
# - "amd_cpu_v2" (depends on GCC11+ / CLANG12+ - to share the package between machines with different AMD CPU µarch supporting at least x86-64-v2
# - "amd_cpu_v3" (depends on GCC11+ / CLANG12+ - to share the package between machines with different AMD CPU µarch supporting at least x86-64-v3
# - "amd_cpu_v4" (depends on GCC11+ / CLANG12+ - to share the package between machines with different AMD CPU µarch supporting at least x86-64-v4
# - "intel_cpu_v2" (depends on GCC11+ / CLANG12+ - to share the package between machines with different Intel CPU µarch supporting at least x86-64-v2
# - "intel_cpu_v3" (depends on GCC11+ / CLANG12+ - to share the package between machines with different Intel CPU µarch supporting at least x86-64-v3
# - "intel_cpu_v4" (depends on GCC11+ / CLANG12+ - to share the package between machines with different Intel CPU µarch supporting at least x86-64-v4
# **LEGACY options - deprecated on current trees**
# - "generic_v2" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v2
# - "generic_v3" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v3
# - "generic_v4" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v4
Expand Down
14 changes: 11 additions & 3 deletions linux-tkg-config/prepare
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,9 @@ _tkg_srcprep() {
tkgpatch="${_patch_location}/${_patch_name}.patch"
if [ -e "$tkgpatch" ]; then
_msg="Applying graysky's cpu opts patch" && _tkg_patcher
if grep -wq "MINTEL_CPU_V4" "$tkgpatch"; then
_graysky_legacy="false"
fi
else
msg2 "Couldn't find graysky's cpu opts patch for this version"
fi
Expand Down Expand Up @@ -1048,8 +1051,13 @@ _tkg_srcprep() {
fi

# cpu opt
_cpu_marchs=("native_amd" "amd_cpu_v2" "amd_cpu_v3" "amd_cpu_v4" "native_intel" "intel_cpu_v2" "intel_cpu_v3" "intel_cpu_v4")
_cpu_marchs+=("generic_cpu" "generic_cpu2" "generic_cpu3" "generic_cpu4")
_cpu_marchs=("generic_cpu")
if [ "$_graysky_legacy" = "false" ]; then
_cpu_marchs+=("amd_cpu_v2" "amd_cpu_v3" "amd_cpu_v4" "intel_cpu_v2" "intel_cpu_v3" "intel_cpu_v4")
else
_cpu_marchs+=("generic_cpu2" "generic_cpu3" "generic_cpu4")
fi
_cpu_marchs+=("native_amd" "native_intel")
_cpu_marchs+=("k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver")
_cpu_marchs+=("steamroller" "excavator" "zen" "zen2" "zen3" "zen4" "mpsc" "atom" "core2" "nehalem" "westmere")
_cpu_marchs+=("bonnell" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake")
Expand All @@ -1076,7 +1084,7 @@ _tkg_srcprep() {

if [ -z "$_processor_opt" ]; then
msg2 "Please select the desired CPU micro-architecture"
_default_index="8"
_default_index="0"
_prompt_from_array "${_cpu_marchs[@]}"
_processor_opt="${_selected_value}"
fi
Expand Down

0 comments on commit 659445d

Please sign in to comment.