comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Re: STM32F4 GNAT Run Time System - roadmap
Date: Wed, 10 Jun 2015 12:30:23 -0700 (PDT)
Date: 2015-06-10T12:30:23-07:00	[thread overview]
Message-ID: <5cc61310-7382-481e-9721-44af79d7992c@googlegroups.com> (raw)
In-Reply-To: <ly8ubrmosa.fsf@pushface.org>

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. . . 

You are right the standard link command includes " -lgnat -static-libgcc" on 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 the search path (because -nostdlib). It is handy though if you have it verbal, 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 machinery 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 that is historical of course, you mess about until something works and you forget  afterward.

So one sunny saturday afternoon I might be seduced to make a minimal building process, but for the time being this works. I semi automated it with a shell script.

I can post the project file, but there is no earth shattering science in there. Just a handful of compiler switches that I copied from a C kernel module 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.





  reply	other threads:[~2015-06-10 19:30 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 12:02 STM32F4 GNAT Run Time System - roadmap Simon Wright
2015-06-09 19:44 ` Tero Koskinen
2015-06-12 17:31   ` MIchael Erdmann
2015-06-12 18:19     ` Simon Wright
2015-06-09 20:08 ` jan.de.kruyf
2015-06-10 17:47   ` Simon Wright
2015-06-10 19:54     ` jan.de.kruyf
2015-06-10 21:11       ` Simon Wright
2015-06-10  8:19 ` jan.de.kruyf
2015-06-10  8:24 ` jan.de.kruyf
2015-06-10 17:55   ` Simon Wright
2015-06-10 19:30     ` jan.de.kruyf [this message]
2015-06-10 11:20 ` Brian Drummond
2015-06-10 21:19   ` Simon Wright
2015-06-11 10:10     ` Brian Drummond
2015-06-13 13:21     ` Jedi Tek'Unum
2015-06-13 14:15       ` Dmitry A. Kazakov
2015-06-13 14:55       ` Simon Wright
2015-06-13 17:43         ` Jedi Tek'Unum
2015-12-06 18:34   ` Simon Wright
2015-12-07 10:39     ` Brian Drummond
2016-01-28 20:52       ` Simon Wright
2016-01-30 14:21         ` Brian Drummond
2015-12-07 15:13     ` Jere
2015-12-07 16:31       ` Simon Wright
2015-12-07 16:49       ` Simon Wright
2015-12-07 17:56         ` Jere
2015-12-07 22:02           ` Simon Wright
2015-12-08 14:03             ` Jere
2015-12-08 15:07               ` Tero Koskinen
2015-12-09  1:46                 ` Jere
2015-12-08  2:11     ` Randy Brukardt
2015-12-09 18:46       ` Simon Clubley
2015-12-09 22:47         ` Randy Brukardt
2015-12-10 18:22           ` Simon Clubley
2015-12-11 14:59       ` AI12-0128 (was: STM32F4 GNAT Run Time System - roadmap) Simon Wright
2015-12-11 21:18         ` Randy Brukardt
2015-06-10 15:20 ` STM32F4 GNAT Run Time System - roadmap Patrick Noffke
2015-06-15 19:03 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox