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: 1745016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=CeBiTec.Uni-Bielefeld.DE header.i=@CeBiTec.Uni-Bielefeld.DE header.a=rsa-sha256 header.s=20200306 header.b=WNTXn9Oj; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PKzP4196mz23j7 for ; Mon, 20 Feb 2023 21:36:40 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33968396DC29 for ; Mon, 20 Feb 2023 10:36:38 +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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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