From 535977bff811d996bd61577e3e71af1393646951 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 18 Jan 2012 12:48:14 +0000 Subject: lib: Use -fvisibilty=hidden by default; only ABI symbols are now visible. http://gcc.gnu.org/wiki/Visibility --- src/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 28a1b920..b91ffc1c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,7 +55,8 @@ lib_LTLIBRARIES = libguestfs.la # This convenience library is solely to compile its generated sources with # custom flags. libprotocol_la_SOURCES = guestfs_protocol.c guestfs_protocol.h -libprotocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing +libprotocol_la_CFLAGS = \ + -Wall -Wno-unused -fno-strict-aliasing $(GCC_VISIBILITY_HIDDEN) # Build the errnostring perfect hash code. The generated code has lots # of warnings so we must compile it in a separate mini-library. @@ -63,7 +64,7 @@ liberrnostring_la_SOURCES = \ errnostring_gperf.c \ errnostring.h \ errnostring.c -liberrnostring_la_CFLAGS = +liberrnostring_la_CFLAGS = $(GCC_VISIBILITY_HIDDEN) errnostring_gperf.c: errnostring_gperf.gperf rm -f $@ @@ -163,7 +164,8 @@ libguestfs_la_CFLAGS = \ -DGUESTFS_WARN_DEPRECATED=1 \ $(HIVEX_CFLAGS) $(AUGEAS_CFLAGS) $(PCRE_CFLAGS) \ $(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(GCC_VISIBILITY_HIDDEN) libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib -- cgit