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
|
|
|
|
2013-12-14 03:47:35 +00:00
|
|
|
ifdef CONFIG_ARM64
|
|
|
|
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
|
|
|
ifndef CONFIG_SYS_GENERIC_BOARD
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += board.o
|
2013-03-11 06:49:57 +00:00
|
|
|
endif
|
|
|
|
|
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
|
2008-02-27 10:00:47 +00:00
|
|
|
|
2014-02-22 16:53:42 +00:00
|
|
|
obj-y += sections.o
|
2013-12-14 03:47:35 +00:00
|
|
|
ifdef CONFIG_ARM64
|
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
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += reset.o
|
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
|
|
|
|
|
|
|
# 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
|