aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-09 17:53:58 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-09 17:53:58 +0000
commit769dfabf5377da9339d82919f17a90ae40107a2c (patch)
tree44600cec10c5760c45dc71e8efbc310fe1403ed5
parentf46279ed716ecb34cb8fc370148c1825f18dd92d (diff)
This commit was manufactured by cvs2svn to create tagcfg-merge-20020902
'cfg-merge-20020902'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/cfg-merge-20020902@49641 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--boehm-gc/Makefile.direct66
-rwxr-xr-xboehm-gc/config.guess861
-rw-r--r--boehm-gc/doc/debugging.html2
-rw-r--r--contrib/regression/ChangeLog9
-rw-r--r--contrib/regression/README18
-rwxr-xr-xcontrib/regression/btest-gcc.sh172
-rwxr-xr-xcontrib/regression/objs-gcc.sh121
-rw-r--r--contrib/regression/site.exp18
-rw-r--r--gcc/config/i386/scodbx.h84
-rw-r--r--gcc/config/i386/xm-dgux.h4
-rw-r--r--gcc/config/i386/xm-sun.h21
-rw-r--r--gcc/config/i386/xm-sysv3.h3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb42.C19
-rw-r--r--gcc/testsuite/gcc.dg/debug/20000503-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/debug/20010207-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/debug/20011223-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/debug/20020104-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-3.c34
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-5.c46
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-6.c38
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug.exp78
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/debug/trivial.c6
-rw-r--r--libstdc++-v3/testsuite/thread/pthread1.cc143
-rw-r--r--libstdc++-v3/testsuite/thread/pthread2.cc67
-rw-r--r--libstdc++-v3/testsuite/thread/pthread3.cc64
-rw-r--r--libstdc++-v3/testsuite/thread/pthread4.cc101
-rw-r--r--libstdc++-v3/testsuite/thread/pthread5.cc123
-rw-r--r--libstdc++-v3/testsuite/thread/pthread6.cc94
33 files changed, 356 insertions, 1964 deletions
diff --git a/boehm-gc/Makefile.direct b/boehm-gc/Makefile.direct
index 84a7dd3d63e..a5d24c6550e 100644
--- a/boehm-gc/Makefile.direct
+++ b/boehm-gc/Makefile.direct
@@ -10,20 +10,13 @@
# c++ interface to gc.a
# cord/de - builds dumb editor based on cords.
ABI_FLAG=
-# ABI_FLAG should be the cc flag that specifies the ABI. On most
-# platforms this will be the empty string. Possible values:
-# +DD64 for 64-bit executable on HP/UX.
-# -n32, -n64, -o32 for SGI/MIPS ABIs.
-
-AS_ABI_FLAG=$(ABI_FLAG)
-# ABI flag for assembler. On HP/UX this is +A64 for 64 bit
-# executables.
-
CC=cc $(ABI_FLAG)
CXX=g++ $(ABI_FLAG)
-AS=as $(AS_ABI_FLAG)
+AS=as $(ABI_FLAG)
# The above doesn't work with gas, which doesn't run cpp.
# Define AS as `gcc -c -x assembler-with-cpp' instead.
+# Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
+# if you use something other than the default ABI on your machine.
# Redefining srcdir allows object code for the nonPCR version of the collector
# to be generated in different directories.
@@ -61,15 +54,12 @@ HOSTCFLAGS=$(CFLAGS)
# gc.h before performing thr_ or dl* or GC_ operations.)
# Must also define -D_REENTRANT.
# -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
-# (Internally this define GC_SOLARIS_THREADS as well.)
+# Define SOLARIS_THREADS as well.
# -DGC_IRIX_THREADS enables support for Irix pthreads. See README.irix.
# -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
# Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
# see README.linux. -D_REENTRANT may also be required.
-# -DGC_OSF1_THREADS enables support for Tru64 pthreads. Untested.
-# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads. Untested.
-# Appeared to run into some underlying thread problems.
# -DALL_INTERIOR_POINTERS allows all pointers to the interior
# of objects to be recognized. (See gc_priv.h for consequences.)
# Alternatively, GC_all_interior_pointers can be set at process
@@ -103,9 +93,9 @@ HOSTCFLAGS=$(CFLAGS)
# See gc_cpp.h for details. No effect on the C part of the collector.
# This is defined implicitly in a few environments. Must also be defined
# by clients that use gc_cpp.h.
-# -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be
-# defined as aliases for X, GC_realloc, and GC_free, respectively.
-# Calloc and strdup are redefined in terms of the new malloc. X should
+# -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
+# as aliases for X, GC_realloc, and GC_free, respectively.
+# Calloc is redefined in terms of the new malloc. X should
# be either GC_malloc or GC_malloc_uncollectable, or
# GC_debug_malloc_replacement. (The latter invokes GC_debug_malloc
# with dummy source location information, but still results in
@@ -114,9 +104,7 @@ HOSTCFLAGS=$(CFLAGS)
# you don't want to (or can't) look at. It may not work for
# existing code, but it often does. Neither works on all platforms,
# since some ports use malloc or calloc to obtain system memory.
-# (Probably works for UNIX, and win32.) If you build with DBG_HDRS_ALL,
-# you should only use GC_debug_malloc_replacement as a malloc
-# replacement.
+# (Probably works for UNIX, and win32.)
# -DREDIRECT_REALLOC=X causes GC_realloc to be redirected to X.
# The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement,
# together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to
@@ -148,8 +136,8 @@ HOSTCFLAGS=$(CFLAGS)
# Works for Solaris and Irix.
# -DUSE_MUNMAP causes memory to be returned to the OS under the right
# circumstances. This currently disables VM-based incremental collection.
-# This is currently experimental, and works only under some Unix,
-# Linux and Windows versions.
+# This is currently experimental, and works only under some Unix and
+# Linux versions.
# -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
# GC_scratch_alloc() to get stack memory.
# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
@@ -185,12 +173,8 @@ HOSTCFLAGS=$(CFLAGS)
# allocated through the debugging interface. Affects the amount of
# information generated in leak reports. Only matters on platforms
# on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
-# and Solaris/SPARC and platforms that provide execinfo.h.
-# Default is zero. On X86, client
+# and Solaris/SPARC. Turns on call chain saving on X86. On X86, client
# code should NOT be compiled with -fomit-frame-pointer.
-# -DSAVE_CALL_NARGS=<n> Set the number of functions arguments to be
-# saved with each call frame. Default is zero. Ignored if we
-# don't know how to retrieve arguments on the platform.
# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
# altered stubborn objects, at substantial performance cost.
# Use only for debugging of the incremental collector.
@@ -207,8 +191,8 @@ HOSTCFLAGS=$(CFLAGS)
# 15% or so.
# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
# prefetch instructions. Same restrictions as USE_I686_PREFETCH.
-# Minimally tested. Didn't appear to be an obvious win on a K6-2/500.
-# -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
+# UNTESTED!!
+# -DGC_USE_LD_WRAP in combination with the gld flags listed in README.linux
# causes the collector some system and pthread calls in a more transparent
# fashion than the usual macro-based approach. Requires GNU ld, and
# currently probably works only with Linux.
@@ -225,14 +209,6 @@ HOSTCFLAGS=$(CFLAGS)
# These may otherwise alter its configuration, or turn off GC altogether.
# I don't know of a reason to disable this, except possibly if the
# resulting process runs as a privileged user?
-# -DUSE_GLOBAL_ALLOC. Win32 only. Use GlobalAlloc instead of
-# VirtualAlloc to allocate the heap. May be needed to work around
-# a Windows NT/2000 issue. Incompatible with USE_MUNMAP.
-# See README.win32 for details.
-# -DMAKE_BACK_GRAPH. Enable GC_PRINT_BACK_HEIGHT environment variable.
-# See README.environment for details. Experimental. Limited platform
-# support. Implies DBG_HDRS_ALL. All allocation should be done using
-# the debug interface.
# -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus
# makes incremental collection easier. Was enabled by default until 6.0.
# Rarely used, to my knowledge.
@@ -243,16 +219,16 @@ AR= ar
RANLIB= ranlib
-OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o irix_threads.o linux_threads.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o
+OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o irix_threads.o linux_threads.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o
-CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c irix_threads.c linux_threads.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c
+CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c irix_threads.c linux_threads.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.s \
- sparc_mach_dep.S include/gc.h include/gc_typed.h \
+ sparc_mach_dep.s include/gc.h include/gc_typed.h \
include/private/gc_hdrs.h include/private/gc_priv.h \
include/private/gcconfig.h include/private/gc_pmark.h \
include/gc_inl.h include/gc_inline.h include/gc_mark.h \
@@ -266,8 +242,7 @@ SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.s \
include/gc_local_alloc.h include/private/dbg_mlc.h \
include/private/specific.h powerpc_macosx_mach_dep.s \
include/leak_detector.h include/gc_amiga_redirects.h \
- include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
- $(CORD_SRCS)
+ include/gc_pthread_redirects.h $(CORD_SRCS)
DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
doc/README.amiga doc/README.cords doc/debugging.html \
@@ -276,7 +251,7 @@ DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
doc/README.win32 doc/barrett_diagram doc/README \
doc/README.contributors doc/README.changes doc/gc.man \
doc/README.environment doc/tree.html doc/gcdescr.html \
- doc/README.autoconf doc/README.macros doc/README.ews4800
+ doc/README.autoconf doc/README.macros
TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
tests/leak_test.c tests/thread_leak_test.c
@@ -456,13 +431,10 @@ mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s $(srcdir)/mips_ul
# ./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.s
# alpha_mach_dep.s assumes that pointers are not saved in fp registers.
# Gcc on a 21264 can spill pointers to fp registers. Oops.
- ./if_mach SPARC SUNOS5 $(CC) -c -o mach_dep.o $(srcdir)/sparc_mach_dep.S
+ ./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.s
./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
./if_mach SPARC NETBSD $(AS) -o mach_dep.o $(srcdir)/sparc_netbsd_mach_dep.s
- ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
- ./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
- ./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
diff --git a/boehm-gc/config.guess b/boehm-gc/config.guess
index 297e5c30f41..e1b58717080 100755
--- a/boehm-gc/config.guess
+++ b/boehm-gc/config.guess
@@ -1,10 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
# Free Software Foundation, Inc.
-
-timestamp='2001-10-05'
-
+#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@@ -24,195 +22,52 @@ timestamp='2001-10-05'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
- --version | -v )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
fi
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script.
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c ;
- for c in cc gcc c89 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
-
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
+# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- # Determine the machine/vendor (is the vendor relevant).
- case "${UNAME_MACHINE}" in
- amiga) machine=m68k-unknown ;;
- arm32) machine=arm-unknown ;;
- atari*) machine=m68k-atari ;;
- sun3*) machine=m68k-sun ;;
- mac68k) machine=m68k-apple ;;
- macppc) machine=powerpc-apple ;;
- hp3[0-9][05]) machine=m68k-hp ;;
- ibmrt|romp-ibm) machine=romp-ibm ;;
- sparc*) machine=`uname -p`-unknown ;;
- *) machine=${UNAME_MACHINE}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE}" in
- i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -222,55 +77,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
.globl main
- .align 4
.ent main
main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
.end main
EOF
- eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
+ ./$dummy
+ case "$?" in
+ 7)
UNAME_MACHINE="alpha"
;;
- 1-0)
+ 15)
UNAME_MACHINE="alphaev5"
;;
- 1-1)
+ 14)
UNAME_MACHINE="alphaev56"
;;
- 1-101)
+ 10)
UNAME_MACHINE="alphapca56"
;;
- 2-303)
+ 16)
UNAME_MACHINE="alphaev6"
;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
esac
fi
rm -f $dummy.s $dummy
@@ -286,18 +127,45 @@ EOF
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
+ echo m68k-cbm-sysv4
exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -353,9 +221,15 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
+ # "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
@@ -379,9 +253,30 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
@@ -395,10 +290,8 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
@@ -419,13 +312,10 @@ EOF
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && exit 0
+ && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
@@ -441,7 +331,7 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
@@ -473,20 +363,11 @@ EOF
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
+ i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
@@ -498,7 +379,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -507,9 +388,9 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
- *:AIX:*:[45])
+ *:AIX:*:4)
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -517,7 +398,7 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
@@ -527,7 +408,7 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
@@ -543,30 +424,11 @@ EOF
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
+ sed 's/^ //' << EOF >$dummy.c
#include <stdlib.h>
#include <unistd.h>
@@ -597,19 +459,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
- fi ;;
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
esac
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
- ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
@@ -635,7 +491,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
@@ -645,7 +501,7 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ *9??*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -654,7 +510,7 @@ EOF
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
- i*86:OSF1:*:*)
+ i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
@@ -664,6 +520,9 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -686,36 +545,37 @@ EOF
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alpha-cray-unicosmk${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
@@ -725,17 +585,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -754,99 +623,172 @@ EOF
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux
- exit 0 ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- mips:Linux:*:*)
- case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
- big) echo mips-unknown-linux-gnu && exit 0 ;;
- little) echo mipsel-unknown-linux-gnu && exit 0 ;;
- esac
- ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit 0 ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit 0 ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit 0 ;;
- i*86:Linux:*:*)
+ *:Linux:*:*)
+
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
- ld_supported_targets=`cd /; ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
- s/.*supported targets: *//
+ s/.*supported emulations: *//
s/ .*//
p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ case "$ld_supported_emulations" in
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
;;
- a.out-i386-linux)
+ i?86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
+ exit 0
+ ;;
+ i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- cat >$dummy.c <<EOF
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
@@ -854,30 +796,28 @@ EOF
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
- printf ("%s-pc-linux-gnu\n", argv[1]);
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
- printf ("%s-pc-linux-gnuaout\n", argv[1]);
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
- i*86:UNIX_SV:4.2MP:2.*)
+ i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
@@ -885,7 +825,7 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
@@ -893,15 +833,16 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit 0 ;;
- i*86:*:5:[78]*)
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
exit 0 ;;
- i*86:*:3.2:*)
+ i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -919,11 +860,7 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
- # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
@@ -947,7 +884,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -958,24 +895,21 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
- rs6000:LynxOS:2.*:*)
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
@@ -993,8 +927,8 @@ EOF
echo ns32k-sni-sysv
fi
exit 0 ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
@@ -1006,14 +940,10 @@ EOF
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
- news*:NEWS-OS:6*:*)
+ news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
@@ -1044,76 +974,14 @@ EOF
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
- *:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- if test "${UNAME_MACHINE}" = "x86pc"; then
- UNAME_MACHINE=pc
- fi
- echo `uname -p`-${UNAME_MACHINE}-nto-qnx
- exit 0 ;;
*:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit 0 ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit 0 ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit 0 ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit 0 ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit 0 ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit 0 ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit 0 ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo i386-qnx-qnx${UNAME_VERSION}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
@@ -1200,24 +1068,11 @@ main ()
#endif
#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
#endif
#if defined (alliant) && defined (i860)
@@ -1228,7 +1083,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
@@ -1261,48 +1116,6 @@ then
esac
fi
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
+#echo '(Unable to guess system type)' 1>&2
exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/boehm-gc/doc/debugging.html b/boehm-gc/doc/debugging.html
index 04773fa66a3..a186ff507a0 100644
--- a/boehm-gc/doc/debugging.html
+++ b/boehm-gc/doc/debugging.html
@@ -209,8 +209,6 @@ down the problem:
<OL>
<LI> If you are using the incremental collector try turning it off for
debugging.
-<LI> If you are using shared libraries, try linking statically. If that works,
-ensure that DYNAMIC_LOADING is defined on your platform.
<LI> Try to reproduce the problem with fully debuggable unoptimized code.
This will eliminate the last possibility, as well as making debugging easier.
<LI> Try replacing any suspect typed allocation and <TT>GC_malloc_atomic</tt>
diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog
deleted file mode 100644
index 50081734534..00000000000
--- a/contrib/regression/ChangeLog
+++ /dev/null
@@ -1,9 +0,0 @@
-2002-01-31 Geoffrey Keating <geoffk@redhat.com>
-
- * btest-gcc.sh: New file.
- * objs-gcc.sh: New file.
- * site.exp: New file.
- * ChangeLog: New file.
- * README: New file.
-
-
diff --git a/contrib/regression/README b/contrib/regression/README
deleted file mode 100644
index 7e0e657932e..00000000000
--- a/contrib/regression/README
+++ /dev/null
@@ -1,18 +0,0 @@
-This directory contains scripts that are used by the regression
-tester, <http://people.redhat.com/geoffk/gcc-regression/>.
-
-The primary script is 'btest-gcc.sh'. This is the script that is run
-to actually test the compiler.
-
-'objs-gcc.sh' takes a combined tree and builds (but does not test) the
-tools required for 'btest-gcc.sh'. It is run periodically to update
-the tools. This script is followed by running 'btest-gcc.sh' using
-the newly-build tools to check that they will not cause regressions.
-
-'site.exp' is what $DEJAGNU points to when the regression tester runs
-these scripts.
-
-Note that any changes made here need to be approved by the regression
-tester's maintainer (see MAINTAINERS). The changes will be used on
-the tester's next run, so `experimental' changes are very strongly
-discouraged :-).
diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh
deleted file mode 100755
index 1bd7e8ca61e..00000000000
--- a/contrib/regression/btest-gcc.sh
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/sh
-
-# Test GCC.
-# Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# INPUT:
-# btest <target> <source> <prefix> <state> <build>
-# TARGET is the target triplet. It should be the same one
-# as used in constructing PREFIX.
-TARGET=$1
-# SOURCE is the directory containing the toplevel configure.
-SOURCE=$2
-
-# PREFIX is the directory for the --prefix option to configure.
-# For cross compilers, it needs to contain header files,
-# libraries, and binutils. PATH should probably include
-# $PREFIX/bin.
-PREFIX=$3
-# This script also needs to include the GDB testsuite in
-# $PREFIX/share/gdb-testsuite.
-GDB_TESTSUITE=$PREFIX/share/gdb-testsuite
-
-# STATE is where the tester maintains its internal state,
-# described below.
-STATE=$4
-
-# BUILD is a temporary directory that this script will
-# delete and recreate, containing the build tree.
-BUILD=$5
-
-# you also probably need to set these variables:
-# PATH: should contain a native gcc, and a cross gdb.
-# DEJAGNU: should point to a site.exp suitable for testing
-# the compiler and debugger.
-
-
-# OUTPUT: in $RESULT, one of the following keywords:
-# error the script failed due to
-# a misconfiguration or resource limitation
-# build the build failed
-# regress-<n> the build succeeded, but there were <n>
-# testsuite regressions, listed in $REGRESS
-# pass build succeeded and there were no regressions
-RESULT=$STATE/RESULT
-# in BUILD_LOG, the output of the build
-BUILD_LOG=$STATE/build_log
-# in FAILED, a list of failing testcases
-FAILED=$STATE/failed
-# in PASSES, the list of testcases we expect to pass
-PASSES=$STATE/passes
-# in REGRESS, a list of testcases we expected to pass but that failed
-REGRESS=$STATE/regress
-
-# Make sure various files exist.
-[ -d $STATE ] || mkdir $STATE
-[ -f $PASSES ] || touch $PASSES
-
-# These lines should stay in this order, because
-# that way if something is badly wrong and $RESULT can't
-# be modified then cron will mail the error message.
-# The reverse order could lead to the testsuite claiming that
-# everything always passes, without running any tests.
-echo error > $RESULT || exit 1
-exec > $BUILD_LOG 2>&1 || exit 1
-
-set -x
-
-# Nuke $BUILD and recreate it.
-rm -rf $BUILD $REGRESS $FAILED
-mkdir $BUILD || exit 1
-cd $BUILD || exit 1
-
-H_BUILD=`$SOURCE/config.guess || exit 1`
-H_HOST=$H_BUILD
-if [ $TARGET = native ] ; then
- H_TARGET=$H_HOST
-else
- H_TARGET=$TARGET
-fi
-H_REAL_TARGET=`$SOURCE/config.sub $H_TARGET || exit 1`
-
-# TESTLOGS is the list of dejagnu .sum files that the tester should
-# look at.
-TESTLOGS="gcc/testsuite/gcc.sum
-gcc/testsuite/g++.sum
-gcc/testsuite/g77.sum
-gcc/testsuite/objc.sum
-test-gdb/gdb.sum"
-# $H_TARGET/libstdc++-v3/testsuite/libstdc++-v3.sum
-
-# Build.
-echo build > $RESULT
-$SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1
-if [ $H_HOST = $H_TARGET ] ; then
- if ! make bootstrap ; then
- [ -s gcc/.bad_compare ] || exit 1
- cat gcc/.bad_compare >> $REGRESS || exit 1
- make all || exit 1
- fi
-else
- make || exit 1
-fi
-echo error > $RESULT || exit 1
-
-# Test GCC against its internal testsuite.
-make -k check-gcc
-
-# Test libstd++-v3
-make check-target-libstdc++-v3
-
-# Test the just-built GCC with the GDB testsuite.
-mkdir test-gdb || exit 1
-cd $GDB_TESTSUITE || exit 1
-for i in gdb.* ; do
- if [ -d $i ] ; then
- mkdir $BUILD/test-gdb/$i
- fi
-done
-cd $BUILD/test-gdb || exit 1
-echo "set host_alias $H_HOST" > site.exp
-echo "set host_triplet $H_HOST" >> site.exp
-echo "set target_alias $H_TARGET" >> site.exp
-echo "set target_triplet $H_REAL_TARGET" >> site.exp
-echo "set build_alias $H_BUILD" >> site.exp
-echo "set build_triplet $H_BUILD" >> site.exp
-echo "set srcdir $GDB_TESTSUITE" >> site.exp
-runtest --tool gdb
-
-# Sanity-check the testlogs. They should contain at least one PASS.
-cd $BUILD || exit 1
-for LOG in $TESTLOGS ; do
- if ! grep ^PASS: $LOG > /dev/null ; then
- echo build > $RESULT
- exit 1
- fi
-done
-
-# Work out what failed
-for LOG in $TESTLOGS ; do
- L=`basename $LOG`
- awk '/^FAIL: / { print "'$L'",$2; }' $LOG || exit 1
-done | sort | uniq > $FAILED || exit 1
-comm -12 $FAILED $PASSES >> $REGRESS || exit 1
-NUMREGRESS=`wc -l < $REGRESS | tr -d ' '`
-if [ $NUMREGRESS -ne 0 ] ; then
- echo regress-$NUMREGRESS > $RESULT
- exit 1
-fi
-
-# It passed. Update the state.
-for LOG in $TESTLOGS ; do
- L=`basename $LOG`
- awk '/^PASS: / { print "'$L'",$2; }' $LOG || exit 1
-done | sort | uniq | comm -23 - $FAILED > ${PASSES}~ || exit 1
-[ -s ${PASSES}~ ] || exit 1
-mv ${PASSES}~ ${PASSES} || exit 1
-echo pass > $RESULT
-exit 0
diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
deleted file mode 100755
index 839fcffb612..00000000000
--- a/contrib/regression/objs-gcc.sh
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/sh
-
-# Build tools for testing GCC.
-# Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# INPUT:
-# btest <target> <source> <prefix> <state> <build>
-# TARGET is the target triplet. It should be the same one
-# as used in constructing PREFIX.
-TARGET=$1
-# SOURCE is the directory containing the toplevel configure.
-SOURCE=$2
-
-# PREFIX is the directory for the --prefix option to configure.
-PREFIX=$3
-
-# STATE is where the tester maintains its internal state,
-# described below.
-STATE=$4
-
-# BUILD is a temporary directory that this script will
-# delete and recreate, containing the build tree.
-BUILD=$5
-
-# you also probably need to set these variables:
-# DEJAGNU: should point to a site.exp suitable for testing
-# the compiler and debugger.
-
-# OUTPUT: in $RESULT, one of the following keywords:
-# error the script failed due to
-# a misconfiguration or resource limitation
-# build the build failed
-# regress-<n> the build succeeded, but there were <n>
-# testsuite regressions, listed in $REGRESS
-# pass build succeeded and there were no regressions
-RESULT=$STATE/RESULT
-# in BUILD_LOG, the output of the build
-BUILD_LOG=$STATE/build_log
-# in FAILED, a list of failing testcases
-FAILED=$STATE/failed
-# in PASSES, the list of testcases we expect to pass
-PASSES=$STATE/passes
-# in REGRESS, a list of testcases we expected to pass but that failed
-REGRESS=$STATE/regress
-
-# Make sure various files exist.
-[ -d $STATE ] || mkdir $STATE
-[ -f $PASSES ] || touch $PASSES
-
-# These lines should stay in this order, because
-# that way if something is badly wrong and $RESULT can't
-# be modified then cron will mail the error message.
-# The reverse order could lead to the testsuite claiming that
-# everything always passes, without running any tests.
-echo error > $RESULT || exit 1
-exec > $BUILD_LOG 2>&1 || exit 1
-
-set -x
-
-# TESTLOGS is the list of dejagnu .sum files that the tester should
-# look at.
-TESTLOGS="test/gcc/gcc.sum
-test/g++/g++.sum"
-
-# Nuke $BUILD and recreate it.
-rm -rf $BUILD $REGRESS $FAILED
-mkdir $BUILD $BUILD/build $BUILD/objs || exit 1
-cd $BUILD || exit 1
-
-# This script used to use config.guess, but that is not how releng
-# determines hostnames.
-H_BUILD=`$SOURCE/config.guess || exit 1`
-H_HOST=$H_BUILD
-if [ $TARGET = native ] ; then
- H_TARGET=$H_HOST
-else
- H_TARGET=$TARGET
-fi
-H_REAL_TARGET=`$SOURCE/config.sub $H_TARGET || exit 1`
-H_REAL_BUILD=`$SOURCE/config.sub $H_BUILD || exit 1`
-H_REAL_HOST=`$SOURCE/config.sub $H_HOST || exit 1`
-
-# Build.
-echo build > $RESULT
-
-cd $BUILD/build || exit 1
-TMP_PREFIX=$BUILD/install
-$SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1
-if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-else
- make || exit 1
- make install || exit 1
-fi
-
-mkdir -p $PREFIX/share/gdb-testsuite || exit 1
-cd $SOURCE/gdb/testsuite || exit 1
-find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1
-# selftest.exp requires keeping old sources around, which is impractical
-rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp
-# these tests seem to be broken and randomly failing
-rm -r $PREFIX/share/gdb-testsuite/gdb.mi
-
-echo pass > $RESULT
-exit 0
diff --git a/contrib/regression/site.exp b/contrib/regression/site.exp
deleted file mode 100644
index fa50920d2fa..00000000000
--- a/contrib/regression/site.exp
+++ /dev/null
@@ -1,18 +0,0 @@
-global target_list
-
-case "$target_triplet" in {
- { "powerpc*-*eabi*" } {
-# if { [info exists tool] && $tool == "gcc" } {
-# set target_list { "powerpc-sim{,-fpic}" }
-# } else {
- set target_list { "powerpc-sim" }
-# }
- }
- { "mips-elf" } {
- set target_list { "mips-sim" }
- }
-
- default {
- set target_list { "unix" }
- }
-}
diff --git a/gcc/config/i386/scodbx.h b/gcc/config/i386/scodbx.h
deleted file mode 100644
index 7da93053256..00000000000
--- a/gcc/config/i386/scodbx.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Definitions for Intel 386 running SCO Unix System V,
- using dbx-in-coff encapsulation.
- Copyright (C) 1992, 1995, 1996, 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#include "i386/svr3dbx.h"
-
-/* Overridden defines for SCO systems from sco.h. */
-
-/* By default, target has a 80387, uses IEEE compatible arithmetic,
- and returns float values in the 387, ie,
- (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387)
-
- SCO's software emulation of a 387 fails to handle the `fucomp'
- opcode. fucomp is only used when generating IEEE compliant code.
- So don't make TARGET_IEEE_FP default for SCO. */
-
-#undef TARGET_SUBTARGET_DEFAULT
-#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
-
-/* Use crt1.o as a startup file and crtn.o as a closing file. */
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC \
- "%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\
- %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
-
-/* Library spec, including SCO international language support. */
-
-#undef LIB_SPEC
-#define LIB_SPEC \
- "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} %{scointl:libintl.a%s} -lc"
-
-/* Specify predefined symbols in preprocessor. */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -Asystem=svr3"
-
-#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{scointl:-DM_INTERNAT}"
-
-/* This spec is used for telling cpp whether char is signed or not. */
-
-#undef SIGNED_CHAR_SPEC
-#if DEFAULT_SIGNED_CHAR
-#define SIGNED_CHAR_SPEC \
- "%{funsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
-#else
-#define SIGNED_CHAR_SPEC \
- "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
-#endif
-
-/* caller has to pop the extra argument passed to functions that return
- structures. */
-
-#undef RETURN_POPS_ARGS
-#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
- ((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
- : (TARGET_RTD \
- && (TYPE_ARG_TYPES (FUNTYPE) == 0 \
- || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
- == void_type_node))) ? (SIZE) \
- : 0)
-/* On other 386 systems, the last line looks like this:
- : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */
-
-/* Handle #pragma pack. */
-#define HANDLE_SYSV_PRAGMA
diff --git a/gcc/config/i386/xm-dgux.h b/gcc/config/i386/xm-dgux.h
deleted file mode 100644
index 881c5c7be9d..00000000000
--- a/gcc/config/i386/xm-dgux.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Configuration for GCC for Intel i386 running DG/ux */
-
-/* looks just like sysv4 for now */
-#include "xm-svr4.h"
diff --git a/gcc/config/i386/xm-sun.h b/gcc/config/i386/xm-sun.h
deleted file mode 100644
index 6c0f0a25630..00000000000
--- a/gcc/config/i386/xm-sun.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Configuration for GNU C-compiler for Intel 80386 running SunOS 4.0.
- Copyright (C) 1988, 1997 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#define USG
diff --git a/gcc/config/i386/xm-sysv3.h b/gcc/config/i386/xm-sysv3.h
deleted file mode 100644
index 9a655443ff5..00000000000
--- a/gcc/config/i386/xm-sysv3.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Configuration for GCC for Intel i386 running System V Release 3. */
-
-#include "xm-svr3.h"
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
deleted file mode 100644
index c27aa8d2df7..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
+++ /dev/null
@@ -1,19 +0,0 @@
-//Build don't link:
-#include <vector>
-#include <algorithm>
-
-template <class T> class Expr
-{
-public :
-Expr(){};
-Expr(const T&){};
-};
-
-template <class T >
-inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
-
-int main()
-{
- std::vector<int> a(3);
- std::sort( a.begin(), a.end(), compare ); // ERROR - no matching function
-}
diff --git a/gcc/testsuite/gcc.dg/debug/20000503-1.c b/gcc/testsuite/gcc.dg/debug/20000503-1.c
deleted file mode 100644
index 27d3c55ddcb..00000000000
--- a/gcc/testsuite/gcc.dg/debug/20000503-1.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* { dg-do compile } */
-
-/* Distilled from GCC's stmt.c. Caused abort in dwarf-1 code. */
-
-static void
-expand_nl_goto_receiver ()
-{
-{
-static struct elims {int from, to;} elim_regs[] = {{ 16, 7}, { 16, 6}, { 20, 7},{ 20, 6}};
- int i;
-
- for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
- if (elim_regs[i].from == 16 && elim_regs[i].to == 6)
- break;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/20010207-1.c b/gcc/testsuite/gcc.dg/debug/20010207-1.c
deleted file mode 100644
index 513d7a43311..00000000000
--- a/gcc/testsuite/gcc.dg/debug/20010207-1.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* { dg-do compile } */
-extern inline int f1 (void) {return f2();}
-int f3 (void) {return f1();}
-int f1 (void) {return 0;}
diff --git a/gcc/testsuite/gcc.dg/debug/20011223-1.c b/gcc/testsuite/gcc.dg/debug/20011223-1.c
deleted file mode 100644
index f8d70abcea0..00000000000
--- a/gcc/testsuite/gcc.dg/debug/20011223-1.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Origin: PR c/5163 from aj@suse.de. */
-/* { dg-do compile } */
-
-extern int bar (int);
-
-int
-foo (void)
-{
- extern int bar (int);
- return bar (5);
-}
diff --git a/gcc/testsuite/gcc.dg/debug/20020104-2.c b/gcc/testsuite/gcc.dg/debug/20020104-2.c
deleted file mode 100644
index 854d1744817..00000000000
--- a/gcc/testsuite/gcc.dg/debug/20020104-2.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This testcase used to fail because outlining_inline_function was called
- too early, before rtl was generated. */
-/* { dg-do compile } */
-
-int foo (const int *x)
-{
- char a[*x];
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-1.c b/gcc/testsuite/gcc.dg/debug/debug-1.c
deleted file mode 100644
index b413eb7223f..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Verify that the scheduler does not discard the lexical block. */
-/* { dg-do compile } */
-/* { dg-options "-dA" } */
-/* { dg-final { scan-assembler "xyzzy" } } */
-
-long foo(long p)
-{
- {
- long xyzzy = 0;
- if (p)
- xyzzy = 2;
- return xyzzy;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-2.c b/gcc/testsuite/gcc.dg/debug/debug-2.c
deleted file mode 100644
index e11b7b0fc1f..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-2.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Verify that the scheduler does not discard the lexical block. */
-/* { dg-do compile } */
-/* { dg-options "-dA" } */
-/* { dg-final { scan-assembler "xyzzy" } } */
-
-long foo(long p)
-{
- if (1)
- {
- long xyzzy = 0;
- if (p)
- xyzzy = 2;
- return xyzzy;
- }
- else
- {
- int x = 0;
- return x;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-3.c b/gcc/testsuite/gcc.dg/debug/debug-3.c
deleted file mode 100644
index bb819f4f022..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-3.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* This testcase failed, because scope containing baz was deleted
- (spanned 0 basic blocks) and DWARF-2 couldn't find baz origin. */
-/* { dg-do compile } */
-
-struct A { char *a, *b, *c, *d; };
-
-static int
-bar (struct A *x)
-{
- return x->c - x->b;
-}
-
-void fnptr (void (*fn) (void));
-
-void
-foo (void)
-{
- struct A e;
-
- {
- void baz (void)
- {
- bar (&e);
- }
- fnptr (baz);
- }
- {
- struct A *f;
-
- f = &e;
- if (f->c - f->a > f->d - f->a)
- f->c = f->d;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-4.c b/gcc/testsuite/gcc.dg/debug/debug-4.c
deleted file mode 100644
index 62e824a548c..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-4.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* This testcase failed, because scope containing baz was not emitted
- (doesn't contain any instructions) and DWARF-2 couldn't find baz origin. */
-/* { dg-do compile } */
-
-struct A { char *a, *b, *c, *d; };
-
-static int
-bar (struct A *x)
-{
- return x->c - x->b;
-}
-
-void
-foo (void)
-{
- struct A e;
-
- {
- int baz (void)
- {
- return bar (&e);
- }
- }
- if (e.c - e.a > e.d - e.a)
- e.c = e.d;
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-5.c b/gcc/testsuite/gcc.dg/debug/debug-5.c
deleted file mode 100644
index 8f26fc47b8b..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-5.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This testcase failed, because scope containing baz was deleted
- (spanned 0 basic blocks) and DWARF-2 couldn't find baz origin. */
-/* { dg-do compile } */
-
-extern void abort (void);
-
-struct A { char *a, *b, *c, *d; };
-
-static int
-bar (struct A *x)
-{
- return x->c - x->b;
-}
-
-static int
-bar2 (struct A *x)
-{
- int a = x->c - x->b;
- x->c += 26;
- return a;
-}
-
-void fnptr (void (*fn) (void));
-
-void
-foo (void)
-{
- struct A e;
-
- if (bar2 (&e) < 0)
- abort ();
- {
- void baz (void)
- {
- bar (&e);
- }
- fnptr (baz);
- }
- {
- struct A *f;
-
- f = &e;
- if (f->c - f->a > f->d - f->a)
- f->c = f->d;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug-6.c b/gcc/testsuite/gcc.dg/debug/debug-6.c
deleted file mode 100644
index 4fe680df0b6..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug-6.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Verify that bb-reorder re-inserts nested scopes properly. */
-/* { dg-do compile } */
-/* { dg-options "-dA" } */
-/* { dg-final { scan-assembler "xyzzy" } } */
-
-extern void abort (void);
-
-struct A { char *a, *b, *c, *d; };
-
-static int
-bar2 (struct A *x)
-{
- int a = x->c - x->b;
- x->c += 26;
- return a;
-}
-
-void fnptr (int *);
-
-void
-foo (void)
-{
- struct A e;
-
- if (bar2 (&e) < 0)
- abort ();
- {
- int xyzzy;
- fnptr (&xyzzy);
- }
- {
- struct A *f;
-
- f = &e;
- if (f->c - f->a > f->d - f->a)
- f->c = f->d;
- }
-}
diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp
deleted file mode 100644
index 310ce131cdc..00000000000
--- a/gcc/testsuite/gcc.dg/debug/debug.exp
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# GCC testsuite that uses the `dg.exp' driver.
-
-# Load support procs.
-load_lib gcc-dg.exp
-
-# This is the list of debugging options we'll try. Some of them won't
-# be supported, that's OK; they will be quickly eliminated.
-# It's probably not a good idea to add more optimisation options.
-
-if ![info exists DEBUG_TORTURE_OPTIONS] {
- set DEBUG_TORTURE_OPTIONS ""
- foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
- set comp_output [gcc_target_compile \
- "$srcdir/$subdir/trivial.c" "trivial.S" assembly \
- "additional_flags=$type"]
- if { ! [string match "*: unknown or unsupported -g option*" \
- $comp_output] } {
- foreach level {1 "" 3} {
- lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
- foreach opt { -O -O3 } {
- lappend DEBUG_TORTURE_OPTIONS \
- [list "${type}${level}" "$opt" ]
- }
- }
- }
- }
-}
-
-verbose -log "Using options $DEBUG_TORTURE_OPTIONS"
-
-# Initialize `dg'.
-dg-init
-
-# Main loop.
-
-foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] {
- global runtests
-
- # If we're only testing specific files and this isn't one of
- # them, skip it.
- if ![runtest_file_p $runtests $test] {
- continue
- }
-
- set nshort [file tail [file dirname $test]]/[file tail $test]
-
- foreach flags $DEBUG_TORTURE_OPTIONS {
- set doit 1
- if { [string match {*/debug-[126].c} "$nshort"] \
- && [string match "*1" [lindex "$flags" 0] ] } {
- set doit 0
- }
-
- if { $doit } {
- verbose -log "Testing $nshort, $flags" 1
- dg-test $test $flags ""
- }
- }
-}
-
-# All done.
-dg-finish
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2-1.c
deleted file mode 100644
index 4ca98e2f03d..00000000000
--- a/gcc/testsuite/gcc.dg/debug/dwarf2-1.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-
-/* Copyright (C) 2000 Free Software Foundation */
-/* Contributed by Alexandre Oliva <aoliva@cygnus.com> */
-
-static int foo () { return 0; }
-
-void bar () {
- int foo ();
- int foo ();
-}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
deleted file mode 100644
index 0c3cee1a374..00000000000
--- a/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile } */
-
-/* Copyright (C) 2000 Free Software Foundation */
-/* Contributed by Alexandre Oliva <aoliva@redhat.com> */
-
-inline double fx (double x)
-{
- return 3 * x;
-}
-
-main ()
-{
- double a = 0, fx (double), foo ();
- fx (a);
- if (a != 3)
- foo ();
-}
diff --git a/gcc/testsuite/gcc.dg/debug/trivial.c b/gcc/testsuite/gcc.dg/debug/trivial.c
deleted file mode 100644
index 5b125eca91f..00000000000
--- a/gcc/testsuite/gcc.dg/debug/trivial.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* { dg-do run } */
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc
deleted file mode 100644
index 71afefcc758..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ /dev/null
@@ -1,143 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-// This multi-threading C++/STL/POSIX code adheres to rules outlined here:
-// http://www.sgi.com/tech/stl/thread_safety.html
-//
-// It is believed to exercise the allocation code in a manner that
-// should reveal memory leaks (and, under rare cases, race conditions,
-// if the STL threading support is fubar'd).
-
-#include <list>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-using namespace std;
-
-const int thread_cycles = 10;
-const int thread_pairs = 10;
-const unsigned max_size = 100;
-const int iters = 10000;
-
-class task_queue
-{
-public:
- task_queue ()
- {
- pthread_mutex_init (&fooLock, NULL);
- pthread_cond_init (&fooCond1, NULL);
- pthread_cond_init (&fooCond2, NULL);
- }
- ~task_queue ()
- {
- pthread_mutex_destroy (&fooLock);
- pthread_cond_destroy (&fooCond1);
- pthread_cond_destroy (&fooCond2);
- }
- list<int> foo;
- pthread_mutex_t fooLock;
- pthread_cond_t fooCond1;
- pthread_cond_t fooCond2;
-};
-
-void*
-produce (void* t)
-{
- task_queue& tq = *(static_cast<task_queue*> (t));
- int num = 0;
- while (num < iters)
- {
- pthread_mutex_lock (&tq.fooLock);
- while (tq.foo.size () >= max_size)
- pthread_cond_wait (&tq.fooCond1, &tq.fooLock);
- tq.foo.push_back (num++);
- pthread_cond_signal (&tq.fooCond2);
- pthread_mutex_unlock (&tq.fooLock);
- }
- return 0;
-}
-
-void*
-consume (void* t)
-{
- task_queue& tq = *(static_cast<task_queue*> (t));
- int num = 0;
- while (num < iters)
- {
- pthread_mutex_lock (&tq.fooLock);
- while (tq.foo.size () == 0)
- pthread_cond_wait (&tq.fooCond2, &tq.fooLock);
- if (tq.foo.front () != num++)
- abort ();
- tq.foo.pop_front ();
- pthread_cond_signal (&tq.fooCond1);
- pthread_mutex_unlock (&tq.fooLock);
- }
- return 0;
-}
-
-int
-main (int argc, char** argv)
-{
- pthread_t prod[thread_pairs];
- pthread_t cons[thread_pairs];
-
- task_queue* tq[thread_pairs];
-
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (thread_pairs * 2);
-#endif
-
- for (int j = 0; j < thread_cycles; j++)
- {
- for (int i = 0; i < thread_pairs; i++)
- {
- tq[i] = new task_queue;
- pthread_create (&prod[i], NULL, produce, static_cast<void*> (tq[i]));
- pthread_create (&cons[i], NULL, consume, static_cast<void*> (tq[i]));
- }
-
- for (int i = 0; i < thread_pairs; i++)
- {
- pthread_join (prod[i], NULL);
- pthread_join (cons[i], NULL);
-#if defined(__FreeBSD__)
- // These lines are not required by POSIX since a successful
- // join is suppose to detach as well...
- pthread_detach (prod[i]);
- pthread_detach (cons[i]);
- // ...but they are according to the FreeBSD 4.X code base
- // or else you get a memory leak.
-#endif
- delete tq[i];
- }
- }
-
- return 0;
-}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc
deleted file mode 100644
index 315393cf7ae..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread2.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-// Adpated from libstdc++/5347 submitted by markus.breuer@materna.de
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-#include <fstream>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-
-const int max_thread_count = 2;
-const int max_loop_count = 1000000;
-
-void*
-thread_main (void *)
-{
- for (int i = 0; i < max_loop_count; i++)
- {
- std::ofstream* pos1 = new std::ofstream;
- delete pos1;
- }
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t tid[max_thread_count];
-
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (max_thread_count);
-#endif
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_create (&tid[i], NULL, thread_main, 0);
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_join (tid[i], NULL);
-
- return 0;
-}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc
deleted file mode 100644
index 4edb107b231..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread3.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-// Adpated from libstdc++/5347 submitted by markus.breuer@materna.de
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-#include <sstream>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-
-const int max_thread_count = 2;
-const int max_loop_count = 1000000;
-
-void*
-thread_main (void *)
-{
- for (int i = 0; i < max_loop_count; i++)
- std::ostringstream oss;
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t tid[max_thread_count];
-
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (max_thread_count);
-#endif
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_create (&tid[i], NULL, thread_main, 0);
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_join (tid[i], NULL);
-
- return 0;
-}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc
deleted file mode 100644
index f8cd29d3f0b..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread4.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-// Adapted from http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
-// which was adapted from pthread1.cc by Mike Lu <MLu@dynamicsoft.com>
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-#include <string>
-#include <list>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-using namespace std;
-
-static list<string> foo;
-static pthread_mutex_t fooLock = PTHREAD_MUTEX_INITIALIZER;
-static unsigned max_size = 10;
-#if defined(__CYGWIN__)
-static int iters = 10000;
-#else
-static int iters = 1000000;
-#endif
-
-void*
-produce (void*)
-{
- for (int num = 0; num < iters; )
- {
- string str ("test string");
-
- pthread_mutex_lock (&fooLock);
- if (foo.size () < max_size)
- {
- foo.push_back (str);
- num++;
- }
- pthread_mutex_unlock (&fooLock);
- }
-
- return 0;
-}
-
-void*
-consume (void*)
-{
- for (int num = 0; num < iters; )
- {
- pthread_mutex_lock (&fooLock);
- while (foo.size () > 0)
- {
- string str = foo.back ();
- foo.pop_back ();
- num++;
- }
- pthread_mutex_unlock (&fooLock);
- }
-
- return 0;
-}
-
-int
-main (void)
-{
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (2);
-#endif
-
- pthread_t prod;
- pthread_create (&prod, NULL, produce, NULL);
- pthread_t cons;
- pthread_create (&cons, NULL, consume, NULL);
-
- pthread_join (prod, NULL);
- pthread_join (cons, NULL);
-
- return 0;
-}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc
deleted file mode 100644
index 6de9f41a533..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-// Adpated from libstdc++/5464 submitted by jjessel@amadeus.net
-// Jean-Francois JESSEL (Amadeus SAS Development)
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-#include <vector>
-#include <list>
-#include <string>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-using namespace std;
-
-#define NTHREADS 8
-#define LOOPS 20
-
-struct tt_t
-{
- char buf[100];
- int i;
-};
-
-void*
-thread_function (void* arg)
-{
- int myid = *(int*) arg;
- for (int i = 0; i < LOOPS; i++)
- {
- vector<tt_t> myvect1;
-
- for (int j = 0; j < 2000; j++)
- {
- vector<tt_t> myvect2;
- tt_t v;
- v.i = j;
- myvect1.push_back (v);
- myvect2.push_back (v);
- list<std::string *> mylist;
- std::string string_array[4];
- string_array[0] = "toto";
- string_array[1] = "titi";
- string_array[2] = "tata";
- string_array[3] = "tutu";
- for (int k = 0; k < 4; k++)
- {
- if (mylist.size ())
- {
- list<std::string *>::iterator aIt;
- for (aIt = mylist.begin (); aIt != mylist.end (); ++aIt)
- {
- if ((*aIt) == &(string_array[k]))
- abort ();
- }
- }
- mylist.push_back (&(string_array[k]));
- }
- }
- }
-
- return arg;
-}
-
-int
-main (int argc, char *argv[])
-{
- int worker;
- pthread_t threads[NTHREADS];
- int ids[NTHREADS];
- void* status;
-
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (NTHREADS);
-#endif
-
- pthread_attr_t tattr;
- int ret = pthread_attr_init (&tattr);
- ret = pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM);
-
- for (worker = 0; worker < NTHREADS; worker++)
- {
- ids[worker] = worker;
- if (pthread_create(&threads[worker], &tattr,
- thread_function, &ids[worker]))
- abort ();
- }
-
- for (worker = 0; worker < NTHREADS; worker++)
- {
- if (pthread_join(threads[worker], static_cast<void **>(&status)))
- abort ();
-
- if (*((int *)status) != worker)
- abort ();
- }
-
- return (0);
-}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc
deleted file mode 100644
index 9f5a76216b1..00000000000
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
-// Adpated from libstdc++/5444 submitted by markus.breuer@materna.de
-//
-// Copyright (C) 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// { dg-do run { target *-*-freebsd* *-*-linux* *-*-solaris* *-*-cygwin } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-linux* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
-
-#include <string>
-#include <map>
-#include <vector>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
-#if __GTHREADS
-
-const int max_thread_count = 8;
-const int loops = 100000;
-
-const char* my_default = "Hallo Welt!";
-
-const int upper_limit = 2500;
-const int lower_limit = 1000;
-
-typedef char charT;
-
-typedef std::string String;
-
-typedef String MyType;
-
-void*
-thread_main (void*)
-{
- typedef std::map<unsigned int,MyType> Map;
- typedef Map::value_type Value_Pair;
- Map myMap;
-
- for (int loop = 0; loop < loops; loop++)
- {
- String& str = myMap[loop];
- str.append (my_default);
- myMap.insert (Value_Pair (loop, str));
-
- if (myMap.size () > upper_limit)
- {
- while (myMap.size () > lower_limit)
- {
- Map::iterator it = myMap.begin ();
- myMap.erase (it);
- }
- }
- }
-
- return 0;
-}
-
-int
-main (void)
-{
- pthread_t tid[max_thread_count];
-
-#if defined(__sun) && defined(__svr4__)
- pthread_setconcurrency (max_thread_count);
-#endif
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_create (&tid[i], NULL, thread_main, 0);
-
- for (int i = 0; i < max_thread_count; i++)
- pthread_join (tid[i], NULL);
-
- return 0;
-}
-#else
-int main (void) {}
-#endif