From 31bdf771ee4732624d0557df9915cdec1923cbe4 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 23 Jun 2024 21:11:24 +0300 Subject: [PATCH] testpico: adjust for gcc12 --- testpico/Makefile | 4 ++++ testpico/main.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/testpico/Makefile b/testpico/Makefile index b8c7988..4ee38fd 100644 --- a/testpico/Makefile +++ b/testpico/Makefile @@ -16,6 +16,10 @@ CFLAGS += -Wall -g -O2 -m68000 -fomit-frame-pointer LDLIBS_LIBGCC := $(shell $(CC) -print-file-name=libgcc.a) LDLIBS += $(LDLIBS_LIBGCC) +ifeq ($(shell m68k-elf-gcc -dD -E -c - --param=min-pagesize=0 < /dev/null > /dev/null 2>&1 && echo ok),ok) +CFLAGS += --param=min-pagesize=0 +endif + SUFFIX := $(shell git describe --always --dirty) ifdef PICO CFLAGS += -DPICO diff --git a/testpico/main.c b/testpico/main.c index 43da6e6..1e995dd 100644 --- a/testpico/main.c +++ b/testpico/main.c @@ -2234,7 +2234,7 @@ static int t_32x_reset_prep(void) r16[0x8a/2] = 0x0001; mem_barrier(); for (i = 0; i < 220/2; i++) - fbl[i] = 0; + write32(&fbl[i], 0); r8 [0x81] = 1; r16[0x82/2] = 0xffff; r16[0x84/2] = 0xffff; -- 2.39.5