From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Subject: [PATCH] configure.ac: Add option to disable compilation of v4l2-tracer
Date: Sat, 11 Feb 2023 11:12:31 +0100 [thread overview]
Message-ID: <20230211101231.3060841-1-niklas.soderlund@ragnatech.se> (raw)
Add a configuration time option to disable compilation of the
v4l2-tracer utility.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
Hi Hans,
The v4l2-tracer fails to build on arm32. While I'm sure that can be
fixed, this is an utility I don't use and building on target any thing I
can disable in the build saves me time.
From completes, the classes of errors I see are around v4l2_fourcc(),
_IOR() and _IOWR().
../../include/linux/videodev2.h:81:66: error: narrowing conversion of '3039908417' from '__u32' {aka 'unsigned int'} to 'long int' [-Wnarrowing]
81 | #define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31))
../../include/linux/videodev2.h:2528:34: error: narrowing conversion of '2154321408' from 'unsigned int' to 'long int' [-Wnarrowing]
2528 | #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
../../include/linux/videodev2.h:2529:33: error: narrowing conversion of '3225441794' from 'unsigned int' to 'long int' [-Wnarrowing]
2529 | #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
I'm building on target with gcc 12.1.0, nothing fancy,
$ ./bootstrap.sh && ./configure && make
Kind Regards
Niklas
---
configure.ac | 11 +++++++++++
utils/Makefile.am | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index dc9c4af71c45..46ddc7a8b404 100644
--- a/configure.ac
+++ b/configure.ac
@@ -497,6 +497,14 @@ AC_ARG_ENABLE(v4l2-compliance-32,
esac]
)
+AC_ARG_ENABLE(v4l2-tracer,
+ AS_HELP_STRING([--disable-v4l2-tracer], [disable v4l2-tracer compilation]),
+ [case "${enableval}" in
+ yes | no ) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2-tracer) ;;
+ esac]
+)
+
AC_ARG_ENABLE(v4l2-ctl-libv4l,
AS_HELP_STRING([--disable-v4l2-ctl-libv4l], [disable use of libv4l in v4l2-ctl]),
[case "${enableval}" in
@@ -578,6 +586,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes])
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes])
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno])
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes])
+AM_CONDITIONAL([WITH_V4L2_TRACER], [test x$jsonc_pkgconfig = xyes -a x$enable_v4l2_tracer != xno])
PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no])
AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])
@@ -628,6 +637,7 @@ AM_COND_IF([WITH_V4L2_CTL_32], [USE_V4L2_CTL_32="yes"], [USE_V4L2_CTL_32="no"])
AM_COND_IF([WITH_V4L2_COMPLIANCE], [USE_V4L2_COMPLIANCE="yes"], [USE_V4L2_COMPLIANCE="no"])
AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE_LIBV4L="yes"], [USE_V4L2_COMPLIANCE_LIBV4L="no"])
AM_COND_IF([WITH_V4L2_COMPLIANCE_32], [USE_V4L2_COMPLIANCE_32="yes"], [USE_V4L2_COMPLIANCE_32="no"])
+AM_COND_IF([WITH_V4L2_TRACER], [USE_V4L2_TRACER="yes"], [USE_V4L2_TRACER="no"])
AM_COND_IF([WITH_BPF], [USE_BPF="yes"
AC_DEFINE([HAVE_BPF], [1], [BPF IR decoder support enabled])],
[USE_BPF="no"])
@@ -679,5 +689,6 @@ compile time options summary
v4l2-compliance : $USE_V4L2_COMPLIANCE
v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L
v4l2-compliance-32 : $USE_V4L2_COMPLIANCE_32
+ v4l2-tracer : $USE_V4L2_TRACER
BPF IR Decoders: : $USE_BPF
EOF
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 6f59515ef29d..b2a6ac211473 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -15,7 +15,7 @@ SUBDIRS = \
cec-follower \
rds-ctl
-if HAVE_JSONC
+if WITH_V4L2_TRACER
SUBDIRS += \
v4l2-tracer
endif
--
2.39.1
next reply other threads:[~2023-02-11 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 10:12 Niklas Söderlund [this message]
2023-02-11 19:53 ` [PATCH] configure.ac: Add option to disable compilation of v4l2-tracer Deborah Brouwer
2023-02-11 22:08 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230211101231.3060841-1-niklas.soderlund@ragnatech.se \
--to=niklas.soderlund@ragnatech.se \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox