2002-08-14 20:30:46 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2000-2002
|
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2002-08-14 20:30:46 +00:00
|
|
|
#
|
|
|
|
|
2011-02-04 13:25:17 +00:00
|
|
|
ifndef CONFIG_STANDALONE_LOAD_ADDR
|
2013-07-30 06:06:30 +00:00
|
|
|
ifneq ($(CONFIG_OMAP_COMMON),)
|
2011-02-04 13:25:17 +00:00
|
|
|
CONFIG_STANDALONE_LOAD_ADDR = 0x80300000
|
2009-09-04 03:12:47 +00:00
|
|
|
else
|
2011-02-04 13:25:17 +00:00
|
|
|
CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
|
2009-09-04 03:12:47 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-04-25 07:40:22 +00:00
|
|
|
LDFLAGS_FINAL += --gc-sections
|
2013-09-07 08:42:37 +00:00
|
|
|
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
|
2013-12-14 03:47:35 +00:00
|
|
|
-fno-common -ffixed-r9
|
2014-01-15 02:00:45 +00:00
|
|
|
PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
|
|
|
|
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
|
2013-04-25 07:40:22 +00:00
|
|
|
|
2013-03-11 06:49:57 +00:00
|
|
|
# Support generic board on ARM
|
|
|
|
__HAVE_ARCH_GENERIC_BOARD := y
|
|
|
|
|
2014-07-30 05:08:23 +00:00
|
|
|
PLATFORM_CPPFLAGS += -D__ARM__
|
2009-05-08 18:24:12 +00:00
|
|
|
|
2012-03-08 07:20:19 +00:00
|
|
|
# Choose between ARM/Thumb instruction sets
|
|
|
|
ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
|
2014-12-18 17:10:33 +00:00
|
|
|
AFLAGS_IMPLICIT_IT := $(call as-option,-Wa$(comma)-mimplicit-it=always)
|
|
|
|
PF_CPPFLAGS_ARM := $(AFLAGS_IMPLICIT_IT) \
|
|
|
|
$(call cc-option, -mthumb -mthumb-interwork,\
|
2012-03-08 07:20:19 +00:00
|
|
|
$(call cc-option,-marm,)\
|
|
|
|
$(call cc-option,-mno-thumb-interwork,)\
|
|
|
|
)
|
|
|
|
else
|
|
|
|
PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
|
|
|
|
$(call cc-option,-mno-thumb-interwork,)
|
|
|
|
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
|
|
|
|
2012-03-16 06:34:35 +00:00
|
|
|
# Only test once
|
|
|
|
ifneq ($(CONFIG_SPL_BUILD),y)
|
2014-03-05 08:49:22 +00:00
|
|
|
ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
|
|
|
|
archprepare: checkthumb
|
|
|
|
|
|
|
|
checkthumb:
|
|
|
|
@if test "$(call cc-version)" -lt "0404"; then \
|
|
|
|
echo -n '*** Your GCC does not produce working '; \
|
|
|
|
echo 'binaries in THUMB mode.'; \
|
|
|
|
echo '*** Your board is configured for THUMB mode.'; \
|
|
|
|
false; \
|
|
|
|
fi
|
|
|
|
endif
|
2012-03-16 06:34: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
|
|
|
# Try if EABI is supported, else fall back to old API,
|
|
|
|
# i. e. for example:
|
|
|
|
# - with ELDK 4.2 (EABI supported), use:
|
2012-03-08 07:20:19 +00:00
|
|
|
# -mabi=aapcs-linux
|
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
|
|
|
# - with ELDK 4.1 (gcc 4.x, no EABI), use:
|
2012-03-08 07:20:19 +00:00
|
|
|
# -mabi=apcs-gnu
|
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
|
|
|
# - with ELDK 3.1 (gcc 3.x), use:
|
2012-03-08 07:20:19 +00:00
|
|
|
# -mapcs-32
|
2011-11-01 20:54:02 +00:00
|
|
|
PF_CPPFLAGS_ABI := $(call cc-option,\
|
2012-03-08 07:20:19 +00:00
|
|
|
-mabi=aapcs-linux,\
|
2011-11-01 20:54:02 +00:00
|
|
|
$(call cc-option,\
|
|
|
|
-mapcs-32,\
|
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
|
|
|
$(call cc-option,\
|
2011-11-01 20:54:02 +00:00
|
|
|
-mabi=apcs-gnu,\
|
|
|
|
)\
|
2012-03-08 07:20:19 +00:00
|
|
|
)\
|
2011-11-01 20:54:02 +00:00
|
|
|
)
|
|
|
|
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)
|
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, make sure to provide raise()
|
|
|
|
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
|
2011-07-19 05:51:41 +00:00
|
|
|
# This file is parsed many times, so the string may get added multiple
|
|
|
|
# times. Also, the prefix needs to be different based on whether
|
|
|
|
# CONFIG_SPL_BUILD is defined or not. 'filter-out' the existing entry
|
|
|
|
# before adding the correct one.
|
2014-02-27 13:40:34 +00:00
|
|
|
PLATFORM_LIBS := arch/arm/lib/eabi_compat.o \
|
|
|
|
$(filter-out arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS))
|
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
|
|
|
endif
|
2010-10-11 11:13:28 +00:00
|
|
|
|
|
|
|
# needed for relocation
|
2011-01-27 06:03:49 +00:00
|
|
|
LDFLAGS_u-boot += -pie
|
2012-07-18 13:45:53 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# FIXME: binutils versions < 2.22 have a bug in the assembler where
|
|
|
|
# branches to weak symbols can be incorrectly optimized in thumb mode
|
|
|
|
# to a short branch (b.n instruction) that won't reach when the symbol
|
|
|
|
# gets preempted
|
|
|
|
#
|
|
|
|
# http://sourceware.org/bugzilla/show_bug.cgi?id=12532
|
|
|
|
#
|
|
|
|
ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
|
|
|
|
ifeq ($(GAS_BUG_12532),)
|
|
|
|
export GAS_BUG_12532:=$(shell if [ $(call binutils-version) -lt 0222 ] ; \
|
|
|
|
then echo y; else echo n; fi)
|
|
|
|
endif
|
|
|
|
ifeq ($(GAS_BUG_12532),y)
|
|
|
|
PLATFORM_RELFLAGS += -fno-optimize-sibling-calls
|
|
|
|
endif
|
|
|
|
endif
|
2013-06-11 12:17:30 +00:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_SPL_BUILD),y)
|
2013-08-24 11:55:38 +00:00
|
|
|
# Check that only R_ARM_RELATIVE relocations are generated.
|
|
|
|
ALL-y += checkarmreloc
|
|
|
|
# The movt / movw can hardcode 16 bit parts of the addresses in the
|
|
|
|
# instruction. Relocation is not supported for that case, so disable
|
|
|
|
# such usage by requiring word relocations.
|
|
|
|
PLATFORM_CPPFLAGS += $(call cc-option, -mword-relocations)
|
2013-06-11 12:17:30 +00:00
|
|
|
endif
|
2013-11-07 13:21:46 +00:00
|
|
|
|
|
|
|
# limit ourselves to the sections we want in the .bin.
|
2013-12-14 03:47:35 +00:00
|
|
|
ifdef CONFIG_ARM64
|
2014-02-24 02:12:12 +00:00
|
|
|
OBJCOPYFLAGS += -j .text -j .rodata -j .data -j .u_boot_list -j .rela.dyn
|
2013-12-14 03:47:35 +00:00
|
|
|
else
|
2014-07-12 13:24:02 +00:00
|
|
|
OBJCOPYFLAGS += -j .text -j .secure_text -j .rodata -j .hash -j .data -j .got.plt -j .u_boot_list -j .rel.dyn
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2014-02-24 02:12:21 +00:00
|
|
|
|
2014-07-06 23:21:44 +00:00
|
|
|
ifdef CONFIG_OF_EMBED
|
|
|
|
OBJCOPYFLAGS += -j .dtb.init.rodata
|
|
|
|
endif
|
|
|
|
|
2014-02-24 02:12:21 +00:00
|
|
|
ifneq ($(CONFIG_IMX_CONFIG),)
|
|
|
|
ifdef CONFIG_SPL
|
|
|
|
ifndef CONFIG_SPL_BUILD
|
|
|
|
ALL-y += SPL
|
|
|
|
endif
|
|
|
|
else
|
2014-03-31 07:50:35 +00:00
|
|
|
ifeq ($(CONFIG_OF_SEPARATE),y)
|
|
|
|
ALL-y += u-boot-dtb.imx
|
|
|
|
else
|
2014-02-24 02:12:21 +00:00
|
|
|
ALL-y += u-boot.imx
|
|
|
|
endif
|
|
|
|
endif
|
2014-03-31 07:50:35 +00:00
|
|
|
endif
|