133965Sjdp# This file is a shell script that overrides some of the tools and
233965Sjdp# flags used on a host specific basis.
333965Sjdp
433965Sjdp# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
533965Sjdp# binutils directories (at least), the index to it is also shared.
633965Sjdp# This is that index.  Each configure.in file should source this file
733965Sjdp# in its per-host part.
833965Sjdp
933965Sjdp# This sets the following shell variables:
1033965Sjdp#  HDEFINES		host specific compiler options
1133965Sjdp#  host64		set to true if 64 bit types are as fast as 32 bit
1233965Sjdp#  HOST_64BIT_TYPE	host 64 bit type
1333965Sjdp#  HOST_U_64BIT_TYPE	unsigned 64 bit type (not needed if 64BIT_TYPE is long)
1433965Sjdp
1533965SjdpHDEFINES=
1633965Sjdphost64=false
1733965SjdpHOST_64BIT_TYPE=
1838889SjdpHOST_U_64BIT_TYPE=
1933965Sjdp
2033965Sjdpcase "${host}" in
2133965Sjdp
22218822Sdimhppa*64*-*-hpux*)	# HP/UX's ftello64 et.al. declarations are only
23130561Sobrien			# visible when _LARGEFILE64_SOURCE is defined.
24130561Sobrien			# Without those declarations, real_ftell et.al.
25130561Sobrien			# get mis-compiled.
26218822Sdim			HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE"
27218822Sdim			host64=true;;
28218822Sdimhppa*-*-hpux*)		HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
2933965Sjdphppa*-*-hiux*)		HDEFINES=-DHOST_HPPAHPUX ;;
3060484Sobrienhppa*-*-mpeix*)		HDEFINES=-DHOST_HPPAMPEIX ;;
3133965Sjdphppa*-*-bsd*)		HDEFINES=-DHOST_HPPABSD ;;
3233965Sjdphppa*-*-osf*)		HDEFINES=-DHOST_HPPAOSF ;;
3333965Sjdp
34218822Sdimia64-*-hpux*)		HDEFINES=-D_LARGEFILE64_SOURCE
35218822Sdim			host64=true;;
36130561Sobrienia64-*-*)		host64=true;;
3777298Sobrien
38130561Sobrien# Workaround for limitations on win9x where file contents are
39130561Sobrien# not zero'd out if you seek past the end and then write.
40130561Sobrieni[3-7]86-*-mingw32*)	HDEFINES=-D__USE_MINGW_FSEEK;;
4133965Sjdp
42130561Sobrieni[3-7]86-sequent-bsd*)	HDEFINES=-Dshared=genshared ;;
43130561Sobrieni[3-7]86-sequent-sysv4*) ;;
44130561Sobrieni[3-7]86-sequent-sysv*)	HDEFINES=-Dshared=genshared ;;
45130561Sobrien
4689857Sobrienmips*-*-netbsd*)	;;
4733965Sjdpmips*-*-openbsd*)	;;
4833965Sjdpmips*-dec-*)		HDEFINES="-G 4"	;;
4933965Sjdpmips*-sgi-irix3*)	HDEFINES="-G 4" ;;
5033965Sjdpmips*-sgi-irix4*)	HDEFINES="-G 4" ;;
51130561Sobrienmips*-sgi-irix6*)	host64=true;;
52130561Sobrienmips64*-*-linux*)	host64=true;;
5333965Sjdpmips*-*-sysv4*)		;;
5433965Sjdpmips*-*-sysv*)		HDEFINES="-G 4" ;;
5533965Sjdpmips*-*-riscos*)	HDEFINES="-G 4" ;;
5633965Sjdp
5733965Sjdpm68*-hp-hpux*)		HDEFINES=-DHOST_HP300HPUX ;;
5833965Sjdp
5933965Sjdp*-*-windows*)
6033965Sjdp			HOST_64BIT_TYPE=__int64
6133965Sjdp			HOST_U_64BIT_TYPE="unsigned __int64"
6233965Sjdp# The following krock is necessary because we can't run the build compiler
6333965Sjdp# (MSVC) on the configure host, so we have to explicitly set the values here.
6433965Sjdp# Note that this file is never run through autoconf, so we can't use any
6533965Sjdp# autoconf macros here.  Because of this, we have to muck with autoconf
6633965Sjdp# variables explicitly.
6733965Sjdp			ac_cv_func_mmap_fixed_mapped=no
6833965Sjdp			ac_cv_header_time=no
6933965Sjdp			ac_cv_func_getpagesize=no
7033965Sjdp			ac_cv_func_madvise=no
7133965Sjdp			ac_cv_func_mprotect=no
7260484Sobrien			ac_cv_func_getuid=no
7360484Sobrien			ac_cv_func_getgid=no
7433965Sjdp			ac_cv_header_sys_file_h=no
7533965Sjdp			ac_cv_header_sys_time_h=no
7633965Sjdp			ac_cv_header_unistd_h=no
7733965Sjdp			;;
7833965Sjdpesac
79