summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-02-22 19:39:12 +0100
committerKay Sievers <kay@vrfy.org>2014-02-22 21:28:55 +0100
commit03e37dd767e52908f30783d9b4c09fb6a4e865c7 (patch)
tree8640d6a6f29fde46e6efdc4f3f437f3e442b97e2 /Makefile.am
parent0c2f9b84698b25e6065b9febd21486669a13870f (diff)
build-sys: build compat libs from sources, avoiding the not generally available ifunc wrapping
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am58
1 files changed, 27 insertions, 31 deletions
diff --git a/Makefile.am b/Makefile.am
index dd9ba96d93..feadc9821d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4432,24 +4432,26 @@ clean-python:
# ------------------------------------------------------------------------------
if ENABLE_COMPAT_LIBS
-
EXTRA_DIST += \
src/compat-libs/linkwarning.h
-define generate-fake-lib
+libsystemd-%.c: src/compat-libs/libsystemd-%.sym
$(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/void new_\1(void);\n__asm__(".symver new_\1,\1@LIBSYSTEMD_209");\nstatic void (*resolve_\1(void)) (void) {\n\treturn new_\1;\n}\nvoid \1(void) __attribute__((ifunc("resolve_\1")));\nobsolete_lib(\1,$(notdir $(basename $<)));\n/p' <$< >$@
-endef
+ $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
+
+BUILT_SOURCES += \
+ libsystemd-journal.c \
+ libsystemd-login.c \
+ libsystemd-id128.c \
+ libsystemd-daemon.c
libsystemd_journal_la_SOURCES = \
libsystemd-journal.c \
src/compat-libs/libsystemd-journal.sym
-libsystemd_journal_la_CFLAGS = \
+libsystemd_journal_la_CPPFLAGS = \
$(AM_CFLAGS) \
- -fvisibility=default \
- -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
- -fno-lto
+ -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
libsystemd_journal_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -4457,17 +4459,17 @@ libsystemd_journal_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
libsystemd_journal_la_LIBADD = \
- libsystemd.la
+ libsystemd-journal-internal.la \
+ libsystemd-internal.la \
+ libsystemd-shared.la
libsystemd_login_la_SOURCES = \
libsystemd-login.c \
src/compat-libs/libsystemd-login.sym
-libsystemd_login_la_CFLAGS = \
+libsystemd_login_la_CPPFLAGS = \
$(AM_CFLAGS) \
- -fvisibility=default \
- -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
- -fno-lto
+ -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
libsystemd_login_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -4475,14 +4477,16 @@ libsystemd_login_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
libsystemd_login_la_LIBADD = \
- libsystemd.la
+ libsystemd-internal.la \
+ libsystemd-shared.la
libsystemd_id128_la_SOURCES = \
libsystemd-id128.c \
src/compat-libs/libsystemd-id128.sym
-libsystemd_id128_la_CFLAGS = \
- $(libsystemd_login_la_CFLAGS)
+libsystemd_id128_la_CPPFLAGS = \
+ $(AM_CFLAGS) \
+ -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
libsystemd_id128_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -4490,14 +4494,16 @@ libsystemd_id128_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
libsystemd_id128_la_LIBADD = \
- libsystemd.la
+ libsystemd-internal.la \
+ libsystemd-shared.la
libsystemd_daemon_la_SOURCES = \
libsystemd-daemon.c \
src/compat-libs/libsystemd-daemon.sym
-libsystemd_daemon_la_CFLAGS = \
- $(libsystemd_login_la_CFLAGS)
+libsystemd_daemon_la_CPPFLAGS = \
+ $(AM_CFLAGS) \
+ -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
libsystemd_daemon_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -4505,16 +4511,8 @@ libsystemd_daemon_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
libsystemd_daemon_la_LIBADD = \
- libsystemd.la
-
-BUILT_SOURCES += \
- libsystemd-journal.c \
- libsystemd-login.c \
- libsystemd-id128.c \
- libsystemd-daemon.c
-
-libsystemd-%.c: src/compat-libs/libsystemd-%.sym
- $(generate-fake-lib)
+ libsystemd-internal.la \
+ libsystemd-shared.la
lib_LTLIBRARIES += \
libsystemd-journal.la \
@@ -4543,7 +4541,6 @@ compat-lib-uninstall-hook:
INSTALL_EXEC_HOOKS += compat-lib-install-hook
UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
-
endif
EXTRA_DIST += \
@@ -4972,7 +4969,6 @@ EXTRA_DIST += \
$(top_srcdir)/tools/check-includes.pl
# Stupid test that everything purported to be exported really is
-
define generate-sym-test
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_at)printf '#include <stdio.h>\n' > $@