From owner-freebsd-current@FreeBSD.ORG Wed Jan 4 22:13:04 2012 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 D4DC7106566C for ; Wed, 4 Jan 2012 22:13:04 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 992E98FC22 for ; Wed, 4 Jan 2012 22:13:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 60F487300A; Wed, 4 Jan 2012 23:29:55 +0100 (CET) Date: Wed, 4 Jan 2012 23:29:55 +0100 From: Luigi Rizzo To: Garrett Cooper Message-ID: <20120104222955.GA73868@onelab2.iet.unipi.it> References: <20120104222315.GA73613@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: add 'ldd' to cross-tools ? 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: Wed, 04 Jan 2012 22:13:04 -0000 On Wed, Jan 04, 2012 at 02:10:36PM -0800, Garrett Cooper wrote: > On Wed, Jan 4, 2012 at 2:23 PM, Luigi Rizzo wrote: > > Hi, > > in doing cross-builds of picobsd, i found i need a cross-version > > of "ldd" so i can run it on the host to detect which shared libraries > > are used by binaries on the target architecture > > (for amd64->i386 there is a partial workaround, but don't know > > if it works in other cases) > > > > Is there any concern in adding usr.bin/ldd to the list of cross-tools > > in Makefile.inc1 ? It is a small program and should not increase > > the build time in any significant way. > > > > Otherwise, does anyone know the magic to build a cross-arch > > version of a program in the FreeBSD source tree ? > > objdump IMO is a lot easier to parse and it's already built via cross-tools: > > $ objdump -x `which tar` | awk '$1 == "NEEDED" { print $2 }' > libarchive.so.5 > libbz2.so.4 > libz.so.6 > liblzma.so.5 > libbsdxml.so.4 > libcrypto.so.6 > libc.so.7 wonderful, thanks! cheers luigi