How to static link Linux software that uses ./configure?

不想你离开。 提交于 2019-11-30 06:37:57

Try this:

./configure LDFLAGS="-static"

For people coming from google, I found that if you have libtool part of your build, you will need to:

  1. ./configure CFLAGS="-static" ....
  2. make LDFLAGS="-all-static"

You can see that -all-static with libtool --help --mode=link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!