This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Set up ARM Symbian OS multilibs
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Aug 2004 13:26:43 -0700
- Subject: PATCH: Set up ARM Symbian OS multilibs
- Reply-to: mark at codesourcery dot com
This patch sets up Symbian OS multilibs on ARM.
Tested by building the compiler, libgcc, and newlib for
arm-none-symbianelf, applied on the mainline and on the
csl-arm-branch.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2004-08-20 Mark Mitchell <mark@codesourcery.com>
* config.gcc (arm*-*-symbianelf*): Add t-symbian Makefile
fragment.
* config/arm/bpabi.h (RENAME_LIBRARY_SET): Fix typo.
(SUBTARGET_EXTRA_ASM_SPEC): Pass -meabi=3 to the assembler.
* config/arm/symbian.h (SUBTARGET_CPU_DEFAULT): Assume ARMV5
architecture.
(SUBTARGET_ASM_FLOAT_SPEC): Default to -mfpu=vfp for hard-float
configurations.
* config/arm/t-symbian: New file.
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.405.4.13
diff -c -5 -p -r1.405.4.13 config.gcc
*** gcc/config.gcc 18 Aug 2004 03:57:40 -0000 1.405.4.13
--- gcc/config.gcc 20 Aug 2004 20:00:40 -0000
*************** arm*-*-eabi* | arm*-*-symbianelf* )
*** 682,698 ****
# 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
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
case ${target} in
arm*-*-symbianelf*)
tm_file="${tm_file} arm/symbian.h"
;;
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
- tmake_file="t-slibgcc-elf-ver arm/t-arm arm/t-arm-elf arm/t-bpabi"
;;
arm*-*-rtems*)
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
tmake_file="arm/t-arm arm/t-arm-elf t-rtems"
;;
--- 682,699 ----
# 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
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+ tmake_file="t-slibgcc-elf-ver arm/t-arm arm/t-arm-elf arm/t-bpabi"
case ${target} in
arm*-*-symbianelf*)
tm_file="${tm_file} arm/symbian.h"
+ tmake_file="${tmake_file} arm/t-symbian"
;;
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
arm*-*-rtems*)
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
tmake_file="arm/t-arm arm/t-arm-elf t-rtems"
;;
Index: gcc/config/arm/bpabi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/bpabi.h,v
retrieving revision 1.1.4.3
diff -c -5 -p -r1.1.4.3 bpabi.h
*** gcc/config/arm/bpabi.h 19 Aug 2004 22:04:33 -0000 1.1.4.3
--- gcc/config/arm/bpabi.h 20 Aug 2004 20:00:40 -0000
***************
*** 34,50 ****
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
/* The BPABI integer comparision routines return { -1, 0, 1 }. */
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
/* The generic link spec in elf.h does not support shared libraries. */
#undef LINK_SPEC
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
"-X"
! #if defined (__thumb__) && !defined (__THUMB_INTERWORD)
#define RENAME_LIBRARY_SET ".thumb_set"
#else
#define RENAME_LIBRARY_SET ".set"
#endif
--- 34,54 ----
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
/* The BPABI integer comparision routines return { -1, 0, 1 }. */
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
+ /* Tell the assembler to build BPABI binaries. */
+ #undef SUBTARGET_EXTRA_ASM_SPEC
+ #define SUBTARGET_EXTRA_ASM_SPEC "-meabi=3"
+
/* The generic link spec in elf.h does not support shared libraries. */
#undef LINK_SPEC
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
"-X"
! #if defined (__thumb__) && !defined (__THUMB_INTERWORK)
#define RENAME_LIBRARY_SET ".thumb_set"
#else
#define RENAME_LIBRARY_SET ".set"
#endif
Index: gcc/config/arm/symbian.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/symbian.h,v
retrieving revision 1.5.2.3
diff -c -5 -p -r1.5.2.3 symbian.h
*** gcc/config/arm/symbian.h 18 Aug 2004 03:57:45 -0000 1.5.2.3
--- gcc/config/arm/symbian.h 20 Aug 2004 20:00:40 -0000
***************
*** 44,48 ****
--- 44,61 ----
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
/* Support the "dllimport" attribute. */
#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1
+
+ /* Symbian OS assumes ARM V5 or above. Since -march=armv5 is
+ equivalent to making the ARM 10TDMI core the default, we can set
+ SUBTARGET_CPU_DEFAULT and get an equivalent effect. */
+ #undef SUBTARGET_CPU_DEFAULT
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+ /* The assembler should assume the VFP FPU format when the hard-float
+ ABI is in use. */
+ #undef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC \
+ "%{!mfpu=*:%{mfloat-abi=hard:-mfpu=vfp}}"
+
Index: gcc/config/arm/t-symbian
===================================================================
RCS file: gcc/config/arm/t-symbian
diff -N gcc/config/arm/t-symbian
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- gcc/config/arm/t-symbian 20 Aug 2004 20:00:40 -0000
***************
*** 0 ****
--- 1,7 ----
+ # Create a multilib for processors with VFP floating-point, and a
+ # multilib for those without -- using the soft-float ABI in both
+ # cases. Symbian OS object should be compiled with interworking
+ # enabled, so there are no separate thumb-mode libraries.
+ MULTILIB_OPTIONS = mfloat-abi=hard
+ MULTILIB_DIRNAMES = hard
+