From patchwork Mon Feb 20 10:36:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 59363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1238311wrn; Mon, 20 Feb 2023 02:48:37 -0800 (PST) X-Google-Smtp-Source: AK7set8giMoYj/QyNSDeiKeESHuS9iu4KPdEbYk37VfzjlcVnODtTU7l/pcRHk2ID58zbGTNy07o X-Received: by 2002:a05:6402:138e:b0:4ac:d34b:c2aa with SMTP id b14-20020a056402138e00b004acd34bc2aamr1500221edv.10.1676890117210; Mon, 20 Feb 2023 02:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676890117; cv=none; d=google.com; s=arc-20160816; b=z/zcuZXiBoBzmsLq8xewS/ArQ6Ta4PX6yzfUmrS6KBi7juxU9Vlea5tgz23vhXjRpc nJwHyZHJKpBAYJyUnvOtAJM2bx39d0rN+10gj2I4HPVPut2Ij2AAvAWo9FSq0h4tCREB bov736W1tg+YPXeT/hfuQ2vtjd9mqJ2WnyIcQVRr8Dqhxe84vHzzPBFWFltXilo0KYZm f6j7t4rlenzouzSqyCdHuUYCiQtD8f9cgytZuOSaQOIHstizDTCchxbUhdGaZqf0uvv0 elvI302pnjRJx/wZagvQIZcs2CYVKW6UQDE5sNASFxKH4WKZpYrcHkHV14cIQS7LwINv dKxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=M7+N5I1OT/MJS5+NZaZNKUsaVQfmbKjZTZokfQYt0k0=; b=TJFwncBV5KS7+r/R7AKcBbEMLzt8J2QJbYCSE2b5wZv6XUqIYvikkDtzbiBqcrGZIx jmtDvytpcAXE/Mq7rnVVqTEh4afFIltGeChui10e8dlS1fXVbh8ckpohVv5kEWo1goie m8k22AX7C0FK25Je6AGl3w5AfLtpWwA8x+6c9q5VACIG9WFz2Wbj7COAOIBb1XfBQJWM sXOn8mEHxmXT84mBjarDNtWdR5xUcwLKUq/hxyqkKo6Fa/6yZ823jkuS/IH27aHK4jib IFnVg9lABGkRS6TFWMCKItn4lBpLfEQhSqIO+rT/D6f9y1vdmGNKK9K5l93Ff+8wNHWp rlzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CeBiTec.Uni-Bielefeld.DE header.s=20200306 header.b=WNTXn9Oj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t23-20020a05640203d700b004acce692a6esi14512766edw.538.2023.02.20.02.48.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 02:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@CeBiTec.Uni-Bielefeld.DE header.s=20200306 header.b=WNTXn9Oj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 834423814B2C for ; Mon, 20 Feb 2023 10:36:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id D20A63959C7F for ; Mon, 20 Feb 2023 10:36:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D20A63959C7F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id DC82AC00B5; Mon, 20 Feb 2023 11:36:06 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BnMhjiz_pCQT; Mon, 20 Feb 2023 11:36:06 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5085574e.dip0.t-ipconnect.de [80.133.87.78]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 044F3C0392; Mon, 20 Feb 2023 11:36:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1676889366; bh=43PTzt6bmcywVYdZOIpwRsHNu39jqhjAmoFzkCvEJ7A=; h=From:To:Cc:Subject:Date:From; b=WNTXn9OjPYO0DZEVpey7aEoU1+dSpIRz44cBGzznyTSdYj3BOPMF26P78oewqnxpa TR454XXV6cgBBtaLMtehza79XWuJhtEYzsgmPk8NerxCuS2IKSYKnqZLh0K11OSQci hNFl4BZLpxOxezNUomKdiZ8un6bc2DI2Ft9nnNErzM2TaOWlo7y7rYSjU+1p+PkIas BfpasUy1OacCNQ1Q0qHMVW4EzvHoL1NTdqSXlrnZ972O3ZS2wi2pGFSoeBvvcNaaZf suYpv8nTTCYlAl6v4JBGXsPyuVXyfiyRhPu4r9a0iq+snL1TOzqqqEhU4+JtNNCAuV AW95Fa2V2M5mg== From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge Subject: [PATCH] rust: Fix rust-tree.cc compilation on SPARC Date: Mon, 20 Feb 2023 11:36:05 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3795.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758346731565454112?= X-GMAIL-MSGID: =?utf-8?q?1758346731565454112?= This patch commit 27a89f84c458ae938bc3eb92ad0d594c06fc3b42 Author: Thomas Schwinge Date: Fri Feb 17 23:36:20 2023 +0100 '#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' broke rust bootstrap on SPARC: In file included from ./tm_p.h:4, from /vol/gcc/src/hg/master/local/gcc/rust/backend/rust-tree.cc:38: /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration 46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int); | ^~~~~~~~ Fixed by including memmodel.h. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. Ok for trunk? I'd usually commit the patch as obvious, but have no idea how rust patches are handled. Rainer diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -35,6 +35,7 @@ #include "file-prefix-map.h" #include "cgraph.h" #include "output.h" +#include "memmodel.h" #include "tm_p.h" // forked from gcc/c-family/c-common.cc c_global_trees