Skip to content

Commit

Permalink
Add patch to workaround incompatible dkms modules when building with …
Browse files Browse the repository at this point in the history
…clang

Signed-off-by: Eric Naim <[email protected]>
  • Loading branch information
1Naim committed Sep 23, 2024
1 parent ee57cfd commit c95bc63
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 110 deletions.
22 changes: 12 additions & 10 deletions linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -203,6 +193,18 @@ source=(
"${_patchsource}/misc/0001-acpi-call.patch"
"${_patchsource}/misc/0001-handheld.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -223,6 +213,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-sched-ext/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos-server/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down
22 changes: 12 additions & 10 deletions linux-cachyos/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ makedepends=(
xz
zstd
)
# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

_patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${_major}"
_nv_ver=560.35.03
Expand All @@ -200,6 +190,18 @@ source=(
"auto-cpu-optimization.sh"
"${_patchsource}/all/0001-cachyos-base-all.patch")

# LLVM makedepends
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
BUILD_FLAGS=(
CC=clang
LD=ld.lld
LLVM=1
LLVM_IAS=1
)
fi

# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
unset _build_zfs
Expand Down

0 comments on commit c95bc63

Please sign in to comment.