configure: Avoid hard-coded ld path on Windows

The fix to #17962 ended up regressing on Windows as it failed to
replicate the logic responsible for overriding the toolchain paths on
Windows. This resulted in a hard-coded path to a directory that likely
doesn't exist on the user's system (#18550).
24 jobs for !3840 with wip/T18550 in 383 minutes and 9 seconds (queued for 13 seconds)
detached
Status Job ID Name Coverage
  Lint
passed #413622
lint
ghc-linters

00:00:15

passed #413623
lint
lint-linters

00:00:14

passed #413626
lint
lint-submods

00:00:22

passed #413624
lint
lint-testsuite

00:00:16

passed #413625
lint
typecheck-testsuite

00:00:15

 
  Quick Build
passed #413627
x86_64-linux
hadrian-ghc-in-ghci

00:10:47

 
  Build
passed #413628
x86_64-linux
validate-x86_64-linux-deb9-hadrian

01:33:30

 
  Full Build
failed #413631
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

03:06:50

failed #413632
armv7-linux allowed to fail
validate-armv7-linux-deb9

03:11:55

passed #413633
x86_64-linux
validate-i386-linux-deb9

01:53:37

passed #413630
x86_64-darwin
validate-x86_64-darwin

01:09:06

passed #413634
x86_64-linux
validate-x86_64-linux-deb9-debug

02:11:21

passed #413636
x86_64-linux
validate-x86_64-linux-deb9-dwarf

02:03:06

passed #413635
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

01:38:33

passed #413629
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

03:21:32

passed #413637
x86_64-linux
validate-x86_64-linux-fedora27

00:44:28

failed #413926
test new-x86_64-windows allowed to fail
validate-x86_64-windows

00:51:30

failed #413638
new-x86_64-windows test allowed to fail
validate-x86_64-windows-hadrian

00:07:56

failed #413639
new-x86_64-windows test allowed to fail
validate-x86_64-windows

00:50:38

failed #413778
test new-x86_64-windows allowed to fail
validate-x86_64-windows

00:30:41

 
  Cleanup
passed #413640
x86_64-darwin
cleanup-darwin

00:00:16

 
  Packaging
failed #413641
x86_64-linux allowed to fail
doc-tarball

00:00:30

 
  Testing
manual #413642
x86_64-linux allowed to fail manual
hackage
passed #413643
x86_64-linux
perf-nofib

00:24:07

 
Name Stage Failure
failed
doc-tarball Packaging
Entering 'utils/haddock'
Entering 'utils/hsc2hs'
Downloading artifacts
Downloading artifacts for validate-x86_64-linux-deb9-debug (413634)...
Downloading artifacts from coordinator... ok
id=413634 responseStatus=200 OK token=PCtzeLHz
Executing "step_script" stage of the job script
$ if [ ! -f "$LINUX_BINDIST" ]; then # collapsed multi-line command
Error: ghc-x86_64-mingw32.tar.xz does not exist. Did the 64-bit Windows job fail?
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
Git branch:   13-1-stable
GO version: go1.13.8
Built: 2020-06-19T21:12:23+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=6216 revision=6214287e version=13.1.0
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
validate-aarch64-linux-deb9 Full Build
Uploading artifacts...
ghc-aarch64-linux-deb9.tar.xz: found 1 matching files and directories

junit.xml: found 1 matching files and directories

performance-metrics.tsv: found 1 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=413631 responseStatus=201 Created token=b2wwXHt_
Uploading artifacts...
junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=413631 responseStatus=201 Created token=b2wwXHt_
ERROR: Job failed: exit code 1
failed
validate-armv7-linux-deb9 Full Build
Uploading artifacts...
ghc-armv7-linux-deb9.tar.xz: found 1 matching files

junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=413632 responseStatus=201 Created token=MMNjhnWx
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=413632 responseStatus=201 Created token=MMNjhnWx
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows Full Build
Git branch:   13-1-stable
GO version: go1.13.8
Built: 2020-06-19T21:12:23+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=3092 revision=6214287e version=13.1.0
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1