Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755186Ab3DOLQj (ORCPT ); Mon, 15 Apr 2013 07:16:39 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:48340 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753930Ab3DOLQh (ORCPT ); Mon, 15 Apr 2013 07:16:37 -0400 MIME-Version: 1.0 In-Reply-To: <1366012739.21182.4.camel@leyfoon-vm> References: <1366012739.21182.4.camel@leyfoon-vm> Date: Mon, 15 Apr 2013 13:16:36 +0200 Message-ID: Subject: Re: Linux kernel support -O0 optimization flag? From: richard -rw- weinberger To: Ley Foon Tan Cc: LKML , Kenneth Chong Yin Tan Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 684 Lines: 21 On Mon, Apr 15, 2013 at 9:58 AM, Ley Foon Tan wrote: > > > Change KBUILD_CFLAGS to -O0 in Makefile and got the compilation error as > below. > Is the Linux kernel support -O0 optimization flag? No. If I'm not mistaken we need this to make sure that the compiler inlines some functions. In your case the compiler failed to compute the BUILD_BUG() macro correctly. It depends also on optimization. -- Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/