This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: small Fortran bug
- To: mrs at wrs dot com
- Subject: Re: small Fortran bug
- From: Craig Burley <burley at gnu dot org>
- Date: Wed, 1 Jul 1998 07:59:43 -0400 (EDT)
- CC: egcs at cygnus dot com
>> Whoa, how could this happen? Wasn't stage1 just `mkdir'ed?
>
>No. I last did a make bootstrap that failed. stage1 was already
>populated. Think while 1: do cvs update; make && make check; done.
>Before you say don't do that, let me say that I've been doing it for 5
>years, and I'm not about to stop. :-)
Seems reasonable to me, and after all the work I've done over the
past months making trivia like "make LANGUAGES=c install" work
(i.e. not install or build any g77 stuff), I'm not about the
take up the "well then, don't do that" argument against making
build procedures work seamlessly. :)
But I'm at a loss to understand the problem. Again, my only guess
is that, because g77.c is a link, mv'ing it somehow produces a
new entry (filename) that cannot itself be mv'ed over.
Well, pickle my cumberbund, that's exactly the behavior I see
on my RH GNU/Linux 4.2 system! Here's the screen snapshot:
[craig@deer gnu]$ mkdir duh
[craig@deer gnu]$ cd duh
[craig@deer duh]$ ls
[craig@deer duh]$ ln -s ../egcs-19980628/gcc/gcc.c g77.c
[craig@deer duh]$ ls -l
total 0
lrwxrwxrwx 1 craig develop 26 Jul 1 07:47 g77.c -> ../egcs-1998062\8/gcc/gcc.c
[craig@deer duh]$ mkdir stage1
[craig@deer duh]$ mv g77.c stage1
[craig@deer duh]$ !ln
ln -s ../egcs-19980628/gcc/gcc.c g77.c
[craig@deer duh]$ mv g77.c stage1
mv: replace `stage1/g77.c', overriding mode 0777? n
[craig@deer duh]$ ls -l stage1
total 0
lrwxrwxrwx 1 craig develop 26 Jul 1 07:47 g77.c -> ../egcs-1998062\8/gcc/gcc.c
[craig@deer duh]$
And, guess what, I think I've sussed this.
The problem seems to be that the target file already exists *and*
is "normally not writable", in this case because it is a link
to a file in a nonexistant directory.
Seems to me the ideal solution (for not just g77, but any language
in a subdir that makes a similar kind of link to egcs/gcc/gcc.c) is
one of the following:
1. Change the link to be to an absolute pathname, so the link
works regardless of whether it is in the language subdir `x'
or stageN/`x' or wherever.
2. Instead of mv'ing the link to stageN/`x', simply delete it,
assuming it's not run from that dir (xgcc and others are,
but g77 isn't during a build).
I prefer #1. Opinions?
tq vm, (burley)