X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fmips%2FMakefile;h=90cd5906c6af06834915cc594a09f6d698080400;hb=0315a28909aa9781706bcd5743f2665220b6b099;hp=1907b57229c1486d95e1b3338fb804df5917f7ca;hpb=fc9b0b80435cda721fbdbe507c9e4f388b0ea62b;p=u-boot diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 1907b57229..90cd5906c6 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -2,7 +2,27 @@ # SPDX-License-Identifier: GPL-2.0+ # -head-y := arch/mips/cpu/$(CPU)/start.o +head-y := arch/mips/cpu/start.o -libs-y += arch/mips/cpu/$(CPU)/ +libs-y += arch/mips/cpu/ libs-y += arch/mips/lib/ + +machine-$(CONFIG_SOC_AU1X00) += au1x00 + +machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) +libs-y += $(machdirs) + +PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) + +# Optimize for MIPS architectures +arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 +arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 +arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 +arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 + +# Allow extra optimization for specific CPUs/SoCs +tune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc +tune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc +tune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc + +PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)