Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-05-02 Thread Magicloud Magiclouds
Sorry to reply after so long time.
When you say there is no proble, I understand it as:
  Even if some libraries were compiled with gcc, they are still
linkable with object files generated with llvm.
So this remembered me a problem I met long ago with no answer.

I compiled ghc 7 with ghc 6 and gcc. Everything was fine. Then I added
-fllvm to ghc to install some hackages.
This was when I noticed that, the new hackage reported some
dependencies were lost, which were actually in the system (and same
version).
Then I recompile the missing dependencies, and noticed from ghc-pkg
that, the old ones and the new ones were having different sign, the
thing that looks like a hash code after the name of package.

Now I dropped -fllvm, everything now seems really fine.

On Fri, Apr 29, 2011 at 9:58 AM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
 Magicloud Magiclouds wrote:

   As I recalled, ghc started to support llvm from version 7.

 Yes.

   But there is a problem: there is no option to make ghc with llvm.

 Its not an option, its a feature that is compiled in by default
 and enabled by using -fllvm on the ghc command line.

 So
 Library within ghc source will be in gcc's binary format.

 It is my understanding that libraries compiled via the native code
 generator (NCG) are fully compatible with libraries compiled with
 -fllvm.

 Then when I
 install other packages, they may complain that the binary format is
 not llvm, so they install some libraries again.

 You seem to think there is a problem where this is no problem :-).

 Cheers,
 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
竹密岂妨流水过
山高哪阻野云飞

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Edward Z. Yang
Others have answered your real question (I think) adequately, but if I'm
pedantic and answer precisely what you ask:

You can compile GHC with llvm by adding -fllvm to your build.mk file:

GhcHcOpts += -fllvm

Cheers,
Edward

Excerpts from Magicloud Magiclouds's message of Thu Apr 28 21:49:11 -0400 2011:
 Hi,
   As I recalled, ghc started to support llvm from version 7.
   But there is a problem: there is no option to make ghc with llvm. So
 Library within ghc source will be in gcc's binary format. Then when I
 install other packages, they may complain that the binary format is
 not llvm, so they install some libraries again.
   Any way I could make ghc 7 with llvm?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Henning Thielemann


On Fri, 29 Apr 2011, Erik de Castro Lopo wrote:


Magicloud Magiclouds wrote:

Then when I install other packages, they may complain that the binary 
format is not llvm, so they install some libraries again.


You seem to think there is a problem where this is no problem :-).


Nontheless it might be interesting to let GHC emit LLVM bitcode. As far as 
I understand, this would enable LLVM's Link Time Optimizations.


http://llvm.org/docs/LinkTimeOptimization.html

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Mikhail Glushenkov
Hi,

Henning Thielemann lemming at henning-thielemann.de writes:

 Nontheless it might be interesting to let GHC emit LLVM bitcode. As far as 
 I understand, this would enable LLVM's Link Time Optimizations.

You can already emit .ll code with -ddump-llvm. 
All LLVM tools that take .bc files as input (llc/opt/llvm-link) can also read
.ll (look at llvm/Support/IRReader.h).


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Mikhail Glushenkov
Henning Thielemann lemming at henning-thielemann.de writes:

 Nontheless it might be interesting to let GHC emit LLVM bitcode. As far as 
 I understand, this would enable LLVM's Link Time Optimizations.

And if you really need .bc, there is always llvm-as.




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] How to make ghc 7 with llvm?

2011-04-28 Thread Magicloud Magiclouds
Hi,
  As I recalled, ghc started to support llvm from version 7.
  But there is a problem: there is no option to make ghc with llvm. So
Library within ghc source will be in gcc's binary format. Then when I
install other packages, they may complain that the binary format is
not llvm, so they install some libraries again.
  Any way I could make ghc 7 with llvm?
-- 
竹密岂妨流水过
山高哪阻野云飞

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-28 Thread Don Stewart
Use the -fllvm flag.

On Thu, Apr 28, 2011 at 6:49 PM, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 Hi,
  As I recalled, ghc started to support llvm from version 7.
  But there is a problem: there is no option to make ghc with llvm. So
 Library within ghc source will be in gcc's binary format. Then when I
 install other packages, they may complain that the binary format is
 not llvm, so they install some libraries again.
  Any way I could make ghc 7 with llvm?
 --
 竹密岂妨流水过
 山高哪阻野云飞

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-28 Thread Erik de Castro Lopo
Magicloud Magiclouds wrote:

   As I recalled, ghc started to support llvm from version 7.

Yes.

   But there is a problem: there is no option to make ghc with llvm.

Its not an option, its a feature that is compiled in by default
and enabled by using -fllvm on the ghc command line.

 So
 Library within ghc source will be in gcc's binary format.

It is my understanding that libraries compiled via the native code
generator (NCG) are fully compatible with libraries compiled with
-fllvm.

 Then when I
 install other packages, they may complain that the binary format is
 not llvm, so they install some libraries again.

You seem to think there is a problem where this is no problem :-).

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe