]> git.karo-electronics.de Git - meta-tx09.git/blob - recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
elfutils: add fix for build failure using (native) gcc 8
[meta-tx09.git] / recipes-devtools / elfutils / files / 0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
1 From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Thu, 22 Mar 2018 22:44:03 -0700
4 Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
5
6 Partial backport of
7 https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
8
9 Helps fixing alignment errors e.g.
10 linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
11 ' is less than 4 [-Werror=packed-not-aligned]
12  ;
13  ^
14
15 Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
16
17 Signed-off-by: Khem Raj <raj.khem@gmail.com>
18 ---
19  backends/linux-core-note.c | 2 +-
20  1 file changed, 1 insertion(+), 1 deletion(-)
21
22 diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
23 index 5f06c896..9faae4c3 100644
24 --- a/backends/linux-core-note.c
25 +++ b/backends/linux-core-note.c
26 @@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
27    FIELD (INT, pr_fpvalid);
28  }
29  #ifdef ALIGN_PRSTATUS
30 -  __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
31 +  attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
32  #endif
33  ;
34