]> git.ipfire.org Git - thirdparty/gcc.git/blame - libitm/configure.tgt
[AArch64] Add partial SVE vector modes
[thirdparty/gcc.git] / libitm / configure.tgt
CommitLineData
4c0315d0 1# -*- shell-script -*-
fbd26352 2# Copyright (C) 2011-2019 Free Software Foundation, Inc.
4c0315d0 3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18# This is the target specific configuration file. This is invoked by the
19# autoconf generated configure script. Putting it in a separate shell file
20# lets us skip running autoconf when modifying target specific information.
21
22# This file switches on the shell variable ${target}, and sets the
23# following shell variables:
24# config_path An ordered list of directories to search for
25# sources and headers. This is relative to the
26# config subdirectory of the source tree.
27# XCFLAGS Add extra compile flags to use.
28# XLDFLAGS Add extra link flags to use.
29
30# Optimize TLS usage by avoiding the overhead of dynamic allocation.
298c66d9 31if test "$gcc_cv_have_tls" = yes ; then
4c0315d0 32 case "${target}" in
33
34 # For x86, we use slots in the TCB head for most of our TLS.
35 # The setup of those slots in beginTransaction can afford to
36 # use the global-dynamic model.
37 i[456]86-*-linux* | x86_64-*-linux*)
38 ;;
39
40 *-*-linux*)
41 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
42 ;;
43 esac
44fi
45
46# Map the target cpu to an ARCH sub-directory. At the same time,
47# work out any special compilation flags as necessary.
48case "${target_cpu}" in
9faa46a9 49 aarch64*) ARCH=aarch64 ;;
c1f23ce1 50 alpha*) ARCH=alpha ;;
5088e479 51 rs6000 | powerpc*)
52 XCFLAGS="${XCFLAGS} -mhtm"
53 ARCH=powerpc
54 ;;
4c0315d0 55
dd120a97 56 arm*) ARCH=arm ;;
57
0e5877a5 58 i[3456]86)
4c0315d0 59 case " ${CC} ${CFLAGS} " in
d09a689d 60 *" -m64 "*|*" -mx32 "*)
4c0315d0 61 ;;
62 *)
63 if test -z "$with_arch"; then
64 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
65 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
66 fi
67 esac
5b35a791 68 XCFLAGS="${XCFLAGS} -mrtm"
4c0315d0 69 ARCH=x86
70 ;;
71
f4f88eba 72 sh*) ARCH=sh ;;
73
6d2121e8 74 sparc)
75 case " ${CC} ${CFLAGS} " in
76 *" -m64 "*)
77 ;;
78 *)
79 if test -z "$with_cpu"; then
80 XCFLAGS="${XCFLAGS} -mcpu=v9"
81 fi
82 esac
83 ARCH=sparc
84 ;;
85
86 sparc64|sparcv9)
87 case " ${CC} ${CFLAGS} " in
88 *" -m32 "*)
89 XCFLAGS="${XCFLAGS} -mcpu=v9"
90 ;;
91 *" -m64 "*)
92 ;;
93 *)
94 if test "x$with_cpu" = xv8; then
95 XCFLAGS="${XCFLAGS} -mcpu=v9"
96 fi
97 ;;
98 esac
99 ARCH=sparc
100 ;;
101
4c0315d0 102 x86_64)
103 case " ${CC} ${CFLAGS} " in
104 *" -m32 "*)
3913f5f8 105 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
4c0315d0 106 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
107 ;;
108 esac
5b35a791 109 XCFLAGS="${XCFLAGS} -mrtm"
4c0315d0 110 ARCH=x86
111 ;;
197108e2 112 s390|s390x)
6495d6bc 113 XCFLAGS="${XCFLAGS} -mzarch -mhtm"
197108e2 114 ARCH=s390
197108e2 115 ;;
4c0315d0 116
4c0315d0 117 *)
118 ARCH="${target_cpu}"
119 ;;
120esac
298c66d9 121
122# For the benefit of top-level configure, determine if the cpu is supported.
c52ccbc7 123test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
298c66d9 124
4c0315d0 125# Since we require POSIX threads, assume a POSIX system by default.
126config_path="$ARCH posix generic"
127
128# Other system configury
129case "${target}" in
6cb819f4 130 *-*-linux* | *-*-uclinux*)
298c66d9 131 if test "$enable_linux_futex" = yes; then
4c0315d0 132 config_path="linux/$ARCH linux $config_path"
133 fi
134 ;;
135
c1f23ce1 136 powerpc*-*-aix* | rs6000-*-aix*)
137 # The system ought to be supported, but sjlj.S has not been ported.
138 UNSUPPORTED=1
139 ;;
140
298c66d9 141 *-*-gnu* | *-*-k*bsd*-gnu \
142 | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
5641963c 143 | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
463553db 144 | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
298c66d9 145 # POSIX system. The OS is supported.
4c0315d0 146 ;;
147
298c66d9 148 *) # Non-POSIX, or embedded system
149 UNSUPPORTED=1
4c0315d0 150 ;;
151esac