[GHC] #15319: Configurable/overridable settings file

GHC ghc-devs at haskell.org
Thu Jun 28 09:52:54 UTC 2018


#15319: Configurable/overridable settings file
-------------------------------------+-------------------------------------
           Reporter:  mboes          |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15319>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list