configure.tgt revision 1.1.1.1
1# configure.tgt -- target configuration for gold  -*- sh -*-
2
3# Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
4# Written by Ian Lance Taylor <iant@google.com>.
5
6# This file is part of gold.
7
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 3 of the License, or
11# (at your option) any later version.
12
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21# MA 02110-1301, USA.
22
23# This script handles target configuration for gold.  This is shell
24# code invoked by the autoconf generated configure script.  Putting
25# this in a separate file lets us skip running autoconf when modifying
26# target specific information.
27
28# This file switches on the shell variable ${targ}, which is a
29# canonicalized GNU configuration triplet.  It sets the following
30# shell variables:
31
32# targ_obj               object file to include in the link, with no extension
33# targ_extra_obj         extra object file to include
34# targ_machine           ELF machine code for this target
35# targ_size              size of this target--32 or 64
36# targ_extra_size        extra targ_size setting for the target
37# targ_big_endian        whether the target is big-endian--true or false
38# targ_extra_big_endian  extra targ_big_endian setting for the target
39
40# If the target is not recognized targ_obj is set to "UNKNOWN".
41
42targ_extra_obj=
43targ_machine=
44targ_size=
45targ_extra_size=
46targ_big_endian=
47targ_extra_big_endian=
48case "$targ" in
49i?86-*)
50  targ_obj=i386
51  targ_machine=EM_386
52  targ_size=32
53  targ_big_endian=false
54  ;;
55x86_64*)
56  targ_obj=x86_64
57  targ_extra_obj=i386
58  targ_machine=EM_X86_64
59  targ_size=64
60  targ_extra_size=32
61  targ_big_endian=false
62  ;;
63sparc-*)
64  targ_obj=sparc
65  targ_machine=EM_SPARC
66  targ_size=32
67  targ_extra_size=64
68  targ_big_endian=true
69  targ_extra_big_endian=false
70  ;;
71sparc64-*)
72  targ_obj=sparc
73  targ_machine=EM_SPARCV9
74  targ_size=64
75  targ_extra_size=32
76  targ_big_endian=true
77  targ_extra_big_endian=false
78  ;;
79powerpc-*)
80  targ_obj=powerpc
81  targ_machine=EM_PPC
82  targ_size=32
83  targ_extra_size=64
84  targ_big_endian=true
85  targ_extra_big_endian=false
86  ;;
87powerpc64-*)
88  targ_obj=ppc64
89  targ_machine=EM_PPC64
90  targ_size=64
91  targ_extra_size=32
92  targ_big_endian=true
93  targ_extra_big_endian=false
94  ;;
95*)
96  targ_obj=UNKNOWN
97  ;;
98esac
99