configure.tgt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # configure.tgt -- target configuration for gold -*- sh -*-
  2. # Copyright (C) 2006-2022 Free Software Foundation, Inc.
  3. # Written by Ian Lance Taylor <iant@google.com>.
  4. # This file is part of gold.
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. # MA 02110-1301, USA.
  17. # This script handles target configuration for gold. This is shell
  18. # code invoked by the autoconf generated configure script. Putting
  19. # this in a separate file lets us skip running autoconf when modifying
  20. # target specific information.
  21. # This file switches on the shell variable ${targ}, which is a
  22. # canonicalized GNU configuration triplet. It sets the following
  23. # shell variables:
  24. # targ_obj object file to include in the link, with no extension
  25. # targ_extra_obj extra object file to include
  26. # targ_machine ELF machine code for this target
  27. # targ_size size of this target--32 or 64
  28. # targ_extra_size extra targ_size setting for the target
  29. # targ_big_endian whether the target is big-endian--true or false
  30. # targ_extra_big_endian extra targ_big_endian setting for the target
  31. # targ_osabi EI_OSABI value
  32. # If the target is not recognized targ_obj is set to "UNKNOWN".
  33. targ_extra_obj=
  34. targ_machine=
  35. targ_size=
  36. targ_extra_size=
  37. targ_big_endian=
  38. targ_extra_big_endian=
  39. targ_osabi=ELFOSABI_NONE
  40. case "$targ" in
  41. i?86-*)
  42. targ_obj=i386
  43. targ_machine=EM_386
  44. targ_size=32
  45. targ_big_endian=false
  46. case "$targ" in
  47. i?86-*-freebsd*)
  48. targ_osabi=ELFOSABI_FREEBSD
  49. ;;
  50. esac
  51. ;;
  52. x86_64*)
  53. targ_obj=x86_64
  54. targ_extra_obj=i386
  55. targ_machine=EM_X86_64
  56. targ_size=64
  57. targ_extra_size=32
  58. targ_big_endian=false
  59. case "$targ" in
  60. x86_64-*-freebsd*)
  61. targ_osabi=ELFOSABI_FREEBSD
  62. ;;
  63. esac
  64. ;;
  65. tilegx*)
  66. targ_obj=tilegx
  67. targ_machine=EM_TILEGX
  68. targ_size=64
  69. targ_extra_size=32
  70. targ_big_endian=false
  71. targ_extra_big_endian=true
  72. ;;
  73. sparc-*)
  74. targ_obj=sparc
  75. targ_machine=EM_SPARC
  76. targ_size=32
  77. targ_extra_size=64
  78. targ_big_endian=true
  79. targ_extra_big_endian=false
  80. ;;
  81. sparc64-*)
  82. targ_obj=sparc
  83. targ_machine=EM_SPARCV9
  84. targ_size=64
  85. targ_extra_size=32
  86. targ_big_endian=true
  87. targ_extra_big_endian=false
  88. ;;
  89. powerpc-*)
  90. targ_obj=powerpc
  91. targ_machine=EM_PPC
  92. targ_size=32
  93. targ_extra_size=64
  94. targ_big_endian=true
  95. targ_extra_big_endian=false
  96. ;;
  97. powerpcle-*)
  98. targ_obj=powerpc
  99. targ_machine=EM_PPC
  100. targ_size=32
  101. targ_extra_size=64
  102. targ_big_endian=false
  103. targ_extra_big_endian=true
  104. ;;
  105. powerpc64-*)
  106. targ_obj=powerpc
  107. targ_machine=EM_PPC64
  108. targ_size=64
  109. targ_extra_size=32
  110. targ_big_endian=true
  111. targ_extra_big_endian=false
  112. ;;
  113. powerpc64le-*)
  114. targ_obj=powerpc
  115. targ_machine=EM_PPC64
  116. targ_size=64
  117. targ_extra_size=32
  118. targ_big_endian=false
  119. targ_extra_big_endian=true
  120. ;;
  121. armeb*-*-*|armbe*-*-*)
  122. targ_obj=arm
  123. targ_extra_obj=arm-reloc-property
  124. targ_machine=EM_ARM
  125. targ_size=32
  126. targ_big_endian=true
  127. targ_extra_big_endian=false
  128. ;;
  129. arm*-*-*)
  130. targ_obj=arm
  131. targ_extra_obj=arm-reloc-property
  132. targ_machine=EM_ARM
  133. targ_size=32
  134. targ_big_endian=false
  135. targ_extra_big_endian=true
  136. ;;
  137. aarch64*-*)
  138. targ_obj=aarch64
  139. targ_extra_obj=aarch64-reloc-property
  140. targ_machine=EM_AARCH64
  141. targ_size=64
  142. targ_extra_size=32
  143. targ_big_endian=false
  144. targ_extra_big_endian=true
  145. ;;
  146. mips*el*-*-*|mips*le*-*-*)
  147. targ_obj=mips
  148. targ_machine=EM_MIPS_RS3_LE
  149. targ_size=32
  150. targ_big_endian=false
  151. targ_extra_big_endian=true
  152. ;;
  153. mips*-*-*)
  154. targ_obj=mips
  155. targ_machine=EM_MIPS
  156. targ_size=32
  157. targ_big_endian=true
  158. targ_extra_big_endian=false
  159. ;;
  160. s390-*-*)
  161. targ_obj=s390
  162. targ_machine=EM_S390
  163. targ_size=32
  164. targ_big_endian=true
  165. targ_extra_big_endian=false
  166. ;;
  167. s390x-*-*)
  168. targ_obj=s390
  169. targ_machine=EM_S390
  170. targ_size=64
  171. targ_big_endian=true
  172. targ_extra_big_endian=false
  173. ;;
  174. *)
  175. targ_obj=UNKNOWN
  176. ;;
  177. esac