linux-mips
[Top] [All Lists]

Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Fri, 6 Nov 2009 16:34:13 +0000 (GMT)
Cc: linux-mips@linux-mips.org
In-reply-to: <20091107.010839.246840249.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20091107.010839.246840249.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Sat, 7 Nov 2009, Atsushi Nemoto wrote:

> Recently COMMAND_LINE_SIZE (CL_SIZE) was extended to 4096 from 512.
> (commit 22242681 "MIPS: Extend COMMAND_LINE_SIZE")
> 
> This cause warning if something like buf[CL_SIZE] was declared as a
> local variable, for example in prom_init_cmdline() on some platforms.
> 
> And since many Makefiles in arch/mips enables -Werror, this cause
> build failure.
> 
> How can we avoid this error?
> 
> - do not use local array? (but dynamic allocation cannot be used in
>   such an early stage.  static array?)
> - are there any way to disable -Wframe-larger-than for the file or function?
> - make COMMAND_LINE_SIZE customizable?
> - use non default CONFIG_FRAME_WARN?
> 
> Any comments or suggestions?

 Use static storage and mark it initdata?  You can certainly override 
-Wframe-larger-than in per-object CFLAGS too.  You might also be able to 
use __builtin_alloca(), but this sounds like a shaky ground. ;)

  Maciej

<Prev in Thread] Current Thread [Next in Thread>