-
Notifications
You must be signed in to change notification settings - Fork 14
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
s390: ld.lld: error: unknown emulation: elf64_s390 #1524
Comments
s390 is supported by |
The error actually comes from https://github.com/llvm/llvm-project/blob/2f16b87b4b1d3fee07aff71a9bf79c3a8d514e7a/lld/ELF/Driver.cpp#L138-L174. There is no s390 file in |
Yes, there is currently no support for s390x as a target in lld. We are not currently planning to add this in the near time - so far we have not seen any particular use case where lld would be required / provide benefit over ld. |
The s390 folks have updated their asm to work with the integrated assembler. Enable it for s390 builds on -next. We cannot switch to LLVM=1 because ld.lld and llvm-objcopy do not support s390: ClangBuiltLinux/linux#1524 ClangBuiltLinux/linux#1530 For now, we will just use 'CC=clang LLVM_IAS=1'. Closes: ClangBuiltLinux#363 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
…inline The s390 folks have updated their asm to work with the integrated assembler. Enable it for s390 builds on -next and mainline. We cannot switch to LLVM=1 because ld.lld and llvm-objcopy do not support s390: ClangBuiltLinux/linux#1524 ClangBuiltLinux/linux#1530 For now, we will just use 'CC=clang LLVM_IAS=1'. Closes: ClangBuiltLinux#363 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
The kernel needed some changes, which I have sent https://lore.kernel.org/20240207-s390-lld-and-orphan-warn-v1-0-8a665b3346ab@kernel.org/ after testing the LLVM pull request with both Clang and GCC. |
The LLVM pull request has been merged: llvm/llvm-project@fe3406e I am going to close this issue up, as this particular error has been fixed with that change. We still need I have filed issues for each of the distinct problems I have seen on the Linux side in my testing of that pull request so that they can be tracked properly. Once apt.llvm.org includes the above ClangBuiltLinux/continuous-integration2#710 Thanks again @uweigand for resolving this, it was awesome to see how much more robust the kernel gets now that there is a second linker implementation that we can use :) |
Kernel version is 5.16rc3 and 5.15.5. As
arch/s390/Kconfig
has the following line, s390 seems somewhat supported by clang:A config similar to
allmodconfig
gives the following error at an early stage of build:It can be reproduced by the below script:
The text was updated successfully, but these errors were encountered: