From owner-freebsd-current@FreeBSD.ORG Fri Feb 22 17:52:36 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C2C16A402; Fri, 22 Feb 2008 17:52:36 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.77]) by mx1.freebsd.org (Postfix) with ESMTP id 4192613C478; Fri, 22 Feb 2008 17:52:36 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp004-s [10.150.69.67]) by smtpoutm.mac.com (Xserve/smtpout014/MantshX 4.0) with ESMTP id m1MHqaTO005361; Fri, 22 Feb 2008 09:52:36 -0800 (PST) Received: from mini-g4.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp004/MantshX 4.0) with ESMTP id m1MHqXgx021997 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 22 Feb 2008 09:52:33 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Ruslan Ermilov In-Reply-To: <20080222102409.GD57428@team.vega.ru> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 22 Feb 2008 09:52:32 -0800 References: <20080221131209.GA2022@plan0.kaiwan.csbnet.se> <20080221140247.GC2022@plan0.kaiwan.csbnet.se> <20080221143351.GP57756@deviant.kiev.zoral.com.ua> <20080221152549.GB21518@team.vega.ru> <20080221173150.GA93693@dragon.NUXI.org> <20080222070728.GA56282@team.vega.ru> <20080222091642.GB57428@team.vega.ru> <20080222093234.GB17107@dragon.NUXI.org> <20080222102409.GD57428@team.vega.ru> X-Mailer: Apple Mail (2.919.2) Cc: current@freebsd.org, "Dag-Erling C. Smorgrav" , Kai Wang , Joseph Koshy Subject: Re: [HEADS UP] ar(1) front-end committed. (notes for cross compile) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:52:36 -0000 On Feb 22, 2008, at 2:24 AM, Ruslan Ermilov wrote: >>> - Handle upgrades nicely: use GNU ar(1) during the build on older >>> systems, and use BSD ar(1) on newer systems. >> >> If we need GNU ar for the upgrade path - then lets just install it >> (and >> its manage) as gnu-ar and let that be that. >> > I don't get you, GNU ar(1) is always installed. Only the name is > changes. But let me explain more about the upgrades. > > Currently, we always build binutils as part of cross-tools, including > GNU ar(1) and ranlib(1). These binaries are then used during the > build. > The BSD ar(1) doesn't need to be a cross-tool -- it doesn't depend on > TARGET_ARCH/TARGET and is platform-neutral. I'm very pleased to read this. Thank you Kai, Joseph and Tim of course! > Unfortunalely, since we provide the WITH_GNUAR option, we don't know > if > /usr/bin/ar and /usr/bin/ranlib are GNU or BSD versions, so we should > always bootstrap BSD ar(1). Can we determine this at runtime by running ar -v. If the output is more than 20 lines, it's GNU ar :-) Seriously: we could run ar --version (provided we add the support for that to BSD ar) and check the first word. It's either GNU or BSD (provided the output of BSD ar starts with BSD). This should eliminate any and all kind of guessing and should help in getting FreeBSD buildable on non-FreeBSD systems as well. Just a thought... -- Marcel Moolenaar xcllnt@mac.com