From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,5a6ba5630a24c36d X-Google-Attributes: gid111c93,public From: Roger Hill-Cottingham Subject: Re: How to install more than one compiler Date: 1999/04/27 Message-ID: <3725A036.7B855326@bath.ac.uk>#1/1 X-Deja-AN: 471433165 X-Nntp-Posting-Host: tesla.bath.ac.uk Sender: eesrjhc@bath.ac.uk (Verified by Kerberos) Content-Transfer-Encoding: 7bit References: <3724F31A.E7E722C7@worldnet.att.net> To: headroom@worldnet.att.net Content-Type: text/plain; charset=us-ascii Organization: University of Bath Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Peter Doering wrote: > > Hi Folks, > > A few months ago I startet getting problems with the EGCS/GCC compiler > which comes with the Redhat 5.1 Alpha AXP package. It seems to be quite > buggy and a compilation run of my favorite 3D-rendering software was not > successfull, so I got myself the newest EGCS version 1.1.1. > > The problem is that the GCC version which comes with RH 5.1 is needed to > compile the kernel sources as they contain code which is programmed to > go around those bugs but does not make sense to the new EGCS compiler > and a compilation of the kernel fails. However, a lot of software (e.g. > the Mesa 3 library which I want to compile using the new EGCS) contains > huge config scripts which rely on the compiler files beeing in its usual > place and not in /usr/local/bin, where I installed the new EGCS. > > Does someone have an idea how to solve that problem and install > different C or C ++ compilers on one machine in a way that you can > compile the kernel sources and software which needs a newer/other > compiler ? > > Thanks in advance, > > Peter Hi, This may not be to everones taste, but this is how I get around the problem: Make egcs like this: $ mkdir /tmp/build $ cd /tmp/build $ /usr/local/src/egcs-1.1.2/configure --prefix=/usr/local/egcs-1.1.2 $ make bootstrap (wait for 40 minutes or so) $ su # umask 022 # make install # cd /usr/local # ln -s egcs-1.1.2 egcs # cd /usr/bin # ln -s /usr/local/egcs/bin/gcc egcc # ln -s /usr/local/egcs/bin/g++ eg++ # ln -s /usr/local/egcs/bin/g77 eg77 Now anything I want to compile with stock gcc/g++/g77 will use the default gcc in /usr/bin, while anything I want to use the new egcs compilers I either change the Makefile to use $(GCC)=egcc, or use 'GCC=egcc; make' instead. This is because the new egcs binaries are NOT in $PATH of themselves. Also, if I upgrade egcs I will make into a new directory in /usr/local, and then change just one link to make the new one current (or revert to a previous one). HTH Best Regards, Roger.