commit: bdc76112c33f0cc7606a88be8e3d4c7498b29cc7 Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com> AuthorDate: Fri Jan 14 17:42:24 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jan 14 18:47:03 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdc76112
sys-devel/gdb: fix GCC/Clang build mixture GDB configure will use a mix of GCC and Clang due to $GCC_FOR_TARGET defaulting to GCC in Clang-configured builds, so set the var to ensure the proper compilers are detected and to avoid mixing them. Before setting the variable (example from ChromiumOS): checking for x86_64-cros-linux-gnu-gcc... x86_64-cros-linux-gnu-gcc After: checking for gcc... (cached) x86_64-cros-linux-gnu-clang Bug: https://bugs.gentoo.org/831202 Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com> Closes: https://github.com/gentoo/gentoo/pull/23796 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-devel/gdb/gdb-10.2-r1.ebuild | 3 +++ sys-devel/gdb/gdb-11.1.ebuild | 3 +++ sys-devel/gdb/gdb-9999.ebuild | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sys-devel/gdb/gdb-10.2-r1.ebuild b/sys-devel/gdb/gdb-10.2-r1.ebuild index 1978ab28268d..19f08197ce03 100644 --- a/sys-devel/gdb/gdb-10.2-r1.ebuild +++ b/sys-devel/gdb/gdb-10.2-r1.ebuild @@ -188,6 +188,9 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + # ensure proper compiler is detected for Clang builds: bug #831202 + export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" + econf "${myconf[@]}" } diff --git a/sys-devel/gdb/gdb-11.1.ebuild b/sys-devel/gdb/gdb-11.1.ebuild index 022f3be33ce7..3933cc2776b8 100644 --- a/sys-devel/gdb/gdb-11.1.ebuild +++ b/sys-devel/gdb/gdb-11.1.ebuild @@ -193,6 +193,9 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + # ensure proper compiler is detected for Clang builds: bug #831202 + export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" + econf "${myconf[@]}" } diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild index 462b5c95a692..1725c16abdac 100644 --- a/sys-devel/gdb/gdb-9999.ebuild +++ b/sys-devel/gdb/gdb-9999.ebuild @@ -192,6 +192,9 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + # ensure proper compiler is detected for Clang builds: bug #831202 + export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" + econf "${myconf[@]}" }
