-
Notifications
You must be signed in to change notification settings - Fork 8
test PPC with LLVM_IAS=1 #265
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
Comments
It also needs the hwsync suport which is already merged in LLVM. |
With D115419 applied and Linux at commit 112450df61b7 ("Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux"), we get closer to building a
This is ClangBuiltLinux/linux#774. If I quickly hack around that error: diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index 3c5baaa6f1e7..45dc62ba1541 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -39,6 +39,8 @@ asflags-y := -D__VDSO64__ -s
targets += vdso64.lds
CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
+vdsold-$(CONFIG_LD_IS_LLD) := -fuse-ld=lld
+
# link rule for the .so file, .lds has to be first
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday.o FORCE
$(call if_changed,vdso64ld_and_check)
@@ -53,4 +55,4 @@ include/generated/vdso64-offsets.h: $(obj)/vdso64.so.dbg FORCE
# actual build commands
quiet_cmd_vdso64ld_and_check = VDSO64L $@
- cmd_vdso64ld_and_check = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check)
+ cmd_vdso64ld_and_check = $(CC) $(c_flags) $(vdsold-y) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check) I get another one:
Looks like
Very close! |
That's great!
Should be an easy fix? |
When I looked last time I explored this for hermetic builds a couple of years ago, it was not super apparent what the fix should be because it sounds like |
Do you have a link to the discussion from a couple of years ago? AFAIK the wrapper is not used in any other projects, although that was the idea of it originally. It is potentially called by other scripts from outside the kernel tree. I think in the old days maybe some distro scripts called it, but I think the modern distros don't. Possibly some 32-bit embedded stuff still uses it. Also eg. see torvalds/linux@528229d, which talks about "the signing tool" calling the wrapper script. I'm not sure that signing tool was ever released, and it's basically dead now, but that's the kind of thing we have to keep in mind, external scripts that call the wrapper and expect it to behave a certain way. So the main thing is to make any change backward compatible, if possible. ie. so that an existing caller will get the same behaviour it used to. What is the LLVM alternative to |
I have tried to find it but I do not recall ever bringing this up to upstream, so I could be misremembering something... shrugs
Ack. I have hacked something up that works for
However, the build fails when building
If I apply the same fix as commit 4c078c86b4a4 ("powerpc/boot/wrapper: Add "-z notext" flag to disable diagnostic") to the There was one other issue I noticed with
|
I realized that |
just noting that https://reviews.llvm.org/D115419 is merged. |
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
I am reopening this due to #324 and ClangBuiltLinux/linux#1581. I build tested it locally but did not boot test. I will likely just build these configurations with |
So we have a few different ways to work around ClangBuiltLinux/linux#1581:
@nickdesaulniers do you have a preference? |
3 |
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. The distribution configs link with ld.bfd for the time being due to an outstanding boot failure when the kernel is linked with ld.lld. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
IMHO Our relocation code is primitive, it runs very very early in boot, and no doubt it could be improved, but it has worked for the last ~13 years with no issue. |
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
On mainline, SUSE's configuration needs to build with LLVM_IAS=0 because of ClangBuiltLinux/linux#1418. Closes: ClangBuiltLinux#265 Signed-off-by: Nathan Chancellor <[email protected]>
@aik sent a series for enabling LLVM_IAS=1. @mpe accepted it, so it should be in linux-next soon. The cover letter mentions we need https://reviews.llvm.org/D115419 that @nemanjai is working on. As soon as that lands, we should be able to start testing probably our ppc64le configs on linux-next with clang-14 with LLVM_IAS=1 enabled.
The text was updated successfully, but these errors were encountered: