aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/linux-elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arm/linux-elf.h')
-rw-r--r--gcc/config/arm/linux-elf.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index de45e1c4b53..a7e9e28938f 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -1,5 +1,5 @@
/* Definitions for ARM running Linux-based GNU systems using ELF
- Copyright (C) 1993, 1994, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Philip Blundell <philb@gnu.org>
This file is part of GNU CC.
@@ -22,16 +22,36 @@ Boston, MA 02111-1307, USA. */
/* Run-time Target Specification. */
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+/* Do not assume anything about header files. */
+#define NO_IMPLICIT_EXTERN_C
+
/* We have libgcc2. */
#define HAVE_ATEXIT
-/* Default is to use APCS-32 mode. */
#ifndef SUBTARGET_DEFAULT_APCS26
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
-#define SUBTARGET_EXTRA_LINK_SPEC \
+/* Default is to use APCS-32 mode. */
+# define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
+# ifdef SUBTARGET_OLD_LINKER
+# define SUBTARGET_EXTRA_LINK_SPEC \
" %{mapcs-26:-m elf32arm26} %{!mapcs-26:-m elf32arm}"
-#define SUBTARGET_EXTRA_ASM_SPEC \
+# else /* new linker */
+# define SUBTARGET_EXTRA_LINK_SPEC \
+ " %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p"
+# endif
+# define SUBTARGET_EXTRA_ASM_SPEC \
" %{mapcs-26:-mapcs-26} %(!mapcs-26:-mapcs-32}"
+# define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+#else /* default is APCS-26 */
+# define TARGET_DEFAULT (ARM_FLAG_SHORT_BYTE)
+# ifdef SUBTARGET_OLD_LINKER
+# define SUBTARGET_LINK_SPEC \
+ " %{mapcs-32:-m elf32arm} %{!mapcs-32:-m elf32arm26}"
+# else /* new linker */
+# define SUBTARGET_LINK_SPEC \
+ " %{mapcs-32:-m armelf_linux} %{!mapcs-32:-m armelf_linux26} -p"
+# endif
+# define SUBTARGET_EXTRA_ASM_SPEC \
+ " %{mapcs-32:-mapcs-32} %(!mapcs-32:-mapcs-26}"
#endif
/* This was defined in linux.h. Define it here also. */
@@ -83,8 +103,8 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
-"-Dunix -Darm -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(arm) \
--Amachine(arm) -D__ELF__ -Darm_elf"
+"-Dunix -D__arm__ -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(arm) \
+-Amachine(arm) -D__ELF__"
#ifndef SUBTARGET_DEFAULT_APCS26
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"