annotate libitm/configure.tgt @ 158:494b0b89df80 default tip

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