From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uCI/IrEsVmF7TAEAgWs5BA (envelope-from ) for ; Thu, 30 Sep 2021 23:31:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8ELhHbEsVmFiKQAAB5/wlQ (envelope-from ) for ; Thu, 30 Sep 2021 21:31:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CED8DAAC4 for ; Thu, 30 Sep 2021 23:31:28 +0200 (CEST) Received: from localhost ([::1]:59668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mW3eJ-00054y-Se for larch@yhetil.org; Thu, 30 Sep 2021 17:31:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW3by-0003JJ-2R for guix-patches@gnu.org; Thu, 30 Sep 2021 17:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mW3bx-0000b4-QQ for guix-patches@gnu.org; Thu, 30 Sep 2021 17:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mW3bx-0006oq-NJ for guix-patches@gnu.org; Thu, 30 Sep 2021 17:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50923] [PATCH core-updates-frozen] gnu: gdb-9.2: Fix build with GCC 10 on powerpc64le-linux Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Sep 2021 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50923 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50923@debbugs.gnu.org Cc: Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163303730126156 (code B ref -1); Thu, 30 Sep 2021 21:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Sep 2021 21:28:21 +0000 Received: from localhost ([127.0.0.1]:54231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mW3bE-0006ni-7b for submit@debbugs.gnu.org; Thu, 30 Sep 2021 17:28:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:60572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mW3bA-0006nZ-VT for submit@debbugs.gnu.org; Thu, 30 Sep 2021 17:28:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW3bA-00033N-LC for guix-patches@gnu.org; Thu, 30 Sep 2021 17:28:12 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:63534 helo=ext-mx-out002.mykolab.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW3b7-0008Gg-Ht for guix-patches@gnu.org; Thu, 30 Sep 2021 17:28:11 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 5AA2EC0C for ; Thu, 30 Sep 2021 23:28:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:message-id:date:date :subject:subject:from:from:received:received:received; s= dkim20160331; t=1633037286; x=1634851687; bh=og0bTFyqKSO531tRtOT MEwg3FN6Iysr09GKH5VFQi7g=; b=TQUaQs61wnCjtGnJTHxTECSDek+K8xxfTWr XnE/iHGZeqjI2AH0WSBlsaSyKhq2eUb4GGbBTS4ah7ZaBZqgG2CF19204bpq9NLe pO/iabKTm68tBIuFy5zM5P0oPEHPHh8B851Rsv/xLeNhiN4U883jPc76veN0uDi7 a8xFR+ukN8FDMnTSAJbfJ/3vmEM1b7yXI7EMZ0AR6wOhVQN/dS7TfGxr3YI023Wm AUWsYcvBaNTCOn+RczrJLIrLGzbvxdTkHACPOPBW6m6QRMPECs3uP50Fk02HN1mw Y4PSTmQOkvDRh3gwUZ24k8Ykkk01/T8FxWy5l9b78L5zGJPv5OuWATZkBSIY/ZMM StV5+seAbn1X7c/qio8t0vRdlA0JCr5dQFSYSQXOStydqGKJ7axoiD14udDzyjGV 4L9OTbiuC/gACWde4uk4OqMEw+M50+Sw+p4A1SJgJJbm1faCgD9htUMfFnR7/JZM Lk5I11HYi1nlTuL+np/UD3bxy1yAQ2M5zoQ1XS/uvxRS+GaAN2ZGTenb0ZFpL+L4 8yUx6SqbOebPmEetvr/VIP6kIiqQPSC9SEgNU2DjFpXZGomXIp6j4Ns2OXMzoBct O/+NdMmKwqgfMGt4jnZ18wTnqXXMu3sYEC9XcjaHo+ZDy6956Mj40T7hh0IT0k47 IdcekHYI= X-Virus-Scanned: amavisd-new at mykolab.com Received: from ext-mx-out002.mykolab.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OSDKLO4Cu405 for ; Thu, 30 Sep 2021 23:28:06 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 7A244A30 for ; Thu, 30 Sep 2021 23:28:06 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 07FDF32CA; Thu, 30 Sep 2021 23:28:05 +0200 (CEST) Date: Thu, 30 Sep 2021 18:27:54 -0300 Message-Id: <20210930212754.34629-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.128.36.41; envelope-from=bauermann@kolabnow.com; helo=ext-mx-out002.mykolab.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633037489; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=og0bTFyqKSO531tRtOTMEwg3FN6Iysr09GKH5VFQi7g=; b=P3NEX9+iefX+72IK2QJcmKqlITzDE74kiP45YUHKyllf5hB06YfpPI23IGwtI7ilNQ6nOQ QhdXQr2FOl/He89yLmub2t/A2BXhuhiUWHvi+dpUx17ErF2VrOCwUOfv1izJFbD2w6l57L UGT5m4j+eATmIJEvEPNie2cq4qa25MBvNkgaNGV81Al8khqH2ZUodfL8KqU7ujHD0H+XQI RP+m9fbj3/P+W6k6QMSWOTwYJGV8KsDfkJ6GOV/FD83feBLiRzZwy5ilggMDV6xZDOyoBa fQ/BN4dbB2PHRQWnKkOeopNeRaYgNiBujJOON8Vi/NpjCNoO+gjKRTyZ96cJlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633037489; a=rsa-sha256; cv=none; b=hj34QU9+vZnzWYLvjk+MC2O3CAUkNcfgggiwULWc75PCUznKFStG3mS3QWC95ivhT9Pj8T +Xagsw7n3xomYUfvPoK9KWvCsEul2QFj82GOf3g66NmGFDkN9bIzMPxypOOQWSSXPNA+Ri BgI39sf3JhObdTpUdJPb73ERFaY2y0FaFNVIw7Bl5XLVfJymNKR/9kVagi1a1BJD8Ag+db 1DL31p/sj2whHC9EwN73XMcuWeVoWjY5QhqbdgYNkOimS3XgMGkL8X1pWtDp1IwPmTnnE2 /BiKYss3IyRsGVfhPb53txn6NlM4A67LuRW/v0U6SxWIfnLoApSAH63wrFUrSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=TQUaQs61; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=TQUaQs61; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: CED8DAAC4 X-Spam-Score: 1.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: IFqRMBcFoWN4 * gnu/packages/patches/gdb-9.2-sim-ppc-fno-common.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gdb.scm (gdb-9.2)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gdb.scm | 1 + .../patches/gdb-9.2-sim-ppc-fno-common.patch | 123 ++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 gnu/packages/patches/gdb-9.2-sim-ppc-fno-common.patch diff --git a/gnu/local.mk b/gnu/local.mk index aa5690b19855..bb5b736b96d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1095,6 +1095,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-9-asan-fix-limits-include.patch \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \ %D%/packages/patches/gdb-hurd.patch \ + %D%/packages/patches/gdb-9.2-sim-ppc-fno-common.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gd-Revert-fix-303-gdlib.pc-use-Requires-instead-of-Libs.patch \ diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 24b7c00dbd4c..543beee8daa1 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -145,6 +145,7 @@ written in C, C++, Ada, Objective-C, Pascal and more.") (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) + (patches (search-patches "gdb-9.2-sim-ppc-fno-common.patch")) (sha256 (base32 "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n")))) diff --git a/gnu/packages/patches/gdb-9.2-sim-ppc-fno-common.patch b/gnu/packages/patches/gdb-9.2-sim-ppc-fno-common.patch new file mode 100644 index 000000000000..dae126f7d3ff --- /dev/null +++ b/gnu/packages/patches/gdb-9.2-sim-ppc-fno-common.patch @@ -0,0 +1,123 @@ +From a2d12a56679db64d96e02a65933b2911f14c52a2 Mon Sep 17 00:00:00 2001 +From: Sebastian Huber +Date: Wed, 1 Jul 2020 19:29:55 +0200 +Subject: [PATCH] sim/ppc: Fix linker error with -fno-common + +GCC 10 enables -fno-common by default. This resulted in a multiple +definition linker error since global variables were declared and defined +in a header file: + + ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of + `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here + +sim/ppc + + * ld-insn.h (last_model, last_model_data, last_model_function, + last_model_internal, last_model_macro, last_model_static): + Delete. + (max_model_fields_len, model_data, model_functions, + model_internal, model_macros, model_static, models): Declare, but do not + define. + * ld-insn.c (last_model, last_model_data, last_model_function, + last_model_internal, last_model_macro, last_model_static, + max_model_fields_len, model_data, model_functions, + model_internal, model_macros, model_static, models): Define. + +(cherry picked from commit ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0) +--- + +This patch is a trivial backport from the upstream commit mentioned above. +Only the ChangeLog had to be adapted. + + sim/ppc/ChangeLog | 13 +++++++++++++ + sim/ppc/ld-insn.c | 18 ++++++++++++++++++ + sim/ppc/ld-insn.h | 24 +++++++----------------- + 3 files changed, 38 insertions(+), 17 deletions(-) + +diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog +index 665c7606d9eb..8f7150cee6b9 100644 +--- a/sim/ppc/ChangeLog ++++ b/sim/ppc/ChangeLog +@@ -1,3 +1,16 @@ ++2020-07-03 Sebastian Huber ++ ++ * ld-insn.h (last_model, last_model_data, last_model_function, ++ last_model_internal, last_model_macro, last_model_static): ++ Delete. ++ (max_model_fields_len, model_data, model_functions, ++ model_internal, model_macros, model_static, models): Declare, but do not ++ define. ++ * ld-insn.c (last_model, last_model_data, last_model_function, ++ last_model_internal, last_model_macro, last_model_static, ++ max_model_fields_len, model_data, model_functions, ++ model_internal, model_macros, model_static, models): Define. ++ + 2019-01-26 Tom Tromey + + * Makefile.in (version.c): Use sim's create-version.sh. +diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c +index e39131ca1334..585071a861ff 100644 +--- a/sim/ppc/ld-insn.c ++++ b/sim/ppc/ld-insn.c +@@ -28,6 +28,24 @@ + + #include "igen.h" + ++static model *last_model; ++ ++static insn *last_model_macro; ++static insn *last_model_function; ++static insn *last_model_internal; ++static insn *last_model_static; ++static insn *last_model_data; ++ ++model *models; ++ ++insn *model_macros; ++insn *model_functions; ++insn *model_internal; ++insn *model_static; ++insn *model_data; ++ ++int max_model_fields_len; ++ + static void + update_depth(insn_table *entry, + lf *file, +diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h +index 88318ffa2b34..52baeaa2d846 100644 +--- a/sim/ppc/ld-insn.h ++++ b/sim/ppc/ld-insn.h +@@ -200,25 +200,15 @@ extern insn_table *load_insn_table + table_include *includes, + cache_table **cache_rules); + +-model *models; +-model *last_model; ++extern model *models; + +-insn *model_macros; +-insn *last_model_macro; ++extern insn *model_macros; ++extern insn *model_functions; ++extern insn *model_internal; ++extern insn *model_static; ++extern insn *model_data; + +-insn *model_functions; +-insn *last_model_function; +- +-insn *model_internal; +-insn *last_model_internal; +- +-insn *model_static; +-insn *last_model_static; +- +-insn *model_data; +-insn *last_model_data; +- +-int max_model_fields_len; ++extern int max_model_fields_len; + + extern void insn_table_insert_insn + (insn_table *table,