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-Thread: a07f3367d7,d8e3cd3d8dbaa4fb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.76.99 with SMTP id j3mr361213paw.45.1343318660092; Thu, 26 Jul 2012 09:04:20 -0700 (PDT) Received: by 10.68.241.162 with SMTP id wj2mr390904pbc.2.1343313453610; Thu, 26 Jul 2012 07:37:33 -0700 (PDT) Path: b9ni65285795pbl.0!nntp.google.com!4no980382pbo.1!news-out.google.com!b9ni61666166pbl.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? Date: Fri, 20 Jul 2012 23:47:28 +0200 Organization: A noiseless patient Spider Message-ID: <87394mds0f.fsf@ludovic-brenta.org> References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="3e923ec8967cff61065e8d85ac343f1e"; logging-data="13452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gWsPG0SpmrIMZwFoAiYQ9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:9iUjmPRIjb0ZXLJRWUfm/yQ9MvA= sha1:r7EeYZhJmrcF89EiEVJq3J3AZ2c= X-Received-Bytes: 3401 Content-Type: text/plain; charset=us-ascii Date: 2012-07-20T23:47:28+02:00 List-Id: Niklas Holsti writes: > On 12-07-20 23:05 , Patrick wrote: >> This thread could be a bit inflammatory, please bear in mind: >> -I love Ada >> -I've been with Ada for 7 months and I am only learning it. >> -Programming is not my day job > > Good, but I don't think that the above either qualifies or disqualifies > you as a critic of Ada. The substance of the criticism is what matters. +1 >> I was surprised to see so much C code. I know Ada has facilities for >> low level programming but it seems to be that the momentum of C >> hasn't allowed for Ada to grow as much as it could have in this >> department. It seems to me that even within GNAT, it has just been >> easier to piggyback on C, rather then rewrite things in Ada and ASM. > > I don't know much about GNAT and GCC internals, but the Ada part has > to interface with the rest of GCC, through an interface that I assume > is defined in C, or through files with a format defined in C > terms. When using such interfaces from Ada, it is often easiest to > write an application-specific, thin, in-between layer in C. This layer > can then directly use the interface-defining C header files, without > translating the header files to Ada (which can be a lot of work, > especially if #defines are used a lot). Perhaps the C code you found > has this role. I know a lot about GCC internals (well, not as much as AdaCore folks) and I confirm that what you said is 100% correct. A lot of C code in the GNAT sources is located in the directory gcc/ada/gcc-interface; there is a good reason for that. You will also notice, besides the C code, a lot of Makefiles, Makefile.in, Makefile.ac. The build system of GCC is horribly complex and consists of hundreds of thousands of lines of configury and makefiles. Niklas, everything else you said is correct, especially about the Ada run-time library interfacing with the target operating system and tasking. > What would be more useful, and much easier, would be to port GNAT and > ORK to more GCC-supported targets. Use AVR-Ada as an example. And package them for Debian for easy installation and use by the masses :) -- Ludovic Brenta.