]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Real programmers don't configure gcc using --with-ld
authorAlan Modra <amodra@gmail.com>
Fri, 20 Aug 2021 00:18:13 +0000 (09:48 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 24 Aug 2021 11:09:29 +0000 (20:39 +0930)
* testsuite/lib/ld-lib.exp (run_host_cmd): Give a clue as to why
gcc -B doesn't pick up the ld under test.

ld/testsuite/lib/ld-lib.exp

index 8fd14afc63efbf7098cc1056047ca499338d7a9d..fec31fa8e19b7d4ef0a818300ad0ebfcacffb36f 100644 (file)
@@ -117,7 +117,11 @@ proc run_host_cmd { prog command } {
            set gcc_ld_version_message [run_host_cmd "$prog" "$gccflags $ver"]
            if {[string first $ld_version_message $gcc_ld_version_message] < 0} {
                perror "************************************************************************"
-               perror "Your compiler driver ignores -B when choosing ld."
+               perror "Your compiler apparently ignores -B when choosing ld."
+               set gcc_v [run_host_cmd "$prog" "$gccflags -v"]
+               if { [string first "--with-ld=" $gcc_v] >= 0 } {
+                   perror "Hint: don't configure gcc using --with-ld (or --with-as)"
+               }
                perror "You will not be testing the new ld in many of the following tests."
                set gcc_ld_version [run_host_cmd "$prog" "$gccflags --print-prog-name=ld"]
                if {![string match "" $gcc_ld_version] && ![string match "ld" $gcc_ld_version]} {