How to statically-link a complex program

前端 未结 4 899
傲寒
傲寒 2020-12-23 23:50

In Linux, downloaded a program source and want it to be statically linked. Have a huge Makefile there, I

./configure
make

to compile. preh

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-24 00:45

    Most autoconf generated configure script will allow you to make a static build:

     ./configure --enable-static
     make
    

    If that doesn't work, you may be able to pass linker flags in via LDFLAGS, like this:

     ./configure LDFLAGS=-static
    

提交回复
热议问题