From 86ba43a25b9162198d9f3f95c690f3b99b07b4a0 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Sun, 3 Mar 2024 20:58:29 +0800 Subject: [PATCH] fix: see NJU-ProjectN/nemu#85 --- nemu/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nemu/Makefile b/nemu/Makefile index 4c7ed77..0f360fe 100644 --- a/nemu/Makefile +++ b/nemu/Makefile @@ -40,7 +40,9 @@ SRCS-y += $(shell find -L $(DIRS-y) -name "*.c") SRCS = $(filter-out $(SRCS-BLACKLIST-y),$(SRCS-y)) # Extract compiler and options from menuconfig +ifneq ($(CONFIG_CC),) CC = $(call remove_quote,$(CONFIG_CC)) +endif CFLAGS_BUILD += $(call remove_quote,$(CONFIG_CC_OPT)) CFLAGS_BUILD += $(if $(CONFIG_CC_LTO),-flto,) CFLAGS_BUILD += $(if $(CONFIG_CC_DEBUG),-Og -ggdb3,)