mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-01-03 06:57:38 +00:00
The main and the most ABI-touching thing for the envisioned 2.0 branch is the usage of the linker-build-time allocated callsite info, avoiding the non-economic evaluations and, under some circumstances dangerous, heap allocations in the run-time. Considering that v1.9.0 release (libqb.so.20) was expressly marked as tech-preview[1,2] (hence something that shall not make it to production use), there should be no harm for master branch (that is headed towards 2.0 and beyond) to receive noticable SONAME bump (libqb.so.100) so as to - leave enough of space for a possible v1-compatible branch evolution (for use cases where recompile-everything is a no-go). in particular, with resuming with libqb.so.30, there would be a room for 99-33 = 63 add-new-drop-nothing compatible changes for that branch (which is more than plentiful) - indicate some big change is going on more clearly towards client space This is supposed to be a reasonable trade-off solution that would still leave enough wiggle space, and would represent responsible approach to the development (like the original attempt to prevent ABI break in the first place was), allowing for more than an enforced unanimity (rather antagonistic in the free software realms). [1] https://lists.clusterlabs.org/pipermail/users/2019-December/026690.html [2] https://github.com/ClusterLabs/libqb/releases/tag/1.9.0 Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
111 lines
4.7 KiB
Makefile
111 lines
4.7 KiB
Makefile
#
|
|
# Copyright (C) 2010 Red Hat, Inc.
|
|
#
|
|
# Author: Angus Salkeld <asaslkeld@redhat.com>
|
|
#
|
|
# This file is part of libqb.
|
|
#
|
|
# libqb is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation, either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# libqb is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
# along with libqb. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
CLEANFILES = qblog_script.ld
|
|
MAINTAINERCLEANFILES = Makefile.in
|
|
|
|
noinst_HEADERS = ipc_int.h util_int.h ringbuffer_int.h loop_int.h \
|
|
log_int.h map_int.h rpl_sem.h loop_poll_int.h \
|
|
atomic_int.h
|
|
|
|
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
|
|
|
|
lib_LTLIBRARIES = libqb.la
|
|
|
|
libqb_la_LDFLAGS = -version-info 100:0:0
|
|
|
|
source_to_lint = util.c hdb.c ringbuffer.c ringbuffer_helper.c \
|
|
array.c loop.c loop_poll.c loop_job.c \
|
|
loop_timerlist.c ipcc.c ipcs.c ipc_shm.c \
|
|
ipc_setup.c ipc_socket.c \
|
|
log.c log_thread.c log_blackbox.c log_file.c \
|
|
log_syslog.c log_dcs.c log_format.c \
|
|
map.c skiplist.c hashtable.c trie.c
|
|
|
|
# Following two files related to linkage using classic ld from binutils 2.29+
|
|
# with which we cannot afford to lose public access to section boundary symbols
|
|
# (as the mentioned version started to scope them privately by default, see
|
|
# the comment within the first of the files, ultimately leading to broken
|
|
# logging functionality of libqb) deserve a bit of explanation:
|
|
# * qblog_script.ld
|
|
# - linker script that instructs the output section that those symbols should
|
|
# be visible, i.e. supports the same behaviour regardless of ld version
|
|
# - serves two purposes:
|
|
# . local: libqb itself and its "private" (cf. examples) users need those
|
|
# symbols visible, which is achieved with a help of the other file
|
|
# . system-wide: whenever the non-private library users link against libqb
|
|
# (it's development files), this linker script with
|
|
# prepended INPUT command so as to refer to the actual
|
|
# libqb library (it's numbered alias that is eventually
|
|
# resolved to proper shared library) is masked as libqb.so,
|
|
# this arrangement achieves the libqb's user will have
|
|
# the discussed symbols visible alike
|
|
# * qblog_script.la
|
|
# - as mentioned earlier, this indirectly hooks into libtool machinery, with
|
|
# the only true intention of injecting "-Wl,<path to qblog_script.ld>"
|
|
# into "inherited_linker_flags" libtool archive variable, from where it's
|
|
# subsequently spread into the build process of all the internal library
|
|
# users, assuming they have their dep arranged as "user_LIBADD=libqb.la"
|
|
# (this also alleviates the burden on getting things right if, e.g., any
|
|
# libqb user consumes it directly like this from its own sub-checkout tree)
|
|
# - it indirectly, once libtool prechew the original link command
|
|
# originally referring to this file, it turns such reference into the
|
|
# "real" library reference (here combining libdir and old_library
|
|
# variables within the file), also ensures libqb itself will visibly
|
|
# expose the discussed symbols, because such references point again to
|
|
# the (not enriched) linker script file that will get interpreted just
|
|
# like that during the last build step of the library
|
|
EXTRA_libqb_la_DEPENDENCIES = qblog_script.ld qblog_script.la
|
|
EXTRA_DIST = qblog_script.ld.in qblog_script.la.in qblog_script_noop.ld
|
|
|
|
libqb_la_SOURCES = $(source_to_lint) unix.c
|
|
libqb_la_CFLAGS = $(PTHREAD_CFLAGS) $(SYSTEMD_CFLAGS)
|
|
libqb_la_LIBADD = $(LTLIBOBJS) $(dlopen_LIBS) $(PTHREAD_LIBS) $(socket_LIBS) $(rt_LIBS) $(SYSTEMD_LIBS)
|
|
|
|
AM_LDFLAGS = $(LDFLAGS_COPY:-Bsymbolic-functions=)
|
|
|
|
if HAVE_SEM_TIMEDWAIT
|
|
else
|
|
libqb_la_SOURCES+=rpl_sem.c
|
|
endif
|
|
|
|
if HAVE_EPOLL
|
|
libqb_la_SOURCES+=loop_poll_epoll.c
|
|
else
|
|
if HAVE_KQUEUE
|
|
libqb_la_SOURCES+=loop_poll_kqueue.c
|
|
else
|
|
libqb_la_SOURCES+=loop_poll_poll.c
|
|
endif
|
|
endif
|
|
|
|
# nested sed expression is also escaping meta character for the outer one
|
|
qblog_script.ld: %.ld: %.ld.in
|
|
$(AM_V_GEN)$(CPP) -C -D_GNU_SOURCE -P $(AM_CPPFLAGS) -xc $< \
|
|
| sed -n "/$$(sed -n '/^[^#]/{s/[*\/]/\\&/g;p;q;}' $<)/,$$ p" \
|
|
> $@
|
|
|
|
# sadly, there's a distinction between "exec" and "data" install, and it's hard
|
|
# to decouple install-exec-hook below (.pc file is platform-dependent, anyway)
|
|
pkgconfigexecdir = $(libdir)/pkgconfig
|
|
pkgconfigexec_DATA = libqb.pc
|
|
|