This patch fixes it.
I find it a little bit disturbing that gpc's `make install' will remove pre-existing files from $(docdemodir). Besides, for some reason I'm yet to understand, it causes installation to fail on AIX 4.1.5, with an error message about an exceeding long command line when running `rm'. The patch below seems to fix it.
If you really mean to delete the contents of $(docdemodir), I suggest making it `for f in $(docdemodir)/*; do rm -f $$f; done', to avoid the line-too-long error.
Thanks!
--- gcc/p/Make-lang-2.95.in~ Thu Oct 19 06:29:35 2000 +++ gcc/p/Make-lang-2.95.in Mon Jan 15 00:12:41 2001 @@ -588,7 +588,6 @@ done chmod a-x $(docdir)/BUGS $(demodir)/* if [ "`cd p/docdemos && echo *`" != "*" ]; then \ - rm -f $(docdemodir)/* && \ for f in `cd p/docdemos && echo *`; do \ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \ --- gcc/p/Make-lang-old.in~ Thu Oct 19 06:29:35 2000 +++ gcc/p/Make-lang-old.in Mon Jan 15 00:12:31 2001 @@ -588,7 +588,6 @@ done chmod a-x $(docdir)/BUGS $(demodir)/* if [ "`cd p/docdemos && echo *`" != "*" ]; then \ - rm -f $(docdemodir)/* && \ for f in `cd p/docdemos && echo *`; do \ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \ --- gcc/p/Make-lang.in~ Thu Oct 19 06:29:35 2000 +++ gcc/p/Make-lang.in Mon Jan 15 00:12:26 2001 @@ -588,7 +588,6 @@ done chmod a-x $(docdir)/BUGS $(demodir)/* if [ "`cd p/docdemos && echo *`" != "*" ]; then \ - rm -f $(docdemodir)/* && \ for f in `cd p/docdemos && echo *`; do \ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \
On Jan 15, 2001, Alexandre Oliva oliva@lsd.ic.unicamp.br wrote:
If you really mean to delete the contents of $(docdemodir), I suggest making it `for f in $(docdemodir)/*; do rm -f $$f; done', to avoid the line-too-long error.
Or a change similar to this (that was also needed, as I discovered just after sending the previous message):
--- gcc/p/Make-lang-2.95.in~ Mon Jan 15 00:12:41 2001 +++ gcc/p/Make-lang-2.95.in Mon Jan 15 00:56:41 2001 @@ -592,7 +592,7 @@ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \ done && \ - chmod a-x $(docdemodir)/*; \ + (cd $(docdemodir) && chmod a-x *); \ fi
pascal.install-info: pascal.install-dir pascal.info --- gcc/p/Make-lang-old.in~ Mon Jan 15 00:12:31 2001 +++ gcc/p/Make-lang-old.in Mon Jan 15 00:56:29 2001 @@ -592,7 +592,7 @@ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \ done && \ - chmod a-x $(docdemodir)/*; \ + (cd $(docdemodir) && chmod a-x *); \ fi
pascal.install-info: pascal.install-dir pascal.info --- gcc/p/Make-lang.in~ Mon Jan 15 00:12:26 2001 +++ gcc/p/Make-lang.in Mon Jan 15 00:56:30 2001 @@ -592,7 +592,7 @@ rm -f $(docdemodir)/$$f; \ $(INSTALL_DATA) p/docdemos/$$f $(docdemodir)/$$f || exit 1; \ done && \ - chmod a-x $(docdemodir)/*; \ + (cd $(docdemodir) && chmod a-x *); \ fi
pascal.install-info: pascal.install-dir pascal.info
There's a bug in either GCC 2.95.2 or glibc that causes rts/rts-va.c to fail to compile with GCC 2.95.2 on GNU/Linux/sparc. The complaint is that va_start is being used with the wrong number of arguments. The problem is that some glibc header previously included stdarg.h, and then, including varargs.h doesn't have the desired effect. This patch introduces an ugly, but functional work-around.
--- gcc/p/rts/rts-va.c~ Sun Jun 4 06:02:57 2000 +++ gcc/p/rts/rts-va.c Mon Jan 15 05:07:57 2001 @@ -32,6 +32,9 @@ */
#include "rts.h" +#if defined __linux__ && defined __sparc__ && __GNUC__ == 2 && __GNUC_MINOR__ == 95 +#undef _STDARG_H +#endif #include "varargs.h"
int
Alexandre Oliva wrote:
There's a bug in either GCC 2.95.2 or glibc that causes rts/rts-va.c to fail to compile with GCC 2.95.2 on GNU/Linux/sparc. The complaint is that va_start is being used with the wrong number of arguments.
The problem is that some glibc header previously included stdarg.h, and then, including varargs.h doesn't have the desired effect. This patch introduces an ugly, but functional work-around.
That's also been fixed in the current sources, we now use stdarg.h as well.
Frank
Alexandre Oliva wrote:
I find it a little bit disturbing that gpc's `make install' will remove pre-existing files from $(docdemodir).
Sometimes, docdemos are renamed. Without deleting the old ones, they'd clobber the directory unnecessarily, and perhaps even give misleading (obsolete) information...
Besides, for some reason I'm yet to understand, it causes installation to fail on AIX 4.1.5, with an error message about an exceeding long command line when running `rm'. The patch below seems to fix it.
Argh! I'd have expected this with Dos command.com, but not AIX... :-(
If you really mean to delete the contents of $(docdemodir), I suggest making it `for f in $(docdemodir)/*; do rm -f $$f; done', to avoid the line-too-long error.
Or a change similar to this (that was also needed, as I discovered just after sending the previous message):
(cd $(docdemodir) && chmod a-x *); \
Well, if the command-line length limits are really so tight, this will probably fail if we have 2-3 times as many docdemos as we do now (and that's expected to happen in the foreseeable future). So, I'll go for the loop...
As soon as it's been uploaded to the CVS (gpc-20010115, probably in a few hours), could you please check that it works?
Frank
Alexandre Oliva wrote:
This patch fixes it.
That has already been fixed in the current sources.
We use `-r', that's also portable, isn't it? `-f' is wrong because some of the diffs are symlinks.
Frank