clang/wrapper cannot build GHC head with integer-gmp on Mavericks

Hi, I'm try to make GHC head stably buildable with clang/wrapper on Mavericks because we cannot ask all Mavericks users to install apple-gcc or GCC. The last big item for me is integer-gmp. GHC head cannot be built with clang/wrapper if integer-gmp is used. (integer-simple is OK.) This is because "configure" of libgmp fails. Now I understand why this happens. The source of this problem is "/usr/bin/gcc" which is a wrapper for clang (not gcc actually). This cheats "configure" of libgmp. If we type "CC=clang ./configure", it works. The problem is how to specify "CC=clang" to configure of libgmp when we build GHC head. If we modified "libraries/integer-gmp/gmp/ghc.mk" manually, we can build GHC head. But I don't like this one since "make maintainer-clean" removes "ghc.mk". Any ideas? Ticket is here: https://ghc.haskell.org/trac/ghc/ticket/8497 --Kazu

On 2013-11-20 at 14:40:27 +0100, Kazu Yamamoto (山本和彦) wrote: [...]
If we type "CC=clang ./configure", it works. The problem is how to specify "CC=clang" to configure of libgmp when we build GHC head. If we modified "libraries/integer-gmp/gmp/ghc.mk" manually, we can build GHC head. But I don't like this one since "make maintainer-clean" removes "ghc.mk".
are you sure gmp/ghc.mk is removed? After all, it's a file checked into Git: http://git.haskell.org/packages/integer-gmp.git/blob/HEAD:/gmp/ghc.mk

Hi,
Oh. Probably I was confused.
So, should we introduce a hack for Mavericks to gmp/ghc.mk?
OK. I created a patch: https://ghc.haskell.org/trac/ghc/ticket/8497#comment:8 With this patch, I can build GHC head/integer-gmp with GHC 7.6.3/clang-wrapper on Mavericks/XCode 5. (Note that patched alex and happy are also necessary.) --Kazu
participants (2)
-
Herbert Valerio Riedel
-
Kazu Yamamoto