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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.43.88.202 with SMTP id bb10mr7441082icc.16.1433964624747; Wed, 10 Jun 2015 12:30:24 -0700 (PDT) X-Received: by 10.140.19.170 with SMTP id 39mr94501qgh.9.1433964623620; Wed, 10 Jun 2015 12:30:23 -0700 (PDT) Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!h15no1213170igd.0!news-out.google.com!k20ni408qgd.0!nntp.google.com!z60no448410qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 10 Jun 2015 12:30:23 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.210.1.171; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.210.1.171 References: <55b493ea-4491-42e6-a6b5-ad4871f86617@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5cc61310-7382-481e-9721-44af79d7992c@googlegroups.com> Subject: Re: STM32F4 GNAT Run Time System - roadmap From: jan.de.kruyf@gmail.com Injection-Date: Wed, 10 Jun 2015 19:30:23 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:193567 Date: 2015-06-10T12:30:23-07:00 List-Id: On Wednesday, June 10, 2015 at 7:55:18 PM UTC+2, Simon Wright wrote: Simon, > But what you really need is to suppress the standard library! but that is then in the linking phase. Let me just look what I do here. . .= =20 You are right the standard link command includes " -lgnat -static-libgcc" o= n native, and I leave that out in my custom link command. If it helps you, this is what I do: for compiling: gnatmake -f -u -c -b -a -Pkernel.gpr for binding: gnatmake -b -Pkernel.gpr then a dummy linking phase to get the b~demo.ada set compiled. But the real= linking fails here because it cannot find libgcc and libgnat. Its not in t= he search path (because -nostdlib). It is handy though if you have it verba= l, to get a list of object files to link in the stage below. Command: gnatmake -l -nostdlib -Pkernel.gpr And note that -nostdlib does not switch off the -lgnat etc. That is another= falleximble. then I partially link with: 'ld -r -m elf_x86_64 . . . . . . . . -o demo.x And the demo.x is then used in the module-building link. (part is in C) But that is outside my direct control it is done in the module-building mac= hinery of the kernel environment. In the project file: binder switches ("-E", "-n") linker switches ("-r", "-v") I am sure there is a whole lot of cruft in my way of doing things, partly t= hat is historical of course, you mess about until something works and you f= orget afterward. So one sunny saturday afternoon I might be seduced to make a minimal buildi= ng process, but for the time being this works. I semi automated it with a s= hell script. I can post the project file, but there is no earth shattering science in th= ere. Just a handful of compiler switches that I copied from a C kernel modu= le compile. (where applicable) And the RTS I set to the working directory in which there is no lib so also= no lib gets linked, but the runtime is taken from the include directory in= the main directory, just standard project file fare. Hope this enlightens the subject a bit. cheers, j.