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

The default ABIs among mips64{,el} GCC are inconsistent #67

Open
Rongronggg9 opened this issue Dec 19, 2023 · 3 comments
Open

The default ABIs among mips64{,el} GCC are inconsistent #67

Rongronggg9 opened this issue Dec 19, 2023 · 3 comments

Comments

@Rongronggg9
Copy link

Rongronggg9 commented Dec 19, 2023

$ cd build/latest
$ grep CT_ARCH_mips_ABI mips64*
mips64-11.2.0.config:CT_ARCH_mips_ABI="64"
mips64-12.1.0.config:CT_ARCH_mips_ABI="64"
mips64-12.2.0.config:CT_ARCH_mips_ABI="64"
mips64-12.3.0.config:CT_ARCH_mips_ABI="64"
mips64-13.1.0.config:CT_ARCH_mips_ABI="64"
mips64-13.2.0.config:CT_ARCH_mips_ABI="64"
mips64-4.9.4.config:CT_ARCH_mips_ABI="n32"
mips64-5.5.0.config:CT_ARCH_mips_ABI="n32"
mips64-9.5.0.config:CT_ARCH_mips_ABI="n32"
mips64el-12.1.0.config:CT_ARCH_mips_ABI="32"
mips64el-12.2.0.config:CT_ARCH_mips_ABI="32"
mips64el-12.3.0.config:CT_ARCH_mips_ABI="32"
mips64el-13.1.0.config:CT_ARCH_mips_ABI="32"
mips64el-13.2.0.config:CT_ARCH_mips_ABI="32"
mips64el-4.9.4.config:CT_ARCH_mips_ABI="n32"
mips64el-5.5.0.config:CT_ARCH_mips_ABI="n32"
mips64el-9.5.0.config:CT_ARCH_mips_ABI="n32"

Is this intended? In theory, all 64-bit MIPS targets should default to the N64 ABI, which should set CT_ARCH_mips_ABI="64".

If not, I am willing to open a PR and fix it.

@Rongronggg9
Copy link
Author

Rongronggg9 commented Dec 19, 2023

Furthermore, configurations of the same GCC version should be consistent except for the endianness. However, only the recently-merged configurations, which are mips64{,el}-{4.9.4,5.5.0,9.5.0}.config, fit the above assumption, while the others are not. The difference between, for example, mips64{,el}-13.2.0.config, is so huge that even floating point (hard/soft) and libc are different.

Should it be a mistake, we may need to make a further fix.

@maringuu
Copy link
Contributor

According to this comment this is neither intended nor unintended.
It simply is this way because nobody cared.

I personally would be happy if the configurations were consistent.

@pinskia
Copy link

pinskia commented Sep 22, 2024

Note most mips64-linux-gnu gcc cross compilers default to n32 (which is the default one without supplying an extra option to configure) , the only ones I know of which don't were the octeon ones but that was over 5 years ago so things might have changed since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants