summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am58
-rw-r--r--src/compat-libs/linkwarning.h1
2 files changed, 27 insertions, 32 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' > $@
diff --git a/src/compat-libs/linkwarning.h b/src/compat-libs/linkwarning.h
index b6a6ac2940..a2e9534a80 100644
--- a/src/compat-libs/linkwarning.h
+++ b/src/compat-libs/linkwarning.h
@@ -18,7 +18,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-
#define __make_section_unallocated(section_string) \
asm (".section " section_string "\n\t.previous");