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

后端 未结 2 364
礼貌的吻别
礼貌的吻别 2020-12-28 14:45

I would like to compile NRPE static, so I can copy the compiled binary to an OmniOS server, where I don\'t want gcc to be installed on. I would prefer to install NRPE with S

2条回答
  •  独厮守ぢ
    2020-12-28 15:25

    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

提交回复
热议问题