Re: [dev] Ada not Rust

From: Greg Reagle <>
Date: Mon, 19 Apr 2021 16:54:23 -0400

On Mon, Apr 19, 2021, at 16:36, Mattias Andrée wrote:
> For me, libgnat is only dynamically linked if I run gnatbind
> with -shared, but if you -static it should be statically linked.

Thank you. [[ gnatmake hello.adb -bargs -static ]] does the trick, i.e. it
makes the executable larger (of course) by statically linking libgnat. I am
still an Ada beginner so I am not running the linker and binder etc. separately.

> I cannot find how to statically link the C runtime.

Yea, it still is dynamically linked to (depends on) several libraries:
$ ldd hello (0x00007ffe57fde000) => /lib/x86_64-linux-gnu/ (0x00007ffbb8a93000) => /lib/x86_64-linux-gnu/ (0x00007ffbb8a79000) => /lib/x86_64-linux-gnu/ (0x00007ffbb88b8000)
        /lib64/ (0x00007ffbb8af5000)
Received on Mon Apr 19 2021 - 22:54:23 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 19 2021 - 23:00:09 CEST