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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a7ccacf6df5b27fa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!f19g2000yqh.googlegroups.com!not-for-mail From: Bryan Newsgroups: comp.lang.ada Subject: Re: Cross compilation problem Date: Fri, 1 May 2009 10:50:49 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <89fc88e1-b4db-4e43-b938-83628d3aea3a@u39g2000pru.googlegroups.com> NNTP-Posting-Host: 192.88.212.32 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1241200249 3405 127.0.0.1 (1 May 2009 17:50:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 1 May 2009 17:50:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f19g2000yqh.googlegroups.com; posting-host=192.88.212.32; posting-account=VyiI7goAAADnYO20HLB-PkcGb_pAfCa4 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5646 Date: 2009-05-01T10:50:49-07:00 List-Id: On May 1, 1:41=A0pm, Robert A Duff wrote: > Bryan writes: > > I have been trying to create a gcc cross compiler from cygwin to ARM > > for a project at work and managed to get it somewhat functional but I > > have run into a problem that is preventing all but my most basic tests > > from compiling. I am receiving an error that states I am violating the > > No_Implicit_Dynamic_Code restriction and I have tracked this down to > > the compiler generating dynamic code on the stack for certain > > features. > > In older versions of GNAT, trampolines are generated whenever you do > 'Access of nested subprograms, or use related features (e.g. nested task > bodies, nested type extensions, which do such a 'Access internally). > These trampolines are, as you say, code generated at run time on the > stack, and they violate the No_Implicit_Dynamic_Code restriction. > > In later versions of GNAT, trampolines are generated only for > fairly rare cases. =A0I don't know whether this fix exists in > whatever public version you are using. =A0If it does not yet, > it will eventually. > > You might want to post an example that causes trouble. > > >... Does anyone know how I can fix this issue in the compiler? > > You could remove the Restrictions pragma from your code. > > If you run code with trampolines, you need to turn off Data > Execution Protection (DEP). =A0That's what windows calls it; > there's a similar feature in Linux. =A0If you have DEP turned > on, then when you call a trampoline, your program will fail > in some mysterious way. > > > Or is this occurring because there is no official ARM Linux port for > > the compiler? > > I don't know. > > - Bob The restrictions pragma is not in code that I control but rather in the runtime.I suspect that this pragma is only being applied because of the lack of an official ARM target it is reverting to the default system.ads file which specifies this pragma although I have no firm evidence to back this up.