]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/configure.host
gnu-nat: Move local functions inside gnu_nat_target class
[thirdparty/binutils-gdb.git] / bfd / configure.host
CommitLineData
5bf135a7 1#
b3adc24a 2# Copyright (C) 2012-2020 Free Software Foundation, Inc.
5bf135a7
NC
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.
1b786873 8#
5bf135a7
NC
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.
1b786873 13#
5bf135a7
NC
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#
252b5132
RH
18# This file is a shell script that overrides some of the tools and
19# flags used on a host specific basis.
20
21# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
22# binutils directories (at least), the index to it is also shared.
1110793a 23# This is that index. Each configure.ac file should source this file
252b5132
RH
24# in its per-host part.
25
26# This sets the following shell variables:
27# HDEFINES host specific compiler options
28# host64 set to true if 64 bit types are as fast as 32 bit
29# HOST_64BIT_TYPE host 64 bit type
30# HOST_U_64BIT_TYPE unsigned 64 bit type (not needed if 64BIT_TYPE is long)
31
32HDEFINES=
33host64=false
34HOST_64BIT_TYPE=
35HOST_U_64BIT_TYPE=
36
37case "${host}" in
38
db8274e6 39hppa*64*-*-hpux*) # HP/UX's ftello64 et.al. declarations are only
ca0b7686
AC
40 # visible when _LARGEFILE64_SOURCE is defined.
41 # Without those declarations, real_ftell et.al.
42 # get mis-compiled.
db8274e6
DA
43 HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE"
44 host64=true;;
45hppa*-*-hpux*) HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
252b5132
RH
46hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
47hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
48hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
49hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
50
76f703bf
SE
51ia64-*-hpux*) HDEFINES=-D_LARGEFILE64_SOURCE
52 host64=true;;
6726e1ea 53ia64-*-*) host64=true;;
800eeca4 54
2cefff79
DS
55# Workaround for limitations on win9x where file contents are
56# not zero'd out if you seek past the end and then write.
57i[3-7]86-*-mingw32*) HDEFINES=-D__USE_MINGW_FSEEK;;
58
80c7c40a
NC
59i[3-7]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
60i[3-7]86-sequent-sysv4*) ;;
61i[3-7]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;;
252b5132 62
3dc70b57 63mips*-*-netbsd*) ;;
252b5132
RH
64mips*-*-openbsd*) ;;
65mips*-dec-*) HDEFINES="-G 4" ;;
66mips*-sgi-irix3*) HDEFINES="-G 4" ;;
67mips*-sgi-irix4*) HDEFINES="-G 4" ;;
6726e1ea
L
68mips*-sgi-irix6*) host64=true;;
69mips64*-*-linux*) host64=true;;
aeffff67 70mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;;
252b5132
RH
71mips*-*-sysv4*) ;;
72mips*-*-sysv*) HDEFINES="-G 4" ;;
73mips*-*-riscos*) HDEFINES="-G 4" ;;
74
b946d5d8
DK
75# Some Solaris systems (osol0906 at least) have a libc that doesn't recognise
76# the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the
77# default code page used by windres/windmc when not specified by a commandline
78# option) to select the "WINDOWS-1252" name instead. See PR11280 for details.
79*-*-solaris2.11) HDEFINES=-DCP_ACP=1 ;;
80
252b5132
RH
81*-*-windows*)
82 HOST_64BIT_TYPE=__int64
83 HOST_U_64BIT_TYPE="unsigned __int64"
84# The following krock is necessary because we can't run the build compiler
85# (MSVC) on the configure host, so we have to explicitly set the values here.
86# Note that this file is never run through autoconf, so we can't use any
87# autoconf macros here. Because of this, we have to muck with autoconf
88# variables explicitly.
89 ac_cv_func_mmap_fixed_mapped=no
90 ac_cv_header_time=no
91 ac_cv_func_getpagesize=no
92 ac_cv_func_madvise=no
93 ac_cv_func_mprotect=no
633fd09f
ILT
94 ac_cv_func_getuid=no
95 ac_cv_func_getgid=no
252b5132
RH
96 ac_cv_header_sys_file_h=no
97 ac_cv_header_sys_time_h=no
98 ac_cv_header_unistd_h=no
99 ;;
100esac