Subject: Trying to upgrade gcc, the hard way, help appreciated
To: None <tech-toolchain@netbsd.org>
From: Bucky Katz <bucky@picovex.com>
List: tech-toolchain
Date: 08/30/2007 14:13:05
The head of our library team, who has been investigating our GCC
issues, would like us to use the same release of GCC for our NetBSD
builds that we use for our standalone builds.

This has led to our trying to follow two suggested paths, one here,
and one offered in IRC, towards using a more recent update of GCC in
place of the GCC in the netbsd-4 tree.

We'd like help on figuring out what we're doing wrong on either path:

1) "Replace GCC in the tree."

David, the head of the library team, is trying to do the exercise of
upgrading gcc in place.  He has figured out how to diff and merge the
gcc sources so that he has a rlease version of 4.1.2 merged into the
netbsd-4 tree, but that is failing because c++ won't build when we try
to make a distribution with build.sh. He has, today, discovered 
src/tools/gcc/README.mknative and is off trying to make that work.
What other surprises will he encounter?


2) "Build out of tree"

I've tried this, with recommendations from Matt Thomas, by setting

EXTERNAL_TOOLCHAIN=/usr/local/armdev-926ej-s-4.2.1
MACHINE_GNU_PLATFORM=arm-elf

in mk.conf and trying the build.  (armdev-926ej-s-4.2.1 is a 'straight
from FSF' 4.2.1 release that we build as an arm cross compiler)

This fails when using build.s to make a distribution because it is
unhappy about some floating point stuff. Here's a log extract:

#    create  libc/infinityl_dbl_ieee754.d
CC=/usr/local/armdev-926ej-s-4.2.1/bin/arm-elf-gcc
/space/projects/ec/branches/m
ainline/platform/netbsd/evbarm/armv5t/tools/bin/nbmkdep -f
infinityl_dbl_ieee754
.d --      -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -DHESIOD
-DINET6 -DNL
S -DYP
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc/inclu
de -I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc
-DSOFTFLO
AT
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc/arch/arm/
softfloat
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc/so
ftfloat -DSOFTFLOAT_FOR_GCC
-I/space/projects/ec/branches/mainline/platform/netb
sd/src/sys
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc/c
ompat/stdlib
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc
/compat/../stdlib
-I/space/projects/ec/branches/mainline/platform/netbsd/src/lib
/libc/../../common/lib/libc/quad
-I/space/projects/ec/branches/mainline/platform
/netbsd/src/lib/libc/../../common/lib/libc/string
-I/space/projects/ec/branches/
mainline/platform/netbsd/src/lib/libc/../../common/lib/libc/arch/arm/string
-D__
DBINTERFACE_PRIVATE -DI18NMODULE_MAJOR=4 -DCITRUS
-I/space/projects/ec/branches/
mainline/platform/netbsd/src/libexec/ld.elf_so
-I/space/projects/ec/branches/mai
nline/platform/netbsd/src/lib/libc/dlfcn
-I/space/projects/ec/branches/mainline/
platform/netbsd/src/lib/libc/gdtoa -DNO_FENV_H
-I/space/projects/ec/branches/mai
nline/platform/netbsd/src/lib/libc/arch/arm/gdtoa -DCITRUS_ICONV
-DWITH_RUNE -I/
space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc
-DPOSIX_MISTAKE
 -DCOMPAT__RES -DUSE_POLL -DPORTMAP -DWIDE_DOUBLE -DALL_STATE
 -DUSG_COMPAT   -no
stdinc -isystem
/space/projects/ec/branches/mainline/platform/netbsd/evbarm/armv
5t/dest/usr/include
/space/projects/ec/branches/mainline/platform/netbsd/src/li
b/libc/gen/infinityl_dbl_ieee754.c
/space/projects/ec/branches/mainline/platform/netbsd/src/lib/libc/gen/infinityl_
dbl_ieee754.c:13:2: error: #error double / long double mismatch


Any help?

Thanks,

Bucky