Compiling a static pkg-config binary

271 views Asked by At

I'm trying to build a static pkg-config binary, using:

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

However, the produced binary is dynamically linked. I even tried fiddling with the Makefile, using:

CC = gcc -static

and

CCLD = gcc -static

but still no go, always shared, not static. What could be the problem?

1

There are 1 answers

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