From owner-freebsd-current@FreeBSD.ORG Thu Feb 21 13:41:12 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32E8616A401 for ; Thu, 21 Feb 2008 13:41:12 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by mx1.freebsd.org (Postfix) with ESMTP id DB67A13C4FB for ; Thu, 21 Feb 2008 13:41:11 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so9534anc.13 for ; Thu, 21 Feb 2008 05:41:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:x-authentication-warning:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=UbQFrLspYp5x4eeUM+lT0+IO2ONpx/QI0WLaaQQc8IY=; b=WvDKC3zasL6AjAe7CvFIio6YLOd8XJHPCW4Izj0LSHlnZx0Ct9Cy0htbpFCU6E4ULrEKwYUfdaquqwrc9EJQ7ZoXlBFKwNvzNDGLo6Bk0GmihaHusNTH9vYXUeXvem+KNkqBwarTNLcmL6iAfHejpoUhK/Cu+3nnFXEEMP4S0FU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=SuAr7WRbGnSCNOZjpDJ27kBmle0SBC2LfICg5j+lSPTdCaB61z6l1sc+DcNH9+rDVegKV0Gga+7UVJYaKiLGjn5l8a7R5e1KD8CKCaFOleJl9bERlrERB/iL9hkw11SSiIAWv3S3JEqAPSeDv69pTaz7PXeRlZAGqPTS3u6MIUw= Received: by 10.100.125.12 with SMTP id x12mr19970982anc.84.1203601271049; Thu, 21 Feb 2008 05:41:11 -0800 (PST) Received: from plan0.kaiwan.csbnet.se ( [193.11.244.12]) by mx.google.com with ESMTPS id 20sm23857agd.11.2008.02.21.05.41.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Feb 2008 05:41:09 -0800 (PST) Received: from localhost ([127.0.0.1] helo=plan0.kaiwan.csbnet.se) by plan0.kaiwan.csbnet.se with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JSC0d-0000f1-96 for freebsd-current@freebsd.org; Thu, 21 Feb 2008 15:02:47 +0100 Received: (from kaffir@localhost) by plan0.kaiwan.csbnet.se (8.14.2/8.14.2/Submit) id m1LE2lf4002542 for freebsd-current@freebsd.org; Thu, 21 Feb 2008 15:02:47 +0100 (CET) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: plan0.kaiwan.csbnet.se: kaffir set sender to kaiwang27@gmail.com using -f Date: Thu, 21 Feb 2008 15:02:47 +0100 From: Kai Wang To: freebsd-current@freebsd.org Message-ID: <20080221140247.GC2022@plan0.kaiwan.csbnet.se> Mail-Followup-To: freebsd-current@freebsd.org References: <20080221131209.GA2022@plan0.kaiwan.csbnet.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080221131209.GA2022@plan0.kaiwan.csbnet.se> User-Agent: Mutt/1.5.17 (2007-11-01) 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: Thu, 21 Feb 2008 13:41:12 -0000 On Thu, Feb 21, 2008 at 02:12:09PM +0100, Kai Wang wrote: > Hello list, > > I just committed ar(1) front-end. Note that you NEED update your > world before you can successfully perform cross platform buildworld. > > You can update your system by: > make buildworld > ... > make installworld > > or you can just install ar(1) by hand. > (replace /usr/bin/ar and /usr/bin/ranlib by hand) > > This is needed because GNU Binutils ar and ranlib gets renamed to gar > and granlib, and when you perform a cross platform buildworld, the > build system will instead use /usr/bin/ar and /usr/bin/ranlib, which > is not capable of cross build. I think it's neccessary to explain it a bit. When you start cross-platform world build, the toolchain targarting that platform will be built first. Then the resulting cross-platform toolchain is used to build the world for that platform. ar(1) and ranlib(1) are part of the toolchain. After I renamed them to gar and granlib, the build system can no longer find them, as a result it will use default ones, i.e., /usr/bin/ar and /usr/bin/ranlib, which target your current platform and thus can not be used to cross build. You can solve this problem by updating your own world first, or by replacing '/usr/bin/ar' and '/usr/bin/ranlib' with 'BSD' ar and ranlib by hand. 'BSD' ar is platform independent and handles all the ELF targets thus can be used directly (no need to recompile itself for target platform) by the build system. Best Regards, Kai