diff --git a/arm11/Makefile b/arm11/Makefile index 8664b86..c889f4b 100644 --- a/arm11/Makefile +++ b/arm11/Makefile @@ -42,12 +42,12 @@ CFLAGS := $(ARCH) -std=c17 -O2 -gdwarf-4 -flto -mword-relocations \ -ffunction-sections -fno-math-errno -Wall -Wextra CFLAGS += $(INCLUDE) $(DEFINES) -CXXFLAGS := $(ARCH) -std=c++17 -O2 -gdwarf-4 -fno-rtti -fno-exceptions \ +CXXFLAGS := $(ARCH) -std=c++17 -O2 -flto -gdwarf-4 -fno-rtti -fno-exceptions \ -mword-relocations -ffunction-sections -fno-math-errno -Wall -Wextra CXXFLAGS += $(INCLUDE) $(DEFINES) ASFLAGS := $(ARCH) -gdwarf-4 -flto $(INCLUDE) $(DEFINES) -LDFLAGS = $(ARCH) -gdwarf-4 -flto -specs=../arm11.specs -Wl,-Map,$(notdir $*.map) -nostartfiles +LDFLAGS = $(ARCH) -gdwarf-4 -flto -specs=../arm11.specs -Wl,-Map,$(notdir $*.map) -nostartfiles -Wl,-wrap=malloc,-wrap=calloc,-wrap=free ifeq ($(strip $(NO_DEBUG)),) CFLAGS := $(subst -flto,,$(CFLAGS)) -fstack-protector-strong -fno-inline