* [PATCH] rust: Fix rust-tree.cc compilation on SPARC
@ 2023-02-20 10:36 Rainer Orth
2023-02-20 10:37 ` Arthur Cohen
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2023-02-20 10:36 UTC (permalink / raw)
To: gcc-patches; +Cc: Thomas Schwinge
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]
This patch
commit 27a89f84c458ae938bc3eb92ad0d594c06fc3b42
Author: Thomas Schwinge <thomas@codesourcery.com>
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2023-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/rust:
* backend/rust-tree.cc: Include memmodel.h.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rt.patch --]
[-- Type: text/x-patch, Size: 337 bytes --]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rust: Fix rust-tree.cc compilation on SPARC
2023-02-20 10:36 [PATCH] rust: Fix rust-tree.cc compilation on SPARC Rainer Orth
@ 2023-02-20 10:37 ` Arthur Cohen
0 siblings, 0 replies; 2+ messages in thread
From: Arthur Cohen @ 2023-02-20 10:37 UTC (permalink / raw)
To: Rainer Orth, gcc-patches; +Cc: Thomas Schwinge
[-- Attachment #1.1.1: Type: text/plain, Size: 1012 bytes --]
Thanks Rainer!
Ok for trunk :)
Kindly,
--
Arthur
On 2/20/23 11:36, Rainer Orth wrote:
> This patch
>
> commit 27a89f84c458ae938bc3eb92ad0d594c06fc3b42
> Author: Thomas Schwinge <thomas@codesourcery.com>
> 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
>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3195 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-20 10:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 10:36 [PATCH] rust: Fix rust-tree.cc compilation on SPARC Rainer Orth
2023-02-20 10:37 ` Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).