This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: genflags


On Fri, Aug 2, 2013 at 9:23 AM, Hendrik Greving
<hendrik.greving.intel@gmail.com> wrote:
>
> I am looking at some build dependencies, my build apparently is
> missing a dependency on genflags->insn-flags.h. c-opts.o is compiled
> before insn-flags.h was generated. Anybody has an idea why? Also, I am
> searching for who is actually calling genflags (I am already
> desperately doing a simple 'grep' and haven't found it yet).

You neglected to mention what version of GCC you are building and
whether you have any local changes.

That said, I agree that it looks like in gcc/Makefile.in
c-family/c-opts.o is missing a dependency on $(TM_H) and $(TM_P_H),
although c-family/c-opts.c #includes both those files.  Fixing that in
gcc/Makefile.in should fix your problem.  If it does, please send in a
patch.

The file is created by these definitions in gcc/Makefile.in:

simple_rtl_generated_h	= insn-attr.h insn-attr-common.h insn-codes.h \
			  insn-config.h insn-flags.h

simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h

$(simple_generated_h): insn-%.h: s-%; @true

$(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
	  $(filter insn-conditions.md,$^) > tmp-$*.h
	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
	$(STAMP) s-$*

This is admittedly hard to follow if you don't know GNU make, but what
it boils down to is that insn-flags.h is created by running
	$(RUN_GEN) build/genflags $(md_file)

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]