[mpich-devel] Weak symbols, clang, and users compiling with -fvisibility=hidden

Jed Brown jedbrown at mcs.anl.gov
Mon Jan 6 13:43:31 CST 2014


Jed Brown <jedbrown at mcs.anl.gov> writes:
> So in summary, we can't have __attribute__((weak,alias("PMPI_..."))) in
> the header because:
>
>   1. it does not compile with gcc

It also does not compile with the new version of clang.

conftest.c:37:34: error: alias must point to a defined variable or function
int foo(void) __attribute((weak, alias("__foo")));
                                 ^

>   2. it breaks PMPI interposition with clang
>   3. it breaks -fvisibility=hidden with clang

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/devel/attachments/20140106/330dfe38/attachment.pgp>


More information about the devel mailing list