Skip to content

Commit 2f605fd

Browse files
remy-luisantstephanosio
authored andcommitted
config: Disable the GP register optimizations on MIPS
This change turns off the use of the GP register for small global data items on MIPS. Compilers on MIPS customarily use a dedicated global register for access to a pool of small data items. This is not currently supported by the MIPS port. Disabling the use of the optimizations is harmless, the values will be treated like large data. This is slower and produces slightly larger code. However, disabling the optimization simplifies the code and allows the port to make progress. The impact is limited only to code dealing with global values. The change was tested and all testcases are now passing. Without it there are 16 failing testcases. Signed-off-by: Remy Luisant <[email protected]> Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 67d9f59 commit 2f605fd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

configs/mips.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CT_LOCAL_TARBALLS_DIR="${CT_PREFIX:-${HOME}/x-tools}/sources"
55
# CT_LOG_PROGRESS_BAR is not set
66
CT_ARCH_MIPS=y
77
CT_MULTILIB=y
8+
CT_TARGET_CFLAGS="-G0 -mno-gpopt"
89
CT_TARGET_VENDOR="zephyr"
910
CT_BINUTILS_SRC_DEVEL=y
1011
CT_BINUTILS_DEVEL_URL="https://github.com/zephyrproject-rtos/binutils-gdb.git"

release-notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- gcc:
66
* Added multilibs for the RISC-V RV32E targets.
7+
* Disabled MIPS GP register optimisation, which is not supported by the
8+
Zephyr MIPS architecture port.
79

810
- newlib:
911
* Enabled C99 format specifier support for newlib full variant.

0 commit comments

Comments
 (0)