From b59ca5142ad3a654dc173d598b826f5f453ae52b Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Tue, 29 Mar 2022 16:45:08 -0700 Subject: [PATCH] pc hosted: Don't try to report memory usage. When building on a pc gcc does not have that parameter and clang fails with an error. This caused a build regression on Mac. --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 15e9a7e4..30fd4d14 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,11 +61,14 @@ SRC = \ stm32g0.c \ target.c \ -# Output memory usage information -LDFLAGS += -Wl,--print-memory-usage include $(PLATFORM_DIR)/Makefile.inc +ifneq ($(PC_HOSTED),1) +# Output memory usage information +LDFLAGS += -Wl,--print-memory-usage +endif + OPT_FLAGS ?= -Os CFLAGS += $(OPT_FLAGS) LDFLAGS += $(OPT_FLAGS)