lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86: fix early boot crash on gcc-10
Hello,

On Wed, 22 Apr 2020, Martin Liška wrote:

> One possible solution can be usage of a GCC pragma that will disable the
> tail-call optimization:
>
> $ cat tail.c
> int foo(int);
>
> #pragma GCC push_options
> #pragma GCC optimize("-fno-optimize-sibling-calls")

As we determined upthread (and the reason why we even still have this
thread): the optimize attribute (and pragma) reset flags from the command
line (the case in point was -fno-omit-frame-pointer). So, that's not a
solution for now.

> And as I talked to Boris, I would recommend to come up with a
> "configure" check that a compiler does not optimize the key code
> sequence:

Right. I think the traditional asm (i.e. one without operands) is good
enough for the forseeable future from GCCs side: it relies on documented
behaviour of traditional asms, and hence would be very hard to change.


Ciao,
Michael.
\
 
 \ /
  Last update: 2020-04-22 17:07    [W:0.060 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site