Successful make profiledbootstrap of GCC 4.4.2 on Snow Leopard 10.6.2 x86_64-apple-darwin10.2.0

2009-12-16 Thread Olexa Bilaniuk
This is to report a successful build of GCC 4.4.2 on my laptop.

./config.guess:

i386-apple-darwin10.2.0

gcc -v:

Using built-in specs.
Target: x86_64-apple-darwin10.2.0
Configured with: ../gcc-4.4.2/configure
--prefix=/Users/*/Documents/MyApps/Commands/GCC/MacOSX
--with-pkgversion="GNU GCC 4.4.2 Codename Lord of Compilers built Dec.
14, 2009 with GMP 4.3.1, MPFR 2.4.2, MPC 0.8.1 and Libelf 0.8.13,
bootstrapped by GCC 4.4.2 Codename Optimised Bootstrapper "
--with-libelf=/Users//Documents/MyApps/Commands/GCC/Dependencies//libelf-0.8.13
--enable-lto 
--with-mpc=/Users/*/Documents/MyApps/Commands/GCC/Dependencies//mpc-0.8.1
--with-mpfr=/Users/*/Documents/MyApps/Commands/GCC/Dependencies//mpfr-2.4.2
--with-gmp=/Users/*/Documents/MyApps/Commands/GCC/Dependencies//gmp-4.3.1
--enable-shared --enable-static --target=x86_64-apple-darwin10.2.0
--build=x86_64-apple-darwin10.2.0 --host=x86_64-apple-darwin10.2.0
--enable-threads --enable-languages=c,c++,fortran,objc,obj-c++
--enable-werror --enable-gather-detailed-mem-stats --with-tune=core2
Thread model: posix
gcc version 4.4.2 (GNU GCC 4.4.2 Codename Lord of Compilers  built
Dec. 14, 2009 with GMP 4.3.1, MPFR 2.4.2, MPC 0.8.1 and Libelf 0.8.13,
bootstrapped by GCC 4.4.2 Codename  Optimised Bootstrapper)

