summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdel KARA SLIMANE <adel.ks@zegrapher.com>2022-10-22 19:01:48 +0200
committerPiotr Karbowski <slashbeast@gentoo.org>2022-10-29 18:06:47 +0200
commit9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb (patch)
treeab953b3782769c8b652cd8d522ad9a701c384a53 /app-admin/ryzen_smu
parentsys-devel/gcc: Restore mips keyword, can't reproduce the problem with it (diff)
downloadgentoo-9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb.tar.gz
gentoo-9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb.tar.bz2
gentoo-9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb.zip
app-admin/ryzen_smu: handle clang built kernels OOTB
If the kernel has been built with a different version of clang than the default one, the emerge will fail as expected. Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com> Closes: https://github.com/gentoo/gentoo/pull/22143 Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
Diffstat (limited to 'app-admin/ryzen_smu')
-rw-r--r--app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild b/app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild
index aa763072c39c..96e15892d055 100644
--- a/app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild
+++ b/app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild
@@ -26,7 +26,17 @@ pkg_setup() {
linux-mod_pkg_setup
BUILD_TARGETS="modules"
- BUILD_PARAMS="CC=$(tc-getCC) KERNEL_BUILD=${KERNEL_DIR}"
+ BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
+ if linux_chkconfig_present CC_IS_CLANG; then
+ BUILD_PARAMS+=" CC=${CHOST}-clang"
+ if linux_chkconfig_present LD_IS_LLD; then
+ BUILD_PARAMS+=' LD=ld.lld'
+ if linux_chkconfig_present LTO_CLANG_THIN; then
+ # kernel enables cache by default leading to sandbox violations
+ BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
+ fi
+ fi
+ fi
}
src_install() {