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]
Other format: [Raw text]

Re: "GNU" and Ada


Richard Stallman <rms@gnu.org> writes:

>     Unfortunately, the last time I checked, there wasn't any instructions
>     how to create an official GNU package, so this is just shifting the
>     problem.
>
> I as Chief GNUisance am the one who officially dubs a program a GNU
> package.  I never saw a need to write instructions for myself ;-).

So you should instruct people to contact you when they feel they can
contribute a new package to the GNU project. ;-)

(The GNU Maintenance Instructions seem to be a good place to include
such information, along with the semi-official list of minimum
requirements for GNU packages which floating around.)

>     What about (Ada) packages interfacing to free software which is not
>     published as a GNU package?
>
> I don't quite understand what the question is--could you try saying
> it again in different words?

Suppose we need a certain feature for an Ada program.  There are two
ways to get this feature: Implement it in Ada, or take an already
existing implementation in some other programming language, usually
C, and write an Ada wrapper for it.  (The Ada standard includes
facilities which permit linking Ada code with C (Fortan, Cobol) code.)

There are two extreme approaches when writing such a wrapper: A
so-called thin binding tries to establish a one-to-one mapping between
the interface exported by the C code and the interface presented
to programs on the Ada side.  The binding will preserve C-ism at
the expense of Ada-ism, and usually contains just Ada declarations
matching the C declarations provided by the C implementation.  (An
example in C: The POSIX file I/O API consisting of open(2), read(2),
write(2), close(2) could be considered a thin binding to the kernel.)

The other approach is a thick binding.  Thick bindings contain a
substantial amount of Ada (and sometimes C) code.  The author of the
binding has made his own design decisions and hasn't just copied
the interface of the C implementation declaration by declaration.
Usually, when looking at the interface provided by such a thick
binding, you can't tell that the actual implementation is not in Ada,
but in C.  (C-based example: The FILE-based standard I/O routines
fopen(3), fread(3), fwrite(3), fclose(3).)

Obviously, a thick binding has some worth on its own, although it
still cannot be used without the underlying C library.  Maybe we want
to put such bindings in the GNU.xxx hierarchy, too, even if the
corresponding C library is free software but not part of the GNU
project.  (AFAIK, the original situation with GNU libc was worse by
far, from a Free Software Purity point of view.)  Many thick bindings
are built on top of thin bindings, so it would be reasonable to
include corresponding thin bindings there, too.

Or do you simply want to require that the Ada code *itself* has to
be released as part of a GNU package, as a precondition for locating
it under GNU.xxx?  This is a rather strong requirement, given the
fact that there are hardly any GNU packages written in Ada, and the
less-than-obvious way to create GNU packages.


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