diff options
Diffstat (limited to 'poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch')
-rw-r--r-- | poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch b/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch new file mode 100644 index 0000000000..22a01cfa71 --- /dev/null +++ b/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch @@ -0,0 +1,35 @@ +From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:25:16 +0800 +Subject: [PATCH 5/7] fix a stack-usage warning + +Upstream-Status: Pending + +not use a variable to as a array size, otherwise the warning to error +that +stack usage might be unbounded [-Werror=stack-usage=] will happen + +Signed-off-by: Roy Li <rongqing.li@windriver.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + backends/ppc_initreg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c +index 69d623b..de41dec 100644 +--- a/backends/ppc_initreg.c ++++ b/backends/ppc_initreg.c +@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + return false; + } + const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); +- Dwarf_Word dwarf_regs[gprs]; ++ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)]; + for (unsigned gpr = 0; gpr < gprs; gpr++) + dwarf_regs[gpr] = user_regs.r.gpr[gpr]; + if (! setfunc (0, gprs, dwarf_regs, arg)) +-- +1.8.3.1 + |