summaryrefslogtreecommitdiff
path: root/gcc/config/arm/uclinux-elf.h
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-14 00:29:52 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-14 00:29:52 +0000
commit1ad38120b5aafd9fdfd7862770d58b8d0d4aeb4e (patch)
treed6fb6aef5ef320b0b983ada9172b0305d4a4669b /gcc/config/arm/uclinux-elf.h
parent6c05758d382b3c0f142d2ddd9fd1d4706a77bf6b (diff)
downloadgcc-1ad38120b5aafd9fdfd7862770d58b8d0d4aeb4e.tar.gz
2007-02-13 Paul Brook <paul@codesourcery.com>
gcc/ * config.gcc: Add arm*-*-uclinux-*eabi. * config/arm/uclinux-elf.h (TARGET_OS_CPP_BUILTINS): Define. (SUBTARGET_EXTRA_LINK_SPEC): Define. (STARTFILE_SPEC, ENDFILE_SPEC): Remove broken -shared handling. (LINK_GCC_C_SEQUENCE_SPEC): Undef. (LINK_SPEC): Define. (LIB_SPEC): Define. * config/arm/arm.c (arm_override_options): Use r9 as EABI PIC register. * config/arm/uclinux-eabi.h: New file. * config/arm/linux-eabi.h (WCHAR_TYPE): Remove. * config/arm/linux-gas.h (WCHAR_TYPE): Use unsigned long on AAPCS based targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121902 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/uclinux-elf.h')
-rw-r--r--gcc/config/arm/uclinux-elf.h48
1 files changed, 30 insertions, 18 deletions
diff --git a/gcc/config/arm/uclinux-elf.h b/gcc/config/arm/uclinux-elf.h
index 9f112cddaa2..d6dc4f60bdf 100644
--- a/gcc/config/arm/uclinux-elf.h
+++ b/gcc/config/arm/uclinux-elf.h
@@ -32,6 +32,21 @@
/* NOTE: The remaining definitions in this file are needed because uclinux
does not use config/linux.h. */
+/* Add GNU/Linux builtins. */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__uClinux__"); \
+ builtin_define ("__gnu_linux__"); \
+ builtin_define_std ("linux"); \
+ builtin_define_std ("unix"); \
+ builtin_assert ("system=linux"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=posix"); \
+ } \
+ while (false)
+
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
@@ -39,32 +54,20 @@
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
- the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
- provides part of the support for getting C++ file-scope static
- object constructed before entering `main'. */
+#undef SUBTARGET_EXTRA_LINK_SPEC
+#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux"
+/* Now we define the strings used to build the spec file. */
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC \
- "%{!shared: \
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
- %{!p:%{profile:gcrt1.o%s} \
- %{!profile:crt1.o%s}}}} \
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
-
-/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
- the GNU/Linux magical crtend.o file (see crtstuff.c) which
- provides part of the support for getting C++ file-scope static
- object constructed before entering `main', followed by a normal
- GNU/Linux "finalizer" file, `crtn.o'. */
+#define STARTFILE_SPEC "crt1%O%s crti%O%s crtbegin%O%s"
#undef ENDFILE_SPEC
-#define ENDFILE_SPEC \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
#undef CC1_SPEC
#define CC1_SPEC "%{profile:-p}"
+#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
@@ -72,3 +75,12 @@
#ifdef HAVE_LD_AS_NEEDED
#define USE_LD_AS_NEEDED 1
#endif
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X -elf2flt"
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"