Commit 078e19a4 by Philip Blundell Committed by Nick Clifton

Apply Phillip Blundell's patch to distinguish between new and old binutils.

From-SVN: r28687
parent 305f3003
...@@ -35,7 +35,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,7 +35,8 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define 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 #undef LIB_SPEC
#define LIB_SPEC \ #define LIB_SPEC \
......
...@@ -25,13 +25,34 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,13 +25,34 @@ Boston, MA 02111-1307, USA. */
/* We have libgcc2. */ /* We have libgcc2. */
#define HAVE_ATEXIT #define HAVE_ATEXIT
/* Default is to use APCS-32 mode. */
#ifndef SUBTARGET_DEFAULT_APCS26 #ifndef SUBTARGET_DEFAULT_APCS26
#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE) /* Default is to use APCS-32 mode. */
#define SUBTARGET_EXTRA_LINK_SPEC \ # 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}" " %{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}" " %{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 #endif
/* This was defined in linux.h. Define it here also. */ /* This was defined in linux.h. Define it here also. */
...@@ -47,6 +68,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -47,6 +68,7 @@ Boston, MA 02111-1307, USA. */
%{!shared: %{pthread:-lpthread} \ %{!shared: %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}" %{profile:-lc_p} %{!profile: -lc}}"
#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
...@@ -81,14 +103,17 @@ Boston, MA 02111-1307, USA. */ ...@@ -81,14 +103,17 @@ Boston, MA 02111-1307, USA. */
%{mbig-endian:-EB}" \ %{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC 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 #undef CPP_PREDEFINES
#define CPP_PREDEFINES \ #define CPP_PREDEFINES \
"-Dunix -Darm -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(arm) \ "-Dunix -D__arm__ -Dlinux -D__ELF__ \
-Amachine(arm) -D__ELF__ -Darm_elf" -Asystem(unix) -Asystem(posix) -Acpu(arm) -Amachine(arm)"
#ifndef SUBTARGET_DEFAULT_APCS26
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
#endif
/* Allow #sccs in preprocessor. */ /* Allow #sccs in preprocessor. */
#define SCCS_DIRECTIVE #define SCCS_DIRECTIVE
...@@ -236,10 +261,6 @@ const_section () \ ...@@ -236,10 +261,6 @@ const_section () \
#include "arm/elf.h" #include "arm/elf.h"
#include "arm/linux-gas.h" #include "arm/linux-gas.h"
#ifndef SUBTARGET_DEFAULT_APCS26 /* NWFPE always understands FPA instructions. */
/* 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. */
#undef FP_DEFAULT #undef FP_DEFAULT
#define FP_DEFAULT FP_SOFT3 #define FP_DEFAULT FP_SOFT3
#endif
/* Definitions for 26-bit ARM running Linux-based GNU systems using ELF /* Definitions for ARM running Linux-based GNU systems
Copyright (C) 1998 Free Software Foundation, Inc. using ELF and 26-bit APCS.
Contributed by Philip Blundell <philb@gnu.org> Copyright (C) 1999 Free Software Foundation, Inc.
Contributed by Philip Blundell <Philip.Blundell@pobox.com>
This file is part of GNU CC. This file is part of GNU CC.
...@@ -19,14 +20,5 @@ along with this program; see the file COPYING. If not, write to ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* Tell linux-elf.h to default to 26-bit mode. */
#define SUBTARGET_DEFAULT_APCS26 #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"
/* 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
...@@ -13,10 +13,15 @@ LIBGCC1 = libgcc1-asm.a ...@@ -13,10 +13,15 @@ LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arm/lib1funcs.asm LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx 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 # If you want to build both APCS variants as multilib options this is how
# to do it. # to do it.
#MULTILIB_OPTIONS = mapcs-32/apcs-26 # MULTILIB_OPTIONS += mapcs-32/mapcs-26
#MULTILIB_DIRNAMES = apcs-32 apcs-26 # MULTILIB_DIRNAMES += apcs-32 apcs-26
EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
LIBGCC = stmp-multilib LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib INSTALL_LIBGCC = install-multilib
...@@ -756,15 +756,31 @@ changequote([,])dnl ...@@ -756,15 +756,31 @@ changequote([,])dnl
tmake_file=arm/t-linux tmake_file=arm/t-linux
gnu_ld=yes gnu_ld=yes
;; ;;
arm*-*-linux-gnu*) # ARM GNU/Linux with ELF arm*-*-linux-gnuoldld*) # ARM GNU/Linux with old ELF linker
xm_file=arm/xm-linux.h xm_file=arm/xm-linux.h
xmake_file=x-linux xmake_file=x-linux
tm_file="arm/linux-oldld.h arm/linux-elf.h"
case $machine in case $machine in
armv2*-*-*) armv2*-*-*)
tm_file=arm/linux-elf26.h tm_file="arm/linux-elf26.h $tm_file"
;; ;;
*) esac
tm_file=arm/linux-elf.h tmake_file="t-linux arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes
case x${enable_threads} in
x | xyes | xpthreads | xposix)
thread_file='posix'
;;
esac
;;
arm*-*-linux-gnu*) # ARM GNU/Linux with ELF
xm_file=arm/xm-linux.h
xmake_file=x-linux
tm_file="arm/linux-elf.h"
case $machine in
armv2*-*-*)
tm_file="arm/linux-elf26.h $tm_file"
;; ;;
esac esac
tmake_file="t-linux arm/t-linux" tmake_file="t-linux arm/t-linux"
......
...@@ -914,12 +914,23 @@ produce @file{a.out} format object modules. ...@@ -914,12 +914,23 @@ produce @file{a.out} format object modules.
You may need to make a variant of the file @file{arm.h} for your particular You may need to make a variant of the file @file{arm.h} for your particular
configuration. configuration.
@item arm-*-linuxaout @item arm-*-elf
Any of the ARM family processors running the Linux-based GNU system with This configuration is intended for embedded systems.
the @file{a.out} binary format (ELF is not yet supported). You must use
version 2.8.1.0.7 or later of the GNU/Linux binutils, which you can download @item arm-*-linux-gnuaout
from @file{sunsite.unc.edu:/pub/Linux/GCC} and other mirror sites for Any of the ARM-family processors running the Linux-based GNU system with
Linux-based GNU systems. the @file{a.out} binary format. This is an obsolete configuration.
@item arm-*-linux-gnu
@itemx arm-*-linux-gnuoldld
Any of the ARM-family processors running the Linux-based GNU system with
the @file{ELF} binary format. You must use version 2.9.1.0.22 or later
of the GNU/Linux binutils, which you can download from
@file{ftp.varesearch.com:/pub/support/hjl/binutils}.
These two configurations differ only in the required version of GNU
binutils. For binutils 2.9.1.0.x, use @samp{arm-*-linux-gnuoldld}. For
newer versions of binutils, use @samp{arm-*-linux-gnu}.
@item arm-*-riscix @item arm-*-riscix
The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD Unix. The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD Unix.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment