autoconf libelf and ARM cross-compilation -lelf linking
Mark Wielaard
mjw@redhat.com
Tue Sep 6 14:45:00 GMT 2011
Hi Turgis,
On Thu, 2011-09-01 at 16:22 +0200, Turgis, Frederic wrote:
> Well, AC_CHECK_HEADERS([libelf.h],[staprun_LIBS="$staprun_LIBS -lelf"],[]) works fine in fact, I just needed a bit more info to perform the right generation of configure.
> With that, cross-linking does not fail if cross environment does not have libelf.
>
> However I was told internally to use AC_CHECK_LIB instead. So 2 points:
> - This requires a symbol to test at link so I tried to find something generic in libelf.h -> "elf_begin". Feel free to find more generic
> AC_CHECK_LIB(elf, elf_begin, [staprun_LIBS="$staprun_LIBS -lelf"], [])
That looks sane, but I would like to move assignment into the already
existing AC_CHECK_LIB that tests for the function we actually want to
use (elf_getshdrstrndx). Patch attached. Would that work for you?
Thanks,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20110906/5bde5f99/attachment.bin>
More information about the Systemtap
mailing list