Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/
Date: Wed, 06 Jul 2022 08:06:49
Message-Id: 1657094797.e70a893ff6e26d0259ef64ca9293aeaaa4481b0a.sam@gentoo
1 commit: e70a893ff6e26d0259ef64ca9293aeaaa4481b0a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 6 08:06:16 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 6 08:06:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e70a893f
7
8 app-emulation/virtualbox: respect CC and other toolchain env. variables
9
10 No comment.
11
12 Closes: https://bugs.gentoo.org/856664
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 .../virtualbox/virtualbox-6.1.34-r4.ebuild | 66 ++++++++++++++++++----
16 1 file changed, 55 insertions(+), 11 deletions(-)
17
18 diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r4.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r4.ebuild
19 index 7eb42e9cf9ea..55a9c26de27a 100644
20 --- a/app-emulation/virtualbox/virtualbox-6.1.34-r4.ebuild
21 +++ b/app-emulation/virtualbox/virtualbox-6.1.34-r4.ebuild
22 @@ -256,7 +256,8 @@ src_prepare() {
23
24 src_configure() {
25 tc-ld-disable-gold # bug #488176
26 - tc-export CC CXX LD AR RANLIB
27 +
28 + tc-export AR CC CXX LD RANLIB
29 export HOST_CC="$(tc-getBUILD_CC)"
30
31 local myconf=(
32 @@ -345,16 +346,59 @@ src_compile() {
33 MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
34 MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
35
36 - MAKE="kmk" emake \
37 - VBOX_BUILD_PUBLISHER=_Gentoo \
38 - TOOL_GXX3_CC="$(tc-getCC)" \
39 - TOOL_GXX3_CXX="$(tc-getCXX)" \
40 - TOOL_GXX3_LD="$(tc-getCXX)" \
41 - VBOX_GCC_OPT="${CXXFLAGS}" \
42 - TOOL_YASM_AS=yasm \
43 - KBUILD_VERBOSE=2 \
44 - VBOX_WITH_VBOXIMGMOUNT=1 \
45 - all
46 + local myemakeargs=(
47 + VBOX_BUILD_PUBLISHER=_Gentoo
48 + VBOX_WITH_VBOXIMGMOUNT=1
49 +
50 + KBUILD_VERBOSE=2
51 +
52 + AS="$(tc-getCC)"
53 + CC="$(tc-getCC)"
54 + CXX="$(tc-getCXX)"
55 +
56 + TOOL_GCC3_CC="$(tc-getCC)"
57 + TOOL_GCC3_LD="$(tc-getCC)"
58 + TOOL_GCC3_AS="$(tc-getCC)"
59 + TOOL_GCC3_AR="$(tc-getAR)"
60 + TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
61 +
62 + TOOL_GXX3_CC="$(tc-getCC)"
63 + TOOL_GXX3_CXX="$(tc-getCXX)"
64 + TOOL_GXX3_LD="$(tc-getCXX)"
65 + TOOL_GXX3_AS="$(tc-getCXX)"
66 + TOOL_GXX3_AR="$(tc-getAR)"
67 + TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
68 +
69 + TOOL_GCC3_CFLAGS="${CFLAGS}"
70 + TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
71 + VBOX_GCC_OPT="${CXXFLAGS}"
72 + VBOX_NM="$(tc-getNM)"
73 +
74 + TOOL_YASM_AS=yasm
75 + )
76 +
77 + if use amd64 && has_multilib_profile ; then
78 + myemakeargs+=(
79 + CC32="$(tc-getCC) -m32"
80 + CXX32="$(tc-getCXX) -m32"
81 +
82 + TOOL_GCC32_CC="$(tc-getCC) -m32"
83 + TOOL_GCC32_CXX="$(tc-getCXX) -m32"
84 + TOOL_GCC32_LD="$(tc-getCC) -m32"
85 + TOOL_GCC32_AS="$(tc-getCC) -m32"
86 + TOOL_GCC32_AR="$(tc-getAR)"
87 + TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
88 +
89 + TOOL_GXX32_CC="$(tc-getCC) -m32"
90 + TOOL_GXX32_CXX="$(tc-getCXX) -m32"
91 + TOOL_GXX32_LD="$(tc-getCXX) -m32"
92 + TOOL_GXX32_AS="$(tc-getCXX) -m32"
93 + TOOL_GXX32_AR="$(tc-getAR)"
94 + TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
95 + )
96 + fi
97 +
98 + MAKE="kmk" emake "${myemakeargs[@]}" all
99 }
100
101 src_install() {