From patchwork Wed Dec 26 20:09:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 154532 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6204141ljp; Wed, 26 Dec 2018 12:11:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN6R1skLFAdM8iHvSNI2YFyEoxSUBYjlQH5/GJq7lehwTfrID1Deou7w7KDoSoKhJV8kr/EM X-Received: by 2002:a63:6782:: with SMTP id b124mr20392002pgc.151.1545855094686; Wed, 26 Dec 2018 12:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545855094; cv=none; d=google.com; s=arc-20160816; b=Jg9HwZUdAnc5z/irgmj4xhEzNG5iWEIksamMx0onJt3lVz1ePwJP25zg8l/Dj9VGuZ dRwdYviBxxoEAuVTma4doxgoREfehLO9hWh3eE0Be63X2Zz4P9uWjoS6Yh2LT/6/OO7R FqDlqguHxh612K8523g5pDJ2lNt65UwzsY+b2jfVpSorbl0SlbEaY0za8idtDmVsgDKy 701WJEpfZh7D5unEDlQlKaq7V9BHve+vznEneQtqMk6jdyP9+xEHvR2GIHYpheDL8Hgn okJRggGKQ17Wpkt406QrlopkTddXVKMvRWwN1RsgrKW3VzUVD9XJlFjdgXBB3sX8JYcJ hzXA== 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 :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=g33PDGSSOPzt9VbRAfrBXTv46jHHHWCjakepJDihX9g=; b=fTwvx9vcrR5tcW2+NmK7H3rlpFYY3rxPPmc1bJUh3jbofR63TOXz7RhE129XrHRmrx VVtlps2QqcEIN3kOS4Hu0z6twKL0Ss9deOeKEK3juqHT8yDleEW/CPaOpM3OaZVKVmDV dGB2k0Utir7A4wcs68icYz4AbjJVH7LckcOhsydb3PL2tKblRGQAW9yhMsUxV/1gqNr2 hnZfkxtAjvXoMRIISvWJUPBwguzmJsEiKFEQ4byDKSrTXdu94sfBLh4P7YZEueZRVlMM iZCfCqucZaauE4cs1Ddl/B5MXKtpxksifAGGkgPif5NBmfYSH8OBM8t+VyVpd13CIC2B oCFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="aA/YA10A"; 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 101si35297504pld.22.2018.12.26.12.11.34; Wed, 26 Dec 2018 12:11:34 -0800 (PST) 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="aA/YA10A"; 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 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 279856C42C; Wed, 26 Dec 2018 20:11:07 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by mail.openembedded.org (Postfix) with ESMTP id 85D7A6C12F for ; Wed, 26 Dec 2018 20:10:27 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id r136so8206993pfc.6 for ; Wed, 26 Dec 2018 12:10:29 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=0pLDxKS3iPjVQEcXjiGvACUVv3xyzkF9acS1Y60kpbE=; b=aA/YA10AzRl9MXbQZ0KI9j1H/W4a+HoIButE1Out0ejt2tG52co7b78s7jl/uCWxjE XKKJYIL/iIbO6OA+qPhB7545UrDC5yf/Pw+1TJXodEgkV/XuJ+HUT3F+zxXiJktgla+i j374qTImySZs+AEsJPPKJ4J88EZcsLg7aLfPj+Ef54o5zuR6IyG+I73Ca3sPC6bFJALL Cnyc5qj9Io2jtFLcBhIVVo9aYRwbU3AVVXf1qgTVSICqEwj7/a2XfGdiJkvWMli2q8zJ YjoPrOTEcpAngCYAOO+BUaIoEd6bGGEmzwuU3tPRIQSCNA2bG/dWgegE4LAuV3rPKNB5 qfxQ== 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:mime-version:content-transfer-encoding; bh=0pLDxKS3iPjVQEcXjiGvACUVv3xyzkF9acS1Y60kpbE=; b=T2dh71KwOjuOSGQhOmBU7gpQZCD2AZzu+0Zf5LvDQit7PbofvBOCCfGg2ddoqA1Uu+ tiZDKm4luw6BuJWKkuijRpAoFqm1i332YMq9T8HNFJq8pUJjIZESrbYvHs8Tfpz84hTG eR/w8CnWDgM78E/1nrCBAnnKYT5rPrrO+y9iJQ4mwFEzpAwhPzxKInfMUY41TXCjrB57 9oTkkSR1HMIK6TYIM7aCPWkimHDyJSh7Ja8yBm2rn9I5/q2SV/Qw6j4a8xHhCjRXcK+p rstjgzbFEKQFWaeAdJiaM11eTIg1E4wNZv55J/X166xEzRFQNFhlytk1CHNg4j0Y3GMo oKsA== X-Gm-Message-State: AJcUukfRRYAwxo1UIFxhm7HE3zOWzs0ki0S2sJTAPb5d3jM+mpfByO6K Xdpqq/BAVomYulf1FMTMEN7LG7uF7v4= X-Received: by 2002:a65:64c8:: with SMTP id t8mr19868144pgv.31.1545855028276; Wed, 26 Dec 2018 12:10:28 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:877f:9499::6e98]) by smtp.gmail.com with ESMTPSA id l3sm60029493pga.92.2018.12.26.12.10.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Dec 2018 12:10:27 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 26 Dec 2018 12:09:51 -0800 Message-Id: <20181226200954.5267-7-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181226200954.5267-1-raj.khem@gmail.com> References: <20181226200954.5267-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 07/10] gdb: Backport a fix to build with gcc9 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 Signed-off-by: Khem Raj --- meta/recipes-devtools/gdb/gdb-8.2.inc | 1 + ...1-Fix-build-with-latest-GCC-9.0-tree.patch | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/gdb/gdb-8.2.inc b/meta/recipes-devtools/gdb/gdb-8.2.inc index 7e0809de72..f6d75ed081 100644 --- a/meta/recipes-devtools/gdb/gdb-8.2.inc +++ b/meta/recipes-devtools/gdb/gdb-8.2.inc @@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ file://0010-resolve-restrict-keyword-conflict.patch \ file://0011-Fix-invalid-sigprocmask-call.patch \ file://gdbserver-ctrl-c-handling.patch \ + file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \ " SRC_URI[md5sum] = "b5a49dbff00d9a87fbe114d14b3101c0" SRC_URI[sha256sum] = "c3a441a29c7c89720b734e5a9c6289c0a06be7e0c76ef538f7bbcef389347c39" diff --git a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch new file mode 100644 index 0000000000..2a962929d7 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch @@ -0,0 +1,50 @@ +From 7406a50077773e78282a495cb32ef5b8179f6a33 Mon Sep 17 00:00:00 2001 +From: Dimitar Dimitrov +Date: Mon, 17 Dec 2018 21:30:52 +0200 +Subject: [PATCH] Fix build with latest GCC 9.0 tree + +A recent patch [1] to fix a GCC PR [2] actually broke the GDB build. +To fix, remove the stack pointer clobber. GCC will ignore the clobber +marker, and will not save or restore the stack pointer. + +I ran "make check-gdb" on x86_64 to ensure there are no regressions. + +gdb/ChangeLog: + +2018-12-17 Dimitar Dimitrov + + * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove sp clobbers. + +[1] https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00532.html +[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813 + +Upstream-Status: Backport +Signed-off-by: Dimitar Dimitrov +--- + gdb/ChangeLog | 5 +++++ + gdb/nat/linux-ptrace.c | 4 ++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c +index d4c1b8f9fd..187cfeb9bc 100644 +--- a/gdb/nat/linux-ptrace.c ++++ b/gdb/nat/linux-ptrace.c +@@ -161,14 +161,14 @@ linux_ptrace_test_ret_to_nx (void) + ".globl linux_ptrace_test_ret_to_nx_instr;" + "linux_ptrace_test_ret_to_nx_instr:" + "ret" +- : : "r" (return_address) : "%esp", "memory"); ++ : : "r" (return_address) : "memory"); + #elif defined __x86_64__ + asm volatile ("pushq %0;" + ".globl linux_ptrace_test_ret_to_nx_instr;" + "linux_ptrace_test_ret_to_nx_instr:" + "ret" + : : "r" ((uint64_t) (uintptr_t) return_address) +- : "%rsp", "memory"); ++ : "memory"); + #else + # error "!__i386__ && !__x86_64__" + #endif +-- +2.20.1