annotate libatomic/configure.tgt @ 113:bdf41c9fa0b7

remove RECTYPE
author mir3636
date Fri, 17 Nov 2017 06:33:55 +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) 2012-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 # Contributed by Richard Henderson <rth@redhat.com>.
kono
parents:
diff changeset
4 #
kono
parents:
diff changeset
5 # This file is part of the GNU Atomic Library (libatomic).
kono
parents:
diff changeset
6 #
kono
parents:
diff changeset
7 # Libatomic is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 # under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 # the Free Software Foundation; either version 3 of the License, or
kono
parents:
diff changeset
10 # (at your option) any later version.
kono
parents:
diff changeset
11 #
kono
parents:
diff changeset
12 # Libatomic is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
kono
parents:
diff changeset
14 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for
kono
parents:
diff changeset
15 # more details.
kono
parents:
diff changeset
16 #
kono
parents:
diff changeset
17 # Under Section 7 of GPL version 3, you are granted additional
kono
parents:
diff changeset
18 # permissions described in the GCC Runtime Library Exception, version
kono
parents:
diff changeset
19 # 3.1, as published by the Free Software Foundation.
kono
parents:
diff changeset
20 #
kono
parents:
diff changeset
21 # You should have received a copy of the GNU General Public License and
kono
parents:
diff changeset
22 # a copy of the GCC Runtime Library Exception along with this program;
kono
parents:
diff changeset
23 # see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
kono
parents:
diff changeset
24 # <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 # Map the target cpu to an ARCH sub-directory. At the same time,
kono
parents:
diff changeset
27 # work out any special compilation flags as necessary.
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 # Give operating systems the opportunity to discard XCFLAGS modifications based
kono
parents:
diff changeset
30 # on ${target_cpu}. For example to allow proper use of multilibs.
kono
parents:
diff changeset
31 configure_tgt_pre_target_cpu_XCFLAGS="${XCFLAGS}"
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 case "${target_cpu}" in
kono
parents:
diff changeset
34 alpha*)
kono
parents:
diff changeset
35 # fenv.c needs this option to generate inexact exceptions.
kono
parents:
diff changeset
36 XCFLAGS="${XCFLAGS} -mfp-trap-mode=sui"
kono
parents:
diff changeset
37 ARCH=alpha
kono
parents:
diff changeset
38 ;;
kono
parents:
diff changeset
39 rs6000 | powerpc*) ARCH=powerpc ;;
kono
parents:
diff changeset
40 riscv*) ARCH=riscv ;;
kono
parents:
diff changeset
41 sh*) ARCH=sh ;;
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 arm*)
kono
parents:
diff changeset
44 ARCH=arm
kono
parents:
diff changeset
45 case "${target}" in
kono
parents:
diff changeset
46 arm*-*-freebsd*)
kono
parents:
diff changeset
47 ;;
kono
parents:
diff changeset
48 *)
kono
parents:
diff changeset
49 # ??? Detect when -march=armv7 is already enabled.
kono
parents:
diff changeset
50 try_ifunc=yes
kono
parents:
diff changeset
51 ;;
kono
parents:
diff changeset
52 esac
kono
parents:
diff changeset
53 ;;
kono
parents:
diff changeset
54 sparc)
kono
parents:
diff changeset
55 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
56 *" -m64 "*)
kono
parents:
diff changeset
57 ;;
kono
parents:
diff changeset
58 *)
kono
parents:
diff changeset
59 if test -z "$with_cpu"; then
kono
parents:
diff changeset
60 XCFLAGS="${XCFLAGS} -mcpu=v9"
kono
parents:
diff changeset
61 fi
kono
parents:
diff changeset
62 esac
kono
parents:
diff changeset
63 ARCH=sparc
kono
parents:
diff changeset
64 ;;
kono
parents:
diff changeset
65 sparc64|sparcv9)
kono
parents:
diff changeset
66 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
67 *" -m32 "*)
kono
parents:
diff changeset
68 XCFLAGS="${XCFLAGS} -mcpu=v9"
kono
parents:
diff changeset
69 ;;
kono
parents:
diff changeset
70 esac
kono
parents:
diff changeset
71 ARCH=sparc
kono
parents:
diff changeset
72 ;;
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 i[3456]86)
kono
parents:
diff changeset
75 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
76 *" -m64 "*|*" -mx32 "*)
kono
parents:
diff changeset
77 ;;
kono
parents:
diff changeset
78 *)
kono
parents:
diff changeset
79 if test -z "$with_arch"; then
kono
parents:
diff changeset
80 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
kono
parents:
diff changeset
81 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
kono
parents:
diff changeset
82 fi
kono
parents:
diff changeset
83 esac
kono
parents:
diff changeset
84 ARCH=x86
kono
parents:
diff changeset
85 # ??? Detect when -march=i686 is already enabled.
kono
parents:
diff changeset
86 try_ifunc=yes
kono
parents:
diff changeset
87 ;;
kono
parents:
diff changeset
88 x86_64)
kono
parents:
diff changeset
89 case " ${CC} ${CFLAGS} " in
kono
parents:
diff changeset
90 *" -m32 "*)
kono
parents:
diff changeset
91 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
kono
parents:
diff changeset
92 XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
kono
parents:
diff changeset
93 ;;
kono
parents:
diff changeset
94 *)
kono
parents:
diff changeset
95 ;;
kono
parents:
diff changeset
96 esac
kono
parents:
diff changeset
97 ARCH=x86
kono
parents:
diff changeset
98 # ??? Detect when -mcx16 is already enabled.
kono
parents:
diff changeset
99 try_ifunc=yes
kono
parents:
diff changeset
100 ;;
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 *) ARCH="${target_cpu}" ;;
kono
parents:
diff changeset
103 esac
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 # The cpu configury is always most relevant.
kono
parents:
diff changeset
106 if test -d ${srcdir}/config/$ARCH ; then
kono
parents:
diff changeset
107 config_path="$ARCH"
kono
parents:
diff changeset
108 fi
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 # Other system configury
kono
parents:
diff changeset
111 case "${target}" in
kono
parents:
diff changeset
112 arm*-*-linux*)
kono
parents:
diff changeset
113 # OS support for atomic primitives.
kono
parents:
diff changeset
114 config_path="${config_path} linux/arm posix"
kono
parents:
diff changeset
115 ;;
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
kono
parents:
diff changeset
118 | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
kono
parents:
diff changeset
119 | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
kono
parents:
diff changeset
120 | *-*-darwin* | *-*-aix* | *-*-cygwin*)
kono
parents:
diff changeset
121 # POSIX system. The OS is supported.
kono
parents:
diff changeset
122 config_path="${config_path} posix"
kono
parents:
diff changeset
123 ;;
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 *-*-mingw*)
kono
parents:
diff changeset
126 # OS support for atomic primitives.
kono
parents:
diff changeset
127 case ${target_thread_file} in
kono
parents:
diff changeset
128 win32)
kono
parents:
diff changeset
129 config_path="${config_path} mingw"
kono
parents:
diff changeset
130 ;;
kono
parents:
diff changeset
131 posix)
kono
parents:
diff changeset
132 config_path="${config_path} posix"
kono
parents:
diff changeset
133 ;;
kono
parents:
diff changeset
134 esac
kono
parents:
diff changeset
135 ;;
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 *-*-rtems*)
kono
parents:
diff changeset
138 XCFLAGS="${configure_tgt_pre_target_cpu_XCFLAGS}"
kono
parents:
diff changeset
139 config_path="rtems"
kono
parents:
diff changeset
140 ;;
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 *-*-elf*)
kono
parents:
diff changeset
143 # ??? No target OS. We could be targeting bare-metal kernel-mode,
kono
parents:
diff changeset
144 # or user-mode for some custom OS. If the target supports TAS,
kono
parents:
diff changeset
145 # we can build our own spinlocks, given there are no signals.
kono
parents:
diff changeset
146 # If the target supports disabling interrupts, we can work in
kono
parents:
diff changeset
147 # kernel-mode, given the system is not multi-processor.
kono
parents:
diff changeset
148 UNSUPPORTED=1
kono
parents:
diff changeset
149 ;;
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 *)
kono
parents:
diff changeset
152 # Who are you?
kono
parents:
diff changeset
153 UNSUPPORTED=1
kono
parents:
diff changeset
154 ;;
kono
parents:
diff changeset
155 esac