Timings of build (was built with  profiledbootstrap-built GCC 4.4.2
compiled only with C, environnement variables CC="gcc -g -O3
-fno-omit-frame-pointer"):

time make profiledbootstrap
...

real    339m16.074s
user    93m54.877s
sys    13m30.623s

NB: There was a 4-hour (240 minutes) period during which the computer
was asleep and did not contribute any CPU cycles. The build time was
indeed closer to "user" than "real" - about 100 minutes or so.

Other relevant information:

uname -a:

Darwin *-**-MacBook.local 10.2.0 Darwin Kernel Version
10.2.0: Tue Nov  3 10:37:10 PST 2009;
root:xnu-1486.2.11~1/RELEASE_I386 i386

System Specs:

MacBook6,1 (Late 2009) Standard Configuration
Mac OS X 10.6.2
Intel Core 2 Duo 2.26 GHz
2GB DDR3 1066 MHz RAM
Xcode 3.2.1 (GCC 4.2.1 (1), Apple Inc.)

Bootstrap options:

I built a special GCC 4.4.2 from source with Xcode's default gcc 4.2.1
and all optimisation to maximum (CC="gcc -g -O3
-fno-omit-frame-pointer") and time make profiledbootstrap called
Optimised Bootstrapper . I then used the same options to build this
full version of GCC 4.4.2 and again issued time make
profiledbootstrap. The timings may not be fair because of optimisation
and the use of a highly optimised bootstrap gcc build, but the timings
are provided above. Optimised Bootstrapper took just under an hour to
build, with no native language support and only the C compiler
(because that's the only thing needed for bootstrapping GCC).

Request for update to system-specific installation instructions:

I am on Mac OS X Snow Leopard. There has been some noise around the
forums that GCC fails for various reasons. It turns out that despite
having all the requirements to run 64-bit systems, including a 64-bit
processor (an Intel Core 2 Duo), no Macs boot the 64-bit kernel by
default and only 4 (These being Mac Pros, Xserves, Macbook Pros and
iMacs) are allowed to boot it at all, leaving that the system kernel
runs 32-bit, but almost every application is 64-bit. Also, the command
uname returns i386 despite the Core 2 Duo being more of a i686 or
x86_64, a 64-bit processor. It seems therefore that config.guess
confuses itself in bitness, picking the 32-bit version called i386
rather than the correct choice, x86_64. So the recommendation is to
add an entry under Build Stats saying that 4.4.2 under
x86_64-apple-darwin10.2.0 is successful, and to add to the
system-specific installation notes to add these options to the
configure:

--host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10
--host=x86_64-apple-darwin10 --with-tune=[core2 | generic | i686]

This essentially forces configure to choose the 64-bit flavour. I
selected core2 because I am not compiling executables for any other
processors - Macs have all switched to either Core 2 Duo, Core 2 Quad
or, in high-ends, to Intel Xeon, Nehalem architecture.


Successful make profiledbootstrap of GCC 4.4.3 and GCC 4.5.0 (SVN revision 156177) on Snow Leopard 10.6.2 x86_64-apple-darwin10.2.0

2010-01-24 Thread Olexa Bilaniuk
This is to report a successful build of GCC 4.4.3 and GCC 4.5.0
(156177) on my Macbook6,1.


./config.guess:

i386-apple-darwin10.2.0

gcc -v:

For GCC 4.4.3:

Using built-in specs.
Target: x86_64-apple-darwin10.2.0
Configured with: ../gcc-4.4.3/configure
--prefix=/Users/olexa/Documents/MyApps/Commands/GCC/MacOSX-stable
--with-pkgversion='GNU GCC 4.4.3 Codename Hallelujah GCC built Jan 21,
2009 with GMP 4.3.2, MPFR 2.4.2, MPC 0.8.1 and Libelf 0.8.13,
bootstrap by GNU GCC 4.4.3 Codename Bootstrapper GCC'
--with-libelf=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/libelf
--enable-lto 
--with-mpc=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/mpc
--with-mpfr=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/mpfr
--with-gmp=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/gmp
--enable-shared --enable-static --target=x86_64-apple-darwin10.2.0
--build=x86_64-apple-darwin10.2.0 --host=x86_64-apple-darwin10.2.0
--enable-threads --enable-languages=c,c++,fortran,objc,obj-c++
--enable-werror --enable-checking --enable-stage1-checking
--disable-nls --disable-build-with-cxx
--enable-gather-detailed-mem-stats --enable-decimal-float
--with-tune=core2 CC='gcc -O3' CPPFLAGS=-O3
Thread model: posix
gcc version 4.4.3 (GNU GCC 4.4.3 Codename Hallelujah GCC built Jan 21,
2009 with GMP 4.3.2, MPFR 2.4.2, MPC 0.8.1 and Libelf 0.8.13,
bootstrap by GNU GCC 4.4.3 Codename Bootstrapper GCC)

For GCC 4.5.0 revision 156177:

Using built-in specs.
COLLECT_GCC=./gcc
COLLECT_LTO_WRAPPER=/Users/olexa/Documents/MyApps/Commands/GCC/MacOSX-instable/libexec/gcc/x86_64-apple-darwin10.2.0/4.5.0/lto-wrapper
Target: x86_64-apple-darwin10.2.0
Configured with: ../gcc-svn-156177/configure
--prefix=/Users/olexa/Documents/MyApps/Commands/GCC/MacOSX-instable
--with-pkgversion='GNU GCC (4.5.0 - SVN revision 156177) Codename
Mjolnir built Jan 22, 2009 with GMP 4.3.2, MPFR 2.4.2, MPC 0.8.1 and
Libelf 0.8.13, bootstrap by GNU GCC 4.4.3 Codename Hallelujah GCC'
--with-libelf=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/libelf
--disable-lto 
--with-mpc=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/mpc
--with-mpfr=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/mpfr
--with-gmp=/Users/olexa/Documents/MyApps/Commands/GCC/Dependencies/gmp
--enable-shared --enable-static --target=x86_64-apple-darwin10.2.0
--build=x86_64-apple-darwin10.2.0 --host=x86_64-apple-darwin10.2.0
--enable-threads --enable-languages=c,c++,fortran,objc,obj-c++
--enable-werror --enable-checking --enable-stage1-checking
--disable-nls --disable-build-with-cxx
--enable-gather-detailed-mem-stats --enable-decimal-float
--with-tune=core2
Thread model: posix
gcc version 4.5.0 20100122 (experimental) (GNU GCC (4.5.0 - SVN
revision 156177) Codename Mjolnir built Jan 22, 2009 with GMP 4.3.2,
MPFR 2.4.2, MPC 0.8.1 and Libelf 0.8.13, bootstrap by GNU GCC 4.4.3
Codename Hallelujah GCC)


Other relevant information:

uname -a:

Darwin *-**-MacBook.local 10.2.0 Darwin Kernel Version
10.2.0: Tue Nov  3 10:37:10 PST 2009;
root:xnu-1486.2.11~1/RELEASE_I386 i386

System Specs:

MacBook6,1 (Late 2009) Standard Configuration
Mac OS X 10.6.2
Intel Core 2 Duo 2.26 GHz
2GB DDR3 1066 MHz RAM
Xcode 3.2.1 (GCC 4.2.1 (1), Apple Inc.)


Request for update to system-specific installation instructions:

I am on Mac OS X Snow Leopard. There has been some noise around the
forums that GCC fails for various reasons. It turns out that despite
having all the requirements to run 64-bit systems, including a 64-bit
processor (an Intel Core 2 Duo), no Macs boot the 64-bit kernel by
default and only 4 (These being Mac Pros, Xserves, Macbook Pros and
iMacs) are allowed to boot it at all, leaving that the system kernel
runs 32-bit, but almost every application is 64-bit. Also, the command
uname returns i386 despite the Core 2 Duo being more of a i686 or
x86_64, a 64-bit processor. It seems therefore that config.guess
confuses itself in bitness, picking the 32-bit version called i386
rather than the correct choice, x86_64. So the recommendation is to
add an entry under Build Stats saying that 4.4.3 under
x86_64-apple-darwin10.2.0 is successful, and to add to the
system-specific installation notes to add these options to the
configure:

--host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10
--host=x86_64-apple-darwin10

This essentially forces configure to choose the 64-bit flavour. I
selected core2 because I am not compiling executables for any other
processors - Macs have all switched to either Core 2 Duo, Core 2 Quad,
or, in high-ends, to i5 and i7 with Intel Xeon or Nehalem
architecture.

I experienced problems with --enable-lto, bizarrely, so I had to turn
it off, with --disable-lto. This goes both for 4.4.3 and 4.5.0.


Successful profiledbootstrap with some hiccups of GCC 4.6.0 (SVN rev. 168186) and GCC 4.5.2 (release) on Mac OS X 10.6.5 (x86_64-apple-darwin10)

2010-12-26 Thread Olexa Bilaniuk
This is to report that GCC 4.6.0 (SVN revision 168186) and GCC 4.5.2
(release) profiledbootstrap 's successfully on a Macbook6,1 with Intel
Core 2 Duo Penryn P7550 2.26GHz and 4GB 1067MHz DDR3 RAM running Mac
OS X 10.6.5 in 387 minutes, 28 seconds and 392 minutes, 14 seconds.
There were some minor problems that might qualify as bugs.

***

The bootstrap of GCC 4.6.0 (SVN revision 168186) itself was performed
by GNU GCC 4.5.1 (not the GCC with which Xcode comes bundled), using
the configure flags

../gcc-svn-168186/configure --prefix=$GCCLOC/MacOSX-instable
--with-pkgversion="GNU GCC (4.6.0 - SVN revision 168186) Codename
Múspellsheimr GCC built Dec 25, 2010 with GMP 5.0.1, MPFR 3.0.0, MPC
0.8.2 and Libelf 0.8.13, bootstrap by GNU GCC 4.5.1 Codename Uppsala
III GCC" --with-libelf=$DEPEND/libelf --enable-lto
--with-mpc=$DEPEND/mpc --with-mpfr=$DEPEND/mpfr --with-gmp=$DEPEND/gmp
--enable-shared --enable-static --target=x86_64-apple-darwin10
--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--enable-threads --enable-languages=c,c++,java,fortran,objc,obj-c++
--enable-libgcj --enable-libjava --enable-java-net --enable-jvmpi
--enable-libgcj-bc --with-libffi --enable-werror --enable-checking
--enable-stage1-checking --disable-nls --disable-build-with-cxx
--enable-gather-detailed-mem-stats --enable-decimal-float
--with-tune=core2 CC="gcc -O3" CPPFLAGS="-O3"

with $GCCLOC indicating the install location and $DEPEND the location
of the dependencies, and was bootstrapped with

make profiledbootstrap

There is, however, a small hiccup, and I hesitate to post this in
bugs, because I am not sure if I myself am mistaken. In the source
tree, at gcc/ggc-common.c, line 949, in the function
ggc-record-overhead, I had to make a small change:

gcc_assert (slot!=NULL); /* Switched from gcc_assert (!*slot);
because this is possibly an error */

I understand the intent here was to compare the pointer to NULL before
dereferencing it, possibly basing oneself on the most common
representation of NULL (the integer 0 cast to void *), but the
(!*slot) comparison broke the build on my system. After some digging,
I settled on (slot!=NULL) and GCC bootstrapped itself just fine. I
also understand that this code only ought to execute if
--enable-gather-detailed-mem-stats is selected (Which it is in my
configure-time flags), but this is still worth correcting. From what I
remember, this mistake has been present since at least revision
166644, and it probably goes back a long time further back than that.

***

The bootstrap of GCC 4.5.2 was performed by the same GNU GCC 4.5.1 as
above, using the configure flags

../gcc-4.5.2/configure --prefix=$GCCLOC/MacOSX-stable
--with-pkgversion="GNU GCC 4.5.2 Codename Aesir GCC built Dec. 26,
2010 with GMP 5.0.1, MPFR 3.0.0, MPC 0.8.2 and Libelf 0.8.13,
bootstrap by GNU GCC 4.5.1 Codename Uppsala III GCC"
--with-libelf=$DEPEND/libelf --enable-lto --with-mpc=$DEPEND/mpc
--with-mpfr=$DEPEND/mpfr --with-gmp=$DEPEND/gmp --enable-shared
--enable-static --target=x86_64-apple-darwin10
--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--enable-threads --enable-languages=c,c++,java,fortran,objc,obj-c++
--enable-libgcj --enable-libjava --enable-java-net --enable-jvmpi
--enable-libgcj-bc --with-libffi --enable-werror --enable-checking
--enable-stage1-checking --disable-nls --disable-build-with-cxx
--enable-gather-detailed-mem-stats --enable-decimal-float
--with-tune=core2 CC="gcc -O3" CPPFLAGS="-O3"

with $GCCLOC indicating the install location and $DEPEND the location
of the dependencies, and was bootstrapped with

make profiledbootstrap

The issue with ggc-record-overhead discussed above is also present in
GCC 4.5.2, but not in GCC 4.5.1 (which I successfully bootstrapped
with the same configure-time flags) and I have
gcc-4.5.2/gcc/ggc-common.c corrected too. Nevertheless, I was faced
with this printout:

cc1: warnings being treated as errors
../../gcc-4.5.2/gcc/tree-vect-stmts.c: In function 'vectorizable_operation':
../../gcc-4.5.2/gcc/tree-vect-stmts.c:2253:8: error: unused
variable 'scalar_shift_arg'
../../gcc-4.5.2/gcc/tree-vect-stmts.c:2252:16: error: unused variable 'k'
../../gcc-4.5.2/gcc/tree-vect-stmts.c:2239:21: error: unused
variable 'optab_op2_mode'

So I acted on them and commented out their declaration. The bootstrap
then finished normally.

***

In conclusion, this is the first time in my memory that GCJ compiled
cleanly on Mac OS X - previously it would fail for a number of
reasons. Congratulations, and keep up the good work!

Thank you for reading this report.