Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKGBUILD: Make LTO a hard dependency when building with clang #354

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
Expand Down Expand Up @@ -199,7 +199,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
Expand Down Expand Up @@ -199,7 +199,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-deckify-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-deckify-gcc"
else
_pkgsuffix="cachyos-deckify"
Expand Down Expand Up @@ -201,7 +201,7 @@ source=(
"${_patchsource}/misc/0001-handheld.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
Expand Down Expand Up @@ -199,7 +199,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ _autofdo_profile_name=${_autofdo_profile_name-}


# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ] || [ -n "$_autofdo" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-rc-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-rc-gcc"
else
_pkgsuffix="cachyos-rc"
Expand Down Expand Up @@ -212,7 +212,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-${_cpusched}-gcc"
else
_pkgsuffix="cachyos-${_cpusched}"
Expand Down Expand Up @@ -199,7 +199,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos-server/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ _build_nvidia_open=${_build_nvidia_open-}
_build_debug=${_build_debug-}

# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix="cachyos-server-lto"
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix="cachyos-server-gcc"
else
_pkgsuffix="cachyos-server"
Expand Down Expand Up @@ -199,7 +199,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
10 changes: 5 additions & 5 deletions linux-cachyos/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ _autofdo_profile_name=${_autofdo_profile_name-}


# ATTENTION: Do not modify after this line
_is_clang_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ] || [ -n "$_autofdo" ]
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
return $?
}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
if _is_lto_kernel && [ "$_use_lto_suffix" = "y" ]; then
_pkgsuffix=cachyos-lto
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
elif ! _is_lto_kernel && [ "$_use_gcc_suffix" = "y" ]; then
_pkgsuffix=cachyos-gcc
else
_pkgsuffix=cachyos
Expand Down Expand Up @@ -212,7 +212,7 @@ source=(
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if _is_clang_kernel; then
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
Expand Down
Loading