CPP usage in GHC.
Karel Gardas
karel.gardas at centrum.cz
Tue Aug 12 21:12:01 UTC 2014
Actually probably not debris leftover but needed code. I just removed -x
assembler-with-cpp and got this:
gcc: ghc/Main.hs: linker input file unused because linking not done
so we definitely need some -x to set language even for GNU C. Tested
also with old 3.4.x. From langs available, assembler-with-cpp looks like
the best option unfortunately...
Karel
On 08/12/14 01:35 AM, Carter Schonwald wrote:
> Oooooo. Then it's possibly debris leftover from Austin's initial clang
> compatibility work predating the improvements via the settings file work.
>
> I'm Afk right now, but that probably can be safely removed from ghc,
> especially since the configure script for clang cpp adds that anyways
> now I think? I might be wrong though.
>
> On Monday, August 11, 2014, Karel Gardas <karel.gardas at centrum.cz
> <mailto:karel.gardas at centrum.cz>> wrote:
>
> On 08/11/14 11:18 PM, Carter Schonwald wrote:
>
> why should this flag be passed to cpp when invoked on HS files?
> It'd be
> easy to expose another field in the settings file for this other
> invokecation.. though i should look more closely at the use site
> before
> opinining :)
>
>
> Hmm, isn't doCpp function what's invoked when cpp is invoked for HS
> files? If so, then -x assembler-with-cpp is already used for HS
> files anyway.
>
> Karel
>
>
>
> On Mon, Aug 11, 2014 at 4:27 PM, Karel Gardas
> <karel.gardas at centrum.cz
> <mailto:karel.gardas at centrum.cz>> wrote:
>
> On 08/11/14 08:48 PM, Carter Schonwald wrote:
>
> What i'm hearing you say is we actually need TWO sets
> of CPP
> flags, one
> for normal haskell, and another for the CPP used on the
> assembler?
> wheres this hardcoding?
>
>
> DriverPipeline.hs -- grep for "assembler-with-cpp" and you
> will find it.
>
> IMHO best would be to move this "-x assembler-with-cpp"
> into the
> hs-cpp-flags managed by configure. This way it may be even
> possible
> to use system supplied plain cpp instead of cpp builtinto
> GNU C.
>
> Karel
>
>
>
More information about the ghc-devs
mailing list