[ARM] [GSoC] François Revol + Johannes Wischert:

- add missing bits needed to use EABI by default (which should be == AAPCS == BPABI if I understood it right),
	- include t-bpabi and bpabi.h,
	- added an arm/t-haiku and arm/haiku.h to correct back some stuff after them as is done for linux,
- add multilib variants for softfloat (for xscale) and softfp (AAPCS),
- undo the LIBGCC_SPEC override for arm, it might have been the cause of multilib not working, not sure,
- make armv6 default target.
This allows building for both overo and verdex boards with some mods, though it emits calls to exception unwinding stuff that requires some more symbols (like abort), and should probably be fixed some other way.


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@32237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2009-08-11 02:07:15 +00:00
parent 03890535ff
commit 09a4a7d36c
3 changed files with 48 additions and 7 deletions

View File

@@ -734,8 +734,14 @@ arm*-*-netbsd*)
use_collect2=yes
;;
arm*-*-haiku*)
tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf"
tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/aout.h arm/haiku.h arm/arm.h"
tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-haiku"
tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/bpabi.h arm/haiku.h"
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
need_64bit_hwint=yes
default_use_cxa_atexit=yes
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"

View File

@@ -29,18 +29,25 @@
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (0)
/* bpabi.h sets FPUTYPE_DEFAULT to VFP */
/* bpabi.h sets ARM_DEFAULT_ABI */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
{ "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }
/* Default is set by bpabi.h */
/*
#undef TARGET_DEFAULT
*/
#undef SUBTARGET_CPU_DEFAULT
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm920t
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
/* Now we define the strings used to build the spec file. */
/* interestingly, bpabi defines __GXX_TYPEINFO_EQUALITY_INLINE=0 too as we do. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
@@ -55,11 +62,18 @@
type_infos are not merged, so that they get compared by name \
instead of by pointer. */ \
builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0");\
/*builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); done in bpabi: */\
TARGET_BPABI_CPP_BUILTINS(); \
} \
while (0)
/* Use the default LIBGCC_SPEC, not the empty version in haiku.h, as we
do not use multilib (needed ??). */
#undef LIBGCC_SPEC
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m armelf -shared -no-undefined -Bsymbolic %{nostart:-e 0}"
#define LINK_SPEC "%{!o*:-o %b} -m armelf -shared -no-undefined -Bsymbolic %{nostart:-e 0} \
%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"

View File

@@ -0,0 +1,21 @@
# build multilib for soft float and VFP
# (unsure about how it should be done...)
# mix from t-symbian & t-wince-pe
#LIB1ASMSRC = arm/lib1funcs.asm
#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX
#MULTILIB_OPTIONS += mhard-float
#MULTILIB_DIRNAMES += fpu
MULTILIB_OPTIONS += msoft-float
MULTILIB_DIRNAMES += fpu soft
MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
MULTILIB_OPTIONS += mfloat-abi=softfp
MULTILIB_DIRNAMES += softfp
#LIBGCC = stmp-multilib
#INSTALL_LIBGCC = install-multilib
#TARGET_LIBGCC2_CFLAGS =