简体   繁体   English

编译静态pkg-config二进制文件

[英]Compiling a static pkg-config binary

I'm trying to build a static pkg-config binary, using: 我正在尝试使用以下方法构建静态pkg-config二进制文件:

LDFLAGS='-static' ./configure --disable-shared

However, the produced binary is dynamically linked. 但是,生成的二进制文件是动态链接的。 I even tried fiddling with the Makefile, using: 我什至尝试使用以下命令修改Makefile:

CC = gcc -static

and

CCLD = gcc -static

but still no go, always shared, not static. 但还是走不走,总是共享,不是一成不变的。 What could be the problem? 可能是什么问题呢?

LDFLAGS="-static -static-libgcc" LIBS="-lpthread" CFLAGS="-Wl,-static" ./configure

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM