On Aug 26, 2011, at 7:50 AM, Michael Cashwell wrote:
> The problem is I can't unravel the byzantine libtool script to figure out why it's making this inappropriate "-lbfd" to "/usr/lib/libbfd.so" translation. The cross compiler has all of its target libraries segregated from host libs. libtool seems to be looking in host paths when it shouldn't be.
It's lame, but I'm answering my own post on this one.
It turns out that several add on packages (like cppunit, openssl and binutils) were using libtool to create their target libraries. That involved writing a .la file. The problem was that libtool doesn't really understand cross compiling and it was writing the --prefix path (that's supposed to be what the libraries see on the target at runtime) into the libdir= path (that's suppose to be used only at build/link time).
I couldn't get libtool to behave in this regard but a little sed magic on the target file system was able to fix the .la files.
With that done, oprofile builds fine. I'm having a runtime issue but that'll be a separate post.