blob: 7a0fb5862e1b3067ceab8dc5fafbcba8ed6b8f9c [file] [log] [blame]
wdenkf47713f2002-09-08 19:49:36 +00001#
Marian Balakowiczf9328632006-09-01 19:49:50 +02002# (C) Copyright 2002-2006
wdenkf47713f2002-09-08 19:49:36 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenkf47713f2002-09-08 19:49:36 +00006#
7
Masahiro Yamadacd2e46c2014-03-05 16:59:38 +09008lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _ashldi3.o _ashrdi3.o _divsi3.o \
Simon Glass9ab60492016-03-16 07:44:34 -06009 _lshrdi3.o _modsi3.o _udivsi3.o _umodsi3.o div0.o \
10 _uldivmod.o
wdenkf47713f2002-09-08 19:49:36 +000011
rev13@wp.pl12d8a722015-03-01 12:44:39 +010012ifdef CONFIG_CPU_V7M
13obj-y += vectors_m.o crt0.o
14else ifdef CONFIG_ARM64
David Feng0ae76532013-12-14 11:47:35 +080015obj-y += crt0_64.o
16else
Albert ARIBAUD41623c92014-04-15 16:13:51 +020017obj-y += vectors.o crt0.o
David Feng0ae76532013-12-14 11:47:35 +080018endif
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090019
20ifndef CONFIG_SPL_BUILD
David Feng0ae76532013-12-14 11:47:35 +080021ifdef CONFIG_ARM64
22obj-y += relocate_64.o
23else
24obj-y += relocate.o
25endif
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090026
Matt Porterf99993c2015-05-05 15:00:23 -040027obj-$(CONFIG_CPU_V7M) += cmd_boot.o
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090028obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
29obj-$(CONFIG_CMD_BOOTM) += bootm.o
30obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
31obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o
32obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
33else
34obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
35endif
Darwin Rambo261d2762014-06-09 11:12:59 -070036obj-$(CONFIG_SEMIHOSTING) += semihosting.o
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090037
Albert ARIBAUDd0b5d9d2014-02-22 17:53:42 +010038obj-y += sections.o
Andreas Bießmann68145d42015-02-06 23:06:45 +010039obj-y += stack.o
rev13@wp.pl12d8a722015-03-01 12:44:39 +010040ifdef CONFIG_CPU_V7M
41obj-y += interrupts_m.o
42else ifdef CONFIG_ARM64
Bhupesh Sharma3ffa95c2015-07-01 09:58:03 +053043obj-y += ccn504.o
David Fengc71645a2014-03-14 14:26:27 +080044obj-y += gic_64.o
David Feng0ae76532013-12-14 11:47:35 +080045obj-y += interrupts_64.o
46else
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090047obj-y += interrupts.o
David Feng0ae76532013-12-14 11:47:35 +080048endif
Simon Glassc6aabe92015-08-30 16:55:18 -060049ifndef CONFIG_RESET
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090050obj-y += reset.o
Simon Glassc6aabe92015-08-30 16:55:18 -060051endif
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090052
53obj-y += cache.o
David Feng0ae76532013-12-14 11:47:35 +080054ifndef CONFIG_ARM64
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090055obj-y += cache-cp15.o
David Feng0ae76532013-12-14 11:47:35 +080056endif
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090057
Masahiro Yamada51b17d42014-09-01 11:06:34 +090058obj-$(CONFIG_DEBUG_LL) += debug.o
59
Wolfgang Denkf772acf2009-08-17 13:17:29 +020060# For EABI conformant tool chains, provide eabi_compat()
61ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
Masahiro Yamadafa8f9502013-10-17 17:34:52 +090062extra-y += eabi_compat.o
Wolfgang Denkf772acf2009-08-17 13:17:29 +020063endif
Albert ARIBAUD62e92072015-10-23 18:06:40 +020064
65# some files can only build in ARM or THUMB2, not THUMB1
66
67ifdef CONFIG_SYS_THUMB_BUILD
68ifndef CONFIG_HAS_THUMB2
69
70# for C files, just apend -marm, which will override previous -mthumb*
71
72CFLAGS_cache.o := -marm
73CFLAGS_cache-cp15.o := -marm
74
75# For .S, drop -mthumb* and other thumb-related options.
76# CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
77# was implemented and is used here.
78# Also, define ${target}_NO_THUMB_BUILD for these two targets
79# so that the code knows it should not use Thumb.
80
81AFLAGS_REMOVE_memset.o := -mthumb -mthumb-interwork
82AFLAGS_REMOVE_memcpy.o := -mthumb -mthumb-interwork
83AFLAGS_memset.o := -DMEMSET_NO_THUMB_BUILD
84AFLAGS_memcpy.o := -DMEMCPY_NO_THUMB_BUILD
85
86endif
87endif