Configurable/overridable settings file
GHC ships with a settings
file. This file specifies what was known about the C compiler at GHC ./configure
time (whether to pass -no-pie
etc, the path to the C compiler etc). Fortunately, I can override at least some of the entries of the settings
file, e.g. to use a different GCC than the one GHC got to know about during the ./configure
phase. This is important because is multi-lingual projects, sometimes the build tool for the C++ part of the code wants a special compiler, which GHC should also be using when compiling C.
The problem is that I can't override *everything*. If I supply via -pgmc
a compiler that doesn't understand -no-pie
, then I can't tell GHC to not pass -no-pie
. Because I can't supply my own settings
file, or (equivalently) there exists no CLI flag that allows me to override that particular entry in the settings
file.
What I'd like is something like:
$ ghc -settings /path/to/settings/file
that subsumes -pgmc
and other such flags. I'd be able to tell GHC in one go which compiler I want to use, and what flags GHC should or should not pass to that compiler depending on the features of the compiler.
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |