[Ada] Refactor repeated complains about missing -gnat2005 switch
[gcc.git] / libgomp / configure.tgt
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 # tmake_file A list of machine-description-specific
13 # makefile fragments.
14
15 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
16 if test $gcc_cv_have_tls = yes ; then
17 case "${target}" in
18
19 *-*-k*bsd*-gnu*)
20 ;;
21
22 *-*-musl*)
23 ;;
24
25 *-*-linux* | *-*-gnu*)
26 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS"
27 ;;
28
29 *-*-rtems*)
30 XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
31 ;;
32 esac
33 fi
34
35 tmake_file=
36 # Since we require POSIX threads, assume a POSIX system by default.
37 config_path="posix"
38
39 # Check for futex enabled all at once.
40 if test x$enable_linux_futex = xyes; then
41 case "${target}" in
42
43 aarch64*-*-linux*)
44 config_path="linux posix"
45 ;;
46
47 alpha*-*-linux*)
48 config_path="linux/alpha linux posix"
49 ;;
50
51 arm*-*-linux*)
52 config_path="linux posix"
53 ;;
54
55 ia64*-*-linux*)
56 config_path="linux/ia64 linux posix"
57 ;;
58
59 mips*-*-linux*)
60 config_path="linux/mips linux posix"
61 ;;
62
63 powerpc*-*-linux*)
64 config_path="linux/powerpc linux posix"
65 ;;
66
67 s390*-*-linux*)
68 config_path="linux/s390 linux posix"
69 ;;
70
71 tile*-*-linux*)
72 config_path="linux/tile linux posix"
73 ;;
74
75 # Note that bare i386 is not included here. We need cmpxchg.
76 i[456]86-*-linux*)
77 config_path="linux/x86 linux posix"
78 case " ${CC} ${CFLAGS} " in
79 *" -m64 "*|*" -mx32 "*)
80 ;;
81 *)
82 if test -z "$with_arch"; then
83 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
84 fi
85 esac
86 ;;
87
88 # Similar jiggery-pokery for x86_64 multilibs, except here we
89 # can't rely on the --with-arch configure option, since that
90 # applies to the 64-bit side.
91 x86_64-*-linux*)
92 config_path="linux/x86 linux posix"
93 case " ${CC} ${CFLAGS} " in
94 *" -m32 "*)
95 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
96 ;;
97 esac
98 ;;
99
100 # Note that sparcv7 and sparcv8 is not included here. We need cas.
101 sparcv9-*-linux* | sparc64-*-linux*)
102 echo "int i;" > conftestx.c
103 if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
104 config_path="linux/sparc linux posix"
105 case "`/usr/bin/file conftestx.o`" in
106 *32-bit*)
107 case " ${CC} ${CFLAGS}" in
108 *" -mcpu=ultrasparc"*)
109 ;;
110 *)
111 XCFLAGS="${XCFLAGS} -mcpu=v9"
112 ;;
113 esac
114 ;;
115 esac
116 fi
117 rm -f conftestx.c conftestx.o
118 ;;
119 esac
120 fi
121
122 # Other system configury
123 case "${target}" in
124
125 *-*-hpux*)
126 config_path="hpux posix"
127 case "${target}" in
128 *-*-hpux11*)
129 # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
130 XLDFLAGS="${XLDFLAGS} -lrt"
131 ;;
132 esac
133 case "${target}" in
134 hppa[12]*-*-hpux*)
135 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
136 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
137 ;;
138 esac
139 ;;
140
141 *-*-mingw32*)
142 config_path="mingw32 posix"
143 ;;
144
145 *-*-darwin*)
146 config_path="bsd darwin posix"
147 ;;
148
149 *-*-freebsd*)
150 # Need to link with -lpthread so libgomp.so is self-contained.
151 XLDFLAGS="${XLDFLAGS} -lpthread"
152 ;;
153
154 *-*-aix*)
155 config_path="posix"
156 # Need to link with -lpthread so libgomp.so is self-contained.
157 XLDFLAGS="${XLDFLAGS} -lpthread"
158 # AIX needs -frandom-seed for bootstrap compare.
159 XCFLAGS="${XCFLAGS} -frandom-seed=\$@"
160 # Create AIX-style "FAT" libraries.
161 tmake_file="t-aix"
162 ;;
163
164 nvptx*-*-*)
165 config_path="nvptx accel"
166 ;;
167
168 *-*-rtems*)
169 # Use self-contained synchronization objects if provided by Newlib
170 if test "x$ac_cv_type_struct__Mutex_Control" = xyes ; then
171 config_path="rtems posix"
172 fi
173 ;;
174
175 amdgcn*-*-*)
176 config_path="gcn accel"
177 ;;
178
179 *)
180 ;;
181
182 esac