public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Piotr Karbowski" <slashbeast@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/ryzen_smu/
Date: Sat, 29 Oct 2022 16:06:49 +0000 (UTC)	[thread overview]
Message-ID: <1667059607.9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb.slashbeast@gentoo> (raw)

commit:     9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb
Author:     Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Sat Oct 22 17:01:48 2022 +0000
Commit:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 16:06:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c1beee8

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 <AT> zegrapher.com>
Closes: https://github.com/gentoo/gentoo/pull/22143
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>

 app-admin/ryzen_smu/ryzen_smu-0.1.2_p20211205.ebuild | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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() {


             reply	other threads:[~2022-10-29 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 16:06 Piotr Karbowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-08 19:19 [gentoo-commits] repo/gentoo:master commit in: app-admin/ryzen_smu/ Arthur Zamarin
2023-12-13  8:06 Florian Schmaus
2023-12-13  8:06 Florian Schmaus
2023-12-09  7:15 Joonas Niilola
2023-12-08  9:09 Arthur Zamarin
2023-10-23  4:47 罗百科
2023-10-22 16:41 Jonas Stein
2023-07-23 19:22 Arthur Zamarin
2023-05-29 13:05 Ionen Wolkens
2023-05-29 13:05 Ionen Wolkens
2022-07-03 10:52 Agostino Sarubbo
2022-07-02 22:25 Sam James
2022-02-07 22:24 Piotr Karbowski
2021-09-14 22:04 Piotr Karbowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1667059607.9c1beee8e43ecd644bc1f7f473ea4e4a7098ceeb.slashbeast@gentoo \
    --to=slashbeast@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox