Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: toolchain@g.o, Sam James <sam@g.o>
Subject: [gentoo-dev] [PATCH] flag-o-matic.eclass: respect -fuse-ld in test-flags-CCLD
Date: Sat, 16 Jul 2022 14:35:20
Message-Id: 20220716143450.585630-1-sam@gentoo.org
1 Closes: https://bugs.gentoo.org/832377
2 Signed-off-by: Sam James <sam@g.o>
3 ---
4 eclass/flag-o-matic.eclass | 9 +++++++++
5 1 file changed, 9 insertions(+)
6
7 diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
8 index 5e6269b21b17..00786c2f74bb 100644
9 --- a/eclass/flag-o-matic.eclass
10 +++ b/eclass/flag-o-matic.eclass
11 @@ -573,6 +573,15 @@ _test-flag-PROG() {
12 c+ld)
13 in_ext='c'
14 in_src='int main(void) { return 0; }'
15 +
16 + if is-ldflagq -fuse-ld=* ; then
17 + # Respect linker chosen by user so we don't
18 + # end up giving false results by checking
19 + # with default linker. bug #832377
20 + fuse_ld_value=$(get-flag -fuse-ld=*)
21 + cmdline_extra+=(${fuse_ld_value})
22 + fi
23 +
24 cmdline_extra+=(-xc)
25 ;;
26 esac
27 --
28 2.37.1