From 746b68befcce99ef9f2f75684279e677da64915e Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 20 Feb 2022 08:20:21 +0800 Subject: [PATCH] boards/sim: Rename ARCHCPUFLAGS[XX] to ARCHC[XX]FLAGS follow other board files usage Signed-off-by: Xiang Xiao --- boards/sim/sim/sim/scripts/Make.defs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 09c6a5989d..c9b4dd634f 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -59,10 +59,13 @@ ifeq ($(CONFIG_ARCH_COVERAGE),y) ARCHOPTIMIZATION += -fprofile-arcs -ftest-coverage endif -ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -nostdinc++ +# Add -fno-common because macOS "ld -r" doesn't seem to pick objects +# for common symbols. +ARCHCFLAGS = -fno-common -fno-builtin +ARCHCXXFLAGS = -fno-common -fno-builtin -nostdinc++ + ifeq ($(CONFIG_CXX_EXCEPTION),) - ARCHCPUFLAGSXX += -fno-exceptions -fcheck-new + ARCHCXXFLAGS += -fno-exceptions -fcheck-new endif ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef @@ -71,17 +74,12 @@ ARCHWARNINGSXX = -Wall -Wshadow -Wundef # Add -fvisibility=hidden # Because we don't want export nuttx's symbols to share libraries -ARCHCPUFLAGS += -fvisibility=hidden -ARCHCPUFLAGSXX += -fvisibility=hidden - -# Add -fno-common because macOS "ld -r" doesn't seem to pick objects -# for common symbols. -ARCHCPUFLAGS += -fno-common -ARCHCPUFLAGSXX += -fno-common +ARCHCFLAGS += -fvisibility=hidden +ARCHCXXFLAGS += -fvisibility=hidden ifeq ($(CONFIG_SIM_M32),y) - ARCHCPUFLAGS += -m32 - ARCHCPUFLAGSXX += -m32 + ARCHCFLAGS += -m32 + ARCHCXXFLAGS += -m32 endif CC = $(CROSSDEV)cc @@ -101,9 +99,9 @@ OBJDUMP = $(CROSSDEV)objdump RUSTC = rustc --edition 2021 CFLAGS := $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe + $(ARCHCFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe CXXFLAGS := $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGSXX) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe + $(ARCHCXXFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) AFLAGS := $(CFLAGS) -D__ASSEMBLY__ RUSTFLAGS := $(ARCHOPTIMIZATIONRUST) @@ -244,4 +242,4 @@ else endif HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(EXTRAFLAGS) -D__SIM__ -pipe + $(ARCHCFLAGS) $(HOSTINCLUDES) $(EXTRAFLAGS) -D__SIM__ -pipe