Subject: bug#76180: [feature/igc] Remaining known tracing issues

From: Pip Cet <[email-masked]>
Date: Fri, 14 Feb 2025 12:31:15 +0000

"Eli Zaretskii" <[email-masked]> writes:

>> Date: Tue, 11 Feb 2025 20:16:21 +0000
>> From: Pip Cet <[email-masked]>
>> Cc: [email-masked], [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
>>
>> --- a/lisp/emacs-lisp/comp.el
>> +++ b/lisp/emacs-lisp/comp.el
>> @@ -91,7 +91,8 @@ native-comp-bootstrap-deny-list
>>    :type '(repeat regexp)
>>    :version "28.1")
>>
>> -(defcustom native-comp-compiler-options nil
>> +(defcustom native-comp-compiler-options
>> +  (cond ((featurep 'mps) (list "-fno-omit-frame-pointer")))
>>    "Command line options passed verbatim to GCC compiler.
>
> How about always using -fno-omit-frame-pointer, not as part of a user
> option?

I agree that would be better.  Will come up with a patch once I'm
convinced the phantom bug in my MPS build I was chasing for hours is
gone.

> We could put it in some variable for those few (who?) who might want
> to enable -fomit-frame-pointer.  I see no reason to expose this to
> users, do you?

No, it's a mistake to give users the option to compile with
-fomit-frame-pointer, IMHO, so let's not do that.

> Alternatively, maybe the nativecomp code could be modified not to use
> RBP?

I'm not sure what you mean: the code is generated by libgccjit.  We
could try to make all calls to setjmp go through a wrapper which saves
%rbp, but that is very difficult because setjmp is not an ordinary
function and not treated as one by GCC (bug#46824), so I'd rather not
(nevermind the very different API used by windows).

Thanks!

Pip