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