-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mips: Build system is not aligned with other platforms #6588
Copy link
Copy link
Closed
Labels
Platform: MIPSPlatform: This PR/issue effects MIPS-based platformsPlatform: This PR/issue effects MIPS-based platformsType: cleanupThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT
Metadata
Metadata
Assignees
Labels
Platform: MIPSPlatform: This PR/issue effects MIPS-based platformsPlatform: This PR/issue effects MIPS-based platformsType: cleanupThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT
There are some issues with the current Makefile.include for the recently added mips CPU family.
USEMODULE += newlibis missing/commented out$(MIPS_ELF_ROOT)/share/mips/rules/mipshal.mkThere are parts of the code, especially in vfs: file system abstraction #5616, where we need to take a particular path if newlib is used as the C library (as opposed to msp-libc or avr-libc). It requires that we can test
#if MODULE_NEWLIBwithin the C code.I didn't get the mipshal.mk file when I installed a mips bare-metal toolchain from scratch on my system (GCC+Newlib). Looking at the file in the riot/riotbuild Docker image I can see that we could just copy parts of it into cpu/mips_common and use it from there.
The Docker issues would be resolved if the makefile did not have the ifeq/error clause at the top and did not depend on the mipshal.mk file being found on the system.
Using the shared toolchain Makefiles makes it easier to support other toolchains in the future, for example LLVM/Clang, as alternatives to the standard GCC toolchain. It also takes care of setting all relevant tool command names so that we don't have to repeat the commands for every CPU family which uses GCC.