OSDN Git Service

2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
[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 # This does require that the library be present during process 
15 # startup, so mark the library as not to be dlopened.
16 if test $have_tls = yes ; then
17   case "${target}" in
18
19     *-*-linux*)
20         XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
21         XLDFLAGS="${XLDFLAGS} -Wl,-z,nodlopen"
22         ;;
23   esac
24 fi
25
26 # Since we require POSIX threads, assume a POSIX system by default.
27 config_path="posix"
28
29 # Check for futex enabled all at once.
30 if test $enable_linux_futex = yes; then
31   case "${target}" in
32
33     alpha*-*-linux*)
34         config_path="linux/alpha linux posix"
35         ;;
36
37     ia64*-*-linux*)
38         config_path="linux/ia64 linux posix"
39         ;;
40
41     powerpc*-*-linux*)
42         config_path="linux/powerpc linux posix"
43         ;;
44
45     s390*-*-linux*)
46         config_path="linux/s390 linux posix"
47         ;;
48
49     # Note that bare i386 is not included here.  We need cmpxchg.
50     i[456]86-*-linux*)
51         config_path="linux/x86 linux posix"
52         case " ${CC} ${CFLAGS} " in
53           *" -m64 "*)
54             ;;
55           *)
56             if test -z "$with_arch"; then
57               XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
58             fi
59         esac
60         ;;
61
62     # Similar jiggery-pokery for x86_64 multilibs, except here we
63     # can't rely on the --with-arch configure option, since that
64     # applies to the 64-bit side.
65     x86_64-*-linux*)
66         config_path="linux/x86 linux posix"
67         case " ${CC} ${CFLAGS} " in
68           *" -m32 "*)
69             XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
70             ;;
71         esac
72         ;;
73
74     # Note that sparcv7 and sparcv8 is not included here.  We need cas.
75     sparcv9-*-linux* | sparc64-*-linux*)
76         echo "int i;" > conftestx.c
77         if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
78           config_path="linux/sparc linux posix"
79           case "`/usr/bin/file conftestx.o`" in
80             *32-bit*)
81               case " ${CC} ${CFLAGS}" in
82                 *" -mcpu=ultrasparc"*)
83                   ;;
84                 *)
85                   XCFLAGS="${XCFLAGS} -mcpu=v9"
86                   ;;
87               esac
88               ;;
89           esac
90         fi
91         rm -f conftestx.c conftestx.o
92         ;;
93   esac
94 fi
95
96 # Other system configury
97 case "${target}" in
98
99   *-*-hpux11*)
100         # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
101         XLDFLAGS="${XLDFLAGS} -lrt"
102         ;;
103
104   *-*-mingw32*)
105         config_path="mingw32 posix"
106         ;;
107
108   *-*-solaris2.[56]*)
109         config_path="posix95 posix"
110         XLDFLAGS="${XLDFLAGS} -lposix4"
111         ;;
112
113   *)
114         ;;
115
116 esac