Support --as-needed in i386/x86-64 tests
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 7 Mar 2016 17:03:24 +0000 (09:03 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 7 Mar 2016 17:03:24 +0000 (09:03 -0800)
commit23a4bd22c75862fdbaa5faef59b9094ec738f675
treef954cf23727a9db98a42f428645c11631dd7a5ba
parente6c2f47b45315ba13f25fb57e51389d0c5ed0701
Support --as-needed in i386/x86-64 tests

Since compiler may pass --as-needed to ld by default, link .o file
before .so file in i386/x86-64 tests.

PR ld/19774
* testsuite/ld-i386/i386.exp: Link tmpdir/pr18900.o before
tmpdir/pr18900.so and test --as-needed.  Link tmpdir/gotpc1.o
before tmpdir/got1d.so and test --as-needed.
* testsuite/ld-x86-64/x86-64.exp: Link tmpdir/pr18900.o before
tmpdir/pr18900.so and test --as-needed.
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-x86-64/x86-64.exp