diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2016-09-19 13:50:25 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-27 13:49:47 -0300 |
commit | 7294ea1e75b5fcf089a69fd6f2922bfad1502f2c (patch) | |
tree | 17ef55f9502946d805712bad4a594847516b1d7e /utils/v4l2-compliance/Makefile.am | |
parent | 8b7d85f96d71a47c789e2b1af9ad287250cdc340 (diff) |
Fix static linking of v4l2-compliance and v4l2-ctl
v4l2-compliance and v4l2-ctl depend on librt and libpthread. The symbols
are found by the linker only if these libraries are specified after the
objects that depend on them.
As LDFLAGS variable end up expanded on libtool command line before LDADD,
move the libraries to LDADD after local objects. -lpthread is added as on
some systems librt depends on libpthread. This is the case on Ubuntu 16.04
for instance.
After this patch, creating a static build using the command
LDFLAGS="--static -static" ./configure --disable-shared --enable-static
works again.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'utils/v4l2-compliance/Makefile.am')
-rw-r--r-- | utils/v4l2-compliance/Makefile.am | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/v4l2-compliance/Makefile.am b/utils/v4l2-compliance/Makefile.am index a895e8eb..c2b59193 100644 --- a/utils/v4l2-compliance/Makefile.am +++ b/utils/v4l2-compliance/Makefile.am @@ -5,12 +5,12 @@ DEFS := v4l2_compliance_SOURCES = v4l2-compliance.cpp v4l2-test-debug.cpp v4l2-test-input-output.cpp \ v4l2-test-controls.cpp v4l2-test-io-config.cpp v4l2-test-formats.cpp v4l2-test-buffers.cpp \ v4l2-test-codecs.cpp v4l2-test-colors.cpp v4l2-compliance.h -v4l2_compliance_LDFLAGS = -lrt v4l2_compliance_CPPFLAGS = -I../common if WITH_V4L2_COMPLIANCE_LIBV4L -v4l2_compliance_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la +v4l2_compliance_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la -lrt -lpthread else +v4l2_compliance_LDADD = -lrt -lpthread DEFS += -DNO_LIBV4L2 endif |