
Automake linking looks like this (I'm simplifying a bit): $(CC) $(foo_CFLAGS) $(foo_LDFLAGS) -ofoo $(objects) $(foo_LDADD) The correct order is that if a library A is used to satisfy the symbol requirements of an object or library B, then A must come after B on the link line. Otherwise, static linking or linking with -Wl,--as-needed will fail. As a result, libraries and the -L options used to locate them should always be in LDADD (for executables) or LIBADD (for libraries), never in LDFLAGS. Ubuntu's linker defaults to the equivalent of -Wl,--as-needed, so this causes failure to build on Ubuntu, which can be reproduced with ./autogen.sh CC="gcc -Wl,--as-needed" && make on other distributions. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #75 Approved by: alexlarsson
14 lines
302 B
Plaintext
14 lines
302 B
Plaintext
|
|
bwrap_SOURCES = \
|
|
$(bwrap_srcpath)/bubblewrap.c \
|
|
$(bwrap_srcpath)/bind-mount.h \
|
|
$(bwrap_srcpath)/bind-mount.c \
|
|
$(bwrap_srcpath)/network.h \
|
|
$(bwrap_srcpath)/network.c \
|
|
$(bwrap_srcpath)/utils.h \
|
|
$(bwrap_srcpath)/utils.c \
|
|
$(NULL)
|
|
|
|
bwrap_CFLAGS = $(AM_CFLAGS)
|
|
bwrap_LDADD = $(SELINUX_LIBS)
|