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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Package procedure as program entry in GPR project Date: Sat, 26 Jan 2019 12:05:35 +0000 Organization: A noiseless patient Spider Message-ID: References: <9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="d537c2f82a35372c8fdbdd2a1555bfe3"; logging-data="3284"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Uw4jWEuryb6rbk7KM+IIMqc766F4+Khs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:ctEiNRRuWO4dbDR7uCdlnVMZ3Ns= sha1:cyi2BmalV0nfsxTyMwTPM/ulP/A= Xref: reader01.eternal-september.org comp.lang.ada:55381 Date: 2019-01-26T12:05:35+00:00 List-Id: "Randy Brukardt" writes: > "Jesper Quorning" wrote in message > news:9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com... [...] >> package My_Program_Package is >> procedure Program_Entry_Procedure; >> end My_Program_Package; >> >> How do i make Program_Entry_Procedure as the program entry procedure >> in a GPR project? > > I realize you are asking for GPR, so by definition you don't care > about portability, but: > > Ada only requires Ada implementations to support library-level > procedures as the main. See 10.2(29). A particular implementation can > allow more, but there is no requirement. This isn't a GPR thing, it's a GNAT thing: GNAT has no extensions here beyond the requirement. If you have a minimal bare-board project without any requirement for the Ada runtime system, it's possible to do what you ask: see Maciej Sobczak's 'Ada and SPARK on ARM Cortex-M' tutorial[1], in particular the 'First Chapter'[2]. It would be hard (and pointless) to attempt this for a program intended to run on a typical operating system. [1] http://www.inspirel.com/articles/Ada_On_Cortex.html [2] http://www.inspirel.com/articles/Ada_On_Cortex_First_Program.html