Instruct configure to hide internal libgc.so symbols if supported (GCC)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 15 Dec 2011 15:01:47 +0000 (19:01 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 15 Dec 2011 15:01:47 +0000 (19:01 +0400)
commitd6f15183b4064af11ce78cbf8a55edb04ad4a672
tree0f03895145f886a22f1e82fb301b5c702cbbaace
parent58dc9c51b933676ac77f675773b09b181f11485e
Instruct configure to hide internal libgc.so symbols if supported (GCC)

* configure.ac (ac_cv_fvisibility_hidden): New variable (set to "yes"
if only shared library is built and GCC supports "-fvisibility" option.
* configure.ac (CFLAGS): Add "-fvisibility=hidden" and
"-DGC_VISIBILITY_HIDDEN_SET" if ac_cv_fvisibility_hidden is "yes".
* include/gc_config_macros.h (GC_API): Force "default visibility"
attribute if GC_VISIBILITY_HIDDEN_SET (only if GCC and GC_BUILD).
* tests/staticrootstest.c (GC_VISIBILITY_HIDDEN_SET): Test the macro
and skip the test if defined (since "staticrootslib" symbols are of
hidden visibility).
configure.ac
include/gc_config_macros.h
tests/staticrootstest.c