summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-12-30 02:14:00 +0100
committerJan Engelhardt <jengelh@medozas.de>2011-12-31 21:54:14 +0100
commit79cefabaac7a0ecf864db7da2a665845c0789f10 (patch)
tree0cf85b04ac2230d6de980d87bb97437466da6a64 /extensions
parent32d8532a37004e11e5994d93df5e249c43197930 (diff)
extensions: link on libxtables and check symbols
Have each extension link against libxtables.so; with this, all home symbols are known at link time and we can use ld's --no-undefined to run the check, dropping the homebrew solution. By having libxtables.so required by extensions, package managers' automatic dependency discovery will become effective so that manual dependencies for distros with split extension packages (e.g. OpenWRT) will not be necessary anymore. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/GNUmakefile.in14
1 files changed, 3 insertions, 11 deletions
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 84c85de7..218dc3ad 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -23,6 +23,7 @@ kinclude_CPPFLAGS = @kinclude_CPPFLAGS@
AM_CFLAGS = ${regular_CFLAGS}
AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
+AM_LDFLAGS = @noundef_LDFLAGS@
ifeq (${V},)
AM_LIBTOOL_SILENT = --silent
@@ -68,16 +69,7 @@ targets_install :=
.PHONY: all install clean distclean FORCE
-all: ${targets} check
-
-check: ${targets}
- @echo " CHECK unknown symbols in .so files"; \
- . ../libxtables/libxtables.la; \
- for i in lib*.so; do \
- [ "$$i" = "lib*.so" ] && continue; \
- LD_PRELOAD="$$dlname" LD_LIBRARY_PATH=../libxtables/.libs \
- ldd -r $$i 2>&1 >/dev/null; \
- done;
+all: ${targets}
install: ${targets_install}
@mkdir -p "${DESTDIR}${xtlibdir}";
@@ -99,7 +91,7 @@ init%.o: init%.c
# Shared libraries
#
lib%.so: lib%.oo
- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${$*_LIBADD};
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
lib%.oo: ${srcdir}/lib%.c
${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;