summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-09-07 23:35:31 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-09-08 17:12:29 +0000
commitf222ccb8d78434a38e592fca3cc8b76906e80955 (patch)
treedc0a62f18fa6987c112419c1152b28d6d7b50fab
parent1ccc5eab90190d9f508ae63aa39d8f41b189b445 (diff)
Fix build of elfutils with newer gcc
+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] Reference: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f67a0bae8bc22d227f73579b2bc780719bbdeb1b Bug-AGL: SPEC-2806 Change-Id: Iaed60d6b5b353a67de969d42680195769ecace53 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
-rw-r--r--meta-agl-bsp/recipes-devtools/elfutils/elfutils_%.bbappend3
-rw-r--r--meta-agl-bsp/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch34
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-agl-bsp/recipes-devtools/elfutils/elfutils_%.bbappend b/meta-agl-bsp/recipes-devtools/elfutils/elfutils_%.bbappend
new file mode 100644
index 000000000..c336f0c74
--- /dev/null
+++ b/meta-agl-bsp/recipes-devtools/elfutils/elfutils_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch"
+
diff --git a/meta-agl-bsp/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/meta-agl-bsp/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 000000000..cf4d1dfe7
--- /dev/null
+++ b/meta-agl-bsp/recipes-devtools/elfutils/files/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
+ ;
+