Commit | Line | Data |
---|---|---|
5bf135a7 NC |
1 | # |
2 | # Copyright 2012 Free Software Foundation | |
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 | # | |
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. | |
23 | # This is that index. Each configure.in file should source this file | |
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 | ||
32 | HDEFINES= | |
33 | host64=false | |
34 | HOST_64BIT_TYPE= | |
35 | HOST_U_64BIT_TYPE= | |
36 | ||
37 | case "${host}" in | |
38 | ||
db8274e6 | 39 | hppa*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;; | |
45 | hppa*-*-hpux*) HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;; | |
252b5132 RH |
46 | hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;; |
47 | hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;; | |
48 | hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;; | |
49 | hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;; | |
50 | ||
76f703bf SE |
51 | ia64-*-hpux*) HDEFINES=-D_LARGEFILE64_SOURCE |
52 | host64=true;; | |
6726e1ea | 53 | ia64-*-*) 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. | |
57 | i[3-7]86-*-mingw32*) HDEFINES=-D__USE_MINGW_FSEEK;; | |
58 | ||
80c7c40a NC |
59 | i[3-7]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;; |
60 | i[3-7]86-sequent-sysv4*) ;; | |
61 | i[3-7]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;; | |
252b5132 | 62 | |
3dc70b57 | 63 | mips*-*-netbsd*) ;; |
252b5132 RH |
64 | mips*-*-openbsd*) ;; |
65 | mips*-dec-*) HDEFINES="-G 4" ;; | |
66 | mips*-sgi-irix3*) HDEFINES="-G 4" ;; | |
67 | mips*-sgi-irix4*) HDEFINES="-G 4" ;; | |
6726e1ea L |
68 | mips*-sgi-irix6*) host64=true;; |
69 | mips64*-*-linux*) host64=true;; | |
aeffff67 | 70 | mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;; |
252b5132 RH |
71 | mips*-*-sysv4*) ;; |
72 | mips*-*-sysv*) HDEFINES="-G 4" ;; | |
73 | mips*-*-riscos*) HDEFINES="-G 4" ;; | |
74 | ||
75 | m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;; | |
76 | ||
b946d5d8 DK |
77 | # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise |
78 | # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the | |
79 | # default code page used by windres/windmc when not specified by a commandline | |
80 | # option) to select the "WINDOWS-1252" name instead. See PR11280 for details. | |
81 | *-*-solaris2.11) HDEFINES=-DCP_ACP=1 ;; | |
82 | ||
252b5132 RH |
83 | *-*-windows*) |
84 | HOST_64BIT_TYPE=__int64 | |
85 | HOST_U_64BIT_TYPE="unsigned __int64" | |
86 | # The following krock is necessary because we can't run the build compiler | |
87 | # (MSVC) on the configure host, so we have to explicitly set the values here. | |
88 | # Note that this file is never run through autoconf, so we can't use any | |
89 | # autoconf macros here. Because of this, we have to muck with autoconf | |
90 | # variables explicitly. | |
91 | ac_cv_func_mmap_fixed_mapped=no | |
92 | ac_cv_header_time=no | |
93 | ac_cv_func_getpagesize=no | |
94 | ac_cv_func_madvise=no | |
95 | ac_cv_func_mprotect=no | |
633fd09f ILT |
96 | ac_cv_func_getuid=no |
97 | ac_cv_func_getgid=no | |
252b5132 RH |
98 | ac_cv_header_sys_file_h=no |
99 | ac_cv_header_sys_time_h=no | |
100 | ac_cv_header_unistd_h=no | |
101 | ;; | |
102 | esac |