u-boot/cpu
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
..
74xx_7xx 74xx_7xx: Fix rounding problem in CPU frequency calculation 2009-05-15 22:22:01 +02:00
arm720t ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm920t ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm925t ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm926ejs ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm946es ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm1136 ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm1176 ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm_cortexa8 ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
arm_intcm ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
at32ap Add AVR32 LCD support 2009-07-26 13:12:02 +02:00
blackfin Blackfin: split cpu COBJS into multilines 2009-07-18 21:15:54 -04:00
i386 Dual-license IBM code contributions 2009-08-09 23:15:33 +02:00
ixp ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
leon2 Update U-Boot's build timestamp on every compile 2008-12-06 23:36:43 +01:00
leon3 Update U-Boot's build timestamp on every compile 2008-12-06 23:36:43 +01:00
lh7a40x ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
mcf52x2 ColdFire: Add M5208EVB and MCF520x CPU support 2009-07-14 09:27:17 -05:00
mcf523x ColdFire: PLATFORM_CPPFLAGS updates for new compiler 2009-03-17 15:58:37 -06:00
mcf532x ColdFire: PLATFORM_CPPFLAGS updates for new compiler 2009-03-17 15:58:37 -06:00
mcf547x_8x ColdFire: PLATFORM_CPPFLAGS updates for new compiler 2009-03-17 15:58:37 -06:00
mcf5227x ColdFire: Add DSPI support for MCF5227x and MCF5445x 2009-07-14 09:46:34 -05:00
mcf5445x Minor coding style cleanup. 2009-08-10 10:38:34 +02:00
microblaze microblaze: Use cache functions (especially cache status) 2009-01-23 10:40:00 +01:00
mips MIPS: Implement ethernet halt for au1x00 2009-05-16 09:20:03 +09:00
mpc5xx Fix all linker script to handle all rodata sections 2009-03-20 22:39:12 +01:00
mpc5xxx board support patch for phyCORE-MPC5200B-tiny 2009-07-10 23:21:32 +02:00
mpc8xx stdio/device: rework function naming convention 2009-07-18 00:27:46 +02:00
mpc8xxx/ddr 85xx, 86xx: Add common board_add_ram_info() 2009-07-22 09:43:48 -05:00
mpc83xx Update Freescale copyrights to remove "All Rights Reserved" 2009-07-29 09:59:22 +02:00
mpc85xx 85xx: Fix addrmap to include memory 2009-08-14 17:42:05 -05:00
mpc86xx 86xx: Rename ccsr_ddr's sdram_mode_1, sdram_cfg_1 fields 2009-07-22 09:43:47 -05:00
mpc512x Update Freescale copyrights to remove "All Rights Reserved" 2009-07-29 09:59:22 +02:00
mpc824x Fix all linker script to handle all rodata sections 2009-03-20 22:39:12 +01:00
mpc8220 Fix all linker script to handle all rodata sections 2009-03-20 22:39:12 +01:00
mpc8260 i2c: Create common default i2c_[set|get]_bus_speed() functions 2009-06-12 20:39:45 +02:00
nios General help message cleanup 2009-06-12 20:47:16 +02:00
nios2 General help message cleanup 2009-06-12 20:47:16 +02:00
ppc4xx Dual-license IBM code contributions 2009-08-09 23:15:33 +02:00
pxa ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
s3c44b0 ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
sa1100 ARM: compiler options cleanup - improve tool chain support 2009-08-21 23:11:53 +02:00
sh2 sh: unify linker script 2009-07-08 11:43:15 +09:00
sh3 sh: unify linker script 2009-07-08 11:43:15 +09:00
sh4 sh: unify linker script 2009-07-08 11:43:15 +09:00