2002-09-08 19:49:36 +00:00
|
|
|
#
|
2006-09-01 17:49:50 +00:00
|
|
|
# (C) Copyright 2002-2006
|
2002-09-08 19:49:36 +00:00
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2002-09-08 19:49:36 +00:00
|
|
|
#
|
|
|
|
|
2014-03-05 07:59:38 +00:00
|
|
|
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _ashldi3.o _ashrdi3.o _divsi3.o \
|
|
|
|
_lshrdi3.o _modsi3.o _udivsi3.o _umodsi3.o div0.o
|
2008-02-27 10:00:47 +00:00
|
|
|
|
2015-03-01 11:44:39 +00:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += vectors_m.o crt0.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2013-12-14 03:47:35 +00:00
|
|
|
obj-y += crt0_64.o
|
|
|
|
else
|
2014-04-15 14:13:51 +00:00
|
|
|
obj-y += vectors.o crt0.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2013-01-08 10:18:02 +00:00
|
|
|
|
2012-08-31 08:30:13 +00:00
|
|
|
ifndef CONFIG_SPL_BUILD
|
2013-12-14 03:47:35 +00:00
|
|
|
ifdef CONFIG_ARM64
|
|
|
|
obj-y += relocate_64.o
|
|
|
|
else
|
|
|
|
obj-y += relocate.o
|
|
|
|
endif
|
2013-03-11 06:49:57 +00:00
|
|
|
|
2015-05-05 19:00:23 +00:00
|
|
|
obj-$(CONFIG_CPU_V7M) += cmd_boot.o
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
|
|
|
|
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
|
|
|
obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
|
|
|
|
obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o
|
|
|
|
obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
|
2012-08-22 22:31:05 +00:00
|
|
|
else
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
|
2011-07-13 05:11:06 +00:00
|
|
|
endif
|
2014-06-09 18:12:59 +00:00
|
|
|
obj-$(CONFIG_SEMIHOSTING) += semihosting.o
|
2008-02-27 10:00:47 +00:00
|
|
|
|
2014-02-22 16:53:42 +00:00
|
|
|
obj-y += sections.o
|
2015-02-06 22:06:45 +00:00
|
|
|
obj-y += stack.o
|
2015-03-01 11:44:39 +00:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += interrupts_m.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2015-07-01 04:28:03 +00:00
|
|
|
obj-y += ccn504.o
|
2014-03-14 06:26:27 +00:00
|
|
|
obj-y += gic_64.o
|
2013-12-14 03:47:35 +00:00
|
|
|
obj-y += interrupts_64.o
|
|
|
|
else
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += interrupts.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2015-08-30 22:55:18 +00:00
|
|
|
ifndef CONFIG_RESET
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += reset.o
|
2015-08-30 22:55:18 +00:00
|
|
|
endif
|
2009-07-23 11:15:59 +00:00
|
|
|
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += cache.o
|
2013-12-14 03:47:35 +00:00
|
|
|
ifndef CONFIG_ARM64
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += cache-cp15.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
ARM: compiler options cleanup - improve tool chain support
For some time there have been repeated reports about build problems
with some ARM (cross) tool chains. Especially issues about
(in)compatibility with the tool chain provided runtime support
library libgcc.a caused to add and support a private implementation
of such runtime support code in U-Boot. A closer look at the code
indicated that some of these issues are actually home-made. This
patch attempts to clean up some of the most obvious problems and make
building of U-Boot with different tool chains easier:
- Even though all ARM systems basicy used the same compiler options
to select a specific ABI from the tool chain, the code for this was
distributed over all cpu/*/config.mk files. We move this one level
up into lib_arm/config.mk instead.
- So far, we only checked if "-mapcs-32" was supported by the tool
chain; if yes, this was used, if not, "-mabi=apcs-gnu" was
selected, no matter if the tool chain actually understood this
option. There was no support for EABI conformant tool chains.
This patch implements the following logic:
1) If the tool chain supports
"-mabi=aapcs-linux -mno-thumb-interwork"
we use these options (EABI conformant tool chain).
2) Otherwise, we check first if
"-mapcs-32"
is supported, and then check for
"-mabi=apcs-gnu"
If one test succeeds, we use the first found option.
3) In case 2), we also test if "-mno-thumb-interwork", and use
this if the test succeeds. [For "-mabi=aapcs-linux" we set
"-mno-thumb-interwork" mandatorily.]
This way we use a similar logic for the compile options as the
Linux kernel does.
- Some EABI conformant tool chains cause external references to
utility functions like raise(); such functions are provided in the
new file lib_arm/eabi_compat.c
Note that lib_arm/config.mk gets parsed several times, so we must
make sure to add eabi_compat.o only once to the linker list.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Tom Rix <Tom.Rix@windriver.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Sergey Kubushyn <ksi@koi8.net>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Tested-by: Andrzej Wolski <awolski@poczta.fm>
Tested-by: Gaye Abdoulaye Walsimou <walsimou@walsimou.com>
Tested-by: Tom Rix <Tom.Rix@windriver.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-17 11:17:29 +00:00
|
|
|
|
2014-09-01 02:06:34 +00:00
|
|
|
obj-$(CONFIG_DEBUG_LL) += debug.o
|
|
|
|
|
ARM: compiler options cleanup - improve tool chain support
For some time there have been repeated reports about build problems
with some ARM (cross) tool chains. Especially issues about
(in)compatibility with the tool chain provided runtime support
library libgcc.a caused to add and support a private implementation
of such runtime support code in U-Boot. A closer look at the code
indicated that some of these issues are actually home-made. This
patch attempts to clean up some of the most obvious problems and make
building of U-Boot with different tool chains easier:
- Even though all ARM systems basicy used the same compiler options
to select a specific ABI from the tool chain, the code for this was
distributed over all cpu/*/config.mk files. We move this one level
up into lib_arm/config.mk instead.
- So far, we only checked if "-mapcs-32" was supported by the tool
chain; if yes, this was used, if not, "-mabi=apcs-gnu" was
selected, no matter if the tool chain actually understood this
option. There was no support for EABI conformant tool chains.
This patch implements the following logic:
1) If the tool chain supports
"-mabi=aapcs-linux -mno-thumb-interwork"
we use these options (EABI conformant tool chain).
2) Otherwise, we check first if
"-mapcs-32"
is supported, and then check for
"-mabi=apcs-gnu"
If one test succeeds, we use the first found option.
3) In case 2), we also test if "-mno-thumb-interwork", and use
this if the test succeeds. [For "-mabi=aapcs-linux" we set
"-mno-thumb-interwork" mandatorily.]
This way we use a similar logic for the compile options as the
Linux kernel does.
- Some EABI conformant tool chains cause external references to
utility functions like raise(); such functions are provided in the
new file lib_arm/eabi_compat.c
Note that lib_arm/config.mk gets parsed several times, so we must
make sure to add eabi_compat.o only once to the linker list.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Tom Rix <Tom.Rix@windriver.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Sergey Kubushyn <ksi@koi8.net>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Tested-by: Andrzej Wolski <awolski@poczta.fm>
Tested-by: Gaye Abdoulaye Walsimou <walsimou@walsimou.com>
Tested-by: Tom Rix <Tom.Rix@windriver.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-17 11:17:29 +00:00
|
|
|
# For EABI conformant tool chains, provide eabi_compat()
|
|
|
|
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
|
2013-10-17 08:34:52 +00:00
|
|
|
extra-y += eabi_compat.o
|
2009-07-23 11:15:59 +00:00
|
|
|
endif
|
2015-10-23 16:06:40 +00:00
|
|
|
|
|
|
|
# some files can only build in ARM or THUMB2, not THUMB1
|
|
|
|
|
|
|
|
ifdef CONFIG_SYS_THUMB_BUILD
|
|
|
|
ifndef CONFIG_HAS_THUMB2
|
|
|
|
|
|
|
|
# for C files, just apend -marm, which will override previous -mthumb*
|
|
|
|
|
|
|
|
CFLAGS_cache.o := -marm
|
|
|
|
CFLAGS_cache-cp15.o := -marm
|
|
|
|
|
|
|
|
# For .S, drop -mthumb* and other thumb-related options.
|
|
|
|
# CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
|
|
|
|
# was implemented and is used here.
|
|
|
|
# Also, define ${target}_NO_THUMB_BUILD for these two targets
|
|
|
|
# so that the code knows it should not use Thumb.
|
|
|
|
|
|
|
|
AFLAGS_REMOVE_memset.o := -mthumb -mthumb-interwork
|
|
|
|
AFLAGS_REMOVE_memcpy.o := -mthumb -mthumb-interwork
|
|
|
|
AFLAGS_memset.o := -DMEMSET_NO_THUMB_BUILD
|
|
|
|
AFLAGS_memcpy.o := -DMEMCPY_NO_THUMB_BUILD
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|