comp.lang.ada
 help / color / mirror / Atom feed
From: Markus Schoepflin <nospam@no.spam>
To: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Static linking
Date: Fri, 07 Aug 2009 12:46:36 +0200
Date: 2009-08-07T12:46:36+02:00	[thread overview]
Message-ID: <4A7C060C.5010306@no.spam> (raw)
In-Reply-To: <3cb4bb38-5be5-46d2-97e9-f7a3a9a59329@l34g2000vba.googlegroups.com>

Ludovic Brenta wrote:
> Markus Schoepflin wrote on comp.lang.ada:

[...]

>> Looking at the manual for the binder I'm told: '-static Link against a
>> static GNAT run time.'. OK, so this works as advertised, no dynamic GNAT
>> runtime used.
>>
>> Now what is the correct way to created a static executable? This seems to
>> work, but is it correct?
> 
> libc6 does not exist as a static library anymore; on GNU/Linux there
> is no way to create a completely static executable; you have to link
> against (at least) libc.so.6 dynamically.  So, the executable you
> obtain with -bargs -static is as static as you can get :)

Now I'm really confused. The command just below your answer in my original 
mail works and gives me a static executable:

>>  > touch foo.adb && gnatmake foo -bargs -static -largs -static
>> gcc-4.4 -c foo.adb
>> gnatbind -static -x foo.ali
>> gnatlink foo.ali -static
>>  > ldd foo
>>         not a dynamic executable
>>

[...]

Markus



  reply	other threads:[~2009-08-07 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07  7:54 Static linking Markus Schoepflin
2009-08-07 10:15 ` Ludovic Brenta
2009-08-07 10:46   ` Markus Schoepflin [this message]
2009-08-12 14:20 ` Alex R. Mosteo
  -- strict thread matches above, loose matches on Subject: below --
2014-10-04  1:19 static linking agent
2014-10-04  7:21 ` Simon Wright
2014-10-04 18:10   ` agent
replies disabled

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