annotate libitm/configure.tgt @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # -*- shell-script -*-
kono
parents:
diff changeset
2 # Copyright (C) 2011-2017 Free Software Foundation, Inc.
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
kono
parents:
diff changeset
34 # For x86, we use slots in the TCB head for most of our TLS.
kono
parents:
diff changeset
35 # The setup of those slots in beginTransaction can afford to
kono
parents:
diff changeset
36 # use the global-dynamic model.
kono
parents:
diff changeset
37 i[456]86-*-linux* | x86_64-*-linux*)
kono
parents:
diff changeset
38 ;;
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 *-*-linux*)
kono
parents:
diff changeset
41 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
kono
parents:
diff changeset
42 ;;
kono
parents:
diff changeset
43 esac
kono
parents:
diff changeset
44 fi
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 # Map the target cpu to an ARCH sub-directory. At the same time,
kono
parents:
diff changeset
47 # work out any special compilation flags as necessary.
kono
parents:
diff changeset
48 case "${target_cpu}" in
kono
parents:
diff changeset
49 aarch64*) ARCH=aarch64 ;;
kono
parents:
diff changeset
50 alpha*) ARCH=alpha ;;
kono
parents:
diff changeset
51 rs6000 | powerpc*)
kono
parents:
diff changeset
52 XCFLAGS="${XCFLAGS} -mhtm"
kono
parents:
diff changeset
53 ARCH=powerpc
kono
parents:
diff changeset
54 ;;
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 arm*) ARCH=arm ;;
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 i[3456]86)
kono
parents:
diff changeset
59 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
60 *" -m64 "*|*" -mx32 "*)
kono
parents:
diff changeset
61 ;;
kono
parents:
diff changeset
62 *)
kono
parents:
diff changeset
63 if test -z "$with_arch"; then
kono
parents:
diff changeset
64 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
kono
parents:
diff changeset
65 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
kono
parents:
diff changeset
66 fi
kono
parents:
diff changeset
67 esac
kono
parents:
diff changeset
68 XCFLAGS="${XCFLAGS} -mrtm"
kono
parents:
diff changeset
69 ARCH=x86
kono
parents:
diff changeset
70 ;;
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 sh*) ARCH=sh ;;
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 sparc)
kono
parents:
diff changeset
75 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
76 *" -m64 "*)
kono
parents:
diff changeset
77 ;;
kono
parents:
diff changeset
78 *)
kono
parents:
diff changeset
79 if test -z "$with_cpu"; then
kono
parents:
diff changeset
80 XCFLAGS="${XCFLAGS} -mcpu=v9"
kono
parents:
diff changeset
81 fi
kono
parents:
diff changeset
82 esac
kono
parents:
diff changeset
83 ARCH=sparc
kono
parents:
diff changeset
84 ;;
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 sparc64|sparcv9)
kono
parents:
diff changeset
87 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
88 *" -m32 "*)
kono
parents:
diff changeset
89 XCFLAGS="${XCFLAGS} -mcpu=v9"
kono
parents:
diff changeset
90 ;;
kono
parents:
diff changeset
91 *" -m64 "*)
kono
parents:
diff changeset
92 ;;
kono
parents:
diff changeset
93 *)
kono
parents:
diff changeset
94 if test "x$with_cpu" = xv8; then
kono
parents:
diff changeset
95 XCFLAGS="${XCFLAGS} -mcpu=v9"
kono
parents:
diff changeset
96 fi
kono
parents:
diff changeset
97 ;;
kono
parents:
diff changeset
98 esac
kono
parents:
diff changeset
99 ARCH=sparc
kono
parents:
diff changeset
100 ;;
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 x86_64)
kono
parents:
diff changeset
103 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
104 *" -m32 "*)
kono
parents:
diff changeset
105 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
kono
parents:
diff changeset
106 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
kono
parents:
diff changeset
107 ;;
kono
parents:
diff changeset
108 esac
kono
parents:
diff changeset
109 XCFLAGS="${XCFLAGS} -mrtm"
kono
parents:
diff changeset
110 ARCH=x86
kono
parents:
diff changeset
111 ;;
kono
parents:
diff changeset
112 s390|s390x)
kono
parents:
diff changeset
113 XCFLAGS="${XCFLAGS} -mzarch -mhtm"
kono
parents:
diff changeset
114 ARCH=s390
kono
parents:
diff changeset
115 ;;
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 *)
kono
parents:
diff changeset
118 ARCH="${target_cpu}"
kono
parents:
diff changeset
119 ;;
kono
parents:
diff changeset
120 esac
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 # For the benefit of top-level configure, determine if the cpu is supported.
kono
parents:
diff changeset
123 test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 # Since we require POSIX threads, assume a POSIX system by default.
kono
parents:
diff changeset
126 config_path="$ARCH posix generic"
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 # Other system configury
kono
parents:
diff changeset
129 case "${target}" in
kono
parents:
diff changeset
130 *-*-linux*)
kono
parents:
diff changeset
131 if test "$enable_linux_futex" = yes; then
kono
parents:
diff changeset
132 config_path="linux/$ARCH linux $config_path"
kono
parents:
diff changeset
133 fi
kono
parents:
diff changeset
134 ;;
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 powerpc*-*-aix* | rs6000-*-aix*)
kono
parents:
diff changeset
137 # The system ought to be supported, but sjlj.S has not been ported.
kono
parents:
diff changeset
138 UNSUPPORTED=1
kono
parents:
diff changeset
139 ;;
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 *-*-gnu* | *-*-k*bsd*-gnu \
kono
parents:
diff changeset
142 | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
kono
parents:
diff changeset
143 | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
kono
parents:
diff changeset
144 | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
kono
parents:
diff changeset
145 # POSIX system. The OS is supported.
kono
parents:
diff changeset
146 ;;
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 *) # Non-POSIX, or embedded system
kono
parents:
diff changeset
149 UNSUPPORTED=1
kono
parents:
diff changeset
150 ;;
kono
parents:
diff changeset
151 esac