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.
12 # tmake_file A list of machine-description-specific
15 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
16 if test $gcc_cv_have_tls = yes ; then
25 *-*-linux* | *-*-gnu*)
26 XCFLAGS="${XCFLAGS} -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS"
30 XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
36 # Since we require POSIX threads, assume a POSIX system by default.
39 # Check for futex enabled all at once.
40 if test x$enable_linux_futex = xyes; then
44 config_path="linux posix"
48 config_path="linux/alpha linux posix"
52 config_path="linux posix"
56 config_path="linux/ia64 linux posix"
60 config_path="linux/mips linux posix"
64 config_path="linux/powerpc linux posix"
68 config_path="linux posix"
72 config_path="linux/s390 linux posix"
76 config_path="linux/tile linux posix"
79 # Note that bare i386 is not included here. We need cmpxchg.
80 i[456]86-*-linux* | x86_64-*-linux*)
81 config_path="linux/x86 linux posix"
82 cat > conftestx.c <<EOF
83 #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
84 #error need -march=i486
87 if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
90 if test "${target_cpu}" = x86_64; then
91 XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
93 XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
99 # Note that sparcv7 and sparcv8 is not included here. We need cas.
100 sparcv9-*-linux* | sparc64-*-linux*)
101 echo "int i;" > conftestx.c
102 if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
103 config_path="linux/sparc linux posix"
104 case "`/usr/bin/file conftestx.o`" in
106 case " ${CC} ${CFLAGS}" in
107 *" -mcpu=ultrasparc"*)
110 XCFLAGS="${XCFLAGS} -mcpu=v9"
116 rm -f conftestx.c conftestx.o
121 # Other system configury
125 config_path="hpux posix"
128 # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
129 XLDFLAGS="${XLDFLAGS} -lrt"
134 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
135 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
141 config_path="mingw32 posix"
145 config_path="bsd darwin posix"
149 # Need to link with -lpthread so libgomp.so is self-contained.
150 XLDFLAGS="${XLDFLAGS} -lpthread"
155 # Need to link with -lpthread so libgomp.so is self-contained.
156 XLDFLAGS="${XLDFLAGS} -lpthread"
157 # AIX needs -frandom-seed for bootstrap compare.
158 XCFLAGS="${XCFLAGS} -frandom-seed=\$@"
159 # Create AIX-style "FAT" libraries.
164 config_path="nvptx accel"
168 # Use self-contained synchronization objects if provided by Newlib
169 if test "x$ac_cv_type_struct__Mutex_Control" = xyes ; then
170 config_path="rtems posix"
175 config_path="gcn accel"
178 XCFLAGS="$XCFLAGS -Wno-error=array-bounds"