From owner-freebsd-current@FreeBSD.ORG Fri Sep 14 15:42:25 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAC8B16A417 for ; Fri, 14 Sep 2007 15:42:25 +0000 (UTC) (envelope-from ragge@ludd.ltu.se) Received: from mxi.ltu.se (mxi.ltu.se [130.240.42.23]) by mx1.freebsd.org (Postfix) with ESMTP id 8FAAA13C428 for ; Fri, 14 Sep 2007 15:42:25 +0000 (UTC) (envelope-from ragge@ludd.ltu.se) Received: from [130.240.112.103] (mandarine.its.ltu.se [130.240.112.103]) by mxi.ltu.se (8.13.1/8.13.1) with ESMTP id l8EEujcV019612 for ; Fri, 14 Sep 2007 16:56:45 +0200 Message-ID: <46EAA12D.4090207@ludd.ltu.se> Date: Fri, 14 Sep 2007 16:56:45 +0200 From: Anders Magnusson User-Agent: Thunderbird 1.5.0.12 (X11/20070718) MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 17 Sep 2007 12:02:39 +0000 Subject: Compiling with another compiler than gcc. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2007 15:42:26 -0000 (FYI: this mail was sent to a NetBSD mailing list, but it may be people interested of it here also) Hm, I realized that there were more people interested in this compiler, so I'll send a mail about it on these lists also. I have setup a mailing list about pcc, join it by: _echo "subscribe pcc-list" | Mail majordomo@ludd.ltu.se_ or similar. There is also an embryo to a web page about pcc; http://www.ludd.ltu.se/~ragge/pcc/ which contains some basic information. I have (as some people may know) been hacking on pcc for fun for some years. After having that project on the shelf for a year or so, I decided to make the compiler at least compile the NetBSD source tree again. It is not yet bug-free, but it can compile the i386 userspace. The big benefit of it (apart from that it's BSD licensed, for license geeks :-) is that it is fast, 5-10 times faster than gcc, while still producing reasonable code. The only optimization added so far is a multiple-register-class graph-coloring register allocator, which may be one of the best register allocators today. Conversion to SSA format is also implemented, but not yet the phi function. Not too difficult though, after that strength reduction is high on the list. It is also quite simple to port, writing the basics for i386 took three hours (hello world) and complete port (pretty much as it is right now) two days. I have added most of the C99 stuff (it is supposed to be a c99 compiler) but some stuff is still missing, like the ability to do variable declarations anywhere (requires some rewriting of the yacc code). If someone wants to look at the compiler it can be fetched from ftp://226.net120.skekraft.net/pcc/pcc-current.tgz, current version is 0.9.8. Currently only the i386 port is "supported", but there are a bunch of architectures included that probably wont compile. -- Ragge