configure.ac: add -fvisibility=hidden if supported

None of our symbols are available for a dynamic library, and if they
were, there would be no point in allowing them to be overridden. This
optimizes code generation for global symbols.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2018-05-30 11:48:00 -07:00
parent 740ec3572b
commit 7310d0bd5b

View File

@ -260,6 +260,12 @@ PA_ARG_ENABLED([sanitizer],
PA_ADD_CLDFLAGS([-fsanitize=address])
PA_ADD_CLDFLAGS([-fsanitize=undefined])])
dnl
dnl Don't make symbols visible, there is no point and it just
dnl makes the code slower.
dnl
PA_ADD_CLDFLAGS([-fvisibility=hidden])
dnl If we have gcc, add appropriate code cleanliness options
PA_ADD_CFLAGS([-W])
PA_ADD_CFLAGS([-Wall])