From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 19 15:22:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A948D1065670 for ; Thu, 19 Jun 2008 15:22:51 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 24D0E8FC1A for ; Thu, 19 Jun 2008 15:22:50 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so464497fgb.35 for ; Thu, 19 Jun 2008 08:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=rk3JxaqBUImni5gMGS09AecBCMDWCssQuPOrJanXWzc=; b=f5zLdI8X3sS8QVj0uL24Twc9nrwIPbhgh83kw3ASA+DgLa7JL3abrKQ2eE3hB98ouX OJ5WebPF8n6JnA/Y3TTxYNyStryIPJmfk6Lsms0Nk9gHuD/u3CxxIQgJhYV2jp4Dhn1H MwwSWfyskC7K40l2DbojMY2ybL/XQtM0t44+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=bH27vCTWERJmQqZwkUuYl8KtIG1YE05JuNM/8509F92J0gNi9zKQh3he12S49smLR/ BBz6hnidHstdfHc9uJfpYj5P5DoBreHwbEDAGzTVHxu8UThq9ASLH3Sw7iIiIn2I+AR3 IEw/77gX1KwTpMa8fR2tf25lKM5Yopxa2Ma1g= Received: by 10.86.70.11 with SMTP id s11mr2279685fga.71.1213888957540; Thu, 19 Jun 2008 08:22:37 -0700 (PDT) Received: by 10.86.51.1 with HTTP; Thu, 19 Jun 2008 08:22:37 -0700 (PDT) Message-ID: <7d6fde3d0806190822s1420dcake3a38be7189b8ab0@mail.gmail.com> Date: Thu, 19 Jun 2008 08:22:37 -0700 From: "Garrett Cooper" To: "Alexander Sack" In-Reply-To: <3c0b01820806190629o7264cfaeg6fa6a08a6822047e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820806190629o7264cfaeg6fa6a08a6822047e@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Cross platform building best practices (building 6 on 7) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 15:22:51 -0000 On Thu, Jun 19, 2008 at 6:29 AM, Alexander Sack wrote: > Hello Folks: > > I've done a lot of Googling and scouring the lists about this > particular subject so I apologize for rehashing it. However, I'm > still confused on what's the best way to perform BSD cross platform > builds. Ideally what I want to have is an environment whereby I can > build a 6.1-RELEASE tree on a 7.0-RELEASE box. I thought originally I > could check out a 6.1 release version, perform make world, and then > use the output of that build as either a basis for a jail or a > toolchain. However, as noted by previous threads, 6.x doesn't build > on a 7.x due to gcc4/binutils compatibility issues (please correct me > if I'm wrong). I then thought I could potentially download a patched > binutils, copy it into src/contrib/binutils and that would potentially > fix it. No dice (and I'm still debugging why since this binutils > package DOES build outside of the make world infrastructure without > issue, this very well could be pilot error on my part since I didn't > update the VERSION string and didn't trim the source files as per the > FreeBSD-deleteList etc.). > > I THEN thought if I build/install a gcc-3.x/bintuils toolchain I could > complie a 6.x on a 7.x machine. Well I haven't done that yet since at > this point I believe I'm diverged from the path of FreeBSD build > enlightenment! Moreover, if would be NICE if I could bootstrap the > normal dev tools from the exiting make world build tree. I'm not yet > ready for a lot of hackery on the build tree without asking around. > :D! > > Does anyone due cross-platform builds (without host virtualization)? > > Thanks! > > -aps (I'll stick to just hackers@ because I don't want to pollute questions@ unnecessarily) You touched on an important point. There were some code quality issues (I think) with 6.x that were resolved moving to 7.x, which caused gcc-4.2.x to barf. gcc-4.2.x requires a newer version of binutils, just because (for API / usage compatibility). What you should probably do is create a jail then do your development for 6.x in a jail, 7.x in another, and (if you're bold enough ;)...) do 8.x development in yet a third. Jail's are a much better way to isolate things such that you don't have to worry about toolchain issues like these and are able to setup a sourcebase as the devs intended it (for the most part; you may run into issues with sysctls and virtual kernel stuff like that, but cest la vie... there isn't a better way I know of than that outside of running a VM). -Garrett