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
Clang crashes when compiling MIPS kernel #571
Comments
Needs to be creduce'd; |
@tpimh what defconfig are you using? |
I assumed it was
a() { __asm__("" : "=ro"(*(int *)0)); } with the following interestingness case: #!/bin/bash
mipsel-linux-gnu-gcc -O2 -c -o /dev/null ioctl.i || exit 1
clang-9 -Qunused-arguments -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -std=gnu89 --target=mipsel-linux-gnu --prefix=/usr/bin/ --gcc-toolchain=/usr -no-integrated-as -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -Wa,-msoft-float -ffreestanding -EL -fno-stack-check -march=mips32r2 -Wa,--trap -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -fstack-protector-strong -mno-global-merge -fomit-frame-pointer -g -fno-var-tracking -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -c -o /dev/null ioctl.i |& grep "llvm::MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand" This occurs on tip of tree |
If I recall correctly it was |
@nathanchance nice find. Please file a bug in upstream llvm's issue tracker. |
Will do. |
Fixed: llvm/llvm-project@7f308af I'll build and test here shortly. |
After fixing some warnings/errors (which I will be filing issues and sending patches for), I can compile and link a |
Does it boot? |
Have not tested since we don't have a buildroot image for it yet |
If it panics because of no init, should be good enough to proceed. |
That’s a fair point, I will try later tonight. |
Yep, that's usually a good sign. |
See #610 for follow up on booting the kernel. |
Now that the two blocking issues have been triaged/dealt with. ClangBuiltLinux/linux#571 ClangBuiltLinux/linux#610 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Now that the two blocking issues have been triaged/dealt with. ClangBuiltLinux/linux#571 ClangBuiltLinux/linux#610 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
ioctl-8c74cc.zip
The text was updated successfully, but these errors were encountered: