Am I in the right place?

Ed Leafe ed at leafe.com
Tue Aug 24 07:47:31 PDT 2004


On Aug 24, 2004, at 10:30 AM, Matthew Burgess wrote:

> This sounds like you just want to pass the "-static" option to 'gcc' in
> order to statically compile your source code, as opposed to have it
> dynamically link to libraries at run-time.
> [snip]
> You should be able to copy hello-static across to any linux machine and
> have it run, I believe (assuming your binary isn't reliant on 
> particular
> linux-kernel features).

	OK, bear with me, as I'm really a n00b at this. If I get the source 
for the various libraries that are currently trying to dynamically link 
to a particular lib, and compile them with the -static option, they 
should be portable across distros?

	Currently I'm distributing them in their own directory, and the 
executable starts by munging the LD_LIBRARY_PATH environmental variable 
to look at my directory first. Will this also work with 
statically-compiled libraries, as you've described?

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/




More information about the lfs-support mailing list