From owner-freebsd-ports@FreeBSD.ORG Tue Mar 2 16:54:06 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACDC106566C for ; Tue, 2 Mar 2010 16:54:06 +0000 (UTC) (envelope-from mi@bonkers.video-collage.com) Received: from bonkers.video-collage.com (static-71-243-118-22.bos.east.verizon.net [71.243.118.22]) by mx1.freebsd.org (Postfix) with ESMTP id 127398FC19 for ; Tue, 2 Mar 2010 16:54:05 +0000 (UTC) Received: from bonkers.video-collage.com (localhost [127.0.0.1]) by bonkers.video-collage.com (8.14.2/8.14.2) with ESMTP id o22GQmVc012892; Tue, 2 Mar 2010 11:26:48 -0500 (EST) (envelope-from mi@bonkers.video-collage.com) Received: (from mi@localhost) by bonkers.video-collage.com (8.14.2/8.14.2/Submit) id o22GQmZK012891; Tue, 2 Mar 2010 11:26:48 -0500 (EST) (envelope-from mi) From: Mikhail Teterin Message-Id: <201003021626.o22GQmZK012891@bonkers.video-collage.com> In-Reply-To: <20100302120017.4E76D106575E@hub.freebsd.org> To: freebsd-ports@freebsd.org Date: Tue, 2 Mar 2010 11:26:48 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.4 (bonkers.video-collage.com [0.0.0.0]); Tue, 02 Mar 2010 11:26:48 -0500 (EST) Cc: imp@bsdimp.com Subject: wishlist for GNU compilers (Best way to have a port...) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 16:54:06 -0000 Warner Losh wrote: > I'm trying to create a port for gcc and binutils that is configured > for FreeBSD for a given machine. FreeBSD mips, say. binutils was > relatively easy (once I ported our mips support forward). However, > gcc vexes me. This is not an answer to your question, but a related comment... What I always wanted from the various GNU compiler-ports (be they C, Pascal, Fortran, etc.), is for all of the possible architectures to be options: OPTIONS+= MIPS "Enable MIPS arch" on OPTIONS+= FOO "Enable FOO (beta)" off This would be similar to how the ghostscript ports are build -- each printer driver is an option, most of them are ON by default. The options for each GNU-compiler would start from the subset enabled for binutils (a separate port, LIB_DEPENDed on by the ports of compilers and debuggers). The binutilis port would, by default, support ALL architectures known to upstream developers. Eventually, the main system binutils will be built that way too, but it is best to practice on the ports, of course :-) This would allow any FreeBSD machine to generate code for any architecture (being able to /run/ that code has nothing to do with the ability to /generate/ it!), and analyze any core-dump. Ideally, each architecture back-end would be a port of its own -- like Apache "mods", for example -- but, without upstream support, this is way too much hacking... -mi