From 7310d0bd5b04ea270a6630efa759d3ecf2622b28 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 30 May 2018 11:48:00 -0700 Subject: [PATCH] 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 --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) 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])