aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2005-10-08 18:17:20 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-10-08 18:17:20 +0000
commit077fc835e58ac603ad96128f26e1701ca5357b59 (patch)
tree9d6a64cda920ff265ef6281c9618ed7a6c15afe7 /gcc
parent31e832d1f403eb61238b029f81dcafafa763ecc5 (diff)
downloadgcc-077fc835e58ac603ad96128f26e1701ca5357b59.zip
gcc-077fc835e58ac603ad96128f26e1701ca5357b59.tar.gz
gcc-077fc835e58ac603ad96128f26e1701ca5357b59.tar.bz2
configure.in (arm-*-linux-gnueabi): Add to noconfigdirs target-libffi...
/ * configure.in (arm-*-linux-gnueabi): Add to noconfigdirs target-libffi, target-qthreads, target-libjava, and targetlibobjc. * configure: Regenerate. gcc/ Merge from csl-arm-branch: 2005-09-07 Paul Brook <paul@codesourcery.com> * config/arm/linux-eabi.h (SUBTARGET_EXTRA_LINK_SPEC): Prepend a space to string. 2005-04-30 Paul Brook <paul@codesourcery.com> * config/arm/bpabi.h (TARGET_DEFAULT): Define. * config/arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Define. 2005-03-07 Daniel Jacobowitz <dan@codesourcery.com> * config/arm/arm.c (arm_all_abis): Add aapcs-linux. (arm_override_options): Use TARGET_AAPCS_BASED. * config/arm/arm.h (enum arm_abi_type): Add ARM_ABI_AAPCS_LINUX. (PTRDIFF_TYPE): Use int for AAPCS. (DEFAULT_SHORT_ENUMS): Use false for aapcs-linux. * config/arm/linux-eabi.h (ARM_DEFAULT_ABI, WCHAR_TYPE): Define. (DEFAULT_SHORT_ENUMS): Delete. * doc/invoke.texi (ARM Options): Document -mabi=aapcs-linux. 2004-12-15 Daniel Jacobowitz <dan@codesourcery.com> * config/arm/arm.h (DEFAULT_SHORT_ENUMS): Wrap in #ifndef. * config/arm/linux-eabi.h (DEFAULT_SHORT_ENUMS): Define to 0. * config/arm/t-linux-eabi (TARGET_LIBGCC2_CFLAGS): Set to -fPIC. 2004-12-03 Mark Mitchell <mark@codesourcery.com> * config/arm/linux-eabi.h (LIBGCC_SPEC): Do not define. 2004-11-22 Mark Mitchell <mark@codesourcery.com> * config.gcc (arm*-*-linux-gnueabi): Use __cxa_atexit. 2004-11-19 Mark Mitchell <mark@codesourcery.com> * config.gcc (arm*-*-linux-gnueabi): Add it. * config/arm/bpabi.h (FPUTYPE_DEFAULT): Undefine it before redefining it. (TARGET_OS_CPP_BUILTINS): Likeiwse. * config/arm/linux-eabi.h: New file. * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): New macro. (LINUX_TARET_LINK_SPEC): Likewise. (LINK_SPEC): Use it. * config/arm/t-linux-eabi: New file. libcpp/ * configure.ac: Require 64-bit int for arm*-*-*eabi*. * configure: Regenerate. libstdc++/ Merge from csl-arm-branch: 2004-12-15 Daniel Jacobowitz <dan@codesourcery.com> * libstdc++-v3/config/linker-map.gnu: Add ARM EABI symbols. From-SVN: r105121
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog43
-rw-r--r--gcc/config.gcc20
-rw-r--r--gcc/config/arm/arm.c7
-rw-r--r--gcc/config/arm/arm.h7
-rw-r--r--gcc/config/arm/bpabi.h6
-rw-r--r--gcc/config/arm/linux-eabi.h70
-rw-r--r--gcc/config/arm/linux-elf.h10
-rw-r--r--gcc/config/arm/t-linux-eabi7
-rw-r--r--gcc/doc/invoke.texi2
9 files changed, 162 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e916d52..1e5dd4c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,46 @@
+2005-10-08 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from csl-arm-branch:
+ 2005-09-07 Paul Brook <paul@codesourcery.com>
+ * config/arm/linux-eabi.h (SUBTARGET_EXTRA_LINK_SPEC): Prepend a
+ space to string.
+
+ 2005-04-30 Paul Brook <paul@codesourcery.com>
+ * config/arm/bpabi.h (TARGET_DEFAULT): Define.
+ * config/arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Define.
+
+ 2005-03-07 Daniel Jacobowitz <dan@codesourcery.com>
+ * config/arm/arm.c (arm_all_abis): Add aapcs-linux.
+ (arm_override_options): Use TARGET_AAPCS_BASED.
+ * config/arm/arm.h (enum arm_abi_type): Add ARM_ABI_AAPCS_LINUX.
+ (PTRDIFF_TYPE): Use int for AAPCS.
+ (DEFAULT_SHORT_ENUMS): Use false for aapcs-linux.
+ * config/arm/linux-eabi.h (ARM_DEFAULT_ABI, WCHAR_TYPE): Define.
+ (DEFAULT_SHORT_ENUMS): Delete.
+ * doc/invoke.texi (ARM Options): Document -mabi=aapcs-linux.
+
+ 2004-12-15 Daniel Jacobowitz <dan@codesourcery.com>
+ * config/arm/arm.h (DEFAULT_SHORT_ENUMS): Wrap in #ifndef.
+ * config/arm/linux-eabi.h (DEFAULT_SHORT_ENUMS): Define to 0.
+ * config/arm/t-linux-eabi (TARGET_LIBGCC2_CFLAGS): Set to -fPIC.
+
+ 2004-12-03 Mark Mitchell <mark@codesourcery.com>
+ * config/arm/linux-eabi.h (LIBGCC_SPEC): Do not define.
+
+ 2004-11-22 Mark Mitchell <mark@codesourcery.com>
+ * config.gcc (arm*-*-linux-gnueabi): Use __cxa_atexit.
+
+ 2004-11-19 Mark Mitchell <mark@codesourcery.com>
+ * config.gcc (arm*-*-linux-gnueabi): Add it.
+ * config/arm/bpabi.h (FPUTYPE_DEFAULT): Undefine it before
+ redefining it.
+ (TARGET_OS_CPP_BUILTINS): Likeiwse.
+ * config/arm/linux-eabi.h: New file.
+ * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): New macro.
+ (LINUX_TARET_LINK_SPEC): Likewise.
+ (LINK_SPEC): Use it.
+ * config/arm/t-linux-eabi: New file.
+
2005-10-08 Steven Bosscher <stevenb@suse.de>
PR other/22202
diff --git a/gcc/config.gcc b/gcc/config.gcc
index cdfc66e..4634517 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -671,10 +671,26 @@ arm*-*-netbsd*)
use_collect2=yes
;;
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 arm/aout.h arm/arm.h"
- tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="${tmake_file} t-linux arm/t-arm"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes
+ case ${target} in
+ arm*-*-linux-gnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # 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
+ # The EABI requires the use of __cxa_atexit.
+ default_use_cxa_atexit=yes
+ ;;
+ *)
+ tmake_file="$tmake_file arm/t-linux"
+ ;;
+ esac
+ tm_file="$tm_file arm/aout.h arm/arm.h"
;;
arm*-*-uclinux*) # ARM ucLinux
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 60acf36..dd976b0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -673,7 +673,8 @@ static const struct abi_name arm_all_abis[] =
{"apcs-gnu", ARM_ABI_APCS},
{"atpcs", ARM_ABI_ATPCS},
{"aapcs", ARM_ABI_AAPCS},
- {"iwmmxt", ARM_ABI_IWMMXT}
+ {"iwmmxt", ARM_ABI_IWMMXT},
+ {"aapcs-linux", ARM_ABI_AAPCS_LINUX}
};
/* Return the number of bits set in VALUE. */
@@ -1194,7 +1195,7 @@ arm_override_options (void)
flag_schedule_insns = flag_schedule_insns_after_reload = 0;
/* Override the default structure alignment for AAPCS ABI. */
- if (arm_abi == ARM_ABI_AAPCS)
+ if (TARGET_AAPCS_BASED)
arm_structure_size_boundary = 8;
if (structure_size_string != NULL)
@@ -14527,7 +14528,7 @@ arm_promote_prototypes (tree t ATTRIBUTE_UNUSED)
static bool
arm_default_short_enums (void)
{
- return TARGET_AAPCS_BASED;
+ return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX;
}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 64b5e37..ae13a9d 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -279,7 +279,8 @@ enum arm_abi_type
ARM_ABI_APCS,
ARM_ABI_ATPCS,
ARM_ABI_AAPCS,
- ARM_ABI_IWMMXT
+ ARM_ABI_IWMMXT,
+ ARM_ABI_AAPCS_LINUX
};
extern enum arm_abi_type arm_abi;
@@ -501,6 +502,10 @@ extern int arm_structure_size_boundary;
#define SIZE_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long unsigned int")
#endif
+#ifndef PTRDIFF_TYPE
+#define PTRDIFF_TYPE (TARGET_AAPCS_BASED ? "int" : "long int")
+#endif
+
/* AAPCS requires that structure alignment is affected by bitfields. */
#ifndef PCC_BITFIELD_TYPE_MATTERS
#define PCC_BITFIELD_TYPE_MATTERS TARGET_AAPCS_BASED
diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
index 7fb7d6a..ac5a090 100644
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -30,8 +30,13 @@
#define TARGET_UNWIND_INFO 1
/* Section 4.1 of the AAPCS requires the use of VFP format. */
+#undef FPUTYPE_DEFAULT
#define FPUTYPE_DEFAULT FPUTYPE_VFP
+/* EABI targets should enable interworking by default. */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT MASK_INTERWORK
+
/* The ARM BPABI functions return a boolean; they use no special
calling convention. */
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
@@ -101,6 +106,7 @@
} \
while (false)
+#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
TARGET_BPABI_CPP_BUILTINS()
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
new file mode 100644
index 0000000..62aa6dd
--- /dev/null
+++ b/gcc/config/arm/linux-eabi.h
@@ -0,0 +1,70 @@
+/* Configuration file for ARM GNU/Linux EABI targets.
+ Copyright (C) 2004
+ Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* On EABI GNU/Linux, we want both the BPABI builtins and the
+ GNU/Linux builtins. */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ TARGET_BPABI_CPP_BUILTINS(); \
+ LINUX_TARGET_OS_CPP_BUILTINS(); \
+ } \
+ while (false)
+
+/* We default to a soft-float ABI so that binaries can run on all
+ target hardware. */
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+
+/* We default to the "aapcs-linux" ABI so that enums are int-sized by
+ default. */
+#undef ARM_DEFAULT_ABI
+#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
+
+/* Default to armv5t so that thumb shared libraries work.
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+#undef SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+#undef SUBTARGET_EXTRA_LINK_SPEC
+#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
+
+/* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+#undef LINUX_TARGET_INTERPRETER
+#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
+
+/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+#undef LINK_SPEC
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC
+
+/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
+ do not use -lfloat. */
+#undef LIBGCC_SPEC
+
+/* Use the AAPCS type for wchar_t, or the previous Linux default for
+ non-AAPCS. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long int")
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 1006329..5429a13 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -81,18 +81,22 @@
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
-#undef LINK_SPEC
-#define LINK_SPEC "%{h*} %{version:-v} \
+#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
+
+#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
%{b} \
%{static:-Bstatic} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
+#undef LINK_SPEC
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC
+
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
diff --git a/gcc/config/arm/t-linux-eabi b/gcc/config/arm/t-linux-eabi
new file mode 100644
index 0000000..7cfee90
--- /dev/null
+++ b/gcc/config/arm/t-linux-eabi
@@ -0,0 +1,7 @@
+# These functions are included in shared libraries.
+TARGET_LIBGCC2_CFLAGS = -fPIC
+
+# We do not build a Thumb multilib for Linux because the definition of
+# CLEAR_INSN_CACHE in linux-gas.h does not work in Thumb mode.
+MULTILIB_OPTIONS =
+MULTILIB_DIRNAMES =
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index bc4d178..e0a5097 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7160,7 +7160,7 @@ architectures:
@item -mabi=@var{name}
@opindex mabi
Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu},
-@samp{atpcs}, @samp{aapcs} and @samp{iwmmxt}.
+@samp{atpcs}, @samp{aapcs}, @samp{aapcs-linux} and @samp{iwmmxt}.
@item -mapcs-frame
@opindex mapcs-frame