diff mbox

Use automatic dependencies for mkoffload.o

Message ID 20150218122300.GL1746@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Feb. 18, 2015, 12:23 p.m. UTC
On Wed, Feb 18, 2015 at 02:56:07PM +0300, Ilya Verbin wrote:
> On Wed, Feb 18, 2015 at 12:48:21 +0100, Thomas Schwinge wrote:
> > What is the rationale for the insn-modes.h order-only prerequisites for
> > mkoffload.o?  Is this simply to get past the build issue which, for
> > example, Jakub also reported for the nvptx mkoffload,
> > <http://news.gmane.org/find-root.php?message_id=%3C20150217153918.GX1746%40tucnak.redhat.com%3E>
> > (»missing mkoffload.o dependencies, patch attached«), or is there a
> > better rationale for adding (only) this one (indirect) dependency,
> > instead of listing all of the (real) dependencies?  (After all, we do
> > want the mkoffload executables to be rebuilt if one of their dependencies
> > is updated.)  (I have not yet tried to figure out how to do that.)
> 
> Yes, mkoffload is just not working without this dependency, and works well with
> it.  Do you know the right way how to add all other dependencies?

I've tested this for both intelmic and nvptx and it works fine.
Ok for trunk?

2015-02-18  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/t-intelmic (mkoffload.o): Remove dependency on
	insn-modes.h.
	(ALL_HOST_OBJS): Add mkoffload.o.
	* config/nvptx/t-nvptx (ALL_HOST_OBJS): Likewise.



	Jakub

Comments

Richard Biener Feb. 18, 2015, 1:10 p.m. UTC | #1
On Wed, 18 Feb 2015, Jakub Jelinek wrote:

> On Wed, Feb 18, 2015 at 02:56:07PM +0300, Ilya Verbin wrote:
> > On Wed, Feb 18, 2015 at 12:48:21 +0100, Thomas Schwinge wrote:
> > > What is the rationale for the insn-modes.h order-only prerequisites for
> > > mkoffload.o?  Is this simply to get past the build issue which, for
> > > example, Jakub also reported for the nvptx mkoffload,
> > > <http://news.gmane.org/find-root.php?message_id=%3C20150217153918.GX1746%40tucnak.redhat.com%3E>
> > > (»missing mkoffload.o dependencies, patch attached«), or is there a
> > > better rationale for adding (only) this one (indirect) dependency,
> > > instead of listing all of the (real) dependencies?  (After all, we do
> > > want the mkoffload executables to be rebuilt if one of their dependencies
> > > is updated.)  (I have not yet tried to figure out how to do that.)
> > 
> > Yes, mkoffload is just not working without this dependency, and works well with
> > it.  Do you know the right way how to add all other dependencies?
> 
> I've tested this for both intelmic and nvptx and it works fine.
> Ok for trunk?

Ok.

Thanks,
Richard.

> 2015-02-18  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* config/i386/t-intelmic (mkoffload.o): Remove dependency on
> 	insn-modes.h.
> 	(ALL_HOST_OBJS): Add mkoffload.o.
> 	* config/nvptx/t-nvptx (ALL_HOST_OBJS): Likewise.
> 
> --- gcc/config/i386/t-intelmic.jj	2014-11-13 15:13:25.000000000 +0100
> +++ gcc/config/i386/t-intelmic	2015-02-18 13:11:15.650820901 +0100
> @@ -1,9 +1,10 @@
> -mkoffload.o: $(srcdir)/config/i386/intelmic-mkoffload.c | insn-modes.h
> +mkoffload.o: $(srcdir)/config/i386/intelmic-mkoffload.c
>  	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
>  	  -I$(srcdir)/../libgomp \
>  	  -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \
>  	  -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
>  	  $< $(OUTPUT_OPTION)
> +ALL_HOST_OBJS += mkoffload.o
>  
>  mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBDEPS)
>  	$(COMPILER) -o $@ mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBS)
> --- gcc/config/nvptx/t-nvptx.jj	2015-02-18 12:36:20.000000000 +0100
> +++ gcc/config/nvptx/t-nvptx	2015-02-18 13:10:19.822762534 +0100
> @@ -3,6 +3,7 @@ CFLAGS-mkoffload.o += $(DRIVER_DEFINES)
>  mkoffload.o: $(srcdir)/config/nvptx/mkoffload.c
>  	$(COMPILE) $<
>  	$(POSTCOMPILE)
> +ALL_HOST_OBJS += mkoffload.o
>  
>  mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBDEPS)
>  	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
> 
> 
> 	Jakub
> 
>
diff mbox

Patch

--- gcc/config/i386/t-intelmic.jj	2014-11-13 15:13:25.000000000 +0100
+++ gcc/config/i386/t-intelmic	2015-02-18 13:11:15.650820901 +0100
@@ -1,9 +1,10 @@ 
-mkoffload.o: $(srcdir)/config/i386/intelmic-mkoffload.c | insn-modes.h
+mkoffload.o: $(srcdir)/config/i386/intelmic-mkoffload.c
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	  -I$(srcdir)/../libgomp \
 	  -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \
 	  -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
 	  $< $(OUTPUT_OPTION)
+ALL_HOST_OBJS += mkoffload.o
 
 mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBDEPS)
 	$(COMPILER) -o $@ mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBS)
--- gcc/config/nvptx/t-nvptx.jj	2015-02-18 12:36:20.000000000 +0100
+++ gcc/config/nvptx/t-nvptx	2015-02-18 13:10:19.822762534 +0100
@@ -3,6 +3,7 @@  CFLAGS-mkoffload.o += $(DRIVER_DEFINES)
 mkoffload.o: $(srcdir)/config/nvptx/mkoffload.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
+ALL_HOST_OBJS += mkoffload.o
 
 mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBDEPS)
 	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \