Skip to content

Conversation

wenyunwei
Copy link

Add mips arch support. Test on loongson cloud platform(base on loongson 3A4000)

I noted that there was a pull request before, but it was rejected. The main reason is mongodb version too old, and you don't have test machine for mips arch.
We have modified and tested it in the master brach.
If necessary, We can provide a mips arch test environment by an account of loongson cloud platform.

In the third party, most of the changes are related to the configuratin of the arch. Only "mozjs-60" and "wiredtiger" require some simple source code changes.

ChangeLog:

  1. Modify ./SConstruct. Add mips arch configuration.
  2. Modify ./thrid_party/IntelRDFPMathLib20U1/SConscript. Add mips arch configuration.
  3. Modify ./thrid_party/gperftools-2.7. Add mips arch support. Auto-generate source code by shell script "import.sh" and "host_config.sh".
  4. Modify ./thrid_party/mozjs-60. Get source code by shell script "get-sources.sh", generate source code by command "./gen-config.sh mips64el linux" and "./extract.sh". Modify source code for mips arch support.
  5. Modify ./thrid_party/wiredtiger. Add mips arch configuration in "SConstruct" and "SConscript". Modify crc32 function. Add mips arch path to filelist.

Changlog:
1.
修改根目录下的scons编译配置文件“SConstruct”
	增加mips架构处理器配置支持。

2.
增加mips架构暂停宏定义MONGO_YIELD_CORE_FOR_SMT(汇编)到头文件pause.h中。

3.
third_party
	IntelRDFPMathLib20U1
		增加mips架构编译配置。

4.
third_party
	gperftools
		通过脚本,platform增加mips架构支持源码。

5.
third_party
	mozjs
		通过脚本“./get-sources.sh ”从官源下载mozjs源码。
		在脚本gen-config.sh中,增加生成mips架构源码的配置,利用脚本“./gen-config.sh mips64el linux”自动生成mips架构源码到platform文件夹中。
		通过脚本./extract.sh生成mongodb所需源码并修改完善。

6.
third_party
	wiredtiger
		修改scons编译配置文件及脚本“SConstruct”和“SConscript”。
		增加mips架构下的crc32算法代码支持。(当前不支持硬件加速计算)
		增加mips架构源码路径配置到filelist中。
@kelly-cs
Copy link
Contributor

kelly-cs commented Oct 3, 2025

Hi @wenyunwei. I am cleaning up our pull request queue and saw this was from 5 years ago, and we have many changes since then.

I am going to close this PR - if you make another one, can you please also create a new SERVER ticket on JIRA so we can track and prioritize this?

Thanks!

@kelly-cs kelly-cs closed this Oct 3, 2025
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

Successfully merging this pull request may close these issues.

2 participants