Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/
Date: Tue, 03 Jan 2023 08:55:59
Message-Id: 1672736061.ecbd50481557ed916cd5f68d21acd2404d54fc24.chewi@gentoo
1 commit: ecbd50481557ed916cd5f68d21acd2404d54fc24
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 22:42:23 2023 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 08:54:21 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecbd5048
7
8 sys-devel/llvm: Fix cross-compiling by applying the build environment
9
10 When you cross-compile LLVM, it invokes CMake a second time during src_compile
11 to perform a "native" build. This invocation does not make use of a toolchain
12 file and relies on environment variables such as CC and CXX to determine the
13 compiler instead. These will often point to the cross-compiler rather than the
14 native/build compiler, leading to a failure when it tries to link the build
15 system's libzstd. The toolchain file provided in src_configure sets up the
16 cross-compiler as necessary, so there is no harm in pointing CC and friends to
17 the native/build compiler during src_compile.
18
19 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
20
21 sys-devel/llvm/llvm-15.0.6.9999.ebuild | 2 +-
22 sys-devel/llvm/llvm-15.0.6.ebuild | 2 +-
23 sys-devel/llvm/llvm-16.0.0.9999.ebuild | 2 +-
24 sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild | 2 +-
25 sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild | 2 +-
26 sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild | 2 +-
27 6 files changed, 6 insertions(+), 6 deletions(-)
28
29 diff --git a/sys-devel/llvm/llvm-15.0.6.9999.ebuild b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
30 index 8f078936032b..da0c1604bb7f 100644
31 --- a/sys-devel/llvm/llvm-15.0.6.9999.ebuild
32 +++ b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
33 @@ -452,7 +452,7 @@ multilib_src_configure() {
34 }
35
36 multilib_src_compile() {
37 - cmake_build distribution
38 + tc-env_build cmake_build distribution
39
40 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
41 pax-mark m "${BUILD_DIR}"/bin/lli
42
43 diff --git a/sys-devel/llvm/llvm-15.0.6.ebuild b/sys-devel/llvm/llvm-15.0.6.ebuild
44 index a0f90b636940..ea6bf123f308 100644
45 --- a/sys-devel/llvm/llvm-15.0.6.ebuild
46 +++ b/sys-devel/llvm/llvm-15.0.6.ebuild
47 @@ -452,7 +452,7 @@ multilib_src_configure() {
48 }
49
50 multilib_src_compile() {
51 - cmake_build distribution
52 + tc-env_build cmake_build distribution
53
54 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
55 pax-mark m "${BUILD_DIR}"/bin/lli
56
57 diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
58 index 5f54f11fe7fe..38faaf5b1adf 100644
59 --- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild
60 +++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
61 @@ -455,7 +455,7 @@ multilib_src_configure() {
62 }
63
64 multilib_src_compile() {
65 - cmake_build distribution
66 + tc-env_build cmake_build distribution
67
68 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
69 pax-mark m "${BUILD_DIR}"/bin/lli
70
71 diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
72 index 9b5f96110a1f..9a91d21695fd 100644
73 --- a/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
74 +++ b/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
75 @@ -455,7 +455,7 @@ multilib_src_configure() {
76 }
77
78 multilib_src_compile() {
79 - cmake_build distribution
80 + tc-env_build cmake_build distribution
81
82 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
83 pax-mark m "${BUILD_DIR}"/bin/lli
84
85 diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
86 index 9b5f96110a1f..9a91d21695fd 100644
87 --- a/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
88 +++ b/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
89 @@ -455,7 +455,7 @@ multilib_src_configure() {
90 }
91
92 multilib_src_compile() {
93 - cmake_build distribution
94 + tc-env_build cmake_build distribution
95
96 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
97 pax-mark m "${BUILD_DIR}"/bin/lli
98
99 diff --git a/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
100 index ecc7df9944c0..4798e7ef1858 100644
101 --- a/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
102 +++ b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
103 @@ -455,7 +455,7 @@ multilib_src_configure() {
104 }
105
106 multilib_src_compile() {
107 - cmake_build distribution
108 + tc-env_build cmake_build distribution
109
110 pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
111 pax-mark m "${BUILD_DIR}"/bin/lli