]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/configure.tgt
aarch64: enable mixed-types for aarch64 simdclones
[thirdparty/gcc.git] / libgomp / configure.tgt
CommitLineData
953ff289
DN
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.
47ddb895
DE
12# tmake_file A list of machine-description-specific
13# makefile fragments.
953ff289
DN
14
15# Optimize TLS usage by avoiding the overhead of dynamic allocation.
0f3e711e 16if test $gcc_cv_have_tls = yes ; then
a9690009
EB
17 case "${target}" in
18
48df3acb
TS
19 *-*-k*bsd*-gnu*)
20 ;;
21
00484365
SN
22 *-*-musl*)
23 ;;
24
48df3acb 25 *-*-linux* | *-*-gnu*)
28567c40 26 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS"
a9690009 27 ;;
cd93945d
SH
28
29 *-*-rtems*)
30 XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
31 ;;
a9690009 32 esac
953ff289
DN
33fi
34
47ddb895 35tmake_file=
953ff289
DN
36# Since we require POSIX threads, assume a POSIX system by default.
37config_path="posix"
38
39# Check for futex enabled all at once.
41dbbb37 40if test x$enable_linux_futex = xyes; then
953ff289
DN
41 case "${target}" in
42
c1f37c00
IB
43 aarch64*-*-linux*)
44 config_path="linux posix"
45 ;;
46
953ff289
DN
47 alpha*-*-linux*)
48 config_path="linux/alpha linux posix"
49 ;;
50
d213e92e 51 arm*-*-linux*)
b9264b5f 52 config_path="linux posix"
d213e92e
MS
53 ;;
54
953ff289
DN
55 ia64*-*-linux*)
56 config_path="linux/ia64 linux posix"
57 ;;
58
34024b71 59 loongarch*-*-linux*)
60 config_path="linux posix"
61 ;;
62
318e8c3f
IG
63 mips*-*-linux*)
64 config_path="linux/mips linux posix"
65 ;;
66
953ff289
DN
67 powerpc*-*-linux*)
68 config_path="linux/powerpc linux posix"
69 ;;
70
b8c3f519
AS
71 riscv64*-*-linux*)
72 config_path="linux posix"
73 ;;
74
953ff289
DN
75 s390*-*-linux*)
76 config_path="linux/s390 linux posix"
77 ;;
78
dd552284
WL
79 tile*-*-linux*)
80 config_path="linux/tile linux posix"
81 ;;
82
953ff289 83 # Note that bare i386 is not included here. We need cmpxchg.
0411ae7f 84 i[456]86-*-linux* | x86_64-*-linux*)
953ff289 85 config_path="linux/x86 linux posix"
0411ae7f
JJ
86 cat > conftestx.c <<EOF
87#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
88#error need -march=i486
89#endif
90EOF
91 if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
92 :
93 else
94 if test "${target_cpu}" = x86_64; then
68bc9270 95 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
0411ae7f
JJ
96 else
97 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
98 fi
99 fi
100 rm -f conftestx.c
953ff289
DN
101 ;;
102
103 # Note that sparcv7 and sparcv8 is not included here. We need cas.
104 sparcv9-*-linux* | sparc64-*-linux*)
105 echo "int i;" > conftestx.c
106 if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
107 config_path="linux/sparc linux posix"
108 case "`/usr/bin/file conftestx.o`" in
109 *32-bit*)
110 case " ${CC} ${CFLAGS}" in
111 *" -mcpu=ultrasparc"*)
112 ;;
113 *)
114 XCFLAGS="${XCFLAGS} -mcpu=v9"
115 ;;
116 esac
117 ;;
118 esac
119 fi
120 rm -f conftestx.c conftestx.o
121 ;;
122 esac
123fi
124
125# Other system configury
126case "${target}" in
127
6684eb28 128 *-*-hpux*)
b5f7a6ca 129 config_path="hpux posix"
6684eb28
SE
130 case "${target}" in
131 *-*-hpux11*)
132 # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
133 XLDFLAGS="${XLDFLAGS} -lrt"
134 ;;
135 esac
136 case "${target}" in
137 hppa[12]*-*-hpux*)
138 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
139 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
140 ;;
141 esac
5142e08b
RS
142 ;;
143
33815e0c
FXC
144 *-*-mingw32*)
145 config_path="mingw32 posix"
146 ;;
147
e2b34106 148 *-*-darwin*)
b5f7a6ca 149 config_path="bsd darwin posix"
e2b34106
JJ
150 ;;
151
f1d4ab26
GP
152 *-*-freebsd*)
153 # Need to link with -lpthread so libgomp.so is self-contained.
154 XLDFLAGS="${XLDFLAGS} -lpthread"
155 ;;
156
b5f7a6ca 157 *-*-aix*)
02d3e45e
DE
158 config_path="posix"
159 # Need to link with -lpthread so libgomp.so is self-contained.
160 XLDFLAGS="${XLDFLAGS} -lpthread"
f49215b1
JJ
161 # AIX needs -frandom-seed for bootstrap compare.
162 XCFLAGS="${XCFLAGS} -frandom-seed=\$@"
47ddb895
DE
163 # Create AIX-style "FAT" libraries.
164 tmake_file="t-aix"
b5f7a6ca
JH
165 ;;
166
44a7d18d 167 nvptx*-*-*)
b3d14b3a 168 config_path="nvptx accel"
97875f4a 169 ;;
13c41b2e
SH
170
171 *-*-rtems*)
172 # Use self-contained synchronization objects if provided by Newlib
173 if test "x$ac_cv_type_struct__Mutex_Control" = xyes ; then
174 config_path="rtems posix"
175 fi
44a7d18d
TS
176 ;;
177
fa499995
AS
178 amdgcn*-*-*)
179 config_path="gcn accel"
81683386
TS
180
181 #TODO PR101484
182 XCFLAGS="$XCFLAGS -Wno-error=array-bounds"
fa499995
AS
183 ;;
184
953ff289
DN
185 *)
186 ;;
187
188esac