2 ms·
You want -flto and to strip the binary of symbols if you are looking for a small executable size. The C runtime is about 800K.
by jacquesm 8y ago
You want -flto and to strip the binary of symbols if you are looking for a small executable size. The C runtime is about 800K.
- tom_mellior 8y ago-flto combined with -static doesn't seem to do anything for me: $ gcc -O3 foo.c -flto -static -o foo $ du -sh foo 828K foo $ strip foo $ du -sh foo 760K foo Could you post a complete command line and the version of the compiler you have showing how to make this work with static linking?