jonathan@comp.vuw.ac.nz (09/01/89)
Version:
gcc.1.35.97
System:
Irrelevant.
Symptom:
The changes to config.gcc to use VPATH for bootstrapping
in a different directory from the sources do not work when
attempting to run config.gcc with arguments of the form
"-srcdir=/some/absolute/pathname/", and then making.
The problems I found were:
* If config.gcc is run with "-srcdir=/some/absolute/pathname/",
it exits with a sed complaint about garbled commands.
Reading the source shows that "/" has been used as a separator
of a sed substitute command that includes a pathname. It's
silly to use "/" as delimiters for a string containing a
pathname.
* Targets gnulib and gnulib2 do not build; the command
`cp ../$(srcdir)/gnulib.c ...' does nothing sensible when
` $(srcdir)' is an absolute pathname.
* Target hardparams is built with make rather than $(MAKE).
This does not work well when make(1) does not support VPATH;
make(1) will say
``Make: Don't know how to make hard-params.c. Stop.''
* `make clean' does not remove .dbr dump files. It also
does not remove .jump2 files.
* The gcc.info does not mention the delayed branch
pass under Passes, nor what the dump file is called.
* `make clean' removes float.h. I don't believe that is
appropriate for most uses of that target. I do believe it is
appropriate for `make cleanconfig' to remove float.h.
* Many of the echo | sed commands in the Makefile
(eg: `echo $(srcdir)/gcc.texinfo | sed 's,^\./,,'`)
seem redundant. I understand that some makes only allow the
$< macro in implicit rules; couldn't the macro $@ be used
instead?
Some of these problems are fixed by the patches below.
*** config.gcc-DIST Sun Aug 20 14:25:38 1989
--- config.gcc Fri Sep 1 15:25:55 1989
***************
*** 296,303 ****
.)
;;
*)
echo "VPATH = ${srcdir}" > x
! cat x ${srcdir}/Makefile | sed "s/^srcdir = \./srcdir = ${srcdir}/" > Makefile
rm x
echo "dir ${srcdir}" > .gdbinit
echo "source ${srcdir}/.gdbinit" >> .gdbinit
--- 296,305 ----
.)
;;
*)
+ echo "Configuring Makefile for srcdir and VPATH of ${srcdir}"
echo "VPATH = ${srcdir}" > x
! echo "sed s!^srcdir = \.!srcdir = ${srcdir}!"
! cat x ${srcdir}/Makefile | sed "s!^srcdir = \.!srcdir = ${srcdir}!" > Makefile
rm x
echo "dir ${srcdir}" > .gdbinit
echo "source ${srcdir}/.gdbinit" >> .gdbinit
*** Makefile Wed Aug 23 15:03:21 1989
--- Makefile.new Fri Sep 1 15:37:03 1989
***************
*** 512,524 ****
clean:
-rm -f $(STAGESTUFF) $(STAGE_GCC)
-rm -f stamp-*.[ch] tmp-insn-*
! -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
! -rm -f core float.h hard-params
# Like clean but also delete the links made to configure gcc.
# Also removes gnulib, since that is desirable if you are changing cpus.
cleanconfig: clean
-rm -f tm.h aux-output.c config.h md config.status gnulib stamp-gnulib2
# Get rid of every file that's generated from some other file (except INSTALL).
realclean: cleanconfig
--- 512,525 ----
clean:
-rm -f $(STAGESTUFF) $(STAGE_GCC)
-rm -f stamp-*.[ch] tmp-insn-*
! -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop *.dbr *.jump2
! -rm -f core
# Like clean but also delete the links made to configure gcc.
# Also removes gnulib, since that is desirable if you are changing cpus.
cleanconfig: clean
-rm -f tm.h aux-output.c config.h md config.status gnulib stamp-gnulib2
+ -rm -f float.h hard-params
# Get rid of every file that's generated from some other file (except INSTALL).
realclean: cleanconfig