]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/configure.tgt
Merge current set of OpenACC changes from gomp-4_0-branch.
[thirdparty/gcc.git] / libgomp / configure.tgt
CommitLineData
1e8e9920 1# This is the target specific configuration file. This is invoked by the
2# autoconf generated configure script. Putting it in a separate shell file
3# lets us skip running autoconf when modifying target specific information.
4
5# This file switches on the shell variable ${target}, and sets the
6# following shell variables:
7# config_path An ordered list of directories to search for
8# sources and headers. This is relative to the
9# config subdirectory of the source tree.
10# XCFLAGS Add extra compile flags to use.
11# XLDFLAGS Add extra link flags to use.
12
13# Optimize TLS usage by avoiding the overhead of dynamic allocation.
cfbdd7de 14if test $gcc_cv_have_tls = yes ; then
656db5a0 15 case "${target}" in
16
3a930d3f 17 *-*-k*bsd*-gnu*)
18 ;;
19
20 *-*-linux* | *-*-gnu*)
1e8e9920 21 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
656db5a0 22 ;;
23 esac
1e8e9920 24fi
25
26# Since we require POSIX threads, assume a POSIX system by default.
27config_path="posix"
28
29# Check for futex enabled all at once.
ca4c3545 30if test x$enable_linux_futex = xyes; then
1e8e9920 31 case "${target}" in
32
1075a9f5 33 aarch64*-*-linux*)
34 config_path="linux posix"
35 ;;
36
1e8e9920 37 alpha*-*-linux*)
38 config_path="linux/alpha linux posix"
39 ;;
40
1e4b64e3 41 arm*-*-linux*)
92355c31 42 config_path="linux posix"
1e4b64e3 43 ;;
44
1e8e9920 45 ia64*-*-linux*)
46 config_path="linux/ia64 linux posix"
47 ;;
48
780abcd6 49 mips*-*-linux*)
50 config_path="linux/mips linux posix"
51 ;;
52
1e8e9920 53 powerpc*-*-linux*)
54 config_path="linux/powerpc linux posix"
55 ;;
56
57 s390*-*-linux*)
58 config_path="linux/s390 linux posix"
59 ;;
60
7ce78e23 61 tile*-*-linux*)
62 config_path="linux/tile linux posix"
63 ;;
64
1e8e9920 65 # Note that bare i386 is not included here. We need cmpxchg.
66 i[456]86-*-linux*)
67 config_path="linux/x86 linux posix"
d9f51b56 68 case " ${CC} ${CFLAGS} " in
d09a689d 69 *" -m64 "*|*" -mx32 "*)
d9f51b56 70 ;;
71 *)
72 if test -z "$with_arch"; then
73 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
74 fi
75 esac
1e8e9920 76 ;;
77
78 # Similar jiggery-pokery for x86_64 multilibs, except here we
79 # can't rely on the --with-arch configure option, since that
80 # applies to the 64-bit side.
81 x86_64-*-linux*)
82 config_path="linux/x86 linux posix"
83 case " ${CC} ${CFLAGS} " in
84 *" -m32 "*)
3913f5f8 85 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
1e8e9920 86 ;;
87 esac
88 ;;
89
90 # Note that sparcv7 and sparcv8 is not included here. We need cas.
91 sparcv9-*-linux* | sparc64-*-linux*)
92 echo "int i;" > conftestx.c
93 if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
94 config_path="linux/sparc linux posix"
95 case "`/usr/bin/file conftestx.o`" in
96 *32-bit*)
97 case " ${CC} ${CFLAGS}" in
98 *" -mcpu=ultrasparc"*)
99 ;;
100 *)
101 XCFLAGS="${XCFLAGS} -mcpu=v9"
102 ;;
103 esac
104 ;;
105 esac
106 fi
107 rm -f conftestx.c conftestx.o
108 ;;
109 esac
110fi
111
112# Other system configury
113case "${target}" in
114
4efe8a43 115 *-*-hpux*)
116 case "${target}" in
117 *-*-hpux11*)
118 # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
119 XLDFLAGS="${XLDFLAGS} -lrt"
120 ;;
121 esac
122 case "${target}" in
123 hppa[12]*-*-hpux*)
124 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
125 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
126 ;;
127 esac
88291313 128 ;;
129
5fbe6585 130 *-*-mingw32*)
131 config_path="mingw32 posix"
132 ;;
133
84f90f7d 134 *-*-darwin*)
135 config_path="bsd posix"
136 ;;
137
e49efc8c 138 *-*-freebsd*)
139 # Need to link with -lpthread so libgomp.so is self-contained.
140 XLDFLAGS="${XLDFLAGS} -lpthread"
141 ;;
142
1e8e9920 143 *)
144 ;;
145
146esac