Next
Previous
Contents
The GNU gcc rpm is the most important rpm package which you should create after
successfully creating rpm of RPM package.
In order to create GNU gcc rpm package, you need to install rpms, unix pkgs or
manual configure and install the following (given in order of dependency) :
- texinfo
- patch
- zlib and zlib-devel
- fileutils >= 4.0.41
- m4 >= 1.1 (autoconf needs this)
- autoconf
- bison
- binutils >= 2.9.1.0.25
- gas, as, ld which are in binutils
- cpp - manual install gcc
- gawk
- shutils - for 'id' command
- pthreads - Posix threads library
You should download the tar.gz files or
Unix packages
. I downloaded solaris packages for texinfo.pkd, fileutils.pkg,
patch.pkg, libtool.pkg, gcc and others.
If you download tar.gz source file then you should install them in a temporary
location like $HOME/localtmp
bash# mkdir $HOME/localtmp
bash# cd $HOME/localtmp
bash# gzip -d libtool*.tar.gz
bash# tar -xvf libtool*.tar
bash# ./configure --with-prefix=$HOME/localtmp
bash# make; make install
You should include the temporary location of autoconf by:
bash# PATH=$HOME/localtmp/bin:$PATH
bash# export PATH
Now you are ready to build gcc rpm:
bash# rpm -i gcc*.src.rpm
bash# cd /usr/local/src/redhat/SPECS
bash# rpm -ba gcc*.spec
On Solaris 2.8 I had to make few changes to gcc*.spec file:
- In %build section :
Insert --enable-hacker-mode option for configure command.
This is to correct error
- "This configuration not supported in solaris 2.8".
If --enable-hacker-mode option does not work then you may have to
comment out gcc_targetplatform within the code %ifarch sparc .... %endif,
just before the configure command.
- In %build section :
For the configure command comment out %{_target_platform}, if configure fails.
- In %install section: Comment out numprocs = $(getconf _NPROCESSORS)
and put numprocs=1. Since my box had 2 cpus I put numprocs=2. The solaris has /usr/bin/getconf
which is different from GNU getconf in glibc.
Setup shared lib in solaris:
solaris# cd /var/ld
solaris# man ld.so.1
solaris# man crle
solaris# crle < hit return to see config info>
solaris# crle /usr/lib:/usr/local/lib:/usr/local/pgsql/lib:/usr/local/BerkeleyDB.3.1/lib
You can download the source code rpm for sparc from
sparc-gcc
or go to
http://www.rpmfind.net and type sparc in the search field.
You can also download sparc-glibc, sparc-kernel-headers and sparc-binutils source rpms.
solaris# rpm -i sparc-gcc*.src.rpm
solaris# cd /usr/local/src/redhat/SPECS
solaris# rpm -ba sparc-gcc.spec
You may want to edit sparc-binutils.spec and
in %install section: Comment out numprocs = $(getconf _NPROCESSORS)
and put numprocs=1. Since my box had 2 cpus I put numprocs=2. The solaris has /usr/bin/getconf
which is different from GNU getconf in glibc. Also change %files section change
%doc /usr/man/man1/sparc-linux-ld.1.gz to
%doc /usr/man/man1/sparc-linux-ld.1.
The PowerPC arch rpms are at
http://penguinppc.org.
If configure complains that your platform is not supported, then
you may want to edit glibc.spec file and in %configure section
put --enable-hacker-mode,
For Solaris there is ready-made sparc-glibc*.src.rpm from
sparc-gcc
or go to
http://www.rpmfind.net and type sparc in the search field.
The glibc needs the sparc-kernel-headers*.rpm which you can get from
sparc-gcc.
Next
Previous
Contents