commit:     e0a308d54529e7cf11df4c9839024fe8187f82ee
Author:     Andrej Shadura <andrew.shadura <AT> collabora <DOT> co <DOT> uk>
AuthorDate: Tue Jul 23 15:21:07 2024 +0000
Commit:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Tue Aug  6 10:15:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0a308d5

dev-util/perf: Use cross CLANG for compiler feature verification

The build system of perf checks the clang version in order to set
correct compilation flags. However, it defaults to the non-prefixed
clang invocation, which fails during cross-compilation.

Set CLANG to point to the fully qualified host clang.
The build system will only use it if it’s actually available.

Closes: https://bugs.gentoo.org/936558
Closes: https://github.com/gentoo/gentoo/pull/37688
Signed-off-by: Andrej Shadura <andrew.shadura <AT> collabora.co.uk>
Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org>

 dev-util/perf/perf-6.10.ebuild | 1 +
 dev-util/perf/perf-6.3.ebuild  | 1 +
 dev-util/perf/perf-6.7.ebuild  | 1 +
 dev-util/perf/perf-6.8.ebuild  | 1 +
 dev-util/perf/perf-6.9.ebuild  | 1 +
 5 files changed, 5 insertions(+)

diff --git a/dev-util/perf/perf-6.10.ebuild b/dev-util/perf/perf-6.10.ebuild
index 3a49940473e4..bf643c35c209 100644
--- a/dev-util/perf/perf-6.10.ebuild
+++ b/dev-util/perf/perf-6.10.ebuild
@@ -247,6 +247,7 @@ perf_make() {
                V=1 VF=1
                HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
                CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" 
LD="${linker}" NM="$(tc-getNM)"
+               CLANG="${CHOST}-clang"
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"

diff --git a/dev-util/perf/perf-6.3.ebuild b/dev-util/perf/perf-6.3.ebuild
index 80e9fe676047..63546a59a6ca 100644
--- a/dev-util/perf/perf-6.3.ebuild
+++ b/dev-util/perf/perf-6.3.ebuild
@@ -196,6 +196,7 @@ perf_make() {
        emake V=1 VF=1 \
                HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
                CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" 
LD="$(tc-getLD)" NM="$(tc-getNM)" \
+               CLANG="${CHOST}-clang" \
                PKG_CONFIG="$(tc-getPKG_CONFIG)" \
                prefix="${EPREFIX}/usr" bindir_relative="bin" \
                tipdir="share/doc/${PF}" \

diff --git a/dev-util/perf/perf-6.7.ebuild b/dev-util/perf/perf-6.7.ebuild
index 5d0dd06b320d..f07ddebfbf7d 100644
--- a/dev-util/perf/perf-6.7.ebuild
+++ b/dev-util/perf/perf-6.7.ebuild
@@ -247,6 +247,7 @@ perf_make() {
                V=1 VF=1
                HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
                CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" 
LD="${linker}" NM="$(tc-getNM)"
+               CLANG="${CHOST}-clang"
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"

diff --git a/dev-util/perf/perf-6.8.ebuild b/dev-util/perf/perf-6.8.ebuild
index 71d7382d4545..9ebf28d8aa78 100644
--- a/dev-util/perf/perf-6.8.ebuild
+++ b/dev-util/perf/perf-6.8.ebuild
@@ -248,6 +248,7 @@ perf_make() {
                V=1 VF=1
                HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
                CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" 
LD="${linker}" NM="$(tc-getNM)"
+               CLANG="${CHOST}-clang"
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"

diff --git a/dev-util/perf/perf-6.9.ebuild b/dev-util/perf/perf-6.9.ebuild
index b371ff4a861a..e5858270dcbc 100644
--- a/dev-util/perf/perf-6.9.ebuild
+++ b/dev-util/perf/perf-6.9.ebuild
@@ -247,6 +247,7 @@ perf_make() {
                V=1 VF=1
                HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
                CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" 
LD="${linker}" NM="$(tc-getNM)"
+               CLANG="${CHOST}-clang"
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"

Reply via email to