Richard Cobbe | 2 Mar 01:35 2014

questions about ghc-clang-wrapper

I've just run the ghc-clang-wrapper script (from
https://gist.github.com/tibbe/8448715) to try to get GHC 7.6.3 (part of
Haskell Platform 2013-2.0.0) working with XCode 5.0.2 on a MacOS 10.8.5
machine.  Things look good, but I have two questions:

Question 1: How do I know this worked?  I tested it by modifying a package
that I'm writing so that it requires CPP to build correctly, and
successfully built it with "cabal clean; cabal configure; cabal build".
(More details available on request.)  Does that mean I'm in good shape?

(I'm asking because I was never entirely clear on what the incompatibility
was; all I know is that it has something to do with cpp.)

Question 2: Is there any harm in adding -Wno-return-type to extraClangArgs
in ghc-clang-wrapper?  This silences an annoying but apparently harmless
warning I get from "cabal configure".

Thanks,

Richard
Carter Schonwald | 2 Mar 01:40 2014
Picon

Re: questions about ghc-clang-wrapper

Just use GCC and follow the alternative directions for getting ghc to point at a real GCC.  They're linked to from the Mac Haskell platform page as the alternative directions.  

On Saturday, March 1, 2014, Richard Cobbe <cobbe <at> ccs.neu.edu> wrote:

I've just run the ghc-clang-wrapper script (from
https://gist.github.com/tibbe/8448715) to try to get GHC 7.6.3 (part of
Haskell Platform 2013-2.0.0) working with XCode 5.0.2 on a MacOS 10.8.5
machine.  Things look good, but I have two questions:

Question 1: How do I know this worked?  I tested it by modifying a package
that I'm writing so that it requires CPP to build correctly, and
successfully built it with "cabal clean; cabal configure; cabal build".
(More details available on request.)  Does that mean I'm in good shape?

(I'm asking because I was never entirely clear on what the incompatibility
was; all I know is that it has something to do with cpp.)

Question 2: Is there any harm in adding -Wno-return-type to extraClangArgs
in ghc-clang-wrapper?  This silences an annoying but apparently harmless
warning I get from "cabal configure".

Thanks,

Richard
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Brandon Allbery | 2 Mar 01:44 2014
Picon

Re: questions about ghc-clang-wrapper

On Sat, Mar 1, 2014 at 7:35 PM, Richard Cobbe <cobbe <at> ccs.neu.edu> wrote:
Question 1: How do I know this worked?  I tested it by modifying a package
that I'm writing so that it requires CPP to build correctly, and
successfully built it with "cabal clean; cabal configure; cabal build".
(More details available on request.)  Does that mean I'm in good shape?

If you didn't get a compile failure after a bunch of syntax errors reported by cpp, you're good. (The problem is that clang's cpp is more pedantic about C syntax than gcc's, and doesn't appreciate being run on Haskell source. The patch adds options to disable the pedanticism.)

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Carter Schonwald | 2 Mar 02:35 2014
Picon

Re: questions about ghc-clang-wrapper

woops, yeah, brandon  is correct.

you're fine


On Sat, Mar 1, 2014 at 7:44 PM, Brandon Allbery <allbery.b <at> gmail.com> wrote:
On Sat, Mar 1, 2014 at 7:35 PM, Richard Cobbe <cobbe <at> ccs.neu.edu> wrote:
Question 1: How do I know this worked?  I tested it by modifying a package
that I'm writing so that it requires CPP to build correctly, and
successfully built it with "cabal clean; cabal configure; cabal build".
(More details available on request.)  Does that mean I'm in good shape?

If you didn't get a compile failure after a bunch of syntax errors reported by cpp, you're good. (The problem is that clang's cpp is more pedantic about C syntax than gcc's, and doesn't appreciate being run on Haskell source. The patch adds options to disable the pedanticism.)

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane