From owner-freebsd-mips@FreeBSD.ORG Fri Mar 5 16:23:20 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 277E51065686; Fri, 5 Mar 2010 16:23:20 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E86408FC1D; Fri, 5 Mar 2010 16:23:19 +0000 (UTC) Received: by pwj1 with SMTP id 1so2737825pwj.13 for ; Fri, 05 Mar 2010 08:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/YrrboqI4ecLw6OBAZpblt85rGwzxSdx1CDuEh3SlqQ=; b=Csatrst/w1J/A5Ffi6WlsB0yzGl6S+oeBjkCo9OgYpOwqkkuRp0ogN6ZlYYIgp7TuA gFaGspTZT4QHvr6DYLrRnx+daXmR/0Z9vvThcdI+XmHi+wa4SZ2tOUCPGvLorT8rhEAo OT+L7kMSbUZzi0yOMtD0MX7hWdeFrNz/U0W6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Iv8ctofIYqkROOL+nlxpO2aBdmxjCPSGwJUy+Y7P7iqpdGWrZvAUrpiP/OWPC/fW9H D/TmRTbEOuywIeG2HxN7UWiqYWsKXur1y6aK/dKFYQCrTqZdmcpyKIC+bnrAIRXhS9te gxEkSkVZKptCcXBL0zDKILy0D5AH2kbHdrOXg= MIME-Version: 1.0 Received: by 10.140.55.5 with SMTP id d5mr730584rva.243.1267806193751; Fri, 05 Mar 2010 08:23:13 -0800 (PST) In-Reply-To: <20100305.081948.255476964173693445.imp@bsdimp.com> References: <98a59be81003050215m753799dbu35d2b2eab65e75db@mail.gmail.com> <20100305.081948.255476964173693445.imp@bsdimp.com> Date: Fri, 5 Mar 2010 21:53:13 +0530 Message-ID: <98a59be81003050823r57b5dc4alfc58018ffbb74731@mail.gmail.com> From: "C. Jayachandran" To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: n64/n32 - build support patches 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: Fri, 05 Mar 2010 16:23:20 -0000 On Fri, Mar 5, 2010 at 8:49 PM, M. Warner Losh wrote: > CJ, > > Thanks for all the work in this area. =A0I know that Julie Mallett is > also working in this area, and I've done some work to clean up the > build system. =A0I'm afraid that we now have some conflicts between the > different efforts, and that it may take a little to resolve the > conflicts. This is okay, I can rebase the patch when the other efforts are in, (or can merge other efforts after this goes in). I need a base on which to start work on n64/n32 and I'm making my changes available as it may be useful for others working in the same area. Regards, JC. > In message: <98a59be81003050215m753799dbu35d2b2eab65e75db@mail.gmail.com> > =A0 =A0 =A0 =A0 =A0 =A0"C. Jayachandran" write= s: > : I've updated the patches for building n64 and n32 kernel and > : userspace, =A0please review. The patches are: > : > : Tool chain support for n64 and n32:: > : http://sites.google.com/site/cjayachandran/files/n64-n32-toolchain.patc= h > > : This updates the gcc configuration =A0to provide the default ABI, linke= r > : scripts and endianness flags during n64/n32 and o32 builds. With this > : change, we don't need the -Wl, flags for linker emulation, the mabi > : flags or the -EB/-EL for compiler. > > This part of the patch looks good. > > : I had to add a make variable in TARGET_DEFINES in > : gnu/usr.bin/cc/Makefile.tgt and use that to pass the defaults while > : creating 'tm.h' - this change is not MIPS-specific. > > TARGET_DEFINES is OK. =A0I'm not sure about the other Makefile variables > and would like to find some way to not need them. > > : User/kernel build with n64 and n32: > : http://sites.google.com/site/cjayachandran/files/n64-n32-build.patch > : > : updated bsd.cpu.mk which does not set LDFLAGS, adds ldscript.mips.n32 > : and removes unnecessary flags from Makefile.mips. > > +.if ${MACHINE_ARCH} =3D=3D "mips" > +. if defined(TARGET_64BIT) > +. =A0if defined(TARGET_BIG_ENDIAN) > +LD +=3D -melf64btsmip_fbsd > +. =A0else > +LD +=3D =A0-melf64ltsmip_fbsd > +. =A0endif > +. elif defined(TARGET_N32) > +. =A0if defined(TARGET_BIG_ENDIAN) > +LD +=3D -melf32btsmipn32_fbsd > +. =A0else > +LD +=3D =A0-melf32ltsmipn32_fbsd > +. =A0endif > > I'd rather find some way to avoid adding TARGET_64BIT, TARGET_N32. > I've been working to eliminate TARGET_BIG_ENDIAN because it is proving > to be unworkable in practice, especially as these machines become more > self-hosting. > > If you don't mind, I'll pull in the parts that don't conflict with the > other work in this area, and we can then look at the harder problem of > which pieces of that goes in. > > Warner > --=20 C. Jayachandran c.jayachandran@gmail.com