[COMMITTED V10 3/7] CTF/BTF debug formats

Joseph Myers joseph@codesourcery.com
Tue Jun 29 15:11:51 GMT 2021


On Tue, 29 Jun 2021, David Edelsohn via Gcc-patches wrote:

> On Tue, Jun 29, 2021 at 10:33 AM Joseph Myers <joseph@codesourcery.com> wrote:
> >
> > There's now a build failure for sparc64-linux-gnu:
> >
> > In file included from ./tm_p.h:4:0,
> >                  from /scratch/jmyers/glibc-bot/src/gcc/gcc/ctfout.c:24:
> > /scratch/jmyers/glibc-bot/src/gcc/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration
> >  extern void sparc_emit_membar_for_model (enum memmodel, int, int);
> >                                                ^
> >
> > (and likewise in btfout.c).
> 
> I see memmodel.h included before tm_p.h.  Do you want to commit that,
> or should I?

I've committed this patch.

> Are you aware of other dependencies for other targets?

This is the only failure I've seen with my build-many-glibcs.py bot, but 
that only covers architectures supported by glibc.


bootstrap: Include memmodel.h in btfout.c and ctfout.c before tm_p.h

This fixes a "use of enum 'memmodel' without previous declaration"
error in sparc-protos.h.

Minimally tested that this fixes the build-many-glibcs.py compilers
build for sparc64-linux-gnu.

	* btfout.c, ctfout.c: Include "memmodel.h".

diff --git a/gcc/btfout.c b/gcc/btfout.c
index 2316dea5f27..e58c969825a 100644
--- a/gcc/btfout.c
+++ b/gcc/btfout.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "target.h"
+#include "memmodel.h"
 #include "tm_p.h"
 #include "output.h"
 #include "dwarf2asm.h"
diff --git a/gcc/ctfout.c b/gcc/ctfout.c
index 71d7a62e6ef..682d8529a58 100644
--- a/gcc/ctfout.c
+++ b/gcc/ctfout.c
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "target.h"
+#include "memmodel.h"
 #include "tm_p.h"
 #include "output.h"
 #include "dwarf2asm.h"

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Gcc-patches mailing list