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,9e6c23561678ba64,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Answers for Ludovic Brenta and Georg Bauhaus (Re: ada compiler?) Reply-To: anon@anon.org (anon) X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Thu, 15 Nov 2007 09:33:04 GMT NNTP-Posting-Host: 12.64.234.31 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1195119184 12.64.234.31 (Thu, 15 Nov 2007 09:33:04 GMT) NNTP-Posting-Date: Thu, 15 Nov 2007 09:33:04 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:18414 Date: 2007-11-15T09:33:04+00:00 List-Id: 1. The best way set "-fstack-check" as a default to install the gcc source tree. And as many language packages as you want to default using "-fstack-check". I would say skip JAVA for now. 2. Check for current GNAT or upgrade to GNU GPL version if needed 3. Configure gcc system as normal with this extra option added --enable-fstack-check aka ../source/configure --enable-fstack-check 4. Build GCC system the normal way as describe in manual or the way you like, may be in stages. Note: This way, the complete language packages define in the configure '--enable-language="c,ada,..."' will be set to use stack checking. As for Java you might want to skip this, since the "-fstack-check" routines does slow down the execution and JAVA is slow enough. For languages, that you want to use without the "stack-check" rebuild in another directory the normal way. The other way I stated only modifies the 'gnat1' but a lot of people here may get upset if I show you those instructions. So, you can skip from the other post. Now, the '-fstack-check' add the following three statements to the start of each routine. ; Assembly (x86) leal -4392(%esp),%eax pushl %eax call __gnat_stack_check -- or the Ada version AX := Stack - 4392 ; -- Insure routine has at least 4392 stack size stack_check ( AX ) ; -- returns if AX is valid stack location -- else result in Storage_Error exception Note: the initial constant 4392 may be a different value on other systems. The 'Stack_Check' function can be found in System.Stack_Checking.Operations.Stack_Check function defined in the s-stchop.adb file. For GNAT RTS, there are 4 packages, that deal with the stacks. System.Secondary_Stack => s-secsta.ad? System.Stack_Usage => s-stausa.ad? System.Stack_Checking => s-stache.ad? System.Stack_Checking.Operations => s-stchop.ad? -- core routines