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]

[PATCH] Fix Ada makefile problem with parallel make


Hello,

when bootstrapping with parallel make and Ada enabled, I'd regularly
get errors like "xnmake: Text file busy", because two Makefile rules
that might run in parallel both create and use the xnmake binary.

This patch adds a quick fix to serialize those two rules to avoid
that problem.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
OK?

ChangeLog:

	* ada/Make-lang.in (ada/nmake.ads): Add dependency on ada/nmake.adb
	to force serialization.

Index: gcc/ada/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.58
diff -c -p -r1.58 Make-lang.in
*** gcc/ada/Make-lang.in	24 Nov 2003 14:27:57 -0000	1.58
--- gcc/ada/Make-lang.in	28 Nov 2003 21:08:58 -0000
*************** ada/nmake.adb : ada/sinfo.ads ada/nmake.
*** 1037,1043 ****
  	$(CP) $^ ada/bldtools
  	(cd ada/bldtools; gnatmake -q xnmake ; ./xnmake -b ../nmake.adb )
  
! ada/nmake.ads :  ada/sinfo.ads ada/nmake.adt ada/xnmake.adb
  	-$(MKDIR) ada/bldtools
  	$(CP) $^ ada/bldtools
  	(cd ada/bldtools; gnatmake -q xnmake ; ./xnmake -s ../nmake.ads )
--- 1037,1043 ----
  	$(CP) $^ ada/bldtools
  	(cd ada/bldtools; gnatmake -q xnmake ; ./xnmake -b ../nmake.adb )
  
! ada/nmake.ads :  ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/nmake.adb
  	-$(MKDIR) ada/bldtools
  	$(CP) $^ ada/bldtools
  	(cd ada/bldtools; gnatmake -q xnmake ; ./xnmake -s ../nmake.ads )
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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