Home | History | Annotate | Download | only in gold
      1 # configure.tgt -- target configuration for gold  -*- sh -*-
      2 
      3 # Copyright (C) 2006-2016 Free Software Foundation, Inc.
      4 # Written by Ian Lance Taylor <iant (a] 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 # targ_osabi		 EI_OSABI value
     40 
     41 # If the target is not recognized targ_obj is set to "UNKNOWN".
     42 
     43 targ_extra_obj=
     44 targ_machine=
     45 targ_size=
     46 targ_extra_size=
     47 targ_big_endian=
     48 targ_extra_big_endian=
     49 targ_osabi=ELFOSABI_NONE
     50 case "$targ" in
     51 i?86-*)
     52   targ_obj=i386
     53   targ_machine=EM_386
     54   targ_size=32
     55   targ_big_endian=false
     56   case "$targ" in
     57   i?86-*-freebsd*)
     58     targ_osabi=ELFOSABI_FREEBSD
     59     ;;
     60   esac
     61   ;;
     62 x86_64*)
     63   targ_obj=x86_64
     64   targ_extra_obj=i386
     65   targ_machine=EM_X86_64
     66   targ_size=64
     67   targ_extra_size=32
     68   targ_big_endian=false
     69   case "$targ" in
     70   x86_64-*-freebsd*)
     71     targ_osabi=ELFOSABI_FREEBSD
     72     ;;
     73   esac
     74   ;;
     75 tilegx*)
     76   targ_obj=tilegx
     77   targ_machine=EM_TILEGX
     78   targ_size=64
     79   targ_extra_size=32
     80   targ_big_endian=false
     81   targ_extra_big_endian=true
     82   ;;
     83 sparc-*)
     84   targ_obj=sparc
     85   targ_machine=EM_SPARC
     86   targ_size=32
     87   targ_extra_size=64
     88   targ_big_endian=true
     89   targ_extra_big_endian=false
     90   ;;
     91 sparc64-*)
     92   targ_obj=sparc
     93   targ_machine=EM_SPARCV9
     94   targ_size=64
     95   targ_extra_size=32
     96   targ_big_endian=true
     97   targ_extra_big_endian=false
     98   ;;
     99 powerpc-*)
    100   targ_obj=powerpc
    101   targ_machine=EM_PPC
    102   targ_size=32
    103   targ_extra_size=64
    104   targ_big_endian=true
    105   targ_extra_big_endian=false
    106   ;;
    107 powerpcle-*)
    108   targ_obj=powerpc
    109   targ_machine=EM_PPC
    110   targ_size=32
    111   targ_extra_size=64
    112   targ_big_endian=false
    113   targ_extra_big_endian=true
    114   ;;
    115 powerpc64-*)
    116   targ_obj=powerpc
    117   targ_machine=EM_PPC64
    118   targ_size=64
    119   targ_extra_size=32
    120   targ_big_endian=true
    121   targ_extra_big_endian=false
    122   ;;
    123 powerpc64le-*)
    124   targ_obj=powerpc
    125   targ_machine=EM_PPC64
    126   targ_size=64
    127   targ_extra_size=32
    128   targ_big_endian=false
    129   targ_extra_big_endian=true
    130   ;;
    131 armeb*-*-*|armbe*-*-*)
    132  targ_obj=arm
    133  targ_extra_obj=arm-reloc-property
    134  targ_machine=EM_ARM
    135  targ_size=32
    136  targ_big_endian=true
    137  targ_extra_big_endian=false
    138  ;;
    139 arm*-*-*)
    140  targ_obj=arm
    141  targ_extra_obj=arm-reloc-property
    142  targ_machine=EM_ARM
    143  targ_size=32
    144  targ_big_endian=false
    145  targ_extra_big_endian=true
    146  ;;
    147 aarch64*-*)
    148  targ_obj=aarch64
    149  targ_extra_obj=aarch64-reloc-property
    150  targ_machine=EM_AARCH64
    151  targ_size=64
    152  targ_extra_size=32
    153  targ_big_endian=false
    154  targ_extra_big_endian=true
    155  ;;
    156 mips*el*-*-*|mips*le*-*-*)
    157  targ_obj=mips
    158  targ_machine=EM_MIPS_RS3_LE
    159  targ_size=32
    160  targ_big_endian=false
    161  targ_extra_big_endian=true
    162  ;;
    163 mips*-*-*)
    164  targ_obj=mips
    165  targ_machine=EM_MIPS
    166  targ_size=32
    167  targ_big_endian=true
    168  targ_extra_big_endian=false
    169  ;;
    170 s390-*-*)
    171  targ_obj=s390
    172  targ_machine=EM_S390
    173  targ_size=32
    174  targ_big_endian=true
    175  targ_extra_big_endian=false
    176  ;;
    177 s390x-*-*)
    178  targ_obj=s390
    179  targ_machine=EM_S390
    180  targ_size=64
    181  targ_big_endian=true
    182  targ_extra_big_endian=false
    183  ;;
    184 *)
    185   targ_obj=UNKNOWN
    186   ;;
    187 esac
    188