X-Git-Url: https://git.sur5r.net/?p=u-boot;a=blobdiff_plain;f=config.mk;h=78748cc04a9eb63f0ebed8b00ea458047b52a17c;hp=9bf4eda56361db6f5c9c566097f83988f1336f7b;hb=HEAD;hpb=4379ac614809da2128f8bc1f62e3dde4daaf7deb diff --git a/config.mk b/config.mk index 9bf4eda563..78748cc04a 100644 --- a/config.mk +++ b/config.mk @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ # # (C) Copyright 2000-2013 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# ######################################################################### # This file is included from ./Makefile and spl/Makefile. @@ -18,16 +16,30 @@ PLATFORM_LDFLAGS := LDFLAGS := LDFLAGS_FINAL := OBJCOPYFLAGS := +# clear VENDOR for tcsh +VENDOR := ######################################################################### +ARCH := $(CONFIG_SYS_ARCH:"%"=%) +CPU := $(CONFIG_SYS_CPU:"%"=%) +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_TEGRA +CPU := arm720t +endif +endif +BOARD := $(CONFIG_SYS_BOARD:"%"=%) +ifneq ($(CONFIG_SYS_VENDOR),) +VENDOR := $(CONFIG_SYS_VENDOR:"%"=%) +endif +ifneq ($(CONFIG_SYS_SOC),) +SOC := $(CONFIG_SYS_SOC:"%"=%) +endif + # Some architecture config.mk files need to know what CPUDIR is set to, # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains # CPU-specific code. -CPUDIR=arch/$(ARCH)/cpu/$(CPU) -ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR))) -CPUDIR=arch/$(ARCH)/cpu -endif +CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),) sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules @@ -46,12 +58,19 @@ ifdef BOARD sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules endif +ifdef FTRACE +PLATFORM_CPPFLAGS += -finstrument-functions -DFTRACE +endif + +# Allow use of stdint.h if available +ifneq ($(USE_STDINT),) +PLATFORM_CPPFLAGS += -DCONFIG_USE_STDINT +endif + ######################################################################### RELFLAGS := $(PLATFORM_RELFLAGS) -OBJCOPYFLAGS += --gap-fill=0xff - PLATFORM_CPPFLAGS += $(RELFLAGS) PLATFORM_CPPFLAGS += -pipe