public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Speed up build of gnatools
@ 2011-09-06 10:57 Arnaud Charlet
  2011-09-06 11:14 ` Duncan Sands
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaud Charlet @ 2011-09-06 10:57 UTC (permalink / raw)
  To: gcc-patches

Now that gnatmake supports -j0, it's possible to speed up the build of
gnattools during GNAT build by using gnatmake -j0 instead of gnatmake.

This is useful since gnattools is the only target which isn't parallelized
in the Makefile before this change.

Tested on x86_64-linux-gnu, committed on trunk.

2011-09-06  Arnaud Charlet  <charlet@adacore.com>
        
	* gcc-interface/Makefile.in (common-tools, gnatmake-re,                 
	gnatlink-re): Speed up by using -j0.

--
Index: gcc-interface/Makefile.in
===================================================================
--- gcc-interface/Makefile.in	(revision 178566)
+++ gcc-interface/Makefile.in	(working copy)
@@ -2336,7 +2336,7 @@
 endif
 
 common-tools:
-	$(GNATMAKE) -c -b $(ADA_INCLUDES) \
+	$(GNATMAKE) -j0 -c -b $(ADA_INCLUDES) \
 	  --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
 	  gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
 	  gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
@@ -2375,16 +2375,18 @@
 	$(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
 
 gnatmake-re:  link.o targext.o
-	$(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
+	$(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
+	$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
 	$(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
 		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
 
 # Note the use of the "mv" command in order to allow gnatlink to be linked with
 # with the former version of gnatlink itself which cannot override itself.
-gnatlink-re:  link.o targext.o
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
+# gnatlink-re cannot be run at the same time as gnatmake-re, hence the
+# dependency
+gnatlink-re: link.o targext.o gnatmake-re
+	$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
 	$(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
 		    --GCC="$(GCC_LINK)" $(TOOLS_LIBS)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-06 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06 10:57 [Ada] Speed up build of gnatools Arnaud Charlet
2011-09-06 11:14 ` Duncan Sands
2011-09-06 11:57   ` Arnaud Charlet
2011-09-06 15:17     ` Paolo Bonzini
2011-09-06 15:25       ` Paolo Bonzini
2011-09-06 13:27   ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).