2008-02-06 21:32:10 +01:00
|
|
|
# configure.tgt -- target configuration for gold -*- sh -*-
|
|
|
|
|
2015-01-01 15:15:26 +01:00
|
|
|
# Copyright (C) 2006-2015 Free Software Foundation, Inc.
|
2008-02-06 21:32:10 +01:00
|
|
|
# Written by Ian Lance Taylor <iant@google.com>.
|
|
|
|
|
|
|
|
# This file is part of gold.
|
|
|
|
|
|
|
|
# This program 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 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program 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; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
# MA 02110-1301, USA.
|
|
|
|
|
|
|
|
# This script handles target configuration for gold. This is shell
|
|
|
|
# code invoked by the autoconf generated configure script. Putting
|
|
|
|
# this in a separate file lets us skip running autoconf when modifying
|
|
|
|
# target specific information.
|
|
|
|
|
|
|
|
# This file switches on the shell variable ${targ}, which is a
|
|
|
|
# canonicalized GNU configuration triplet. It sets the following
|
|
|
|
# shell variables:
|
|
|
|
|
2008-04-15 07:16:51 +02:00
|
|
|
# targ_obj object file to include in the link, with no extension
|
2008-05-05 22:20:21 +02:00
|
|
|
# targ_extra_obj extra object file to include
|
2008-04-15 07:16:51 +02:00
|
|
|
# targ_machine ELF machine code for this target
|
|
|
|
# targ_size size of this target--32 or 64
|
|
|
|
# targ_extra_size extra targ_size setting for the target
|
|
|
|
# targ_big_endian whether the target is big-endian--true or false
|
|
|
|
# targ_extra_big_endian extra targ_big_endian setting for the target
|
2009-03-24 01:31:29 +01:00
|
|
|
# targ_osabi EI_OSABI value
|
2008-02-06 21:32:10 +01:00
|
|
|
|
|
|
|
# If the target is not recognized targ_obj is set to "UNKNOWN".
|
|
|
|
|
2008-05-05 22:20:21 +02:00
|
|
|
targ_extra_obj=
|
|
|
|
targ_machine=
|
|
|
|
targ_size=
|
|
|
|
targ_extra_size=
|
|
|
|
targ_big_endian=
|
|
|
|
targ_extra_big_endian=
|
2009-03-24 01:31:29 +01:00
|
|
|
targ_osabi=ELFOSABI_NONE
|
2008-02-06 21:32:10 +01:00
|
|
|
case "$targ" in
|
|
|
|
i?86-*)
|
|
|
|
targ_obj=i386
|
|
|
|
targ_machine=EM_386
|
|
|
|
targ_size=32
|
|
|
|
targ_big_endian=false
|
2009-03-24 01:31:29 +01:00
|
|
|
case "$targ" in
|
|
|
|
i?86-*-freebsd*)
|
|
|
|
targ_osabi=ELFOSABI_FREEBSD
|
|
|
|
;;
|
|
|
|
esac
|
2008-02-06 21:32:10 +01:00
|
|
|
;;
|
|
|
|
x86_64*)
|
|
|
|
targ_obj=x86_64
|
2008-05-05 22:20:21 +02:00
|
|
|
targ_extra_obj=i386
|
2008-02-06 21:32:10 +01:00
|
|
|
targ_machine=EM_X86_64
|
|
|
|
targ_size=64
|
2008-05-05 22:20:21 +02:00
|
|
|
targ_extra_size=32
|
2008-02-06 21:32:10 +01:00
|
|
|
targ_big_endian=false
|
2009-03-24 01:31:29 +01:00
|
|
|
case "$targ" in
|
|
|
|
x86_64-*-freebsd*)
|
|
|
|
targ_osabi=ELFOSABI_FREEBSD
|
|
|
|
;;
|
|
|
|
esac
|
2008-02-06 21:32:10 +01:00
|
|
|
;;
|
2012-09-15 19:11:28 +02:00
|
|
|
tilegx*)
|
|
|
|
targ_obj=tilegx
|
|
|
|
targ_machine=EM_TILEGX
|
|
|
|
targ_size=64
|
|
|
|
targ_extra_size=32
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
2008-04-15 07:16:51 +02:00
|
|
|
sparc-*)
|
|
|
|
targ_obj=sparc
|
|
|
|
targ_machine=EM_SPARC
|
|
|
|
targ_size=32
|
|
|
|
targ_extra_size=64
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
|
|
|
sparc64-*)
|
|
|
|
targ_obj=sparc
|
|
|
|
targ_machine=EM_SPARCV9
|
|
|
|
targ_size=64
|
|
|
|
targ_extra_size=32
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
2008-06-12 19:02:17 +02:00
|
|
|
powerpc-*)
|
|
|
|
targ_obj=powerpc
|
|
|
|
targ_machine=EM_PPC
|
|
|
|
targ_size=32
|
|
|
|
targ_extra_size=64
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
2013-04-25 15:22:52 +02:00
|
|
|
powerpcle-*)
|
|
|
|
targ_obj=powerpc
|
|
|
|
targ_machine=EM_PPC
|
|
|
|
targ_size=32
|
|
|
|
targ_extra_size=64
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
2008-06-12 19:02:17 +02:00
|
|
|
powerpc64-*)
|
2009-01-19 20:55:26 +01:00
|
|
|
targ_obj=powerpc
|
2008-06-12 19:02:17 +02:00
|
|
|
targ_machine=EM_PPC64
|
|
|
|
targ_size=64
|
|
|
|
targ_extra_size=32
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
2013-04-25 15:22:52 +02:00
|
|
|
powerpc64le-*)
|
|
|
|
targ_obj=powerpc
|
|
|
|
targ_machine=EM_PPC64
|
|
|
|
targ_size=64
|
|
|
|
targ_extra_size=32
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
2009-05-29 02:15:12 +02:00
|
|
|
armeb*-*-*|armbe*-*-*)
|
|
|
|
targ_obj=arm
|
2010-02-03 06:36:55 +01:00
|
|
|
targ_extra_obj=arm-reloc-property
|
2009-05-29 02:15:12 +02:00
|
|
|
targ_machine=EM_ARM
|
|
|
|
targ_size=32
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
|
|
|
arm*-*-*)
|
|
|
|
targ_obj=arm
|
2010-02-03 06:36:55 +01:00
|
|
|
targ_extra_obj=arm-reloc-property
|
2009-05-29 02:15:12 +02:00
|
|
|
targ_machine=EM_ARM
|
|
|
|
targ_size=32
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
2014-07-03 01:21:23 +02:00
|
|
|
aarch64*-*)
|
|
|
|
targ_obj=aarch64
|
2014-10-18 10:30:54 +02:00
|
|
|
targ_extra_obj=aarch64-reloc-property
|
2014-07-03 01:21:23 +02:00
|
|
|
targ_machine=EM_AARCH64
|
|
|
|
targ_size=64
|
|
|
|
targ_extra_size=32
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
2014-06-23 20:52:34 +02:00
|
|
|
mips*el*-*-*|mips*le*-*-*)
|
|
|
|
targ_obj=mips
|
|
|
|
targ_machine=EM_MIPS_RS3_LE
|
|
|
|
targ_size=32
|
|
|
|
targ_big_endian=false
|
|
|
|
targ_extra_big_endian=true
|
|
|
|
;;
|
|
|
|
mips*-*-*)
|
|
|
|
targ_obj=mips
|
|
|
|
targ_machine=EM_MIPS
|
|
|
|
targ_size=32
|
|
|
|
targ_big_endian=true
|
|
|
|
targ_extra_big_endian=false
|
|
|
|
;;
|
2008-02-06 21:32:10 +01:00
|
|
|
*)
|
|
|
|
targ_obj=UNKNOWN
|
|
|
|
;;
|
|
|
|
esac
|