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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6c7dea22b75ba442 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: to gnat make or not to gnat make (Was: ada compiler?) Reply-To: anon@anon.org (anon) References: <47394e4b$1@news.post.ch> <47396fb1$1@news.post.ch> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <4Pp_i.21603$if6.6417@bgtnsc05-news.ops.worldnet.att.net> Date: Tue, 13 Nov 2007 22:46:24 GMT NNTP-Posting-Host: 12.64.114.95 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1194993984 12.64.114.95 (Tue, 13 Nov 2007 22:46:24 GMT) NNTP-Posting-Date: Tue, 13 Nov 2007 22:46:24 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:18352 Date: 2007-11-13T22:46:24+00:00 List-Id: You better learn how things work: 'gnat compile' is equivalent to using 'gnatmake -f -u' but it does not call 'gnatmake' program. Plus, 'gnatmake' perform it compiling in serial only. But a user can executes multiple 'gnat compile' in background which speeds up compiling. Which means using 'gnatmake' can be considered as inefficient execution which is against the RM. Using multiple compiles alone is worth the time to use 'gnat compile'. Resource usage: The 'gnat compile' program requires the execution of 'gcc' which requires 'gnat1' and 'as' (4 programs in memory) 'gnatbind' is stand-alone partition. (1 programs in memory) Then the 'gnatlink' program requires the execution of 'gcc' which requires 'gnat1' and 'as' afterwards use ld (5 programs in memory) Now the 'gnatmake' program requires the execution of 'gcc' which requires 'gnat1' and 'as' also, an additional copy of the "gcc-gnat1-as' for each additional package executed. (7 programs in memory) Then 'gnatmake' executes the 'gnatbind' (2 programs in memory) Then 'gnatmake' executes the 'gnatlink' which executes 'gcc' which requires 'gnat1' and 'as' afterwards use ld (6 programs in memory) Which means that 'gnatmake' requires the resources of at least 7 programs while 'gnat compile' requires 4. Which proves that 'gnat compile' is more efficient to use. You could in the "GNU GCC" system reduces the resources to 3 by using 'gcc -c .ad[b|s]'. But that even strengthen the concept that 'gnatmake' should never be used. And just to be funny about it. Why blame the computer when the boss see you goofing-off. Finish the job early and take the next day off with pay. Use parallel compiling! In <47396fb1$1@news.post.ch>, Martin Krischik writes: >anon schrieb: >> -- You have to learn to crawl before you can walk and learn the rules >> -- to walk before you should run. > >Indeed - only I think that using the GPS is crawling, "gnat make" is >walking, "gnat compile" / "gnat bind" / "gnat link" is hurdles and "gcc >-x ada" / "ld" steeplechase [1]. > >The reason you learn to craws first is because crawling is easier then >walking. And using the GPS is the easiest way to compile/bind/link an >Ada program using - well - gnat. > >> First, GNAT may be the only Ada 2005 compiler at the movement but that >> may change if other posters arecorrect. Second, GNAT is not the only >> compiler in use today, people are still using Ada 95 from other vendors. >> Software vedors like GHS, IBM, and Janas have Ada compilers and not one >> of them use "gnatmake". But all vendors including Adacore uses a version >> of the three steps to build an Ada partition. > >Well, ObjectAda has an IDE and uses some form of project manager. > >> And if you check with the Ada LRM you will see that the LM promotes a >> concept of not wasting or hogging resources. Since "gnatmake" is a >> resource hog the concept states that it should not be used. And as most >> poster say the Ada LRM is the final word. > >I see, you have not dug deep enough into the workings of "gnat". Have a >look at the help page: > >---------------------------------------------------------------------- >GNAT GPL 2007 (20070405-41) > >Copyright 1996-2007, Free Software Foundation, Inc. > > > >List of available commands > > > >gnat bind gnatbind > >gnat chop gnatchop > >gnat clean gnatclean > >gnat compile gnatmake -f -u -c > >gnat check gnatcheck > >gnat elim gnatelim > >gnat find gnatfind > >gnat krunch gnatkr > >gnat link gnatlink > >gnat list gnatls > >gnat make gnatmake > >gnat metric gnatmetric > >gnat name gnatname > >gnat preprocess gnatprep > >gnat pretty gnatpp > >gnat stack gnatstack > >gnat stub gnatstub > >gnat xref gnatxref > > > >Commands find, list, metric, pretty, stack, stub and xref accept project >file switches -vPx, -Pprj an >d -Xnam=val > > > >---------------------------------------------------------------------- > >"gnat compile" is an alias name for "gnatmake -f -u -c" - So the only >way to avoid "gnatmake" is using "gcc -x ada". > >> Plus, if Adacore is sold and gutted, goes out of business, or falls out of >> favor with other companies. The newbees need to know the concept of >> how an Ada partition is generated. > >But they don't need to use the actual commands - they are too different >between two compilers systems anyway. (I use DecAda as well). > >> Now just to be funny. Adacore would love to hear this but, the boss's blood >> pressure might hit the roof. That is, if the programmer said, "I do not know >> how to build a Ada program without using 'gnatmake' ". > >I know in theory how to compile an Ada program using "gcc -x ada" - but >I can live without turning that theoretical knowledge into practical use. > >Martin > >[1] http://en.wikipedia.org/wiki/Steeplechase_%28athletics%29 >-- >mailto://krischik@users.sourceforge.net >Ada programming at: http://ada.krischik.com