OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / libgomp / configure.tgt
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.
12
13 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
14 if test $gcc_cv_have_tls = yes ; then
15   case "${target}" in
16
17     *-*-linux*)
18         XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
19         ;;
20   esac
21 fi
22
23 # Since we require POSIX threads, assume a POSIX system by default.
24 config_path="posix"
25
26 # Check for futex enabled all at once.
27 if test $enable_linux_futex = yes; then
28   case "${target}" in
29
30     alpha*-*-linux*)
31         config_path="linux/alpha linux posix"
32         ;;
33
34     arm*-*-linux*)
35         config_path="linux posix"
36         ;;
37
38     ia64*-*-linux*)
39         config_path="linux/ia64 linux posix"
40         ;;
41
42     mips*-*-linux*)
43         config_path="linux/mips linux posix"
44         ;;
45
46     powerpc*-*-linux*)
47         config_path="linux/powerpc linux posix"
48         ;;
49
50     s390*-*-linux*)
51         config_path="linux/s390 linux posix"
52         ;;
53
54     tile*-*-linux*)
55         config_path="linux/tile linux posix"
56         ;;
57
58     # Note that bare i386 is not included here.  We need cmpxchg.
59     i[456]86-*-linux*)
60         config_path="linux/x86 linux posix"
61         case " ${CC} ${CFLAGS} " in
62           *" -m64 "*)
63             ;;
64           *)
65             if test -z "$with_arch"; then
66               XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
67             fi
68         esac
69         ;;
70
71     # Similar jiggery-pokery for x86_64 multilibs, except here we
72     # can't rely on the --with-arch configure option, since that
73     # applies to the 64-bit side.
74     x86_64-*-linux*)
75         config_path="linux/x86 linux posix"
76         case " ${CC} ${CFLAGS} " in
77           *" -m32 "*)
78             XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
79             ;;
80         esac
81         ;;
82
83     # Note that sparcv7 and sparcv8 is not included here.  We need cas.
84     sparcv9-*-linux* | sparc64-*-linux*)
85         echo "int i;" > conftestx.c
86         if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
87           config_path="linux/sparc linux posix"
88           case "`/usr/bin/file conftestx.o`" in
89             *32-bit*)
90               case " ${CC} ${CFLAGS}" in
91                 *" -mcpu=ultrasparc"*)
92                   ;;
93                 *)
94                   XCFLAGS="${XCFLAGS} -mcpu=v9"
95                   ;;
96               esac
97               ;;
98           esac
99         fi
100         rm -f conftestx.c conftestx.o
101         ;;
102   esac
103 fi
104
105 # Other system configury
106 case "${target}" in
107
108   *-*-hpux*)
109         case "${target}" in
110           *-*-hpux11*)
111              # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
112              XLDFLAGS="${XLDFLAGS} -lrt"
113              ;;
114         esac
115         case "${target}" in
116           hppa[12]*-*-hpux*)
117             # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
118             XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
119             ;;
120         esac
121         ;;
122
123   *-*-mingw32*)
124         config_path="mingw32 posix"
125         ;;
126
127   *-*-darwin*)
128         config_path="bsd posix"
129         ;;
130
131   *-*-freebsd*)
132         # Need to link with -lpthread so libgomp.so is self-contained.
133         XLDFLAGS="${XLDFLAGS} -lpthread"
134         ;;
135
136   alpha*-dec-osf*)
137         # Use Tru64 UNIX-specific sem.h version.
138         config_path="osf posix"
139         ;;
140
141   mips-sgi-irix6*)
142         # Need to link with -lpthread so libgomp.so is self-contained.
143         XLDFLAGS="${XLDFLAGS} -lpthread"
144         ;;
145   *)
146         ;;
147
148 esac