configure.host 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #
  2. # Copyright (C) 2012-2022 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  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. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; see the file COPYING3. If not see
  16. # <http://www.gnu.org/licenses/>.
  17. #
  18. # This file is a shell script that overrides some of the tools and
  19. # flags used on a host specific basis.
  20. # Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
  21. # binutils directories (at least), the index to it is also shared.
  22. # This is that index. Each configure.ac file should source this file
  23. # in its per-host part.
  24. # This sets the following shell variables:
  25. # HDEFINES host specific compiler options
  26. # host64 set to true if 64 bit types are as fast as 32 bit
  27. # HOST_64BIT_TYPE host 64 bit type
  28. # HOST_U_64BIT_TYPE unsigned 64 bit type (not needed if 64BIT_TYPE is long)
  29. HDEFINES=
  30. host64=false
  31. HOST_64BIT_TYPE=
  32. HOST_U_64BIT_TYPE=
  33. case "${host}" in
  34. hppa*64*-*-hpux*) # HP/UX's ftello64 et.al. declarations are only
  35. # visible when _LARGEFILE64_SOURCE is defined.
  36. # Without those declarations, real_ftell et.al.
  37. # get mis-compiled.
  38. HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE"
  39. host64=true;;
  40. hppa*-*-hpux*) HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
  41. hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
  42. hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
  43. hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
  44. hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
  45. ia64-*-hpux*) HDEFINES=-D_LARGEFILE64_SOURCE
  46. host64=true;;
  47. ia64-*-*) host64=true;;
  48. # Workaround for limitations on win9x where file contents are
  49. # not zero'd out if you seek past the end and then write.
  50. i[3-7]86-*-mingw32*) HDEFINES=-D__USE_MINGW_FSEEK;;
  51. i[3-7]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
  52. i[3-7]86-sequent-sysv4*) ;;
  53. i[3-7]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;;
  54. mips*-*-netbsd*) ;;
  55. mips*-*-openbsd*) ;;
  56. mips*-dec-*) HDEFINES="-G 4" ;;
  57. mips*-sgi-irix3*) HDEFINES="-G 4" ;;
  58. mips*-sgi-irix4*) HDEFINES="-G 4" ;;
  59. mips*-sgi-irix6*) host64=true;;
  60. mips64*-*-linux*) host64=true;;
  61. mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;;
  62. mips*-*-sysv4*) ;;
  63. mips*-*-sysv*) HDEFINES="-G 4" ;;
  64. mips*-*-riscos*) HDEFINES="-G 4" ;;
  65. # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise
  66. # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the
  67. # default code page used by windres/windmc when not specified by a commandline
  68. # option) to select the "WINDOWS-1252" name instead. See PR11280 for details.
  69. *-*-solaris2.11) HDEFINES=-DCP_ACP=1 ;;
  70. *-*-windows*)
  71. HOST_64BIT_TYPE=__int64
  72. HOST_U_64BIT_TYPE="unsigned __int64"
  73. # The following krock is necessary because we can't run the build compiler
  74. # (MSVC) on the configure host, so we have to explicitly set the values here.
  75. # Note that this file is never run through autoconf, so we can't use any
  76. # autoconf macros here. Because of this, we have to muck with autoconf
  77. # variables explicitly.
  78. ac_cv_func_mmap_fixed_mapped=no
  79. ac_cv_header_time=no
  80. ac_cv_func_getpagesize=no
  81. ac_cv_func_madvise=no
  82. ac_cv_func_mprotect=no
  83. ac_cv_func_getuid=no
  84. ac_cv_func_getgid=no
  85. ac_cv_header_sys_file_h=no
  86. ac_cv_header_sys_time_h=no
  87. ac_cv_header_unistd_h=no
  88. ;;
  89. esac