This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
exec-tool.in vs make -j
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 May 2008 13:57:43 -0400
- Subject: 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