This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
optimization issue about -O2 and -Os
- From: Ebony Zhu <ebony dot zhu at motorola dot com>
- To: gcc_mailing_list <gcc at gcc dot gnu dot org>
- Cc: Zhu Ebony-r57400 <ebony dot zhu at motorola dot com>
- Date: 29 Apr 2004 14:49:58 +0800
- Subject: optimization issue about -O2 and -Os
Hi, Everybody,
I'm new to this mailing list. I encountered an odd issue about gcc
optimization. I'm using a cross-built gcc 3.3.2 for Powerpc. When I
build some applications such as U-Boot, Busybox..., with the -Os
optimization, the apps can be built but cannot run (just halted, there
were even no error messages). If I use -O2 switch then everything is OK.
According to manpage of GCC, -Os is based on -O2 switch and does some
work to reduce the code size. What GCC did on earth with the -Os switch?
Anybody has some idea about this odd issue? Many thanks!
B.R.
EBony