<div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Thanks!</span></div><div><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">This seems to do the trick wonderfully.</span><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">-ghclibdir = $(libdir)/ghc-$(ProjectVersion)</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)">+ghclibdir = $(libdir)/$(CrossCompilePrefix)ghc-$(ProjectVersion)</div>
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)"><br></div><div style="margin:0px">I've just done a clean build with this and it's working perfectly.</div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Aug 31, 2013 at 2:26 PM, Gabor Greif <span dir="ltr"><<a href="mailto:ggreif@gmail.com" target="_blank">ggreif@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 8/31/13, Luke Iannini <<a href="mailto:lukexipd@gmail.com">lukexipd@gmail.com</a>> wrote:<br>
</div><div class="im">> Hi Gabor!<br>
> Yes, I believe that's still the case (we're working around it by using<br>
> different prefixes for each architecture at the moment). And I think we<br>
> should definitely do what you propose. I'll see if I can get a patch<br>
> together shortly (or if someone already knows exactly what to do and wants<br>
> to do it first, feel free! : )).<br>
<br>
</div>This is probably where one should start,<br>
<br>
<a href="https://github.com/ghc/ghc/blob/master/mk/install.mk.in#L108" target="_blank">https://github.com/ghc/ghc/blob/master/mk/install.mk.in#L108</a><br>
<br>
but be careful with the 'if's in the makefile!<br>
<br>
Cheers,<br>
<br>
Gabor<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> Cheers<br>
> Luke<br>
><br>
><br>
> On Sat, Aug 31, 2013 at 4:50 AM, Gabor Greif <<a href="mailto:ggreif@gmail.com">ggreif@gmail.com</a>> wrote:<br>
><br>
>> Hi Luke, devs,<br>
>><br>
>> Just a quick question, as I haven't recently built a cross-compiler,<br>
>> but I have noticed a problem with installation of cross-ghc last time.<br>
>><br>
>> $ ls <prefix>/lib/ghc-7.7.20130412<br>
>><br>
>> The problem is, that when someone installs a non-cross<br>
>> compiler the same day, the cross-compiler's<br>
>> libraries and executables get overwritten<br>
>> by the non-cross installation :-(<br>
>><br>
>> This probably also happens with release versions.<br>
>><br>
>> Can you confirm this behaviour with HEAD?<br>
>><br>
>> In case yes, should we consider adding a<br>
>> cross-prefix, like employed in bin/ ?<br>
>><br>
>> $ ls <prefix>/bin/powerpc-montavista-linux-gnuspe-ghc-pkg-7.7.20130412<br>
>><br>
>> Of course all the links inside must be re-aligned accordingly.<br>
>><br>
>> Cheers,<br>
>><br>
>> Gabor<br>
>><br>
>><br>
>> On 8/31/13, Luke Iannini <<a href="mailto:lukexipd@gmail.com">lukexipd@gmail.com</a>> wrote:<br>
>> > I will tell Stephen!<br>
>> ><br>
>> > I've added iOS as Tier 2 — I bet we can find a sponsor for a buildbot<br>
>> down<br>
>> > the line — and I've added myself while I wait to hear from Stephen. It<br>
>> > looks like the mailto links on the wiki (e.g. the names in the Platform<br>
>> > Maintainers section) aren't working, by the way:<br>
>> > <a href="http://ghc.haskell.org/trac/ghc/wiki/CodeOwners" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/CodeOwners</a>.<br>
>> ><br>
>> > Cheers<br>
>> > Luke<br>
>> ><br>
>> ><br>
>> > On Fri, Aug 30, 2013 at 2:04 AM, Simon Peyton-Jones<br>
>> > <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>>wrote:<br>
>> ><br>
>> >> Great. Please thank Stephen too.. I don’t have his email.****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> Just go ahead and modify ****<br>
>> >><br>
>> >> <a href="http://ghc.haskell.org/trac/ghc/wiki/CodeOwners****" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/CodeOwners****</a><br>
>> >><br>
>> >> <a href="http://ghc.haskell.org/trac/ghc/wiki/Platforms****" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/Platforms****</a><br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> I assume iOS will become a tier-2 platform?****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> Simon****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> *From:* Luke Iannini [mailto:<a href="mailto:lukexipd@gmail.com">lukexipd@gmail.com</a>]<br>
>> >> *Sent:* 30 August 2013 09:07<br>
>> >> *To:* Simon Peyton-Jones<br>
>> >> *Cc:* Austin Seipp<br>
>> >><br>
>> >> *Subject:* Re: [Haskell-cafe] Announcing GHC iOS****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> Certainly! And I'd be happy to take on maintainership of GHC iOS if<br>
>> >> that's<br>
>> >> what you mean — I've committed to a very large project using it so<br>
>> >> I'll<br>
>> >> be<br>
>> >> maintaining it anyway : ). I'd guess Stephen would feel the same.****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> And thanks so much for the kind words, it means the world! Thank you<br>
>> >> infinitely for Haskell : ).****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> Cheers****<br>
>> >><br>
>> >> Luke****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> On Fri, Aug 30, 2013 at 12:32 AM, Simon Peyton-Jones <<br>
>> >> <a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>> wrote:****<br>
>> >><br>
>> >> Should we update the “Platform maintainers” on<br>
>> >> <a href="http://ghc.haskell.org/trac/ghc/wiki/TeamGHC****" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/TeamGHC****</a><br>
>> >><br>
>> >> or the list of supported platforms on<br>
>> >> <a href="http://ghc.haskell.org/trac/ghc/wiki/Platforms?****" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/Platforms?****</a><br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> *From:* Haskell-Cafe [mailto:<a href="mailto:haskell-cafe-bounces@haskell.org">haskell-cafe-bounces@haskell.org</a>] *On<br>
>> Behalf<br>
>> >> Of *Luke Iannini<br>
>> >> *Sent:* 29 August 2013 21:56<br>
>> >> *To:* Haskell Cafe<br>
>> >> *Subject:* Re: [Haskell-cafe] Announcing GHC iOS****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Stephen provided some more credits — thanks so much to all!****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Three connected projects concerning cross-compilation:****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> *Registerised ARM support, added using David Terei's LLVM compiler<br>
>> >> back<br>
>> >> end with Stephen Blackheath doing an initial ARMv5 version and LLVM<br>
>> patch<br>
>> >> and Karel Gardas working on floating point support, ARMv7<br>
>> >> compatibility<br>
>> >> and<br>
>> >> LLVM headaches. Ben Gamari did work on the runtime linker for ARM.****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> *General cross-compiling, with much work by Stephen Blackheath and<br>
>> >> Gabor<br>
>> >> Greif (though many others have worked on this).****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> *A cross-compiler for Apple iOS. iOS-specific parts were mostly<br>
>> >> Stephen<br>
>> >> Blackheath with Luke Iannini on the Cabal patch, testing and<br>
>> >> supporting<br>
>> >> infrastructure, also with assistance and testing by Miëtek Bak and<br>
>> >> Jonathan<br>
>> >> Fischoff, and thanks to many others for testing; The iOS cross<br>
>> >> compiler<br>
>> >> was<br>
>> >> started back in 2009 by Stephen Blackheath with funding from Ryan<br>
>> Trinkle<br>
>> >> of iPwn Studios.****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Thanks to Ian Lynagh for making it easy for us with integration,<br>
>> makefile<br>
>> >> refactoring and patience, and to David Terei for LLVM assistance.****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> On Thu, Aug 29, 2013 at 1:43 PM, Luke Iannini <<a href="mailto:lukexipd@gmail.com">lukexipd@gmail.com</a>><br>
>> >> wrote:*<br>
>> >> ***<br>
>> >><br>
>> >> Hi all!****<br>
>> >><br>
>> >> (in case you don't read /r/haskell : ))****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Stephen Blackheath and I are extremely happy to report that as of<br>
>> >> today,<br>
>> >> GHC can natively build binaries for iOS devices and the iOS<br>
>> >> Simulator.****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> You'll find everything you need here:<br>
>> >> <a href="http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS****" target="_blank">http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS****</a><br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> The short of it is you can use "ghc-ios myFiles.hs" to get a universal<br>
>> >> ARMv7/ARMv7s/i386 static library to drop straight into an Xcode<br>
>> >> project.**<br>
>> >> **<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Stephen's already working on some wonderful FRP-powered games, I'm<br>
>> >> working<br>
>> >> on a project called SpaceTime that I'll announce shortly, and you may<br>
>> now<br>
>> >> all begin creating insanely great iOS software using the finest<br>
>> >> language<br>
>> >> in<br>
>> >> the world : ).****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> Stephen deserves the lion's share of the credit for this project —<br>
>> >> it's<br>
>> >> been over 3 years in the making! Many thanks to Maxwell Swadling for<br>
>> >> generalizing static library builds into a -staticlib flag for GHC,<br>
>> Carter<br>
>> >> Schonwald for compilation guidance, and the venerable Austin Seipp for<br>
>> >> reviewing and merging our patches.****<br>
>> >><br>
>> >> ****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> ><br>
>><br>
><br>
</div></div></blockquote></div><br></div>