diff options
author | Colin Walters <walters@verbum.org> | 2017-06-19 10:23:21 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-06-19 14:54:59 +0000 |
commit | a45dc0fd0bd3675471f4f18a77df0a5785f54ebb (patch) | |
tree | afb27e3d229925534441c85d0fe5cc269ef40a43 /Makefile-libostree.am | |
parent | 22e753176e62d3c7377ccb2e51108191a4b41d9d (diff) | |
download | ostree-a45dc0fd0bd3675471f4f18a77df0a5785f54ebb.tar.gz |
build-sys: Add "release build" flag, use for symbol versioning
I was trying to do a release and move the symbols from `-devel.sym` into
`-release.sym`, but it turns out that at least GNU binutils `ld` treats an empty
version script as a syntax error. Fix this by adding a "release build"
flag, and only include `-devel` in non-release builds.
This would also make it easier to inject that flag into our `.pc` and
`ostree-version.h` and `ostree --version` metadata, but I didn't do that yet.
EDIT: Turns out a simpler fix is just to add an empty section. However I kept
this commit since it's a useful sanity check for whether we should include
`-devel.sym` in builds, and we may want to inject the metadata later.
Closes: #942
Approved by: jlebon
Diffstat (limited to 'Makefile-libostree.am')
-rw-r--r-- | Makefile-libostree.am | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile-libostree.am b/Makefile-libostree.am index 3c2b6237..61ad1f4a 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -155,8 +155,10 @@ libostree_1_la_SOURCES += \ $(NULL) endif -symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym \ - $(top_srcdir)/src/libostree/libostree-devel.sym +symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym +if BUILDOPT_IS_DEVEL_BUILD +symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym +endif if ENABLE_EXPERIMENTAL_API symbol_files += $(top_srcdir)/src/libostree/libostree-experimental.sym endif @@ -164,7 +166,6 @@ endif wl_versionscript_arg = -Wl,--version-script= EXTRA_DIST += $(symbol_files) - libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree \ $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_OPENSSL_CFLAGS) \ -fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern' |