<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Getting GHC HEAD and LLVM working together</title>
	<atom:link href="http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/feed/" rel="self" type="application/rss+xml" />
	<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/</link>
	<description>C++, Haskell and Math for pleasure</description>
	<lastBuildDate>Thu, 08 Mar 2012 20:44:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: David Terei</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-86</link>
		<dc:creator><![CDATA[David Terei]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 03:16:05 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-86</guid>
		<description><![CDATA[I&#039;ve released a new version of the back-end and update the build instructions on the wiki. The new patch works now with the newer versions of LLVM that include the changes needed by GHC.

http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve released a new version of the back-end and update the build instructions on the wiki. The new patch works now with the newer versions of LLVM that include the changes needed by GHC.</p>
<p><a href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing" rel="nofollow">http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrzysztofSkrzetnicki</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-84</link>
		<dc:creator><![CDATA[KrzysztofSkrzetnicki]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 15:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-84</guid>
		<description><![CDATA[I used most recent version of llvm from svn, so I didn&#039;t patch it manually. Manual inspection of sources indicate it includes GHC patch and support for &quot;cc 10&quot; call convention.]]></description>
		<content:encoded><![CDATA[<p>I used most recent version of llvm from svn, so I didn&#8217;t patch it manually. Manual inspection of sources indicate it includes GHC patch and support for &#8220;cc 10&#8243; call convention.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alpmestan</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-83</link>
		<dc:creator><![CDATA[alpmestan]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 14:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-83</guid>
		<description><![CDATA[Did you patch llvm too ? Or checked out a version of LLVM already containing the patch ?]]></description>
		<content:encoded><![CDATA[<p>Did you patch llvm too ? Or checked out a version of LLVM already containing the patch ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrzysztofSkrzetnicki</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-82</link>
		<dc:creator><![CDATA[KrzysztofSkrzetnicki]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 14:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-82</guid>
		<description><![CDATA[Ok, my bad: I downloaded different tarball previously and I thought that the one mentioned in the post is the same. After downloading GHC, I unpacked it, patched (with both patches to GHC) and edited Types.hs:

instance Show LlvmCallConvention where
  show CC_Ccc       = &quot;ccc&quot;
--  show CC_Fastcc    = &quot;cc 10&quot;
--  show CC_Fastcc    = &quot;fastcc&quot;
  show CC_Fastcc    = show (CC_Ncc 10)
  show CC_Coldcc    = &quot;coldcc&quot;
  show (CC_Ncc i)   = &quot;cc &quot; ++ (show i)
  show CC_X86_Stdcc = &quot;x86_stdcallcc&quot;

However, even simplest program build with -fllvm segfaults:


█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:46:11 
~/dokumenty/programowanie-wlasne/haskell/sorting/ ghc --make hello -fforce-recomp &amp;&amp; ./hello 
[1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
hi


█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:45:58 
~/dokumenty/programowanie-wlasne/haskell/sorting/ $GHC613BIN --make hello -fforce-recomp &amp;&amp; ./hello
[1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
hi

Output of &quot;--info&quot;:

$GHC613BIN --info                                       
 [(&quot;Project name&quot;,&quot;The Glorious Glasgow Haskell Compilation System&quot;)
 ,(&quot;Project version&quot;,&quot;6.13.20100321&quot;)
 ,(&quot;Booter version&quot;,&quot;6.12.1&quot;)
 ,(&quot;Stage&quot;,&quot;2&quot;)
 ,(&quot;Have interpreter&quot;,&quot;YES&quot;)
 ,(&quot;Object splitting&quot;,&quot;YES&quot;)
 ,(&quot;Have native code generator&quot;,&quot;YES&quot;)
 ,(&quot;Have llvm code generator&quot;,&quot;YES&quot;)
 ,(&quot;Support SMP&quot;,&quot;YES&quot;)
 ,(&quot;Unregisterised&quot;,&quot;NO&quot;)
 ,(&quot;Tables next to code&quot;,&quot;NO&quot;)
 ,(&quot;Win32 DLLs&quot;,&quot;&quot;)
 ,(&quot;RTS ways&quot;,&quot;l debug  thr thr_debug thr_l thr_p  dyn debug_dyn thr_dyn thr_debug_dyn&quot;)
 ,(&quot;Leading underscore&quot;,&quot;NO&quot;)
 ,(&quot;Debug on&quot;,&quot;False&quot;)
 ,(&quot;LibDir&quot;,&quot;/home/tener/dokumenty/programowanie-wlasne/haskell/llvm-ghc-backend/ghc/inplace/lib&quot;)
 ]

█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:46:07 
~/dokumenty/programowanie-wlasne/haskell/sorting/ $GHC613BIN --make hello -fllvm -fforce-recomp &amp;&amp; ./hello 
[1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
zsh: segmentation fault  ./hello

I tried gdb but didn&#039;t learned much:

$ gdb hello
GNU gdb (GDB) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;i686-pc-linux-gnu&quot;.
For bug reporting instructions, please see:
...
Reading symbols from /home/tener/dokumenty/programowanie-wlasne/haskell/sorting/hello...done.
(gdb) r
Starting program: /home/tener/dokumenty/programowanie-wlasne/haskell/sorting/hello 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x0804a89b in __stginit_ZCMain ()
(gdb) 


Any clues what&#039;s wrong?]]></description>
		<content:encoded><![CDATA[<p>Ok, my bad: I downloaded different tarball previously and I thought that the one mentioned in the post is the same. After downloading GHC, I unpacked it, patched (with both patches to GHC) and edited Types.hs:</p>
<p>instance Show LlvmCallConvention where<br />
  show CC_Ccc       = &#8220;ccc&#8221;<br />
&#8211;  show CC_Fastcc    = &#8220;cc 10&#8243;<br />
&#8211;  show CC_Fastcc    = &#8220;fastcc&#8221;<br />
  show CC_Fastcc    = show (CC_Ncc 10)<br />
  show CC_Coldcc    = &#8220;coldcc&#8221;<br />
  show (CC_Ncc i)   = &#8220;cc &#8221; ++ (show i)<br />
  show CC_X86_Stdcc = &#8220;x86_stdcallcc&#8221;</p>
<p>However, even simplest program build with -fllvm segfaults:</p>
<p>█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:46:11<br />
~/dokumenty/programowanie-wlasne/haskell/sorting/ ghc &#8211;make hello -fforce-recomp &amp;&amp; ./hello<br />
[1 of 1] Compiling Main             ( hello.hs, hello.o )<br />
Linking hello &#8230;<br />
hi</p>
<p>█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:45:58<br />
~/dokumenty/programowanie-wlasne/haskell/sorting/ $GHC613BIN &#8211;make hello -fforce-recomp &amp;&amp; ./hello<br />
[1 of 1] Compiling Main             ( hello.hs, hello.o )<br />
Linking hello &#8230;<br />
hi</p>
<p>Output of &#8220;&#8211;info&#8221;:</p>
<p>$GHC613BIN &#8211;info<br />
 [("Project name","The Glorious Glasgow Haskell Compilation System")<br />
 ,("Project version","6.13.20100321")<br />
 ,("Booter version","6.12.1")<br />
 ,("Stage","2")<br />
 ,("Have interpreter","YES")<br />
 ,("Object splitting","YES")<br />
 ,("Have native code generator","YES")<br />
 ,("Have llvm code generator","YES")<br />
 ,("Support SMP","YES")<br />
 ,("Unregisterised","NO")<br />
 ,("Tables next to code","NO")<br />
 ,("Win32 DLLs","")<br />
 ,("RTS ways","l debug  thr thr_debug thr_l thr_p  dyn debug_dyn thr_dyn thr_debug_dyn")<br />
 ,("Leading underscore","NO")<br />
 ,("Debug on","False")<br />
 ,("LibDir","/home/tener/dokumenty/programowanie-wlasne/haskell/llvm-ghc-backend/ghc/inplace/lib")<br />
 ]</p>
<p>█▓▒░tener@laptener░▒▓██▓▒░ wto mar 23 03:46:07<br />
~/dokumenty/programowanie-wlasne/haskell/sorting/ $GHC613BIN &#8211;make hello -fllvm -fforce-recomp &amp;&amp; ./hello<br />
[1 of 1] Compiling Main             ( hello.hs, hello.o )<br />
Linking hello &#8230;<br />
zsh: segmentation fault  ./hello</p>
<p>I tried gdb but didn&#8217;t learned much:</p>
<p>$ gdb hello<br />
GNU gdb (GDB) 7.0.1<br />
Copyright (C) 2009 Free Software Foundation, Inc.<br />
License GPLv3+: GNU GPL version 3 or later<br />
This is free software: you are free to change and redistribute it.<br />
There is NO WARRANTY, to the extent permitted by law.  Type &#8220;show copying&#8221;<br />
and &#8220;show warranty&#8221; for details.<br />
This GDB was configured as &#8220;i686-pc-linux-gnu&#8221;.<br />
For bug reporting instructions, please see:<br />
&#8230;<br />
Reading symbols from /home/tener/dokumenty/programowanie-wlasne/haskell/sorting/hello&#8230;done.<br />
(gdb) r<br />
Starting program: /home/tener/dokumenty/programowanie-wlasne/haskell/sorting/hello<br />
[Thread debugging using libthread_db enabled]</p>
<p>Program received signal SIGSEGV, Segmentation fault.<br />
0x0804a89b in __stginit_ZCMain ()<br />
(gdb) </p>
<p>Any clues what&#8217;s wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alpmestan</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-80</link>
		<dc:creator><![CDATA[alpmestan]]></dc:creator>
		<pubDate>Mon, 22 Mar 2010 19:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-80</guid>
		<description><![CDATA[What if you do 
$ ./darcs-all pull -a 
as said in my post ?]]></description>
		<content:encoded><![CDATA[<p>What if you do<br />
$ ./darcs-all pull -a<br />
as said in my post ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrzysztofSkrzetnicki</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-79</link>
		<dc:creator><![CDATA[KrzysztofSkrzetnicki]]></dc:creator>
		<pubDate>Mon, 22 Mar 2010 19:45:59 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-79</guid>
		<description><![CDATA[I was following your instructions. However, darcs-all seems to hang:

./darcs-all get    
warning: adding --partial, to override use --complete
warning: . already present; omitting
== running darcs get --partial http://darcs.haskell.org/ghc-tarballs ghc-tarballs
Converting old-fashioned repository to hashed format...               
*******************************************************************************
Fetching a hashed repository would be faster.  Perhaps you could persuade
the maintainer to run darcs optimize --upgrade with darcs 2.4.0 or higher?
*******************************************************************************
No checkpoint.                                                        
Writing inventory 1 done, 0 queued.       

---

After this, no more output is generated -  darcs-all seems to hang on instruction:
&gt; darcs get  --partial http://darcs.haskell.org/ghc-tarballs/ ghc-tarballs

Any ideas?]]></description>
		<content:encoded><![CDATA[<p>I was following your instructions. However, darcs-all seems to hang:</p>
<p>./darcs-all get<br />
warning: adding &#8211;partial, to override use &#8211;complete<br />
warning: . already present; omitting<br />
== running darcs get &#8211;partial <a href="http://darcs.haskell.org/ghc-tarballs" rel="nofollow">http://darcs.haskell.org/ghc-tarballs</a> ghc-tarballs<br />
Converting old-fashioned repository to hashed format&#8230;<br />
*******************************************************************************<br />
Fetching a hashed repository would be faster.  Perhaps you could persuade<br />
the maintainer to run darcs optimize &#8211;upgrade with darcs 2.4.0 or higher?<br />
*******************************************************************************<br />
No checkpoint.<br />
Writing inventory 1 done, 0 queued.       </p>
<p>&#8212;</p>
<p>After this, no more output is generated &#8211;  darcs-all seems to hang on instruction:<br />
&gt; darcs get  &#8211;partial <a href="http://darcs.haskell.org/ghc-tarballs/" rel="nofollow">http://darcs.haskell.org/ghc-tarballs/</a> ghc-tarballs</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saynte</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-77</link>
		<dc:creator><![CDATA[saynte]]></dc:creator>
		<pubDate>Sat, 13 Mar 2010 10:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-77</guid>
		<description><![CDATA[I think the following change does it:

hunk ./compiler/llvmGen/Llvm/Types.hs 527
-  show CC_Fastcc    = &quot;fastcc&quot;
+  show CC_Fastcc    = show (CC_Ncc 10)

I believe David had patched the ``fastcc&#039;&#039; calling convention directly in LLVM. However, now his patched fastcc is a separate calling convention now in LLVM-svn, `cc 10&#039;&#039;. The above diff simply replaces how he prints his CC_Fastcc with the new calling convention (cc 10).]]></description>
		<content:encoded><![CDATA[<p>I think the following change does it:</p>
<p>hunk ./compiler/llvmGen/Llvm/Types.hs 527<br />
-  show CC_Fastcc    = &#8220;fastcc&#8221;<br />
+  show CC_Fastcc    = show (CC_Ncc 10)</p>
<p>I believe David had patched the &#8220;fastcc&#8221; calling convention directly in LLVM. However, now his patched fastcc is a separate calling convention now in LLVM-svn, `cc 10&#8221;. The above diff simply replaces how he prints his CC_Fastcc with the new calling convention (cc 10).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alpmestan</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-76</link>
		<dc:creator><![CDATA[alpmestan]]></dc:creator>
		<pubDate>Sat, 13 Mar 2010 07:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-76</guid>
		<description><![CDATA[Can you detail your solution a bit ? People in the community are having the same issues apparently. Thanks !]]></description>
		<content:encoded><![CDATA[<p>Can you detail your solution a bit ? People in the community are having the same issues apparently. Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saynte</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-75</link>
		<dc:creator><![CDATA[saynte]]></dc:creator>
		<pubDate>Sat, 13 Mar 2010 05:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-75</guid>
		<description><![CDATA[Ah, I realized my problem: llvm now has the correct changes in the trunk, so I skipped the patching step for llvm. What I had to do to make it work was patch one of the GHC generated files to use the new calling convention that was just added to llvm.]]></description>
		<content:encoded><![CDATA[<p>Ah, I realized my problem: llvm now has the correct changes in the trunk, so I skipped the patching step for llvm. What I had to do to make it work was patch one of the GHC generated files to use the new calling convention that was just added to llvm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alpmestan</title>
		<link>http://alpmestan.wordpress.com/2010/03/11/getting-ghc-head-and-llvm-working-together/#comment-74</link>
		<dc:creator><![CDATA[alpmestan]]></dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://alpmestan.wordpress.com/?p=103#comment-74</guid>
		<description><![CDATA[Well, my version has been built based on patches until Feb 28th (ghc version 6.13.20100228). If you handle to revert until that date&#039;s patches it should be fine.]]></description>
		<content:encoded><![CDATA[<p>Well, my version has been built based on patches until Feb 28th (ghc version 6.13.20100228). If you handle to revert until that date&#8217;s patches it should be fine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
