-
Notifications
You must be signed in to change notification settings - Fork 1.6k
LoongArch64: Enable cmake cross-compilation #4904
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
Conversation
641474a to
30af927
Compare
|
This PR still uses old core names since it was issued before the Rename core PR #4900 was merged. I just did some tests and find that we should rename those old core names to new ones to avoid cmake errors. See below. System details: Loongson 3A6000 CPU, Debian sid, kernel 6.11.0, gcc 14.2.0, gfortran 14.2.0, cmake 3.30.4. cmake commands: The result: I then rename "LOONGSONGENERIC LOONGSON2K1000 LOONGSON3R5 " at line 98 in cmake/arch.cmake: Lines 97 to 99 in 624e9d1
to new core names "LA64_GENERIC LA264 LA464", and also rename old core names at lines 1352,1367,1383 in cmake/prebuild.cmake: Lines 1352 to 1383 in 624e9d1
to "LA64_GENERIC", "LA264", and "LA464" correspondingly. After these changes I observe that cmake errors for LOONGSON2K1000 and LOONGSON3R5 disappear. But a new cmake error appears: since there is no file called "kernel/loongarch64/KERNEL.LA64_GENERIC": Rename the file "kernel/loongarch64/KERNEL.LOONGSONGENERIC" to "kernel/loongarch64/KERNEL.LA64_GENERIC" the above cmake error disappears and the compilation works well. |
|
Yes, the #4904 was revised based on the old core name, and a patch is still needed to fix the cmake build after the core name revision. |
|
My fault for merging these in the wrong order, sorry. I'll try to fix this later today |

Refer to the following instructions:
Contents of
toolchain.cmake: