mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-14 06:23:58 +08:00
16c9d3b171
libjava: * configure.ac (*-*-solaris2.8): Use alternate thread library. Add libthread. (*-*-solaris2.9): Use libthread. * configure: Regenerate. libgomp: * configure.tgt (*-*-solaris2.[56]*): Removed. gcc: * configure.ac: Don't disable TLS on Solaris 8/9 by default Set tga_func for Solaris 2/x86 resp. SPARC. Remove duplicate parts of sparc*-sun-solaris2.* TLS check. (LIB_THREAD_LDFLAGS_SPEC): Define. (LIB_TLS_SPEC): Define. Check for required Sun ld version. * configure: Regenerate. * config.in: Regenerate. * config/sol2.h (LIB_SPEC): Use LIB_THREAD_LDFLAGS_SPEC with -pthread, -threads, LIB_TLS_SPEC with -pthread. * doc/install.texi (Specific, *-*-solaris2*): Document use of alternate thread libraries on Solaris 8. Document TLS patch requirements. * doc/sourcebuild.texi (Add Options): Sort alphabetically. Document tls. PR target/18788 * config/sol2.h (LIB_SPEC): Link with thread libraries even with -shared. gcc/testsuite: * lib/target-supports.exp (add_options_for_tls): New proc. * g++.dg/tls/static-1.C: Use dg-add-options tls. * g++.dg/tls/static-1a.cc: Likewise. * gcc.dg/tls/emutls-1.c: Likewise. * gcc.dg/tls/opt-11.c: Likewise. * gcc.dg/tls/opt-12.c: Likewise. * gcc.dg/tls/pr24428-2.c: Likewise. * gcc.dg/tls/pr24428.c: Likewise. * obj-c++.dg/tls/static-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-2.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-3.mm: Likewise. * objc.dg/torture/tls/thr-init-2.m: Likewise. * objc.dg/torture/tls/thr-init-3.m: Likewise. * objc.dg/torture/tls/thr-init.m: Likewise. * gcc.dg/lto/20090210_0.c: Add -pthread for *-*-solaris2.[89]. From-SVN: r162478
127 lines
2.9 KiB
Plaintext
127 lines
2.9 KiB
Plaintext
# This is the target specific configuration file. This is invoked by the
|
|
# autoconf generated configure script. Putting it in a separate shell file
|
|
# lets us skip running autoconf when modifying target specific information.
|
|
|
|
# This file switches on the shell variable ${target}, and sets the
|
|
# following shell variables:
|
|
# config_path An ordered list of directories to search for
|
|
# sources and headers. This is relative to the
|
|
# config subdirectory of the source tree.
|
|
# XCFLAGS Add extra compile flags to use.
|
|
# XLDFLAGS Add extra link flags to use.
|
|
|
|
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
|
|
if test $gcc_cv_have_tls = yes ; then
|
|
case "${target}" in
|
|
|
|
*-*-linux*)
|
|
XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Since we require POSIX threads, assume a POSIX system by default.
|
|
config_path="posix"
|
|
|
|
# Check for futex enabled all at once.
|
|
if test $enable_linux_futex = yes; then
|
|
case "${target}" in
|
|
|
|
alpha*-*-linux*)
|
|
config_path="linux/alpha linux posix"
|
|
;;
|
|
|
|
ia64*-*-linux*)
|
|
config_path="linux/ia64 linux posix"
|
|
;;
|
|
|
|
mips*-*-linux*)
|
|
config_path="linux/mips linux posix"
|
|
;;
|
|
|
|
powerpc*-*-linux*)
|
|
config_path="linux/powerpc linux posix"
|
|
;;
|
|
|
|
s390*-*-linux*)
|
|
config_path="linux/s390 linux posix"
|
|
;;
|
|
|
|
# Note that bare i386 is not included here. We need cmpxchg.
|
|
i[456]86-*-linux*)
|
|
config_path="linux/x86 linux posix"
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m64 "*)
|
|
;;
|
|
*)
|
|
if test -z "$with_arch"; then
|
|
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
|
fi
|
|
esac
|
|
;;
|
|
|
|
# Similar jiggery-pokery for x86_64 multilibs, except here we
|
|
# can't rely on the --with-arch configure option, since that
|
|
# applies to the 64-bit side.
|
|
x86_64-*-linux*)
|
|
config_path="linux/x86 linux posix"
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m32 "*)
|
|
XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
|
|
;;
|
|
esac
|
|
;;
|
|
|
|
# Note that sparcv7 and sparcv8 is not included here. We need cas.
|
|
sparcv9-*-linux* | sparc64-*-linux*)
|
|
echo "int i;" > conftestx.c
|
|
if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
|
|
config_path="linux/sparc linux posix"
|
|
case "`/usr/bin/file conftestx.o`" in
|
|
*32-bit*)
|
|
case " ${CC} ${CFLAGS}" in
|
|
*" -mcpu=ultrasparc"*)
|
|
;;
|
|
*)
|
|
XCFLAGS="${XCFLAGS} -mcpu=v9"
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
fi
|
|
rm -f conftestx.c conftestx.o
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Other system configury
|
|
case "${target}" in
|
|
|
|
*-*-hpux*)
|
|
case "${target}" in
|
|
*-*-hpux11*)
|
|
# HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
|
|
XLDFLAGS="${XLDFLAGS} -lrt"
|
|
;;
|
|
esac
|
|
case "${target}" in
|
|
hppa[12]*-*-hpux*)
|
|
# PA 32 HP-UX needs -frandom-seed for bootstrap compare.
|
|
XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
|
|
;;
|
|
esac
|
|
;;
|
|
|
|
*-*-mingw32*)
|
|
config_path="mingw32 posix"
|
|
;;
|
|
|
|
*-*-darwin*)
|
|
config_path="bsd posix"
|
|
;;
|
|
|
|
*)
|
|
;;
|
|
|
|
esac
|