Subject: Re: Problems with DIALOG in ramdisk-small
To: Rob Bennett <>
From: Martin Husemann <>
List: tech-pkg
Date: 06/03/2005 10:56:12
On Thu, Jun 02, 2005 at 03:41:43PM -0700, Rob Bennett wrote:
> Is there a generic way to tell my compiler to build
> static files?

When compiling stuff, remove -fpic or -fPIC and any -DPIC.
When linking, add -static.

Inside the NetBSD source tree you can use something like this to build
a static binary:

  cd /usr/src/bin/ls
  make LDSTATIC=-static USETOOLS=never

(the USETOOLS= is unrelated to the static vs. dynamic issue)