From: Zhenhua Luo Date: Mon, 19 Aug 2013 09:16:55 +0000 (+0000) Subject: coreutils: fix the segfault issue of dd on e500v2 targets X-Git-Tag: 2.1~534^2~235 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=3b6efdad9e033414f84da8757ae2c41785ed8e53;p=meta-freescale.git 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 --- diff --git a/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend b/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend new file mode 100644 index 00000000..37d3ce26 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_e500v2 = " file://coreutils-fix-dd-segfault-for-e500v2.patch \ +" diff --git a/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch b/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch new file mode 100644 index 00000000..dbeb9b2c --- /dev/null +++ b/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch @@ -0,0 +1,37 @@ +Upstream-Status: Pending + +Fix the segmentation fault issue when using dd on e500v2 targets, +use %f instead of $Lf, since single-float is used for e500v2 due to +an ICE of gcc-4.8.1. + +Signed-off-by: Zhenhua Luo + +--- coreutils-8.21/lib/human.c.orig 2013-08-16 05:17:24.466225177 -0500 ++++ coreutils-8.21/lib/human.c 2013-08-16 05:17:52.007225123 -0500 +@@ -228,7 +228,7 @@ + + if (! (opts & human_autoscale)) + { +- sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); ++ sprintf (buf, "%.0f", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = 0; + } +@@ -246,7 +246,7 @@ + + damt /= e; + +- sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); ++ sprintf (buf, "%.1f", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = decimal_pointlen + 1; + +@@ -254,7 +254,7 @@ + || ((opts & human_suppress_point_zero) + && buf[buflen - 1] == '0')) + { +- sprintf (buf, "%.0Lf", ++ sprintf (buf, "%.0f", + adjust_value (inexact_style, damt * 10) / 10); + buflen = strlen (buf); + nonintegerlen = 0;