Pen-Yuan Hsing wrote:
I've been trying to compile, build, and install GCC 4.4.2 in my installation of 
OpenSolaris 2009.06 ...
I wouldn't try to build gcc to install in /usr/gnu
as there could be conflicts with bundled software.
I set my build to install in /usr/local.

// download, build, install gmp-4.3.1 in /usr/local
$ cd /export/src/gmp/gmp-4.3.1
$ ./configure
$ gmake
$ gmake check
$ pfexec gmake install

// download, build, install mpfr-2.4.1 in /usr/local
$ cd /export/src/mpfr/mpfr-2.4.1
$ ./configure --with-gmp=/usr/local
$ gmake
$ pfexec gmake install

// hack to get configure for gcc to work when doing grep
$ mkdir $HOME/hack
$ cp /usr/sfw/bin/ggrep $HOME/hack/grep

// download, build, install gcc 4.4.2 in /usr/local
$ cd /export/src/gcc/gcc-4.4.2
$ export PATH=$HOME/hack:$PATH
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

$ ./configure --enable-shared \
--disable-multilib \
--disable-nls \
--with-gmp=/usr/local \
--with-mpfr=/usr/local \
--enable-languages=c,c++,fortran \
--enable-bootstrap \
--with-cpu=opteron \
--with-gnu-as --with-as=/usr/sfw/bin/gas \
--with-ld --with-ld=/usr/ccs/bin/ld \
LDFLAGS="-L/usr/local/lib -R/usr/local/lib" \
LD_RUN_PATH="/usr/local/lib"

$ export LD_RUN_PATH=/usr/local/lib
$ gmake -j24 bootstrap
$ pfexec gmake install

$ /usr/local/bin/gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ./configure --enable-shared --disable-multilib --disable-nls --with-gmp=/usr/local --with-mpfr=/usr/local --enable-languages=c,c++,fortran --enable-bootstrap --with-cpu=opteron --with-gnu-as --with-as=/usr/sfw/bin/gas --with-ld --with-ld=/usr/ccs/bin/ld LDFLAGS='-L/usr/local/lib -R/usr/local/lib' LD_RUN_PATH=/usr/local/lib
Thread model: posix
gcc version 4.4.2 (GCC)
$


_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to