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]

Re: A new parallel buld patch


On Sat, May 20, 2000 at 10:17:47AM -0300, Alexandre Oliva wrote:
> On May 20, 2000, Alexandre Oliva <aoliva@cygnus.com> wrote:
> 
> > On May 18, 2000, "H . J . Lu" <hjl@lucon.org> wrote:
> >> * Makefile.in (libgcc.mk): Depend on xgcc$(exeext) for
> >> GCC_FOR_TARGET used by MULTILIBS.
> >> * mklibgcc.in: Make sure each .o file depends on the
> >> directory it will be in.
> >> Make the multilib directory depends libgcc.
> 
> > Thanks, installed.
> 
> I'm checking this in to fix the problem detected by Geoff's regression
> checker:
> 

Thanks. But I don't think it is correct for parallel build. Basically,
we cannot assume the directory will be there when we need it unless
there is an explicit dependency. This patch seems to work for me
from ia32-linux to ppc-linux.

H.J.
---
20000-05-20  H.J. Lu  (hjl@gnu.org)

	* mklibgcc.in: Make all multilib directories depend libgcc.

Index: gcc/mklibgcc.in
===================================================================
RCS file: /work/cvs/gnu/egcs/gcc/mklibgcc.in,v
retrieving revision 1.1.1.5
diff -u -p -r1.1.1.5 mklibgcc.in
--- gcc/mklibgcc.in	2000/05/20 17:27:56	1.1.1.5
+++ gcc/mklibgcc.in	2000/05/20 17:44:45
@@ -243,10 +243,16 @@ for file in $LIB2ADD; do
         flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
         out="libgcc/${dir}/${f}"
 
+	if [ $dir = . ]; then
+	  libgccdir="libgcc"
+	else
+	  libgccdir="libgcc/${dir}"
+	fi
+
 	# Depend on previous out to serialize all sub-makes of this
 	# target file.  This because ./$f is used as a temporary in
 	# each case before being moved to libgcc/$dir/.
-	echo $out: $lastout
+	echo $out: $libgccdir $lastout
 	echo "	$make_compile" \\
 	echo '	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
 	echo '	  MULTILIB_CFLAGS="'$flags'"' $f
@@ -311,7 +317,7 @@ for ml in $MULTILIBS; do
   if [ $dir != . ]; then
     echo "libgcc/${dir}: libgcc; -mkdir libgcc/${dir}"
     echo "${dir}:; -mkdir ${dir}"
-    all="$all ${dir} libgcc/${dir}"
+    all="$all libgcc/${dir}"
   fi
   all="$all ${dir}/libgcc.a"
 done
@@ -323,10 +329,16 @@ for f in $EXTRA_MULTILIB_PARTS; do
     flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
     out="$dir/$f"
 
+    if [ $dir = . ]; then
+      libgccdir=""
+    else
+      libgccdir="${dir}"
+    fi
+
     # Depend on previous out to serialize all sub-makes of this
     # target file.  This because ./$f is used as a temporary in
     # each case before being moved to libgcc/$dir/.
-    echo $out: $lastout
+    echo $out: $libgccdir $lastout
     echo "	$make_compile" \\
     echo '	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
     echo '	  MULTILIB_CFLAGS="'$flags'"' T=t t$f

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