flag-o-matic.eclass: add LDFLAGS testing against linker
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 23 Dec 2019 11:41:20 +0000 (11:41 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 24 Dec 2019 11:01:01 +0000 (11:01 +0000)
commit28d6437fc7009002f98f28e8900e994109927726
tree894cc031dc4c4fbbe8ac55ecb2d1525f7abbf79b
parent177fc8d84dccb8dd8aba32b5fa127ffa42e50323
flag-o-matic.eclass: add LDFLAGS testing against linker

Before the change we tested only compiler driver (gcc flag parser)
for LDFLAGS.

This does not cover cases when we would really like to filter out
unsupported linker flags like -Wl,--hash-style=gnu passed to non-ELF
targets.

The change adds test-flag-CCLD() helper to perform all of assembly,
compilation and linking steps. Helper is used to filter LDFLAGS variable
in strip-unsupported-flags().

Closes: https://bugs.gentoo.org/333763
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/flag-o-matic.eclass
eclass/tests/flag-o-matic.sh