summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/findutils
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-12-05 17:01:49 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-12 21:50:18 +0000
commitb9e3ddc42a5311a2b18d9899e19c98b6e7b25a49 (patch)
treeb5a0ee2a6b71cd424eb6a483b6569fb52e7ab242 /meta/recipes-extended/findutils
parent2e82fe131cf1650a0d1e1e6d23c5611064230a88 (diff)
downloadpoky-b9e3ddc42a5311a2b18d9899e19c98b6e7b25a49.tar.gz
findutils: Fix compilation for x32 toolchain
Work around gnulib time_t assumption in findutils for x32 time_t is 64bit and long int is 32bit on x32. But gnulib used in findutils assumes time_t values fit into long int. Such assumption is invalid for x32 and should be removed. This patch is a workaround to compile gnulib for x32. (From OE-Core rev: 8a80a3510c65419a6fcd9e38ad3ef4234778b921) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-Off-By: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/findutils')
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch40
-rw-r--r--meta/recipes-extended/findutils/findutils_4.4.2.bb5
2 files changed, 43 insertions, 2 deletions
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
new file mode 100644
index 0000000000..dd2ab0e5ab
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
@@ -0,0 +1,40 @@
1UpstreamStatus: Pending
2
3Author: H.J. Lu <hjl.tools@gmail.com>
4
5Work around gnulib time_t assumption in findutils for x32
6
7time_t is 64bit and long int is 32bit on x32. But gnulib used in
8findutils assumes time_t values fit into long int. Such assumption is
9invalid for x32 and should be removed.
10
11This patch is a workaround to compile gnulib for x32.
12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
14
15
16Index: findutils-4.4.2/gnulib/lib/getdate.y
17===================================================================
18--- findutils-4.4.2.orig/gnulib/lib/getdate.y
19+++ findutils-4.4.2/gnulib/lib/getdate.y
20@@ -114,7 +114,6 @@
21 wraps around, but there's no portable way to check for that at
22 compile-time. */
23 verify (TYPE_IS_INTEGER (time_t));
24-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
25
26 /* An integer value, and the number of digits in its textual
27 representation. */
28Index: findutils-4.4.2/gnulib/lib/mktime.c
29===================================================================
30--- findutils-4.4.2.orig/gnulib/lib/mktime.c
31+++ findutils-4.4.2/gnulib/lib/mktime.c
32@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
33 {
34 verify (C99_integer_division, -1 / 2 == 0);
35 verify (long_int_year_and_yday_are_wide_enough,
36- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
37+ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
38
39 /* Compute intervening leap days correctly even if year is negative.
40 Take care to avoid integer overflow here. */
diff --git a/meta/recipes-extended/findutils/findutils_4.4.2.bb b/meta/recipes-extended/findutils/findutils_4.4.2.bb
index cfc65465b8..c25ba4cd12 100644
--- a/meta/recipes-extended/findutils/findutils_4.4.2.bb
+++ b/meta/recipes-extended/findutils/findutils_4.4.2.bb
@@ -1,10 +1,11 @@
1require findutils.inc 1require findutils.inc
2 2
3PR = "r0" 3PR = "r1"
4 4
5SRC_URI += "file://01-27017.patch \ 5SRC_URI += "file://01-27017.patch \
6 file://02-28824.patch \ 6 file://02-28824.patch \
7 file://03-28872.patch" 7 file://03-28872.patch \
8 file://findutils_fix_for_x32.patch "
8 9
9SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f" 10SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
10SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a" 11SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"