Solaris by default comes with gcc 3.4.3 and binutils 2.15. Follow the following steps to build gcc 4.1.2 on solaris 10:
PreBuild:
- Use ksh shell
- export CONFIG_SHELL=/usr/bin/ksh
- Copy/Create links to all gnu tools into one directory and remember to remove letter 'g' from the prefix of the name of executable.
- export PATH=/Mytools/binutils_2_18/bin:/gnutools:/sbin:/bin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin
- export CC="/usr/sfw/bin/gcc -fPIC"
- export CXX="/usr/sfw/bin/g++ -fPIC"
Build:
- Install/Build gnu binutils version 2.18 using gcc 3.4.3(available in solaris by default).
- cd gcc_source_dir
- mkdir objdir && cd objdir
- ../configure --with-gnu-as --with-as=/binutils_2_18/bin/as --with-gnu-ld --with-ld=/binutils_2_18/bin/ld --prefix=$PREFIX --enable-threads=posix --enable-checking=release --with-system-zlib --enable-shared --disable-symvers --enable-languages=c,c++
- gmake #referring to gnu make
- gmake install
No comments:
Post a Comment