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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,b2796c9ed44bd3f5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!noris.net!nntp.ilk.net!not-for-mail From: Markus Schoepflin Newsgroups: comp.lang.ada Subject: Re: Static linking Date: Fri, 07 Aug 2009 12:46:36 +0200 Organization: Customer of ILK Internet GmbH, Karlsruhe, Germany Message-ID: <4A7C060C.5010306@no.spam> References: <3cb4bb38-5be5-46d2-97e9-f7a3a9a59329@l34g2000vba.googlegroups.com> NNTP-Posting-Host: csdc.comsoft.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nntp.ilk.net 1249641996 3217 212.86.205.70 (7 Aug 2009 10:46:36 GMT) X-Complaints-To: usenet@ilk.net NNTP-Posting-Date: Fri, 7 Aug 2009 10:46:36 +0000 (UTC) To: Ludovic Brenta User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: <3cb4bb38-5be5-46d2-97e9-f7a3a9a59329@l34g2000vba.googlegroups.com> Xref: g2news2.google.com comp.lang.ada:7649 Date: 2009-08-07T12:46:36+02:00 List-Id: 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