OSDN Git Service

We should link against -lc before any of the binutils libs (libiberty/bfd)
authorDavid McCullough <davidm@snapgear.com>
Sun, 2 Nov 2008 23:13:45 +0000 (23:13 +0000)
committerDavid McCullough <davidm@snapgear.com>
Sun, 2 Nov 2008 23:13:45 +0000 (23:13 +0000)
commit4565de8dfc8dcbf5b4499d370cda376982b4398c
tree0f20e915027fabce4d5191346974efa7fed1bb8d
parent6a93642380b57bb272b96df6a350e50a4c984015
We should link against -lc before any of the binutils libs (libiberty/bfd)
as those libs provide replacements for some common functions we don't really
care about (like getopt).  Otherwise, if the C library does something wacky
in its API (like renaming symbols), we get a desync where some symbols are
provided by the binutils libs while others are provided by the C library.

For a concrete example, try building elf2flt on OS X 10.5.  Their stupid
headers do this in unistd.h:

int getopt(int, char * const [], const char *) __asm("_" "getopt" "$UNIX2003");

The resulting elf2flt binaries are incapable of properly parsing any option
given to them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
configure.in