[zeromq-dev] [PATCH] DSO symbol visibility

Martin Lucina mato at kotelna.sk
Thu Nov 25 16:33:49 CET 2010


mato at kotelna.sk said:
> a) It'll fail on GCC < 4.0. For this I need to write an autoconf test that
> will check if -fvisibility is actually supported by the compiler and if
> not, just not use it. The parts in the actual source code can check against
> __GNUC_MAJOR__.
> 
> Has anyone ever done anything like this with autoconf? How to check if the
> compiler supports some flag is not obvious... Help with auto-kung-fu
> appreciated :-)
> 
> b) It *should* work on Windows; there we already use __declspec() so for
> the sake of sanity I guess we should not touch -fvisibility at all?

The attached version should be good to go and resolve a) and b) above.

Unsure if it's good practice to use _LT_COMPULER_OPTION in autoconf tests
but it does appear to work.

-mato

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Control-symbol-exports-using-fvisibility.patch
Type: text/x-diff
Size: 4464 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101125/35c15ca3/attachment.patch>


More information about the zeromq-dev mailing list