diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-29 20:32:16 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-01 10:14:01 +0100 |
commit | 8d6b8fb0863d81f60f8a8b53c3b5b4676d508965 (patch) | |
tree | 046cce8ceb96fa1d2592a5dad3557f0849ccd85a /meta/recipes-devtools/rsync | |
parent | c00ae16610dedd685ee5cb400647ee8fbc794eb1 (diff) | |
download | poky-8d6b8fb0863d81f60f8a8b53c3b5b4676d508965.tar.gz |
rsync: Turn on -pedantic-errors at the end of 'configure'
This helps in building rsync without autoconf patch, since it will be a
while that the round trip is made, better to apply this patch here until
next release of autoconf.
(From OE-Core rev: 11522b98697befcf13076a90cec4f8ade1fa0645)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rsync')
3 files changed, 80 insertions, 20 deletions
diff --git a/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch index 629b786d62..474d82db22 100644 --- a/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch +++ b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From 704a240443ca5d8024cc3b01ae6c1440fa41f54a Mon Sep 17 00:00:00 2001 | 1 | From 785c0072c80c2f6e0839478453cf65fdeac15da0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 16 Aug 2022 23:42:24 -0700 | 3 | Date: Mon, 29 Aug 2022 19:53:28 -0700 |
4 | Subject: [PATCH] Add missing prototypes to function declarations | 4 | Subject: [PATCH] Add missing prototypes to function declarations |
5 | 5 | ||
6 | With Clang 15+ compiler -Wstrict-prototypes is triggering warnings which | 6 | With Clang 15+ compiler -Wstrict-prototypes is triggering warnings which |
@@ -18,8 +18,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
18 | --- | 18 | --- |
19 | checksum.c | 2 +- | 19 | checksum.c | 2 +- |
20 | exclude.c | 2 +- | 20 | exclude.c | 2 +- |
21 | hlink.c | 2 +- | 21 | hlink.c | 3 +-- |
22 | lib/compat.c | 1 + | ||
23 | lib/pool_alloc.c | 2 +- | 22 | lib/pool_alloc.c | 2 +- |
24 | log.c | 2 +- | 23 | log.c | 2 +- |
25 | main.c | 2 +- | 24 | main.c | 2 +- |
@@ -27,7 +26,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
27 | zlib/crc32.c | 2 +- | 26 | zlib/crc32.c | 2 +- |
28 | zlib/trees.c | 2 +- | 27 | zlib/trees.c | 2 +- |
29 | zlib/zutil.c | 4 ++-- | 28 | zlib/zutil.c | 4 ++-- |
30 | 11 files changed, 13 insertions(+), 12 deletions(-) | 29 | 10 files changed, 12 insertions(+), 13 deletions(-) |
31 | 30 | ||
32 | diff --git a/checksum.c b/checksum.c | 31 | diff --git a/checksum.c b/checksum.c |
33 | index fb8c0a0..174c28c 100644 | 32 | index fb8c0a0..174c28c 100644 |
@@ -56,30 +55,19 @@ index adc82e2..79f5a82 100644 | |||
56 | if (partial_string_buf) { | 55 | if (partial_string_buf) { |
57 | free(partial_string_buf); | 56 | free(partial_string_buf); |
58 | diff --git a/hlink.c b/hlink.c | 57 | diff --git a/hlink.c b/hlink.c |
59 | index 66810a3..aea142b 100644 | 58 | index 66810a3..6511dfb 100644 |
60 | --- a/hlink.c | 59 | --- a/hlink.c |
61 | +++ b/hlink.c | 60 | +++ b/hlink.c |
62 | @@ -117,7 +117,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count) | 61 | @@ -117,8 +117,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count) |
63 | struct ht_int32_node *node = NULL; | 62 | struct ht_int32_node *node = NULL; |
64 | int32 gnum, gnum_next; | 63 | int32 gnum, gnum_next; |
65 | 64 | ||
66 | - qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)()) hlink_compare_gnum); | 65 | - qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)()) hlink_compare_gnum); |
66 | - | ||
67 | + qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)(const void *, const void *)) hlink_compare_gnum); | 67 | + qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)(const void *, const void *)) hlink_compare_gnum); |
68 | |||
69 | for (from = 0; from < ndx_count; from++) { | 68 | for (from = 0; from < ndx_count; from++) { |
70 | file = hlink_flist->sorted[ndx_list[from]]; | 69 | file = hlink_flist->sorted[ndx_list[from]]; |
71 | diff --git a/lib/compat.c b/lib/compat.c | 70 | gnum = F_HL_GNUM(file); |
72 | index 513d79b..89b337e 100644 | ||
73 | --- a/lib/compat.c | ||
74 | +++ b/lib/compat.c | ||
75 | @@ -19,6 +19,7 @@ | ||
76 | * with this program; if not, visit the http://fsf.org website. | ||
77 | */ | ||
78 | |||
79 | +#include <sys/time.h> | ||
80 | #include "rsync.h" | ||
81 | #include "itypes.h" | ||
82 | |||
83 | diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c | 71 | diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c |
84 | index a1a7245..4eae062 100644 | 72 | index a1a7245..4eae062 100644 |
85 | --- a/lib/pool_alloc.c | 73 | --- a/lib/pool_alloc.c |
@@ -180,3 +168,6 @@ index bbba7b2..61f8dc9 100644 | |||
180 | { | 168 | { |
181 | uLong flags; | 169 | uLong flags; |
182 | 170 | ||
171 | -- | ||
172 | 2.37.2 | ||
173 | |||
diff --git a/meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch b/meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch new file mode 100644 index 0000000000..1d9c4bfe48 --- /dev/null +++ b/meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From e64a58387db46239902b610871a0eb81626e99ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
3 | Date: Thu, 18 Aug 2022 07:46:28 -0700 | ||
4 | Subject: [PATCH] Turn on -pedantic-errors at the end of 'configure' | ||
5 | |||
6 | Problem reported by Khem Raj in: | ||
7 | https://lists.gnu.org/r/autoconf-patches/2022-08/msg00009.html | ||
8 | Upstream-Status: Submitted [https://lists.samba.org/archive/rsync/2022-August/032862.html] | ||
9 | --- | ||
10 | configure.ac | 35 ++++++++++++++++++++--------------- | ||
11 | 1 file changed, 20 insertions(+), 15 deletions(-) | ||
12 | |||
13 | diff --git a/configure.ac b/configure.ac | ||
14 | index d185b2d3..7e9514f7 100644 | ||
15 | --- a/configure.ac | ||
16 | +++ b/configure.ac | ||
17 | @@ -1071,21 +1071,6 @@ elif test x"$ac_cv_header_popt_h" != x"yes"; then | ||
18 | with_included_popt=yes | ||
19 | fi | ||
20 | |||
21 | -if test x"$GCC" = x"yes"; then | ||
22 | - if test x"$with_included_popt" != x"yes"; then | ||
23 | - # Turn pedantic warnings into errors to ensure an array-init overflow is an error. | ||
24 | - CFLAGS="$CFLAGS -pedantic-errors" | ||
25 | - else | ||
26 | - # Our internal popt code cannot be compiled with pedantic warnings as errors, so try to | ||
27 | - # turn off pedantic warnings (which will not lose the error for array-init overflow). | ||
28 | - # Older gcc versions don't understand -Wno-pedantic, so check if --help=warnings lists | ||
29 | - # -Wpedantic and use that as a flag. | ||
30 | - case `$CC --help=warnings 2>/dev/null | grep Wpedantic` in | ||
31 | - *-Wpedantic*) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;; | ||
32 | - esac | ||
33 | - fi | ||
34 | -fi | ||
35 | - | ||
36 | AC_MSG_CHECKING([whether to use included libpopt]) | ||
37 | if test x"$with_included_popt" = x"yes"; then | ||
38 | AC_MSG_RESULT($srcdir/popt) | ||
39 | @@ -1444,6 +1429,26 @@ case "$CC" in | ||
40 | ;; | ||
41 | esac | ||
42 | |||
43 | +# Enable -pedantic-errors last, so that it doesn't mess up other | ||
44 | +# 'configure' tests. For example, Autoconf uses empty function | ||
45 | +# prototypes like 'int main () {}' which Clang 15's -pedantic-errors | ||
46 | +# would reject. Generally it's not a good idea to try to run | ||
47 | +# 'configure' itself with strict compiler checking. | ||
48 | +if test x"$GCC" = x"yes"; then | ||
49 | + if test x"$with_included_popt" != x"yes"; then | ||
50 | + # Turn pedantic warnings into errors to ensure an array-init overflow is an error. | ||
51 | + CFLAGS="$CFLAGS -pedantic-errors" | ||
52 | + else | ||
53 | + # Our internal popt code cannot be compiled with pedantic warnings as errors, so try to | ||
54 | + # turn off pedantic warnings (which will not lose the error for array-init overflow). | ||
55 | + # Older gcc versions don't understand -Wno-pedantic, so check if --help=warnings lists | ||
56 | + # -Wpedantic and use that as a flag. | ||
57 | + case `$CC --help=warnings 2>/dev/null | grep Wpedantic` in | ||
58 | + *-Wpedantic*) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;; | ||
59 | + esac | ||
60 | + fi | ||
61 | +fi | ||
62 | + | ||
63 | AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) | ||
64 | AC_OUTPUT | ||
65 | |||
66 | -- | ||
67 | 2.37.1 | ||
68 | |||
diff --git a/meta/recipes-devtools/rsync/rsync_3.2.5.bb b/meta/recipes-devtools/rsync/rsync_3.2.5.bb index 2c2dbc4600..0bbbac7ace 100644 --- a/meta/recipes-devtools/rsync/rsync_3.2.5.bb +++ b/meta/recipes-devtools/rsync/rsync_3.2.5.bb | |||
@@ -15,6 +15,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \ | |||
15 | file://makefile-no-rebuild.patch \ | 15 | file://makefile-no-rebuild.patch \ |
16 | file://determism.patch \ | 16 | file://determism.patch \ |
17 | file://0001-Add-missing-prototypes-to-function-declarations.patch \ | 17 | file://0001-Add-missing-prototypes-to-function-declarations.patch \ |
18 | file://0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch \ | ||
18 | " | 19 | " |
19 | SRC_URI[sha256sum] = "2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba" | 20 | SRC_URI[sha256sum] = "2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba" |
20 | 21 | ||