Skip to content
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

Tracking issue for CONFIG_MODULES on LoongArch #1884

Closed
xen0n opened this issue Jul 10, 2023 · 7 comments
Closed

Tracking issue for CONFIG_MODULES on LoongArch #1884

xen0n opened this issue Jul 10, 2023 · 7 comments
Labels
[ARCH] loongarch This bug impacts ARCH=loongarch [BUG] llvm A bug that should be fixed in upstream LLVM [FIXED][LLVM] 18 This bug was fixed in LLVM 18

Comments

@xen0n
Copy link
Member

xen0n commented Jul 10, 2023

Follow-up issue for #1787.

Currently one cannot build a working kernel with CONFIG_MODULES=y and with Clang/LLD, because of missing Clang support for __attribute__((model("extreme"))). This issue tracks the work towards support for said attribute and enabling modular LoongArch kernel builds.

Implementing this may require deep plumbing inside LLVM/Clang (straight down to LLVM IR-level addition), per the recent discussion, and I expect the relevant changes to hit LLVM 18 (LLVM 17 will branch later this month so it's probably not good to rush an LLVM IR change into it).

@nickdesaulniers nickdesaulniers added [ARCH] loongarch This bug impacts ARCH=loongarch [BUG] llvm A bug that should be fixed in upstream LLVM labels Jul 10, 2023
@heiher
Copy link
Member

heiher commented Nov 21, 2023

@nathanchance
Copy link
Member

Is the plan for Linux to use the large code model attribute instead of extreme or will there be a follow up commit to add extreme for the kernel later?

@heiher
Copy link
Member

heiher commented Nov 22, 2023

Is the plan for Linux to use the large code model attribute instead of extreme or will there be a follow up commit to add extreme for the kernel later?

heiher@e540e0f

Perhaps there could be aliases to eliminate differences.

@xen0n
Copy link
Member Author

xen0n commented Nov 22, 2023

Is the plan for Linux to use the large code model attribute instead of extreme or will there be a follow up commit to add extreme for the kernel later?

heiher@e540e0f

Perhaps there could be aliases to eliminate differences.

Yeah I'd suggest adding support for model("extreme") as alias of large in the LoongArch Clang frontend (if that's the proper way to go).

@heiher
Copy link
Member

heiher commented Jan 6, 2024

Fixed by:
llvm/llvm-project#72077
llvm/llvm-project#72078
llvm/llvm-project#72079

@nathanchance
Copy link
Member

Indeed, I can confirm that with ToT LLVM, we are now able to build and boot ARCH=loongarch defconfig without disabling any configurations :)

I wonder if we can deal with #1941 now by setting the minimum supported version of clang for ARCH=loongarch to 18.0.0?

@nathanchance nathanchance added the [FIXED][LLVM] 18 This bug was fixed in LLVM 18 label Jan 7, 2024
@xen0n
Copy link
Member Author

xen0n commented Jan 7, 2024

Indeed, I can confirm that with ToT LLVM, we are now able to build and boot ARCH=loongarch defconfig without disabling any configurations :)

I wonder if we can deal with #1941 now by setting the minimum supported version of clang for ARCH=loongarch to 18.0.0?

Yeah I think so, as all that Huacai asked for is working defconfig builds, which we just achieved before the LLVM 18 code freeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] loongarch This bug impacts ARCH=loongarch [BUG] llvm A bug that should be fixed in upstream LLVM [FIXED][LLVM] 18 This bug was fixed in LLVM 18
Projects
None yet
Development

No branches or pull requests

4 participants