summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-31 08:15:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-02 16:39:13 +0000
commitb42080cbe9f11cf42c1ee8ec7d264a4b7ef969d8 (patch)
treece84f86457af053495a27bcb5104d16536e1f12c /meta/recipes-connectivity/nfs-utils
parent1cecfd0332fc8b4fc1cf691e0fe4cf9849663f22 (diff)
downloadpoky-b42080cbe9f11cf42c1ee8ec7d264a4b7ef969d8.tar.gz
nfs-utils: Drop unneeded patches, cmdline option overrides
0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch is no longer needed disabling format warnings is no longer needed as well therefore remove it from recipe and address the warnings (if any in patches) Ensure that it can build with clang as well on the way via the new clang-warnings.patch patch (From OE-Core rev: c22726425a2554a65b17a9daac9350940b2ddd6b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch40
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch61
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb5
3 files changed, 62 insertions, 44 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch
deleted file mode 100644
index d14f0789ff..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 66471fbf7106917da7a1536b18a0a77d07479779 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Mon, 17 Dec 2018 15:29:47 +0800
4Subject: [PATCH] configure.ac: Do not fatalize -Wmissing-prototypes
5
6There comes below error when run "make -C tests/nsm_client nsm_client"
7| nlm_sm_inter_svc.c:20:1: error: no previous prototype for 'nlm_sm_prog_3' [-Werror=missing-prototypes]
8
9It is because rpcgen doesn't generate -Wmissing-prototypes
10free code for nlm_sm_inter_svc.c with below logic
11in tests/nsm_client/Makefile.am
12[snip]
13GENFILES_SVC = nlm_sm_inter_svc.c
14[snip]
15$(GENFILES_SVC): %_svc.c: %.x $(RPCGEN)
16 test -f $@ && rm -rf $@ || true
17 $(RPCGEN) -m -o $@ $<
18
19So add the logic not to fatalize -Wmissing-prototypes.
20
21Upstream-Status: Submitted[https://marc.info/?l=linux-nfs&m=154503260323936&w=2]
22
23Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
24---
25 configure.ac | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28diff --git a/configure.ac b/configure.ac
29index 50002b4..aebff01 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -582,7 +582,7 @@ my_am_cflags="\
33 -Wall \
34 -Wextra \
35 $rpcgen_cflags \
36- -Werror=missing-prototypes \
37+ -Wmissing-prototypes \
38 -Werror=missing-declarations \
39 -Werror=format=2 \
40 -Werror=undef \
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
new file mode 100644
index 0000000000..20400fef67
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
@@ -0,0 +1,61 @@
1Detect warning options during configure
2
3Certain options maybe compiler specific therefore its better
4to detect them before use.
5
6nfs_error copies the format string and appends newline to it
7but compiler can forget that it was format string since its not
8same fmt string that was passed. Ignore the warning
9
10Wdiscarded-qualifiers is gcc specific and this is no longer needed
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14
15--- a/configure.ac
16+++ b/configure.ac
17@@ -599,7 +599,6 @@ my_am_cflags="\
18 -Werror=parentheses \
19 -Werror=aggregate-return \
20 -Werror=unused-result \
21- -Wno-cast-function-type \
22 -fno-strict-aliasing \
23 "
24
25@@ -619,9 +618,10 @@ CHECK_CCSUPPORT([-Werror=format-overflow
26 CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
27 CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
28 CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
29+CHECK_CCSUPPORT([-Wno-cast-function-type], [flg5])
30 AX_GCC_FUNC_ATTRIBUTE([format])
31
32-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
33+AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4 $flg5"])
34
35 # Make sure that $ACLOCAL_FLAGS are used during a rebuild
36 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
37--- a/support/nfs/xcommon.c
38+++ b/support/nfs/xcommon.c
39@@ -98,7 +98,10 @@ nfs_error (const char *fmt, ...) {
40
41 fmt2 = xstrconcat2 (fmt, "\n");
42 va_start (args, fmt);
43+#pragma GCC diagnostic push
44+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
45 vfprintf (stderr, fmt2, args);
46+#pragma GCC diagnostic pop
47 va_end (args);
48 free (fmt2);
49 }
50--- a/utils/mount/stropts.c
51+++ b/utils/mount/stropts.c
52@@ -1094,9 +1094,7 @@ static int nfsmount_fg(struct nfsmount_i
53 if (nfs_try_mount(mi))
54 return EX_SUCCESS;
55
56-#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
57 if (errno == EBUSY && is_mountpoint(mi->node)) {
58-#pragma GCC diagnostic warning "-Wdiscarded-qualifiers"
59 /*
60 * EBUSY can happen when mounting a filesystem that
61 * is already mounted or when the context= are
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb
index df3070bd8b..6647d3428b 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb
@@ -31,9 +31,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
31 file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \ 31 file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
32 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ 32 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
33 file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \ 33 file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \
34 file://clang-warnings.patch \
34 " 35 "
35SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch"
36
37SRC_URI[md5sum] = "d427c6b3014e9a04e8498f0598b1c1b9" 36SRC_URI[md5sum] = "d427c6b3014e9a04e8498f0598b1c1b9"
38SRC_URI[sha256sum] = "4464737a03d5f73ded2ffefe19d5543ed7b1d6c541985d8acaafdc8025aa1038" 37SRC_URI[sha256sum] = "4464737a03d5f73ded2ffefe19d5543ed7b1d6c541985d8acaafdc8025aa1038"
39 38
@@ -62,8 +61,6 @@ EXTRA_OECONF = "--with-statduser=rpcuser \
62 --with-statdpath=/var/lib/nfs/statd \ 61 --with-statdpath=/var/lib/nfs/statd \
63 " 62 "
64 63
65CFLAGS += "-Wno-error=format-overflow"
66
67PACKAGECONFIG ??= "tcp-wrappers \ 64PACKAGECONFIG ??= "tcp-wrappers \
68 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ 65 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
69" 66"