The binaries available from here should serve as a start point only!
It is highly recommended to rebuild your own gcc from scratch using the versions available from here, because GNU gcc will create new include files from the ones available on your system, likely not to be the same as they are on mine. Note that more recent versions of GNU gcc are now depending on gmp, mpc, and mpfr, so building gcc got an awful lot more difficult than gcc-3. I gave up on PA-RISC.
There are also statistics on gcc downloads.
All gcc's available below include recent binutils and gdb, except for HP-UX 11.23 and HP-UX 11.31 (both are Itanium) which are unsupported for gdb, as gdb's configure shows:
ia64*-**-hpux*) # No gdb or ld support yet. noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld" ;;
Newer versions for gcc and/or binutils might be added here when they are released. I only make gcc's available for which the installation enabled me to build and test the most recent perl without errors.
For the PA-RISC architecture (HP-UX 11.00 and HP-UX 11.11 (11i),
32bit and 64bit objects do not mix. Period. This means that
you need a separate GNU gcc compilers to generate 32bit code and 64bit code.
For both it is advisable to pass the -mpa-risc-2-0
flag.
On Itanium, one compiler is capable of generating both 32bit objects,
which is the default, or 64bit objects, using the -mlp64
compiler
command line option. One can force 32bit objects with -milp32
.
The 3.4.3 version of gcc available in the download section includes binutils 2.15 and gdb-6.2.1. I know that by the time I uploaded the builds gdb-6.3 was already out, but I'm having trouble building recent gdb's in 64bit mode so I postpone those to later, where I either replace the current builds or include it in the next gcc builds.
The 4.0.1 and 4.0.2 versions of gcc available in the download section includes binutils 2.16.1 and gdb-6.3.
The 4.0.3 versions of gcc available in the download section includes binutils 2.16.1 (the 64bit tree has snapshot 20060311) and gdb-6.4.
The 4.1.0 version of gcc available in the download section includes binutils 2.16.1 and gdb-6.4.
I have trouble using GNU gcc 4.0.x in 64bit mode on development version of Perl on HP-UX 11i (11.11), and I'd advice you to install 3.4.6 if you are about to use 64bit and/or threads. GNU gcc version 4.0.3 does not show these problems, and should be safe.
GNU gcc 4.1.0 does NOT build out of the box in 64bit more on PA-RISC. The gcc folk blame binutils. Under investigation. When you want to walk that road, you need a cvs snapshot of binutils, and not use GNU ld.
Install it like this:
# cd /usr/local # bzip2 -d < /var/tmp/gcc-4.0.1-64-11.00-elf64.tbz | tar xf -
or from the depot:
# bzip2 -d /tmp/gcc-4.6.1-11.31.sd.bz # swinstall -s /tmp/gcc-4.1.6-11.31.sd gcc
And add /usr/local/pa20_64/bin
(for PA-RISC) or
/usr/local/ia64/bin
(for Itanium) to your $PATH
,
preferably in /etc/PATH
.
When your gcc starts complaining about size_t
, you have
probably installed a 11.00 build on a 11i machine. Choosing the correct
build is your key to success.
Here is an example for building gcc-3.4/64 on HP-UX 11.11 using gcc-3.3.3
64bit available below, installed on /usr/local/pa20_64 and GNU
utilities (like make, flex, and bison) available on
/usr/local/gnu/bin. Modify the latter to where these can be found. Extract
the source tarball to something that will look like gcc-3.4-20030820, and
then link 'ln -s gcc-3.4-20030820 src
' to enable below:
#!/usr/bin/sh export CONFIG_SITE= export CC="gcc -mpa-risc-2-0" export PATH=.:/usr/local/pa20_64/bin:/usr/local/gnu/bin export PATH=$PATH"":/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/opt/langtools/bin export PATH=$PATH"":/opt/imake/bin rm -rf obj mkdir obj cd obj ../src/configure \ --enable-languages=c,c++ \ --prefix=/usr/local/pa20_64 --with-local-prefix=/usr/local/pa20_64 \ --with-gnu-as --with-as=/usr/local/pa20_64/bin/as \ --with-gnu-ld --with-ld=/usr/local/pa20_64/bin/ld \ --disable-shared \ --disable-nls \ --host=hppa64-hp-hpux11.11 make bootstrap-lean make install
Will configure the latest source for
hppa64-hp-hpux11.11 using gcc-3.3.3 and builds it. make install
will overwrite the port made available from here. Get the shell snippets that
I use to build gcc here for 10.20 (32 bit
only), 11.00, or
11.11.
On Itanium (ia64), you will have to build - in this order - gmp, mprf, and mpc in both 64bit and 32bit builds. Install them on /usr/local/is64/lib/hpux64 and .../hpux32 resp. and when done, symlink the libs as installed in .../hpux32 to /usr/local/ia62/lib. In short ...
$ export BASE=`pwd` $ export ABI=64 CFLAGS=-mlp64 $ cd $BASE/gmp-5.0.2 $ configure --prefix=/usr/local/ia64 $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libgmp* hpux64/ $ ln -s hpux64/libgmp* . $ cd $BASE/mpfr-3.0.1 $ configure --prefix=/usr/local/ia64 --with-pic \ --with-gmp-include=/usr/local/ia64/include \ --with-gmp-lib=/usr/local/ia64/lib/hpux64 $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libmpfr* hpux64/ $ ln -s hpux64/libmpfr* . $ cd $BASE/mpc-0.8.2 $ configure --prefix=/usr/local/ia64 --with-pic \ --with-gmp-include=/usr/local/ia64/include \ --with-gmp-lib=/usr/local/ia64/lib/hpux64 \ --with-mpfr-include=/usr/local/ia64/include \ --with-mpfr-lib=/usr/local/ia64/lib/hpux64 \ $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libmpc* hpux64/ $ ln -s hpux64/libmpc* . $ export ABI=32 CFLAGS=-milp32 $ cd $BASE/gmp-5.0.2 $ make distclean $ configure --prefix=/usr/local/ia64 $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libgmp* hpux32/ $ ln -s hpux32/libgmp* . $ cd $BASE/mpfr-3.0.1 $ make distclean $ configure --prefix=/usr/local/ia64 --with-pic \ --with-gmp-include=/usr/local/ia64/include \ --with-gmp-lib=/usr/local/ia64/lib/hpux32 $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libmpfr* hpux32/ $ ln -s hpux32/libmpfr* . $ cd $BASE/mpc-0.8.2 $ make distclean $ configure --prefix=/usr/local/ia64 --with-pic \ --with-gmp-include=/usr/local/ia64/include \ --with-gmp-lib=/usr/local/ia64/lib/hpux32 \ --with-mpfr-include=/usr/local/ia64/include \ --with-mpfr-lib=/usr/local/ia64/lib/hpux32 \ $ make ; make check ; make install $ cd /usr/local/ia64/lib $ mv libmpfr* hpux32/ $ ln -s hpux32/libmpfr* .
Now that all dependencies are built, tested, installed and available, you should be able to build gcc (using gcc):
$ export PREFIX=/usr/local/ia64 $ export CONFIG_SITE= $ export CC="gcc -fPIC" $ export CFLAGS="-fPIC" $ export CXXFLAGS="-fPIC" $ export PATH=.:$PREFIX/bin:/pro/local/bin $ export PATH=$PATH"":/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/opt/langtools/bin $ export PATH=$PATH"":/opt/imake/bin $ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-/usr/lib:/usr/lib/hpux64}:/usr/local/ia64/lib/hpux64:/usr/local/ia64/lib/hpux32:/usr/local/ia64/lib/hpux $ rm -rf obj $ mkdir obj $ cd obj $ ../gcc-4.6.1/configure \ --enable-languages=c,c++ \ --prefix=$PREFIX --with-local-prefix=$PREFIX \ --with-gnu-as --with-as=$PREFIX/bin/as \ --with-gmp=$PREFIX \ --with-mpfr=$PREFIX \ --disable-shared \ --disable-nls $ make -j2 $ make install
All versions will be installed under /usr/local. To build
gcc you will need at least bison
and flex
.
© H.Merijn Brand [ 13 Apr 2015 ] |