All of lore.kernel.org
 help / color / mirror / Atom feed
* [v4l-utils PATCH 0/2] v4l-utils fixes
@ 2018-04-05 10:00 Sakari Ailus
  2018-04-05 10:00 ` [v4l-utils PATCH 1/2] Add instructions for building static binaries Sakari Ailus
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sakari Ailus @ 2018-04-05 10:00 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, hverkuil

Hi folks,

The two patches add instructions for building static binaries as well as
fix a few warnings in libdvb5.

Sakari Ailus (2):
  Add instructions for building static binaries
  libdvb5: Fix unused local variable warnings

 INSTALL                      | 16 ++++++++++++++++
 lib/libdvbv5/dvb-dev-local.c |  5 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [v4l-utils PATCH 1/2] Add instructions for building static binaries
  2018-04-05 10:00 [v4l-utils PATCH 0/2] v4l-utils fixes Sakari Ailus
@ 2018-04-05 10:00 ` Sakari Ailus
  2018-04-05 10:00 ` [v4l-utils PATCH 2/2] libdvb5: Fix unused local variable warnings Sakari Ailus
  2018-04-05 10:18 ` [v4l-utils PATCH 0/2] v4l-utils fixes Mauro Carvalho Chehab
  2 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2018-04-05 10:00 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, hverkuil

Static binaries are useful e.g. when copying test binaries to other
systems. Document how to build them.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 INSTALL | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/INSTALL b/INSTALL
index 765fa26..8c98a76 100644
--- a/INSTALL
+++ b/INSTALL
@@ -53,6 +53,22 @@ export PKG_CONFIG_LIBDIR=/path/to/cross/root/lib
 ./configure --host=arm-linux-gnueabihf --without-jpeg
 make
 
+Building static binaries:
+-------------------------
+
+Fully static binares can be built by setting LDFLAGS for the configure and
+using an option for disabling shared libraries:
+
+	$ LDFLAGS="--static -static" ./configure --disable-shared
+
+Note that this requires static variants of all the libraries needed for
+linking which may not be available in all systems.
+
+In order to build binaries that are not dependent on libraries contained
+in v4l-utils, simply use the --disable-shared option:
+
+	$ ./configure --disable-shared
+
 Android Cross Compiling and Installing:
 ----------------
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [v4l-utils PATCH 2/2] libdvb5: Fix unused local variable warnings
  2018-04-05 10:00 [v4l-utils PATCH 0/2] v4l-utils fixes Sakari Ailus
  2018-04-05 10:00 ` [v4l-utils PATCH 1/2] Add instructions for building static binaries Sakari Ailus
@ 2018-04-05 10:00 ` Sakari Ailus
  2018-04-05 10:18 ` [v4l-utils PATCH 0/2] v4l-utils fixes Mauro Carvalho Chehab
  2 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2018-04-05 10:00 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, hverkuil

Some local variables are only needed conditionally depending on available
system support for e.g. pthreads. Put these variables behind same #ifdefs
so that no warnings are produced if these features aren't available.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 lib/libdvbv5/dvb-dev-local.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/libdvbv5/dvb-dev-local.c b/lib/libdvbv5/dvb-dev-local.c
index 7a76d65..7ebf2b6 100644
--- a/lib/libdvbv5/dvb-dev-local.c
+++ b/lib/libdvbv5/dvb-dev-local.c
@@ -296,7 +296,6 @@ static int dvb_local_find(struct dvb_device_priv *dvb,
 	struct udev_enumerate *enumerate;
 	struct udev_list_entry *devices, *dev_list_entry;
 	struct udev_device *dev;
-	int ret;
 
 	/* Free a previous list of devices */
 	if (dvb->d.num_devices)
@@ -346,6 +345,8 @@ static int dvb_local_find(struct dvb_device_priv *dvb,
 	/* Begin monitoring udev events */
 #ifdef HAVE_PTHREAD
 	if (priv->notify_dev_change) {
+		int ret;
+
 		ret = pthread_create(&priv->dev_change_id, NULL,
 				     monitor_device_changes, dvb);
 		if (ret < 0) {
@@ -364,9 +365,9 @@ static int dvb_local_find(struct dvb_device_priv *dvb,
 
 static int dvb_local_stop_monitor(struct dvb_device_priv *dvb)
 {
+#ifdef HAVE_PTHREAD
 	struct dvb_dev_local_priv *priv = dvb->priv;
 
-#ifdef HAVE_PTHREAD
 	if (priv->notify_dev_change) {
 		pthread_cancel(priv->dev_change_id);
 		udev_unref(priv->udev);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [v4l-utils PATCH 0/2] v4l-utils fixes
  2018-04-05 10:00 [v4l-utils PATCH 0/2] v4l-utils fixes Sakari Ailus
  2018-04-05 10:00 ` [v4l-utils PATCH 1/2] Add instructions for building static binaries Sakari Ailus
  2018-04-05 10:00 ` [v4l-utils PATCH 2/2] libdvb5: Fix unused local variable warnings Sakari Ailus
@ 2018-04-05 10:18 ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-05 10:18 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, hverkuil

Em Thu,  5 Apr 2018 13:00:38 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:

> Hi folks,
> 
> The two patches add instructions for building static binaries as well as
> fix a few warnings in libdvb5.
> 
> Sakari Ailus (2):
>   Add instructions for building static binaries
>   libdvb5: Fix unused local variable warnings
> 
>  INSTALL                      | 16 ++++++++++++++++
>  lib/libdvbv5/dvb-dev-local.c |  5 +++--
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 

Both patches look ok on my eyes.


Thanks,
Mauro

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-05 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 10:00 [v4l-utils PATCH 0/2] v4l-utils fixes Sakari Ailus
2018-04-05 10:00 ` [v4l-utils PATCH 1/2] Add instructions for building static binaries Sakari Ailus
2018-04-05 10:00 ` [v4l-utils PATCH 2/2] libdvb5: Fix unused local variable warnings Sakari Ailus
2018-04-05 10:18 ` [v4l-utils PATCH 0/2] v4l-utils fixes Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.