Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ help:
make install create raspi kernel and mount it on a bootable partition\n\
make prepare-fs create directories for the filesystem\n\n"\
\n\
Use 'make V=1' for verbose build output.
Use 'make V=1' for verbose build output.\n\
Use 'make RELEASE=1' for optimized release build (currently broken).
8 changes: 7 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ AR := $(ARCH)-ar
OBJCOPY := $(ARCH)-objcopy

COMMON_FLAGS ?= -ffreestanding -nostdlib -fno-exceptions -fno-unwind-tables \
-fno-asynchronous-unwind-tables -g -O0 -Wall -Wextra \
-fno-asynchronous-unwind-tables -Wall -Wextra \
-Wno-unused-parameter -Wno-address-of-packed-member \
-mcpu=cortex-a72

ifeq ($(RELEASE), 1)
COMMON_FLAGS += -O3 -s -DNDEBUG
else
COMMON_FLAGS += -O0 -g
endif

CFLAGS_BASE ?= $(COMMON_FLAGS) -std=c17
CXXFLAGS_BASE ?= $(COMMON_FLAGS) -fno-rtti
LDFLAGS_BASE ?=
Expand Down