hadrian bindist configure script passes link flags when testing libdw availability
Summary
When testing if libdw is available the bindist configure script ignores the values of --with-libdw-includes
and (more importantly) --with-libdw-libraries
that are cached from building the bindist (the original paths show up on a grep of the configure file) when checking if libdw is available. This means that the configure script will fail if libdw is installed at the originally provided location, but not in the normal linker search path. Evidently a -L
flag is missing somewhere.
This is also a regression, it used to be possible to build a dwarf-enabled compiler without having libdw in the linker search path with the make build system.
Steps to reproduce
- Install libdw to a location outside the compiler search path, make sure libdw is not in the compiler search path.
- Build a bindist after configuring GHC with
--with-libdw-libraries
,--with-libdw-includes
and--enable-dwarf-unwind
. - Try running the configure script of the bindist (passing
--with-libdw-libraries
again also makes no difference) - Confirm that
LibdwLibDir
andLibdwIncludeDir
are set correctly in the configure script.
Note: This may also affect other libraries, but in our derivation other libraries like libffi were in the linker search path.
Expected behavior
The bindist configure script works correctly.
Environment
- GHC version used: dca43a04
Optional:
- Operating System: NixOS
- System Architecture: x86_64-linux