-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBE produces calls to __builtin_stack_restore with C compilers that don't support them #1785
Comments
assigned to @lattner |
Can we just emit some inline assembler as an workaround? |
in the generated c code? No. I think we should just disable the offending builtins. In 1.9, these -Chris |
Here is the gcc version I was using when I get this error. [zion]$ gcc --version |
But is it safe? |
no, it isn't safe, but it's better that not linking :) -Chris |
This won't work in the future. Please see GCC's llvm/llvm-bugzilla-archive#31128 . |
We'll just have to add an upper limit on the gcc version if that patch goes in. |
mentioned in issue llvm/llvm-bugzilla-archive#1416 |
Extended Description
The CBE is unconditionally turning calls to llvm.stacksave into calls to __builtin_stack_restore. It should
only do this if the C compiler supports these. Worst case, it should emit a header that looks like this:
#if !gcc or gcc is too old
#define __builtin_stack_restore(X) 0
#endif
-Chris
The text was updated successfully, but these errors were encountered: