From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1S7O7m-0008Ba-G7 for ptxdist@pengutronix.de; Tue, 13 Mar 2012 10:34:34 +0100 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1S7O7m-0007z9-F5 for ptxdist@pengutronix.de; Tue, 13 Mar 2012 10:34:34 +0100 Date: Tue, 13 Mar 2012 10:34:34 +0100 From: Michael Olbrich Message-ID: <20120313093434.GD29221@pengutronix.de> References: <1331568014-17039-1-git-send-email-bernhard@bwalle.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1331568014-17039-1-git-send-email-bernhard@bwalle.de> Subject: Re: [ptxdist] [PATCH] lsof: Use cross ar and ranlib Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Mon, Mar 12, 2012 at 05:00:14PM +0100, bernhard@bwalle.de wrote: > From: Bernhard Walle > > The lsof build system uses host ar and ranlib. With that patch it uses > the tools provided by the cross toolchain. > > On a Gentoo system, without that patch, I get following error: > > ar cr liblsof.a ckkv.o cvfs.o dvch.o fino.o isfn.o lkud.o pdvn.o prfp.o ptti.o rdev.o regex.o rmnt.o rnam.o rnch.o rnmh.o snpf.o > ranlib liblsof.a > make[2]: Leaving directory `/home/tweber/work/COR4098_ptxdist/platform-upmed/build-target/lsof-4.81.dfsg.1/lib' > arm-cortexa8-linux-gnueabi-gcc -DLINUXV=32006 -DGLIBCV=213 -DHASIPv6 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ > -DHAS_STRFTIME -DLSOF_VSTR=\"3.2.6-gentoo\" -O2 -c -o usage.o usage.c > arm-cortexa8-linux-gnueabi-gcc -o lsof dfile.o dmnt.o dnode.o dproc.o dsock.o dstore.o arg.o main.o misc.o node.o print.o proc.o \ > store.o usage.o util.o -L./lib -llsof > ./lib/liblsof.a: could not read symbols: Archive has no index; run ranlib to add one > collect2: ld returned 1 exit status > > Signed-off-by: Bernhard Walle > --- > rules/lsof.make | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/rules/lsof.make b/rules/lsof.make > index b021758..4fa4ac9 100644 > --- a/rules/lsof.make > +++ b/rules/lsof.make > @@ -41,12 +41,14 @@ LSOF_PATH := PATH=$(CROSS_PATH) > > LSOF_ENV := \ > $(CROSS_ENV) \ > - LINUX_HASSELINUX=N > + LINUX_HASSELINUX=N \ > + LSOF_AR="$(CROSS_AR) cr" > > LSOF_MAKEVARS := \ > $(CROSS_ENV_CC) \ > LSOF_USER=none \ > - DEBUG=-O2 > + DEBUG=-O2 \ > + RANLIB="$(CROSS_RANLIB) liblsof.a" Stupid broken Configure... Not nice, but I don't see any other way to do this. Applied. Michael > > # > # autoconf > -- > 1.7.9.3 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de