Mailinglist Archive: opensuse-programming (42 mails)

< Previous Next >
Re: [suse-programming-e] Creating static binaries with autotools
  • From: Philipp Thomas <philipp.thomas@xxxxxxxxx>
  • Date: Mon, 03 May 2004 22:48:18 +0200
  • Message-id: <bnbd9050nte3m9coknrfseha5pr60oetsn@xxxxxxx>
Davi de Castro Reis <davicastro@xxxxxxxxxxxx> [02 May 2004 07:30 -0300]:

>Does someone know how can I create static binaries using autotools?

Use libtool and it's a simple --enable-static --disable-shared. But
please remember that your application is only really static if *no*
function for name resolving (gethostbyname(), getpwnam() etc.) is used.
Otherwise you get a semi static program because the name resolving
functions reside in the libnss* libraries that are *always* dynamically
loaded, even if glibc has been linked in statically.

Philipp


< Previous Next >
List Navigation
References