This is the mail archive of the gcc-patches@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: [Trunk] patch for GNU-friendly gengtype


On 06/21/2010 08:13 AM, Laurynas Biveinis wrote:
2010/6/21 Basile Starynkevitch<basile@starynkevitch.net>:
Sorry, I wrote something unclear. What I want, is to have gengtype
accept a --version program argument. I first tried to link version.o
inside build/gengtype, but doing that did add a circular dependency,&
make issued a warning about that.

Exactly. Why is this happening? The circular dependency means that there is a pre-existing version.o dependency on build/gengtype, so when you add the dependency the other way around, you complete the circle. But this pre-existing dependency is IMHO wrong, version.o should not depend on build/gengtype, or there is something else going on with Makefile which I don't understand.

# In order for parallel make to really start compiling the expensive # objects from $(OBJS-common) as early as possible, build all their # prerequisites strictly before all objects. $(ALL_HOST_OBJS) : | $(generated_files)

In any case, using version.o would break cross-compilation. You need to add a build/version.o and link _that_ with gengtype. Rules to compile build/version.o using the same compiler as gengtype are implicitly used.

Paolo


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