* config/tc-sparc.c (md_pseudo_table): Change uahalf, uaword, and
[deliverable/binutils-gdb.git] / bfd / configure.host
CommitLineData
b7577823
ILT
1# This file is a shell script that overrides some of the tools and
2# flags used on a host specific basis.
60ac749c
ILT
3
4# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
5# binutils directories (at least), the index to it is also shared.
6# This is that index. Each configure.in file should source this file
7# in its per-host part.
8
b7577823 9# This sets the following shell variables:
b7577823
ILT
10# HDEFINES host specific compiler options
11# host64 set to true if this is a 64 bit host
12# HOST_64BIT_TYPE host 64 bit type
44f795f7
ILT
13# SHLIB_CC compiler to use when building shared library
14# SHLIB_CFLAGS flags to use when building shared library
15# PICFLAG may be set to flag to use to compile PIC
16# SHLINK may be set to the name to link the shared library to
17# ALLLIBS may be set to libraries to build
18# HLDFLAGS LDFLAGS specific to the host
b5e4f369 19# RPATH_ENVVAR environment variable used to find shared libraries
b7577823
ILT
20
21HDEFINES=
22host64=false
23HOST_64BIT_TYPE=
24
60ac749c 25case "${host}" in
60ac749c 26
b7577823
ILT
27alpha-*-*) host64=true; HOST_64BIT_TYPE=long ;;
28
b7577823
ILT
29hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
30hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
31hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
32hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
33
34i[345]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
35i[345]86-sequent-sysv4*) ;;
36i[345]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;;
b7577823 37
44f795f7 38mips-dec-netbsd*) ;;
b7577823 39mips-dec-*) HDEFINES="-G 4" ;;
65eed095
ILT
40mips-sgi-irix3*) HDEFINES="-G 4" ;;
41mips-sgi-irix4*) HDEFINES="-G 4" ;;
b7577823
ILT
42mips-*-sysv4*) ;;
43mips-*-sysv*) HDEFINES="-G 4" ;;
44mips-*-riscos*) HDEFINES="-G 4" ;;
45
b7577823
ILT
46m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
47
60ac749c 48esac
44f795f7
ILT
49
50# If we are configuring with --enable-shared, adjust the shared
51# library support based on the host. This support must work for both
52# the BFD and the opcodes libraries.
b5e4f369
ILT
53HLDFLAGS=
54RPATH_ENVVAR=LD_LIBRARY_PATH
44f795f7
ILT
55SHLIB_CC='$(CC)'
56SHLIB_CFLAGS='-shared'
57if [ "${shared}" = "true" ]; then
58 case "${host}" in
e8c249cb
ILT
59 hppa*-*-*) picfrag=${srcdir}/../config/mh-papic ;;
60 i[3456]86-*-*) picfrag=${srcdir}/../config/mh-x86pic ;;
61 *-*-*) picfrag=${srcdir}/../config/mh-${host_cpu}pic ;;
44f795f7
ILT
62 esac
63 if [ -f "${picfrag}" ]; then
64 pic=`sed -n -e 's/^PICFLAG[ ]*=[ ]*\(.*\)$/\1/p' ${picfrag}`
65 if [ -n "${pic}" ]; then
66 PICFLAG=${pic}
67 fi
68 fi
69
44f795f7
ILT
70 case "${host}" in
71 *-dec-osf*)
72 # -fpic is not needed on the Alpha.
73 PICFLAG=
6f21f2e3
ILT
74 HLDFLAGS='-rpath $(libdir)'
75 SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
44f795f7
ILT
76 ;;
77 *-*-hpux*)
78 # HP/UX uses .sl for shared libraries.
79 SHLINK=`echo ${SHLINK} | sed -e 's/so$/sl/'`
2300e217 80 SHLIB_CFLAGS='-shared $(PICFLAG)'
b5e4f369
ILT
81 HLDFLAGS='-Wl,+s,+b,$(libdir)'
82 RPATH_ENVVAR=SHLIB_PATH
44f795f7 83 ;;
e8c249cb
ILT
84 *-*-irix[56]*)
85 # -fpic is not needed on Irix 5 or 6.
44f795f7 86 PICFLAG=
b5e4f369
ILT
87 SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
88 HLDFLAGS='-Wl,-rpath,$(libdir)'
44f795f7
ILT
89 ;;
90 *-*-linux*aout*)
91 ;;
92 *-*-linux*)
b5e4f369 93 SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
3d9a5986 94 case "${libdir}" in
6f21f2e3
ILT
95 /lib | /usr/lib) ;;
96 *) HLDFLAGS='-Wl,-rpath,$(libdir)' ;;
97 esac
44f795f7
ILT
98 ;;
99 *-*-sysv4* | *-*-solaris*)
b5e4f369
ILT
100 SHLIB_CFLAGS='-shared -h $(SONAME)'
101 HLDFLAGS='-R $(libdir)'
44f795f7
ILT
102 ;;
103 *-*-sunos*)
b5e4f369
ILT
104 # Build a libTARGET-bfd.so.VERSION symlink in the object directory.
105 ALLLIBS=`echo ${ALLLIBS} | sed -e 's/\$(SHLINK)/stamp-tshlink/'`
44f795f7
ILT
106 ;;
107 esac
108fi
109
110# On SunOS, if the linker supports the -rpath option, use it to
111# prevent ../bfd and ../opcodes from being included in the run time
112# search path.
44f795f7
ILT
113case "${host}" in
114 *-*-sunos*)
115 echo 'main () { }' > conftest.c
65eed095 116 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
44f795f7
ILT
117 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
118 :
119 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
120 :
9e2ef098
ILT
121 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
122 :
b5e4f369
ILT
123 elif [ "${shared}" = "true" ]; then
124 HLDFLAGS='-Wl,-rpath=$(libdir)'
44f795f7
ILT
125 else
126 HLDFLAGS='-Wl,-rpath='
127 fi
128 rm -f conftest.t conftest.c conftest
129 ;;
130esac
This page took 0.143308 seconds and 4 git commands to generate.