How can I get GCC to use that static library instead of the dynamic one? Normally you add the .a file to the linker parameters. But libssp linking is triggered by the -fstack-protector option. And compiler prefers linking to the shared library if it finds one instead of static library.
If I try to run the resulting program on systems that don't have the libssp.so the program won't run.
(After system upgrade on some build machines, the older boxes on the test system screwed up)
Does
gcc -static static.c -o static -fstack-protector-all
or
gcc -static -lssp static.c -o static -fstack-protector-all
work? Can you run ldd on the resulting binaries?
What version of gcc are you using?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With