diff options
Diffstat (limited to 'qemu-arm')
-rw-r--r-- | qemu-arm/Makefile | 3 | ||||
-rw-r--r-- | qemu-arm/test_main.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/qemu-arm/Makefile b/qemu-arm/Makefile index 31ba6baa26..d09282a1e8 100644 --- a/qemu-arm/Makefile +++ b/qemu-arm/Makefile @@ -53,6 +53,9 @@ OBJ_TEST += $(addprefix $(BUILD)/, $(SRC_TEST_C:.c=.o)) OBJ_TEST += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ_TEST += $(BUILD)/tinytest.o +# we can't use LTO for nlrthumb.c because it contains inline assembler +$(PY_BUILD)/nlrthumb.o: CFLAGS += -fno-lto + all: run run: $(BUILD)/firmware.elf diff --git a/qemu-arm/test_main.c b/qemu-arm/test_main.c index 6b935bbab0..ae2beabcd0 100644 --- a/qemu-arm/test_main.c +++ b/qemu-arm/test_main.c @@ -73,7 +73,7 @@ void gc_collect(void) { void *sp = (void*)&dummy; // trace the stack, including the registers (since they live on the stack in this function) - gc_collect_root((void**)sp, ((uint32_t)MP_STATE_VM(stack_top) - (uint32_t)sp) / sizeof(uint32_t)); + gc_collect_root((void**)sp, ((uint32_t)MP_STATE_THREAD(stack_top) - (uint32_t)sp) / sizeof(uint32_t)); gc_collect_end(); } |