You can disable optimizations that expand code size at the
second, third, and fourth optimization levels by using the +Osize option, as follows:
cc +O2 +Osize sourcefile.c
or:
cc +O3 +Osize sourcefile.c
or:
cc +O4 +Osize sourcefile.c
Most optimizations improve execution speed and decrease executable code
size. A few optimizations significantly increase code size to gain execution
speed. The +Osize option disables these code-expanding optimizations.
Use this option if you have limited main memory, swap space,
or disk space.