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]

exec-tool.in vs make -j


In gcc/exec-tool.in we use a file to note recursion.  This breaks
badly if you're doing parallel cross-compiler builds, because one job
creates the file and a different job sees it and thinks it's
recursing, and tries to use the linker from a previous pass, which
doesn't exist if you're not bootstrapping (like when building a cross
compiler).

Any reason why we don't use an environment variable to tag this?

--- /greed/dj/gnu/gcc/svn/trunk/gcc/exec-tool.in	2008-04-09 16:09:21.000000000 -0400
+++ ./exec-tool.in	2008-05-28 21:27:29.000000000 -0400
@@ -62,10 +62,9 @@
       # previous stage (because then the relinking would just never happen!).
       # So we take extra care to use prev-ld/ld-new *on recursive calls*.
-      test -f $lt_prog-recursive && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
+      test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
 
-      touch $lt_prog-recursive
+      LT_RCU=1; export LT_RCU
       $scriptdir/../$dir/$prog ${1+"$@"}
       result=$?
-      rm -f $lt_prog-recursive
       exit $result
 


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