Creating a libtool application with static binding to local components

I am working with open source software that libtool uses in the build process. I would like to statically link local application components with the following benefits:

  • does not require launching the libtool shell
  • function calls did not touch dynamic linking during debugging
  • Avoid inadvertent dynamic binding to an existing installed system.

Is there a standard way for the build process that does this?

Due to dependencies on non-static system libraries, I can't just use:

 ./configure LDFLAGS='-static' 
0
source share
1 answer

Yes, it can be done! Use the --disable-shared option.

For example:

 ./configure --enable-debug --disable-shared 

Now the generated executable is a directly executable binary, not a libtool script.

This has the added benefit of reducing assembly time by about half.

+3
source

All Articles