From 3fd6e6bda7e8b5a7c5ffb1498419006179abf9e4 Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Sat, 22 Jun 2024 11:13:51 +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..e9c572973 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,10 @@ ifeq (,$(ARCH)) ARCH = $(shell uname -m) endif +ifeq ($(shell uname -m),aarch64) + CPUFLAGS += -DPAGESIZE=$(or $(shell getconf PAGESIZE),4096) +endif + # Target Dynarec WITH_DYNAREC ?= $(ARCH)