On Thu, Sep 7, 2017 at 6:57 PM, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > Jakub Jelinek <ja...@redhat.com> writes: > >> On Wed, Sep 06, 2017 at 10:08:01PM +0200, David Edelsohn wrote: >>> This change broke bootstrap on AIX because sancov.c now references a >>> macro that is defined as a function on AIX. sancov.c needs to include >>> tm_p.h to pull in the target-dependent prototypes. The following >>> patch works for me. Is this okay? >>> >>> * sancov.c: Include tm_p.h. >> >> Ok, thanks. And sorry for the breakage. >> >>> Index: sancov.c >>> =================================================================== >>> --- sancov.c (revision 251817) >>> +++ sancov.c (working copy) >>> @@ -28,6 +28,7 @@ >>> #include "basic-block.h" >>> #include "options.h" >>> #include "flags.h" >>> +#include "tm_p.h" >>> #include "stmt.h" >>> #include "gimple-iterator.h" >>> #include "gimple-builder.h" > > This broke SPARC bootstrap, however: > > In file included from ./tm_p.h:4:0, > from /vol/gcc/src/hg/trunk/local/gcc/sancov.c:31: > /vol/gcc/src/hg/trunk/local/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); > ^ > > This fix allows the bootstrap to continue, but I'm not certain how > header inclusion is supposed to be done this way:
It looks like sancov.c also needs to include memmodel.h before tm_p.h. One should not include memmodel.h in sparc-protos.h. - David