Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-embedded
Navigation:
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-embedded@g.o
From: Mike Frysinger <vapier@g.o>
Subject: Re: crossdev builds libiberty.a with host arch
Date: Wed, 9 Nov 2011 22:55:58 -0500
On Wednesday 09 November 2011 10:37:18 Joakim Tjernlund wrote:
> Tried to build oprofile
> ./configure --host powerpc-softfloat-linux-gnu
> LDFLAGS="-L/usr/lib/binutils/powerpc-softfloat-linux-gnu
> -L/usr/local/src/FS/fsall/basicfs/usr/lib"
> CPPFLAGS=-I/usr/lib/binutils/powerpc-softfloat-linux-gnu/include
> 
> configure: error: liberty library not found
> 
> this appears to be caused by crossdevs libiberty.a beeing built with the
> hosts arch instead of powerpc: nm
> /usr/i686-pc-linux-gnu/powerpc-softfloat-linux-gnu/lib/libiberty.a | grep
> __i686 00000000 T __i686.get_pc_thunk.bx
>  00000000 T __i686.get_pc_thunk.bx
>  ....
> 
> Bug in crossdev, oprofile or user error?

user error.  this is expected behavior: the libs under 
/usr/$CHOST/$CTARGET/lib/ are libraries that will be linked for $CHOST 
binaries but used to debug $CTARGET code.  libiberty is a bad example as it 
generally doesn't have any target info in it, so let's use libbfd.a as an 
example instead.

linking against /usr/$CHOST/$CTARGET/lib/libbfd.a will let you run code on 
$CHOST but load ELFs that are compiled for $CTARGET.

if you want to build oprofile for $CTARGET, you need to build binutils for 
$CTARGET (CHOST==CTARGET).
-mike
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: crossdev builds libiberty.a with host arch
-- Joakim Tjernlund
References:
crossdev builds libiberty.a with host arch
-- Joakim Tjernlund
Navigation:
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: crossdev builds libiberty.a with host arch
Next by thread:
Re: crossdev builds libiberty.a with host arch
Previous by date:
Re: crossdev builds libiberty.a with host arch
Next by date:
Re: crossdev builds libiberty.a with host arch


Updated Apr 23, 2012

Summary: Archive of the gentoo-embedded mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.