diff options
Diffstat (limited to 'meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch')
-rw-r--r-- | meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch | 44 |
1 files changed, 0 insertions, 44 deletions
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 deleted file mode 100644 index f11f13dd48..0000000000 --- a/meta/recipes-devtools/rsync/files/0001-Turn-on-pedantic-errors-at-the-end-of-configure.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From e6321b0b456fca987b48d5ec7aba7e2826128e5f 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 | --- | ||
11 | configure.ac | 20 ++++++++++++++++++++ | ||
12 | 1 file changed, 20 insertions(+) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index a2c9955..afabef0 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -1437,6 +1437,26 @@ case "$CC" in | ||
19 | ;; | ||
20 | esac | ||
21 | |||
22 | +# Enable -pedantic-errors last, so that it doesn't mess up other | ||
23 | +# 'configure' tests. For example, Autoconf uses empty function | ||
24 | +# prototypes like 'int main () {}' which Clang 15's -pedantic-errors | ||
25 | +# would reject. Generally it's not a good idea to try to run | ||
26 | +# 'configure' itself with strict compiler checking. | ||
27 | +if test x"$GCC" = x"yes"; then | ||
28 | + if test x"$with_included_popt" != x"yes"; then | ||
29 | + # Turn pedantic warnings into errors to ensure an array-init overflow is an error. | ||
30 | + CFLAGS="$CFLAGS -pedantic-errors" | ||
31 | + else | ||
32 | + # Our internal popt code cannot be compiled with pedantic warnings as errors, so try to | ||
33 | + # turn off pedantic warnings (which will not lose the error for array-init overflow). | ||
34 | + # Older gcc versions don't understand -Wno-pedantic, so check if --help=warnings lists | ||
35 | + # -Wpedantic and use that as a flag. | ||
36 | + case `$CC --help=warnings 2>/dev/null | grep Wpedantic` in | ||
37 | + *-Wpedantic*) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;; | ||
38 | + esac | ||
39 | + fi | ||
40 | +fi | ||
41 | + | ||
42 | AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) | ||
43 | AC_OUTPUT | ||
44 | |||