Flag warnings show intermediate hscpp filenames on SmartOS

Karel Gardas karel.gardas at centrum.cz
Fri Jan 1 11:22:50 UTC 2016


Alain,

indeed, on SmartOS you are free to modify the supplied GCC so the fix to 
remove -P is most natural one. On the other hand I'm not so lucky with 
binary Solaris 11.x distribution provided by Oracle so I need to use not 
so clean and nice workarounds...

Karel

On 01/ 1/16 12:17 AM, Alain O'Dea wrote:
> cpphs isn't a direct option.  It won't install on SmartOS with Cabal.
> GCC 4.7 is the earliest GCC supported so I'll have to try something else
> for SmartOS.
>
> It looks like the GCC Specs are the problem.
>
> On Ubuntu the Spec for cpp is:
>
> *cpp:
> %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
>
> On SmartOS the Spec for cpp is:
>
> *cpp:
> %{,assembler-with-cpp:-P} %(cpp_subtarget)
>
> I think this is how the -P gets injected.  I think this is correctable.
> I had a similar issue with -std=c99 which is the default for C compiling
> on Ubuntu but not on SmartOS leading to issues with compiling source
> that isn't old school C (like persistent-sqlite).
>
> Anyways I must retire from this and entertain my guests.  Happy New Year
> folks.
>
>
> On Thu, Dec 31, 2015 at 5:19 PM Alain O'Dea <alain.odea at gmail.com
> <mailto:alain.odea at gmail.com>> wrote:
>
>     Thanks for the clarification. I understand now.
>     On Thu, Dec 31, 2015 at 16:52 Karel Gardas <karel.gardas at centrum.cz
>     <mailto:karel.gardas at centrum.cz>> wrote:
>
>         On 12/31/15 07:41 PM, Alain O'Dea wrote:
>          > Yes. I can do that.
>          >
>          > On SmartOS it may not be GCC 3.4.3 causing this. I see this
>         on GCC 4.7.x
>          > through 4.9.x. The paths to gcc on SmartOS also differ. I'll
>         have to
>          > verify that as part of checking this.
>
>         This is misunderstanding. GCC 3.4.3 provides *correct* CPP behavior,
>         while all 4.x provides broken CPP. That means as a workaround
>         when GCC
>         3.4.3 is installed I set it as GHC's CPP automatically on
>         Solaris. When
>         it is not available, then GHC behaves like you've seen when
>         using CPP...
>
>         Hopefully this is more clear now,
>
>         Karel
>



More information about the ghc-devs mailing list