Huh. Can you make V=1 to build libmpi and use the same kind of options to build your sample library?

Sent from my PDA. No type good. 

On Oct 14, 2010, at 6:01 PM, "Jed Brown" <> wrote:

On Thu, Oct 14, 2010 at 23:53, Jeff Squyres <> wrote:
The configure test essentially looks like this -- could you try this manually and see what happens?

cat > conftest_weak.h <<EOF
int real(int i);
int fake(int i);

cat > conftest_weak.c <<EOF
#include "conftest_weak.h"
#pragma weak fake = real
int real(int i) { return i; }

cat > conftest.c <<EOF
#include "conftest_weak.h"
int main() { return fake(3); }

# Try the compile
clang $CFLAGS  -c conftest_weak.c
clang $CFLAGS  conftest.c conftest_weak.o -o conftest $LDFLAGS $LIBS

The configure test rules that weak symbol support is there if both compiler invocations return an exit status of 0.

They exit 0 and

$ nm conftest |g 'real|fake'
00000000004004a0 W fake
00000000004004a0 T real

so it looks like that is working fine.  It also works fine when I stuff it into a shared library:

$ clang -c -fPIC conftest_weak.c
$ clang -shared -fPIC conftest.c conftest_weak.o -o
$ nm |g 'real|fake'
00000000000005a0 W fake
00000000000005a0 T real

users mailing list