From owner-freebsd-hackers Sun Sep 12 6:13:52 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.wxs.nl (smtp02.wxs.nl [195.121.6.60]) by hub.freebsd.org (Postfix) with ESMTP id 0CF3A14A06 for ; Sun, 12 Sep 1999 06:13:43 -0700 (PDT) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.148]) by smtp02.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA5E17; Sun, 12 Sep 1999 15:13:42 +0200 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id OAA82864; Sun, 12 Sep 1999 14:47:21 +0200 (CEST) (envelope-from asmodai) Date: Sun, 12 Sep 1999 14:47:21 +0200 From: Jeroen Ruigrok/Asmodai To: Simon Marlow Cc: "'hackers@freebsd.org'" Subject: Re: How to go about making a compiler port Message-ID: <19990912144720.C81750@daemon.ninth-circle.org> References: <8B57882C41A0D1118F7100805F9F68B51232C0E2@RED-MSG-45> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.7i In-Reply-To: <8B57882C41A0D1118F7100805F9F68B51232C0E2@RED-MSG-45> Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Simon Marlow (simonmar@microsoft.com) [990912 13:05]: >I'd like to make a port for our Haskell compiler, GHC (see >http://research.microsoft.com/users/t-simonm/ghc). There are some subtle >problems with this: > > - GHC depends on itself. That is, you need GHC > installed in order to build GHC. > - GHC depends on Happy, our parser generator. > - Happy depends on GHC (it's written in Haskell). >So, one solution would be to provide a binary port, say ghc-bin, which would >install a binary distribution. I checked the modula-3 port, and it doesn't >seem to have a binary port, so what's the accepted way of doing this? Well, you could also take a peek at net/cvsup-bin Another binary used a lot. It might give some ideas. >It's possible to bootstrap GHC from intermediate C files, but it's a bit >fiddly and I'd prefer not to do this if possible. However, one thing that >occurs to me is that the port could bootstrap itself from C if you say 'make >BOOTSTRAP=YES', and otherwise attempt to build using an installed GHC. *nod* That could be a solution. Although it requires a clue. Normally one does: make make install make clean What could be a solution would be to make and after the make go interactive and ask to try to bootstrap from C or use the GHC-binary. print/apsfilter is a good example of interactive stuff... >Any thoughts greatly appreciated. These are just some random thoughts. Surely I am missing some pitfalls, but these might spark some ideas. -- Jeroen Ruigrok van der Werven/Asmodai asmodai(at)wxs.nl The BSD Programmer's Documentation Project Network/Security Specialist BSD: Technical excellence at its best If I am telling you the Truth now, do you believe it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message