u-boot/lib_arm
Wolfgang Denk f772acf8a5 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-21 23:11:53 +02:00
..
_ashldi3.S ARM EABI: add new helper functions resp. function names 2009-08-09 23:08:59 +02:00
_ashrdi3.S ARM EABI: add new helper functions resp. function names 2009-08-09 23:08:59 +02:00
_divsi3.S ARM EABI: add new helper functions resp. function names 2009-08-09 23:08:59 +02:00
_lshrdi3.S ARM EABI: add new helper functions resp. function names 2009-08-09 23:08:59 +02:00
_modsi3.S * Update Intel IXP4xx support 2006-05-30 15:56:48 +02:00
_udivsi3.S ARM EABI: add new helper functions resp. function names 2009-08-09 23:08:59 +02:00
_umodsi3.S Big white-space cleanup. 2008-05-21 00:14:08 +02:00
board.c stdio/device: rework function naming convention 2009-07-18 00:27:46 +02:00
bootm.c rename include/zlib.h to include/u-boot/zlib.h 2009-04-04 15:37:54 +02:00
cache-cp15.c arm: clean cache management 2009-04-05 13:06:31 +02:00
cache.c * Patches by Richard Woodruff, 01 Oct 2004: 2005-01-09 23:16:25 +00:00
config.mk ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
div0.c Initial revision 2002-09-08 19:55:02 +00:00
eabi_compat.c ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
interrupts.c arm: unify interrupt init 2009-06-12 20:39:52 +02:00
Makefile ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
reset.c Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00