[Pkg-systemd-maintainers] Bug#734400: make libsystemd-daemon available on non-linux architectures

Michael Stapelberg stapelberg at debian.org
Mon Jan 6 21:44:14 GMT 2014


Package: systemd
Version: 204-6
Severity: wishlist

This is mostly a brain dump, because I am not going to pursue this
further until #727708 is resolved at least.

In http://bugs.debian.org/727708#2160, I realized that libsystemd-daemon
is not actually available on non-linux, even though it can be compiled
and all its code turns into a noop.

The reason for this is the build system in the first place. A number of
non-optional dependencies are linux-only (e.g. libcap) and thus a number
of changes are necessary to the autotools config files. I am not sure if
those changes would be accepted upstream, and certainly there is
potential for them to break given that not many people compile the code
on non-linux (only Debian AFAIK).

One possibility suggested by Tollef is to have a separate Makefile just
for src/libsystemd-daemon/, but then we don’t get all the global flags
with which the systemd source is compiled. This may or may not be a
deal-breaker, given that all the code turns into a nop anyway.

The current (204-6) compiler invocation on Linux for libsystemd-daemon
is:

./libtool --tag=CC --mode=link gcc -std=gnu99 -pipe -Wall -Wextra
-Wno-inline -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral
-Wlogical-op -Wsign-compare -Wmissing-include-dirs
-Wold-style-definition -Wpointer-arith -Winit-self
-Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes
-Wstrict-prototypes -Wredundant-decls -Wmissing-declarations
-Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align
-Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long
-Wno-overlength-strings -Wno-unused-parameter
-Wno-missing-field-initializers -Wno-unused-result -Werror=overflow
-ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing
-fvisibility=hidden -ffunction-sections -fdata-sections
-fstack-protector --param=ssp-buffer-size=4 -fvisibility=hidden
-DSD_EXPORT_SYMBOLS -g -O2 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -Wl,--as-needed -Wl,--no-undefined
-Wl,--gc-sections -Wl,-z,relro -Wl,-z,now -version-info 0:10:0
-Wl,--version-script=../src/libsystemd-daemon/libsystemd-daemon.sym
-Wl,-z,relro -o libsystemd-daemon.la -rpath /usr/lib/x86_64-linux-gnu
src/libsystemd-daemon/libsystemd_daemon_la-sd-daemon.lo -ldl -lrt

Maybe there is a way to have a standalone Makefile that is used on
non-Linux, which contains the compiler invocation that is used on Linux
and is updated by the Debian developer who uploads the package. It’s not
a very beautiful solution, but it is as close to the Linux compilation
as possible.




More information about the Pkg-systemd-maintainers mailing list