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