From owner-freebsd-ports@FreeBSD.ORG Tue Mar 2 06:53:59 2010 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D12D11065673 for ; Tue, 2 Mar 2010 06:53:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 965568FC1F for ; Tue, 2 Mar 2010 06:53:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o226pAuw058078 for ; Mon, 1 Mar 2010 23:51:10 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 23:51:25 -0700 (MST) Message-Id: <20100301.235125.431102609672430399.imp@bsdimp.com> To: ports@FreeBSD.org From: "M. Warner Losh" X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: 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 06:53:59 -0000 ... that builds part of FreeBSD? Let me back up... 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. It requires, to build libgcc and friends, a fully populated include tree. And it wants to use /usr/local/freebsd-mips/include instead of /usr/include (which is good). However, the former doesn't exist. I'd like to create a port for it, but I'm unclear how to even start. This port should consist of all files from make includes TARGET_ARCH=mips. So, some questions: First, how do I know where the FreeBSD source tree is? Is there some standard define like SYSDIR that contains this infomration? Second, I need to invoke make includes (and a few other things), with some slightly non-standard args. is there a stylied way to do this? I'd like to avoid extracting everything into myport/work/FreeBSD :) Without solving these problems, the notion that we can use a ports compiler to build FreeBSD becomes less viable... Comments? Warner