8000 unix/Makefile: Disable error compression on arm-linux-gnueabi-gcc. · codemee/micropython@0c2cadf · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c2cadf

Browse files
jimmodpgeorge
authored andcommitted
unix/Makefile: Disable error compression on arm-linux-gnueabi-gcc.
This compiler is unable to optimise out the giant strcmp match generated by MP_MATCH_COMPRESSED. See github.com/micropython/pull/7659#issuecomment-899479793 Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
1 parent e25c5cb commit 0c2cadf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ports/unix/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ else
290290
RUN_TESTS_MPY_CROSS_FLAGS = --mpy-cross-flags='-mcache-lookup-bc'
291291
endif
292292

293+
ifeq ($(CROSS_COMPILE),arm-linux-gnueabi-)
294+
# Force disable error text compression when compiling for ARM as the compiler
295+
# cannot optimise out the giant strcmp list generated for MP_MATCH_COMPRESSED.
296+
# Checked on:
297+
# arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
298+
# arm-linux-gnueabi-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
299+
# See https://github.com/micropython/micropython/pull/7659 for details.
300+
$(info Detected arm-linux-gnueabi-gcc. Disabling error message compression.)
301+
MICROPY_ROM_TEXT_COMPRESSION = 0
302+
endif
303+
293304
include $(TOP)/py/mkrules.mk
294305

295306
.PHONY: test test_full

0 commit comments

Comments
 (0)
0