From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27e56580ae0c3b7d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-25 00:01:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!skynet.be!skynet.be!louie!tlk!not-for-mail Sender: lbrenta@lbrenta Newsgroups: comp.lang.ada Subject: Re: GNAT for Debian References: <404ee0af.0307211056.15324da@posting.google.com> <20030722021229.15da08ae.david@realityrift.com> <20030722135518.32888aaa.david@realityrift.com> <20030722165245.15f880a2.david@realityrift.com> <20030723125549.1336a07f.david@realityrift.com> <20030723134949.7badd43c.david@realityrift.com> <3f1f9c07.90089321@news.greenlnk.net> <3f1fc2d7.100025238@news.greenlnk.net> <3f1ffea7.115337085@news.greenlnk.net> From: Ludovic Brenta Date: 25 Jul 2003 08:55:22 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 217.136.7.46 X-Trace: 1059116491 reader1.news.skynet.be 269 217.136.7.46:34932 X-Complaints-To: usenet-abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:40795 Date: 2003-07-25T08:55:22+02:00 List-Id: Preben Randhol writes: > Simon Wright wrote: > > But you must be very careful where the gcc-lib/i686-whatever-linux > > stuff goes -- not on top of your working standard compiler. > > That is no problem: > > /usr/lib/gcc-lib/i486-linux/2.8.1/ > ^^^^^ > gcc version Yes, and since the dawn of time you can pass -b target -V version to gcc, the compiler driver. -b allows you to switch from "i486-linux" to something else, and -V changes "2.8.1" into what you specify. And with a proper spec file, you can instruct gcc to handle Ada source files (the spec file contains the defaults for -b and -V, and maps source file name patterns with the various back-ends). But passing -b and -V to the compiler is often difficult and confusing in the context of recursive makefiles; hence gnatgcc. > > So you need a clean way of putting the GNAT builds (especially if you > > have more than one) in places where they can't be mistaken and will > > never end up on your path. > > You cannot have two gnat compilers at the same time. At least not as the > standard compiler. > > > I choose /opt because if didn't seem like a bad idea; if it was, I am > > very sorry. /usr/lib/gnat-3.15p (for example) would be a perfectly > > good place, or /usr/local/gnat-3.15p. > > > > You could easily then install gnatgcc and friends by symlinks in > > /usr/local/bin (say). > > > > The point of my gnatfe is to do effectively just that but in a way > > that you can alter the compiler actually used by changing an > > environment variable, which is effectively the prefix you built the > > compiler with. I think you made the right choice. I, too, have a strict policy of installing everything in /opt unless it is packaged for my distribution (used to be Red Hat, now Debian). I did install gnat 3.15p into /opt/gnat-3.15p and have a symlink /opt/gnat to point to it; but instead of using wrapper scripts, I prefer to place /opt/gnat/bin at the head of my PATH, and /opt/gnat/lib in LD_LIBRARY_PATH, on a per-user basis or in /etc/profile.d. This way, the /usr partition never contains files that are not part of any package. > Sure, but it makes it harder to maintain as a package I would say. > > Normal practice if you need more than one gcc is that is is named: > > gcc-2.95 > gcc-3.2 > gcc-3.3 > > etc... and gcc symlinks to the standard. Of course one could do that > too, but then one might get problems with gnatmake calling wrong gnatgcc > because of bad symlinks. Yes. On Debian, the package "gcc" creates the symlink. In woody, "gcc" is 2.95, but in sarge, "gcc" depends on "gcc-3.3" and points to it. > > I quite realize that if you're building a package for people to > > install & use on the other side of the world without handholding, > > things may look different! > > Exactly Aye. -- Ludovic Brenta.