[Libwebsockets] [libwebsockets] #98: Check if compiler supports visibility flag?

Trac trac at libwebsockets.org
Tue Jan 27 12:34:47 CET 2015

#98: Check if compiler supports visibility flag?
 Reporter:  stevenylai             |      Owner:
     Type:  defect                 |     Status:  new
 Priority:  minor                  |  Milestone:
Component:  libwebsockets library  |    Version:
 Keywords:                         |
 GCC's visibility flag is only avaiable for versions >= 4 and it throws a
 compiler error when I'm using my mipsel-gcc 3.4 to compile the lib.

 I've been using some sort of hackish shell script to remove the script
 upon build but I think there may be an easier way since CMake has

 I've forked the repo on github and added the fix so that
 '-fvisibility=hidden' will be checked before added to the CFLAGS list:

 I've tested the fix on both mipsel-gcc-3.4 and gcc-4.8 and it works. Could
 you please see if it's OK to integrate it to the master? I can send you a
 pull request on github if you want.

Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/98>
libwebsockets <http://libwebsockets.org>
libwebsockets C library

More information about the Libwebsockets mailing list