From owner-freebsd-current@FreeBSD.ORG Wed Jan 4 22:10:37 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 C12BA106566C for ; Wed, 4 Jan 2012 22:10:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F01B8FC19 for ; Wed, 4 Jan 2012 22:10:37 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so21089887obb.13 for ; Wed, 04 Jan 2012 14:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JCYNzAWeLcR+//ldgHQnZawW5yb/sxYqCT6ATYerlp0=; b=E4MAIkTjvps8lESffXBa9VeZApbxTH95EtU4oo/FnJP3QUPabTMsXyCqZlaBlL1XNx XpGv8B5Nmyzw6RGQx99hXO9oqXI/Ubd8qXE5U7hzQ4S2/82qgSElftovXEgm7E0Sutrq lkzEmRv1GsltnFVF8wPG6Qf3gu5RflcpOmcNI= MIME-Version: 1.0 Received: by 10.182.1.8 with SMTP id 8mr49324678obi.11.1325715036972; Wed, 04 Jan 2012 14:10:36 -0800 (PST) Received: by 10.182.152.6 with HTTP; Wed, 4 Jan 2012 14:10:36 -0800 (PST) In-Reply-To: <20120104222315.GA73613@onelab2.iet.unipi.it> References: <20120104222315.GA73613@onelab2.iet.unipi.it> Date: Wed, 4 Jan 2012 14:10:36 -0800 Message-ID: From: Garrett Cooper To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 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:10:37 -0000 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 Thanks, -Garrett