Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2012 14:10:36 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        current@freebsd.org
Subject:   Re: add 'ldd' to cross-tools ?
Message-ID:  <CAGH67wR0jwr9vtJWNCB=-947TSAxciEf971m4keNNkwxvO9SeQ@mail.gmail.com>
In-Reply-To: <20120104222315.GA73613@onelab2.iet.unipi.it>
References:  <20120104222315.GA73613@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 4, 2012 at 2:23 PM, Luigi Rizzo <rizzo@iet.unipi.it> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wR0jwr9vtJWNCB=-947TSAxciEf971m4keNNkwxvO9SeQ>