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: gengtype improvements for plugins. patch 1/N


Hello Basile,

I cannot approve nor reject your patch, but regarding the build system
changes:

* Basile Starynkevitch wrote on Sat, Aug 28, 2010 at 06:23:11PM CEST:
> --- gcc/Makefile.in	(revision 163612)
> +++ gcc/Makefile.in	(working copy)

> @@ -3892,6 +3892,18 @@ build/gengtype-parse.o : gengtype-parse.c gengtype
>    $(SYSTEM_H)
>  build/gengtype.o : gengtype.c $(BCONFIG_H) $(SYSTEM_H) gengtype.h 	\
>    rtl.def insn-notes.def errors.h double-int.h $(HASHTAB_H)
> +## the build/version.o is needed at least for gengtype.
> +ifdef REVISION_c
> +build/version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
> +else
> +build/version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
> +endif
> +	$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \

build tools need to be compiled with $(COMPILER_FOR_BUILD) and with
$(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS), otherwise cross compilation
will fail.  I suggest that you do not spell out commands for this object
but just add the required flags as target-specific ones like this:

build/version.o: BUILD_CPPFLAGS += -DBASEVER=$(BASEVER_s) ...

> +	-DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
> +	-DREVISION=$(REVISION_s) \
> +	-DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
> +	-DBUGURL=$(BUGURL_s) -c $(srcdir)/version.c $(OUTPUT_OPTION)
> +
>  build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h	\
>    errors.h $(READ_MD_H)
>  build/genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h		\

Cheers,
Ralf


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