From c9a777c63a0848783a5c626b3b80f6e40a341a34 Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Sat, 22 Jun 2024 11:00:24 +0300 Subject: [PATCH] linux: get page size at build time fixes RPi 5 16 KB page size, not working if cross-compiling --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 3a6388549..5cac7302c 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,10 @@ ifeq (,$(ARCH)) ARCH = $(shell uname -m) endif +ifeq ($(UNAME),aarch64) + CPUFLAGS += -DPAGESIZE=$(or $(shell getconf PAGESIZE),4096) +endif + # Target Dynarec WITH_DYNAREC ?= $(ARCH)