sim/nsh2: remove the specific Make.defs

Change-Id: If9204619c343993cecbf92c1b8d64a48480110e8
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2020-04-17 17:25:18 +08:00 committed by patacongo
parent c758cb8341
commit 3dd094520c

View File

@ -1,147 +0,0 @@
############################################################################
# boards/sim/sim/sim/configs/nsh2/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"}
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += -O2 -fno-strict-aliasing
endif
ARCHCPUFLAGS = -fno-builtin
ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHDEFINES =
ARCHDEFINESXX = -DCONFIG_WCHAR_BUILTIN
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT =
# Add -fno-common because macOS "ld -r" doesn't seem to pick objects
# for common symbols.
ARCHCPUFLAGS += -fno-common
ARCHCPUFLAGSXX += -fno-common
ifeq ($(CONFIG_SIM_M32),y)
ARCHCPUFLAGS += -m32
ARCHCPUFLAGSXX += -m32
endif
CROSSDEV =
CC = $(CROSSDEV)cc
CXX = $(CROSSDEV)c++
CPP = $(CROSSDEV)cc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINESXX) $(EXTRAFLAGS) -pipe
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
# Loadable module definitions
CMODULEFLAGS = $(CFLAGS)
# -fno-pic to avoid GOT relocations
CMODULEFLAGS += -fno-pic
LDMODULEFLAGS = -r -e module_initialize
ifeq ($(WINTOOL),y)
LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}"
else
LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
endif
# NuttX modules are ELF binaries.
# Non-ELF platforms like macOS need to use a separate ELF toolchain.
ifeq ($(CONFIG_HOST_MACOS),y)
# eg. brew install x86_64-elf-gcc
MODULECC = x86_64-elf-gcc
MODULELD = x86_64-elf-ld
MODULESTRIP = x86_64-elf-strip --strip-unneeded
# It seems macOS/x86_64 loads the program text around 00000001_xxxxxxxx.
# The gcc default (-mcmodel=small) would produce out-of-range 32-bit
# relocations.
CMODULEFLAGS += -mcmodel=large
endif
# ELF module definitions
CELFFLAGS = $(CFLAGS)
CXXELFFLAGS = $(CXXFLAGS)
# -fno-pic to avoid GOT relocations
CELFFLAGS += -fno-pic
CXXELFFLAGS += -fno-pic
LDELFFLAGS = -r -e main
ifeq ($(WINTOOL),y)
LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}"
else
LDELFFLAGS += -T $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld
endif
ASMEXT = .S
OBJEXT = .o
LIBEXT = .a
ifeq ($(HOSTOS),Cygwin)
EXEEXT = .exe
else
EXEEXT =
endif
LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD)
CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC)
LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
CCLINKFLAGS += -g
endif
ifeq ($(CONFIG_SIM_M32),y)
LDLINKFLAGS += -melf_i386
CCLINKFLAGS += -m32
LDFLAGS += -m32
LDMODULEFLAGS += -melf_i386
LDELFFLAGS += -melf_i386
HOSTLDFLAGS += -m32
endif
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
HOSTCC = cc
HOSTINCLUDES = -I.
HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe