comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: GNAT for Debian
Date: 25 Jul 2003 08:55:22 +0200
Date: 2003-07-25T08:55:22+02:00	[thread overview]
Message-ID: <m3adb33xk5.fsf@insalien.org> (raw)
In-Reply-To: slrnbi1k4l.ni.randhol+abuse@kiuk0152.chembio.ntnu.no

Preben Randhol <randhol+abuse@pvv.org> 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.



  reply	other threads:[~2003-07-25  6:55 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-21 18:56 GNAT for Debian Francisco Javier Loma Daza
2003-07-21 19:51 ` Samuel Tardieu
2003-07-22  0:12 ` David Holm
2003-07-22  9:03   ` Preben Randhol
2003-07-22 11:55     ` David Holm
2003-07-22 12:16       ` Preben Randhol
2003-07-22 14:53         ` David Holm
2003-07-23 10:00           ` Preben Randhol
2003-07-23 10:25             ` Preben Randhol
2003-07-23 10:56             ` David Holm
2003-07-23 11:03               ` Preben Randhol
2003-07-23 11:50                 ` David Holm
2003-07-23 12:14                   ` Preben Randhol
2003-07-23 12:26                     ` David Holm
2003-07-23 12:30                       ` Preben Randhol
2003-07-24  8:50                   ` Chris M. Moore
2003-07-24  9:13                     ` Preben Randhol
2003-07-24  9:14                       ` Preben Randhol
2003-07-24 11:44                       ` Chris M. Moore
2003-07-24 11:47                         ` Preben Randhol
2003-07-24 15:54                           ` Chris M. Moore
2003-07-24 21:12                             ` George Shapovalov
2003-07-24 21:58                               ` Simon Wright
2003-07-25  1:39                                 ` George Shapovalov
2003-07-25  6:41                                   ` Ludovic Brenta
2003-07-25 10:54                                     ` Preben Randhol
2003-07-25 10:59                                       ` Preben Randhol
2003-07-25 10:58                                     ` Preben Randhol
2003-07-25 12:35                                     ` Samuel Tardieu
2003-07-26 10:01                                       ` Ludovic Brenta
2003-07-26 10:12                                         ` Samuel Tardieu
2003-07-26  3:36                                     ` Warren W. Gay VE3WWG
2003-07-26  8:51                                       ` Samuel Tardieu
2003-07-25  6:39                                 ` Preben Randhol
2003-07-25  6:55                                   ` Ludovic Brenta [this message]
2003-07-25  6:33                             ` Preben Randhol
2003-07-23 18:09               ` Matthew Woodcraft
2003-07-23 18:40                 ` Ludovic Brenta
2003-07-22  8:05 ` Georg Bauhaus
2003-07-22  9:02 ` Preben Randhol
2003-07-22 14:54   ` Francisco Javier Loma Daza
2003-07-22 15:37     ` Samuel Tardieu
2003-07-23 10:01       ` Preben Randhol
2003-07-23 10:08         ` Samuel Tardieu
2003-07-23 10:49           ` Preben Randhol
2003-07-23 10:58             ` Preben Randhol
2003-07-25 11:41         ` Jérôme Marant
2003-07-25 12:05           ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox