elfutils: add patch that fixes compilation under gcc8#40705
Conversation
a32ae35 to
be54e77
Compare
|
Success on x86_64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
There was a problem hiding this comment.
Could you use
# From: https://patchwork.openembedded.org/patch/149575/
(fetchpatch {
name = "0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch";
url = https://patchwork.openembedded.org/patch/149575/raw/;
sha256 = "0000000000000000000000000000000000000000000000000000000000000000";
})There was a problem hiding this comment.
Is that also possible if it's a patch within a patch? (The patch that is linked adds a patch file, it isn't just the patch)
There was a problem hiding this comment.
Relevant part of the linked patch:
diff --git a/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 0000000000..cf4d1dfe75
--- /dev/null
+++ b/meta/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 <[email protected]>
+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 <[email protected]>
+---
+ 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
+ ;
+
There was a problem hiding this comment.
be54e77 to
8787699
Compare
|
Success on x86_64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
|
@jtojnar Better? |
| patches = ./debug-info-from-env.patch; | ||
| patches = [ | ||
| ./debug-info-from-env.patch | ||
| (fetchpatch { |
There was a problem hiding this comment.
fetchurl should be enough here, it is just a static file.
| url = http://git.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch?id=49aae1d75ff1c6a9643c30a8cc5776a2ffa83dd3; | ||
| sha256 = "09y4x1yaqm84w7cy1sf57a6g8ah49b0349dsj2a81wy4flw8ih5j"; | ||
| }) | ||
| ]; |
| patches = ./debug-info-from-env.patch; | ||
| patches = [ | ||
| ./debug-info-from-env.patch | ||
| (fetchpatch { |
There was a problem hiding this comment.
Maybe keep the source comment, or mention that it is for GCC 8, or something
|
Success on x86_64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: elfutils Partial log (click to expand)
|
This reverts commit b12448c.
* elfutils: add patch that fixes compilation under gcc8 * elfutils: follow advice from @jtojnar
Motivation for this change
Was failing: https://hydra.nixos.org/build/73828348/nixlog/2
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)