Skip to content

configure script invokes ghc with LDFLAGS during cross-builds

When building ghc, the aclocal.m4 settings direct "configure" to use the provided LDFLAGS as GHC_LDFLAGS, which are later used to invoke the host's GHC: https://github.com/ghc/ghc/blob/ghc-7.8/aclocal.m4#L1820

This is undesirable when performing a cross-build, in which case the LDFLAGS are used to specify the flags for use when linking for the target and not when linking on the build host. rwbarton@freenode believes that the normal CFLAGS, LDFLAGS, LIBS, etc. should never have an affect on the build host behavior. Either this policy needs to be enforced or a separate set of flags needs to be introduced to allow setting the target flags separately from the build host flags.

To reproduce, "./configure LDFLAGS=bogus" and observe the failure in ghc-pwd, which is used on the build host.

Trac metadata
Trac field Value
Version 7.8.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information