aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-09-10 15:26:59 +0200
committerBad Diode <bd@badd10de.dev>2021-09-10 15:26:59 +0200
commitea02a49f9aa46a77aaef74f0d1c743332593b217 (patch)
tree0262c687ce4aea53863d7d0c7068b93e53faede7 /Makefile
parenta1bc2913625b45c6ac28b856b8ee2051489479b7 (diff)
downloaduxnrpi-ea02a49f9aa46a77aaef74f0d1c743332593b217.tar.gz
uxnrpi-ea02a49f9aa46a77aaef74f0d1c743332593b217.zip
Force non inline of 16 bit memory poking functions
On the Raspberry Pi 4, the compiler was inlining mempoke16 and doing some other optimizations on it, which I presume break the memory alignment requirements on aarch64. By adding __attribute__ ((noinline)) to the uxn functions that deal with 16 bit operations, we can turn back -O2 compiler optimizations and the code works properly again on hardware.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1fced4f..348d974 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ OBJ_START = $(BUILD_DIR)/start.o
23OBJ_MAIN = $(BUILD_DIR)/main.o 23OBJ_MAIN = $(BUILD_DIR)/main.o
24SRC_LINK = $(SRC_DIR)/linker.ld 24SRC_LINK = $(SRC_DIR)/linker.ld
25 25
26CFLAGS := -Wall -ffreestanding -O1 -nostdlib -lgcc -mgeneral-regs-only -fstack-protector 26CFLAGS := -Wall -ffreestanding -O2 -nostdlib -lgcc -mgeneral-regs-only -fstack-protector
27CFLAGS += -DRPI_VERSION=$(RPI_VERSION) 27CFLAGS += -DRPI_VERSION=$(RPI_VERSION)
28AFLAGS := 28AFLAGS :=
29LDFLAGS := 29LDFLAGS :=