Linux-x86 Compatability

ISSUE: ExternalFunctions.cpp::lookupFunction() calls dlsym(RTLD_DEFAULT, ...). In glibc, dlfcn.h does not make RTLD_DEFAULT visible unless _GNU_SOURCE is #defined. Unlike the evil money-grubbing non-free software pigs at sun, the FSF is trying not to pollute the C namespace. :wink:

ACTION: Hack the Makefile to #define _GNU_SOURCE while compiling in tools/lli. Yes, I know that this is ugly.

PATCH: Apply from llvm top-level directory with "patch -p0".

patch (291 Bytes)

ISSUE: ExternalFunctions.cpp::lookupFunction() calls dlsym(RTLD_DEFAULT,
...). In glibc, dlfcn.h does not make RTLD_DEFAULT visible unless
_GNU_SOURCE is #defined. Unlike the evil money-grubbing non-free
software pigs at sun, the FSF is trying not to pollute the C namespace. :wink:

ACTION: Hack the Makefile to #define _GNU_SOURCE while compiling in
tools/lli. Yes, I know that this is ugly.

Applied. I actually applied this to the top level Makefile.common file so
that all directories get it:

http://mail.cs.uiuc.edu/pipermail/llvm-commits/2002-September/000170.html

-Chris

http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/