build-sys: Mark libpriv symbols as private

This was caught by the abicheck in Fedora; since we were building with default
visibility for `librpmostreepriv.la` which was linked statically into the public
library, we'd end up with lots of internals as public ABI.

Fix this by using `-fvisibility=private` for the libpriv build and for good
measure elsewhere so we remember to use it by default.

Closes: #1320
Approved by: jlebon
This commit is contained in:
Colin Walters 2018-03-28 10:08:16 -04:00 committed by Atomic Bot
parent 84f09172e4
commit f05b980094
4 changed files with 4 additions and 2 deletions

View File

@ -57,6 +57,7 @@ librpmostreed_la_CFLAGS = \
$(AM_CFLAGS) \ $(AM_CFLAGS) \
$(PKGDEP_RPMOSTREE_CFLAGS) \ $(PKGDEP_RPMOSTREE_CFLAGS) \
-DG_LOG_DOMAIN=\"rpm-ostreed\" \ -DG_LOG_DOMAIN=\"rpm-ostreed\" \
-fvisibility=hidden \
-D_RPMOSTREE_EXTERN= \ -D_RPMOSTREE_EXTERN= \
-I$(srcdir)/src/daemon \ -I$(srcdir)/src/daemon \
-I$(srcdir)/src/lib \ -I$(srcdir)/src/lib \

View File

@ -74,6 +74,7 @@ librpmostreepriv_la_CFLAGS = \
-I$(srcdir)/src/libpriv \ -I$(srcdir)/src/libpriv \
-I$(libglnx_srcpath) \ -I$(libglnx_srcpath) \
-DPKGLIBDIR=\"$(pkglibdir)\" \ -DPKGLIBDIR=\"$(pkglibdir)\" \
-fvisibility=hidden \
$(PKGDEP_RPMOSTREE_CFLAGS) \ $(PKGDEP_RPMOSTREE_CFLAGS) \
$(NULL) $(NULL)

View File

@ -68,7 +68,7 @@ endif
rpm_ostree_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/app -I$(srcdir)/src/daemon \ rpm_ostree_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/app -I$(srcdir)/src/daemon \
-I$(srcdir)/src/lib -I$(srcdir)/src/libpriv -I$(libglnx_srcpath) \ -I$(srcdir)/src/lib -I$(srcdir)/src/libpriv -I$(libglnx_srcpath) \
-DPKGLIBDIR=\"$(pkglibdir)\" $(PKGDEP_RPMOSTREE_CFLAGS) -fvisibility=hidden -DPKGLIBDIR=\"$(pkglibdir)\" $(PKGDEP_RPMOSTREE_CFLAGS)
rpm_ostree_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la librpmostree-1.la librpmostreed.la rpm_ostree_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la librpmostree-1.la librpmostreed.la
privdatadir=$(pkglibdir) privdatadir=$(pkglibdir)

View File

@ -21,7 +21,7 @@ endif
GITIGNOREFILES += ssh-config ansible-inventory.yml vmcheck/ test-compose-logs/ GITIGNOREFILES += ssh-config ansible-inventory.yml vmcheck/ test-compose-logs/
testbin_cppflags = $(AM_CPPFLAGS) -I $(srcdir)/src/lib -I $(srcdir)/src/libpriv -I $(srcdir)/libglnx -I $(srcdir)/tests/common testbin_cppflags = $(AM_CPPFLAGS) -I $(srcdir)/src/lib -I $(srcdir)/src/libpriv -I $(srcdir)/libglnx -I $(srcdir)/tests/common
testbin_cflags = $(AM_CFLAGS) $(PKGDEP_RPMOSTREE_CFLAGS) testbin_cflags = $(AM_CFLAGS) -fvisibility=hidden $(PKGDEP_RPMOSTREE_CFLAGS)
testbin_ldadd = $(PKGDEP_RPMOSTREE_LIBS) librpmostree-1.la librpmostreepriv.la testbin_ldadd = $(PKGDEP_RPMOSTREE_LIBS) librpmostree-1.la librpmostreepriv.la
noinst_LTLIBRARIES += libtest.la noinst_LTLIBRARIES += libtest.la