summaryrefslogtreecommitdiffstats
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/linux-aout.h3
-rw-r--r--gcc/config/arm/linux-elf.h53
-rw-r--r--gcc/config/arm/linux-elf26.h18
-rw-r--r--gcc/config/arm/linux-oldld.h27
-rw-r--r--gcc/config/arm/t-linux9
5 files changed, 78 insertions, 32 deletions
diff --git a/gcc/config/arm/linux-aout.h b/gcc/config/arm/linux-aout.h
index 3a853bd9d9e..fd76805f792 100644
--- a/gcc/config/arm/linux-aout.h
+++ b/gcc/config/arm/linux-aout.h
@@ -35,7 +35,8 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
-"-Dunix -Darm -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(arm) -Amachine(arm)"
+"-Dunix -D__arm__ -Dlinux \
+-Asystem(unix) -Asystem(posix) -Acpu(arm) -Amachine(arm)"
#undef LIB_SPEC
#define LIB_SPEC \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index de45e1c4b53..b1688cbf480 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -25,13 +25,34 @@ Boston, MA 02111-1307, USA. */
/* 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 MULTILIB_DEFAULTS \
+ { "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+# 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}"
+# define MULTILIB_DEFAULTS \
+ { "mlittle-endian", "mhard-float", "mapcs-26", "mno-thumb-interwork" }
#endif
/* This was defined in linux.h. Define it here also. */
@@ -45,7 +66,8 @@ Boston, MA 02111-1307, USA. */
#define LIB_SPEC \
"%{shared: -lc} \
%{!shared: %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ %{profile:-lc_p} %{!profile: -lc}}"
+
#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
@@ -81,14 +103,17 @@ Boston, MA 02111-1307, USA. */
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
+#define ASM_SPEC "%{mbig-endian:-EB} \
+ %{mcpu=*:-m%*} %{march=*:-m%*} \
+ %{mthumb-interwork:-mthumb-interwork} \
+ %{msoft-float:-mno-fpu} \
+ %{mapcs-float:-mfloat}" \
+ SUBTARGET_EXTRA_ASM_SPEC
+
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
-"-Dunix -Darm -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(arm) \
--Amachine(arm) -D__ELF__ -Darm_elf"
-
-#ifndef SUBTARGET_DEFAULT_APCS26
-#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
-#endif
+"-Dunix -D__arm__ -Dlinux -D__ELF__ \
+-Asystem(unix) -Asystem(posix) -Acpu(arm) -Amachine(arm)"
/* Allow #sccs in preprocessor. */
#define SCCS_DIRECTIVE
@@ -236,10 +261,6 @@ const_section () \
#include "arm/elf.h"
#include "arm/linux-gas.h"
-#ifndef SUBTARGET_DEFAULT_APCS26
-/* On 32-bit machine it is always safe to assume we have the "new"
- floating point system.
- ?? Make this happen for all targets when NWFPE is better established. */
+/* NWFPE always understands FPA instructions. */
#undef FP_DEFAULT
#define FP_DEFAULT FP_SOFT3
-#endif
diff --git a/gcc/config/arm/linux-elf26.h b/gcc/config/arm/linux-elf26.h
index aa65ae7f750..ce26f1fef9d 100644
--- a/gcc/config/arm/linux-elf26.h
+++ b/gcc/config/arm/linux-elf26.h
@@ -1,6 +1,7 @@
-/* Definitions for 26-bit ARM running Linux-based GNU systems using ELF
- Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by Philip Blundell <philb@gnu.org>
+/* Definitions for ARM running Linux-based GNU systems
+ using ELF and 26-bit APCS.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Philip Blundell <Philip.Blundell@pobox.com>
This file is part of GNU CC.
@@ -19,14 +20,5 @@ along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* Tell linux-elf.h to default to 26-bit mode. */
#define SUBTARGET_DEFAULT_APCS26
-
-#define SUBTARGET_LINK_SPEC \
- " %{mapcs-32:-m elf32arm} %{!mapcs-32:-m elf32arm26}"
-
-#define SUBTARGET_EXTRA_ASM_SPEC \
- " %{mapcs-32:-mapcs-32} %(!mapcs-32:-mapcs-26}"
-
-#define TARGET_DEFAULT (ARM_FLAG_SHORT_BYTE)
-
-#include "arm/linux-elf.h"
diff --git a/gcc/config/arm/linux-oldld.h b/gcc/config/arm/linux-oldld.h
new file mode 100644
index 00000000000..8b2af015efe
--- /dev/null
+++ b/gcc/config/arm/linux-oldld.h
@@ -0,0 +1,27 @@
+/* Definitions for ARM running Linux-based GNU systems
+ using ELF with old binutils.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Philip Blundell <Philip.Blundell@pobox.com>
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 this program; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Unfortunately, owing to various historical accidents, version 2.9.4
+ and newer of GNU binutils are not quite compatible with the old
+ (2.9.1-based) toolset. This tells linux-elf.h to generate specs
+ appropriate for the older versions. */
+#define SUBTARGET_OLD_LINKER
diff --git a/gcc/config/arm/t-linux b/gcc/config/arm/t-linux
index 9b7c3e38f4e..17c04972967 100644
--- a/gcc/config/arm/t-linux
+++ b/gcc/config/arm/t-linux
@@ -13,10 +13,15 @@ LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
+MULTILIB_OPTIONS = mhard-float/msoft-float
+MULTILIB_DIRNAMES = hard-float soft-float
+
# If you want to build both APCS variants as multilib options this is how
# to do it.
-#MULTILIB_OPTIONS = mapcs-32/apcs-26
-#MULTILIB_DIRNAMES = apcs-32 apcs-26
+# MULTILIB_OPTIONS += mapcs-32/mapcs-26
+# MULTILIB_DIRNAMES += apcs-32 apcs-26
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
OpenPOWER on IntegriCloud