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

[COMPILER REQUEST]: New architecture LoongArch GCC support #4162

Closed
specialpointcentral opened this issue Oct 15, 2022 · 10 comments · Fixed by #4196
Closed

[COMPILER REQUEST]: New architecture LoongArch GCC support #4162

specialpointcentral opened this issue Oct 15, 2022 · 10 comments · Fixed by #4196
Assignees
Labels
new-compilers request Request for something

Comments

@specialpointcentral
Copy link

Compiler name

GCC

Compiler version

gcc-12.2.0

Compiler language

C++, Assembly, C

Compiler homepage

https://gcc.gnu.org/

Motivation

LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V, and today Linux/GCC/LLVM etc. support LoongArch. So I want to support this new architecture.
I have opened an PR at gcc-cross-builder, and what do I need to do next?

Thanks.

@specialpointcentral specialpointcentral changed the title [COMPILER REQUEST]: [COMPILER REQUEST]: New architecture LoongArch GCC support Oct 15, 2022
@dkm
Copy link
Member

dkm commented Oct 22, 2022

Hey, thanks for the initial PR for gcc-cross-builder. I'll bump the ct-ng revision to have your latest change in the dockerimage.
You also need a change in the infra repository (to be able to install the compiler after it has been built from gcc-cross-builder) and the config changes in compiler-explorer.

I see you only have C/C++ enabled. Usually I try to enable as much lang as possible: Ada, D, Go, Fortran... I'll try that locally and see how it works :)

@dkm
Copy link
Member

dkm commented Oct 22, 2022

Running a build now to check it works and if we can enable more languages.

@dkm
Copy link
Member

dkm commented Oct 22, 2022

"[ERROR] configure: error: "libffi has not been ported to loongarch64-unknown-linux-gnu.""
Not sure what is causing this yet (what depends on libffi)

@dkm
Copy link
Member

dkm commented Oct 22, 2022

Hmmm, probably Go

@dkm
Copy link
Member

dkm commented Oct 22, 2022

c/c++/objc/d/fortran OK
Ada/Go KO

:)

dkm added a commit to compiler-explorer/gcc-cross-builder that referenced this issue Oct 22, 2022
Bump crosstool-ng for upcoming loongarch64 support

refs compiler-explorer/compiler-explorer#4162
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
@specialpointcentral
Copy link
Author

Thanks a lot for testing other types of compilers.
I think c/c++/fortran are fine because I have used them before, but I am not sure if objc/d are supported. Also, I know that Ada/Go are not supported yet. :-)

@dkm dkm self-assigned this Oct 23, 2022
@dkm
Copy link
Member

dkm commented Oct 23, 2022

I'll build the compiler later today and proceed with the testing and needed changes in infra and config. Thanks @specialpointcentral !

@specialpointcentral
Copy link
Author

Great! Thanks. 👍

@dkm
Copy link
Member

dkm commented Oct 24, 2022

TODO:

dkm added a commit to compiler-explorer/infra that referenced this issue Oct 24, 2022
Add 1 compiler for the Loongarch64 that has been introduced in GCC 12:
 https://gcc.gnu.org/gcc-12/changes.html

refs compiler-explorer/compiler-explorer#4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
dkm added a commit that referenced this issue Oct 24, 2022
Add config for newly supported target: Loongarch64

Our support starts from GCC 12.2.0 for C, C++, Fortran and D.

fixes #4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
@dkm
Copy link
Member

dkm commented Oct 24, 2022

After testing, seems that D is not OK, same issue as with sh. Hopefully will be fixed in GCC 13.
I'll need to fix config, rebuild and rework the config changes

See:
#4096 (comment)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107101

dkm added a commit to compiler-explorer/gcc-cross-builder that referenced this issue Oct 24, 2022
The compiler builds, but needs extra workaround to get it working.

See GCC opened PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107101

refs compiler-explorer/compiler-explorer#4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
dkm added a commit that referenced this issue Oct 24, 2022
Add config for newly supported target: Loongarch64

Our support starts from GCC 12.2.0 for C, C++ and Fortran.

fixes #4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
dkm added a commit that referenced this issue Oct 25, 2022
Add config for newly supported target: Loongarch64

Our support starts from GCC 12.2.0 for C, C++ and Fortran.

Also fix minor naming inconsistency for sh gcc for c/c++.

fixes #4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
dkm added a commit to compiler-explorer/infra that referenced this issue Oct 31, 2022
Add 1 compiler for the Loongarch64 that has been introduced in GCC 12:
 https://gcc.gnu.org/gcc-12/changes.html

refs compiler-explorer/compiler-explorer#4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
@dkm dkm closed this as completed in #4196 Nov 4, 2022
dkm added a commit that referenced this issue Nov 4, 2022
Add config for newly supported target: Loongarch64

Our support starts from GCC 12.2.0 for C, C++ and Fortran.

Also fix minor naming inconsistency for sh gcc for c/c++.

fixes #4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
mattgodbolt pushed a commit to compiler-explorer/infra that referenced this issue Dec 19, 2022
Add 1 compiler for the Loongarch64 that has been introduced in GCC 12:
 https://gcc.gnu.org/gcc-12/changes.html

refs compiler-explorer/compiler-explorer#4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
mattgodbolt pushed a commit that referenced this issue Dec 20, 2022
Add config for newly supported target: Loongarch64

Our support starts from GCC 12.2.0 for C, C++ and Fortran.

Also fix minor naming inconsistency for sh gcc for c/c++.

fixes #4162

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-compilers request Request for something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants