On 04/11/2018 04:31 AM, Jakub Jelinek wrote:
> Hi!
>
> As discussed, using --as-needed and --no-as-needed is dangerous, because
> it results in --no-as-needed even for libraries after -lgcc_s, even when the
> default is --as-needed or --as-needed has been specified earlier on the
> command line.
>
> If the linker supports --push-state/--pop-state, we should IMHO use it.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for stage1?
>
> Or is this something we want in GCC8 too?
>
> 2018-04-11 Jakub Jelinek <ja...@redhat.com>
>
> * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
> --push-state --as-needed and --pop-state instead of --as-needed and
> --no-as-needed if ld supports it.
> * configure: Regenerated.
OK for the trunk.
jeff