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. */
#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 \
......
......@@ -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
/* 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"
/* 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
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
......@@ -756,15 +756,31 @@ changequote([,])dnl
tmake_file=arm/t-linux
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
xmake_file=x-linux
tm_file="arm/linux-oldld.h arm/linux-elf.h"
case $machine in
armv2*-*-*)
tm_file=arm/linux-elf26.h
tm_file="arm/linux-elf26.h $tm_file"
;;
*)
tm_file=arm/linux-elf.h
esac
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
tmake_file="t-linux arm/t-linux"
......
......@@ -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
configuration.
@item arm-*-linuxaout
Any of the ARM family processors running the Linux-based GNU system with
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
from @file{sunsite.unc.edu:/pub/Linux/GCC} and other mirror sites for
Linux-based GNU systems.
@item arm-*-elf
This configuration is intended for embedded systems.
@item arm-*-linux-gnuaout
Any of the ARM-family processors running the Linux-based GNU system with
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
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