Here’s the build flags I used for building a 64-bit GCC for Solaris 9 (using Sun’s Forte C compiler). This uses the GNU binutils ld and as.

export GCC_EXEC_PREFIX=
export LD_LIBRARY_PATH=

 cd build;
        test -d gcc-4.0.2 || gtar -jxvf ../src/gcc-4.0.2.tar.bz2
        test -d objdir && rm -rf objdir 
        mkdir objdir
        cd objdir
                CC="cc -xarch=v9" ../gcc-4.0.2/configure  \
                        --prefix=/apps/gcc/4.0.2 \
                        --enable-languages=c,c++ \
                        --with-ld=/apps/binutils/stable/bin/ld \
                        --with-as=/apps/binutils/stable//bin/as \
                        --enable-threads=posix \
                        --disable-shared \
                        --enable-multilib
                while ! gmake -j16 bootstrap MAKE=gmake BOOT_CFLAGS="-g -O2 -m64"; do
                        true;
                done

Comments are closed.