From patchwork Wed May 16 06:32:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 135978 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp491207lji; Tue, 15 May 2018 23:32:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrRjQVMF7WPaXcjfUS0ETVRHXFFXiiWOSea+9XrjfxMkq6SDuOtq+8lfZCdHDxmv63QvjLk X-Received: by 2002:a65:46c1:: with SMTP id n1-v6mr15083975pgr.62.1526452342423; Tue, 15 May 2018 23:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526452342; cv=none; d=google.com; s=arc-20160816; b=oP0a5YvQdRL0tU6tH1QodLp76c2+Y0dd37qjSMjAP6pXTzqNMQPU71FvdFMvh9izC+ gaRyqUV6aOWJnwIAMtGPmWvrGmoGcBZGpvKjVGv3iSCxGjpBXu2e9+6LXimhetIDwO7J AMKJoyGklo1rG2qhSKCJynoAmrvpZLoDFySzAJIoQRXMI4uqvMqzdBbWdlzjlquP6/k+ Fp1y7HAIdXB+8O2aVsd1JYOrif/kZhvwy8jg4Zl6wN8ONeO7RbHkGSsIGroiSn6+Zg7T AS+YxIxJnjJcKGYv47WgufBrs833xRp+CCCtIIWc2VM2X3r/i3N690YCpgBL0G7d2F/W BFuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :references:in-reply-to:mime-version:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=WcfMHoMF9RoindcU8nQRw+S2mADr4OvBnBI/H3nh3Y4=; b=Atf8W+DrInC/3q6VVTjNFndUP+7ysx5aFOsJuU3mS9f7IWlkpRHG3NqbjLfGCFzy54 GU3VW72e+wuh79nbTWRi/qTqq6P17iKDMzhYW0+dhkxsNz4ychuuQXsynUN7Y8BPxP3O AUWQta+GlH+coXQAHb0Mq3Adppad5nwLG4CAdyWkyC/3PENzc2tBpHiIwzP8Q7ed3293 0rZ3mbkcIZ42y8Sn8YSW6sCovuxKHNx2cLgvhaBpnGk4MI2PU9GfhBqEpNaZo6TM9sjY IdR4AE5Gm8YK80sE7rRaOpdh6J4cRKnFgehwo06B15JBOo/Zb9NI2BY5LOzFVbXnvHpj QJmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pD8HSAHU; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u8-v6si1907734plz.392.2018.05.15.23.32.22; Tue, 15 May 2018 23:32:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pD8HSAHU; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 5CDB674955; Wed, 16 May 2018 06:32:20 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by mail.openembedded.org (Postfix) with ESMTP id 9E89374903 for ; Wed, 16 May 2018 06:32:18 +0000 (UTC) Received: by mail-pg0-f44.google.com with SMTP id a13-v6so1143599pgu.4 for ; Tue, 15 May 2018 23:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version:in-reply-to :references:content-transfer-encoding; bh=Bfw9e8+4qqdYIw3JpWxoLxMewvEFVJijf3hp/xgKStk=; b=pD8HSAHUaPNmFx3ZnvLd8COJLqZZSyeH/vlhLfKdrVSdkE6IQNaMAe5gw/wzUaybY/ Bv0zEqGcH7YJN99EqlLUaOEb+XsYBV2gLEcCh2XHOmPbbSiclGgocOQdlTuNBOwkAD+w Dnt9N8/hwQqX1XztUypQEVxsNs+MIwzZz7UvOI0NZ9rJXkFQQcrOJAcy9ta+yJNBQHdR uR8yyhGBPVbDJeB0HHu7a9lg5D0LvDjv5rkV3gnoJNXtNn11UERPQwj56OMEUusb02tM zTiqFTpL/CYkepBsap26oGWRFIvzU+a5CNZ09+9s4RvtQZXFcXaATD15fgru29T19Eam oCkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :in-reply-to:references:content-transfer-encoding; bh=Bfw9e8+4qqdYIw3JpWxoLxMewvEFVJijf3hp/xgKStk=; b=dGhyPmSbvCRUGNHmNFyatpoBSZbUGSkBuw6hePI0QVlHPS405AmEJIj1/p66vuPCnT qZ+QxYx98T3PgD4AJ3Q44ZMxJOEipULMvhzzxEtWJmZ9EtWY1QZRvZKrvgAQIqBhYcJY p5B2kBn81gKAX6395wg7VPOatmeQkMkPnbqz8+/3p4GrhFu6R0uo4N/OrlPvk4Eqc1bs gJ7yGqAo0+Telqx4woCwidunJpGlnShnQtdix9TLOBdaDVwgSIhPUCLrfMpTTyasMr1V jeIji7cuZyvm9miiL6yEpbPMHzKZv43J5wXblAIN1D7MuMDD7U1sgR8cBfaRhQSjmP7G zIyQ== X-Gm-Message-State: ALKqPwdyjDenisH2HQGj5LkkrtDNZdG/D0pBimmj+xcUELY/nFEkPQ1L n0U7/n4UQU8L6Q/a4UKMeidp2Q== X-Received: by 2002:a62:4fd8:: with SMTP id f85-v6mr18577835pfj.77.1526452338864; Tue, 15 May 2018 23:32:18 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id s8-v6sm2517411pfh.30.2018.05.15.23.32.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:32:18 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 15 May 2018 23:32:09 -0700 Message-Id: X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 In-Reply-To: References: Subject: [OE-core] [PATCH 1/4] gdb: Upgrade to 8.1 release X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org cache strerror so it does not try to use rpl_* versions Signed-off-by: Khem Raj --- meta/conf/distro/include/tcmode-default.inc | 2 +- .../gdb/{gdb-8.0.1.inc => gdb-8.1.inc} | 5 +- ...ian_8.0.1.bb => gdb-cross-canadian_8.1.bb} | 0 .../{gdb-cross_8.0.1.bb => gdb-cross_8.1.bb} | 0 .../0001-include-sys-types.h-for-mode_t.patch | 12 +- ...port-for-Renesas-SH-sh4-architecture.patch | 153 ++++++++---------- ...0012-Unbreak-GDBserver-build-for-x32.patch | 101 ------------ .../gdb/{gdb_8.0.1.bb => gdb_8.1.bb} | 2 + 8 files changed, 82 insertions(+), 193 deletions(-) rename meta/recipes-devtools/gdb/{gdb-8.0.1.inc => gdb-8.1.inc} (85%) rename meta/recipes-devtools/gdb/{gdb-cross-canadian_8.0.1.bb => gdb-cross-canadian_8.1.bb} (100%) rename meta/recipes-devtools/gdb/{gdb-cross_8.0.1.bb => gdb-cross_8.1.bb} (100%) delete mode 100644 meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch rename meta/recipes-devtools/gdb/{gdb_8.0.1.bb => gdb_8.1.bb} (86%) diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 00399ae820..4b58df0459 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -25,7 +25,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext" GCCVERSION ?= "7.%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.30%" -GDBVERSION ?= "8.0%" +GDBVERSION ?= "8.1%" GLIBCVERSION ?= "2.27%" LINUXLIBCVERSION ?= "4.15%" QEMUVERSION ?= "2.11%" diff --git a/meta/recipes-devtools/gdb/gdb-8.0.1.inc b/meta/recipes-devtools/gdb/gdb-8.1.inc similarity index 85% rename from meta/recipes-devtools/gdb/gdb-8.0.1.inc rename to meta/recipes-devtools/gdb/gdb-8.1.inc index 4a5299b73f..4d9faa2d4b 100644 --- a/meta/recipes-devtools/gdb/gdb-8.0.1.inc +++ b/meta/recipes-devtools/gdb/gdb-8.1.inc @@ -16,9 +16,8 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ file://0009-Change-order-of-CFLAGS.patch \ file://0010-resolve-restrict-keyword-conflict.patch \ file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ - file://0012-Unbreak-GDBserver-build-for-x32.patch \ file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \ " -SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac" -SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3" +SRC_URI[md5sum] = "f46487561f9a16916a8102316f7fd105" +SRC_URI[sha256sum] = "af61a0263858e69c5dce51eab26662ff3d2ad9aa68da9583e8143b5426be4b34" diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.1.bb similarity index 100% rename from meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb rename to meta/recipes-devtools/gdb/gdb-cross-canadian_8.1.bb diff --git a/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb b/meta/recipes-devtools/gdb/gdb-cross_8.1.bb similarity index 100% rename from meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb rename to meta/recipes-devtools/gdb/gdb-cross_8.1.bb diff --git a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch index 4f06d46d70..5d19380e30 100644 --- a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch +++ b/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch @@ -1,7 +1,7 @@ -From 91da0458b333249eb9c2f4c1f1e53fa4bc085cc9 Mon Sep 17 00:00:00 2001 +From ff37f9360ab6f841f28ced9f23f66542febcc0f6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 19 Jan 2016 18:18:52 -0800 -Subject: [PATCH 01/10] include sys/types.h for mode_t +Subject: [PATCH 01/11] include sys/types.h for mode_t mode_t is used in target.h, so we need to include sys/types.h to get the defintion @@ -14,17 +14,17 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h -index 3cc2bc4bab..e6b19b06b9 100644 +index 25accd2207..7f6bca8aa4 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h -@@ -28,6 +28,7 @@ - #include "target/waitstatus.h" +@@ -29,6 +29,7 @@ #include "mem-break.h" #include "btrace-common.h" + #include +#include struct emit_ops; struct buffer; -- -2.13.1 +2.17.0 diff --git a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch index cb1b7abd07..f678598284 100644 --- a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch +++ b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch @@ -1,7 +1,7 @@ -From 60ac68f601885ea6480229a5c8a89a0257da376c Mon Sep 17 00:00:00 2001 +From 8757b36be6109f6d7ea0bd8dafbaed647e0d2192 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 02:31:12 +0000 -Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture. +Subject: [PATCH 05/11] Add support for Renesas SH (sh4) architecture. gdb (7.4-1~cvs20111117.2) experimental; urgency=low . @@ -15,35 +15,35 @@ Signed-off-by: Khem Raj --- gdb/Makefile.in | 2 + gdb/configure.host | 1 + - gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++ - gdb/sh-tdep.c | 54 ++-- - gdb/sh-tdep.h | 49 ++++ + gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++ + gdb/sh-tdep.c | 53 ++- + gdb/sh-tdep.h | 49 +++ gdb/testsuite/gdb.asm/asm-source.exp | 5 + gdb/testsuite/gdb.asm/sh.inc | 3 +- gdb/testsuite/gdb.base/annota1.c | 3 + gdb/testsuite/gdb.base/annota3.c | 4 + gdb/testsuite/gdb.base/sigall.c | 3 + gdb/testsuite/gdb.base/signals.c | 4 + - 11 files changed, 618 insertions(+), 29 deletions(-) + 11 files changed, 617 insertions(+), 29 deletions(-) -diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index 8be73ba423..e287ff6a2e 100644 ---- a/gdb/Makefile.in -+++ b/gdb/Makefile.in -@@ -2638,6 +2638,8 @@ ALLDEPFILES = \ - sh-nbsd-tdep.c \ - sh-tdep.c \ - sh64-tdep.c \ -+ sh-linux-tdep.c \ -+ sh-linux-nat.c \ - sol2-tdep.c \ - solib-aix.c \ - solib-spu.c \ -diff --git a/gdb/configure.host b/gdb/configure.host -index d74fd04934..be12de1446 100644 ---- a/gdb/configure.host -+++ b/gdb/configure.host -@@ -150,6 +150,7 @@ powerpc*-*-linux*) gdb_host=linux ;; +Index: gdb-8.1/gdb/Makefile.in +=================================================================== +--- gdb-8.1.orig/gdb/Makefile.in ++++ gdb-8.1/gdb/Makefile.in +@@ -758,6 +758,8 @@ ALL_TARGET_OBS = \ + sh-linux-tdep.o \ + sh-nbsd-tdep.o \ + sh-tdep.o \ ++ sh-linux-tdep.o \ ++ sh-linux-nat.o \ + sh64-tdep.o \ + sol2-tdep.o \ + solib-aix.o \ +Index: gdb-8.1/gdb/configure.host +=================================================================== +--- gdb-8.1.orig/gdb/configure.host ++++ gdb-8.1/gdb/configure.host +@@ -152,6 +152,7 @@ powerpc*-*-linux*) gdb_host=linux ;; s390*-*-linux*) gdb_host=linux ;; @@ -51,10 +51,10 @@ index d74fd04934..be12de1446 100644 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) gdb_host=nbsd ;; sh*-*-openbsd*) gdb_host=nbsd ;; -diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c -index c5c745d218..84e539aad3 100644 ---- a/gdb/sh-linux-tdep.c -+++ b/gdb/sh-linux-tdep.c +Index: gdb-8.1/gdb/sh-linux-tdep.c +=================================================================== +--- gdb-8.1.orig/gdb/sh-linux-tdep.c ++++ gdb-8.1/gdb/sh-linux-tdep.c @@ -18,14 +18,37 @@ along with this program. If not, see . */ @@ -93,7 +93,7 @@ index c5c745d218..84e539aad3 100644 #include "glibc-tdep.h" #include "sh-tdep.h" #include "linux-tdep.h" -@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = { +@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_si sh_linux_rt_sigreturn_init }; @@ -599,10 +599,10 @@ index c5c745d218..84e539aad3 100644 linux_init_abi (info, gdbarch); /* GNU/Linux uses SVR4-style shared libraries. */ -diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c -index 2c2b26847d..14f5281ed4 100644 ---- a/gdb/sh-tdep.c -+++ b/gdb/sh-tdep.c +Index: gdb-8.1/gdb/sh-tdep.c +=================================================================== +--- gdb-8.1.orig/gdb/sh-tdep.c ++++ gdb-8.1/gdb/sh-tdep.c @@ -21,6 +21,9 @@ sac@cygnus.com. */ @@ -613,15 +613,7 @@ index 2c2b26847d..14f5281ed4 100644 #include "frame.h" #include "frame-base.h" #include "frame-unwind.h" -@@ -35,6 +38,7 @@ - #include "arch-utils.h" - #include "floatformat.h" - #include "regcache.h" -+#include "regset.h" - #include "doublest.h" - #include "osabi.h" - #include "reggroups.h" -@@ -68,23 +72,6 @@ static const char *const sh_cc_enum[] = { +@@ -67,23 +70,6 @@ static const char *const sh_cc_enum[] = static const char *sh_active_calling_convention = sh_cc_gcc; @@ -645,7 +637,7 @@ index 2c2b26847d..14f5281ed4 100644 static int sh_is_renesas_calling_convention (struct type *func_type) { -@@ -1052,7 +1039,7 @@ sh_treat_as_flt_p (struct type *type) +@@ -1051,7 +1037,7 @@ sh_treat_as_flt_p (struct type *type) return 0; /* Otherwise if the type of that member is float, the whole type is treated as float. */ @@ -654,7 +646,7 @@ index 2c2b26847d..14f5281ed4 100644 return 1; /* Otherwise it's not treated as float. */ return 0; -@@ -1102,7 +1089,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, +@@ -1101,7 +1087,7 @@ sh_push_dummy_call_fpu (struct gdbarch * in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -663,7 +655,7 @@ index 2c2b26847d..14f5281ed4 100644 len = TYPE_LENGTH (type); val = sh_justify_value_in_reg (gdbarch, args[argnum], len); -@@ -1828,7 +1815,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, +@@ -1835,7 +1821,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch reg->how = DWARF2_FRAME_REG_UNDEFINED; } @@ -672,7 +664,7 @@ index 2c2b26847d..14f5281ed4 100644 sh_alloc_frame_cache (void) { struct sh_frame_cache *cache; -@@ -1855,7 +1842,7 @@ sh_alloc_frame_cache (void) +@@ -1862,7 +1848,7 @@ sh_alloc_frame_cache (void) return cache; } @@ -681,7 +673,7 @@ index 2c2b26847d..14f5281ed4 100644 sh_frame_cache (struct frame_info *this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); -@@ -1922,9 +1909,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) +@@ -1929,9 +1915,9 @@ sh_frame_cache (struct frame_info *this_ return cache; } @@ -694,7 +686,7 @@ index 2c2b26847d..14f5281ed4 100644 { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); -@@ -1938,7 +1925,7 @@ sh_frame_prev_register (struct frame_info *this_frame, +@@ -1945,7 +1931,7 @@ sh_frame_prev_register (struct frame_inf the current frame. Frob regnum so that we pull the value from the correct place. */ if (regnum == gdbarch_pc_regnum (gdbarch)) @@ -703,7 +695,7 @@ index 2c2b26847d..14f5281ed4 100644 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) return frame_unwind_got_memory (this_frame, regnum, -@@ -2247,8 +2234,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, +@@ -2254,8 +2240,8 @@ sh_return_in_first_hidden_param_p (struc static struct gdbarch * sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { @@ -713,7 +705,7 @@ index 2c2b26847d..14f5281ed4 100644 /* SH5 is handled entirely in sh64-tdep.c. */ if (info.bfd_arch_info->mach == bfd_mach_sh5) -@@ -2264,6 +2251,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -2271,6 +2257,18 @@ sh_gdbarch_init (struct gdbarch_info inf tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); @@ -732,7 +724,7 @@ index 2c2b26847d..14f5281ed4 100644 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); -@@ -2418,10 +2417,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -2425,10 +2423,11 @@ sh_gdbarch_init (struct gdbarch_info inf break; } @@ -745,10 +737,10 @@ index 2c2b26847d..14f5281ed4 100644 frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind); frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); -diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h -index d15ef050e0..c4642cefa4 100644 ---- a/gdb/sh-tdep.h -+++ b/gdb/sh-tdep.h +Index: gdb-8.1/gdb/sh-tdep.h +=================================================================== +--- gdb-8.1.orig/gdb/sh-tdep.h ++++ gdb-8.1/gdb/sh-tdep.h @@ -21,6 +21,12 @@ /* Contributed by Steve Chamberlain sac@cygnus.com. */ @@ -828,10 +820,10 @@ index d15ef050e0..c4642cefa4 100644 /* Non-NULL when debugging from a core file. Provides the offset where each general-purpose register is stored inside the associated core file section. */ -diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp -index e07e5543f2..f5e60e1002 100644 ---- a/gdb/testsuite/gdb.asm/asm-source.exp -+++ b/gdb/testsuite/gdb.asm/asm-source.exp +Index: gdb-8.1/gdb/testsuite/gdb.asm/asm-source.exp +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.asm/asm-source.exp ++++ gdb-8.1/gdb/testsuite/gdb.asm/asm-source.exp @@ -116,6 +116,11 @@ switch -glob -- [istarget] { append link-flags " -m elf32ppc" } @@ -844,10 +836,10 @@ index e07e5543f2..f5e60e1002 100644 "sh*-*-*" { set asm-arch sh set debug-flags "-gdwarf-2" -diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc -index a4a5fc545e..89efed7795 100644 ---- a/gdb/testsuite/gdb.asm/sh.inc -+++ b/gdb/testsuite/gdb.asm/sh.inc +Index: gdb-8.1/gdb/testsuite/gdb.asm/sh.inc +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.asm/sh.inc ++++ gdb-8.1/gdb/testsuite/gdb.asm/sh.inc @@ -40,9 +40,8 @@ mov.l .Lconst\@,r1 bra .Lafterconst\@ @@ -859,10 +851,10 @@ index a4a5fc545e..89efed7795 100644 .long \subr .align 1 .Lafterconst\@: -diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c -index 424e1b8327..0de2e7b633 100644 ---- a/gdb/testsuite/gdb.base/annota1.c -+++ b/gdb/testsuite/gdb.base/annota1.c +Index: gdb-8.1/gdb/testsuite/gdb.base/annota1.c +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.base/annota1.c ++++ gdb-8.1/gdb/testsuite/gdb.base/annota1.c @@ -1,6 +1,9 @@ #include #include @@ -873,10 +865,10 @@ index 424e1b8327..0de2e7b633 100644 void handle_USR1 (int sig) -diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c -index 424e1b8327..952aaf218a 100644 ---- a/gdb/testsuite/gdb.base/annota3.c -+++ b/gdb/testsuite/gdb.base/annota3.c +Index: gdb-8.1/gdb/testsuite/gdb.base/annota3.c +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.base/annota3.c ++++ gdb-8.1/gdb/testsuite/gdb.base/annota3.c @@ -1,6 +1,10 @@ #include #include @@ -888,10 +880,10 @@ index 424e1b8327..952aaf218a 100644 void handle_USR1 (int sig) -diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c -index 81f3b08d6b..1574b2d6cb 100644 ---- a/gdb/testsuite/gdb.base/sigall.c -+++ b/gdb/testsuite/gdb.base/sigall.c +Index: gdb-8.1/gdb/testsuite/gdb.base/sigall.c +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.base/sigall.c ++++ gdb-8.1/gdb/testsuite/gdb.base/sigall.c @@ -1,6 +1,9 @@ #include #include @@ -902,10 +894,10 @@ index 81f3b08d6b..1574b2d6cb 100644 /* Signal handlers, we set breakpoints in them to make sure that the signals really get delivered. */ -diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c -index 756606880f..1205a9bc9c 100644 ---- a/gdb/testsuite/gdb.base/signals.c -+++ b/gdb/testsuite/gdb.base/signals.c +Index: gdb-8.1/gdb/testsuite/gdb.base/signals.c +=================================================================== +--- gdb-8.1.orig/gdb/testsuite/gdb.base/signals.c ++++ gdb-8.1/gdb/testsuite/gdb.base/signals.c @@ -3,6 +3,10 @@ #include #include @@ -917,6 +909,3 @@ index 756606880f..1205a9bc9c 100644 static int count = 0; --- -2.13.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch b/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch deleted file mode 100644 index 18a3ce3d63..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 3e1e401053ea5f02a9e9c65abddd31a03baa1bd1 Mon Sep 17 00:00:00 2001 -From: Yao Qi -Date: Fri, 29 Dec 2017 12:57:25 +0800 -Subject: [PATCH] Unbreak GDBserver build for x32 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When I verify my target description changes, I build GDB and GDBserver for -x32, but it failed. - -/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c -../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’: -../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope - case X86_TDESC_AVX512: - ^ -../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope - return tdesc_x32_avx512_linux; - ^ -../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’: -../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope - init_registers_x32_avx512_linux (); - ^ - -ipa_x32_linux_regobj use to be there, but removed by -22049425ce40324139be82d9a6ec518c46b65815 by mistake. - -gdb/gdbserver: - -2017-08-04 Yao Qi - - * configure.srv (ipa_x32_linux_regobj): New. - * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512 - instead of X86_TDESC_AVX512. - (initialize_low_tracepoint): Call - init_registers_x32_avx_avx512_linux. - -Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79] - -Signed-off-by: Anuj Mittal ---- - ChangeLog | 8 ++++++++ - gdb/gdbserver/configure.srv | 1 + - gdb/gdbserver/linux-amd64-ipa.c | 6 +++--- - 3 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 4ac2d63..b5b8228 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,11 @@ -+ 2017-08-04 Yao Qi -+ -+ * configure.srv (ipa_x32_linux_regobj): New. -+ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512 -+ instead of X86_TDESC_AVX512. -+ (initialize_low_tracepoint): Call -+ init_registers_x32_avx_avx512_linux. -+ - 2017-04-13 Andrew Jenner - - * config.sub: Sync with master version in config project. -diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv -index d00d9e2..56951c8 100644 ---- a/gdb/gdbserver/configure.srv -+++ b/gdb/gdbserver/configure.srv -@@ -31,6 +31,7 @@ srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o - - ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o" - ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o" -+ipa_x32_linux_regobj="x32-linux-ipa.o x32-avx-linux-ipa.o x32-avx-avx512-linux-ipa.o" - ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o" - - srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml" -diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c -index 67f36c2..683339b 100644 ---- a/gdb/gdbserver/linux-amd64-ipa.c -+++ b/gdb/gdbserver/linux-amd64-ipa.c -@@ -181,8 +181,8 @@ get_ipa_tdesc (int idx) - return tdesc_x32_linux; - case X86_TDESC_AVX: - return tdesc_x32_avx_linux; -- case X86_TDESC_AVX512: -- return tdesc_x32_avx512_linux; -+ case X86_TDESC_AVX_AVX512: -+ return tdesc_x32_avx_avx512_linux; - default: - break; - } -@@ -279,7 +279,7 @@ initialize_low_tracepoint (void) - #if defined __ILP32__ - init_registers_x32_linux (); - init_registers_x32_avx_linux (); -- init_registers_x32_avx512_linux (); -+ init_registers_x32_avx_avx512_linux (); - #else - init_registers_amd64_linux (); - init_registers_amd64_avx_linux (); --- -2.7.4 - diff --git a/meta/recipes-devtools/gdb/gdb_8.0.1.bb b/meta/recipes-devtools/gdb/gdb_8.1.bb similarity index 86% rename from meta/recipes-devtools/gdb/gdb_8.0.1.bb rename to meta/recipes-devtools/gdb/gdb_8.1.bb index ea8fef122c..84ab08ce93 100644 --- a/meta/recipes-devtools/gdb/gdb_8.0.1.bb +++ b/meta/recipes-devtools/gdb/gdb_8.1.bb @@ -6,6 +6,8 @@ inherit python3-dir EXTRA_OEMAKE_append_libc-musl = "\ gt_cv_func_gnugettext1_libc=yes \ gt_cv_func_gnugettext2_libc=yes \ + gl_cv_func_working_strerror=yes \ + gl_cv_func_strerror_0_works=yes \ gl_cv_func_gettimeofday_clobber=no \ " From patchwork Wed May 16 06:32:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 135979 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp491298lji; Tue, 15 May 2018 23:32:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq5yKRKM/vzzY9ITMCklcY4texyBnMJM2k49Skv4rW3UUMVI0HntoA5JkonStKf3urtq/aX X-Received: by 2002:a63:6ec6:: with SMTP id j189-v6mr14786180pgc.71.1526452348248; Tue, 15 May 2018 23:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526452348; cv=none; d=google.com; s=arc-20160816; b=K+h2RYITR3pt9jtZWF4+jwwoPbENvXlLItT4r5/xRx6WvP1WNWCkYVchRS1AdKY6iZ kRW45W1Z6v1bxSbWs1Xb4/JO+SiVMxGVzT9to9aCL0B+5zvwtTcYqsw97CwmUG+ZRQQU 7MPMoUNa0rJTy8uYR5OEzUj3l6imnR9ls/d/52HCBRH1+01to+tp6+gauPhZW16EEcNm KRoHk5kBz98KR6egjXuGlZwI6ygKYZLIhKN14XYYvSmng8VKmPB/tYiRx8GqOdUM+7uA OvtnN3CgrI+UMp+WbTvRWRqXJhv0X0/1VRkIyURHR095EIwO+MsUJ9bYxtmXajcNZxjF cZig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Ndu7w21dBWdY0RtEKFUxE5gfEb7AvV3UESL3LdaRiI0=; b=HE6TI8vQXIHyLJMdIk2UZt7Rv6YBb1hUNJX9ZyrK5k1RyigmSiUm4ShpsdCya0besO lAcB+eJYSbYvb8tsRpPewC3tlMihVIC9ufgqw3OIE7wbp5/zF6wUCxyv+7xxeLSMFkqL nwdXW4Bu/8uvh9oYtekFN8vKz2wn0jC4z+oEbEsVXmS+ANP/0fXIuPCFJeuE1NLYvV5X /GnebRyPQM4PiT7t3zoa+CU8fcrKxXQTGdBj2rSYMlWze47ywdRWC03jflz5J7m5oJND RalGTAX0UyR2RNVDHOzAFLllTu7CyUBW3UkWTblJ50gtd2fs1C9l/JqTipctq6xBNfLJ RSqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OXrFdg7m; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id k1-v6si1806994pld.416.2018.05.15.23.32.27; Tue, 15 May 2018 23:32:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OXrFdg7m; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id BA3BF7490D; Wed, 16 May 2018 06:32:24 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com [74.125.83.43]) by mail.openembedded.org (Postfix) with ESMTP id 6C1F474903 for ; Wed, 16 May 2018 06:32:18 +0000 (UTC) Received: by mail-pg0-f43.google.com with SMTP id p8-v6so1134008pgq.10 for ; Tue, 15 May 2018 23:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xZIocPKbZW9RwZ4QiZPjwUqKKkIqmlOt97RjJNKaTS4=; b=OXrFdg7m70MC3V8jqlHfI+Y935SSWnqOqFD0ywwW5QVecPmOkRH+/pThfYXf5/NnZP r7g67TNVqx0kNdsci7ZbHBy7IOJtksA9r102yuZTGcd6tTFqmudw6EAUXWBalqJa+iCJ pZ5rFFQ0fijtNZZJogSY+jjSVY/vST3ha12qU8B29J8U+La8+mCqgyT/h6rltVpAzX1M CIuSKdKL8UugHIhK2WRGcxrzzIvykw47ZXpD4y0DM3eTBVlUEvk9AHXrZm70tnnSqMUE 0czCV8W28fjCMs/WFRMSAth5qi9w0ltgQlw/e9ThS+/BqgVF6Sb8x4vjZfZOuhGuEkbJ Obkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xZIocPKbZW9RwZ4QiZPjwUqKKkIqmlOt97RjJNKaTS4=; b=cQp65J1InF4uMFTbxnAX4W++lsAMRFHxFKao++ugTA3CDmJbXhkWgNoaeso02f6b49 TKKTum69apBelGi/FwqktWsKI+WwQP2oyPT9IW/Wovrp9FiABRTQqsrzIYXt/HRM79D0 kwBFGSC8d3zg8iBfjyZcsmCogUbz/ccZakwKiBUD1Yc4xEPOavhb0yfzB0f3GbWQE/TV KmQH4/H7U5ypAw/vHEnQDE6RCQgu7tlSW/Z4yPlJbMeQSLaFJGYhD1iPNNwao5QeaFpd xbE1Te3TduXkKqPQ4fGNIHPcCJ6DUbtbyPqn0P+YlSF5kjahtnk3Nfl9AmRDGU4MW7Z5 zZFQ== X-Gm-Message-State: ALKqPwcEbfd66t4SKtYoKX4tVYhi48qd37CUqV9UaKMNXoA1G3Xg6dfG CQZ8LhVq6dUCV0IkZKVNhI7YgQ== X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr18182719pfd.13.1526452339635; Tue, 15 May 2018 23:32:19 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id s8-v6sm2517411pfh.30.2018.05.15.23.32.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:32:19 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 15 May 2018 23:32:10 -0700 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Subject: [OE-core] [PATCH 2/4] python2: Fix build with gcc8 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton Signed-off-by: Ross Burton Signed-off-by: Khem Raj --- .../python/python-native_2.7.14.bb | 1 + .../python/python/fix-gc-alignment.patch | 43 +++++++++++++++++++ meta/recipes-devtools/python/python_2.7.14.bb | 1 + 3 files changed, 45 insertions(+) create mode 100644 meta/recipes-devtools/python/python/fix-gc-alignment.patch -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb index 7c491fa3e0..b822583c53 100644 --- a/meta/recipes-devtools/python/python-native_2.7.14.bb +++ b/meta/recipes-devtools/python/python-native_2.7.14.bb @@ -16,6 +16,7 @@ SRC_URI += "\ file://builddir.patch \ file://parallel-makeinst-create-bindir.patch \ file://revert_use_of_sysconfigdata.patch \ + file://fix-gc-alignment.patch \ " S = "${WORKDIR}/Python-${PV}" diff --git a/meta/recipes-devtools/python/python/fix-gc-alignment.patch b/meta/recipes-devtools/python/python/fix-gc-alignment.patch new file mode 100644 index 0000000000..b63cd08747 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix-gc-alignment.patch @@ -0,0 +1,43 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton + +Fix for over-aligned GC info +Patch by Florian Weimer + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1540316 +Upstream discussion: https://mail.python.org/pipermail/python-dev/2018-January/152000.html + +diff --git a/Include/objimpl.h b/Include/objimpl.h +index 55e83eced6..aa906144dc 100644 +--- a/Include/objimpl.h ++++ b/Include/objimpl.h +@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); + /* for source compatibility with 2.2 */ + #define _PyObject_GC_Del PyObject_GC_Del + ++/* Former over-aligned definition of PyGC_Head, used to compute the ++ size of the padding for the new version below. */ ++union _gc_head; ++union _gc_head_old { ++ struct { ++ union _gc_head *gc_next; ++ union _gc_head *gc_prev; ++ Py_ssize_t gc_refs; ++ } gc; ++ long double dummy; ++}; ++ + /* GC information is stored BEFORE the object structure. */ + typedef union _gc_head { + struct { +@@ -255,7 +267,8 @@ typedef union _gc_head { + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; +- long double dummy; /* force worst-case alignment */ ++ double dummy; /* force worst-case alignment */ ++ char dummy_padding[sizeof(union _gc_head_old)]; + } PyGC_Head; + + extern PyGC_Head *_PyGC_generation0; + \ No newline at end of file diff --git a/meta/recipes-devtools/python/python_2.7.14.bb b/meta/recipes-devtools/python/python_2.7.14.bb index 0a09926dfb..41a8609b15 100644 --- a/meta/recipes-devtools/python/python_2.7.14.bb +++ b/meta/recipes-devtools/python/python_2.7.14.bb @@ -30,6 +30,7 @@ SRC_URI += "\ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ + file://fix-gc-alignment.patch \ " S = "${WORKDIR}/Python-${PV}" From patchwork Wed May 16 06:32:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 135980 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp491400lji; Tue, 15 May 2018 23:32:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpoP/IJWQC4A81dTaDm+ji3/aBB/U8kARQQhEJOG1UXogrPzWsiIqcYV2xMc+FMqF5AFKHH X-Received: by 2002:a17:902:5502:: with SMTP id f2-v6mr17675612pli.108.1526452354515; Tue, 15 May 2018 23:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526452354; cv=none; d=google.com; s=arc-20160816; b=pzIrzXuS09MoEHQWqN1sXS/tGo+1sum/5F5JNAqU7whXVzdgVqaNO9st2qW9No7utP ZFY42Su9YtHlYh9FvjIqyk89sasO6+9YtcS+5xTYaapvuX0BlPOqERvpoUm9eP6xCASL UMdSTonhYdo3xhlhV0bjnJfEYEDXdtvupGzajO4IvZyi1Rfw1mK42cxEA8P4oMjTdxUa B5Rc6xXNiCmwZY/tRV2Tf//d0dBSAgONiv379IfiW4P/L8Ii6CM5HF6J81m+8gUc2Ys3 5oQDjjC7vDiXgnDgaWx/G8SomULuwttdJ2EzuO0lxJT9/ycWJsmwldmerNtjUX06mJ0D tX8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=kRpQFBoCQhfaLaLVwzwMoqe/WZ9SlssJR8H6CAf3pto=; b=un6dMNkmi6mrSqKHbJ1W0qami8BC4gRrweiJzHDG+DT3wB3UTM/Bmx0Prx28XJ9ABY 9bB64u15E6yoj0BDmsl3/NQnBMJX4FRCauAWAIZRGemIbjL6set9ydgFWMru99QpVkOc 3ltRQkuyqSkRxPExusxO2on5VSboKITpwoDeugZc3oNCGBo190ZeD/OSgHiRJxTinQ9q eoYgp09Bne/mZhnF6ncWBTqfcfZ0MSAgHLSeCNRXbMhpmrdRn2irlUHViQPT1ml4MzOY EoJWc+WKBa2H1AWHe7X+Gv760ISvqMAd0RI+GK2x0Bt0Pw/y/HrtkEgbF5N+wj2KAZ9s spKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ouCFiIbH; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g6-v6si2002748pll.69.2018.05.15.23.32.34; Tue, 15 May 2018 23:32:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ouCFiIbH; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 21B62749C8; Wed, 16 May 2018 06:32:26 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by mail.openembedded.org (Postfix) with ESMTP id 5F68974962 for ; Wed, 16 May 2018 06:32:19 +0000 (UTC) Received: by mail-pl0-f68.google.com with SMTP id 30-v6so1517151pld.13 for ; Tue, 15 May 2018 23:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nEKEcypljSTWWYRTBfPUOOtEB2csZhZXeywsnqGFrEs=; b=ouCFiIbHT6+Tp0r66sqpgFanvb5TpiSUjS9ACAENuqdeXY1Yv+wYtFN8GoZj71Ql0J 3i1CyFvQf9Io9DJ6FVk21mqFlJdXyLtB4W6p7HqjRkTitUEaGykhLsSxS5oBc5cMa6hh R6C2VGigETqJVbxX02sSYehvjOb9iUgdvwTrjHi8koAbLLfT9mls7+XRLAO7s+W5NiBx 67yIxDul5q5t5EMD89GjSYj6kH7aDV3Je5prYSlmoDOFsEXdVut/5GBk6Uy+p9COThuu +fFIpWLxc+lQPuYnSHAuD6pNVWzSLvr1U/aWkKP3hI8lU6XrlehSBr/nNKseAMCb7pWT Wl4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nEKEcypljSTWWYRTBfPUOOtEB2csZhZXeywsnqGFrEs=; b=AF3pH7bJnTWaYvTP8N2tU+X/OiQkhnFzC3e2gG2pD5KSN1cRPlEBlh3TQq7hqLFI6L q/yHNXYx6YoBltyJ06JcN9dYSQ4d5Z9FZ+4341rToB11zUIE6eL1F43fWa9CGBIYcx7f knkbJ9qRi9npi71m/nW8ijzKMz8bdq+lEViJMQc7VxaNDNgukFeSP9HNyTkCs3gH7RDp +o1LL2QNcMv2xai223rcmufH/ilNZ9svh0vuIzNvBAiGabREA+SD5/I3A87fjQn6asFu 5s52OYZPLBvojC3W0Wk6xUmmWm8LM8rMaOvrM6ks0p3JeEQVEM9gPf+qT6jqqUeFFwhL k/rg== X-Gm-Message-State: ALKqPwc6dY/zyLQieI/6r9af/AiMUYgUUvxkKl/UCYCltQKTFGI15/Xm j/usQnPX3jGZ6KmvbnmBvDWgVA== X-Received: by 2002:a17:902:5502:: with SMTP id f2-v6mr17674851pli.108.1526452340645; Tue, 15 May 2018 23:32:20 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id s8-v6sm2517411pfh.30.2018.05.15.23.32.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:32:19 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 15 May 2018 23:32:11 -0700 Message-Id: <071e32634705a36ce4132ab884b3cf11079b4d37.1526452205.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Subject: [OE-core] [PATCH 3/4] ovmf: Fix build with gcc8 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ....makefile-add-Wno-stringop-truncatio.patch | 73 ++++++++++++ ...ols-header.makefile-add-Wno-restrict.patch | 104 ++++++++++++++++++ ....makefile-revert-gcc-8-Wno-xxx-optio.patch | 55 +++++++++ ...-silence-false-stringop-overflow-war.patch | 65 +++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 4 + 5 files changed, 301 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/ovmf/ovmf/0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch b/meta/recipes-core/ovmf/ovmf/0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch new file mode 100644 index 0000000000..1d1679fe7e --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch @@ -0,0 +1,73 @@ +From 9fce4bab014b9aa618060eba13d6dd04b0fa1b70 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Fri, 2 Mar 2018 17:11:52 +0100 +Subject: [PATCH 1/4] BaseTools/header.makefile: add "-Wno-stringop-truncation" + +gcc-8 (which is part of Fedora 28) enables the new warning +"-Wstringop-truncation" in "-Wall". This warning is documented in detail +at ; the +introduction says + +> Warn for calls to bounded string manipulation functions such as strncat, +> strncpy, and stpncpy that may either truncate the copied string or leave +> the destination unchanged. + +It breaks the BaseTools build with: + +> EfiUtilityMsgs.c: In function 'PrintMessage': +> EfiUtilityMsgs.c:484:9: error: 'strncat' output may be truncated copying +> between 0 and 511 bytes from a string of length 511 +> [-Werror=stringop-truncation] +> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +> EfiUtilityMsgs.c:469:9: error: 'strncat' output may be truncated copying +> between 0 and 511 bytes from a string of length 511 +> [-Werror=stringop-truncation] +> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +> EfiUtilityMsgs.c:511:5: error: 'strncat' output may be truncated copying +> between 0 and 511 bytes from a string of length 511 +> [-Werror=stringop-truncation] +> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The right way to fix the warning would be to implement string concat with +snprintf(). However, Microsoft does not appear to support snprintf() +before VS2015 +, +so we just have to shut up the warning. The strncat() calls flagged above +are valid BTW. + +Cc: Ard Biesheuvel +Cc: Cole Robinson +Cc: Liming Gao +Cc: Paolo Bonzini +Cc: Yonghong Zhu +Contributed-under: TianoCore Contribution Agreement 1.1 +Signed-off-by: Laszlo Ersek +Reviewed-by: Liming Gao +--- +Upstream-Status: Backport + + BaseTools/Source/C/Makefiles/header.makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile +index 063982b82f..6c3826aecb 100644 +--- a/BaseTools/Source/C/Makefiles/header.makefile ++++ b/BaseTools/Source/C/Makefiles/header.makefile +@@ -47,9 +47,9 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE + BUILD_CPPFLAGS = $(INCLUDE) -O2 + ifeq ($(DARWIN),Darwin) + # assume clang or clang compatible flags on OS X +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-self-assign -Wno-unused-result -nostdlib -c -g + else +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-unused-result -nostdlib -c -g + endif + BUILD_LFLAGS = + BUILD_CXXFLAGS = -Wno-unused-result +-- +2.17.0 + diff --git a/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch b/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch new file mode 100644 index 0000000000..4a25e230ce --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch @@ -0,0 +1,104 @@ +From 86dbdac5a25bd23deb4a0e0a97b527407e02184d Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Fri, 2 Mar 2018 17:11:52 +0100 +Subject: [PATCH 2/4] BaseTools/header.makefile: add "-Wno-restrict" + +gcc-8 (which is part of Fedora 28) enables the new warning +"-Wrestrict" in "-Wall". This warning is documented in detail +at ; the +introduction says + +> Warn when an object referenced by a restrict-qualified parameter (or, in +> C++, a __restrict-qualified parameter) is aliased by another argument, +> or when copies between such objects overlap. + +It breaks the BaseTools build (in the Brotli compression library) with: + +> In function 'ProcessCommandsInternal', +> inlined from 'ProcessCommands' at dec/decode.c:1828:10: +> dec/decode.c:1781:9: error: 'memcpy' accessing between 17 and 2147483631 +> bytes at offsets 16 and 16 overlaps between 17 and 2147483631 bytes at +> offset 16 [-Werror=restrict] +> memcpy(copy_dst + 16, copy_src + 16, (size_t)(i - 16)); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +> In function 'ProcessCommandsInternal', +> inlined from 'SafeProcessCommands' at dec/decode.c:1833:10: +> dec/decode.c:1781:9: error: 'memcpy' accessing between 17 and 2147483631 +> bytes at offsets 16 and 16 overlaps between 17 and 2147483631 bytes at +> offset 16 [-Werror=restrict] +> memcpy(copy_dst + 16, copy_src + 16, (size_t)(i - 16)); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Paolo Bonzini analyzed the Brotli source in detail, +and concluded that the warning is a false positive: + +> This seems safe to me, because it's preceded by: +> +> uint8_t* copy_dst = &s->ringbuffer[pos]; +> uint8_t* copy_src = &s->ringbuffer[src_start]; +> int dst_end = pos + i; +> int src_end = src_start + i; +> if (src_end > pos && dst_end > src_start) { +> /* Regions intersect. */ +> goto CommandPostWrapCopy; +> } +> +> If [src_start, src_start + i) and [pos, pos + i) don't intersect, then +> neither do [src_start + 16, src_start + i) and [pos + 16, pos + i). +> +> The if seems okay: +> +> (src_start + i > pos && pos + i > src_start) +> +> which can be rewritten to: +> +> (pos < src_start + i && src_start < pos + i) +> +> Then the numbers are in one of these two orders: +> +> pos <= src_start < pos + i <= src_start + i +> src_start <= pos < src_start + i <= pos + i +> +> These two would be allowed by the "if", but they can only happen if pos +> == src_start so they degenerate to the same two orders above: +> +> pos <= src_start < src_start + i <= pos + i +> src_start <= pos < pos + i <= src_start + i +> +> So it is a false positive in GCC. + +Disable the warning for now. + +Cc: Ard Biesheuvel +Cc: Cole Robinson +Cc: Liming Gao +Cc: Paolo Bonzini +Cc: Yonghong Zhu +Reported-by: Cole Robinson +Contributed-under: TianoCore Contribution Agreement 1.1 +Signed-off-by: Laszlo Ersek +Reviewed-by: Liming Gao +--- +Upstream-Status: Backport + BaseTools/Source/C/Makefiles/header.makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile +index 6c3826aecb..3feae10095 100644 +--- a/BaseTools/Source/C/Makefiles/header.makefile ++++ b/BaseTools/Source/C/Makefiles/header.makefile +@@ -47,9 +47,9 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE + BUILD_CPPFLAGS = $(INCLUDE) -O2 + ifeq ($(DARWIN),Darwin) + # assume clang or clang compatible flags on OS X +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-self-assign -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g + else +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -c -g + endif + BUILD_LFLAGS = + BUILD_CXXFLAGS = -Wno-unused-result +-- +2.17.0 + diff --git a/meta/recipes-core/ovmf/ovmf/0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch new file mode 100644 index 0000000000..19f32e7cee --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch @@ -0,0 +1,55 @@ +From 6866325dd9c17412e555974dde41f9631224db52 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 7 Mar 2018 10:17:28 +0100 +Subject: [PATCH 3/4] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" + options on OSX + +I recently added the gcc-8 specific "-Wno-stringop-truncation" and +"-Wno-restrict" options to BUILD_CFLAGS, both for "Darwin" (XCODE5 / +clang, OSX) and otherwise (gcc, Linux / Cygwin). + +I also regression-tested the change with gcc-4.8 on Linux -- gcc-4.8 does +not know either of the (gcc-8 specific) "-Wno-stringop-truncation" and +"-Wno-restrict" options, yet the build completed fine (by GCC design). + +Regarding OSX, my expectation was that + +- XCODE5 / clang would either recognize these warnings options (because + clang does recognize most -W options of gcc), + +- or, similarly to gcc, clang would simply ignore the "-Wno-xxx" flags + that it didn't recognize. + +Neither is the case; the new flags have broken the BaseTools build on OSX. +Revert them (for OSX only). + +Cc: Liming Gao +Cc: Yonghong Zhu +Reported-by: Liming Gao +Fixes: 1d212a83df0eaf32a6f5d4159beb2d77832e0231 +Fixes: 9222154ae7b3eef75ae88cdb56158256227cb929 +Contributed-under: TianoCore Contribution Agreement 1.1 +Signed-off-by: Laszlo Ersek +Reviewed-by: Liming Gao +Acked-by: Ard Biesheuvel +--- +Upstream-Status: Backport + BaseTools/Source/C/Makefiles/header.makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile +index 3feae10095..6eefddb417 100644 +--- a/BaseTools/Source/C/Makefiles/header.makefile ++++ b/BaseTools/Source/C/Makefiles/header.makefile +@@ -47,7 +47,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE + BUILD_CPPFLAGS = $(INCLUDE) -O2 + ifeq ($(DARWIN),Darwin) + # assume clang or clang compatible flags on OS X +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g + else + BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -c -g + endif +-- +2.17.0 + diff --git a/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch b/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch new file mode 100644 index 0000000000..5fd4e9d573 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch @@ -0,0 +1,65 @@ +From dfb42a5bff78d9239a80731e337855234badef3e Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Fri, 2 Mar 2018 17:11:52 +0100 +Subject: [PATCH 4/4] BaseTools/GenVtf: silence false "stringop-overflow" + warning with memcpy() + +gcc-8 (which is part of Fedora 28) enables the new warning +"-Wstringop-overflow" in "-Wall". This warning is documented in detail at +; the +introduction says + +> Warn for calls to string manipulation functions such as memcpy and +> strcpy that are determined to overflow the destination buffer. + +It breaks the BaseTools build with: + +> GenVtf.c: In function 'ConvertVersionInfo': +> GenVtf.c:132:7: error: 'strncpy' specified bound depends on the length +> of the source argument [-Werror=stringop-overflow=] +> strncpy (TemStr + 4 - Length, Str, Length); +> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +> GenVtf.c:130:14: note: length computed here +> Length = strlen(Str); +> ^~~~~~~~~~~ + +It is a false positive because, while the bound equals the length of the +source argument, the destination pointer is moved back towards the +beginning of the destination buffer by the same amount (and this amount is +range-checked first, so we can't precede the start of the dest buffer). + +Replace both strncpy() calls with memcpy(). + +Cc: Ard Biesheuvel +Cc: Cole Robinson +Cc: Liming Gao +Cc: Paolo Bonzini +Cc: Yonghong Zhu +Reported-by: Cole Robinson +Contributed-under: TianoCore Contribution Agreement 1.1 +Signed-off-by: Laszlo Ersek +Reviewed-by: Liming Gao +--- +Upstream-Status: Backport + BaseTools/Source/C/GenVtf/GenVtf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c +index 2ae9a7be2c..0cd33e71e9 100644 +--- a/BaseTools/Source/C/GenVtf/GenVtf.c ++++ b/BaseTools/Source/C/GenVtf/GenVtf.c +@@ -129,9 +129,9 @@ Returns: + } else { + Length = strlen(Str); + if (Length < 4) { +- strncpy (TemStr + 4 - Length, Str, Length); ++ memcpy (TemStr + 4 - Length, Str, Length); + } else { +- strncpy (TemStr, Str + Length - 4, 4); ++ memcpy (TemStr, Str + Length - 4, 4); + } + + sscanf ( +-- +2.17.0 + diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 8750b3c528..212530acbf 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb @@ -19,6 +19,10 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ file://0004-ovmf-enable-long-path-file.patch \ file://VfrCompile-increase-path-length-limit.patch \ file://no-stack-protector-all-archs.patch \ + file://0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch \ + file://0002-BaseTools-header.makefile-add-Wno-restrict.patch \ + file://0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch \ + file://0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch \ " UPSTREAM_VERSION_UNKNOWN = "1" From patchwork Wed May 16 06:32:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 135981 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp491490lji; Tue, 15 May 2018 23:32:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqg8fvNdayIYYA12qVYQZJBZeMMlrDdinSV1o3l3jOSxty3IlMorScUBWMpLEkVR2QpUhSk X-Received: by 2002:a63:7f1a:: with SMTP id a26-v6mr14664197pgd.371.1526452361153; Tue, 15 May 2018 23:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526452361; cv=none; d=google.com; s=arc-20160816; b=LA/dYMihDIKtr2/F1HSY73txg8o21KRLRYdhUd8KSWdYHC7nuc1y+rfwxZ5UgXb6J2 QAGksM0GhVtGQaTrF5TgZymirelTzYK9wYcyWoOrc3B3VoDW6uPmFZJxLSx/27X8F5KU 4/g8QA3j3/uW1NeNBVBZ8ODvUluLpcBTK7ns4q1A71bPxdgJJqpRk6nnDiCiPkzQEQat uzLpVxlH1uPdQs3KDxZRa6VHvBwzwtlNmX9DUVIyUl/dJEE7hbSeXDgSRAP8cymY1dLD ErCTlzyuu7jG1Ip8m/XxvFsrOveu9+pYsk+Kif76AlJwtKWFgFdl3Sm7ntoKYYeJ2Eq3 +JVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Or/uK0u3EtJeW0x2bQShNRe7okEu+UqQ5+eGDYHRcN0=; b=Z5waeQqZ2LcRHbqaKxAIg43GAMpBjJ1bI3TBRvMZuJng79hcuwMSfNzPsRUBId10N5 ZJzdDV8Vn2JhZSws+jzk+3UHLBcTIljFFYzkRkvFjVkOrUaC7mHDpvGx9Qnuk0jwib2O CXQOKLn9qQeYRn1FrBS65Dw1Y5bC+lRKLwvSoJv2+Z0t0YjvGcXz2fZLrfk7g7mucu27 JdyGR5LsYimozFNoOBfRSDFobcow43OHhlkOoH7GYsNv0CQ5Lu/YCNM2AKOKpW2/ycWk 21oUHK34Boy6pYT7ozEKLb6mRbibBxSRFU9FWjWxmiZT3Y5ln4MRkvTbQU0VKoJOMAoa JWkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=l335a/hM; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 91-v6si1875875ply.55.2018.05.15.23.32.40; Tue, 15 May 2018 23:32:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=l335a/hM; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3AD7C749DE; Wed, 16 May 2018 06:32:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f47.google.com (mail-pl0-f47.google.com [209.85.160.47]) by mail.openembedded.org (Postfix) with ESMTP id DEAF372EA6 for ; Wed, 16 May 2018 06:32:20 +0000 (UTC) Received: by mail-pl0-f47.google.com with SMTP id v24-v6so1532378plo.3 for ; Tue, 15 May 2018 23:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TeqVBoW19EXlQzd/3+jqMWLLetGy1G/LDKmO1tj7bvE=; b=l335a/hM3ad316u00ItJrsKPRcWDEZDnlebI7GPt426xIGvO4KjOZHYnWZgYmv+r0z FwV11fOn6AN3vU+LtL8DdyPcAr+ZnLvCnqaE/oK2G85sWVstwDaI2Iz4GivRsa41pZ9n WH0Pwzx6ROSRauXCQtJXZY82+GTjFiztFiyGTM6hvuC7tGxRXnXxhpfR1DTxCVsDVnw0 W+rZkWm31P12RY5L5G8zTmkaE9uTag9cgcthYh8kRM1qC8iybZFc4rdyn9mPSInM64v9 q7XaMzyz9uc6nRaqLucU0xBMYYxMuXeMJMwkOxV61cwe1wZGH9J9XOlOvFR5hjJZdpOi oHMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TeqVBoW19EXlQzd/3+jqMWLLetGy1G/LDKmO1tj7bvE=; b=agE2yuxJa9ocpiJ7BW4eD8cj5nUQrvReVCyBFdacYtYVEADnJAFwjvIvNpBU19faGY qP4cI/uQd8szi6tgLYbzuoxgb8Aeotyv9xLKarb8W7P+R3+wCEVZFACPjN0XW6Sql1t/ NzEltjkviOTgUjQOhpXCMBiaP6tSW9tb0VWX2v1A6q1PcxVva18ulNzECZC1xlzT2199 DZgPV7ETVy+JOstgHNtfCO1tDF/0+LmF6JTIei3+ny2WxPe5vBj7FVvhzK1mQxX58g+m sUzpP5kcErTqDCwoED7ehx1JAxXD+0URmhlP0h1IlqCzTgLZJDNk3b+vsp6Gk+vki4CK ynHA== X-Gm-Message-State: ALKqPwfgORrZUEyLue0E80VrgMP1jsYTdxYxxlyFAprLxtxPsfe/egB2 RObsDOw1gX6hV/CVhx1XUs12tg== X-Received: by 2002:a17:902:8f95:: with SMTP id z21-v6mr17917740plo.259.1526452341492; Tue, 15 May 2018 23:32:21 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id s8-v6sm2517411pfh.30.2018.05.15.23.32.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:32:20 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 15 May 2018 23:32:12 -0700 Message-Id: <13936651721b14a74b51c673c35c2b514299ca6c.1526452205.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Subject: [OE-core] [PATCH 4/4] musl: Make dev package rdep on staticdev X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is needed for enabling static linking with SDK Signed-off-by: Khem Raj --- meta/recipes-core/musl/musl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index a0a098f5b4..d7d201df9d 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb @@ -66,7 +66,7 @@ do_install() { done } -RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev" +RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev ${PN}-staticdev" RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev" RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"