From owner-freebsd-mips@FreeBSD.ORG Tue Jun 1 02:26:38 2010 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A940D1065678; Tue, 1 Jun 2010 02:26:38 +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 4FBEA8FC17; Tue, 1 Jun 2010 02:26:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o512IInn018102; Mon, 31 May 2010 20:18:19 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 31 May 2010 20:18:27 -0600 (MDT) Message-Id: <20100531.201827.56628267929938337.imp@bsdimp.com> To: jmallett@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: 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: freebsd-mips@FreeBSD.org Subject: Re: HEADS UP: Toolchain changes coming soon. (Octeon, n32, n64) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 02:26:38 -0000 In message: Juli Mallett writes: : Over the next day or two I am planning to merge changes to GCC and : binutils adding support for Octeon and the n32 and n64 ABIs, as well : as fixing a couple of bugs in our GCC spec. Note that the : Octeon-related patches are necessary to support the Cavium Octeon : Simple Executive, which I am planning to import after these changes : have been committed, which will be terribly helpful for the Octeon : port, in particular a new network driver and hopefully soon crypto and : PCI support. : : If you have any questions or comments please get in touch with me. : The contents of the patch may shift some before commit as I do testing : on a wider variety of platforms. : : The full patch to GCC and binutils is at this URL, and I have : reproduced the description below: : : http://people.freebsd.org/~jmallett/mips-toolchain.diff : : o) Add TARGET_ABI to the MIPS toolchain build process. This sets the : default ABI to one of o32, n32 or n64. If it is not set, o32 is : assumed as that is the current default. : o) Set the default GCC cpu type to any specified TARGET_CPUTYPE. This : is necessary to have a working "cc" if e.g. mips64 is specified, as : binutils will refuse to link objects using different ISAs in some : cases. : o) Add support for n32 and n64 ABIs to binutils and GCC. : o) Add additional required libgcc2 stubs for n32 and n64. : o) Add support for the "mips64r2" architecture to GCC. Add the "octeon" : o) When static linking, wrap default libraries in --start-group and : --end-group. This is required for static linking to work on n64 with : the interdependencies between libraries there. This is what other : OSes that support n64 seem to do, as well. : o) Fix our GCC spec to define __mips64 for 64-bit targets, not : __mips64__, the former being what libgcc, etc., check and the latter : seemingly being a misspelling of a hand merge from a Linux spec. : o) When no TARGET_CPUTYPE is specified at build time, make GCC take : the default ISA from the ABI. Our old defaults were too liberal and : assumed that 64-bit ABIs should default to the MIPS64 ISA and that : 32-bit ABIs should default to the MIPS32 ISA, when we are supporting : or will support some systems based on earlier 32-bit and 64-bit ISAs, : most notably MIPS-III. : o) Merge a new opcode file (and support code) from a later version of : binutils and add flags and code necessary to support Octeon-specific : instructions. This should also make merging opcodes for other modern : architectures easier. Great work Juli... I plan on merging my TBEMD branch after the dust from this settles down. Juts so people know... Warner