public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Building of fixincludes with 4.0.1 uses wrong gcc
@ 2005-08-21  5:40 h.michael.foerster
  2005-08-22 20:37 ` James E Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: h.michael.foerster @ 2005-08-21  5:40 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Dear Sirs,

1. bootstrapping the gcc 4.0.1 under Sparc/Solaris I found that the 
building in "fixincludes" uses the gcc (with no PATH specification) 
instead of the xgcc build by the last stage. It may crash, it happens on 
my environment, because I've migrated from Solaris 9 to Solaris 10 where 
the includes are not compatible.

The build is:
 > gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/configure 
--prefix=/usr/local/GCC/4.0/1/Solaris --with-mpfr=/usr/local/Maths/Gmp 
--with-gmp=/usr/local/Maths/Gmp --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --enable-languages=c,ada --enable-threads=solaris
Thread model: solaris
gcc version 4.0.1

2. A question: The gcc 4.0 uses the built-in specs. Is it correct, that 
a "specs" file will not be used as in the 2.x and 3.x versions of the gcc?

With regards
Michael Foerster



[-- Attachment #2: gcc_problems.txt --]
[-- Type: text/plain, Size: 3559 bytes --]

make[1]: Entering directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/gcc'
rm -f .bad_compare
case "fastcompare" in *compare | *compare-lean ) stage=2 ;; * ) stage=`echo fastcompare | sed -e 's,^[a-z]*compare\([0-9][0-9]*\).*,\1 ,'` ;; esac; \
for dir in . ada build; do \
  if [ "`echo $dir/*.o`" != "$dir/*.o" ] ; then \
    for file in $dir/*.o; do \
      case "fastcompare" in \
        slowcompare* ) \
          tail +16c ./$file > tmp-foo1; \
          tail +16c stage$stage/$file > tmp-foo2 \
            && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $file differs >> .bad_compare) || true; \
          ;; \
        fastcompare* ) \
          cmp $file stage$stage/$file 16 16 > /dev/null 2>&1; \
          test $? -eq 1 && echo $file differs >> .bad_compare || true; \
          ;; \
        gnucompare* ) \
          cmp --ignore-initial=16 $file stage$stage/$file > /dev/null 2>&1; \
          test $? -eq 1 && echo $file differs >> .bad_compare || true; \
          ;; \
      esac ; \
    done; \
  else true; fi; \
done
rm -f tmp-foo*
case "fastcompare" in *compare | *compare-lean ) stage=2 ;; * ) stage=`echo fastcompare | sed -e 's,^[a-z]*compare\([0-9][0-9]*\).*,\1 ,'` ;; esac; \
if [ -f .bad_compare ]; then \
  echo "Bootstrap comparison failure!"; \
  cat .bad_compare; \
  exit 1; \
else \
  case "fastcompare" in \
    *-lean ) rm -rf stage$stage ;; \
    *) ;; \
  esac; true; \
fi
make[1]: Leaving directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/gcc'
Building runtime libraries
make[1]: Entering directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10'
make[2]: Entering directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/libiberty'
make[3]: Entering directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/libiberty/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/libiberty/testsuite'
make[2]: Leaving directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/libiberty'
make[2]: Entering directory `/usr/usr/ready/gnu/tmp/GCC/4.0.1/Sol10/fixincludes'
gcc -c -g -O2  -DHAVE_CONFIG_H -I. -I/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes -I../include -I/usr/usr/ready/gnu/tmp/GCC/ 4.0.1/gcc-4.0.1/fixincludes/../include /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/fixincl.c
In file included from /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/system.h:226,
                 from /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/fixlib.h:30,
                 from /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/fixincl.c:24:
/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/../include/libiberty.h:118: warning: `__sentinel__' attribute directive ignored
/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/../include/libiberty.h:127: warning: `__sentinel__' attribute directive ignored
/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/../include/libiberty.h:133: warning: `__sentinel__' attribute directive ignored
/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/../include/libiberty.h:140: warning: `__sentinel__' attribute directive ignored
/usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/../include/libiberty.h:147: warning: `__sentinel__' attribute directive ignored
In file included from /usr/local/GCC/3.5-ex/bin/../lib/gcc/sparc-sun-solaris2.9/3.5.0/include/sys/signal.h:44,
                 from /usr/include/signal.h:26,
                 from /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/fixlib.h:31,
                 from /usr/usr/ready/gnu/tmp/GCC/4.0.1/gcc-4.0.1/fixincludes/fixincl.c:24:

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Building of fixincludes with 4.0.1 uses wrong gcc
  2005-08-21  5:40 Building of fixincludes with 4.0.1 uses wrong gcc h.michael.foerster
@ 2005-08-22 20:37 ` James E Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: James E Wilson @ 2005-08-22 20:37 UTC (permalink / raw)
  To: h.michael.foerster; +Cc: gcc

h.michael.foerster@nexgo.de wrote:
> 1. bootstrapping the gcc 4.0.1 under Sparc/Solaris I found that the
> building in "fixincludes" uses the gcc (with no PATH specification)
> instead of the xgcc build by the last stage. It may crash, it happens on
> my environment, because I've migrated from Solaris 9 to Solaris 10 where
> the includes are not compatible.

It looks like the attached file got chopped off, because I can't see
what the error message is.

There is a problem here, but not the one you suggested.  We can't use
the just built xgcc to build fixincludes, because gcc isn't a usable
compiler until after fixincludes has been built and run.  So we have to
use the host compiler, the same one used to build gcc.  Also,
fixincludes has to be built and run before we can bootstrap gcc.

So the problem here is that fixincludes is being built a second time,
after gcc has bootstraped, and it is being built with the wrong
compiler.  Presumably you used "cc" for the bootstrap?  If the installed
gcc is broken, then you wouldn't have been able to use it to bootstrap
gcc.  If so, cc should have also been used to build fixincludes.  It
would have been used the first time we built fixincludes, but the second
time we build fixincludes, we end up using "gcc" which is wrong.  I took
a quick look at the top level Makefile, but I don't see an obvious
reason why fixincludes is being built twice.  We probably should have a
bugzilla bug report for this.

Oh wait, I see the problem, the first time we build
all-build-fixincludes and the second time we build all-fixincludes.  We
have the same problem with libiberty.

By the way, you can fix your old sol9 gcc by rerunning fixincludes.  We
install a copy of it so it can be re-run after an OS update.  Find the
directory where the old gcc installed the cc1 file (e.g. gcc
--print-file-name=cc1) and then look in the install-tools directory.
Not all old gcc versions have this stuff though, so this only works with
some recent gcc versions.

> 2. A question: The gcc 4.0 uses the built-in specs. Is it correct, that
> a "specs" file will not be used as in the 2.x and 3.x versions of the gcc?

Sort of.

gcc has always had a builtin specs file.  By default, we dumped it to a
file and installed the file, just in case someone wanted to modify the
specs file.  But almost no one did, so most of the time this just made
gcc unnecessarily slower.

So now we changed the default so that the specs file is not installed.
So by default, we use the builtin specs.  You still have the option of
creating and installing a specs file, in case you want to modify it.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-22 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-21  5:40 Building of fixincludes with 4.0.1 uses wrong gcc h.michael.foerster
2005-08-22 20:37 ` James E Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).