Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make error: stack frame size (2056) exceeds limit (2048)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2167

PostPosted: Tue Aug 22, 2023 1:01 pm    Post subject: make error: stack frame size (2056) exceeds limit (2048) Reply with quote

Making kernel-6.4.11 with the clang toolchain gives an error message:
Code:
error: stack frame size (2056) exceeds limit (2048)

I can eliminate the message by increasing CONFIG_FRAME_WARN to say 4096. But is that the right thing to do?
<edit>I stand corrected. Changing that has no effect, I still get the same rude message, and a broken compile. It's in the depths of the amdgpu DC driver.</edit>

My guess is that this is just a warning to kernel developers to make their code smaller, prettier or more fragrant or something, rather than an actual error, but clang being clang, they're treating warnings as errors, so the make fails.

(Aside: kernel make with clang and LTO is still broken. Some fixes have come through, so IIUC clang without LTO can now handle the latest round of mitigations, but with LTO lld complains "can't move the location counter backwards" and "SRSO function pair won't alias")
_________________
Greybeard
Back to top
View user's profile Send private message
Drako
n00b
n00b


Joined: 03 Sep 2022
Posts: 9

PostPosted: Tue Aug 22, 2023 6:00 pm    Post subject: Reply with quote

Are you using Full LTO, ThinLTO, or neither? I was having the same "stack frame size" warning with kernel version 6.4.9 while using Full LTO. I now use ThinLTO for that reason and a couple others.

Though, in 6.4.10, the warning is gone for both Full LTO and ThinLTO. I've yet to try out 6.4.11.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2167

PostPosted: Wed Aug 23, 2023 5:50 am    Post subject: Reply with quote

Thanks for the info Drako. I tried FullLTO some time ago, and the resulting kernels were much larger and slower to make, so I've only used ThinLTO for ages.

I have the same problem on 6.4.10. If you're not getting the problem it may be that you aren't using amdgpu and DC, as that's the module where the problem hits.
Thinking about it, the stack frame error message has been around for me for some time - perhaps all of 6.4, possibly even 6.3, but previously was a warning, not an error. Perhaps it's down to clang releases, as they've tightened up on a number of errors that were treated as warnings.
_________________
Greybeard
Back to top
View user's profile Send private message
Drako
n00b
n00b


Joined: 03 Sep 2022
Posts: 9

PostPosted: Wed Aug 23, 2023 3:51 pm    Post subject: Reply with quote

Actually, I'm using an AMD GPU and CPU; And kernel 6.4.11 compiles just fine.

Feel free to examine my kernel config: https://0x0.st/H9Zy.txt
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2167

PostPosted: Wed Aug 23, 2023 6:21 pm    Post subject: Reply with quote

Ah well, 6.4.12 cures it for me.
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum