i386: Pass -Wl,--no-as-needed to compiler as needed
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 25 Jan 2023 16:57:57 +0000 (08:57 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 25 Jan 2023 16:57:57 +0000 (08:57 -0800)
commit0e46a09d12aa9c2c77d783ace336866e429ffa73
tree1d22aedc46e24e8c829e8aa2055cb078e1edfd69
parentd8f5b7d1d1e8e1f0352848b7066dd133edd50773
i386: Pass -Wl,--no-as-needed to compiler as needed

Pass -Wl,--no-as-needed to linker tests to fix

FAIL: Run pr19031
FAIL: Run got1
FAIL: Undefined weak symbol (-fPIE -no-pie)
FAIL: Undefined weak symbol (-fPIE -pie)

when --as-needed is passed to linker by compiler.

PR ld/30050
* testsuite/ld-i386/i386.exp: Pass -Wl,--no-as-needed to compiler
as needed.
ld/testsuite/ld-i386/i386.exp