From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6189 invoked by alias); 10 Dec 2001 17:55:25 -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 6040 invoked from network); 10 Dec 2001 17:54:10 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 10 Dec 2001 17:54:10 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id JAA15589; Mon, 10 Dec 2001 09:54:05 -0800 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma015557; Mon, 10 Dec 01 09:53:36 -0800 Received: from penguin.transmeta.com (penguin.transmeta.com [10.10.27.78]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id fBAHreS24283; Mon, 10 Dec 2001 09:53:40 -0800 (PST) Received: from localhost (torvalds@localhost) by penguin.transmeta.com (8.11.2/8.7.3) with ESMTP id fBAHlpw14250; Mon, 10 Dec 2001 09:47:51 -0800 X-Authentication-Warning: penguin.transmeta.com: torvalds owned process doing -bs Date: Mon, 10 Dec 2001 10:23:00 -0000 From: Linus Torvalds To: Paul Koning cc: Subject: Re: Optimizations on long long multiply/divide on PowerPC32 don't work In-Reply-To: <15380.59851.879850.25963@pkoning.dev.equallogic.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2001-12/txt/msg00509.txt.bz2 On Mon, 10 Dec 2001, Paul Koning wrote: > > Linus> ...Not linking against libgcc has found several problems in gcc. > Linus> Ranging from missing totally obvious optimizations... > > Does that mean that Linux isn't expected to build if you disable > optimization? That seems strange, considering that debugging with gdb > is often easier with -O0. Linux has always required optimizations to build. Since day 1, in fact. That is partly because I just cannot ever imagine running the code that gcc outputs without optimizations, but even more because gcc functionality at -O0 is seriously lacking: Gcc doesn't support inline functions without optimization (it does in C++, and it may be that even the C side has started to honour the "inline" keyword, but I've never been interested enough to check), and Linux has always tended to prefer inline functions over complicated macros. I never made "backing" static functions for things like "inb/outb" etc, that actually expand in the end to just one assembler function. And I don't know about you, but I debug almost exclusively on a source level (where compiler optimizations do not matter) or, when I have to, on an assembler level (where the code is actually _more_ readable with optimizations). So I'd never use -O0 anyway. Linus