Hi,

Baseline compiler builds fail on all sparc*-netbsd configurations.

In file included from ./tm_p.h:4,
                 from /runner/crossbuilds/../gcc/gcc/config/netbsd-d.c:27:
/runner/crossbuilds/../gcc/gcc/config/sparc/sparc-protos.h:45:47:
error: use of enum ‘memmodel’ without previous declaration
   45 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~
make[2]: *** [/runner/crossbuilds/../gcc/gcc/config/t-netbsd:24:
netbsd-d.o] Error 1


This patch fixes up the includes so compile succeeds.  Tested using
config-list.mk on all netbsd variants.

OK?

-- 
Iain
---
gcc/ChangeLog:

2019-04-27  Iain Buclaw  <ibuc...@gdcproject.org>

        * config/netbsd-d.c: Include memmodel.h.  Remove unused tree.h,
        varasm.h, and netbsd-protos.h.

---
diff --git a/gcc/config/netbsd-d.c b/gcc/config/netbsd-d.c
index 76342aacae3..5957256fa9b 100644
--- a/gcc/config/netbsd-d.c
+++ b/gcc/config/netbsd-d.c
@@ -21,9 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "tree.h"
-#include "varasm.h"
-#include "netbsd-protos.h"
+#include "memmodel.h"
 #include "tm_p.h"
 #include "d/d-target.h"
 #include "d/d-target-def.h"

Reply via email to