This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -mno-red-zone and -mcmodel=kernel
- From: Andi Kleen <ak at suse dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Jan 2004 21:33:08 +0100
- Subject: Re: -mno-red-zone and -mcmodel=kernel
- References: <20040112194053.580598f6.ak@suse.de><20040116200506.GU8121@kam.mff.cuni.cz>
On Fri, 16 Jan 2004 21:05:06 +0100
Jan Hubicka <jh@suse.cz> wrote:
> >
> > Hi,
> >
> > People run more and more into problems with kernel modules on x86-64 and the new gcc because
> > they don't specify the -mno-red-zone parameter. With the old gcc 3.2 they got away,
> > but with the new one it breaks.
> >
> > It's also common when people first develop the module on RH/AMD64 (which uses gcc 3.2) and then
> > later others want to use it on SuSE and it breaks.
> >
> > How about implying -mno-red-zone in -mcmodel=kernel ? That would avoid the problem for
> > all cases. If people really want a redzone in kernel code they could reenable it
> > I guess using -mred-zone.
> >
> > -Andi
> Hi,
> here is proposed patch. I will commit it to both mainline and 3.4
> branch unless there will be some objections against making such implicit
> changes.
Better make a warning because otherwise people won't fix the Makefiles
and we get silent corruption again when they compile with a 3.3 compiler
that doesn't enforce this. Ok this would make it ugly to have a red zone
in kernel mode, but I suppose this usecase is not very interesting.
-Andi