Date: Tue, 27 Apr 1999 17:47:42 -0500 (CDT) From: Kurt Watkins To: pgcc AT delorie DOT com Subject: Re: Building, Installing, and using EGCS/PGCC 2.91.66 In-Reply-To: <19990427151606.3141.qmail@nw128.netaddress.usa.net> Message-ID: Organization: Howard Hughes Medical Institute MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: pgcc AT delorie DOT com X-Mailing-List: pgcc AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 27 Apr 1999, ADAM SCHROTENBOER wrote: > Just built EGCS 2.91.66 last night, only to find that I can't make it use > that, vs gcc 2.7.2.3 (I have RedHat 5.2 w/ Kernel 2.2.6). > > I have tried many different things, such as specifying the machine (EGCS > compiled for i586-pc-linux-gnu, while gcc 2.7.2.3 is for i386). Anyway, after > trying for I'm not sure how long, I still can't use EGCS. I tried gcc -V > egcs-2.91.66 --version. In DJGPP, this would return egcs-2.91.66(actually I > think it's egcs-291.66, but same thing). in Redhat Linux, it returns 2.7.2.3, > no matter what I tell it to do, even tried copying egcs to the i386 dir > (actually not i386, but more like i386-gnu-etc). Nothing works. > > I used make bootstrap, then make install. > > Any suggestions are welcome. HHHEEELLLLPPPP!!! I've found the following to be a reasonable strategy when trying to maintain (perhaps multiple versions of) multiple compilers. I use the prefix option to specify non-standard locations and set an environment variable or two to use them. This helps me avoid fiddling with makefiles and what not. For example, I usually configure a pgcc install something like $ cd objdir $ ../srcdir/configure --prefix=/opt/pgcc --enable-shared $ make bootstrap $ make install which dumps everything into /opt/pgcc. Now I move the generic pgcc directory to a version specifc one and make a link to the generic name: $ cd /opt $ mv pgcc pgcc-1.1.3 $ ln -s pgcc-1.1.3 pgcc After this, you want to be able to pick up the compiler binary before other compilers of the same name, so you want /opt/pgcc/bin in your path before other locations. You probably also want LD_LIBRARY_PATH to include /opt/pgcc/lib as well. I capture mods to both PATH and LD_LIBRARY_PATH in a little setup script that I source as appropriate. Note that this script can be non-version-specifc if you refer to the soft link. This has allowed me to play with several flavors of gcc, egcs, and pgcc all installed simultaneously. Much easier to make side-by-side comparisons this way. Cheers, K.