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.
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.
13 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
14 if test $gcc_cv_have_tls = yes ; then
23 *-*-linux* | *-*-gnu*)
24 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS"
28 XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
33 # Since we require POSIX threads, assume a POSIX system by default.
36 # Check for futex enabled all at once.
37 if test x$enable_linux_futex = xyes; then
41 config_path="linux posix"
45 config_path="linux/alpha linux posix"
49 config_path="linux posix"
53 config_path="linux/ia64 linux posix"
57 config_path="linux/mips linux posix"
61 config_path="linux/powerpc linux posix"
65 config_path="linux/s390 linux posix"
69 config_path="linux/tile linux posix"
72 # Note that bare i386 is not included here. We need cmpxchg.
74 config_path="linux/x86 linux posix"
75 case " ${CC} ${CFLAGS} " in
76 *" -m64 "*|*" -mx32 "*)
79 if test -z "$with_arch"; then
80 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
85 # Similar jiggery-pokery for x86_64 multilibs, except here we
86 # can't rely on the --with-arch configure option, since that
87 # applies to the 64-bit side.
89 config_path="linux/x86 linux posix"
90 case " ${CC} ${CFLAGS} " in
92 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
97 # Note that sparcv7 and sparcv8 is not included here. We need cas.
98 sparcv9-*-linux* | sparc64-*-linux*)
99 echo "int i;" > conftestx.c
100 if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
101 config_path="linux/sparc linux posix"
102 case "`/usr/bin/file conftestx.o`" in
104 case " ${CC} ${CFLAGS}" in
105 *" -mcpu=ultrasparc"*)
108 XCFLAGS="${XCFLAGS} -mcpu=v9"
114 rm -f conftestx.c conftestx.o
119 # Other system configury
123 config_path="hpux posix"
126 # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
127 XLDFLAGS="${XLDFLAGS} -lrt"
132 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
133 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
139 config_path="mingw32 posix"
143 config_path="bsd darwin posix"
147 # Need to link with -lpthread so libgomp.so is self-contained.
148 XLDFLAGS="${XLDFLAGS} -lpthread"
153 # Need to link with -lpthread so libgomp.so is self-contained.
154 XLDFLAGS="${XLDFLAGS} -lpthread"
155 # AIX needs -frandom-seed for bootstrap compare.
156 XCFLAGS="${XCFLAGS} -frandom-seed=\$@"
160 config_path="nvptx accel"
164 # Use self-contained synchronization objects if provided by Newlib
165 if test "x$ac_cv_type_struct__Mutex_Control" = xyes ; then
166 config_path="rtems posix"
171 config_path="gcn accel"