summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-05-30 11:48:00 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2018-05-30 11:48:00 -0700
commit7310d0bd5b04ea270a6630efa759d3ecf2622b28 (patch)
tree0786e9575a7457cefb340e1371d05ec79b1c46e6
parent740ec3572bb4a587a287cdcea201f12fa5f00501 (diff)
downloadnasm-7310d0bd5b04ea270a6630efa759d3ecf2622b28.tar.gz
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>
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 40a6f62c..ff2d91df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])