summaryrefslogtreecommitdiff
path: root/recipes-devtools
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-05-23 01:41:37 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-05-23 01:43:26 +0200
commitfeec808563c1ebcb0904982c8b385367e12268da (patch)
tree30c928e5a6ebc24d851e0000634b295de01c51c4 /recipes-devtools
parent80a7a08f5cfc057aca9c8c1653bdbe778d4a50ef (diff)
elfutils: Fix gcc compile time alignment errors
Allow devtool to organize the SRC_URI Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry-picked from openembedded-core commit 49aae1d75ff1c6a9643c30a8cc5776a2ffa83dd3)
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/elfutils/elfutils/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch34
-rw-r--r--recipes-devtools/elfutils/elfutils_0.170.bbappend6
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-devtools/elfutils/elfutils/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/recipes-devtools/elfutils/elfutils/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 0000000..cf4d1df
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
@@ -0,0 +1,34 @@
+From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 22:44:03 -0700
+Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
+
+Partial backport of
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
+
+Helps fixing alignment errors e.g.
+linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
+' is less than 4 [-Werror=packed-not-aligned]
+ ;
+ ^
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ backends/linux-core-note.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 5f06c896..9faae4c3 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
+ FIELD (INT, pr_fpvalid);
+ }
+ #ifdef ALIGN_PRSTATUS
+- __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
++ attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
+ #endif
+ ;
+
diff --git a/recipes-devtools/elfutils/elfutils_0.170.bbappend b/recipes-devtools/elfutils/elfutils_0.170.bbappend
new file mode 100644
index 0000000..08957a2
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils_0.170.bbappend
@@ -0,0 +1,6 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/elfutils:"
+
+SRC_URI += " \
+ file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch \
+"