configure.host revision 302408
1139823Simp# This file is a shell script that overrides some of the tools and
222521Sdyson# flags used on a host specific basis.
31541Srgrimes
41541Srgrimes# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
51541Srgrimes# binutils directories (at least), the index to it is also shared.
61541Srgrimes# This is that index.  Each configure.in file should source this file
71541Srgrimes# in its per-host part.
81541Srgrimes
91541Srgrimes# This sets the following shell variables:
101541Srgrimes#  HDEFINES		host specific compiler options
111541Srgrimes#  host64		set to true if 64 bit types are as fast as 32 bit
121541Srgrimes#  HOST_64BIT_TYPE	host 64 bit type
131541Srgrimes#  HOST_U_64BIT_TYPE	unsigned 64 bit type (not needed if 64BIT_TYPE is long)
141541Srgrimes
151541SrgrimesHDEFINES=
161541Srgrimeshost64=false
171541SrgrimesHOST_64BIT_TYPE=
181541SrgrimesHOST_U_64BIT_TYPE=
191541Srgrimes
201541Srgrimescase "${host}" in
211541Srgrimes
221541Srgrimeshppa*64*-*-hpux*)	# HP/UX's ftello64 et.al. declarations are only
231541Srgrimes			# visible when _LARGEFILE64_SOURCE is defined.
241541Srgrimes			# Without those declarations, real_ftell et.al.
251541Srgrimes			# get mis-compiled.
261541Srgrimes			HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE"
271541Srgrimes			host64=true;;
281541Srgrimeshppa*-*-hpux*)		HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
291541Srgrimeshppa*-*-hiux*)		HDEFINES=-DHOST_HPPAHPUX ;;
301541Srgrimeshppa*-*-mpeix*)		HDEFINES=-DHOST_HPPAMPEIX ;;
311541Srgrimeshppa*-*-bsd*)		HDEFINES=-DHOST_HPPABSD ;;
3222521Sdysonhppa*-*-osf*)		HDEFINES=-DHOST_HPPAOSF ;;
3350477Speter
341541Srgrimesia64-*-hpux*)		HDEFINES=-D_LARGEFILE64_SOURCE
351541Srgrimes			host64=true;;
3683651Speteria64-*-*)		host64=true;;
3783651Speter
382175Spaul# Workaround for limitations on win9x where file contents are
3955206Speter# not zero'd out if you seek past the end and then write.
4037272Sjmgi[3-7]86-*-mingw32*)	HDEFINES=-D__USE_MINGW_FSEEK;;
4137291Sjmg
4237272Sjmgi[3-7]86-sequent-bsd*)	HDEFINES=-Dshared=genshared ;;
4383651Speteri[3-7]86-sequent-sysv4*) ;;
4483651Speteri[3-7]86-sequent-sysv*)	HDEFINES=-Dshared=genshared ;;
451541Srgrimes
461541Srgrimesmips*-*-netbsd*)	;;
471541Srgrimesmips*-*-openbsd*)	;;
481541Srgrimesmips*-dec-*)		HDEFINES="-G 4"	;;
49126962Spetermips*-sgi-irix3*)	HDEFINES="-G 4" ;;
509336Sdfrmips*-sgi-irix4*)	HDEFINES="-G 4" ;;
519336Sdfrmips*-sgi-irix6*)	host64=true;;
529336Sdfrmips64*-*-linux*)	host64=true;;
539336Sdfrmips*-*-sysv4*)		;;
549336Sdfrmips*-*-sysv*)		HDEFINES="-G 4" ;;
551541Srgrimesmips*-*-riscos*)	HDEFINES="-G 4" ;;
56158860Scel
57158860Scelm68*-hp-hpux*)		HDEFINES=-DHOST_HP300HPUX ;;
581541Srgrimes
591828Sdg*-*-windows*)
6036176Speter			HOST_64BIT_TYPE=__int64
611828Sdg			HOST_U_64BIT_TYPE="unsigned __int64"
621828Sdg# The following krock is necessary because we can't run the build compiler
631541Srgrimes# (MSVC) on the configure host, so we have to explicitly set the values here.
641828Sdg# Note that this file is never run through autoconf, so we can't use any
6536176Speter# autoconf macros here.  Because of this, we have to muck with autoconf
66190783Sjhb# variables explicitly.
6736176Speter			ac_cv_func_mmap_fixed_mapped=no
6836176Speter			ac_cv_header_time=no
6936176Speter			ac_cv_func_getpagesize=no
7036176Speter			ac_cv_func_madvise=no
71190176Sjhb			ac_cv_func_mprotect=no
72190176Sjhb			ac_cv_func_getuid=no
73190176Sjhb			ac_cv_func_getgid=no
741541Srgrimes			ac_cv_header_sys_file_h=no
751541Srgrimes			ac_cv_header_sys_time_h=no
769336Sdfr			ac_cv_header_unistd_h=no
771541Srgrimes			;;
781541Srgrimesesac
7989407Speter