From 13054645494c2fa3ad5ec777f49c210565a70b47 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 14 Jul 2022 06:41:21 +0100 Subject: [PATCH] flag-o-matic.eclass: respect -fuse-ld in test-flags-CCLD Closes: https://bugs.gentoo.org/832377 Signed-off-by: Sam James --- eclass/flag-o-matic.eclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 5e6269b21b17..00786c2f74bb 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -573,6 +573,15 @@ _test-flag-PROG() { c+ld) in_ext='c' in_src='int main(void) { return 0; }' + + if is-ldflagq -fuse-ld=* ; then + # Respect linker chosen by user so we don't + # end up giving false results by checking + # with default linker. bug #832377 + fuse_ld_value=$(get-flag -fuse-ld=*) + cmdline_extra+=(${fuse_ld_value}) + fi + cmdline_extra+=(-xc) ;; esac -- 2.37.1