Test that gcc -B picks up new ld
authorAlan Modra <amodra@gmail.com>
Sat, 21 Apr 2018 02:36:57 +0000 (12:06 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 21 Apr 2018 09:18:40 +0000 (18:48 +0930)
commit5a8edf8ece80a436a0ed786488e8e772bc515fa2
treee357bf2b959ad131309fbe4ff738a80571fe9871
parent3d75146d2baea3ad8e8b3a099f0255b71389d86b
Test that gcc -B picks up new ld

gcc configured using --with-ld always uses that particular version of
ld if it exists.  This patch adds a check that the ld version reported
directly from ld-new matches that reported via gcc.  I chose to
compare the ld --version output rather than a more strict test (for
example by gcc --print-prog-name=ld), because the version test allows
a user to run the ld testsuite after installing a new ld (in the place
expected by gcc).

Sample output:

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/alan/src/binutils-gdb/ld/testsuite/config/default.exp as tool-and-target-specific interface file.
ERROR: ************************************************************************
ERROR: Your compiler driver ignores -B when choosing ld.
ERROR: You will not be testing the new ld in many of the following tests.
ERROR: It seems you will be testing /usr/bin/x86_64-w64-mingw32-ld instead.
ERROR: ************************************************************************
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /home/alan/src/binutils-gdb/ld/testsuite/ld-aarch64/aarch64-elf.exp ...

* testsuite/lib/ld-lib.exp (run_host_cmd): Check that gcc -B
works.
ld/ChangeLog
ld/testsuite/lib/ld-lib.exp
This page took 0.025094 seconds and 4 git commands to generate.