Skip to content

Commit

Permalink
Merge pull request #309 from CachyOS/sync-PKGBUILD
Browse files Browse the repository at this point in the history
PKGBUILD: Add $use_gcc_suffix
  • Loading branch information
ptr1337 authored Oct 6, 2024
2 parents a9ade2e + 8e41dfd commit 37bdc2d
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 52 deletions.
13 changes: 9 additions & 4 deletions linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -144,12 +148,13 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
13 changes: 9 additions & 4 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -144,12 +148,13 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
17 changes: 11 additions & 6 deletions linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -143,13 +147,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-deckify-lto
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
_pkgsuffix=cachyos-deckify
pkgbase="linux-$_pkgsuffix"
_pkgsuffix="cachyos-deckify-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-deckify-gcc"
else
_pkgsuffix="cachyos-deckify"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
13 changes: 9 additions & 4 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -144,12 +148,13 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
19 changes: 12 additions & 7 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -143,13 +147,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi
_pkgsuffix="cachyos-${_cpusched}-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.10
_minor=13
#_minorc=$((_minor+1))
Expand Down
17 changes: 11 additions & 6 deletions linux-cachyos-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand Down Expand Up @@ -166,13 +170,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-lts-lto
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
_pkgsuffix=cachyos-lts
pkgbase="linux-$_pkgsuffix"
_pkgsuffix="cachyos-lts-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-lts-gcc"
else
_pkgsuffix="cachyos-lts"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.6
_minor=54
#_minorc=$((_minor+1))
Expand Down
17 changes: 11 additions & 6 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -143,13 +147,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-rc-lto
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
_pkgsuffix=cachyos-rc
pkgbase="linux-$_pkgsuffix"
_pkgsuffix="cachyos-rc-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-rc-gcc"
else
_pkgsuffix="cachyos-rc"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.12
_minor=0
#_minorc=$((_minor+1))
Expand Down
13 changes: 9 additions & 4 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -144,12 +148,13 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
13 changes: 9 additions & 4 deletions linux-cachyos-sched-ext/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -144,12 +148,13 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
pkgbase="linux-$_pkgsuffix"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
17 changes: 11 additions & 6 deletions linux-cachyos-server/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# Use suffix -gcc when requested by the user
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
_use_gcc_suffix=${_use_gcc_suffix-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -143,13 +147,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-server-lto
pkgbase="linux-$_pkgsuffix"

elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then
_pkgsuffix=cachyos-server
pkgbase="linux-$_pkgsuffix"
_pkgsuffix="cachyos-server-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-server-gcc"
else
_pkgsuffix="cachyos-server"
fi

pkgbase="linux-$_pkgsuffix"
_major=6.11
_minor=2
#_minorc=$((_minor+1))
Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ _build_debug=${_build_debug-}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-lto
elif [ "$_use_llvm_lto" = "none" ] && [ -z "_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix=cachyos-gcc
else
_pkgsuffix=cachyos
Expand Down

0 comments on commit 37bdc2d

Please sign in to comment.