From 346aa683de6b84da4bb53a63693ec04858cbf952 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 18 Jan 2013 13:23:40 -0500 Subject: [PATCH] Fix visibility for glib/ and gio/ submodules We have various sub directories in glib/ and gio/ (eg: inotify, gnulib, pcre, xdgmime, etc.) that build convenience libraries that are then included into libglib and libgio. The files in these directories need to be built with the same visibility policy as the files in the first level directories, so add CFLAGS for them all. This wasn't a problem when the visibility flags were set directly in CFLAGS but then we had to deal with some modules that we built that we explicitly wanted to export symbols from. For now, we can keep things the way they are because it's less hacky and although it's a theoretical hazard to forget these CFLAGS, we rarely add new subdirectories to the build. --- gio/fen/Makefile.am | 1 + gio/inotify/Makefile.am | 1 + gio/kqueue/Makefile.am | 1 + gio/win32/Makefile.am | 1 + gio/xdgmime/Makefile.am | 1 + glib/gnulib/Makefile.am | 1 + glib/libcharset/Makefile.am | 1 + glib/pcre/Makefile.am | 1 + 8 files changed, 8 insertions(+) diff --git a/gio/fen/Makefile.am b/gio/fen/Makefile.am index 52af1cf7c..0a22a6456 100644 --- a/gio/fen/Makefile.am +++ b/gio/fen/Makefile.am @@ -20,6 +20,7 @@ libfen_la_SOURCES = \ $(NULL) libfen_la_CFLAGS = \ + $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ -DG_LOG_DOMAIN=\"GLib-GIO\" \ $(gio_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ diff --git a/gio/inotify/Makefile.am b/gio/inotify/Makefile.am index 22351268b..b51a0a903 100644 --- a/gio/inotify/Makefile.am +++ b/gio/inotify/Makefile.am @@ -22,6 +22,7 @@ libinotify_la_SOURCES = \ $(NULL) libinotify_la_CFLAGS = \ + $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ -DG_LOG_DOMAIN=\"GLib-GIO\" \ $(gio_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ diff --git a/gio/kqueue/Makefile.am b/gio/kqueue/Makefile.am index 40fd1fee0..652c43ed6 100644 --- a/gio/kqueue/Makefile.am +++ b/gio/kqueue/Makefile.am @@ -26,6 +26,7 @@ libkqueue_la_SOURCES = \ $(NULL) libkqueue_la_CFLAGS = \ + $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ -DG_LOG_DOMAIN=\"GLib-GIO\" \ $(gio_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ diff --git a/gio/win32/Makefile.am b/gio/win32/Makefile.am index 6f85a1586..b75bc36de 100644 --- a/gio/win32/Makefile.am +++ b/gio/win32/Makefile.am @@ -19,6 +19,7 @@ libgiowin32_la_SOURCES = \ $(NULL) libgiowin32_la_CFLAGS = \ + $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ -DG_LOG_DOMAIN=\"GLib-GIO\" \ $(gio_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ diff --git a/gio/xdgmime/Makefile.am b/gio/xdgmime/Makefile.am index 80783440d..fa39d05e5 100644 --- a/gio/xdgmime/Makefile.am +++ b/gio/xdgmime/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = -DXDG_PREFIX=_gio_xdg noinst_LTLIBRARIES = libxdgmime.la +libxdgmime_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS) libxdgmime_la_SOURCES = \ xdgmime.c \ xdgmime.h \ diff --git a/glib/gnulib/Makefile.am b/glib/gnulib/Makefile.am index ae8283d51..8ad4889b2 100644 --- a/glib/gnulib/Makefile.am +++ b/glib/gnulib/Makefile.am @@ -6,6 +6,7 @@ INCLUDES = $(glib_INCLUDES) -DG_LOG_DOMAIN=\"GLib\" \ noinst_LTLIBRARIES = libgnulib.la +libgnulib_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS) libgnulib_la_SOURCES = \ asnprintf.c \ printf-args.c \ diff --git a/glib/libcharset/Makefile.am b/glib/libcharset/Makefile.am index f5362df5a..0dd4f50b6 100644 --- a/glib/libcharset/Makefile.am +++ b/glib/libcharset/Makefile.am @@ -6,6 +6,7 @@ INCLUDES = \ noinst_LTLIBRARIES = libcharset.la +libcharset_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS) libcharset_la_SOURCES = \ libcharset.h \ localcharset.h \ diff --git a/glib/pcre/Makefile.am b/glib/pcre/Makefile.am index 1148a92ca..53669a0b2 100644 --- a/glib/pcre/Makefile.am +++ b/glib/pcre/Makefile.am @@ -25,6 +25,7 @@ libpcre_la_CPPFLAGS = \ $(AM_CPPFLAGS) libpcre_la_CFLAGS = \ + $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ $(PCRE_WARN_CFLAGS) \ $(DEP_CFLAGS) \ $(AM_CFLAGS)