Skip to content

Commit

Permalink
Try change based on PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
roscopeco committed Oct 8, 2024
1 parent 720eea5 commit a58400e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions code/firmware/rosco_m68k_firmware/stage2/boot_menu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MAKEFLAGS += --no-builtin-rules

FLAGS=-ffunction-sections -fdata-sections -fomit-frame-pointer \
-Wall -Wextra -Werror -Wno-unused-function -pedantic \
-Wno-array-bounds -g -O2 $(DEFINES)
-g -O2 $(DEFINES)

CFLAGS=-std=c2x -Wno-format -Iwelcome/include $(FLAGS)
CXXFLAGS=-std=c++20 -fno-exceptions -fno-rtti $(FLAGS)
Expand Down Expand Up @@ -44,7 +44,23 @@ CP=cp

COPASM=$(XOSERA_M68K_API)/bin/copasm

ifeq ($(FIRMWARE_BUILD),true)
# GCC-version-specific settings
ifneq ($(findstring GCC,$(shell $(CC) --version 2>/dev/null)),)
CC_VERSION:=$(shell $(CC) -dumpfullversion)
CC_MAJOR:=$(firstword $(subst ., ,$(CC_VERSION)))
# If this is GCC 12, 13, or 14, add flag --param=min-pagesize=0 to CFLAGS
ifeq ($(CC_MAJOR),12)
CFLAGS+=--param=min-pagesize=0
endif
ifeq ($(CC_MAJOR),13)
CFLAGS+=--param=min-pagesize=0
endif
ifeq ($(CC_MAJOR),14)
CFLAGS+=--param=min-pagesize=0
endif
endif

ifeq ($(FIRMWARE_BUILD), true)
DEFINES+=-DROSCO_M68K_FIRMWARE
endif

Expand Down

0 comments on commit a58400e

Please sign in to comment.