This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Installing EGCS and BINUTILS together


There have been several questions posted here regarding configuring
EGCS with GLD and GAS.  There are always answers too, so this is by no
means an open question.  Nonetheless, I have accomplished this
configuration in a very straightforward way by installing the egcs
distribution right on top of the binutils distribution, configuring,
compiling and installing.  The configuration/make process recognizes
that the binutils are present and compiles and installs them right
along with gcc.

I am sure that many of the people reading this already know that this
will work.

This was more or less suggested to me by Joe Buck <jbuck@Synopsys.COM>
who added the following important caution:
> HOWEVER: you're taking a risk if you do that, since the "official"
> versions were built in a tree that contains an older libiberty and other
> minor differences.  Please don't confuse others by giving them the
> resulting binaries and telling them you've given them, say, gas 2.9.1,
> since you've given them something that may be slightly different.  Also,
> since gas and gld don't change every week like snapshots do, you might not
> want to keep rebuilding them.

Briefly, I do this to make the source tree:
  gzip -cd binutils-2.9.1.tar.gz | tar xvf -
  mv binutils-2.9.1 egcs-1.1a
  gzip -cd egcs-1.1a.tar.gz | tar xvf -
then configure with --with-gnu-as and --with-gnu-ld and whatever else.
Some files are overwritten by the second tar.

My full fetch/untar/config/compile/install script is below if you want
more details.

I have used this scheme on Solaris 2.5 and HP-UX 10.20 with eggc-1.1a
and binutils-2.9.1.  Of course, on the HP, gld is not used.  I have
not noticed any problems with the compiler, however, I have not run
the testsuite

Fred Wheeler

#!/bin/sh
if [ ! -f /home/wheeler/usr/download/egcs-1.1a.tar.gz ]; then
  wget -O /home/wheeler/usr/download/egcs-1.1a.tar.gz ftp://cambridge.cygnus.com/pub/egcs/releases/egcs-1.1a/egcs-1.1a.tar.gz
fi
chmod ugo-wx /home/wheeler/usr/download/egcs-1.1a.tar.gz

if [ -d /home/wheeler/usr/stow/egcs-1.1a ]; then
  chmod -R u+w /home/wheeler/usr/stow/egcs-1.1a
fi

cd /home/wheeler/usr/stow
mkdir source-solaris-egcs-1.1a
cd source-solaris-egcs-1.1a
gzip -cd /home/wheeler/usr/download/binutils-2.9.1.tar.gz | tar xvf -
mv binutils-2.9.1 egcs-1.1a
gzip -cd /home/wheeler/usr/download/egcs-1.1a.tar.gz | tar xvf -
cd egcs-1.1a

cd /home/wheeler/usr/stow
mkdir build-solaris-egcs-1.1a
cd build-solaris-egcs-1.1a
../source-solaris-egcs-1.1a/egcs-1.1a/configure \
--with-gnu-as \
--with-gnu-ld \
--with-stabs \
--prefix=/home/wheeler/usr/stow/egcs-1.1a \
--exec-prefix=/home/wheeler/usr/stow/egcs-1.1a/sparc-sun-solaris2.5 \
--with-local-prefix=/home/wheeler/usr/stow/egcs-1.1a \
--with-gxx-include-dir=/home/wheeler/usr/stow/egcs-1.1a/include/g++

make bootstrap
make info
make install
make install-info

cd /home/wheeler/usr/stow
strip egcs-1.1a/sparc-sun-solaris2.5/bin/*
chmod -R uog-w egcs-1.1a
\rm -rf source-solaris-egcs-1.1a
\rm -rf build-solaris-egcs-1.1a

--
Fred Wheeler
wheeler (at) cipr.rpi.edu
www.cipr.rpi.edu/wheeler


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]