This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Generate EXTRA_MULTILIB_PARTS independently
- To: gcc-patches at gcc dot gnu dot org
- Subject: Generate EXTRA_MULTILIB_PARTS independently
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 07 Nov 2000 01:22:53 -0200
- Organization: GCC Team, Red Hat
The way we handle EXTRA_MULTILIB_PARTS was quite awkward: all of them
are forced to be built every time we type `make'. I fail to see the
point of that, and it annoys me a lot when developing for targets with
dozens of multilib variants, so I've attempted to fix it.
In order to remove the chain of dependencies we created, to prevent
the same temporary file from being used by concurrent compilations, I
decided to set T to the directory in which the file should be stored.
I believe this should work in most cases.
If we find some case in which it doesn't, my plan is to have Makefile
fragments that would be expanded for each multilib variant into
libgcc.mk. Then, we could also add accurate dependencies to
multilib-parts files.
Meanwhile, this is working for me. If nobody protests vehemently
against this in the next, say, 24 hours, I'll check it in.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* mklibgcc.in (EXTRA_MULTILIB_PARTS): Generate multilib parts
in-place.
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/mklibgcc.in,v
retrieving revision 1.21
diff -u -p -r1.21 mklibgcc.in
--- gcc/mklibgcc.in 2000/10/21 01:47:05 1.21
+++ gcc/mklibgcc.in 2000/11/07 03:16:55
@@ -358,23 +358,20 @@ echo ' done'
echo ' if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi'
for f in $EXTRA_MULTILIB_PARTS; do
- lastout="stmp-dirs force"
for ml in $MULTILIBS; do
dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
- out="$dir/$f"
+ case $dir in
+ .) out=$f ; t= ;;
+ *) out="$dir/$f" ; t=$dir/ ;;
+ esac
- # 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: stmp-dirs
echo " $make_compile" \\
echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
- echo ' MULTILIB_CFLAGS="'$flags'"' T=t t$f
- echo " mv t$f $out"
+ echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $out
all="$all $out"
- lastout="$out"
done
done
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me