From owner-freebsd-current@FreeBSD.ORG Wed Jan 4 23:28:48 2012 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 8AB10106566B for ; Wed, 4 Jan 2012 23:28:48 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 251528FC08 for ; Wed, 4 Jan 2012 23:28:47 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (SSLv3:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RiZgd-000A7a-Ls for freebsd-current@freebsd.org; Wed, 04 Jan 2012 14:52:02 -0800 Message-ID: <4F04D810.60304@freebsd.org> Date: Wed, 04 Jan 2012 14:52:00 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <20120104222315.GA73613@onelab2.iet.unipi.it> In-Reply-To: <20120104222315.GA73613@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 04/01/2012 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 ? [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 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 23:28:48 -0000 On 04/01/2012 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 ? AFAIK ldd can't be used as a cross-tool. It sets some env variables for loader (e.g. ld-elf.so), calls execve or dlopen and relies on ld.so to print all the required data. You might get away with it on amd64/i386 host-target pair but it's not going to work for i386/arm or i386/mips pair.