]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
Merge pull request #1220 from jwerner-chromium/JW_ld_bfd
authordavidcunado-arm <david.cunado@arm.com>
Tue, 30 Jan 2018 12:45:52 +0000 (12:45 +0000)
committerGitHub <noreply@github.com>
Tue, 30 Jan 2018 12:45:52 +0000 (12:45 +0000)
Makefile: Use ld.bfd linker if available

1  2 
Makefile

diff --cc Makefile
index d5fa2ade82d838e6c8830633d1ff728ccf36e57e,60d99bf708746c472b8dc2b3a9cdc23f7e91abd3..aa71ee31db44746916d1d2d1abc1cddcd78063c5
+++ b/Makefile
@@@ -125,8 -125,13 +125,14 @@@ OC                       :=      ${CROSS_COMPILE}objcop
  OD                    :=      ${CROSS_COMPILE}objdump
  NM                    :=      ${CROSS_COMPILE}nm
  PP                    :=      ${CROSS_COMPILE}gcc -E
 +DTC                   ?=      dtc
  
+ # Use ${LD}.bfd instead if it exists (as absolute path or together with $PATH).
+ ifneq ($(strip $(wildcard ${LD}.bfd) \
+       $(foreach dir,$(subst :, ,${PATH}),$(wildcard ${dir}/${LD}.bfd))),)
+ LD                    :=      ${LD}.bfd
+ endif
  ifeq (${ARM_ARCH_MAJOR},7)
  target32-directive    =       -target arm-none-eabi
  # Will set march32-directive from platform configuration