Properly account for libdw paths in make build system

Should finally fix #17255.
22 jobs for master
Status Job ID Name Coverage
  Lint
canceled #206060
lint
lint-linters

canceled #206063
lint
lint-submods-branch

canceled #206061
lint
lint-testsuite

canceled #206062
lint
typecheck-testsuite

 
  Quick Build
canceled #206064
x86_64-linux
hadrian-ghc-in-ghci

 
  Build
canceled #206067
x86_64-linux
release-x86_64-linux-deb9-dwarf

canceled #206066
x86_64-linux
validate-x86_64-linux-deb9-debug

canceled #206065
x86_64-linux
validate-x86_64-linux-deb9-hadrian

 
  Full Build
canceled #206070
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

canceled #206071
armv7-linux allowed to fail
validate-armv7-linux-deb9

canceled #206072
x86_64-linux
validate-i386-linux-deb9

canceled #206069
x86_64-darwin
validate-x86_64-darwin

canceled #206073
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

canceled #206068
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

canceled #206074
x86_64-linux
validate-x86_64-linux-fedora27

canceled #206076
x86_64-windows allowed to fail
validate-x86_64-windows

canceled #206075
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

 
  Cleanup
canceled #206077
x86_64-darwin
cleanup-darwin

 
  Packaging
canceled #206078
x86_64-linux allowed to fail
doc-tarball

 
  Testing
canceled #206079
x86_64-linux allowed to fail manual
hackage

canceled #206080
x86_64-linux
perf-nofib

 
  Deploy
canceled #206081
x86_64-linux allowed to fail
pages