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 (#300)

Signed-off-by: Eric Naim <[email protected]>
  • Loading branch information
1Naim authored Sep 23, 2024
1 parent ee57cfd commit 93d051f
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 128 deletions.
2 changes: 1 addition & 1 deletion linux-cachyos-bmq/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-bmq
pkgdesc = Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.11.0
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=1
pkgrel=2
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
2 changes: 1 addition & 1 deletion linux-cachyos-bore/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-bore
pkgdesc = Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.11.0
pkgrel = 4
pkgrel = 5
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=4
pkgrel=5
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
2 changes: 1 addition & 1 deletion linux-cachyos-deckify/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-deckify
pkgdesc = Linux SCHED-EXT + Cachy Sauce + BORE + Deckify Patches Kernel by CachyOS with other patches and improvements
pkgver = 6.11.0
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux SCHED-EXT + Cachy Sauce + BORE + Deckify Patches Kernel by CachyOS with other patches and improvements'
pkgrel=1
pkgrel=2
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
2 changes: 1 addition & 1 deletion linux-cachyos-eevdf/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-eevdf
pkgdesc = Linux EEVDF scheduler + Cachy Sauce Kernel by CachyOS with other patches and improvements
pkgver = 6.11.0
pkgrel = 4
pkgrel = 5
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux EEVDF scheduler + Cachy Sauce Kernel by CachyOS with other patches and improvements'
pkgrel=4
pkgrel=5
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
2 changes: 1 addition & 1 deletion linux-cachyos-hardened/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-hardened
pkgdesc = Linux BORE scheduler and hardened Kernel by CachyOS with other patches and improvements
pkgver = 6.10.10
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE scheduler and hardened Kernel by CachyOS with other patches and improvements'
pkgrel=1
pkgrel=2
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
2 changes: 1 addition & 1 deletion linux-cachyos-rt-bore/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-rt-bore
pkgdesc = Linux BORE-RT + Cachy Sauce Kernel by CachyOS with other patches and improvements
pkgver = 6.11.0
pkgrel = 4
pkgrel = 5
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _stable=${_major}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE-RT + Cachy Sauce Kernel by CachyOS with other patches and improvements'
pkgrel=4
pkgrel=5
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand All @@ -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
Loading

0 comments on commit 93d051f

Please sign in to comment.