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: [PATCH v3 03/18] move generated_files order-only dependency later


Il 20/08/2013 15:59, Tom Tromey ha scritto:
> There is an order-only dependency in gcc/Makefile.in that tries to
> build the generated files before compiling regular objects.  However,
> this appears too early, and so at the time it is seen by make,
> GCOV_OBJS and GCOV_DUMP_OBJS have not yet been set.
> 
> This patch fixes the problem and prevents any future problems of this
> nature by moving the order-only dependency to the end of Makefile.in.
> 
> This also adds lto-wrapper.o to ALL_HOST_BACKEND_OBJS.
> 
> 	* Makefile.in (ALL_HOST_BACKEND_OBJS): Add lto-wrapper.o.
> 	($(ALL_HOST_OBJS)): Move order-only dependency to end
> 	of file.
> ---
>  gcc/Makefile.in | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> index 415f085..172ab4d 100644
> --- a/gcc/Makefile.in
> +++ b/gcc/Makefile.in
> @@ -1496,7 +1496,8 @@ ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
>  
>  ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
>    $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
> -  $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS)
> +  $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
> +  lto-wrapper.o
>  
>  # This lists all host object files, whether they are included in this
>  # compilation or not.
> @@ -3884,11 +3885,6 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
>         options.h target-hooks-def.h insn-opinit.h \
>         common/common-target-hooks-def.h pass-instances.def
>  
> -# In order for parallel make to really start compiling the expensive
> -# objects from $(OBJS) as early as possible, build all their
> -# prerequisites strictly before all objects.
> -$(ALL_HOST_OBJS) : | $(generated_files)
> -
>  #
>  # How to compile object files to run on the build machine.
>  
> @@ -5381,3 +5377,8 @@ po/gcc.pot: force
>  	$(MAKE) srcextra
>  	AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
>  		$(XGETTEXT) gcc $(srcdir)
> +
> +# In order for parallel make to really start compiling the expensive
> +# objects from $(OBJS) as early as possible, build all their
> +# prerequisites strictly before all objects.
> +$(ALL_HOST_OBJS) : | $(generated_files)
> 

Ok.

Paolo


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