From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31022 invoked by alias); 29 Apr 2004 22:58:01 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31015 invoked from network); 29 Apr 2004 22:58:01 -0000 Received: from unknown (HELO mta6.wss.scd.yahoo.com) (66.218.85.37) by sources.redhat.com with SMTP; 29 Apr 2004 22:58:01 -0000 Received: from specifixinc.com (24.7.123.142) by mta6.wss.scd.yahoo.com (7.0.016) (authenticated as jim@tuliptree.org) id 4072403F00D4F0E6; Thu, 29 Apr 2004 15:58:00 -0700 Message-ID: <40918894.6070706@specifixinc.com> Date: Fri, 30 Apr 2004 00:37:00 -0000 From: Jim Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716 MIME-Version: 1.0 To: Ebony Zhu CC: gcc@gcc.gnu.org Subject: Re: optimization issue about -O2 and -Os References: <1083221404.1215.267.camel@Woogie> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg01416.txt.bz2 Ebony Zhu wrote: > 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? The -Os option is buggy. You might want to report a bug into our bugzilla bug datase. See http://gcc.gnu.org/bugs.html for more info on reporting bugs. Though the -Os option is based on the -O2 option, it is a different option, that generates different code, and has different bugs. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com