This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A new parallel buld patch
On Sat, May 20, 2000 at 11:34:28AM -0700, H . J . Lu wrote:
> 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.
>
Ooops. I sent the old one. Here is the correct one. There are a few
other bugs like that in gcc. I will send in patches later.
Thanks.
H.J.
--
20000-05-20 H.J. Lu (hjl@gnu.org)
* mklibgcc.in: Add explicit dependencyies to all multilib
directories.
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 18:38:54
@@ -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,6 @@ for ml in $MULTILIBS; do
if [ $dir != . ]; then
echo "libgcc/${dir}: libgcc; -mkdir libgcc/${dir}"
echo "${dir}:; -mkdir ${dir}"
- all="$all ${dir} libgcc/${dir}"
fi
all="$all ${dir}/libgcc.a"
done
@@ -323,10 +328,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