1 |
commit: bdc76112c33f0cc7606a88be8e3d4c7498b29cc7 |
2 |
Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com> |
3 |
AuthorDate: Fri Jan 14 17:42:24 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 14 18:47:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdc76112 |
7 |
|
8 |
sys-devel/gdb: fix GCC/Clang build mixture |
9 |
|
10 |
GDB configure will use a mix of GCC and Clang due to |
11 |
$GCC_FOR_TARGET defaulting to GCC in Clang-configured |
12 |
builds, so set the var to ensure the proper compilers |
13 |
are detected and to avoid mixing them. |
14 |
|
15 |
Before setting the variable (example from ChromiumOS): |
16 |
checking for x86_64-cros-linux-gnu-gcc... x86_64-cros-linux-gnu-gcc |
17 |
|
18 |
After: |
19 |
checking for gcc... (cached) x86_64-cros-linux-gnu-clang |
20 |
|
21 |
Bug: https://bugs.gentoo.org/831202 |
22 |
Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com> |
23 |
Closes: https://github.com/gentoo/gentoo/pull/23796 |
24 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
25 |
|
26 |
sys-devel/gdb/gdb-10.2-r1.ebuild | 3 +++ |
27 |
sys-devel/gdb/gdb-11.1.ebuild | 3 +++ |
28 |
sys-devel/gdb/gdb-9999.ebuild | 3 +++ |
29 |
3 files changed, 9 insertions(+) |
30 |
|
31 |
diff --git a/sys-devel/gdb/gdb-10.2-r1.ebuild b/sys-devel/gdb/gdb-10.2-r1.ebuild |
32 |
index 1978ab28268d..19f08197ce03 100644 |
33 |
--- a/sys-devel/gdb/gdb-10.2-r1.ebuild |
34 |
+++ b/sys-devel/gdb/gdb-10.2-r1.ebuild |
35 |
@@ -188,6 +188,9 @@ src_configure() { |
36 |
# source-highlight is detected with pkg-config: bug #716558 |
37 |
export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" |
38 |
|
39 |
+ # ensure proper compiler is detected for Clang builds: bug #831202 |
40 |
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" |
41 |
+ |
42 |
econf "${myconf[@]}" |
43 |
} |
44 |
|
45 |
|
46 |
diff --git a/sys-devel/gdb/gdb-11.1.ebuild b/sys-devel/gdb/gdb-11.1.ebuild |
47 |
index 022f3be33ce7..3933cc2776b8 100644 |
48 |
--- a/sys-devel/gdb/gdb-11.1.ebuild |
49 |
+++ b/sys-devel/gdb/gdb-11.1.ebuild |
50 |
@@ -193,6 +193,9 @@ src_configure() { |
51 |
# source-highlight is detected with pkg-config: bug #716558 |
52 |
export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" |
53 |
|
54 |
+ # ensure proper compiler is detected for Clang builds: bug #831202 |
55 |
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" |
56 |
+ |
57 |
econf "${myconf[@]}" |
58 |
} |
59 |
|
60 |
|
61 |
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild |
62 |
index 462b5c95a692..1725c16abdac 100644 |
63 |
--- a/sys-devel/gdb/gdb-9999.ebuild |
64 |
+++ b/sys-devel/gdb/gdb-9999.ebuild |
65 |
@@ -192,6 +192,9 @@ src_configure() { |
66 |
# source-highlight is detected with pkg-config: bug #716558 |
67 |
export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" |
68 |
|
69 |
+ # ensure proper compiler is detected for Clang builds: bug #831202 |
70 |
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" |
71 |
+ |
72 |
econf "${myconf[@]}" |
73 |
} |