summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2013-08-19 09:16:55 +0000
committerZhenhua Luo <zhenhua.luo@freescale.com>2013-08-20 17:49:32 +0800
commitefd344473c277eab8c1bae56120779983aba6176 (patch)
treec56f80c55486eda93a9c4e07fad5e4be90b770a7 /recipes-core
parent399c1ab5e86cf6dbb7c0c48d5253ac8798d6bfe4 (diff)
downloadmeta-fsl-ppc-efd344473c277eab8c1bae56120779983aba6176.tar.gz
coreutils: fix the segfault issue of dd on e500v2 targets
Since double-float is disabled for e500v2 targets build due to ICE of gcc-4.8.1, accordingly %Ld format of sprintf is disabled. Address Bug 4910 - [p1022ds]urandom: segmentation fault Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/coreutils/coreutils_8.21.bbappend4
-rw-r--r--recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch37
2 files changed, 41 insertions, 0 deletions
diff --git a/recipes-core/coreutils/coreutils_8.21.bbappend b/recipes-core/coreutils/coreutils_8.21.bbappend
new file mode 100644
index 0000000..37d3ce2
--- /dev/null
+++ b/recipes-core/coreutils/coreutils_8.21.bbappend
@@ -0,0 +1,4 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI_append_e500v2 = " file://coreutils-fix-dd-segfault-for-e500v2.patch \
4"
diff --git a/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch b/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch
new file mode 100644
index 0000000..dbeb9b2
--- /dev/null
+++ b/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Pending
2
3Fix the segmentation fault issue when using dd on e500v2 targets,
4use %f instead of $Lf, since single-float is used for e500v2 due to
5an ICE of gcc-4.8.1.
6
7Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
8
9--- coreutils-8.21/lib/human.c.orig 2013-08-16 05:17:24.466225177 -0500
10+++ coreutils-8.21/lib/human.c 2013-08-16 05:17:52.007225123 -0500
11@@ -228,7 +228,7 @@
12
13 if (! (opts & human_autoscale))
14 {
15- sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt));
16+ sprintf (buf, "%.0f", adjust_value (inexact_style, damt));
17 buflen = strlen (buf);
18 nonintegerlen = 0;
19 }
20@@ -246,7 +246,7 @@
21
22 damt /= e;
23
24- sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt));
25+ sprintf (buf, "%.1f", adjust_value (inexact_style, damt));
26 buflen = strlen (buf);
27 nonintegerlen = decimal_pointlen + 1;
28
29@@ -254,7 +254,7 @@
30 || ((opts & human_suppress_point_zero)
31 && buf[buflen - 1] == '0'))
32 {
33- sprintf (buf, "%.0Lf",
34+ sprintf (buf, "%.0f",
35 adjust_value (inexact_style, damt * 10) / 10);
36 buflen = strlen (buf);
37 nonintegerlen = 0;