summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-07-24 17:51:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-27 22:36:53 +0100
commitdba27e245e37eb1ffb0c086a0d709deda29eee12 (patch)
tree2e39c4d0f0be6c93f022bcb93a26c5c4602388dc /meta
parente1e723db1dd085ca3baa22aa5811f3d90d00de13 (diff)
downloadpoky-dba27e245e37eb1ffb0c086a0d709deda29eee12.tar.gz
diffutils: upgrade to 3.6
diffutils-3.5-gcc7.patch is removed as it's merged in this version. do_configure_prepend is removed to solve the following configure error. error: possibly undefined macro: gl_TYPE_WINT_T_PREREQ A workaround patch is made to fix the following compilation error for glibc. error: dereferencing pointer to incomplete type 'const struct rpl_option' (From OE-Core rev: 0c09f9f5700696670b2a9d0466124309100eb296) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.5/diffutils-3.5-gcc7.patch228
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.6/0001-Unset-need_charset_alias-when-building-for-musl.patch (renamed from meta/recipes-extended/diffutils/diffutils-3.5/0001-Unset-need_charset_alias-when-building-for-musl.patch)0
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch30
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.6/run-ptest (renamed from meta/recipes-extended/diffutils/diffutils-3.5/run-ptest)0
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.6.bb (renamed from meta/recipes-extended/diffutils/diffutils_3.5.bb)14
5 files changed, 34 insertions, 238 deletions
diff --git a/meta/recipes-extended/diffutils/diffutils-3.5/diffutils-3.5-gcc7.patch b/meta/recipes-extended/diffutils/diffutils-3.5/diffutils-3.5-gcc7.patch
deleted file mode 100644
index 52bcd7c6ae..0000000000
--- a/meta/recipes-extended/diffutils/diffutils-3.5/diffutils-3.5-gcc7.patch
+++ /dev/null
@@ -1,228 +0,0 @@
1Cumulative Backports from upstream to address gcc 7 portablility issues
2Imported from Fedora
3
4Upstream-Status: Backport
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7diff -up diffutils-3.5/lib/intprops.h.than diffutils-3.5/lib/intprops.h
8--- diffutils-3.5/lib/intprops.h.than 2017-02-21 09:08:39.470417367 -0500
9+++ diffutils-3.5/lib/intprops.h 2017-02-21 09:46:57.090996508 -0500
10@@ -1,6 +1,6 @@
11 /* intprops.h -- properties of integer types
12
13- Copyright (C) 2001-2016 Free Software Foundation, Inc.
14+ Copyright (C) 2001-2017 Free Software Foundation, Inc.
15
16 This program is free software: you can redistribute it and/or modify it
17 under the terms of the GNU General Public License as published
18@@ -47,12 +47,16 @@
19
20 /* Minimum and maximum values for integer types and expressions. */
21
22+/* The width in bits of the integer type or expression T.
23+ Padding bits are not supported; this is checked at compile-time below. */
24+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
25+
26 /* The maximum and minimum values for the integer type T. */
27 #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
28 #define TYPE_MAXIMUM(t) \
29 ((t) (! TYPE_SIGNED (t) \
30 ? (t) -1 \
31- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
32+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
33
34 /* The maximum and minimum values for the type of the expression E,
35 after integer promotion. E should not have side effects. */
36@@ -65,7 +69,13 @@
37 ? _GL_SIGNED_INT_MAXIMUM (e) \
38 : _GL_INT_NEGATE_CONVERT (e, 1))
39 #define _GL_SIGNED_INT_MAXIMUM(e) \
40- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
41+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
42+
43+/* Work around OpenVMS incompatibility with C99. */
44+#if !defined LLONG_MAX && defined __INT64_MAX
45+# define LLONG_MAX __INT64_MAX
46+# define LLONG_MIN __INT64_MIN
47+#endif
48
49 /* This include file assumes that signed types are two's complement without
50 padding bits; the above macros have undefined behavior otherwise.
51@@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_
52 verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
53 verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
54 #endif
55+/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */
56+#ifdef UINT_WIDTH
57+verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
58+#endif
59
60 /* Does the __typeof__ keyword work? This could be done by
61 'configure', but for now it's easier to do it by hand. */
62-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
63+#if (2 <= __GNUC__ \
64+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
65 || (0x5110 <= __SUNPRO_C && !__STDC__))
66 # define _GL_HAVE___TYPEOF__ 1
67 #else
68@@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) ==
69 signed, this macro may overestimate the true bound by one byte when
70 applied to unsigned types of size 2, 4, 16, ... bytes. */
71 #define INT_STRLEN_BOUND(t) \
72- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
73- - _GL_SIGNED_TYPE_OR_EXPR (t)) \
74+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
75 + _GL_SIGNED_TYPE_OR_EXPR (t))
76
77 /* Bound on buffer size needed to represent an integer type or expression T,
78@@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) ==
79 ? (a) < (min) >> (b) \
80 : (max) >> (b) < (a))
81
82-/* True if __builtin_add_overflow (A, B, P) works when P is null. */
83-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
84+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
85+#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
86+
87+/* True if __builtin_add_overflow_p (A, B, C) works. */
88+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
89
90 /* The _GL*_OVERFLOW macros have the same restrictions as the
91 *_RANGE_OVERFLOW macros, except that they do not assume that operands
92 (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
93 that the result (e.g., A + B) has that type. */
94-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
95-# define _GL_ADD_OVERFLOW(a, b, min, max)
96- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
97-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
98- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
99-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
100- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
101+#if _GL_HAS_BUILTIN_OVERFLOW_P
102+# define _GL_ADD_OVERFLOW(a, b, min, max) \
103+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
104+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
105+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
106+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
107+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
108 #else
109 # define _GL_ADD_OVERFLOW(a, b, min, max) \
110 ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
111@@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) ==
112 _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
113 #define INT_SUBTRACT_OVERFLOW(a, b) \
114 _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
115-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
116+#if _GL_HAS_BUILTIN_OVERFLOW_P
117 # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
118 #else
119 # define INT_NEGATE_OVERFLOW(a) \
120@@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) ==
121 #define INT_MULTIPLY_WRAPV(a, b, r) \
122 _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
123
124-#ifndef __has_builtin
125-# define __has_builtin(x) 0
126-#endif
127-
128 /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
129 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
130 https://llvm.org/bugs/show_bug.cgi?id=25390
131@@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) ==
132 the operation. BUILTIN is the builtin operation, and OVERFLOW the
133 overflow predicate. Return 1 if the result overflows. See above
134 for restrictions. */
135-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
136+#if _GL_HAS_BUILTIN_OVERFLOW
137 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
138 #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
139 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
140@@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) ==
141 # else
142 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
143 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
144- long int, LONG_MIN, LONG_MAX))
145+ long int, LONG_MIN, LONG_MAX)
146 # endif
147 #endif
148
149diff -up diffutils-3.5/lib/xalloc-oversized.h.than diffutils-3.5/lib/xalloc-oversized.h
150--- diffutils-3.5/lib/xalloc-oversized.h.than 2017-02-21 09:45:13.729168233 -0500
151+++ diffutils-3.5/lib/xalloc-oversized.h 2017-02-21 09:45:18.309249247 -0500
152@@ -1,6 +1,6 @@
153 /* xalloc-oversized.h -- memory allocation size checking
154
155- Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc.
156+ Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc.
157
158 This program is free software: you can redistribute it and/or modify
159 it under the terms of the GNU General Public License as published by
160@@ -19,48 +19,37 @@
161 #define XALLOC_OVERSIZED_H_
162
163 #include <stddef.h>
164+#include <stdint.h>
165
166-/* Default for (non-Clang) compilers that lack __has_builtin. */
167-#ifndef __has_builtin
168-# define __has_builtin(x) 0
169-#endif
170-
171-/* True if N * S would overflow in a size calculation.
172+/* True if N * S would overflow in a size_t calculation,
173+ or would generate a value larger than PTRDIFF_MAX.
174 This expands to a constant expression if N and S are both constants.
175 By gnulib convention, SIZE_MAX represents overflow in size
176- calculations, so the conservative dividend to use here is
177- SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
178- However, malloc (SIZE_MAX) fails on all known hosts where
179- sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
180- exactly-SIZE_MAX allocations on such hosts; this avoids a test and
181- branch when S is known to be 1. */
182+ calculations, so the conservative size_t-based dividend to use here
183+ is SIZE_MAX - 1. */
184 #define __xalloc_oversized(n, s) \
185- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
186+ ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
187
188+#if PTRDIFF_MAX < SIZE_MAX
189+typedef ptrdiff_t __xalloc_count_type;
190+#else
191+typedef size_t __xalloc_count_type;
192+#endif
193
194-/* Return 1 if an array of N objects, each of size S, cannot exist due
195- to size arithmetic overflow. S must be positive and N must be
196- nonnegative. This is a macro, not a function, so that it
197- works correctly even when SIZE_MAX < N. */
198+/* Return 1 if an array of N objects, each of size S, cannot exist
199+ reliably due to size or ptrdiff_t arithmetic overflow. S must be
200+ positive and N must be nonnegative. This is a macro, not a
201+ function, so that it works correctly even when SIZE_MAX < N. */
202
203-/* GCC 7 __builtin_mul_overflow should easily compute this. See:
204- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68120 */
205 #if 7 <= __GNUC__
206-# define xalloc_oversized(n, s) __builtin_mul_overflow (n, s, (size_t *) NULL)
207-
208-/* GCC 5 and Clang __builtin_mul_overflow needs a temporary, and
209- should be used only for non-constant operands, so that
210- xalloc_oversized is a constant expression if both arguments are.
211- Do not use this if pedantic, since pedantic GCC issues a diagnostic
212- for ({ ... }). */
213-#elif ((5 <= __GNUC__ \
214- || (__has_builtin (__builtin_mul_overflow) \
215- && __has_builtin (__builtin_constant_p))) \
216- && !__STRICT_ANSI__)
217+# define xalloc_oversized(n, s) \
218+ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
219+#elif 5 <= __GNUC__ && !__STRICT_ANSI__
220 # define xalloc_oversized(n, s) \
221 (__builtin_constant_p (n) && __builtin_constant_p (s) \
222 ? __xalloc_oversized (n, s) \
223- : ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); }))
224+ : ({ __xalloc_count_type __xalloc_count; \
225+ __builtin_mul_overflow (n, s, &__xalloc_count); }))
226
227 /* Other compilers use integer division; this may be slower but is
228 more portable. */
diff --git a/meta/recipes-extended/diffutils/diffutils-3.5/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/diffutils/diffutils-3.6/0001-Unset-need_charset_alias-when-building-for-musl.patch
index ba1a4bab4c..ba1a4bab4c 100644
--- a/meta/recipes-extended/diffutils/diffutils-3.5/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/meta/recipes-extended/diffutils/diffutils-3.6/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch b/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch
new file mode 100644
index 0000000000..351f87cab5
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch
@@ -0,0 +1,30 @@
1Subject: explicitly disable replacing getopt
2
3Explicitly disable replacing getopt to avoid compilation error like below.
4
5 xstrtol-error.c:84:26: error: invalid use of undefined type 'struct rpl_option'
6
7Upstream-Status: Inappropriate [workaround]
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 m4/getopt.m4 | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/m4/getopt.m4 b/m4/getopt.m4
14index 3ebc7b7..8934426 100644
15--- a/m4/getopt.m4
16+++ b/m4/getopt.m4
17@@ -22,8 +22,8 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
18 fi
19 ])
20 if test $REPLACE_GETOPT = 1; then
21- dnl Arrange for getopt.h to be created.
22- gl_GETOPT_SUBSTITUTE_HEADER
23+ dnl Explicitly disable replacing getopt
24+ :
25 fi
26 ])
27
28--
292.11.0
30
diff --git a/meta/recipes-extended/diffutils/diffutils-3.5/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.6/run-ptest
index 695c5e8a7b..695c5e8a7b 100644
--- a/meta/recipes-extended/diffutils/diffutils-3.5/run-ptest
+++ b/meta/recipes-extended/diffutils/diffutils-3.6/run-ptest
diff --git a/meta/recipes-extended/diffutils/diffutils_3.5.bb b/meta/recipes-extended/diffutils/diffutils_3.6.bb
index a4fc27bec3..a2ea484d88 100644
--- a/meta/recipes-extended/diffutils/diffutils_3.5.bb
+++ b/meta/recipes-extended/diffutils/diffutils_3.6.bb
@@ -5,24 +5,18 @@ require diffutils.inc
5 5
6SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ 6SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
7 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ 7 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
8 file://diffutils-3.5-gcc7.patch \
9 file://run-ptest \ 8 file://run-ptest \
10" 9"
11SRC_URI[md5sum] = "569354697ff1cfc9a9de3781361015fa" 10SRC_URI_append_libc-glibc = " file://0001-explicitly-disable-replacing-getopt.patch"
12SRC_URI[sha256sum] = "dad398ccd5b9faca6b0ab219a036453f62a602a56203ac659b43e889bec35533" 11
12SRC_URI[md5sum] = "07cf286672ced26fba54cd0313bdc071"
13SRC_URI[sha256sum] = "d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6"
13 14
14EXTRA_OECONF += "ac_cv_path_PR_PROGRAM=${bindir}/pr --without-libsigsegv-prefix" 15EXTRA_OECONF += "ac_cv_path_PR_PROGRAM=${bindir}/pr --without-libsigsegv-prefix"
15 16
16# Fix "Argument list too long" error when len(TMPDIR) = 410 17# Fix "Argument list too long" error when len(TMPDIR) = 410
17acpaths = "-I ./m4" 18acpaths = "-I ./m4"
18 19
19do_configure_prepend () {
20 # Need to remove gettext macros with weird mix of versions
21 for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
22 rm -f ${S}/m4/$i
23 done
24}
25
26inherit ptest 20inherit ptest
27 21
28do_install_ptest() { 22do_install_ptest() {