How can I tell the linker that statically link libfoo.a while building the shared object sharedobj.so using gcc/make.
I have tried to pass the LDFLAG options
LDFLAGS += -W1 --whole-archive -L/path/to/libfoo -lfoo
I have also tried to pass LDFLAGS the options
LDFLAGS += -W1, static -L/path/to/libfoo -lfoo
I have also tried to pass LDFLAGS the options
LDFLAGS += -W1, Bstatic -L/path/to/libfoo -lfoo
and
I have also tried to pass LDFLAGS the options
LDFLAGS += -W1, statically_linked -L/path/to/libfoo -lfoo
I have read through a number of links that tell me how to do it but none have worked so far.