successful build of gcc 4.0.1 on i686-pc-cygwin, cohexist with gcc 3.4.1

2005-07-14 Thread Paolo Greppi
/gcc/4.0/gcc-4.0.1/config.guess
i686-pc-cygwin

$ /work/install/bin/gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /gcc/4.0/gcc-4.0.1/configure --verbose
--prefix=/work/install --exec-prefix=/work/install --sysconfdir=/work/i
nstall/etc --libdir=/work/install/lib --libexecdir=/work/install/lib
--mandir=/work/install/man --infodir=/work/install/info --
enable-languages=c,c++ --enable-nls --without-included-gettext
--with-system-zlib --disable-interpreter --enable-threads=posix
--enable-sjlj-exceptions --disable-version-specific-runtime-libs
--disable-win32-registry
Thread model: posix
gcc version 4.0.1


Additional info:
OS = WinXP Pro SP2
The cygwin version was 1.5.8.
The original gcc release was 3.4.1.
The orginal gcc -v output was:

$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.1/specs
Configured with: /gcc/3.4/gcc-3.4.1-1/configure --verbose --prefix=/usr
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,f77,java,objc --enable-nls
--without-included-gettext --enable-libgcj --with-system-zlib
--enable-interpreter --enable-threads=posix --enable-java-gc=boehm
--enable-sjlj-exceptions --disable-version-specific-runtime-libs
--disable-win32-registry 
Thread model: posix
gcc version 3.4.1 (cygming special)

The exact sequence of steps involved in bootstrapping was:

bzip2 -d /gcc-4.0.1.tar.bz2
mkdir /gcc 
mkdir /gcc/4.0
cd /gcc/4.0
tar xvf /gcc-4.0.1.tar
mkdir /work
mkdir /work/install 
mkdir /work/install/etc 
mkdir /work/install/lib 
mkdir /work/install/man 
mkdir /work/install/info 
mkdir /objdir
cd /objdir
/gcc/4.0/gcc-4.0.1/configure --verbose --prefix=/work/install
--exec-prefix=/work/install --sysconfdir=/work/install/etc
--libdir=/work/install/lib --libexecdir=/work/install/lib
--mandir=/work/install/man --infodir=/work/install/info
--enable-languages=c,c++ --enable-nls --without-included-gettext
--with-system-zlib --disable-interpreter --enable-threads=posix
--enable-sjlj-exceptions --disable-version-specific-runtime-libs
--disable-win32-registry
make bootstrap
make install
make html

gcc unbzip2ped is 200 MB
objdir at the end is 350 MB
the process takes about 1 h

The original gcc 3.4.1 shipped with cygwin is now available on my system
with:
gcc -o hello.exe hello.c

The 4.0.1 compiler can be invoked with:
/work/install/bin/gcc 

Paolo Greppi
http://www.3ip.it



successful build of gcc 4.0.1 on Mac OSX 10.2.8

2005-07-17 Thread Paolo Greppi
% ../gcc-4.0.1/config.guess
powerpc-apple-darwin6.8

% /usr/local/bin/g++-4.0.1 -v
Using built-in specs.
Target: powerpc-apple-darwin6.8
Configured with: ../gcc-4.0.1/configure --program-suffix=-4.0.1
--enable-languages=c,c++ --enable-threads=posix : (reconfigured)
../gcc-4.0.1/configure --program-suffix=-4.0.1 --enable-languages=c,c++
--enable-threads=posix : (reconfigured) ../gcc-4.0.1/configure
--program-suffix=-4.0.1 --enable-languages=c,c++ --enable-threads=posix
Thread model: posix
gcc version 4.0.1

% uname -a
Darwin TOANUJU.local. 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT
2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc


Additional info:
OS = Mac OSX 10.2.8 (Jaguar)
The original gcc release was 3.1
The orginal gcc -v output was:

% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1151, based on gcc version 3.1 20020420
(prerelease)

The exact sequence of steps involved in bootstrapping was:


bzip2 -d /gcc-4.0.1.tar.bz2
tar xvf /gcc-4.0.1.tar
mkdir /work
mkdir /work/install
mkdir /work/install/etc
mkdir /work/install/lib
mkdir /work/install/man
mkdir /work/install/info
mkdir /objdir
cd /objdir
../gcc-4.0.1/configure --program-suffix=-4.0.1 --enable-languages=c,c++
--enable-threads=posix
make bootstrap 
sudo make install 

There are some errors while compiling:

1) While building "../../gcc-4.0.1/fixincludes" it says: This target
requires an assembler supporting ".machine"
you can get it from:
ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg
2) While building ../../gcc-4.0.1/gcc/ggc-common.c it says storage size of
`rlim' isn't known
comment this:
  // struct rlimit rlim;
3) While compiling ../../gcc-4.0.1/gcc/toplev.c -o toplev.o it says storage
size of `rlim' isn't known and `RLIMIT_CORE' undeclared (first use in this
function)
#undef HAVE_SETRLIMIT
4) While compiling ../../gcc-4.0.1/gcc/gcc.c it says `prus' has an
incomplete type and `RUSAGE_CHILDREN' undeclared (first use in this
function)
#undef HAVE_GETRUSAGE
5) While Making all in testsuiteit says conversion from '__gnu_test::semun'
to non-scalar type 'semun' requested
#undef _GLIBCXX_SYSV_SEM


Paolo Greppi
http://www.3ip.it