diff options
328 files changed, 993 insertions, 13549 deletions
diff --git a/ChangeLog b/ChangeLog index b6922b18b52..72f713b40fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * MAINTAINERS (OS Port Maintainers): Remove osf. + * configure.ac (enable_libgomp): Remove *-*-osf*. + (with_stabs): Remove alpha*-*-osf*. + * configure: Regenerate. + 2012-03-05 Tristan Gingold <gingold@adacore.com> * configure.ac: Enable gdb and readline for ia64*-*-*vms*. diff --git a/MAINTAINERS b/MAINTAINERS index d65c854d848..1d64cc718ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -122,7 +122,7 @@ freebsd Loren J. Rittle ljrittle@acm.org GNU/Hurd Thomas Schwinge thomas@schwinge.name hpux John David Anglin dave.anglin@nrc-cnrc.gc.ca hpux Steve Ellcey sje@cup.hp.com -irix, osf, solaris Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE +irix, solaris Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE netbsd Jason Thorpe thorpej@netbsd.org netbsd Krister Walfridsson krister.walfridsson@gmail.com sh-linux-gnu Kaz Kojima kkojima@gcc.gnu.org diff --git a/config/ChangeLog b/config/ChangeLog index e2bf48d9ca5..bfabcc0fb3c 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove + alpha*-dec-osf*. + 2012-01-22 Douglas B Rupp <rupp@gnat.com> * config/mh-interix: Remove as unneeded. diff --git a/config/weakref.m4 b/config/weakref.m4 index 39b63d39b8a..ecb85672805 100644 --- a/config/weakref.m4 +++ b/config/weakref.m4 @@ -38,7 +38,6 @@ int main () } ]])], ac_cv_have_elf_style_weakref=yes, ac_cv_have_elf_style_weakref=no, [ case "${host}" in - alpha*-dec-osf*) ac_cv_have_elf_style_weakref=no ;; *-apple-darwin[[89]]*) ac_cv_have_elf_style_weakref=no ;; *) ac_cv_have_elf_style_weakref=yes;; esac])CFLAGS="$weakref_m4_saved_CFLAGS"]) diff --git a/configure b/configure index 267e137858b..4fd82679aa8 100755 --- a/configure +++ b/configure @@ -3054,7 +3054,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) ;; - *-*-solaris2* | *-*-irix6* | *-*-osf* | *-*-hpux11*) + *-*-solaris2* | *-*-irix6* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -6878,7 +6878,7 @@ if test x${with_stabs} = x ; then case "${target}" in mips*-*-irix[56]*) ;; - mips*-*-* | alpha*-*-osf*) + mips*-*-*) with_stabs=yes; extra_host_args="${extra_host_args} --with-stabs" ;; diff --git a/configure.ac b/configure.ac index 9deab72c7f3..f6ab734a18e 100644 --- a/configure.ac +++ b/configure.ac @@ -483,7 +483,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) ;; - *-*-solaris2* | *-*-irix6* | *-*-osf* | *-*-hpux11*) + *-*-solaris2* | *-*-irix6* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -2336,7 +2336,7 @@ if test x${with_stabs} = x ; then case "${target}" in mips*-*-irix[[56]]*) ;; - mips*-*-* | alpha*-*-osf*) + mips*-*-*) with_stabs=yes; extra_host_args="${extra_host_args} --with-stabs" ;; diff --git a/contrib/ChangeLog b/contrib/ChangeLog index aac4f9ba7b9..2ad64573ca8 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config-list.mk (LIST): Remove alpha-dec-osf5.1. + 2012-03-02 Diego Novillo <dnovillo@google.com> * testsuite-management/validate_failures.py (class TestResult): Fix diff --git a/contrib/config-list.mk b/contrib/config-list.mk index 108f84d85cf..a198836d7fc 100644 --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -12,8 +12,7 @@ TEST=all-gcc # # v850e1-elf is rejected by config.sub LIST = alpha-linux-gnu alpha-freebsd6 alpha-netbsd alpha-openbsd \ - alpha-dec-osf5.1OPT-enable-obsolete alpha64-dec-vms alpha-dec-vms \ - am33_2.0-linux \ + alpha64-dec-vms alpha-dec-vms am33_2.0-linux \ arm-wrs-vxworks arm-freebsd6 arm-netbsdelf arm-linux \ arm-linux-androideabi arm-uclinux_eabi arm-ecos-elf arm-eabi \ arm-symbianelf arm-rtems arm-elf arm-wince-pe avr-rtems avr-elf \ diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index d37b5efa100..14dd8a8175b 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,22 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * inclhack.def (alpha___extern_prefix): Remove. + (alpha___extern_prefix_standards): Remove. + (alpha___extern_prefix_sys_stat): Remove. + (alpha_bad_lval): Remove. + (alpha_pthread): Remove. + (alpha_pthread_gcc): Remove. + (alpha_pthread_init): Remove. + * fixincl.x: Regenerate. + * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. + [ALPHA_PTHREAD_GCC_CHECK]: Remove. + [ALPHA_PTHREAD_INIT_CHECK]: Remove. + * tests/base/standards.h: Remove. + * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: + Remove. + * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. + [ALPHA_BAD_LVAL_CHECK]: Remove. + 2012-03-12 Tristan Gingold <gingold@adacore.com> * inclhack.def (vms_use_quoted_include,vms_add_missing_braces) diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index eca464678e4..57bc488ea56 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed March 12, 2012 at 10:19:44 AM by AutoGen 5.11.1 + * It has been AutoGen-ed Monday March 12, 2012 at 04:25:19 PM MET * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Mar 12 10:19:44 CET 2012 +/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Mar 12 16:25:19 MET 2012 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 230 fixup descriptions. + * This file contains 223 fixup descriptions. * * See README for more information. * @@ -1027,118 +1027,6 @@ static const char* apzAlpha___AssertPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha___Extern_Prefix fix - */ -tSCC zAlpha___Extern_PrefixName[] = - "alpha___extern_prefix"; - -/* - * File name selection pattern - */ -#define zAlpha___Extern_PrefixList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_PrefixMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_PrefixSelect0[] = - "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n\ -(#[ \t]*pragma[ \t]*extern_prefix.*)"; - -#define ALPHA___EXTERN_PREFIX_TEST_CT 1 -static tTestDesc aAlpha___Extern_PrefixTests[] = { - { TT_EGREP, zAlpha___Extern_PrefixSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix - */ -static const char* apzAlpha___Extern_PrefixPatch[] = { - "format", - "%1 (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX))\n\ -%3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha___Extern_Prefix_Standards fix - */ -tSCC zAlpha___Extern_Prefix_StandardsName[] = - "alpha___extern_prefix_standards"; - -/* - * File name selection pattern - */ -tSCC zAlpha___Extern_Prefix_StandardsList[] = - "standards.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_Prefix_StandardsMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_Prefix_StandardsSelect0[] = - ".*!defined\\(_LIBC_POLLUTION_H_\\) && !defined\\(__DECC\\)"; - -#define ALPHA___EXTERN_PREFIX_STANDARDS_TEST_CT 1 -static tTestDesc aAlpha___Extern_Prefix_StandardsTests[] = { - { TT_EGREP, zAlpha___Extern_Prefix_StandardsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix_Standards - */ -static const char* apzAlpha___Extern_Prefix_StandardsPatch[] = { - "format", - "%0 && !defined(__PRAGMA_EXTERN_PREFIX)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha___Extern_Prefix_Sys_Stat fix - */ -tSCC zAlpha___Extern_Prefix_Sys_StatName[] = - "alpha___extern_prefix_sys_stat"; - -/* - * File name selection pattern - */ -tSCC zAlpha___Extern_Prefix_Sys_StatList[] = - "sys/stat.h\0sys/mount.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_Prefix_Sys_StatMachs[] = { - "alpha*-dec-osf5*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_Prefix_Sys_StatSelect0[] = - "#[ \t]*if[ \t]*defined\\(__DECC\\)"; - -#define ALPHA___EXTERN_PREFIX_SYS_STAT_TEST_CT 1 -static tTestDesc aAlpha___Extern_Prefix_Sys_StatTests[] = { - { TT_EGREP, zAlpha___Extern_Prefix_Sys_StatSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix_Sys_Stat - */ -static const char* apzAlpha___Extern_Prefix_Sys_StatPatch[] = { - "format", - "%0 || defined(__PRAGMA_EXTERN_PREFIX)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Assert fix */ tSCC zAlpha_AssertName[] = @@ -1174,41 +1062,6 @@ static const char* apzAlpha_AssertPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha_Bad_Lval fix - */ -tSCC zAlpha_Bad_LvalName[] = - "alpha_bad_lval"; - -/* - * File name selection pattern - */ -#define zAlpha_Bad_LvalList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Bad_LvalMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Bad_LvalSelect0[] = - "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix"; - -#define ALPHA_BAD_LVAL_TEST_CT 1 -static tTestDesc aAlpha_Bad_LvalTests[] = { - { TT_EGREP, zAlpha_Bad_LvalSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Bad_Lval - */ -static const char* apzAlpha_Bad_LvalPatch[] = { sed_cmd_z, - "-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Getopt fix */ tSCC zAlpha_GetoptName[] = @@ -1314,126 +1167,6 @@ static const char* apzAlpha_ParensPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha_Pthread fix - */ -tSCC zAlpha_PthreadName[] = - "alpha_pthread"; - -/* - * File name selection pattern - */ -tSCC zAlpha_PthreadList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_PthreadMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_PthreadSelect0[] = - "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)|def _PTHREAD_ENV_DECC)(.*))\n\ -(#[ \t]*define _PTHREAD_USE_PTDNAM_)"; - -#define ALPHA_PTHREAD_TEST_CT 1 -static tTestDesc aAlpha_PthreadTests[] = { - { TT_EGREP, zAlpha_PthreadSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread - */ -static const char* apzAlpha_PthreadPatch[] = { - "format", - "%2 defined (_PTHREAD_ENV_DECC)%4 || defined (__PRAGMA_EXTERN_PREFIX)\n\ -%5", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Pthread_Gcc fix - */ -tSCC zAlpha_Pthread_GccName[] = - "alpha_pthread_gcc"; - -/* - * File name selection pattern - */ -tSCC zAlpha_Pthread_GccList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Pthread_GccMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Pthread_GccSelect0[] = - "#else\n\ -# error <pthread.h>: unrecognized compiler."; - -#define ALPHA_PTHREAD_GCC_TEST_CT 1 -static tTestDesc aAlpha_Pthread_GccTests[] = { - { TT_EGREP, zAlpha_Pthread_GccSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread_Gcc - */ -static const char* apzAlpha_Pthread_GccPatch[] = { - "format", - "#elif defined (__GNUC__)\n\ -# define _PTHREAD_ENV_GCC\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Pthread_Init fix - */ -tSCC zAlpha_Pthread_InitName[] = - "alpha_pthread_init"; - -/* - * File name selection pattern - */ -tSCC zAlpha_Pthread_InitList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Pthread_InitMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Pthread_InitSelect0[] = - " \\* @\\(#\\).RCSfile: pthread\\.h,v \\$ .Revision: 1\\.1\\.33\\.21 \\$ \\(DEC\\) .Date: 2000/08/15 15:30:13 \\$"; - -#define ALPHA_PTHREAD_INIT_TEST_CT 1 -static tTestDesc aAlpha_Pthread_InitTests[] = { - { TT_EGREP, zAlpha_Pthread_InitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread_Init - */ -static const char* apzAlpha_Pthread_InitPatch[] = { sed_cmd_z, - "-e", "s@MVALID\\(.*\\)A}@MVALID\\1A, 0, 0, 0, 0, 0, 0 }@\n\ -s@MVALID\\(.*\\)_}@MVALID\\1_, 0, 0, 0, 0 }@\n\ -s@CVALID\\(.*\\)A}@CVALID\\1A, 0, 0, 0, 0 }@\n\ -s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n\ -s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n\ -s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Sbrk fix */ tSCC zAlpha_SbrkName[] = @@ -9335,9 +9068,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 272 +#define REGEX_COUNT 265 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 230 +#define FIX_COUNT 223 /* * Enumerate the fixes @@ -9365,17 +9098,10 @@ typedef enum { AIX_SYSWAIT_2_FIXIDX, AIX_VOLATILE_FIXIDX, ALPHA___ASSERT_FIXIDX, - ALPHA___EXTERN_PREFIX_FIXIDX, - ALPHA___EXTERN_PREFIX_STANDARDS_FIXIDX, - ALPHA___EXTERN_PREFIX_SYS_STAT_FIXIDX, ALPHA_ASSERT_FIXIDX, - ALPHA_BAD_LVAL_FIXIDX, ALPHA_GETOPT_FIXIDX, ALPHA_IF_SEMICOLON_FIXIDX, ALPHA_PARENS_FIXIDX, - ALPHA_PTHREAD_FIXIDX, - ALPHA_PTHREAD_GCC_FIXIDX, - ALPHA_PTHREAD_INIT_FIXIDX, ALPHA_SBRK_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX, AVOID_BOOL_TYPE_FIXIDX, @@ -9686,31 +9412,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA___ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha___AssertTests, apzAlpha___AssertPatch, 0 }, - { zAlpha___Extern_PrefixName, zAlpha___Extern_PrefixList, - apzAlpha___Extern_PrefixMachs, - ALPHA___EXTERN_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_PrefixTests, apzAlpha___Extern_PrefixPatch, 0 }, - - { zAlpha___Extern_Prefix_StandardsName, zAlpha___Extern_Prefix_StandardsList, - apzAlpha___Extern_Prefix_StandardsMachs, - ALPHA___EXTERN_PREFIX_STANDARDS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_Prefix_StandardsTests, apzAlpha___Extern_Prefix_StandardsPatch, 0 }, - - { zAlpha___Extern_Prefix_Sys_StatName, zAlpha___Extern_Prefix_Sys_StatList, - apzAlpha___Extern_Prefix_Sys_StatMachs, - ALPHA___EXTERN_PREFIX_SYS_STAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_Prefix_Sys_StatTests, apzAlpha___Extern_Prefix_Sys_StatPatch, 0 }, - { zAlpha_AssertName, zAlpha_AssertList, apzAlpha_AssertMachs, ALPHA_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_AssertTests, apzAlpha_AssertPatch, 0 }, - { zAlpha_Bad_LvalName, zAlpha_Bad_LvalList, - apzAlpha_Bad_LvalMachs, - ALPHA_BAD_LVAL_TEST_CT, FD_MACH_ONLY, - aAlpha_Bad_LvalTests, apzAlpha_Bad_LvalPatch, 0 }, - { zAlpha_GetoptName, zAlpha_GetoptList, apzAlpha_GetoptMachs, ALPHA_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9726,21 +9432,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA_PARENS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_ParensTests, apzAlpha_ParensPatch, 0 }, - { zAlpha_PthreadName, zAlpha_PthreadList, - apzAlpha_PthreadMachs, - ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha_PthreadTests, apzAlpha_PthreadPatch, 0 }, - - { zAlpha_Pthread_GccName, zAlpha_Pthread_GccList, - apzAlpha_Pthread_GccMachs, - ALPHA_PTHREAD_GCC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha_Pthread_GccTests, apzAlpha_Pthread_GccPatch, 0 }, - - { zAlpha_Pthread_InitName, zAlpha_Pthread_InitList, - apzAlpha_Pthread_InitMachs, - ALPHA_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY, - aAlpha_Pthread_InitTests, apzAlpha_Pthread_InitPatch, 0 }, - { zAlpha_SbrkName, zAlpha_SbrkList, apzAlpha_SbrkMachs, ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 1a5cd8d234e..40b8d0fe5dd 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -586,63 +586,6 @@ fix = { /* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V4/5 headers. - */ -fix = { - hackname = alpha___extern_prefix; - select = "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n" - "(#[ \t]*pragma[ \t]*extern_prefix.*)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%1 (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX))\n%3"; - - test_text = "#ifdef __DECC\n" - "#pragma extern_prefix \"_P\"\n" - "# if defined(__DECC)\n" - "# pragma extern_prefix \"_E\"\n" - "# if !defined(_LIBC_POLLUTION_H_) && defined(__DECC)\n" - "# pragma extern_prefix \"\""; -}; - - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V4/5 <standards.h>. - */ -fix = { - hackname = alpha___extern_prefix_standards; - files = standards.h; - select = ".*!defined\\(_LIBC_POLLUTION_H_\\) && !defined\\(__DECC\\)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%0 && !defined(__PRAGMA_EXTERN_PREFIX)"; - - test_text = "#if (_ISO_C_SOURCE>=19990L) " - "&& !defined(_LIBC_POLLUTION_H_) && !defined(__DECC)"; -}; - - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V5 <sys/mount.h> and - * <sys/stat.h>. The tests for __DECC are special in various ways, so - * alpha__extern_prefix cannot be used. - */ -fix = { - hackname = alpha___extern_prefix_sys_stat; - files = sys/stat.h; - files = sys/mount.h; - select = "#[ \t]*if[ \t]*defined\\(__DECC\\)"; - - mach = "alpha*-dec-osf5*"; - c_fix = format; - c_fix_arg = "%0 || defined(__PRAGMA_EXTERN_PREFIX)"; - - test_text = "# if defined(__DECC)"; -}; - - -/* * Fix assert macro in assert.h on Alpha OSF/1. * The superfluous int cast breaks C++. */ @@ -658,37 +601,6 @@ fix = { /* - * Fix #defines under Alpha OSF/1: - * The following files contain '#pragma extern_prefix "_FOO"' followed by - * a '#define something(x,y,z) _FOOsomething(x,y,z)'. The intent of these - * statements is to reduce namespace pollution. While these macros work - * properly in most cases, they don't allow you to take a pointer to the - * "something" being modified. To get around this limitation, change these - * statements to be of the form '#define something _FOOsomething'. - * - * sed ain't egrep, lesson 2463: sed can use self-referential - * regular expressions. In the substitute expression below, - * "\\1" and "\\2" refer to subexpressions found earlier in the - * same match. So, we continue to use sed. "extern_prefix" will - * be a rare match anyway... - */ -fix = { - hackname = alpha_bad_lval; - - select = "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix"; - mach = "alpha*-dec-osf*"; - - sed = - "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*" - "\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/"; - - test_text = '#pragma extern_prefix "_FOO"'"\n" - "#define something(x,y,z) _FOOsomething(x,y,z)\n" - "#define mumble _FOOmumble"; -}; - - -/* * Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX. */ fix = { @@ -729,99 +641,6 @@ fix = { /* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX <pthread.h>. - */ -fix = { - hackname = alpha_pthread; - files = pthread.h; - select = "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)" - "|def _PTHREAD_ENV_DECC)(.*))\n" - "(#[ \t]*define _PTHREAD_USE_PTDNAM_)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%2 defined (_PTHREAD_ENV_DECC)%4 " - "|| defined (__PRAGMA_EXTERN_PREFIX)\n%5"; - - test_text = "# if defined (_PTHREAD_ENV_DECC) " - "|| defined (_PTHREAD_ENV_EPCC)\n" - "# define _PTHREAD_USE_PTDNAM_\n" - "# endif\n" - "# ifdef _PTHREAD_ENV_DECC\n" - "# define _PTHREAD_USE_PTDNAM_\n" - "# endif"; -}; - - -/* - * Recognize GCC in Tru64 UNIX V5.1B <pthread.h>. - */ -fix = { - hackname = alpha_pthread_gcc; - files = pthread.h; - select = "#else\n# error <pthread.h>: unrecognized compiler."; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "#elif defined (__GNUC__)\n" - "# define _PTHREAD_ENV_GCC\n" - "%0"; - - test_text = "# define _PTHREAD_ENV_INTELC\n" - "#else\n" - "# error <pthread.h>: unrecognized compiler.\n" - "#endif"; -}; - - -/* - * Compaq Tru64 v5.1 defines all of its PTHREAD_*_INITIALIZER macros - * incorrectly, specifying less fields in the initializers than are - * defined in the corresponding structure types. Use of these macros - * in user code results in spurious warnings. - */ -fix = { - hackname = alpha_pthread_init; - files = pthread.h; - select = ' \* @\(#\).RCSfile: pthread\.h,v \$' - ' .Revision: 1\.1\.33\.21 \$ \(DEC\)' - ' .Date: 2000/08/15 15:30:13 \$'; - mach = "alpha*-dec-osf*"; - sed = "s@MVALID\\(.*\\)A}@MVALID\\1A, 0, 0, 0, 0, 0, 0 }@\n" - "s@MVALID\\(.*\\)_}@MVALID\\1_, 0, 0, 0, 0 }@\n" - "s@CVALID\\(.*\\)A}@CVALID\\1A, 0, 0, 0, 0 }@\n" - "s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n" - "s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n" - "s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n"; - test_text = <<- _EOText_ - /* - * @(#)_RCSfile: pthread.h,v $ _Revision: 1.1.33.21 $ (DEC) _Date: 2000/08/15 15:30:13 $ - */ - #ifndef _PTHREAD_NOMETER_STATIC - # define PTHREAD_MUTEX_INITIALIZER \ - {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA} - # define PTHREAD_COND_INITIALIZER \ - {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA} - # define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \ - {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_} - # define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \ - {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_} - #else - # define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA} - # define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \ - {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_} - # define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \ - {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_} - #endif - - #define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA} - #define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \ - {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_} - _EOText_; -}; - - -/* * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 * And OpenBSD. */ diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h index 24a215fa47f..054fe508d1d 100644 --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -29,46 +29,6 @@ #endif /* AIX_PTHREAD_CHECK */ -#if defined( ALPHA_PTHREAD_CHECK ) -# if defined (_PTHREAD_ENV_DECC) || defined (_PTHREAD_ENV_EPCC) || defined (__PRAGMA_EXTERN_PREFIX) -# define _PTHREAD_USE_PTDNAM_ -# endif -# if defined (_PTHREAD_ENV_DECC) || defined (__PRAGMA_EXTERN_PREFIX) -# define _PTHREAD_USE_PTDNAM_ -# endif -#endif /* ALPHA_PTHREAD_CHECK */ - - -#if defined( ALPHA_PTHREAD_GCC_CHECK ) -# define _PTHREAD_ENV_INTELC -#elif defined (__GNUC__) -# define _PTHREAD_ENV_GCC -#else -# error <pthread.h>: unrecognized compiler. -#endif -#endif /* ALPHA_PTHREAD_GCC_CHECK */ - - -#if defined( ALPHA_PTHREAD_INIT_CHECK ) -/* - * @(#)_RCSfile: pthread.h,v $ _Revision: 1.1.33.21 $ (DEC) _Date: 2000/08/15 15:30:13 $ - */ -#ifndef _PTHREAD_NOMETER_STATIC -# define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 } -# define PTHREAD_COND_INITIALIZER {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, 0, 0, 0, 0 } -# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } -# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } -#else -# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 } -# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } -# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } -#endif - -#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_, 0, 0, 0, 0, 0, 0, 0 } -#endif /* ALPHA_PTHREAD_INIT_CHECK */ - - #if defined( GLIBC_MUTEX_INIT_CHECK ) #define PTHREAD_MUTEX_INITIALIZER \ { { 0, 0, 0, 0, 0, 0 } } diff --git a/fixincludes/tests/base/standards.h b/fixincludes/tests/base/standards.h deleted file mode 100644 index fccf8063fa3..00000000000 --- a/fixincludes/tests/base/standards.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/standards.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA___EXTERN_PREFIX_STANDARDS_CHECK ) -#if (_ISO_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_) && !defined(__DECC) && !defined(__PRAGMA_EXTERN_PREFIX) -#endif /* ALPHA___EXTERN_PREFIX_STANDARDS_CHECK */ diff --git a/fixincludes/tests/base/sys/stat.h b/fixincludes/tests/base/sys/stat.h index 5c254ea94c5..240c308fdbc 100644 --- a/fixincludes/tests/base/sys/stat.h +++ b/fixincludes/tests/base/sys/stat.h @@ -9,11 +9,6 @@ -#if defined( ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK ) -# if defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX) -#endif /* ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK */ - - #if defined( GLIBC_C99_INLINE_2_CHECK ) #ifdef __GNUC_GNU_INLINE__ extern diff --git a/fixincludes/tests/base/testing.h b/fixincludes/tests/base/testing.h index c15a151280f..f1ffeffa41a 100644 --- a/fixincludes/tests/base/testing.h +++ b/fixincludes/tests/base/testing.h @@ -9,23 +9,6 @@ -#if defined( ALPHA___EXTERN_PREFIX_CHECK ) -#if (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -#pragma extern_prefix "_P" -# if (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -# pragma extern_prefix "_E" -# if !defined(_LIBC_POLLUTION_H_) && (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -# pragma extern_prefix "" -#endif /* ALPHA___EXTERN_PREFIX_CHECK */ - - -#if defined( ALPHA_BAD_LVAL_CHECK ) -#pragma extern_prefix "_FOO" -#define something _FOOsomething -#define mumble _FOOmumble -#endif /* ALPHA_BAD_LVAL_CHECK */ - - #if defined( AVOID_WCHAR_T_TYPE_CHECK ) #ifndef __cplusplus typedef unsigned short wchar_t ; diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c2ccdbf1bc9..03e8f545789 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,41 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config.gcc (alpha*-dec-osf5.1*): Remove. + * config.host (alpha*-dec-osf*): Remove. + * configure.ac (*-*-osf*): Remove. + (alpha*-dec-osf*): Remove. + * configure: Regenerate. + + * config/alpha/host-osf.c, config/alpha/osf5.h, + config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: + Remove. + + * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. + * config/alpha/alpha.c (struct machine_function): Update comment. + (alpha_start_function): Remove Tru64 UNIX as handling for + max_frame_size. + * config/alpha/alpha.md ("exception_receiver"): Remove + TARGET_LD_BUGGY_LDGP. + ("*exception_receiver_2"): Likewise. + * except.c (finish_eh_generation): Remove Tru64 reference. + * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. + * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. + * target.def (handle_pragma_extern_prefix): Remove. + + * Makefile.in (mips-tfile.o-warn): Remove. + (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. + (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. + * mips-tdump.c, mips-tfile.c: Remove. + + * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma + extern_prefix. + * doc/install.texi (Binaries): Remove Tru64 UNIX reference. + (Specific, alpha*-dec-osf5.1): Note removal. + * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): + Remove. + * doc/tm.texi: Regenerate. + * doc/trouble.texi (Cross-Compiler Problems): Remove. + 2012-03-12 Richard Guenther <rguenther@suse.de> * config/arm/arm.c (neon_dereference_pointer): Do not call diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b5190991180..1bed38a1b8b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -195,8 +195,6 @@ GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) # flex output may yield harmless "no previous prototype" warnings build/gengtype-lex.o-warn = -Wno-error gengtype-lex.o-warn = -Wno-error -# mips-tfile.c contains -Wcast-qual warnings. -mips-tfile.o-warn = -Wno-error expmed.o-warn = -Wno-error # All warnings have to be shut off in stage1 if the compiler used then @@ -1467,8 +1465,7 @@ ALL_HOST_FRONTEND_OBJS = $(C_OBJS) \ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \ $(OBJS-libcommon-target) @TREEBROWSER@ main.o gccspec.o cppspec.o \ - $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) mips-tfile.o mips-tdump.o \ - $(GCOV_OBJS) $(GCOV_DUMP_OBJS) + $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) # This lists all host object files, whether they are included in this # compilation or not. @@ -3450,22 +3447,6 @@ $(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \ $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(OPTS_H) $(TM_H) $(TM_P_H) $(MACHMODE_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ $< $(OUTPUT_OPTION) - -# Build auxiliary files that support ecoff format. -mips-tfile: mips-tfile.o $(LIBDEPS) - $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ - mips-tfile.o $(LIBS) - -mips-tfile.o : mips-tfile.c $(CONFIG_H) $(SYSTEM_H) \ - version.h $(srcdir)/../include/getopt.h $(GSTAB_H) intl.h - -mips-tdump: mips-tdump.o $(LIBDEPS) - $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ - mips-tdump.o $(LIBS) - -mips-tdump.o : mips-tdump.c $(CONFIG_H) $(SYSTEM_H) \ - version.h $(srcdir)/../include/getopt.h stab.def - # # Generate header and source files from the machine description, # and compile them. diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3989168aaa7..2593ef29de8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,31 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. + * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, + s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, + s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, + system-tru64.ads: Remove. + + * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: + Remove. + [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. + * env.c [__alpha__ && __osf__]: Remove. + * gsocket.h (_OSF_SOURCE): Remove. + (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. + * init.c [__alpha__ && __osf__]: Remove. + * link.c [__osf__]: Remove. + * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. + [__osf__ && !_SS_MAXSIZE]: Remove. + * sysdep.c [__osf__]: Remove. + * terminals.c [__alpha__ && __osf__]: Remove. + [OSF1]: Remove. + + * g-traceb.ads: Remove Tru64 reference. + * g-trasym.ads: Likewise. + * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. + (Summary of Run-Time Configurations): Likewise. + * memtrack.adb: Likewise. + 2012-03-12 Tristan Gingold <gingold@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64 diff --git a/gcc/ada/a-intnam-tru64.ads b/gcc/ada/a-intnam-tru64.ads deleted file mode 100644 index 3ea1a4afd7c..00000000000 --- a/gcc/ada/a-intnam-tru64.ads +++ /dev/null @@ -1,151 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- A D A . I N T E R R U P T S . N A M E S -- --- -- --- S p e c -- --- -- --- Copyright (C) 1991-2011, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the DEC Unix 4.0 version of this package - --- The following signals are reserved by the run time: - --- SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGTRAP, SIGINT, SIGALRM, --- SIGSTOP, SIGKILL - --- The pragma Unreserve_All_Interrupts affects the following signal(s): - --- SIGINT: made available for Ada handler - -with System.OS_Interface; - -package Ada.Interrupts.Names is - - -- All identifiers in this unit are implementation defined - - pragma Implementation_Defined; - - -- Beware that the mapping of names to signals may be many-to-one. There - -- may be aliases. Also, for all signal names that are not supported on the - -- current system the value of the corresponding constant will be zero. - - SIGHUP : constant Interrupt_ID := - System.OS_Interface.SIGHUP; -- hangup - - SIGINT : constant Interrupt_ID := - System.OS_Interface.SIGINT; -- interrupt (rubout) - - SIGQUIT : constant Interrupt_ID := - System.OS_Interface.SIGQUIT; -- quit (ASCD FS) - - SIGILL : constant Interrupt_ID := - System.OS_Interface.SIGILL; -- illegal instruction (not reset) - - SIGTRAP : constant Interrupt_ID := - System.OS_Interface.SIGTRAP; -- trace trap (not reset) - - SIGIOT : constant Interrupt_ID := - System.OS_Interface.SIGIOT; -- IOT instruction - - SIGABRT : constant Interrupt_ID := -- used by abort, - System.OS_Interface.SIGABRT; -- replace SIGIOT in the future - - SIGEMT : constant Interrupt_ID := - System.OS_Interface.SIGEMT; -- EMT instruction - - SIGFPE : constant Interrupt_ID := - System.OS_Interface.SIGFPE; -- floating point exception - - SIGKILL : constant Interrupt_ID := - System.OS_Interface.SIGKILL; -- kill (cannot be caught or ignored) - - SIGBUS : constant Interrupt_ID := - System.OS_Interface.SIGBUS; -- bus error - - SIGSEGV : constant Interrupt_ID := - System.OS_Interface.SIGSEGV; -- segmentation violation - - SIGSYS : constant Interrupt_ID := - System.OS_Interface.SIGSYS; -- bad argument to system call - - SIGPIPE : constant Interrupt_ID := -- write on a pipe with - System.OS_Interface.SIGPIPE; -- no one to read it - - SIGALRM : constant Interrupt_ID := - System.OS_Interface.SIGALRM; -- alarm clock - - SIGTERM : constant Interrupt_ID := - System.OS_Interface.SIGTERM; -- software termination signal from kill - - SIGUSR1 : constant Interrupt_ID := - System.OS_Interface.SIGUSR1; -- user defined signal 1 - - SIGUSR2 : constant Interrupt_ID := - System.OS_Interface.SIGUSR2; -- user defined signal 2 - - SIGCHLD : constant Interrupt_ID := - System.OS_Interface.SIGCHLD; -- 4.3BSD's/POSIX name for SIGCLD - - SIGWINCH : constant Interrupt_ID := - System.OS_Interface.SIGWINCH; -- window size change - - SIGURG : constant Interrupt_ID := - System.OS_Interface.SIGURG; -- urgent condition on IO channel - - SIGPOLL : constant Interrupt_ID := - System.OS_Interface.SIGPOLL; -- pollable event occurred - - SIGIO : constant Interrupt_ID := -- input/output possible, - System.OS_Interface.SIGIO; -- SIGPOLL alias (Solaris) - - SIGSTOP : constant Interrupt_ID := - System.OS_Interface.SIGSTOP; -- stop (cannot be caught or ignored) - - SIGTSTP : constant Interrupt_ID := - System.OS_Interface.SIGTSTP; -- user stop requested from tty - - SIGCONT : constant Interrupt_ID := - System.OS_Interface.SIGCONT; -- stopped process has been continued - - SIGTTIN : constant Interrupt_ID := - System.OS_Interface.SIGTTIN; -- background tty read attempted - - SIGTTOU : constant Interrupt_ID := - System.OS_Interface.SIGTTOU; -- background tty write attempted - - SIGVTALRM : constant Interrupt_ID := - System.OS_Interface.SIGVTALRM; -- virtual timer expired - - SIGPROF : constant Interrupt_ID := - System.OS_Interface.SIGPROF; -- profiling timer expired - - SIGXCPU : constant Interrupt_ID := - System.OS_Interface.SIGXCPU; -- CPU time limit exceeded - - SIGXFSZ : constant Interrupt_ID := - System.OS_Interface.SIGXFSZ; -- filesize limit exceeded - -end Ada.Interrupts.Names; diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 4c96d56b1ce..8309123ce4e 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2011, Free Software Foundation, Inc. * + * Copyright (C) 1992-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -2467,8 +2467,7 @@ __gnat_number_of_cpus (void) { int cores = 1; -#if defined (linux) || defined (sun) || defined (AIX) \ - || (defined (__alpha__) && defined (_osf_)) || defined (__APPLE__) +#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__) cores = (int) sysconf (_SC_NPROCESSORS_ONLN); #elif (defined (__mips) && defined (__sgi)) @@ -3541,7 +3540,6 @@ _flush_cache() && ! defined (__hpux__) \ && ! defined (__APPLE__) \ && ! defined (_AIX) \ - && ! (defined (__alpha__) && defined (__osf__)) \ && ! defined (VMS) \ && ! defined (__MINGW32__) \ && ! (defined (__mips) && defined (__sgi))) diff --git a/gcc/ada/env.c b/gcc/ada/env.c index 31c878e7795..ac7ee21b384 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2005-2011, Free Software Foundation, Inc. * + * Copyright (C) 2005-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -29,14 +29,6 @@ * * ****************************************************************************/ -/* Tru64 UNIX V4.0F <stdlib.h> declares unsetenv() only if AES_SOURCE (which - is plain broken, this should be _AES_SOURCE instead as everywhere else; - Tru64 UNIX V5.1B declares it only if _BSD. */ -#if defined (__alpha__) && defined (__osf__) -#define AES_SOURCE -#define _BSD -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/gcc/ada/g-traceb.ads b/gcc/ada/g-traceb.ads index 6c4d6b10efc..3397014ff27 100644 --- a/gcc/ada/g-traceb.ads +++ b/gcc/ada/g-traceb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2010, AdaCore -- +-- Copyright (C) 1999-2012, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -64,7 +64,6 @@ -- LynxOS x86 -- Solaris x86 -- Solaris sparc --- Tru64 alpha -- OpenVMS/Alpha -- OpenVMS/ia64 -- VxWorks PowerPC diff --git a/gcc/ada/g-trasym.ads b/gcc/ada/g-trasym.ads index 4b30600adb3..1cc6551d457 100644 --- a/gcc/ada/g-trasym.ads +++ b/gcc/ada/g-trasym.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2011, AdaCore -- +-- Copyright (C) 1999-2012, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,7 +38,6 @@ -- GNU/Linux x86, x86_64, ia64 -- FreeBSD x86, x86_64 -- Solaris sparc and x86 --- Tru64 -- OpenVMS Alpha and ia64 -- Windows diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index eb6e7bcdd45..75d80c518bf 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1454,34 +1454,6 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),) s-interr.adb<s-interr-hwint.adb endif -ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),) - LIBGNAT_TARGET_PAIRS = \ - a-intnam.ads<a-intnam-tru64.ads \ - s-inmaop.adb<s-inmaop-posix.adb \ - s-intman.adb<s-intman-posix.adb \ - s-mastop.adb<s-mastop-tru64.adb \ - s-osinte.adb<s-osinte-tru64.adb \ - s-osinte.ads<s-osinte-tru64.ads \ - s-osprim.adb<s-osprim-unix.adb \ - s-taprop.adb<s-taprop-tru64.adb \ - s-tasinf.ads<s-tasinf-tru64.ads \ - s-taspri.ads<s-taspri-tru64.ads \ - s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ - s-traceb.adb<s-traceb-mastop.adb \ - system.ads<system-tru64.ads \ - $(ATOMICS_TARGET_PAIRS) \ - $(ATOMICS_BUILTINS_TARGET_PAIRS) - - TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb - - EH_MECHANISM=-gcc - GMEM_LIB=gmemlib - MISCLIB = -lexc - THREADSLIB = -lpthread -lmach -lexc -lrt - GNATLIB_SHARED = gnatlib-shared-default - LIBRARY_VERSION := $(LIB_VERSION) -endif - ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),) soext = .exe diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 6885eed89d2..e6f368bcb48 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -3092,7 +3092,7 @@ $ gnatlink ada_unit file1.o file2.o --LINK=./my_script If the @code{zero cost} exception mechanism is used, and the platform doesn't support automatic registration of exception tables (e.g.@: HP-UX, -Tru64 or AIX), the simple approach described above will not work and +or AIX), the simple approach described above will not work and a pre-linking phase using GNAT will be necessary. @end enumerate @@ -22164,11 +22164,6 @@ information about several specific platforms. @item @code{@ @ @ @ }Tasking @tab native VMS threads @item @code{@ @ @ @ }Exceptions @tab ZCX @* -@item @b{alpha-tru64} -@item @code{@ @ }@i{rts-native (default)} -@item @code{@ @ @ @ }Tasking @tab native TRU64 threads -@item @code{@ @ @ @ }Exceptions @tab ZCX -@* @item @code{@ @ }@i{rts-sjlj} @item @code{@ @ @ @ }Tasking @tab native TRU64 threads @item @code{@ @ @ @ }Exceptions @tab SJLJ diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h index a4507fe8804..4dfbee77f08 100644 --- a/gcc/ada/gsocket.h +++ b/gcc/ada/gsocket.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 2004-2011, Free Software Foundation, Inc. * + * Copyright (C) 2004-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -53,11 +53,6 @@ /* For AIX */ #endif -#ifndef _OSF_SOURCE -#define _OSF_SOURCE 1 -/* For Tru64 */ -#endif - /** No system header may be included prior to this point since on some targets ** we need to redefine FD_SETSIZE. **/ @@ -204,7 +199,7 @@ #endif #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \ - defined (__osf__) || defined (_WIN32) || defined (__APPLE__) + defined (_WIN32) || defined (__APPLE__) # define HAVE_THREAD_SAFE_GETxxxBYyyy 1 #elif defined (sgi) || defined (linux) || defined (__GLIBC__) || \ diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 80a02b1734f..87124b6a4ea 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -295,156 +295,6 @@ __gnat_install_handler (void) } /*****************/ -/* Tru64 section */ -/*****************/ - -#elif defined(__alpha__) && defined(__osf__) - -#include <signal.h> -#include <sys/siginfo.h> - -extern char *__gnat_get_code_loc (struct sigcontext *); -extern void __gnat_set_code_loc (struct sigcontext *, char *); -extern size_t __gnat_machine_state_length (void); - -#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE - -void -__gnat_adjust_context_for_raise (int signo, void *ucontext) -{ - struct sigcontext *sigcontext = (struct sigcontext *) ucontext; - - /* The unwinder expects the signal context to contain the address of the - faulting instruction. For SIGFPE, this depends on the trap shadow - situation (see man ieee). We nonetheless always compensate for it, - considering that PC designates the instruction following the one that - trapped. This is not necessarily true but corresponds to what we have - always observed. */ - if (signo == SIGFPE) - sigcontext->sc_pc--; -} - -static void -__gnat_error_handler (int sig, siginfo_t *si, void *ucontext) -{ - struct Exception_Data *exception; - static int recurse = 0; - const char *msg; - - /* Adjusting is required for every fault context, so adjust for this one - now, before we possibly trigger a recursive fault below. */ - __gnat_adjust_context_for_raise (sig, ucontext); - - /* If this was an explicit signal from a "kill", just resignal it. */ - if (SI_FROMUSER (si)) - { - signal (sig, SIG_DFL); - kill (getpid(), sig); - } - - /* Otherwise, treat it as something we handle. */ - switch (sig) - { - case SIGSEGV: - /* If the problem was permissions, this is a constraint error. - Likewise if the failing address isn't maximally aligned or if - we've recursed. - - ??? Using a static variable here isn't task-safe, but it's - much too hard to do anything else and we're just determining - which exception to raise. */ - if (si->si_code == SEGV_ACCERR - || (long) si->si_addr == 0 - || (((long) si->si_addr) & 3) != 0 - || recurse) - { - exception = &constraint_error; - msg = "SIGSEGV"; - } - else - { - /* See if the page before the faulting page is accessible. Do that - by trying to access it. We'd like to simply try to access - 4096 + the faulting address, but it's not guaranteed to be - the actual address, just to be on the same page. */ - recurse++; - ((volatile char *) - ((long) si->si_addr & - getpagesize ()))[getpagesize ()]; - exception = &storage_error; - msg = "stack overflow or erroneous memory access"; - } - break; - - case SIGBUS: - exception = &program_error; - msg = "SIGBUS"; - break; - - case SIGFPE: - exception = &constraint_error; - msg = "SIGFPE"; - break; - - default: - exception = &program_error; - msg = "unhandled signal"; - } - - recurse = 0; - Raise_From_Signal_Handler (exception, CONST_CAST (char *, msg)); -} - -void -__gnat_install_handler (void) -{ - struct sigaction act; - - /* Setup signal handler to map synchronous signals to appropriate - exceptions. Make sure that the handler isn't interrupted by another - signal that might cause a scheduling event! */ - - act.sa_handler = (void (*) (int)) __gnat_error_handler; - act.sa_flags = SA_RESTART | SA_NODEFER | SA_SIGINFO; - sigemptyset (&act.sa_mask); - - /* Do not install handlers if interrupt state is "System". */ - if (__gnat_get_interrupt_state (SIGABRT) != 's') - sigaction (SIGABRT, &act, NULL); - if (__gnat_get_interrupt_state (SIGFPE) != 's') - sigaction (SIGFPE, &act, NULL); - if (__gnat_get_interrupt_state (SIGILL) != 's') - sigaction (SIGILL, &act, NULL); - if (__gnat_get_interrupt_state (SIGSEGV) != 's') - sigaction (SIGSEGV, &act, NULL); - if (__gnat_get_interrupt_state (SIGBUS) != 's') - sigaction (SIGBUS, &act, NULL); - - __gnat_handler_installed = 1; -} - -/* Routines called by s-mastop-tru64.adb. */ - -#define SC_GP 29 - -char * -__gnat_get_code_loc (struct sigcontext *context) -{ - return (char *) context->sc_pc; -} - -void -__gnat_set_code_loc (struct sigcontext *context, char *pc) -{ - context->sc_pc = (long) pc; -} - -size_t -__gnat_machine_state_length (void) -{ - return sizeof (struct sigcontext); -} - -/*****************/ /* HP-UX section */ /*****************/ diff --git a/gcc/ada/link.c b/gcc/ada/link.c index cb1a928584a..223147df7d2 100644 --- a/gcc/ada/link.c +++ b/gcc/ada/link.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2011, Free Software Foundation, Inc. * + * Copyright (C) 1992-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -96,19 +96,7 @@ extern "C" { #define SHARED 'H' #define STATIC 'T' -#if defined (__osf__) -const char *__gnat_object_file_option = "-Wl,-input,"; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -int __gnat_link_max = 10000; -unsigned char __gnat_objlist_file_supported = 1; -char __gnat_shared_libgnat_default = STATIC; -char __gnat_shared_libgcc_default = STATIC; -unsigned char __gnat_using_gnu_linker = 0; -const char *__gnat_object_library_extension = ".a"; -unsigned char __gnat_separate_run_path_options = 0; -const char *__gnat_default_libgcc_subdir = "lib"; - -#elif defined (sgi) +#if defined (sgi) const char *__gnat_object_file_option = "-Wl,-objectlist,"; const char *__gnat_run_path_option = "-Wl,-rpath,"; int __gnat_link_max = 5000; diff --git a/gcc/ada/memtrack.adb b/gcc/ada/memtrack.adb index 6b29e1748c3..ec490e21db9 100644 --- a/gcc/ada/memtrack.adb +++ b/gcc/ada/memtrack.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -61,7 +61,6 @@ -- HP-UX -- Irix -- Solaris --- Tru64 -- Alpha OpenVMS -- NOTE FOR FUTURE PLATFORMS SUPPORT: It is assumed that type Duration is diff --git a/gcc/ada/mlib-tgt-specific-tru64.adb b/gcc/ada/mlib-tgt-specific-tru64.adb deleted file mode 100644 index b5f5a137122..00000000000 --- a/gcc/ada/mlib-tgt-specific-tru64.adb +++ /dev/null @@ -1,168 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- M L I B . T G T . S P E C I F I C -- --- (Tru64 Version) -- --- -- --- B o d y -- --- -- --- Copyright (C) 2002-2008, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT 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 distributed with GNAT; see file COPYING3. If not, go to -- --- http://www.gnu.org/licenses for a complete copy of the license. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the Tru64 version of the body - -with MLib.Fil; -with MLib.Utl; -with Opt; -with Output; use Output; - -package body MLib.Tgt.Specific is - - use MLib; - - -- Non default subprogram - - procedure Build_Dynamic_Library - (Ofiles : Argument_List; - Options : Argument_List; - Interfaces : Argument_List; - Lib_Filename : String; - Lib_Dir : String; - Symbol_Data : Symbol_Record; - Driver_Name : Name_Id := No_Name; - Lib_Version : String := ""; - Auto_Init : Boolean := False); - - function Is_Archive_Ext (Ext : String) return Boolean; - - function PIC_Option return String; - - -- Local variables - - Expect_Unresolved : aliased String := "-Wl,-expect_unresolved,*"; - - --------------------------- - -- Build_Dynamic_Library -- - --------------------------- - - procedure Build_Dynamic_Library - (Ofiles : Argument_List; - Options : Argument_List; - Interfaces : Argument_List; - Lib_Filename : String; - Lib_Dir : String; - Symbol_Data : Symbol_Record; - Driver_Name : Name_Id := No_Name; - Lib_Version : String := ""; - Auto_Init : Boolean := False) - is - pragma Unreferenced (Interfaces); - pragma Unreferenced (Symbol_Data); - pragma Unreferenced (Auto_Init); - -- Initialization is done through the constructor mechanism - - Lib_File : constant String := - "lib" & Fil.Append_To (Lib_Filename, DLL_Ext); - - Lib_Path : constant String := - Lib_Dir & Directory_Separator & Lib_File; - - Version_Arg : String_Access; - Symbolic_Link_Needed : Boolean := False; - - begin - if Opt.Verbose_Mode then - Write_Str ("building relocatable shared library "); - Write_Line (Lib_Path); - end if; - - -- If specified, add automatic elaboration/finalization - - if Lib_Version = "" then - Utl.Gcc - (Output_File => Lib_Path, - Objects => Ofiles, - Options => Options & Expect_Unresolved'Access, - Options_2 => No_Argument_List, - Driver_Name => Driver_Name); - - else - declare - Maj_Version : constant String := - Major_Id_Name (Lib_File, Lib_Version); - begin - if Maj_Version'Length /= 0 then - Version_Arg := new String'("-Wl,-soname," & Maj_Version); - - else - Version_Arg := new String'("-Wl,-soname," & Lib_Version); - end if; - - if Is_Absolute_Path (Lib_Version) then - Utl.Gcc - (Output_File => Lib_Version, - Objects => Ofiles, - Options => - Options & Version_Arg & Expect_Unresolved'Access, - Options_2 => No_Argument_List, - Driver_Name => Driver_Name); - Symbolic_Link_Needed := Lib_Version /= Lib_Path; - - else - Utl.Gcc - (Output_File => Lib_Dir & Directory_Separator & Lib_Version, - Objects => Ofiles, - Options => - Options & Version_Arg & Expect_Unresolved'Access, - Options_2 => No_Argument_List, - Driver_Name => Driver_Name); - Symbolic_Link_Needed := - Lib_Dir & Directory_Separator & Lib_Version /= Lib_Path; - end if; - - if Symbolic_Link_Needed then - Create_Sym_Links - (Lib_Path, Lib_Version, Lib_Dir, Maj_Version); - end if; - end; - end if; - end Build_Dynamic_Library; - - -------------------- - -- Is_Archive_Ext -- - -------------------- - - function Is_Archive_Ext (Ext : String) return Boolean is - begin - return Ext = ".a" or else Ext = ".so"; - end Is_Archive_Ext; - - ---------------- - -- PIC_Option -- - ---------------- - - function PIC_Option return String is - begin - return ""; - end PIC_Option; - -begin - Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access; - Is_Archive_Ext_Ptr := Is_Archive_Ext'Access; - PIC_Option_Ptr := PIC_Option'Access; -end MLib.Tgt.Specific; diff --git a/gcc/ada/s-mastop-tru64.adb b/gcc/ada/s-mastop-tru64.adb deleted file mode 100644 index 7114ea700f4..00000000000 --- a/gcc/ada/s-mastop-tru64.adb +++ /dev/null @@ -1,163 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- SYSTEM.MACHINE_STATE_OPERATIONS -- --- -- --- B o d y -- --- (Version for Alpha/Dec Unix) -- --- -- --- Copyright (C) 1999-2010, AdaCore -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This version of System.Machine_State_Operations is for use on --- Alpha systems running DEC Unix. - -with System.Memory; - -package body System.Machine_State_Operations is - - pragma Linker_Options ("-lexc"); - -- Needed for definitions of exc_capture_context and exc_virtual_unwind - - ---------------------------- - -- Allocate_Machine_State -- - ---------------------------- - - function Allocate_Machine_State return Machine_State is - use System.Storage_Elements; - - function c_machine_state_length return Storage_Offset; - pragma Import (C, c_machine_state_length, "__gnat_machine_state_length"); - - begin - return Machine_State - (Memory.Alloc (Memory.size_t (c_machine_state_length))); - end Allocate_Machine_State; - - ---------------- - -- Fetch_Code -- - ---------------- - - function Fetch_Code (Loc : Code_Loc) return Code_Loc is - begin - return Loc; - end Fetch_Code; - - ------------------------ - -- Free_Machine_State -- - ------------------------ - - procedure Free_Machine_State (M : in out Machine_State) is - begin - Memory.Free (Address (M)); - M := Machine_State (Null_Address); - end Free_Machine_State; - - ------------------ - -- Get_Code_Loc -- - ------------------ - - function Get_Code_Loc (M : Machine_State) return Code_Loc is - Asm_Call_Size : constant := 4; - - function c_get_code_loc (M : Machine_State) return Code_Loc; - pragma Import (C, c_get_code_loc, "__gnat_get_code_loc"); - - -- Code_Loc returned by c_get_code_loc is the return point but here we - -- want Get_Code_Loc to return the call point. Under DEC Unix a call - -- asm instruction takes 4 bytes. So we must remove this value from - -- c_get_code_loc to have the call point. - - Loc : constant Code_Loc := c_get_code_loc (M); - - begin - if Loc = 0 then - return 0; - else - return Loc - Asm_Call_Size; - end if; - end Get_Code_Loc; - - -------------------------- - -- Machine_State_Length -- - -------------------------- - - function Machine_State_Length - return System.Storage_Elements.Storage_Offset - is - use System.Storage_Elements; - - function c_machine_state_length return Storage_Offset; - pragma Import (C, c_machine_state_length, "__gnat_machine_state_length"); - - begin - return c_machine_state_length; - end Machine_State_Length; - - --------------- - -- Pop_Frame -- - --------------- - - procedure Pop_Frame (M : Machine_State) is - procedure exc_virtual_unwind (Fcn : System.Address; M : Machine_State); - pragma Import (C, exc_virtual_unwind, "exc_virtual_unwind"); - - function exc_lookup_function (Loc : Code_Loc) return System.Address; - pragma Import (C, exc_lookup_function, "exc_lookup_function_entry"); - - procedure c_set_code_loc (M : Machine_State; Loc : Code_Loc); - pragma Import (C, c_set_code_loc, "__gnat_set_code_loc"); - - -- Look for a code-range descriptor table containing the PC of the - -- specified machine state. If we don't find any, attempting to unwind - -- further would fail so we set the machine state's code location to a - -- value indicating that the top of the call chain is reached. This - -- happens when the function at the address pointed to by PC has not - -- been registered with the unwinding machinery, as with the __istart - -- functions generated by the linker in presence of initialization - -- routines for example. - - Prf : constant System.Address := exc_lookup_function (Get_Code_Loc (M)); - - begin - if Prf = System.Null_Address then - c_set_code_loc (M, 0); - else - exc_virtual_unwind (Prf, M); - end if; - end Pop_Frame; - - ----------------------- - -- Set_Machine_State -- - ----------------------- - - procedure Set_Machine_State (M : Machine_State) is - procedure c_capture_context (M : Machine_State); - pragma Import (C, c_capture_context, "exc_capture_context"); - begin - c_capture_context (M); - Pop_Frame (M); - end Set_Machine_State; - -end System.Machine_State_Operations; diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 340abe99fe8..3005ba781a0 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -7,7 +7,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -85,12 +85,6 @@ pragma Style_Checks ("M32766"); **/ #define _XOPEN_SOURCE 500 -#elif defined (__alpha__) && defined (__osf__) -/** For Tru64 UNIX, _XOPEN_SOURCE must be defined, otherwise CLOCK_REALTIME - ** is not defined. - **/ -#define _XOPEN_SOURCE 500 - #elif defined (__mips) && defined (__sgi) /** For IRIX 6, _XOPEN5 must be defined and _XOPEN_IOV_MAX must be used as ** IOV_MAX, otherwise IOV_MAX is not defined. IRIX 5 has neither. @@ -111,14 +105,6 @@ pragma Style_Checks ("M32766"); #include <fcntl.h> #include <time.h> -#if defined (__alpha__) && defined (__osf__) -/** Tru64 is unable to do vector IO operations with default value of IOV_MAX, - ** so its value is redefined to a small one which is known to work properly. - **/ -#undef IOV_MAX -#define IOV_MAX 16 -#endif - #if defined (__VMS) /** VMS is unable to do vector IO operations with default value of IOV_MAX, ** so its value is redefined to a small one which is known to work properly. @@ -978,15 +964,6 @@ CND(AF_INET, "IPv4 address family") # undef AF_INET6 #endif -/** - ** Tru64 UNIX V4.0F defines AF_INET6 without IPv6 support, specifically - ** without struct sockaddr_in6. We use _SS_MAXSIZE (used for the definition - ** of struct sockaddr_storage on Tru64 UNIX V5.1) to detect this. - **/ -#if defined(__osf__) && !defined(_SS_MAXSIZE) -# undef AF_INET6 -#endif - #ifndef AF_INET6 # define AF_INET6 -1 #else diff --git a/gcc/ada/s-osinte-tru64.adb b/gcc/ada/s-osinte-tru64.adb deleted file mode 100644 index ad391bcb473..00000000000 --- a/gcc/ada/s-osinte-tru64.adb +++ /dev/null @@ -1,142 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . O S _ I N T E R F A C E -- --- -- --- B o d y -- --- -- --- Copyright (C) 1998-2009, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the DEC Unix version of this package - --- This package encapsulates all direct interfaces to OS services --- that are needed by children of System. - -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during --- tasking operations. It causes infinite loops and other problems. - -with Interfaces.C; use Interfaces.C; -with System.Machine_Code; use System.Machine_Code; - -package body System.OS_Interface is - - -------------------- - -- Get_Stack_Base -- - -------------------- - - function Get_Stack_Base (thread : pthread_t) return Address is - pragma Unreferenced (thread); - begin - return Null_Address; - end Get_Stack_Base; - - ------------------ - -- pthread_init -- - ------------------ - - procedure pthread_init is - begin - null; - end pthread_init; - - ------------------ - -- pthread_self -- - ------------------ - - function pthread_self return pthread_t is - Self : pthread_t; - begin - Asm ("call_pal 0x9e" & ASCII.LF & ASCII.HT & - "bis $31, $0, %0", - Outputs => pthread_t'Asm_Output ("=r", Self), - Clobber => "$0", - Volatile => True); - return Self; - end pthread_self; - - ---------------------- - -- Hide_Yellow_Zone -- - ---------------------- - - procedure Hide_Unhide_Yellow_Zone (Hide : Boolean) is - type Teb_Ptr is access all pthread_teb_t; - Teb : Teb_Ptr; - Res : Interfaces.C.int; - pragma Unreferenced (Res); - - begin - -- Get the Thread Environment Block address - - Asm ("call_pal 0x9e" & ASCII.LF & ASCII.HT & - "bis $31, $0, %0", - Outputs => Teb_Ptr'Asm_Output ("=r", Teb), - Clobber => "$0", - Volatile => True); - - -- Stick a guard page right above the Yellow Zone if it exists - - if Teb.all.stack_yellow /= Teb.all.stack_guard then - Res := - mprotect - (Teb.all.stack_yellow, Get_Page_Size, - prot => (if Hide then PROT_ON else PROT_OFF)); - end if; - end Hide_Unhide_Yellow_Zone; - - ----------------- - -- To_Duration -- - ----------------- - - function To_Duration (TS : timespec) return Duration is - begin - return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; - end To_Duration; - - ----------------- - -- To_Timespec -- - ----------------- - - function To_Timespec (D : Duration) return timespec is - S : time_t; - F : Duration; - - begin - S := time_t (Long_Long_Integer (D)); - F := D - Duration (S); - - -- If F has negative value due to a round-up, adjust for positive F - -- value. - - if F < 0.0 then - S := S - 1; - F := F + 1.0; - end if; - - return timespec'(tv_sec => S, - tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); - end To_Timespec; - -end System.OS_Interface; diff --git a/gcc/ada/s-osinte-tru64.ads b/gcc/ada/s-osinte-tru64.ads deleted file mode 100644 index 0fcd4221e80..00000000000 --- a/gcc/ada/s-osinte-tru64.ads +++ /dev/null @@ -1,585 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . O S _ I N T E R F A C E -- --- -- --- S p e c -- --- -- --- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2011, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the Tru64 version of this package - --- This package encapsulates all direct interfaces to OS services --- that are needed by the tasking run-time (libgnarl). - --- PLEASE DO NOT add any with-clauses to this package or remove the pragma --- Preelaborate. This package is designed to be a bottom-level (leaf) package. - -with Interfaces.C; - -with Ada.Unchecked_Conversion; - -package System.OS_Interface is - pragma Preelaborate; - - pragma Linker_Options ("-lpthread"); - pragma Linker_Options ("-lmach"); - pragma Linker_Options ("-lexc"); - pragma Linker_Options ("-lrt"); - - subtype int is Interfaces.C.int; - subtype short is Interfaces.C.short; - subtype long is Interfaces.C.long; - subtype unsigned is Interfaces.C.unsigned; - subtype unsigned_short is Interfaces.C.unsigned_short; - subtype unsigned_long is Interfaces.C.unsigned_long; - subtype unsigned_char is Interfaces.C.unsigned_char; - subtype plain_char is Interfaces.C.plain_char; - subtype size_t is Interfaces.C.size_t; - subtype char_array is Interfaces.C.char_array; - - ----------- - -- Errno -- - ----------- - - function errno return int; - pragma Import (C, errno, "_Geterrno"); - - EAGAIN : constant := 35; - EINTR : constant := 4; - EINVAL : constant := 22; - ENOMEM : constant := 12; - ETIMEDOUT : constant := 60; - - ------------- - -- Signals -- - ------------- - - Max_Interrupt : constant := 48; - type Signal is new int range 0 .. Max_Interrupt; - for Signal'Size use int'Size; - - SIGHUP : constant := 1; -- hangup - SIGINT : constant := 2; -- interrupt (rubout) - SIGQUIT : constant := 3; -- quit (ASCD FS) - SIGILL : constant := 4; -- illegal instruction (not reset) - SIGTRAP : constant := 5; -- trace trap (not reset) - SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future - SIGIOT : constant := 6; -- abort (terminate) process - SIGLOST : constant := 6; -- old BSD signal ?? - SIGEMT : constant := 7; -- EMT instruction - SIGFPE : constant := 8; -- floating point exception - SIGKILL : constant := 9; -- kill (cannot be caught or ignored) - SIGBUS : constant := 10; -- bus error - SIGSEGV : constant := 11; -- segmentation violation - SIGSYS : constant := 12; -- bad argument to system call - SIGPIPE : constant := 13; -- write on a pipe with no one to read it - SIGALRM : constant := 14; -- alarm clock - SIGTERM : constant := 15; -- software termination signal from kill - SIGURG : constant := 16; -- urgent condition on IO channel - SIGIOINT : constant := 16; -- printer to backend error signal - SIGSTOP : constant := 17; -- stop (cannot be caught or ignored) - SIGTSTP : constant := 18; -- user stop requested from tty - SIGCONT : constant := 19; -- stopped process has been continued - SIGCHLD : constant := 20; -- child status change - SIGTTIN : constant := 21; -- background tty read attempted - SIGTTOU : constant := 22; -- background tty write attempted - SIGPOLL : constant := 23; -- I/O possible, or completed - SIGIO : constant := 23; -- STREAMS version of SIGPOLL - SIGAIO : constant := 23; -- base lan i/o - SIGPTY : constant := 23; -- pty i/o - SIGXCPU : constant := 24; -- CPU time limit exceeded - SIGXFSZ : constant := 25; -- filesize limit exceeded - SIGVTALRM : constant := 26; -- virtual timer expired - SIGPROF : constant := 27; -- profiling timer expired - SIGWINCH : constant := 28; -- window size change - SIGINFO : constant := 29; -- information request - SIGPWR : constant := 29; -- Power Fail/Restart -- SVID3/SVR4 - SIGUSR1 : constant := 30; -- user defined signal 1 - SIGUSR2 : constant := 31; -- user defined signal 2 - SIGRESV : constant := 32; -- reserved by Digital for future use - - SIGADAABORT : constant := SIGABRT; - - type Signal_Set is array (Natural range <>) of Signal; - - Unmasked : constant Signal_Set := (0 .. 0 => SIGTRAP); - Reserved : constant Signal_Set := (SIGALRM, SIGABRT, SIGKILL, SIGSTOP); - - type sigset_t is private; - - function sigaddset (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigaddset); - - function sigdelset (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigdelset); - - function sigfillset (set : access sigset_t) return int; - pragma Import (C, sigfillset); - - function sigismember (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigismember); - - function sigemptyset (set : access sigset_t) return int; - pragma Import (C, sigemptyset); - - type union_type_3 is new String (1 .. 116); - type siginfo_t is record - si_signo : int; - si_errno : int; - si_code : int; - X_data : union_type_3; - end record; - for siginfo_t'Size use 8 * 128; - pragma Convention (C, siginfo_t); - - type struct_sigaction is record - sa_handler : System.Address; - sa_mask : sigset_t; - sa_flags : int; - sa_signo : int; - end record; - pragma Convention (C, struct_sigaction); - type struct_sigaction_ptr is access all struct_sigaction; - - SIG_BLOCK : constant := 1; - SIG_UNBLOCK : constant := 2; - SIG_SETMASK : constant := 3; - - SIG_DFL : constant := 0; - SIG_IGN : constant := 1; - - SA_NODEFER : constant := 8; - SA_SIGINFO : constant := 16#40#; - SA_ONSTACK : constant := 16#01#; - - function sigaction - (sig : Signal; - act : struct_sigaction_ptr; - oact : struct_sigaction_ptr) return int; - pragma Import (C, sigaction); - - ---------- - -- Time -- - ---------- - - type timespec is private; - - function nanosleep (rqtp, rmtp : access timespec) return int; - pragma Import (C, nanosleep); - - type clockid_t is new int; - - function clock_gettime - (clock_id : clockid_t; - tp : access timespec) return int; - pragma Import (C, clock_gettime); - - function To_Duration (TS : timespec) return Duration; - pragma Inline (To_Duration); - - function To_Timespec (D : Duration) return timespec; - pragma Inline (To_Timespec); - - type struct_timezone is record - tz_minuteswest : int; - tz_dsttime : int; - end record; - pragma Convention (C, struct_timezone); - - ------------------------- - -- Priority Scheduling -- - ------------------------- - - SCHED_FIFO : constant := 1; - SCHED_RR : constant := 2; - SCHED_OTHER : constant := 3; - SCHED_LFI : constant := 5; - - ------------- - -- Process -- - ------------- - - type pid_t is private; - - function kill (pid : pid_t; sig : Signal) return int; - pragma Import (C, kill); - - function getpid return pid_t; - pragma Import (C, getpid); - - BIND_NO_INHERIT : constant := 1; - - function bind_to_cpu - (pid : pid_t; - cpu_mask : unsigned_long; - flag : unsigned_long := BIND_NO_INHERIT) return int; - pragma Import (C, bind_to_cpu); - - ------------- - -- Threads -- - ------------- - - type Thread_Body is access - function (arg : System.Address) return System.Address; - pragma Convention (C, Thread_Body); - - function Thread_Body_Access is new - Ada.Unchecked_Conversion (System.Address, Thread_Body); - - type pthread_t is private; - subtype Thread_Id is pthread_t; - - type pthread_mutex_t is limited private; - type pthread_cond_t is limited private; - type pthread_attr_t is limited private; - type pthread_mutexattr_t is limited private; - type pthread_condattr_t is limited private; - type pthread_key_t is private; - - PTHREAD_CREATE_DETACHED : constant := 1; - - PTHREAD_SCOPE_PROCESS : constant := 0; - PTHREAD_SCOPE_SYSTEM : constant := 1; - - PTHREAD_EXPLICIT_SCHED : constant := 1; - - ----------- - -- Stack -- - ----------- - - Stack_Base_Available : constant Boolean := False; - -- Indicates if the stack base is available on this target - - function Get_Stack_Base (thread : pthread_t) return Address; - pragma Inline (Get_Stack_Base); - -- Returns the stack base of the specified thread. Only call this function - -- when Stack_Base_Available is True. - - function Get_Page_Size return size_t; - function Get_Page_Size return Address; - pragma Import (C, Get_Page_Size, "getpagesize"); - -- Returns the size of a page - - PROT_NONE : constant := 0; - PROT_READ : constant := 1; - PROT_WRITE : constant := 2; - PROT_EXEC : constant := 4; - PROT_ALL : constant := PROT_READ + PROT_WRITE + PROT_EXEC; - - PROT_ON : constant := PROT_READ; - PROT_OFF : constant := PROT_ALL; - - function mprotect (addr : Address; len : size_t; prot : int) return int; - pragma Import (C, mprotect); - - procedure Hide_Unhide_Yellow_Zone (Hide : Boolean); - -- Every thread except the initial one features an overflow warning area - -- (called the Yellow Zone) which is just above the overflow guard area - -- on the stack (called the Red Zone). During task execution, we want - -- signals from the Red Zone, so we need to hide the Yellow Zone. This - -- procedure is called at the start of task execution (with Hide set True) - -- to hide the Yellow Zone, and at the end of task execution (with Hide - -- set False) to unhide the Yellow Zone. - - --------------------------------------- - -- Nonstandard Thread Initialization -- - --------------------------------------- - - procedure pthread_init; - pragma Inline (pthread_init); - -- This is a dummy procedure to share some GNULLI files - - ------------------------- - -- POSIX.1c Section 3 -- - ------------------------- - - function sigwait - (set : access sigset_t; - sig : access Signal) return int; - pragma Import (C, sigwait, "__sigwaitd10"); - - function pthread_kill - (thread : pthread_t; - sig : Signal) return int; - pragma Import (C, pthread_kill); - - function pthread_sigmask - (how : int; - set : access sigset_t; - oset : access sigset_t) return int; - pragma Import (C, pthread_sigmask); - - -------------------------- - -- POSIX.1c Section 11 -- - -------------------------- - - function pthread_mutexattr_init (attr : access pthread_mutexattr_t) - return int; - pragma Import (C, pthread_mutexattr_init); - - function pthread_mutexattr_destroy - (attr : access pthread_mutexattr_t) return int; - pragma Import (C, pthread_mutexattr_destroy); - - function pthread_mutex_init - (mutex : access pthread_mutex_t; - attr : access pthread_mutexattr_t) return int; - pragma Import (C, pthread_mutex_init, "__pthread_mutex_init"); - - function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int; - pragma Import (C, pthread_mutex_destroy, "__pthread_mutex_destroy"); - - function pthread_mutex_lock (mutex : access pthread_mutex_t) return int; - pragma Import (C, pthread_mutex_lock, "__pthread_mutex_lock"); - - function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int; - pragma Import (C, pthread_mutex_unlock, "__pthread_mutex_unlock"); - - function pthread_condattr_init - (attr : access pthread_condattr_t) return int; - pragma Import (C, pthread_condattr_init); - - function pthread_condattr_destroy - (attr : access pthread_condattr_t) return int; - pragma Import (C, pthread_condattr_destroy); - - function pthread_cond_init - (cond : access pthread_cond_t; - attr : access pthread_condattr_t) return int; - pragma Import (C, pthread_cond_init, "__pthread_cond_init"); - - function pthread_cond_destroy (cond : access pthread_cond_t) return int; - pragma Import (C, pthread_cond_destroy, "__pthread_cond_destroy"); - - function pthread_cond_signal (cond : access pthread_cond_t) return int; - pragma Import (C, pthread_cond_signal, "__pthread_cond_signal"); - - function pthread_cond_wait - (cond : access pthread_cond_t; - mutex : access pthread_mutex_t) return int; - pragma Import (C, pthread_cond_wait, "__pthread_cond_wait"); - - function pthread_cond_timedwait - (cond : access pthread_cond_t; - mutex : access pthread_mutex_t; - abstime : access timespec) return int; - pragma Import (C, pthread_cond_timedwait, "__pthread_cond_timedwait"); - - -------------------------- - -- POSIX.1c Section 13 -- - -------------------------- - - function pthread_mutexattr_setprotocol - (attr : access pthread_mutexattr_t; - protocol : int) return int; - pragma Import (C, pthread_mutexattr_setprotocol); - - function pthread_mutexattr_setprioceiling - (attr : access pthread_mutexattr_t; - prioceiling : int) return int; - pragma Import (C, pthread_mutexattr_setprioceiling); - - type struct_sched_param is record - sched_priority : int; -- scheduling priority - end record; - - function pthread_setschedparam - (thread : pthread_t; - policy : int; - param : access struct_sched_param) return int; - pragma Import (C, pthread_setschedparam); - - function pthread_attr_setscope - (attr : access pthread_attr_t; - contentionscope : int) return int; - pragma Import (C, pthread_attr_setscope); - - function pthread_attr_setinheritsched - (attr : access pthread_attr_t; - inheritsched : int) return int; - pragma Import (C, pthread_attr_setinheritsched, - "__pthread_attr_setinheritsched"); - - function pthread_attr_setschedpolicy - (attr : access pthread_attr_t; policy : int) return int; - pragma Import (C, pthread_attr_setschedpolicy); - - function pthread_attr_setschedparam - (attr : access pthread_attr_t; - sched_param : access struct_sched_param) return int; - pragma Import (C, pthread_attr_setschedparam); - - function sched_yield return int; - pragma Import (C, sched_yield); - - -------------------------- - -- P1003.1c Section 16 -- - -------------------------- - - function pthread_attr_init (attributes : access pthread_attr_t) - return int; - pragma Import (C, pthread_attr_init); - - function pthread_attr_destroy (attributes : access pthread_attr_t) - return int; - pragma Import (C, pthread_attr_destroy); - - function pthread_attr_setdetachstate - (attr : access pthread_attr_t; - detachstate : int) return int; - pragma Import (C, pthread_attr_setdetachstate); - - function pthread_attr_setstacksize - (attr : access pthread_attr_t; - stacksize : size_t) return int; - pragma Import (C, pthread_attr_setstacksize, "__pthread_attr_setstacksize"); - - function pthread_create - (thread : access pthread_t; - attributes : access pthread_attr_t; - start_routine : Thread_Body; - arg : System.Address) return int; - pragma Import (C, pthread_create, "__pthread_create"); - - procedure pthread_exit (status : System.Address); - pragma Import (C, pthread_exit, "__pthread_exit"); - - function pthread_self return pthread_t; - pragma Inline (pthread_self); - - -------------------------- - -- POSIX.1c Section 17 -- - -------------------------- - - function pthread_setspecific - (key : pthread_key_t; value : System.Address) return int; - pragma Import (C, pthread_setspecific, "__pthread_setspecific"); - - function pthread_getspecific (key : pthread_key_t) return System.Address; - pragma Import (C, pthread_getspecific, "__pthread_getspecific"); - - type destructor_pointer is access procedure (arg : System.Address); - pragma Convention (C, destructor_pointer); - - function pthread_key_create - (key : access pthread_key_t; - destructor : destructor_pointer) return int; - pragma Import (C, pthread_key_create); - -private - - type sigset_t is new unsigned_long; - - type pid_t is new int; - - type time_t is new int; - - type timespec is record - tv_sec : time_t; - tv_nsec : long; - end record; - pragma Convention (C, timespec); - - type unsigned_long_array is array (Natural range <>) of unsigned_long; - - type pthread_t is new System.Address; - - type pthread_teb_t is record - reserved1 : System.Address; - reserved2 : System.Address; - size : unsigned_short; - version : unsigned_char; - reserved3 : unsigned_char; - external : unsigned_char; - reserved4 : char_array (0 .. 1); - creator : unsigned_char; - sequence : unsigned_long; - reserved5 : unsigned_long_array (0 .. 1); - per_kt_area : System.Address; - stack_base : System.Address; - stack_reserve : System.Address; - stack_yellow : System.Address; - stack_guard : System.Address; - stack_size : unsigned_long; - tsd_values : System.Address; - tsd_count : unsigned_long; - reserved6 : unsigned; - reserved7 : unsigned; - thread_flags : unsigned; - thd_errno : int; - stack_hiwater : System.Address; - home_rad : unsigned_long; - end record; - pragma Convention (C, pthread_teb_t); - - type pthread_cond_t is record - state : unsigned; - valid : unsigned; - name : System.Address; - arg : unsigned; - reserved1 : unsigned; - sequence : unsigned_long; - block : System.Address; - end record; - pragma Convention (C, pthread_cond_t); - - type pthread_attr_t is record - valid : long; - name : System.Address; - arg : unsigned_long; - reserved : unsigned_long_array (0 .. 18); - end record; - pragma Convention (C, pthread_attr_t); - - type pthread_mutex_t is record - lock : unsigned; - valid : unsigned; - name : System.Address; - arg : unsigned; - depth : unsigned; - sequence : unsigned_long; - owner : unsigned_long; - block : System.Address; - end record; - for pthread_mutex_t'Size use 8 * 48; - pragma Convention (C, pthread_mutex_t); - - type pthread_mutexattr_t is record - valid : long; - reserved : unsigned_long_array (0 .. 14); - end record; - pragma Convention (C, pthread_mutexattr_t); - - type pthread_condattr_t is record - valid : long; - reserved : unsigned_long_array (0 .. 12); - end record; - pragma Convention (C, pthread_condattr_t); - - type pthread_key_t is new unsigned; - -end System.OS_Interface; diff --git a/gcc/ada/s-taprop-tru64.adb b/gcc/ada/s-taprop-tru64.adb deleted file mode 100644 index 8d69e5b19b1..00000000000 --- a/gcc/ada/s-taprop-tru64.adb +++ /dev/null @@ -1,1365 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is a Tru64 version of this package - --- This package contains all the GNULL primitives that interface directly with --- the underlying OS. - -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - -with Interfaces; -with Interfaces.C; - -with System.Tasking.Debug; -with System.Interrupt_Management; -with System.OS_Constants; -with System.OS_Primitives; -with System.Task_Info; - -with System.Soft_Links; --- We use System.Soft_Links instead of System.Tasking.Initialization --- because the later is a higher level package that we shouldn't depend on. --- For example when using the restricted run time, it is replaced by --- System.Tasking.Restricted.Stages. - -package body System.Task_Primitives.Operations is - - package OSC renames System.OS_Constants; - package SSL renames System.Soft_Links; - - use System.Tasking.Debug; - use System.Tasking; - use Interfaces.C; - use System.OS_Interface; - use System.Parameters; - use System.OS_Primitives; - - ---------------- - -- Local Data -- - ---------------- - - -- The followings are logically constants, but need to be initialized - -- at run time. - - Single_RTS_Lock : aliased RTS_Lock; - -- This is a lock to allow only one thread of control in the RTS at - -- a time; it is used to execute in mutual exclusion from all other tasks. - -- Used mainly in Single_Lock mode, but also to protect All_Tasks_List - - Environment_Task_Id : Task_Id; - -- A variable to hold Task_Id for the environment task - - Unblocked_Signal_Mask : aliased sigset_t; - -- The set of signals that should unblocked in all tasks - - Time_Slice_Val : Integer; - pragma Import (C, Time_Slice_Val, "__gl_time_slice_val"); - - Locking_Policy : Character; - pragma Import (C, Locking_Policy, "__gl_locking_policy"); - - Dispatching_Policy : Character; - pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); - - Curpid : pid_t; - - Foreign_Task_Elaborated : aliased Boolean := True; - -- Used to identified fake tasks (i.e., non-Ada Threads) - - Abort_Handler_Installed : Boolean := False; - -- True if a handler for the abort signal is installed - - -------------------- - -- Local Packages -- - -------------------- - - package Specific is - - procedure Initialize (Environment_Task : Task_Id); - pragma Inline (Initialize); - -- Initialize various data needed by this package - - function Is_Valid_Task return Boolean; - pragma Inline (Is_Valid_Task); - -- Does executing thread have a TCB? - - procedure Set (Self_Id : Task_Id); - pragma Inline (Set); - -- Set the self id for the current task - - function Self return Task_Id; - pragma Inline (Self); - -- Return a pointer to the Ada Task Control Block of the calling task - - end Specific; - - package body Specific is separate; - -- The body of this package is target specific - - ---------------------------------- - -- ATCB allocation/deallocation -- - ---------------------------------- - - package body ATCB_Allocation is separate; - -- The body of this package is shared across several targets - - --------------------------------- - -- Support for foreign threads -- - --------------------------------- - - function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id; - -- Allocate and initialize a new ATCB for the current Thread - - function Register_Foreign_Thread - (Thread : Thread_Id) return Task_Id is separate; - - ----------------------- - -- Local Subprograms -- - ----------------------- - - procedure Abort_Handler (Sig : Signal); - -- Signal handler used to implement asynchronous abort - - function Get_Policy (Prio : System.Any_Priority) return Character; - pragma Import (C, Get_Policy, "__gnat_get_specific_dispatching"); - -- Get priority specific dispatching policy - - ------------------- - -- Abort_Handler -- - ------------------- - - procedure Abort_Handler (Sig : Signal) is - pragma Unreferenced (Sig); - - T : constant Task_Id := Self; - Old_Set : aliased sigset_t; - - Result : Interfaces.C.int; - pragma Warnings (Off, Result); - - begin - -- It's not safe to raise an exception when using GCC ZCX mechanism. - -- Note that we still need to install a signal handler, since in some - -- cases (e.g. shutdown of the Server_Task in System.Interrupts) we - -- need to send the Abort signal to a task. - - if ZCX_By_Default then - return; - end if; - - if T.Deferral_Level = 0 - and then T.Pending_ATC_Level < T.ATC_Nesting_Level - and then not T.Aborting - then - T.Aborting := True; - - -- Make sure signals used for RTS internal purpose are unmasked - - Result := - pthread_sigmask - (SIG_UNBLOCK, - Unblocked_Signal_Mask'Access, - Old_Set'Access); - pragma Assert (Result = 0); - - raise Standard'Abort_Signal; - end if; - end Abort_Handler; - - ------------------ - -- Stack_Guard -- - ------------------ - - -- The underlying thread system sets a guard page at the bottom of a thread - -- stack, so nothing is needed. - - procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is - pragma Unreferenced (T); - pragma Unreferenced (On); - begin - null; - end Stack_Guard; - - -------------------- - -- Get_Thread_Id -- - -------------------- - - function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is - begin - return T.Common.LL.Thread; - end Get_Thread_Id; - - ---------- - -- Self -- - ---------- - - function Self return Task_Id renames Specific.Self; - - --------------------- - -- Initialize_Lock -- - --------------------- - - -- Note: mutexes and cond_variables needed per-task basis are initialized - -- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such - -- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any - -- status change of RTS. Therefore raising Storage_Error in the following - -- routines should be able to be handled safely. - - procedure Initialize_Lock - (Prio : System.Any_Priority; - L : not null access Lock) - is - Attributes : aliased pthread_mutexattr_t; - Result : Interfaces.C.int; - - begin - Result := pthread_mutexattr_init (Attributes'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - raise Storage_Error; - end if; - - if Locking_Policy = 'C' then - L.Ceiling := Interfaces.C.int (Prio); - end if; - - Result := pthread_mutex_init (L.L'Access, Attributes'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - Result := pthread_mutexattr_destroy (Attributes'Access); - raise Storage_Error; - end if; - - Result := pthread_mutexattr_destroy (Attributes'Access); - pragma Assert (Result = 0); - end Initialize_Lock; - - procedure Initialize_Lock - (L : not null access RTS_Lock; - Level : Lock_Level) - is - pragma Unreferenced (Level); - - Attributes : aliased pthread_mutexattr_t; - Result : Interfaces.C.int; - - begin - Result := pthread_mutexattr_init (Attributes'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - raise Storage_Error; - end if; - - Result := pthread_mutex_init (L, Attributes'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - Result := pthread_mutexattr_destroy (Attributes'Access); - raise Storage_Error; - end if; - - Result := pthread_mutexattr_destroy (Attributes'Access); - pragma Assert (Result = 0); - end Initialize_Lock; - - ------------------- - -- Finalize_Lock -- - ------------------- - - procedure Finalize_Lock (L : not null access Lock) is - Result : Interfaces.C.int; - begin - Result := pthread_mutex_destroy (L.L'Access); - pragma Assert (Result = 0); - end Finalize_Lock; - - procedure Finalize_Lock (L : not null access RTS_Lock) is - Result : Interfaces.C.int; - begin - Result := pthread_mutex_destroy (L); - pragma Assert (Result = 0); - end Finalize_Lock; - - ---------------- - -- Write_Lock -- - ---------------- - - procedure Write_Lock - (L : not null access Lock; - Ceiling_Violation : out Boolean) - is - Result : Interfaces.C.int; - Self_ID : Task_Id; - All_Tasks_Link : Task_Id; - Current_Prio : System.Any_Priority; - - begin - -- Perform ceiling checks only when this is the locking policy in use - - if Locking_Policy = 'C' then - Self_ID := Self; - All_Tasks_Link := Self_ID.Common.All_Tasks_Link; - Current_Prio := Get_Priority (Self_ID); - - -- If there is no other task, no need to check priorities - - if All_Tasks_Link /= Null_Task - and then L.Ceiling < Interfaces.C.int (Current_Prio) - then - Ceiling_Violation := True; - return; - end if; - end if; - - Result := pthread_mutex_lock (L.L'Access); - pragma Assert (Result = 0); - - Ceiling_Violation := False; - end Write_Lock; - - procedure Write_Lock - (L : not null access RTS_Lock; - Global_Lock : Boolean := False) - is - Result : Interfaces.C.int; - begin - if not Single_Lock or else Global_Lock then - Result := pthread_mutex_lock (L); - pragma Assert (Result = 0); - end if; - end Write_Lock; - - procedure Write_Lock (T : Task_Id) is - Result : Interfaces.C.int; - begin - if not Single_Lock then - Result := pthread_mutex_lock (T.Common.LL.L'Access); - pragma Assert (Result = 0); - end if; - end Write_Lock; - - --------------- - -- Read_Lock -- - --------------- - - procedure Read_Lock - (L : not null access Lock; - Ceiling_Violation : out Boolean) - is - begin - Write_Lock (L, Ceiling_Violation); - end Read_Lock; - - ------------ - -- Unlock -- - ------------ - - procedure Unlock (L : not null access Lock) is - Result : Interfaces.C.int; - begin - Result := pthread_mutex_unlock (L.L'Access); - pragma Assert (Result = 0); - end Unlock; - - procedure Unlock - (L : not null access RTS_Lock; - Global_Lock : Boolean := False) - is - Result : Interfaces.C.int; - begin - if not Single_Lock or else Global_Lock then - Result := pthread_mutex_unlock (L); - pragma Assert (Result = 0); - end if; - end Unlock; - - procedure Unlock (T : Task_Id) is - Result : Interfaces.C.int; - begin - if not Single_Lock then - Result := pthread_mutex_unlock (T.Common.LL.L'Access); - pragma Assert (Result = 0); - end if; - end Unlock; - - ----------------- - -- Set_Ceiling -- - ----------------- - - -- Dynamic priority ceilings are not supported by the underlying system - - procedure Set_Ceiling - (L : not null access Lock; - Prio : System.Any_Priority) - is - pragma Unreferenced (L, Prio); - begin - null; - end Set_Ceiling; - - ----------- - -- Sleep -- - ----------- - - procedure Sleep - (Self_ID : Task_Id; - Reason : System.Tasking.Task_States) - is - pragma Unreferenced (Reason); - - Result : Interfaces.C.int; - - begin - Result := - pthread_cond_wait - (cond => Self_ID.Common.LL.CV'Access, - mutex => (if Single_Lock - then Single_RTS_Lock'Access - else Self_ID.Common.LL.L'Access)); - - -- EINTR is not considered a failure - - pragma Assert (Result = 0 or else Result = EINTR); - end Sleep; - - ----------------- - -- Timed_Sleep -- - ----------------- - - -- This is for use within the run-time system, so abort is assumed to be - -- already deferred, and the caller should be holding its own ATCB lock. - - procedure Timed_Sleep - (Self_ID : Task_Id; - Time : Duration; - Mode : ST.Delay_Modes; - Reason : System.Tasking.Task_States; - Timedout : out Boolean; - Yielded : out Boolean) - is - pragma Unreferenced (Reason); - - Base_Time : constant Duration := Monotonic_Clock; - Check_Time : Duration := Base_Time; - Abs_Time : Duration; - Request : aliased timespec; - Result : Interfaces.C.int; - - begin - Timedout := True; - Yielded := False; - - Abs_Time := - (if Mode = Relative - then Duration'Min (Time, Max_Sensible_Delay) + Check_Time - else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); - - if Abs_Time > Check_Time then - Request := To_Timespec (Abs_Time); - - loop - exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level; - - Result := - pthread_cond_timedwait - (cond => Self_ID.Common.LL.CV'Access, - mutex => (if Single_Lock - then Single_RTS_Lock'Access - else Self_ID.Common.LL.L'Access), - abstime => Request'Access); - - Check_Time := Monotonic_Clock; - exit when Abs_Time <= Check_Time or else Check_Time < Base_Time; - - if Result = 0 or Result = EINTR then - - -- Somebody may have called Wakeup for us - - Timedout := False; - exit; - end if; - - pragma Assert (Result = ETIMEDOUT); - end loop; - end if; - end Timed_Sleep; - - ----------------- - -- Timed_Delay -- - ----------------- - - -- This is for use in implementing delay statements, so we assume the - -- caller is abort-deferred but is holding no locks. - - procedure Timed_Delay - (Self_ID : Task_Id; - Time : Duration; - Mode : ST.Delay_Modes) - is - Base_Time : constant Duration := Monotonic_Clock; - Check_Time : Duration := Base_Time; - Abs_Time : Duration; - Request : aliased timespec; - Result : Interfaces.C.int; - - begin - if Single_Lock then - Lock_RTS; - end if; - - Write_Lock (Self_ID); - - Abs_Time := - (if Mode = Relative - then Time + Check_Time - else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); - - if Abs_Time > Check_Time then - Request := To_Timespec (Abs_Time); - Self_ID.Common.State := Delay_Sleep; - - loop - exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level; - - Result := - pthread_cond_timedwait - (cond => Self_ID.Common.LL.CV'Access, - mutex => (if Single_Lock - then Single_RTS_Lock'Access - else Self_ID.Common.LL.L'Access), - abstime => Request'Access); - - Check_Time := Monotonic_Clock; - exit when Abs_Time <= Check_Time or else Check_Time < Base_Time; - - pragma Assert (Result = 0 or else - Result = ETIMEDOUT or else - Result = EINTR); - end loop; - - Self_ID.Common.State := Runnable; - end if; - - Unlock (Self_ID); - - if Single_Lock then - Unlock_RTS; - end if; - - Yield; - end Timed_Delay; - - --------------------- - -- Monotonic_Clock -- - --------------------- - - function Monotonic_Clock return Duration is - TS : aliased timespec; - Result : Interfaces.C.int; - begin - Result := clock_gettime (OSC.CLOCK_RT_Ada, TS'Unchecked_Access); - pragma Assert (Result = 0); - return To_Duration (TS); - end Monotonic_Clock; - - ------------------- - -- RT_Resolution -- - ------------------- - - function RT_Resolution return Duration is - begin - -- Returned value must be an integral multiple of Duration'Small (1 ns) - -- The following is the best approximation of 1/1024. The clock on the - -- DEC Alpha ticks at 1024 Hz. - - return 0.000_976_563; - end RT_Resolution; - - ------------ - -- Wakeup -- - ------------ - - procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is - pragma Unreferenced (Reason); - Result : Interfaces.C.int; - begin - Result := pthread_cond_signal (T.Common.LL.CV'Access); - pragma Assert (Result = 0); - end Wakeup; - - ----------- - -- Yield -- - ----------- - - procedure Yield (Do_Yield : Boolean := True) is - Result : Interfaces.C.int; - pragma Unreferenced (Result); - begin - if Do_Yield then - Result := sched_yield; - end if; - end Yield; - - ------------------ - -- Set_Priority -- - ------------------ - - procedure Set_Priority - (T : Task_Id; - Prio : System.Any_Priority; - Loss_Of_Inheritance : Boolean := False) - is - pragma Unreferenced (Loss_Of_Inheritance); - - Result : Interfaces.C.int; - Param : aliased struct_sched_param; - - Priority_Specific_Policy : constant Character := Get_Policy (Prio); - -- Upper case first character of the policy name corresponding to the - -- task as set by a Priority_Specific_Dispatching pragma. - - begin - T.Common.Current_Priority := Prio; - Param.sched_priority := Interfaces.C.int (Underlying_Priorities (Prio)); - - if Dispatching_Policy = 'R' - or else Priority_Specific_Policy = 'R' - or else Time_Slice_Val > 0 - then - Result := - pthread_setschedparam - (T.Common.LL.Thread, SCHED_RR, Param'Access); - - elsif Dispatching_Policy = 'F' - or else Priority_Specific_Policy = 'F' - or else Time_Slice_Val = 0 - then - Result := - pthread_setschedparam - (T.Common.LL.Thread, SCHED_FIFO, Param'Access); - - else - Result := - pthread_setschedparam - (T.Common.LL.Thread, SCHED_OTHER, Param'Access); - end if; - - pragma Assert (Result = 0); - end Set_Priority; - - ------------------ - -- Get_Priority -- - ------------------ - - function Get_Priority (T : Task_Id) return System.Any_Priority is - begin - return T.Common.Current_Priority; - end Get_Priority; - - ---------------- - -- Enter_Task -- - ---------------- - - procedure Enter_Task (Self_ID : Task_Id) is - begin - Hide_Unhide_Yellow_Zone (Hide => True); - Self_ID.Common.LL.Thread := pthread_self; - - Specific.Set (Self_ID); - end Enter_Task; - - ------------------- - -- Is_Valid_Task -- - ------------------- - - function Is_Valid_Task return Boolean renames Specific.Is_Valid_Task; - - ----------------------------- - -- Register_Foreign_Thread -- - ----------------------------- - - function Register_Foreign_Thread return Task_Id is - begin - if Is_Valid_Task then - return Self; - else - return Register_Foreign_Thread (pthread_self); - end if; - end Register_Foreign_Thread; - - -------------------- - -- Initialize_TCB -- - -------------------- - - procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is - Mutex_Attr : aliased pthread_mutexattr_t; - Result : Interfaces.C.int; - Cond_Attr : aliased pthread_condattr_t; - - begin - if not Single_Lock then - Result := pthread_mutexattr_init (Mutex_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = 0 then - Result := - pthread_mutex_init - (Self_ID.Common.LL.L'Access, Mutex_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - end if; - - if Result /= 0 then - Succeeded := False; - return; - end if; - - Result := pthread_mutexattr_destroy (Mutex_Attr'Access); - pragma Assert (Result = 0); - end if; - - Result := pthread_condattr_init (Cond_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = 0 then - Result := - pthread_cond_init - (Self_ID.Common.LL.CV'Access, Cond_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - end if; - - if Result = 0 then - Succeeded := True; - else - if not Single_Lock then - Result := pthread_mutex_destroy (Self_ID.Common.LL.L'Access); - pragma Assert (Result = 0); - end if; - - Succeeded := False; - end if; - - Result := pthread_condattr_destroy (Cond_Attr'Access); - pragma Assert (Result = 0); - end Initialize_TCB; - - ----------------- - -- Create_Task -- - ----------------- - - procedure Create_Task - (T : Task_Id; - Wrapper : System.Address; - Stack_Size : System.Parameters.Size_Type; - Priority : System.Any_Priority; - Succeeded : out Boolean) - is - Attributes : aliased pthread_attr_t; - Adjusted_Stack_Size : Interfaces.C.size_t; - Result : Interfaces.C.int; - Param : aliased System.OS_Interface.struct_sched_param; - - Priority_Specific_Policy : constant Character := Get_Policy (Priority); - -- Upper case first character of the policy name corresponding to the - -- task as set by a Priority_Specific_Dispatching pragma. - - use System.Task_Info; - - begin - -- Account for the Yellow Zone (2 pages) and the guard page right above. - -- See Hide_Unhide_Yellow_Zone for the rationale. - - Adjusted_Stack_Size := - Interfaces.C.size_t (Stack_Size) + 3 * Get_Page_Size; - - Result := pthread_attr_init (Attributes'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result /= 0 then - Succeeded := False; - return; - end if; - - Result := - pthread_attr_setdetachstate - (Attributes'Access, PTHREAD_CREATE_DETACHED); - pragma Assert (Result = 0); - - Result := - pthread_attr_setstacksize - (Attributes'Access, Adjusted_Stack_Size); - pragma Assert (Result = 0); - - Param.sched_priority := - Interfaces.C.int (Underlying_Priorities (Priority)); - Result := - pthread_attr_setschedparam - (Attributes'Access, Param'Access); - pragma Assert (Result = 0); - - if Dispatching_Policy = 'R' - or else Priority_Specific_Policy = 'R' - or else Time_Slice_Val > 0 - then - Result := - pthread_attr_setschedpolicy - (Attributes'Access, System.OS_Interface.SCHED_RR); - - elsif Dispatching_Policy = 'F' - or else Priority_Specific_Policy = 'F' - or else Time_Slice_Val = 0 - then - Result := - pthread_attr_setschedpolicy - (Attributes'Access, System.OS_Interface.SCHED_FIFO); - - else - Result := - pthread_attr_setschedpolicy - (Attributes'Access, System.OS_Interface.SCHED_OTHER); - end if; - - pragma Assert (Result = 0); - - -- Set the scheduling parameters explicitly, since this is the only way - -- to force the OS to take e.g. the sched policy and scope attributes - -- into account. - - Result := - pthread_attr_setinheritsched - (Attributes'Access, PTHREAD_EXPLICIT_SCHED); - pragma Assert (Result = 0); - - T.Common.Current_Priority := Priority; - - if T.Common.Task_Info /= null then - case T.Common.Task_Info.Contention_Scope is - when System.Task_Info.Process_Scope => - Result := - pthread_attr_setscope - (Attributes'Access, PTHREAD_SCOPE_PROCESS); - - when System.Task_Info.System_Scope => - Result := - pthread_attr_setscope - (Attributes'Access, PTHREAD_SCOPE_SYSTEM); - - when System.Task_Info.Default_Scope => - Result := 0; - end case; - - pragma Assert (Result = 0); - end if; - - -- Since the initial signal mask of a thread is inherited from the - -- creator, and the Environment task has all its signals masked, we - -- do not need to manipulate caller's signal mask at this point. - -- All tasks in RTS will have All_Tasks_Mask initially. - - -- Note: the use of Unrestricted_Access in the following call is needed - -- because otherwise we have an error of getting a access-to-volatile - -- value which points to a non-volatile object. But in this case it is - -- safe to do this, since we know we have no problems with aliasing and - -- Unrestricted_Access bypasses this check. - - Result := - pthread_create - (T.Common.LL.Thread'Unrestricted_Access, - Attributes'Access, - Thread_Body_Access (Wrapper), - To_Address (T)); - pragma Assert (Result = 0 or else Result = EAGAIN); - - Succeeded := Result = 0; - - Result := pthread_attr_destroy (Attributes'Access); - pragma Assert (Result = 0); - - if Succeeded and then T.Common.Task_Info /= null then - - -- ??? We're using a process-wide function to implement a task - -- specific characteristic. - - if T.Common.Task_Info.Bind_To_Cpu_Number = 0 then - Result := bind_to_cpu (Curpid, 0); - - elsif T.Common.Task_Info.Bind_To_Cpu_Number > 0 then - Result := - bind_to_cpu - (Curpid, - Interfaces.C.unsigned_long ( - Interfaces.Shift_Left - (Interfaces.Unsigned_64'(1), - T.Common.Task_Info.Bind_To_Cpu_Number - 1))); - pragma Assert (Result = 0); - end if; - end if; - end Create_Task; - - ------------------ - -- Finalize_TCB -- - ------------------ - - procedure Finalize_TCB (T : Task_Id) is - Result : Interfaces.C.int; - - begin - if not Single_Lock then - Result := pthread_mutex_destroy (T.Common.LL.L'Access); - pragma Assert (Result = 0); - end if; - - Result := pthread_cond_destroy (T.Common.LL.CV'Access); - pragma Assert (Result = 0); - - if T.Known_Tasks_Index /= -1 then - Known_Tasks (T.Known_Tasks_Index) := null; - end if; - - ATCB_Allocation.Free_ATCB (T); - end Finalize_TCB; - - --------------- - -- Exit_Task -- - --------------- - - procedure Exit_Task is - begin - Specific.Set (null); - Hide_Unhide_Yellow_Zone (Hide => False); - end Exit_Task; - - ---------------- - -- Abort_Task -- - ---------------- - - procedure Abort_Task (T : Task_Id) is - Result : Interfaces.C.int; - begin - if Abort_Handler_Installed then - Result := pthread_kill (T.Common.LL.Thread, - Signal (System.Interrupt_Management.Abort_Task_Interrupt)); - pragma Assert (Result = 0); - end if; - end Abort_Task; - - ---------------- - -- Initialize -- - ---------------- - - procedure Initialize (S : in out Suspension_Object) is - Mutex_Attr : aliased pthread_mutexattr_t; - Cond_Attr : aliased pthread_condattr_t; - Result : Interfaces.C.int; - - begin - -- Initialize internal state (always to False (RM D.10(6))) - - S.State := False; - S.Waiting := False; - - -- Initialize internal mutex - - Result := pthread_mutexattr_init (Mutex_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - raise Storage_Error; - end if; - - Result := pthread_mutex_init (S.L'Access, Mutex_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result = ENOMEM then - Result := pthread_mutexattr_destroy (Mutex_Attr'Access); - raise Storage_Error; - end if; - - Result := pthread_mutexattr_destroy (Mutex_Attr'Access); - pragma Assert (Result = 0); - - -- Initialize internal condition variable - - Result := pthread_condattr_init (Cond_Attr'Access); - pragma Assert (Result = 0 or else Result = ENOMEM); - - Result := pthread_cond_init (S.CV'Access, Cond_Attr'Access); - - pragma Assert (Result = 0 or else Result = ENOMEM); - - if Result /= 0 then - Result := pthread_mutex_destroy (S.L'Access); - pragma Assert (Result = 0); - - if Result = ENOMEM then - raise Storage_Error; - end if; - end if; - end Initialize; - - -------------- - -- Finalize -- - -------------- - - procedure Finalize (S : in out Suspension_Object) is - Result : Interfaces.C.int; - - begin - -- Destroy internal mutex - - Result := pthread_mutex_destroy (S.L'Access); - pragma Assert (Result = 0); - - -- Destroy internal condition variable - - Result := pthread_cond_destroy (S.CV'Access); - pragma Assert (Result = 0); - end Finalize; - - ------------------- - -- Current_State -- - ------------------- - - function Current_State (S : Suspension_Object) return Boolean is - begin - -- We do not want to use lock on this read operation. State is marked - -- as Atomic so that we ensure that the value retrieved is correct. - - return S.State; - end Current_State; - - --------------- - -- Set_False -- - --------------- - - procedure Set_False (S : in out Suspension_Object) is - Result : Interfaces.C.int; - - begin - SSL.Abort_Defer.all; - - Result := pthread_mutex_lock (S.L'Access); - pragma Assert (Result = 0); - - S.State := False; - - Result := pthread_mutex_unlock (S.L'Access); - pragma Assert (Result = 0); - - SSL.Abort_Undefer.all; - end Set_False; - - -------------- - -- Set_True -- - -------------- - - procedure Set_True (S : in out Suspension_Object) is - Result : Interfaces.C.int; - - begin - SSL.Abort_Defer.all; - - Result := pthread_mutex_lock (S.L'Access); - pragma Assert (Result = 0); - - -- If there is already a task waiting on this suspension object then we - -- resume it, leaving the state of the suspension object to False, as - -- specified in (RM D.10(9)). Otherwise, leave the state set to True. - - if S.Waiting then - S.Waiting := False; - S.State := False; - - Result := pthread_cond_signal (S.CV'Access); - pragma Assert (Result = 0); - - else - S.State := True; - end if; - - Result := pthread_mutex_unlock (S.L'Access); - pragma Assert (Result = 0); - - SSL.Abort_Undefer.all; - end Set_True; - - ------------------------ - -- Suspend_Until_True -- - ------------------------ - - procedure Suspend_Until_True (S : in out Suspension_Object) is - Result : Interfaces.C.int; - - begin - SSL.Abort_Defer.all; - - Result := pthread_mutex_lock (S.L'Access); - pragma Assert (Result = 0); - - if S.Waiting then - - -- Program_Error must be raised upon calling Suspend_Until_True - -- if another task is already waiting on that suspension object - -- (AM D.10(10)). - - Result := pthread_mutex_unlock (S.L'Access); - pragma Assert (Result = 0); - - SSL.Abort_Undefer.all; - - raise Program_Error; - - else - -- Suspend the task if the state is False. Otherwise, the task - -- continues its execution, and the state of the suspension object - -- is set to False (RM D.10(9)). - - if S.State then - S.State := False; - else - S.Waiting := True; - - loop - -- Loop in case pthread_cond_wait returns earlier than expected - -- (e.g. in case of EINTR caused by a signal). - - Result := pthread_cond_wait (S.CV'Access, S.L'Access); - pragma Assert (Result = 0 or else Result = EINTR); - - exit when not S.Waiting; - end loop; - end if; - - Result := pthread_mutex_unlock (S.L'Access); - pragma Assert (Result = 0); - - SSL.Abort_Undefer.all; - end if; - end Suspend_Until_True; - - ---------------- - -- Check_Exit -- - ---------------- - - -- Dummy version - - function Check_Exit (Self_ID : ST.Task_Id) return Boolean is - pragma Unreferenced (Self_ID); - begin - return True; - end Check_Exit; - - -------------------- - -- Check_No_Locks -- - -------------------- - - function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is - pragma Unreferenced (Self_ID); - begin - return True; - end Check_No_Locks; - - ---------------------- - -- Environment_Task -- - ---------------------- - - function Environment_Task return Task_Id is - begin - return Environment_Task_Id; - end Environment_Task; - - -------------- - -- Lock_RTS -- - -------------- - - procedure Lock_RTS is - begin - Write_Lock (Single_RTS_Lock'Access, Global_Lock => True); - end Lock_RTS; - - ---------------- - -- Unlock_RTS -- - ---------------- - - procedure Unlock_RTS is - begin - Unlock (Single_RTS_Lock'Access, Global_Lock => True); - end Unlock_RTS; - - ------------------ - -- Suspend_Task -- - ------------------ - - function Suspend_Task - (T : ST.Task_Id; - Thread_Self : Thread_Id) return Boolean - is - pragma Unreferenced (T, Thread_Self); - begin - return False; - end Suspend_Task; - - ----------------- - -- Resume_Task -- - ----------------- - - function Resume_Task - (T : ST.Task_Id; - Thread_Self : Thread_Id) return Boolean - is - pragma Unreferenced (T, Thread_Self); - begin - return False; - end Resume_Task; - - -------------------- - -- Stop_All_Tasks -- - -------------------- - - procedure Stop_All_Tasks is - begin - null; - end Stop_All_Tasks; - - --------------- - -- Stop_Task -- - --------------- - - function Stop_Task (T : ST.Task_Id) return Boolean is - pragma Unreferenced (T); - begin - return False; - end Stop_Task; - - ------------------- - -- Continue_Task -- - ------------------- - - function Continue_Task (T : ST.Task_Id) return Boolean is - pragma Unreferenced (T); - begin - return False; - end Continue_Task; - - ---------------- - -- Initialize -- - ---------------- - - procedure Initialize (Environment_Task : Task_Id) is - act : aliased struct_sigaction; - old_act : aliased struct_sigaction; - Tmp_Set : aliased sigset_t; - Result : Interfaces.C.int; - - function State - (Int : System.Interrupt_Management.Interrupt_ID) return Character; - pragma Import (C, State, "__gnat_get_interrupt_state"); - -- Get interrupt state. Defined in a-init.c. The input argument is - -- the interrupt number, and the result is one of the following: - - Default : constant Character := 's'; - -- 'n' this interrupt not set by any Interrupt_State pragma - -- 'u' Interrupt_State pragma set state to User - -- 'r' Interrupt_State pragma set state to Runtime - -- 's' Interrupt_State pragma set state to System (use "default" - -- system handler) - - begin - Environment_Task_Id := Environment_Task; - - Interrupt_Management.Initialize; - - -- Prepare the set of signals that should unblocked in all tasks - - Result := sigemptyset (Unblocked_Signal_Mask'Access); - pragma Assert (Result = 0); - - for J in Interrupt_Management.Interrupt_ID loop - if System.Interrupt_Management.Keep_Unmasked (J) then - Result := sigaddset (Unblocked_Signal_Mask'Access, Signal (J)); - pragma Assert (Result = 0); - end if; - end loop; - - Curpid := getpid; - - -- Initialize the lock used to synchronize chain of all ATCBs - - Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level); - - Specific.Initialize (Environment_Task); - - -- Make environment task known here because it doesn't go through - -- Activate_Tasks, which does it for all other tasks. - - Known_Tasks (Known_Tasks'First) := Environment_Task; - Environment_Task.Known_Tasks_Index := Known_Tasks'First; - - Enter_Task (Environment_Task); - - if State - (System.Interrupt_Management.Abort_Task_Interrupt) /= Default - then - act.sa_flags := 0; - act.sa_handler := Abort_Handler'Address; - - Result := sigemptyset (Tmp_Set'Access); - pragma Assert (Result = 0); - act.sa_mask := Tmp_Set; - - Result := - sigaction - (Signal (System.Interrupt_Management.Abort_Task_Interrupt), - act'Unchecked_Access, - old_act'Unchecked_Access); - pragma Assert (Result = 0); - Abort_Handler_Installed := True; - end if; - end Initialize; - - ----------------------- - -- Set_Task_Affinity -- - ----------------------- - - procedure Set_Task_Affinity (T : ST.Task_Id) is - pragma Unreferenced (T); - - begin - -- Setting task affinity is not supported by the underlying system - - null; - end Set_Task_Affinity; -end System.Task_Primitives.Operations; diff --git a/gcc/ada/s-tasinf-tru64.ads b/gcc/ada/s-tasinf-tru64.ads deleted file mode 100644 index af2832d09e1..00000000000 --- a/gcc/ada/s-tasinf-tru64.ads +++ /dev/null @@ -1,110 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- S Y S T E M . T A S K _ I N F O -- --- -- --- S p e c -- --- (Compiler Interface) -- --- -- --- Copyright (C) 1998-2009, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This package contains the definitions and routines associated with the --- implementation and use of the Task_Info pragma. It is specialized --- appropriately for targets that make use of this pragma. - --- Note: the compiler generates direct calls to this interface, via Rtsfind. --- Any changes to this interface may require corresponding compiler changes. - --- This unit may be used directly from an application program by providing --- an appropriate WITH, and the interface can be expected to remain stable. - --- This is a DEC Unix 4.0d version of this package - -package System.Task_Info is - pragma Preelaborate; - pragma Elaborate_Body; - -- To ensure that a body is allowed - - ----------------------------------------- - -- Implementation of Task_Info Feature -- - ----------------------------------------- - - -- The Task_Info pragma: - - -- pragma Task_Info (EXPRESSION); - - -- allows the specification on a task by task basis of a value of type - -- System.Task_Info.Task_Info_Type to be passed to a task when it is - -- created. The specification of this type, and the effect on the task - -- that is created is target dependent. - - -- The Task_Info pragma appears within a task definition (compare the - -- definition and implementation of pragma Priority). If no such pragma - -- appears, then the value Unspecified_Task_Info is passed. If a pragma - -- is present, then it supplies an alternative value. If the argument of - -- the pragma is a discriminant reference, then the value can be set on - -- a task by task basis by supplying the appropriate discriminant value. - - -- Note that this means that the type used for Task_Info_Type must be - -- suitable for use as a discriminant (i.e. a scalar or access type). - - ------------------ - -- Declarations -- - ------------------ - - type Scope_Type is - (Process_Scope, - -- Contend only with threads in same process - - System_Scope, - -- Contend with all threads on same CPU - - Default_Scope); - - type Thread_Attributes is record - Bind_To_Cpu_Number : Integer; - -- -1: Do nothing - -- 0: Unbind - -- 1-N: Bind all unbound threads to this CPU - - Contention_Scope : Scope_Type; - end record; - - type Task_Info_Type is access all Thread_Attributes; - -- Type used for passing information to task create call, using the - -- Task_Info pragma. This type may be specialized for individual - -- implementations, but it must be a type that can be used as a - -- discriminant (i.e. a scalar or access type). - - Unspecified_Thread_Attribute : aliased Thread_Attributes := - Thread_Attributes'(-1, Default_Scope); - - Unspecified_Task_Info : constant Task_Info_Type := - Unspecified_Thread_Attribute'Access; - -- Value passed to task in the absence of a Task_Info pragma - -- Don't call new here because the tasking run time has not been - -- elaborated yet, so calling Task_Lock is unsafe. - -end System.Task_Info; diff --git a/gcc/ada/s-taspri-tru64.ads b/gcc/ada/s-taspri-tru64.ads deleted file mode 100644 index 41c9aeaa3cd..00000000000 --- a/gcc/ada/s-taspri-tru64.ads +++ /dev/null @@ -1,119 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . T A S K _ P R I M I T I V E S -- --- -- --- S p e c -- --- -- --- Copyright (C) 1991-2011, Free Software Foundation, Inc. -- --- -- --- GNARL is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the DEC Unix 4.0 version of this package - --- This package provides low-level support for most tasking features - -pragma Polling (Off); --- Turn off polling, we do not want ATC polling to take place during tasking --- operations. It causes infinite loops and other problems. - -with Interfaces.C; - -with System.OS_Interface; - -package System.Task_Primitives is - pragma Preelaborate; - - type Lock is limited private; - -- Should be used for implementation of protected objects - - type RTS_Lock is limited private; - -- Should be used inside the runtime system. The difference between Lock - -- and the RTS_Lock is that the later one serves only as a semaphore so - -- that do not check for ceiling violations. - - type Suspension_Object is limited private; - -- Should be used for the implementation of Ada.Synchronous_Task_Control - - type Task_Body_Access is access procedure; - -- Pointer to the task body's entry point (or possibly a wrapper - -- declared local to the GNARL). - - type Private_Data is limited private; - -- Any information that the GNULLI needs maintained on a per-task basis. - -- A component of this type is guaranteed to be included - - subtype Task_Address is System.Address; - -- In some versions of Task_Primitives, notably for VMS, Task_Address is - -- the short version of address defined in System.Aux_DEC. To avoid - -- dragging Aux_DEC into tasking packages a tasking specific subtype is - -- defined here. - - Task_Address_Size : constant := Standard'Address_Size; - -- The size of Task_Address - - Alternate_Stack_Size : constant := 0; - -- No alternate signal stack is used on this platform - -private - - type Lock is record - L : aliased System.OS_Interface.pthread_mutex_t; - Ceiling : Interfaces.C.int; - end record; - - type RTS_Lock is new System.OS_Interface.pthread_mutex_t; - - type Suspension_Object is record - State : Boolean; - pragma Atomic (State); - -- Boolean that indicates whether the object is open. This field is - -- marked Atomic to ensure that we can read its value without locking - -- the access to the Suspension_Object. - - Waiting : Boolean; - -- Flag showing if there is a task already suspended on this object - - L : aliased System.OS_Interface.pthread_mutex_t; - -- Protection for ensuring mutual exclusion on the Suspension_Object - - CV : aliased System.OS_Interface.pthread_cond_t; - -- Condition variable used to queue threads until the is signaled - end record; - - type Private_Data is record - Thread : aliased System.OS_Interface.pthread_t; - pragma Atomic (Thread); - -- Thread field may be updated by two different threads of control. - -- (See, Enter_Task and Create_Task in s-taprop.adb). They put the same - -- value (thr_self value). We do not want to use lock on those - -- operations and the only thing we have to make sure is that they are - -- updated in atomic fashion. - - CV : aliased System.OS_Interface.pthread_cond_t; - - L : aliased RTS_Lock; - -- Protection for all components is lock L - end record; - -end System.Task_Primitives; diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index bfe7bce3278..6d77a76ea49 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -252,7 +252,7 @@ __gnat_ttyname (int filedes) #endif #if defined (linux) || defined (sun) || defined (sgi) \ - || (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \ + || ! defined (__alpha_vxworks) || defined (WINNT) \ || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \ || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \ || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ @@ -310,7 +310,7 @@ getc_immediate_common (FILE *stream, int waiting) { #if defined (linux) || defined (sun) || defined (sgi) \ - || (defined (__osf__) && ! defined (__alpha_vxworks)) \ + || ! defined (__alpha_vxworks) \ || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \ || defined (_AIX) || (defined (__svr4__) && defined (i386)) \ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ @@ -331,7 +331,7 @@ getc_immediate_common (FILE *stream, termios_rec.c_lflag = termios_rec.c_lflag & ~ICANON & ~ECHO; #if defined(linux) || defined (sun) || defined (sgi) \ - || defined (__osf__) || defined (__MACHTEN__) || defined (__hpux__) \ + || defined (__MACHTEN__) || defined (__hpux__) \ || defined (_AIX) || (defined (__svr4__) && defined (i386)) \ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ || defined (__GLIBC__) || defined (__APPLE__) @@ -842,11 +842,11 @@ __gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off) (*Unlock_Task) (); } -/* Darwin, Free BSD, Linux, Tru64, where component tm_gmtoff is present in +/* Darwin, Free BSD, Linux, where component tm_gmtoff is present in struct tm */ #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\ - (defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__) + defined (__GLIBC__) { localtime_r (timer, &tp); *off = tp.tm_gmtoff; diff --git a/gcc/ada/system-tru64.ads b/gcc/ada/system-tru64.ads deleted file mode 100644 index 43facc7465f..00000000000 --- a/gcc/ada/system-tru64.ads +++ /dev/null @@ -1,214 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (DEC Unix Version) -- --- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := Long_Long_Integer'First; - Max_Int : constant := Long_Long_Integer'Last; - - Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := 63; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 1024.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 64; - Memory_Size : constant := 2 ** 64; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - Max_Priority : constant Positive := 60; - Max_Interrupt_Priority : constant Positive := 63; - - subtype Any_Priority is Integer range 0 .. 63; - subtype Priority is Any_Priority range 0 .. 60; - subtype Interrupt_Priority is Any_Priority range 61 .. 63; - - Default_Priority : constant Priority := 30; - -private - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := False; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Fractional_Fixed_Ops : constant Boolean := False; - Frontend_Layout : constant Boolean := False; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := True; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := True; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - -- Note: Denorm is False because denormals are only handled properly - -- if the -mieee switch is set, and we do not require this usage. - - --------------------------- - -- Underlying Priorities -- - --------------------------- - - -- Important note: this section of the file must come AFTER the - -- definition of the system implementation parameters to ensure - -- that the value of these parameters is available for analysis - -- of the declarations here (using Rtsfind at compile time). - - -- The underlying priorities table provides a generalized mechanism - -- for mapping from Ada priorities to system priorities. In some - -- cases a 1-1 mapping is not the convenient or optimal choice. - - -- For Dec Unix 4.0d, we use a default 1-to-1 mapping that provides - -- the full range of 64 priorities available from the operating system. - - -- On DU prior to 4.0d, less than 64 priorities are available so there - -- are two possibilities: - - -- Limit your range of priorities to the range provided by the - -- OS (e.g 16 .. 32 on 4.0b) - - -- Replace the standard table as described below - - -- To replace the default values of the Underlying_Priorities mapping, - -- copy this source file into your build directory, edit the file to - -- reflect your desired behavior, and recompile with the command: - - -- $ gcc -c -O3 -gnatpgn system.ads - - -- then recompile the run-time parts that depend on this package: - - -- $ gnatmake -a -gnatn -O3 <your application> - - -- then force rebuilding your application if you need different options: - - -- $ gnatmake -f <your options> <your application> - - type Priorities_Mapping is array (Any_Priority) of Integer; - pragma Suppress_Initialization (Priorities_Mapping); - -- Suppress initialization in case gnat.adc specifies Normalize_Scalars - - Underlying_Priorities : constant Priorities_Mapping := - - (Priority'First => 0, - - 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, - 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, - 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, - 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, - 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, - 26 => 26, 27 => 27, 28 => 28, 29 => 29, - - Default_Priority => 30, - - 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, - 36 => 36, 37 => 37, 38 => 38, 39 => 39, 40 => 40, - 41 => 41, 42 => 42, 43 => 43, 44 => 44, 45 => 45, - 46 => 46, 47 => 47, 48 => 48, 49 => 49, 50 => 50, - 51 => 51, 52 => 52, 53 => 53, 54 => 54, 55 => 55, - 56 => 56, 57 => 57, 58 => 58, 59 => 59, - - Priority'Last => 60, - - 61 => 61, 62 => 62, - - Interrupt_Priority'Last => 63); - -end System; diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c index 18a4f2a29bc..cb1414a96df 100644 --- a/gcc/ada/terminals.c +++ b/gcc/ada/terminals.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2008-2011, AdaCore * + * Copyright (C) 2008-2012, AdaCore * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -976,9 +976,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) || defined (__DragonFly__) # define FREEBSD #endif -#if defined (__alpha__) && defined (__osf__) -# define OSF1 -#endif #if defined (__mips) && defined (__sgi) # define IRIX #endif @@ -1048,18 +1045,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) #define USE_CLONE_DEVICE "/dev/ptmx" #elif defined (_AIX) #define USE_CLONE_DEVICE "/dev/ptc" -#elif defined (OSF1) -/* On Tru64, the systems offers various interfaces to open a terminal: - - /dev/ptmx: this the system V driver (stream based), - - /dev/ptmx_bsd: the non stream based clone device, - - the openpty function which use BSD interface. - - Using directly /dev/ptmx_bsd on Tru64 5.1B seems to consume all the - available slave ptys (why ?). When using openpty it seems that the function - handles the creation of entries in /dev/pts when necessary and so avoid this - starvation issue. The pty man entry suggests also to use openpty. -*/ -#define USE_OPENPTY #elif defined (__hpux__) /* On HP-UX we use the streamed version. Using the non streamed version is not recommanded (through "/dev/ptym/clone"). Indeed it seems that there are diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index bb9c90191bf..b5085cd5136 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix + handling. + * c-pragma.c (handle_pragma_extern_prefix): Remove. + (init_pragma): Don't register extern_prefix. + 2012-03-12 Richard Guenther <rguenther@suse.de> * c-common.c (c_common_get_narrower): Use c_common_type_for_size. diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 608dba6ecd4..40a0a620dbf 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -1,6 +1,6 @@ /* Define builtin-in macros for the C family front ends. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -886,9 +886,6 @@ c_cpp_builtins (cpp_reader *pfile) /* Show the availability of some target pragmas. */ cpp_define (pfile, "__PRAGMA_REDEFINE_EXTNAME"); - if (targetm.handle_pragma_extern_prefix) - cpp_define (pfile, "__PRAGMA_EXTERN_PREFIX"); - /* Make the choice of the stack protector runtime visible to source code. The macro names and values here were chosen for compatibility with an earlier implementation, i.e. ProPolice. */ diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index 930423bcff6..5a8debc75d3 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -1,6 +1,6 @@ /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack. Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -371,7 +371,7 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy)) /* GCC supports two #pragma directives for renaming the external symbol associated with a declaration (DECL_ASSEMBLER_NAME), for - compatibility with the Solaris and Tru64 system headers. GCC also + compatibility with the Solaris and VMS system headers. GCC also has its own notation for this, __asm__("name") annotations. Corner cases of these features and their interaction: @@ -497,27 +497,6 @@ add_to_renaming_pragma_list (tree oldname, tree newname) /* The current prefix set by #pragma extern_prefix. */ GTY(()) tree pragma_extern_prefix; -/* #pragma extern_prefix "prefix" */ -static void -handle_pragma_extern_prefix (cpp_reader * ARG_UNUSED (dummy)) -{ - tree prefix, x; - enum cpp_ttype t; - - if (pragma_lex (&prefix) != CPP_STRING) - GCC_BAD ("malformed #pragma extern_prefix, ignored"); - t = pragma_lex (&x); - if (t != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of %<#pragma extern_prefix%>"); - - if (targetm.handle_pragma_extern_prefix) - /* Note that the length includes the null terminator. */ - pragma_extern_prefix = (TREE_STRING_LENGTH (prefix) > 1 ? prefix : NULL); - else if (warn_unknown_pragmas > in_system_header) - warning (OPT_Wunknown_pragmas, - "#pragma extern_prefix not supported on this target"); -} - /* Hook from the front ends to apply the results of one of the preceding pragmas that rename variables. */ @@ -1396,7 +1375,6 @@ init_pragma (void) c_register_pragma_with_expansion (0, "redefine_extname", handle_pragma_redefine_extname); - c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix); c_register_pragma_with_expansion (0, "message", handle_pragma_message); diff --git a/gcc/config.gcc b/gcc/config.gcc index aa30518d254..e7b468c7651 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -246,8 +246,7 @@ case ${target} in arm*-*-*eabi* \ ) ;; - alpha*-dec-osf5.1* \ - | arm*-*-ecos-elf \ + arm*-*-ecos-elf \ | arm*-*-elf \ | arm*-*-freebsd* \ | arm*-*-linux* \ @@ -788,30 +787,6 @@ alpha*-*-openbsd*) # default x-alpha is only appropriate for dec-osf. target_cpu_default="MASK_GAS" ;; -alpha*-dec-osf5.1*) - if test x$stabs = xyes - then - tm_file="${tm_file} dbx.h" - fi - # mips-tfile and mips-tdump are only used with the native assembler - # and require the Tru64 UNIX <a.out.h>, so only build native. - if test x$gas != xyes && test x${host} = x${target} - then - extra_passes="mips-tfile mips-tdump" - fi - use_collect2=yes - tmake_file="t-slibgcc" - tm_file="${tm_file} alpha/osf5.h" - tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1" - extra_options="${extra_options} rpath.opt alpha/osf5.opt" - extra_headers=va_list.h - use_gcc_stdint=provide - case ${enable_threads} in - "" | yes | posix) - thread_file='posix' - ;; - esac - ;; alpha*-dec-*vms*) tm_file="${tm_file} vms/vms.h alpha/vms.h" tmake_file="${tmake_file} alpha/t-vms" diff --git a/gcc/config.host b/gcc/config.host index 696c79e3507..df865e21531 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -1,6 +1,6 @@ # GCC host-specific configuration file. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007, 2008, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# 2010, 2011, 2012 Free Software Foundation, Inc. #This file is part of GCC. @@ -108,9 +108,9 @@ case ${host} in ;; esac ;; - alpha*-*-linux* | alpha*-dec-osf*) + alpha*-*-linux*) case ${target} in - alpha*-*-linux* | alpha*-dec-osf*) + alpha*-*-linux*) host_extra_gcc_objs="driver-alpha.o" host_xmake_file="${host_xmake_file} alpha/x-alpha" ;; @@ -193,10 +193,6 @@ case ${host} in prefix=/gnu local_prefix=/gnu/local ;; - alpha*-dec-osf*) - out_host_hook_obj=host-osf.o - host_xmake_file="${host_xmake_file} alpha/x-osf" - ;; alpha*-dec-*vms*) host_xm_file="vms/xm-vms.h" host_xmake_file=vms/x-vms diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 7305f6fbb26..bd1408332fb 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on the DEC Alpha. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -4673,7 +4673,7 @@ struct GTY(()) machine_function /* For OSF. */ const char *some_ld_name; - /* For TARGET_LD_BUGGY_LDGP. */ + /* For flag_reorder_blocks_and_partition. */ rtx gp_save_rtx; /* For VMS condition handlers. */ @@ -7859,10 +7859,8 @@ alpha_start_function (FILE *file, const char *fnname, HOST_WIDE_INT sa_size; /* Complete stack size needed. */ unsigned HOST_WIDE_INT frame_size; - /* The maximum debuggable frame size (512 Kbytes using Tru64 as). */ - unsigned HOST_WIDE_INT max_frame_size = TARGET_ABI_OSF && !TARGET_GAS - ? 524288 - : 1UL << 31; + /* The maximum debuggable frame size. */ + unsigned HOST_WIDE_INT max_frame_size = 1UL << 31; /* Offset from base reg to register save area. */ HOST_WIDE_INT reg_offset; char *entry_label = (char *) alloca (strlen (fnname) + 6); diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 07ffa9fe8b1..a903024ca8b 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2004, 2005, 2007, 2008, 2009, 2010, 2011 + 2000, 2001, 2002, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -161,9 +161,6 @@ extern enum alpha_fp_trap_mode alpha_fptm; #ifndef TARGET_PROFILING_NEEDS_GP #define TARGET_PROFILING_NEEDS_GP 0 #endif -#ifndef TARGET_LD_BUGGY_LDGP -#define TARGET_LD_BUGGY_LDGP 0 -#endif #ifndef TARGET_FIXUP_EV5_PREFETCH #define TARGET_FIXUP_EV5_PREFETCH 0 #endif diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index e715cc86422..7280e76075f 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -1,6 +1,6 @@ ;; Machine description for DEC Alpha for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 +;; 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 ;; Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; @@ -5869,13 +5869,13 @@ ;; calculation, a jump to original landing pad is emitted in the place of the ;; original landing pad. Since landing pad is moved, RA-relative GP ;; calculation in the prologue of landing pad breaks. To solve this problem, -;; we use alternative GP load approach, as in the case of TARGET_LD_BUGGY_LDGP. +;; we use alternative GP load approach. (define_expand "exception_receiver" [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)] "TARGET_ABI_OSF" { - if (TARGET_LD_BUGGY_LDGP || flag_reorder_blocks_and_partition) + if (flag_reorder_blocks_and_partition) operands[0] = alpha_gp_save_rtx (); else operands[0] = const0_rtx; @@ -5883,8 +5883,7 @@ (define_insn "*exception_receiver_2" [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)] - "TARGET_ABI_OSF - && (TARGET_LD_BUGGY_LDGP || flag_reorder_blocks_and_partition)" + "TARGET_ABI_OSF && flag_reorder_blocks_and_partition" "ldq $29,%0" [(set_attr "type" "ild")]) diff --git a/gcc/config/alpha/host-osf.c b/gcc/config/alpha/host-osf.c deleted file mode 100644 index 0a554b3ec2c..00000000000 --- a/gcc/config/alpha/host-osf.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Tru64 UNIX host-specific hook definitions. - Copyright (C) 2011 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC 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 3, or (at your - option) any later version. - - GCC 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 GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include <sys/mman.h> -/* Inhibit inclusion of <sys/mount.h>, unnecessary and errors out due to - use of poisoned bcmp, bcopy. */ -#define _SYS_MOUNT_H_ -#include <sys/procfs.h> -#include "hosthooks.h" -#include "hosthooks-def.h" - - -#undef HOST_HOOKS_GT_PCH_GET_ADDRESS -#define HOST_HOOKS_GT_PCH_GET_ADDRESS osf_gt_pch_get_address -#undef HOST_HOOKS_GT_PCH_USE_ADDRESS -#define HOST_HOOKS_GT_PCH_USE_ADDRESS osf_gt_pch_use_address - -/* The mmap ADDR parameter may be ignored without MAP_FIXED set. Before we - give up, check existing mappings with ioctl(PIOCMAP) to see if the space - is really free. */ - -static void * -mmap_fixed (void *addr, size_t len, int prot, int flags, int fd, off_t off) -{ - void *base; - - base = mmap ((caddr_t) addr, len, prot, flags, fd, off); - - if (base != addr) - { - /* PID_MAX is SHRT_MAX on Tru64 UNIX V4.0, but INT_MAX on V5.1. - Allow for both. "/proc/" + INT_MAX + '\0'. */ - char pname[6+10+1]; - int procfd, nmap; - prmap_t *pmap; - int i, overlap = 0; - - if (base != (void *) MAP_FAILED) - munmap ((caddr_t) base, len); - - /* Check if there's any mapping overlapping [addr, addr+len). */ - - snprintf (pname, sizeof (pname), "/proc/%d", getpid ()); - procfd = open (pname, O_RDONLY); - if (procfd == -1) - return ((void *) MAP_FAILED); - if (ioctl (procfd, PIOCNMAP, &nmap) == -1) - return ((void *) MAP_FAILED); - pmap = (prmap_t *) xmalloc (sizeof (*pmap) * (nmap+1)); - if (ioctl (procfd, PIOCMAP, pmap) == -1) - return ((void *) MAP_FAILED); - - /* It seems like pmap[] is sorted by address, but can we rely on - that? */ - for (i = 0; i < nmap; i++) - { - uintptr_t map_start = (uintptr_t) pmap[i].pr_vaddr; - uintptr_t map_end = map_start + pmap[i].pr_size; - - if ((uintptr_t) addr < map_end - && (uintptr_t) addr+len > map_start) - { - overlap = 1; - break; - } - } - free (pmap); - close (procfd); - - if (!overlap) - base = mmap ((caddr_t) addr, len, prot, flags | MAP_FIXED, fd, off); - else - base = mmap ((caddr_t) addr, len, prot, flags, fd, off); - } - - return base; -} - -/* For various ports, try to guess a fixed spot in the vm space that's - probably free. Take the middle between start of text segment and - dynamic loader space. See <sys/machine/addrconf.h> and Tru64 UNIX - Assembly Language Programmer's Guide, p.6-18, Figure 6-3: Default Layout - of Memory (User Program View). */ -#define TRY_EMPTY_VM_SPACE 0x20050000000 - -/* Determine a location where we might be able to reliably allocate - SIZE bytes. FD is the PCH file, though we should return with the - file unmapped. */ - -static void * -osf_gt_pch_get_address (size_t size, int fd) -{ - void *addr; - - addr = mmap_fixed ((caddr_t) TRY_EMPTY_VM_SPACE, size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); - - /* If we failed the map, that means there's *no* free space. */ - if (addr == (void *) MAP_FAILED) - return NULL; - /* Unmap the area before returning. */ - munmap ((caddr_t) addr, size); - - return addr; -} - -/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at - mapping the data at BASE, -1 if we couldn't. */ - -static int -osf_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) -{ - void *addr; - - /* We're called with size == 0 if we're not planning to load a PCH - file at all. This allows the hook to free any static space that - we might have allocated at link time. */ - if (size == 0) - return -1; - - addr = mmap_fixed ((caddr_t) base, size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset); - - return addr == base ? 1 : -1; -} - - -const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/gcc/config/alpha/osf5.h b/gcc/config/alpha/osf5.h deleted file mode 100644 index ee21f4b9c21..00000000000 --- a/gcc/config/alpha/osf5.h +++ /dev/null @@ -1,279 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on - Tru64 UNIX V5.1. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 - Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - -This file is part of GCC. - -GCC 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 3, or (at your option) -any later version. - -GCC 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 GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -/* As of DEC OSF/1 V4.0, as can subtract adjacent labels. */ - -#undef TARGET_AS_CAN_SUBTRACT_LABELS -#define TARGET_AS_CAN_SUBTRACT_LABELS 1 - -/* The GEM libraries for X_float are present, though not used by C. */ - -#undef TARGET_HAS_XFLOATING_LIBS -#define TARGET_HAS_XFLOATING_LIBS 1 - -/* Tru64 UNIX V5.1 uses IEEE QUAD format. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FPREGS | MASK_LONG_DOUBLE_128) - -/* The linker appears to perform invalid code optimizations that result - in the ldgp emitted for the exception_receiver pattern being incorrectly - linked. */ -#undef TARGET_LD_BUGGY_LDGP -#define TARGET_LD_BUGGY_LDGP 1 - -/* Tru64 UNIX V5.1 has the float and long double forms of math functions. */ -#undef TARGET_C99_FUNCTIONS -#define TARGET_C99_FUNCTIONS 1 - -/* Names to predefine in the preprocessor for this target machine. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define_std ("unix"); \ - builtin_define_std ("SYSTYPE_BSD"); \ - builtin_define ("_SYSTYPE_BSD"); \ - builtin_define ("__osf__"); \ - builtin_define ("__digital__"); \ - builtin_define ("__arch64__"); \ - builtin_define ("_LONGLONG"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=xpg4"); \ - /* Tru64 UNIX V5 has a 16 byte long \ - double type and requires __X_FLOAT \ - to be defined for <math.h>. */ \ - if (LONG_DOUBLE_TYPE_SIZE == 128) \ - builtin_define ("__X_FLOAT"); \ - \ - /* Tru64 UNIX V4/V5 provide several ISO C94 \ - features protected by the corresponding \ - __STDC_VERSION__ macro. libstdc++ v3 \ - needs them as well. */ \ - if (c_dialect_cxx ()) \ - builtin_define ("__STDC_VERSION__=199409L"); \ - } while (0) - -/* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4 - instead of PTHREAD_USE_D4 since both have the same effect and the former - doesn't invade the users' namespace. */ - -#undef CPP_SPEC -#define CPP_SPEC \ -"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" - -/* -mcpu=native handling only makes sense with compiler running on - an Alpha chip. */ -#if defined(__alpha__) || defined(__alpha) -extern const char *host_detect_local_cpu (int argc, const char **argv); -# define EXTRA_SPEC_FUNCTIONS \ - { "local_cpu_detect", host_detect_local_cpu }, - -# define MCPU_MTUNE_NATIVE_SPECS \ - " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \ - " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}" -#else -# define MCPU_MTUNE_NATIVE_SPECS "" -#endif - -#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS - -/* Under DEC OSF/1 V4, -p and -pg require -lprof1, and -lprof1 requires - -lpdf. */ - -#define LIB_SPEC \ -"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} \ - %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc" - -/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are - optimizing, -O1 if we are not. Pass -S to silence `weak symbol - multiply defined' warnings. Pass -shared, -non_shared or - -call_shared as appropriate. Pass -hidden_symbol so that our - constructor and call-frame data structures are not accidentally - overridden. */ -#define LINK_SPEC \ - "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \ - %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \ - %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}" - -#define STARTFILE_SPEC \ - "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" - -#define ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" - -#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" - -/* In Tru64 UNIX V5.1, Compaq introduced a new assembler - (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and - 3.04.32) breaks mips-tfile. Passing the undocumented -oldas flag reverts - to using the old assembler (/usr/lib/cmplrs/cc/as[01]). - - It is clearly not desirable to depend on this undocumented flag, and - Compaq wants -oldas to go away soon, but until they have released a - new adu that works with mips-tfile, this is the only option. - - In some versions of the DTK, the assembler driver invokes ld after - assembly. This has been fixed in current versions, but adding -c - works as expected for all versions. */ - -#define ASM_OLDAS_SPEC "-oldas -c" - -/* In OSF/1 v3.2c, the assembler by default does not output file names which - causes mips-tfile to fail. Passing -g to the assembler fixes this problem. - ??? Strictly speaking, we need -g only if the user specifies -g. Passing - it always means that we get slightly larger than necessary object files - if the user does not specify -g. If we don't pass -g, then mips-tfile - will need to be fixed to work in this case. Pass -O0 since some - optimization are broken and don't help us anyway. */ -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 -#define ASM_SPEC "%{malpha-as:-g " ASM_OLDAS_SPEC " %{pg} -O0}" -#else -#define ASM_SPEC "%{!mgas:-g " ASM_OLDAS_SPEC " %{pg} -O0}" -#endif - -/* Specify to run a post-processor, mips-tfile after the assembler - has run to stuff the ecoff debug information into the object file. - This is needed because the Alpha assembler provides no way - of specifying such information in the assembly file. */ - -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 - -#define ASM_FINAL_SPEC "\ -%{malpha-as: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{,assembler:%i;:%g.s}}}" - -#else -#define ASM_FINAL_SPEC "\ -%{!mgas: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{,assembler:%i;:%g.s}}}" - -#endif - -/* Indicate that we have a stamp.h to use. */ -#ifndef CROSS_DIRECTORY_STRUCTURE -#define HAVE_STAMP_H 1 -#endif - -#define HAVE_ENABLE_EXECUTE_STACK - -/* Digital UNIX V4.0E (1091)/usr/include/sys/types.h 4.3.49.9 1997/08/14 */ -#define SIZE_TYPE "long unsigned int" -#define PTRDIFF_TYPE "long int" - -#define SIG_ATOMIC_TYPE "int" - -#define INT8_TYPE "signed char" -#define INT16_TYPE "short int" -#define INT32_TYPE "int" -#define INT64_TYPE "long int" -#define UINT8_TYPE "unsigned char" -#define UINT16_TYPE "short unsigned int" -#define UINT32_TYPE "unsigned int" -#define UINT64_TYPE "long unsigned int" - -#define INT_LEAST8_TYPE "signed char" -#define INT_LEAST16_TYPE "short int" -#define INT_LEAST32_TYPE "int" -#define INT_LEAST64_TYPE "long int" -#define UINT_LEAST8_TYPE "unsigned char" -#define UINT_LEAST16_TYPE "short unsigned int" -#define UINT_LEAST32_TYPE "unsigned int" -#define UINT_LEAST64_TYPE "long unsigned int" - -#define INT_FAST8_TYPE "signed char" -#define INT_FAST16_TYPE "int" -#define INT_FAST32_TYPE "int" -#define INT_FAST64_TYPE "long int" -#define UINT_FAST8_TYPE "unsigned char" -#define UINT_FAST16_TYPE "unsigned int" -#define UINT_FAST32_TYPE "unsigned int" -#define UINT_FAST64_TYPE "long unsigned int" - -#define INTPTR_TYPE "long int" -#define UINTPTR_TYPE "long unsigned int" - -/* The linker will stick __main into the .init section. */ -#define HAS_INIT_SECTION -#define LD_INIT_SWITCH "-init" -#define LD_FINI_SWITCH "-fini" - -/* From Tru64 UNIX Object File and Symbol Table Format Specification, - 2.3.5 Alignment, p.19. */ -#define MAX_OFILE_ALIGNMENT (64 * 1024 * BITS_PER_UNIT) - -/* Select a format to encode pointers in exception handling data. CODE - is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is - true if the symbol may be affected by dynamic relocations. - - We really ought to be using the SREL32 relocations that ECOFF has, - but no version of the native assembler supports creating such things, - and Compaq has no plans to rectify this. Worse, the dynamic loader - cannot handle unaligned relocations, so we have to make sure that - things get padded appropriately. */ -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - (TARGET_GAS \ - ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \ - : DW_EH_PE_aligned) - -/* The Tru64 UNIX assembler warns on .lcomm with SIZE 0, so use 1 in that - case. */ -#undef ASM_OUTPUT_LOCAL -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \ -( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE) ? (SIZE) : 1)) - -/* This is how we tell the assembler that a symbol is weak. */ - -#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ - do \ - { \ - (*targetm.asm_out.globalize_label) (FILE, NAME); \ - fputs ("\t.weakext\t", FILE); \ - assemble_name (FILE, NAME); \ - if (VALUE) \ - { \ - fputc (' ', FILE); \ - assemble_name (FILE, VALUE); \ - } \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) - -/* The native assembler doesn't understand parenthesis. */ -#define TARGET_ASM_OPEN_PAREN "" -#define TARGET_ASM_CLOSE_PAREN "" - -/* Handle #pragma extern_prefix. */ -#define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX 1 - -#define TARGET_HAVE_NAMED_SECTIONS false diff --git a/gcc/config/alpha/osf5.opt b/gcc/config/alpha/osf5.opt deleted file mode 100644 index ba70e7ce9a5..00000000000 --- a/gcc/config/alpha/osf5.opt +++ /dev/null @@ -1,42 +0,0 @@ -; Tru64 UNIX options. - -; Copyright (C) 2011 -; Free Software Foundation, Inc. -; -; This file is part of GCC. -; -; GCC 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 3, or (at your option) any later -; version. -; -; GCC 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 GCC; see the file COPYING3. If not see -; <http://www.gnu.org/licenses/>. - -; See the GCC internals manual (options.texi) for a description of -; this file's format. - -; Please try to keep this file in ASCII collating order. - -K -Driver - -mno-mips-tfile -Target RejectNegative - -pthread -Driver - -taso -Driver - -threads -Driver - -; This comment is to ensure we retain the blank line above. diff --git a/gcc/config/alpha/va_list.h b/gcc/config/alpha/va_list.h deleted file mode 100644 index 26e9515b44e..00000000000 --- a/gcc/config/alpha/va_list.h +++ /dev/null @@ -1,42 +0,0 @@ -/* A replacement for Digital Unix's <va_list.h>. - -Copyright (C) 1998, 1999 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef __builtin_va_list __gnuc_va_list; -#endif - -#if !defined(_VA_LIST) && !defined(_HIDDEN_VA_LIST) -#define _VA_LIST -typedef __gnuc_va_list va_list; - -#elif defined(_HIDDEN_VA_LIST) && !defined(_HIDDEN_VA_LIST_DONE) -#define _HIDDEN_VA_LIST_DONE -typedef __gnuc_va_list __va_list; - -#elif defined(_HIDDEN_VA_LIST) && defined(_VA_LIST) -#undef _HIDDEN_VA_LIST - -#endif diff --git a/gcc/config/alpha/x-osf b/gcc/config/alpha/x-osf deleted file mode 100644 index 5bb9c90986e..00000000000 --- a/gcc/config/alpha/x-osf +++ /dev/null @@ -1,4 +0,0 @@ -host-osf.o : $(srcdir)/config/alpha/host-osf.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - $(srcdir)/config/alpha/host-osf.c diff --git a/gcc/configure b/gcc/configure index e2a0aea9f09..aada28df7da 100755 --- a/gcc/configure +++ b/gcc/configure @@ -23626,11 +23626,6 @@ case "$target" in # with TLS support are in use, native TLS cannot work. set_have_as_tls=no ;; - *-*-osf*) - # Tru64 UNIX loader and libc.so lack TLS support, so even if gas and - # gld with TLS support are in use, native TLS cannot work. - set_have_as_tls=no - ;; # TLS was introduced in the Solaris 9 FCS release and backported to # Solaris 8 patches. Support for GNU-style TLS on x86 was only # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun @@ -23818,12 +23813,6 @@ elif test x$gcc_cv_ld != x; then gcc_cv_ld_static_dynamic=yes else case "$target" in - # Tru64 UNIX support -noso/-so_archive instead of -Bstatic/-Bdynamic. - alpha*-dec-osf*) - gcc_cv_ld_static_dynamic=yes - gcc_cv_ld_static_option="-noso" - gcc_cv_ld_dynamic_option="-so_archive" - ;; # HP-UX ld uses -a flags to select between shared and archive. *-*-hpux*) if test x"$gnu_ld" = xno; then @@ -23944,7 +23933,7 @@ $as_echo "$gcc_cv_lto_plugin" >&6; } case "$target" in # All TARGET_ABI_OSF targets. - alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) + alpha*-*-linux* | alpha*-*-*bsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5 $as_echo_n "checking assembler for explicit relocation support... " >&6; } if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then : diff --git a/gcc/configure.ac b/gcc/configure.ac index 39302ad76c3..3686680d807 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3183,11 +3183,6 @@ case "$target" in # with TLS support are in use, native TLS cannot work. set_have_as_tls=no ;; - *-*-osf*) - # Tru64 UNIX loader and libc.so lack TLS support, so even if gas and - # gld with TLS support are in use, native TLS cannot work. - set_have_as_tls=no - ;; # TLS was introduced in the Solaris 9 FCS release and backported to # Solaris 8 patches. Support for GNU-style TLS on x86 was only # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun @@ -3302,12 +3297,6 @@ elif test x$gcc_cv_ld != x; then gcc_cv_ld_static_dynamic=yes else case "$target" in - # Tru64 UNIX support -noso/-so_archive instead of -Bstatic/-Bdynamic. - alpha*-dec-osf*) - gcc_cv_ld_static_dynamic=yes - gcc_cv_ld_static_option="-noso" - gcc_cv_ld_dynamic_option="-so_archive" - ;; # HP-UX ld uses -a flags to select between shared and archive. *-*-hpux*) if test x"$gnu_ld" = xno; then @@ -3414,7 +3403,7 @@ AC_MSG_RESULT($gcc_cv_lto_plugin) case "$target" in # All TARGET_ABI_OSF targets. - alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) + alpha*-*-linux* | alpha*-*-*bsd*) gcc_GAS_CHECK_FEATURE([explicit relocation support], gcc_cv_as_alpha_explicit_relocs, [2,12,0],, [ .set nomacro diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index c770e35cb7f..3a2e1d4d6ed 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -14141,10 +14141,9 @@ adding a call to the @code{.init} section. @node Symbol-Renaming Pragmas @subsection Symbol-Renaming Pragmas -For compatibility with the Solaris and Tru64 UNIX system headers, GCC +For compatibility with the Solaris system headers, GCC supports two @code{#pragma} directives which change the name used in -assembly for a given declaration. @code{#pragma extern_prefix} is only -available on platforms whose system headers need it. To get this effect +assembly for a given declaration. To get this effect on all platforms supported by GCC, use the asm labels extension (@pxref{Asm Labels}). @@ -14155,19 +14154,9 @@ Labels}). This pragma gives the C function @var{oldname} the assembly symbol @var{newname}. The preprocessor macro @code{__PRAGMA_REDEFINE_EXTNAME} will be defined if this pragma is available (currently on all platforms). - -@item extern_prefix @var{string} -@cindex pragma, extern_prefix - -This pragma causes all subsequent external function and variable -declarations to have @var{string} prepended to their assembly symbols. -This effect may be terminated with another @code{extern_prefix} pragma -whose argument is an empty string. The preprocessor macro -@code{__PRAGMA_EXTERN_PREFIX} will be defined if this pragma is -available (currently only on Tru64 UNIX)@. @end table -These pragmas and the asm labels extension interact in a complicated +This pragma and the asm labels extension interact in a complicated manner. Here are some corner cases you may want to be aware of. @enumerate @@ -14186,17 +14175,6 @@ the name does not change. @item The @var{oldname} used by @code{#pragma redefine_extname} is always the C-language name. - -@item If @code{#pragma extern_prefix} is in effect, and a declaration -occurs with an asm label attached, the prefix is silently ignored for -that declaration. - -@item If @code{#pragma extern_prefix} and @code{#pragma redefine_extname} -apply to the same declaration, whichever triggered first wins, and a -warning issues if they contradict each other. (We would like to have -@code{#pragma redefine_extname} always win, for consistency with asm -labels, but if @code{#pragma extern_prefix} triggers first we have no -way of knowing that that happened.) @end enumerate @node Structure-Packing Pragmas diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 53109ba0d64..00a8994a215 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -2949,7 +2949,6 @@ The @uref{http://www.mingw.org/,,MinGW} project. Written Word} offers binaries for AIX 4.3.3, 5.1 and 5.2, IRIX 6.5, -Tru64 UNIX 4.0D and 5.1, GNU/Linux (i386), HP-UX 10.20, 11.00, and 11.11, and Solaris/SPARC 2.5.1, 2.6, 7, 8, 9 and 10. @@ -3160,54 +3159,10 @@ Systems using processors that implement the DEC Alpha architecture and are running the DEC/Compaq/HP Unix (DEC OSF/1, Digital UNIX, or Compaq/HP Tru64 UNIX) operating system, for example the DEC Alpha AXP systems. -Support for Tru64 UNIX V5.1 has been obsoleted in GCC 4.7, but can still -be enabled by configuring with @option{--enable-obsolete}. Support will -be removed in GCC 4.8. As of GCC 4.6, support for Tru64 UNIX V4.0 and -V5.0 has been removed. As of GCC 3.2, versions before -@code{alpha*-dec-osf4} are no longer supported. (These are the versions -which identify themselves as DEC OSF/1.) - -On Tru64 UNIX, virtual memory exhausted bootstrap failures -may be fixed by reconfiguring Kernel Virtual Memory and Swap parameters -per the @command{/usr/sbin/sys_check} Tuning Suggestions, -or applying the patch in -@uref{http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html}. Depending on -the OS version used, you need a data segment size between 512 MB and -1 GB, so simply use @command{ulimit -Sd unlimited}. - -As of GNU binutils 2.21, neither GNU @command{as} nor GNU @command{ld} -are supported on Tru64 UNIX, so you must not configure GCC with -@option{--with-gnu-as} or @option{--with-gnu-ld}. - -Cross-compilers for the Tru64 UNIX target currently do not work because -the auxiliary programs @command{mips-tdump} and @command{mips-tfile} can't -be compiled on anything but Tru64 UNIX. - -GCC writes a @samp{.verstamp} directive to the assembler output file -unless it is built as a cross-compiler. It gets the version to use from -the system header file @file{/usr/include/stamp.h}. If you install a -new version of Tru64 UNIX, you should rebuild GCC to pick up the new version -stamp. - -GCC now supports both the native (ECOFF) debugging format used by DBX -and GDB and an encapsulated STABS format for use only with GDB@. See the -discussion of the @option{--with-stabs} option of @file{configure} above -for more information on these formats and how to select them. -@c FIXME: does this work at all? If so, perhaps make default. - -There is a bug in DEC's assembler that produces incorrect line numbers -for ECOFF format when the @samp{.align} directive is used. To work -around this problem, GCC will not emit such alignment directives -while writing ECOFF format debugging information even if optimization is -being performed. Unfortunately, this has the very undesirable -side-effect that code addresses when @option{-O} is specified are -different depending on whether or not @option{-g} is also specified. - -To avoid this behavior, specify @option{-gstabs+} and use GDB instead of -DBX@. DEC is now aware of this problem with the assembler and hopes to -provide a fix shortly. - -@c FIXME: still applicable? +Support for Tru64 UNIX V5.1 has been removed in GCC 4.8. As of GCC 4.6, +support for Tru64 UNIX V4.0 and V5.0 has been removed. As of GCC 3.2, +versions before @code{alpha*-dec-osf4} are no longer supported. (These +are the versions which identify themselves as DEC OSF/1.) @html <hr /> diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 91e4b047fe5..e9da36c2699 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -10758,10 +10758,6 @@ Define this macro if macros should be expanded in the arguments of @samp{#pragma pack}. @end defmac -@deftypevr {Target Hook} bool TARGET_HANDLE_PRAGMA_EXTERN_PREFIX -True if @code{#pragma extern_prefix} is to be supported. -@end deftypevr - @defmac TARGET_DEFAULT_PACK_STRUCT If your target requires a structure packing default other than 0 (meaning the machine default), define this macro to the necessary value (in bytes). diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 0ebc15d5ebf..8f9653b5638 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -10638,8 +10638,6 @@ Define this macro if macros should be expanded in the arguments of @samp{#pragma pack}. @end defmac -@hook TARGET_HANDLE_PRAGMA_EXTERN_PREFIX - @defmac TARGET_DEFAULT_PACK_STRUCT If your target requires a structure packing default other than 0 (meaning the machine default), define this macro to the necessary value (in bytes). diff --git a/gcc/doc/trouble.texi b/gcc/doc/trouble.texi index 3fc3910d79e..b2bf3942498 100644 --- a/gcc/doc/trouble.texi +++ b/gcc/doc/trouble.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -20,7 +20,6 @@ where people's opinions differ as to what is best. @menu * Actual Bugs:: Bugs we will fix later. -* Cross-Compiler Problems:: Common problems of cross compiling with GCC. * Interoperation:: Problems using GCC with other compilers, and with certain linkers, assemblers and debuggers. * Incompatibilities:: GCC is incompatible with traditional C. @@ -46,19 +45,6 @@ unmounted while @code{fixincludes} is running. This would seem to be a bug in the automounter. We don't know any good way to work around it. @end itemize -@node Cross-Compiler Problems -@section Cross-Compiler Problems - -You may run into problems with cross compilation on certain machines, -for several reasons. - -@itemize @bullet -@item -At present, the program @file{mips-tfile} which adds debug -support to object files on Tru64 UNIX systems does not work in a cross -compile environment. -@end itemize - @node Interoperation @section Interoperation diff --git a/gcc/except.c b/gcc/except.c index 8d56e105fbe..8cf47bcc236 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1,7 +1,7 @@ /* Implements exception handling. Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011, 2012 Free Software Foundation, Inc. Contributed by Mike Stump <mrs@cygnus.com>. This file is part of GCC. @@ -1419,7 +1419,7 @@ finish_eh_generation (void) break_superblocks (); if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ - /* Kludge for Alpha/Tru64 (see alpha_gp_save_rtx). */ + /* Kludge for Alpha (see alpha_gp_save_rtx). */ || single_succ_edge (ENTRY_BLOCK_PTR)->insns.r) commit_edge_insertions (); diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h index 54dc2e7fb06..0bb7520a90c 100644 --- a/gcc/ginclude/stdarg.h +++ b/gcc/ginclude/stdarg.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2009, 2012 + Free Software Foundation, Inc. This file is part of GCC. @@ -59,10 +60,6 @@ typedef __builtin_va_list __gnuc_va_list; but must not use that name. It should use the name __gnuc_va_list, which is safe because it is reserved for the implementation. */ -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - #ifdef _BSD_VA_LIST #undef _BSD_VA_LIST #endif diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c deleted file mode 100644 index 49ebb89d7f7..00000000000 --- a/gcc/mips-tdump.c +++ /dev/null @@ -1,1525 +0,0 @@ -/* Read and manage MIPS symbol tables from object modules. - Copyright (C) 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. - Contributed by hartzell@boulder.colorado.edu, - Rewritten by meissner@osf.org. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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 GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#include "config.h" -#include "system.h" -#include "version.h" -#ifdef index -#undef index -#endif -#include <a.out.h> - -/* Include getopt.h for the sake of getopt_long. */ -#include "getopt.h" - -/* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for - mips-tdump.c to print them out. - - These must match the corresponding definitions in gdb/mipsread.c. - Unfortunately, gcc and gdb do not currently share any directories. */ - -#define CODE_MASK 0x8F300 -#define MIPS_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK) -#define MIPS_MARK_STAB(code) ((code)+CODE_MASK) -#define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) - -#define uchar unsigned char -#define ushort unsigned short -#define uint unsigned int -#define ulong unsigned long - - -/* Redefinition of storage classes as an enumeration for better - debugging. */ - -#ifndef stStaParam -#define stStaParam 16 /* Fortran static parameters */ -#endif - -#ifndef btVoid -#define btVoid 26 /* void basic type */ -#endif - -typedef enum sc { - sc_Nil = scNil, /* no storage class */ - sc_Text = scText, /* text symbol */ - sc_Data = scData, /* initialized data symbol */ - sc_Bss = scBss, /* un-initialized data symbol */ - sc_Register = scRegister, /* value of symbol is register number */ - sc_Abs = scAbs, /* value of symbol is absolute */ - sc_Undefined = scUndefined, /* who knows? */ - sc_CdbLocal = scCdbLocal, /* variable's value is IN se->va.?? */ - sc_Bits = scBits, /* this is a bit field */ - sc_CdbSystem = scCdbSystem, /* var's value is IN CDB's address space */ - sc_RegImage = scRegImage, /* register value saved on stack */ - sc_Info = scInfo, /* symbol contains debugger information */ - sc_UserStruct = scUserStruct, /* addr in struct user for current process */ - sc_SData = scSData, /* load time only small data */ - sc_SBss = scSBss, /* load time only small common */ - sc_RData = scRData, /* load time only read only data */ - sc_Var = scVar, /* Var parameter (fortran,pascal) */ - sc_Common = scCommon, /* common variable */ - sc_SCommon = scSCommon, /* small common */ - sc_VarRegister = scVarRegister, /* Var parameter in a register */ - sc_Variant = scVariant, /* Variant record */ - sc_SUndefined = scSUndefined, /* small undefined(external) data */ - sc_Init = scInit, /* .init section symbol */ - sc_Max = scMax /* Max storage class+1 */ -} sc_t; - -/* Redefinition of symbol type. */ - -typedef enum st { - st_Nil = stNil, /* Nuthin' special */ - st_Global = stGlobal, /* external symbol */ - st_Static = stStatic, /* static */ - st_Param = stParam, /* procedure argument */ - st_Local = stLocal, /* local variable */ - st_Label = stLabel, /* label */ - st_Proc = stProc, /* " " Procedure */ - st_Block = stBlock, /* beginning of block */ - st_End = stEnd, /* end (of anything) */ - st_Member = stMember, /* member (of anything - struct/union/enum */ - st_Typedef = stTypedef, /* type definition */ - st_File = stFile, /* file name */ - st_RegReloc = stRegReloc, /* register relocation */ - st_Forward = stForward, /* forwarding address */ - st_StaticProc = stStaticProc, /* load time only static procs */ - st_StaParam = stStaParam, /* Fortran static parameters */ - st_Constant = stConstant, /* const */ -#ifdef stStruct - st_Struct = stStruct, /* struct */ - st_Union = stUnion, /* union */ - st_Enum = stEnum, /* enum */ -#endif - st_Str = stStr, /* string */ - st_Number = stNumber, /* pure number (i.e. 4 NOR 2+2) */ - st_Expr = stExpr, /* 2+2 vs. 4 */ - st_Type = stType, /* post-coercion SER */ - st_Max = stMax /* max type+1 */ -} st_t; - -/* Redefinition of type qualifiers. */ - -typedef enum tq { - tq_Nil = tqNil, /* bt is what you see */ - tq_Ptr = tqPtr, /* pointer */ - tq_Proc = tqProc, /* procedure */ - tq_Array = tqArray, /* duh */ - tq_Far = tqFar, /* longer addressing - 8086/8 land */ - tq_Vol = tqVol, /* volatile */ - tq_Max = tqMax /* Max type qualifier+1 */ -} tq_t; - -/* Redefinition of basic types. */ - -typedef enum bt { - bt_Nil = btNil, /* undefined */ - bt_Adr = btAdr, /* address - integer same size as pointer */ - bt_Char = btChar, /* character */ - bt_UChar = btUChar, /* unsigned character */ - bt_Short = btShort, /* short */ - bt_UShort = btUShort, /* unsigned short */ - bt_Int = btInt, /* int */ - bt_UInt = btUInt, /* unsigned int */ - bt_Long = btLong, /* long */ - bt_ULong = btULong, /* unsigned long */ - bt_Float = btFloat, /* float (real) */ - bt_Double = btDouble, /* Double (real) */ - bt_Struct = btStruct, /* Structure (Record) */ - bt_Union = btUnion, /* Union (variant) */ - bt_Enum = btEnum, /* Enumerated */ - bt_Typedef = btTypedef, /* defined via a typedef, isymRef points */ - bt_Range = btRange, /* subrange of int */ - bt_Set = btSet, /* pascal sets */ - bt_Complex = btComplex, /* fortran complex */ - bt_DComplex = btDComplex, /* fortran double complex */ - bt_Indirect = btIndirect, /* forward or unnamed typedef */ - bt_FixedDec = btFixedDec, /* Fixed Decimal */ - bt_FloatDec = btFloatDec, /* Float Decimal */ - bt_String = btString, /* Varying Length Character String */ - bt_Bit = btBit, /* Aligned Bit String */ - bt_Picture = btPicture, /* Picture */ - bt_Void = btVoid, /* void */ - bt_Max = btMax /* Max basic type+1 */ -} bt_t; - -/* Redefinition of the language codes. */ - -typedef enum lang { - lang_C = langC, - lang_Pascal = langPascal, - lang_Fortran = langFortran, - lang_Assembler = langAssembler, - lang_Machine = langMachine, - lang_Nil = langNil, - lang_Ada = langAda, - lang_Pl1 = langPl1, - lang_Cobol = langCobol -} lang_t; - -/* Redefinition of the debug level codes. */ - -typedef enum glevel { - glevel_0 = GLEVEL_0, - glevel_1 = GLEVEL_1, - glevel_2 = GLEVEL_2, - glevel_3 = GLEVEL_3 -} glevel_t; - - -/* Keep track of the active scopes. */ -typedef struct scope { - struct scope *prev; /* previous scope */ - ulong open_sym; /* symbol opening scope */ - sc_t sc; /* storage class */ - st_t st; /* symbol type */ -} scope_t; - -struct filehdr global_hdr; /* a.out header */ - -int errors = 0; /* # of errors */ -int want_aux = 0; /* print aux table */ -int want_line = 0; /* print line numbers */ -int want_rfd = 0; /* print relative file desc's */ -int want_scope = 0; /* print scopes for every symbol */ -int tfile = 0; /* no global header file */ -int version = 0; /* print version # */ -int verbose = 0; -int tfile_fd; /* file descriptor of .T file */ -off_t tfile_offset; /* current offset in .T file */ -scope_t *cur_scope = 0; /* list of active scopes */ -scope_t *free_scope = 0; /* list of freed scopes */ -HDRR sym_hdr; /* symbolic header */ -char *l_strings; /* local strings */ -char *e_strings; /* external strings */ -SYMR *l_symbols; /* local symbols */ -EXTR *e_symbols; /* external symbols */ -LINER *lines; /* line numbers */ -DNR *dense_nums; /* dense numbers */ -OPTR *opt_symbols; /* optimization symbols */ -AUXU *aux_symbols; /* Auxiliary symbols */ -char *aux_used; /* map of which aux syms are used */ -FDR *file_desc; /* file tables */ -ulong *rfile_desc; /* relative file tables */ -PDR *proc_desc; /* procedure tables */ - -/* Forward reference for functions. */ -static void *read_seek (void *, size_t, off_t, const char *); -static void read_tfile (void); -static void print_global_hdr (struct filehdr *); -static void print_sym_hdr (HDRR *); -static void print_file_desc (FDR *, int); -static void print_symbol (SYMR *, int, const char *, AUXU *, int, FDR *); -static void print_aux (AUXU, int, int); -static void emit_aggregate (char *, AUXU, AUXU, const char *, FDR *); -static const char *st_to_string (st_t); -static const char *sc_to_string (sc_t); -static const char *glevel_to_string (glevel_t); -static const char *lang_to_string (lang_t); -static const char *type_to_string (AUXU *, int, FDR *); - -extern char *optarg; -extern int optind; -extern int opterr; - -/* Create a table of debugging stab-codes and corresponding names. */ - -#define __define_stab(NAME, CODE, STRING) {(int)CODE, STRING}, -const struct {const short code; const char string[10];} stab_names[] = { -#include "stab.def" -#undef __define_stab -}; - -/* Command line options for getopt_long. */ - -static const struct option options[] = -{ - { "version", 0, 0, 'V' }, - { "verbose", 0, 0, 'v' }, - { 0, 0, 0, 0 } -}; - -/* Read some bytes at a specified location, and return a pointer. - Read_seek takes a pointer PTR to a buffer or NULL and reads SIZE - bytes from offset OFFSET. In case of errors CONTEXT is used as - error message. */ - -static void * -read_seek (void *ptr, size_t size, off_t offset, const char *context) -{ - long read_size = 0; - - if (size == 0) /* nothing to read */ - return ptr; - - if (!ptr) - ptr = xmalloc (size); - - if ((tfile_offset != offset && lseek (tfile_fd, offset, 0) == -1) - || (read_size = read (tfile_fd, ptr, size)) < 0) - { - perror (context); - exit (1); - } - - if (read_size != (long) size) - { - fprintf (stderr, "%s: read %ld bytes, expected %ld bytes\n", - context, read_size, (long) size); - exit (1); - } - - tfile_offset = offset + size; - return ptr; -} - - -/* Convert language code to string format. */ - -static const char * -lang_to_string (lang_t lang) -{ - switch (lang) - { - case langC: return "C"; - case langPascal: return "Pascal"; - case langFortran: return "Fortran"; - case langAssembler: return "Assembler"; - case langMachine: return "Machine"; - case langNil: return "Nil"; - case langAda: return "Ada"; - case langPl1: return "Pl1"; - case langCobol: return "Cobol"; - } - - return "Unknown language"; -} - - -/* Convert storage class to string. */ - -static const char * -sc_to_string (sc_t storage_class) -{ - switch(storage_class) - { - case sc_Nil: return "Nil"; - case sc_Text: return "Text"; - case sc_Data: return "Data"; - case sc_Bss: return "Bss"; - case sc_Register: return "Register"; - case sc_Abs: return "Abs"; - case sc_Undefined: return "Undefined"; - case sc_CdbLocal: return "CdbLocal"; - case sc_Bits: return "Bits"; - case sc_CdbSystem: return "CdbSystem"; - case sc_RegImage: return "RegImage"; - case sc_Info: return "Info"; - case sc_UserStruct: return "UserStruct"; - case sc_SData: return "SData"; - case sc_SBss: return "SBss"; - case sc_RData: return "RData"; - case sc_Var: return "Var"; - case sc_Common: return "Common"; - case sc_SCommon: return "SCommon"; - case sc_VarRegister: return "VarRegister"; - case sc_Variant: return "Variant"; - case sc_SUndefined: return "SUndefined"; - case sc_Init: return "Init"; - case sc_Max: return "Max"; - } - - return "???"; -} - - -/* Convert symbol type to string. */ - -static const char * -st_to_string (st_t symbol_type) -{ - switch(symbol_type) - { - case st_Nil: return "Nil"; - case st_Global: return "Global"; - case st_Static: return "Static"; - case st_Param: return "Param"; - case st_Local: return "Local"; - case st_Label: return "Label"; - case st_Proc: return "Proc"; - case st_Block: return "Block"; - case st_End: return "End"; - case st_Member: return "Member"; - case st_Typedef: return "Typedef"; - case st_File: return "File"; - case st_RegReloc: return "RegReloc"; - case st_Forward: return "Forward"; - case st_StaticProc: return "StaticProc"; - case st_Constant: return "Constant"; - case st_StaParam: return "StaticParam"; -#ifdef stStruct - case st_Struct: return "Struct"; - case st_Union: return "Union"; - case st_Enum: return "Enum"; -#endif - case st_Str: return "String"; - case st_Number: return "Number"; - case st_Expr: return "Expr"; - case st_Type: return "Type"; - case st_Max: return "Max"; - } - - return "???"; -} - - -/* Convert debug level to string. */ - -static const char * -glevel_to_string (glevel_t g_level) -{ - switch(g_level) - { - case GLEVEL_0: return "G0"; - case GLEVEL_1: return "G1"; - case GLEVEL_2: return "G2"; - case GLEVEL_3: return "G3"; - } - - return "??"; -} - - -/* Convert the type information to string format. */ - -static const char * -type_to_string (AUXU *aux_ptr, int index, FDR *fdp) -{ - AUXU u; - struct qual { - tq_t type; - int low_bound; - int high_bound; - int stride; - } qualifiers[7]; - - bt_t basic_type; - int i; - static char buffer1[1024]; - static char buffer2[1024]; - char *p1 = buffer1; - char *p2 = buffer2; - char *used_ptr = aux_used + (aux_ptr - aux_symbols); - - for (i = 0; i < 7; i++) - { - qualifiers[i].low_bound = 0; - qualifiers[i].high_bound = 0; - qualifiers[i].stride = 0; - } - - used_ptr[index] = 1; - u = aux_ptr[index++]; - if (u.isym == -1) - return "-1 (no type)"; - - basic_type = (bt_t) u.ti.bt; - qualifiers[0].type = (tq_t) u.ti.tq0; - qualifiers[1].type = (tq_t) u.ti.tq1; - qualifiers[2].type = (tq_t) u.ti.tq2; - qualifiers[3].type = (tq_t) u.ti.tq3; - qualifiers[4].type = (tq_t) u.ti.tq4; - qualifiers[5].type = (tq_t) u.ti.tq5; - qualifiers[6].type = tq_Nil; - - /* - * Go get the basic type. - */ - switch (basic_type) - { - case bt_Nil: /* undefined */ - strcpy (p1, "nil"); - break; - - case bt_Adr: /* address - integer same size as pointer */ - strcpy (p1, "address"); - break; - - case bt_Char: /* character */ - strcpy (p1, "char"); - break; - - case bt_UChar: /* unsigned character */ - strcpy (p1, "unsigned char"); - break; - - case bt_Short: /* short */ - strcpy (p1, "short"); - break; - - case bt_UShort: /* unsigned short */ - strcpy (p1, "unsigned short"); - break; - - case bt_Int: /* int */ - strcpy (p1, "int"); - break; - - case bt_UInt: /* unsigned int */ - strcpy (p1, "unsigned int"); - break; - - case bt_Long: /* long */ - strcpy (p1, "long"); - break; - - case bt_ULong: /* unsigned long */ - strcpy (p1, "unsigned long"); - break; - - case bt_Float: /* float (real) */ - strcpy (p1, "float"); - break; - - case bt_Double: /* Double (real) */ - strcpy (p1, "double"); - break; - - /* Structures add 1-2 aux words: - 1st word is [ST_RFDESCAPE, offset] pointer to struct def; - 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - - case bt_Struct: /* Structure (Record) */ - emit_aggregate (p1, aux_ptr[index], aux_ptr[index+1], "struct", fdp); - used_ptr[index] = 1; - if (aux_ptr[index].rndx.rfd == ST_RFDESCAPE) - used_ptr[++index] = 1; - - index++; /* skip aux words */ - break; - - /* Unions add 1-2 aux words: - 1st word is [ST_RFDESCAPE, offset] pointer to union def; - 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - - case bt_Union: /* Union */ - emit_aggregate (p1, aux_ptr[index], aux_ptr[index+1], "union", fdp); - used_ptr[index] = 1; - if (aux_ptr[index].rndx.rfd == ST_RFDESCAPE) - used_ptr[++index] = 1; - - index++; /* skip aux words */ - break; - - /* Enumerations add 1-2 aux words: - 1st word is [ST_RFDESCAPE, offset] pointer to enum def; - 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - - case bt_Enum: /* Enumeration */ - emit_aggregate (p1, aux_ptr[index], aux_ptr[index+1], "enum", fdp); - used_ptr[index] = 1; - if (aux_ptr[index].rndx.rfd == ST_RFDESCAPE) - used_ptr[++index] = 1; - - index++; /* skip aux words */ - break; - - case bt_Typedef: /* defined via a typedef, isymRef points */ - strcpy (p1, "typedef"); - break; - - case bt_Range: /* subrange of int */ - strcpy (p1, "subrange"); - break; - - case bt_Set: /* pascal sets */ - strcpy (p1, "set"); - break; - - case bt_Complex: /* fortran complex */ - strcpy (p1, "complex"); - break; - - case bt_DComplex: /* fortran double complex */ - strcpy (p1, "double complex"); - break; - - case bt_Indirect: /* forward or unnamed typedef */ - strcpy (p1, "forward/unnamed typedef"); - break; - - case bt_FixedDec: /* Fixed Decimal */ - strcpy (p1, "fixed decimal"); - break; - - case bt_FloatDec: /* Float Decimal */ - strcpy (p1, "float decimal"); - break; - - case bt_String: /* Varying Length Character String */ - strcpy (p1, "string"); - break; - - case bt_Bit: /* Aligned Bit String */ - strcpy (p1, "bit"); - break; - - case bt_Picture: /* Picture */ - strcpy (p1, "picture"); - break; - - case bt_Void: /* Void */ - strcpy (p1, "void"); - break; - - default: - sprintf (p1, "Unknown basic type %d", (int) basic_type); - break; - } - - p1 += strlen (buffer1); - - /* - * If this is a bitfield, get the bitsize. - */ - if (u.ti.fBitfield) - { - int bitsize; - - used_ptr[index] = 1; - bitsize = aux_ptr[index++].width; - sprintf (p1, " : %d", bitsize); - p1 += strlen (buffer1); - } - - - /* - * Deal with any qualifiers. - */ - if (qualifiers[0].type != tq_Nil) - { - /* - * Snarf up any array bounds in the correct order. Arrays - * store 5 successive words in the aux. table: - * word 0 RNDXR to type of the bounds (i.e., int) - * word 1 Current file descriptor index - * word 2 low bound - * word 3 high bound (or -1 if []) - * word 4 stride size in bits - */ - for (i = 0; i < 7; i++) - { - if (qualifiers[i].type == tq_Array) - { - qualifiers[i].low_bound = aux_ptr[index+2].dnLow; - qualifiers[i].high_bound = aux_ptr[index+3].dnHigh; - qualifiers[i].stride = aux_ptr[index+4].width; - used_ptr[index] = 1; - used_ptr[index+1] = 1; - used_ptr[index+2] = 1; - used_ptr[index+3] = 1; - used_ptr[index+4] = 1; - index += 5; - } - } - - /* - * Now print out the qualifiers. - */ - for (i = 0; i < 6; i++) - { - switch (qualifiers[i].type) - { - case tq_Nil: - case tq_Max: - break; - - case tq_Ptr: - strcpy (p2, "ptr to "); - p2 += sizeof ("ptr to ")-1; - break; - - case tq_Vol: - strcpy (p2, "volatile "); - p2 += sizeof ("volatile ")-1; - break; - - case tq_Far: - strcpy (p2, "far "); - p2 += sizeof ("far ")-1; - break; - - case tq_Proc: - strcpy (p2, "func. ret. "); - p2 += sizeof ("func. ret. "); - break; - - case tq_Array: - { - int first_array = i; - int j; - - /* Print array bounds reversed (i.e., in the order the C - programmer writes them). C is such a fun language.... */ - - while (i < 5 && qualifiers[i+1].type == tq_Array) - i++; - - for (j = i; j >= first_array; j--) - { - strcpy (p2, "array ["); - p2 += sizeof ("array [")-1; - if (qualifiers[j].low_bound != 0) - sprintf (p2, - "%ld:%ld {%ld bits}", - (long) qualifiers[j].low_bound, - (long) qualifiers[j].high_bound, - (long) qualifiers[j].stride); - - else if (qualifiers[j].high_bound != -1) - sprintf (p2, - "%ld {%ld bits}", - (long) (qualifiers[j].high_bound + 1), - (long) (qualifiers[j].stride)); - - else - sprintf (p2, " {%ld bits}", (long) (qualifiers[j].stride)); - - p2 += strlen (p2); - strcpy (p2, "] of "); - p2 += sizeof ("] of ")-1; - } - } - break; - } - } - } - - strcpy (p2, buffer1); - return buffer2; -} - - -/* Print out the global file header for object files. */ - -static void -print_global_hdr (struct filehdr *ptr) -{ - char *time = ctime ((time_t *)&ptr->f_timdat); - ushort flags = ptr->f_flags; - - printf("Global file header:\n"); - printf(" %-*s 0x%x\n", 24, "magic number", (ushort) ptr->f_magic); - printf(" %-*s %d\n", 24, "# sections", (int) ptr->f_nscns); - printf(" %-*s %ld, %s", 24, "timestamp", (long) ptr->f_timdat, time); - printf(" %-*s %ld\n", 24, "symbolic header offset", (long) ptr->f_symptr); - printf(" %-*s %ld\n", 24, "symbolic header size", (long) ptr->f_nsyms); - printf(" %-*s %ld\n", 24, "optional header", (long) ptr->f_opthdr); - printf(" %-*s 0x%x", 24, "flags", (ushort) flags); - - if ((flags & F_RELFLG) != 0) - printf (", F_RELFLG"); - - if ((flags & F_EXEC) != 0) - printf (", F_EXEC"); - - if ((flags & F_LNNO) != 0) - printf (", F_LNNO"); - - if ((flags & F_LSYMS) != 0) - printf (", F_LSYMS"); - - if ((flags & F_MINMAL) != 0) - printf (", F_MINMAL"); - - if ((flags & F_UPDATE) != 0) - printf (", F_UPDATE"); - - if ((flags & F_SWABD) != 0) - printf (", F_SWABD"); - - if ((flags & F_AR16WR) != 0) - printf (", F_AR16WR"); - - if ((flags & F_AR32WR) != 0) - printf (", F_AR32WR"); - - if ((flags & F_AR32W) != 0) - printf (", F_AR32W"); - - if ((flags & F_PATCH) != 0) - printf (", F_PATCH/F_NODF"); - - printf ("\n\n"); -} - - -/* Print out the symbolic header. */ - -static void -print_sym_hdr (HDRR *sym_ptr) -{ - int width = 20; - - printf("Symbolic header, magic number = 0x%04x, vstamp = %d.%d:\n\n", - sym_ptr->magic & 0xffff, - (sym_ptr->vstamp & 0xffff) >> 8, - sym_ptr->vstamp & 0xff); - - printf(" %-*s %11s %11s %11s\n", width, "Info", "Offset", "Number", "Bytes"); - printf(" %-*s %11s %11s %11s\n", width, "====", "======", "======", "=====\n"); - - printf(" %-*s %11ld %11ld %11ld [%d]\n", width, "Line numbers", - (long) sym_ptr->cbLineOffset, - (long) sym_ptr->cbLine, - (long) sym_ptr->cbLine, - (int) sym_ptr->ilineMax); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Dense numbers", - (long) sym_ptr->cbDnOffset, - (long) sym_ptr->idnMax, - (long) (sym_ptr->idnMax * sizeof (DNR))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Procedures Tables", - (long) sym_ptr->cbPdOffset, - (long) sym_ptr->ipdMax, - (long) (sym_ptr->ipdMax * sizeof (PDR))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Local Symbols", - (long) sym_ptr->cbSymOffset, - (long) sym_ptr->isymMax, - (long) (sym_ptr->isymMax * sizeof (SYMR))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Optimization Symbols", - (long) sym_ptr->cbOptOffset, - (long) sym_ptr->ioptMax, - (long) (sym_ptr->ioptMax * sizeof (OPTR))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Auxiliary Symbols", - (long) sym_ptr->cbAuxOffset, - (long) sym_ptr->iauxMax, - (long) (sym_ptr->iauxMax * sizeof (AUXU))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Local Strings", - (long) sym_ptr->cbSsOffset, - (long) sym_ptr->issMax, - (long) sym_ptr->issMax); - - printf(" %-*s %11ld %11ld %11ld\n", width, "External Strings", - (long) sym_ptr->cbSsExtOffset, - (long) sym_ptr->issExtMax, - (long) sym_ptr->issExtMax); - - printf(" %-*s %11ld %11ld %11ld\n", width, "File Tables", - (long) sym_ptr->cbFdOffset, - (long) sym_ptr->ifdMax, - (long) (sym_ptr->ifdMax * sizeof (FDR))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "Relative Files", - (long) sym_ptr->cbRfdOffset, - (long) sym_ptr->crfd, - (long) (sym_ptr->crfd * sizeof (ulong))); - - printf(" %-*s %11ld %11ld %11ld\n", width, "External Symbols", - (long) sym_ptr->cbExtOffset, - (long) sym_ptr->iextMax, - (long) (sym_ptr->iextMax * sizeof (EXTR))); -} - - -/* Print out a symbol. */ - -static void -print_symbol (SYMR *sym_ptr, int number, const char *strbase, AUXU *aux_base, - int ifd, FDR *fdp) -{ - sc_t storage_class = (sc_t) sym_ptr->sc; - st_t symbol_type = (st_t) sym_ptr->st; - ulong index = sym_ptr->index; - char *used_ptr = aux_used + (aux_base - aux_symbols); - scope_t *scope_ptr; - - printf ("\n Symbol# %d: \"%s\"\n", number, sym_ptr->iss + strbase); - - if (aux_base != (AUXU *) 0 && index != indexNil) - switch (symbol_type) - { - case st_Nil: - case st_Label: - break; - - case st_File: - case st_Block: - printf (" End+1 symbol: %ld\n", index); - if (want_scope) - { - if (free_scope == (scope_t *) 0) - scope_ptr = (scope_t *) xmalloc (sizeof (scope_t)); - else - { - scope_ptr = free_scope; - free_scope = scope_ptr->prev; - } - scope_ptr->open_sym = number; - scope_ptr->st = symbol_type; - scope_ptr->sc = storage_class; - scope_ptr->prev = cur_scope; - cur_scope = scope_ptr; - } - break; - - case st_End: - if (storage_class == sc_Text || storage_class == sc_Info) - printf (" First symbol: %ld\n", index); - else - { - used_ptr[index] = 1; - printf (" First symbol: %ld\n", (long) aux_base[index].isym); - } - - if (want_scope) - { - if (cur_scope == (scope_t *) 0) - printf (" Can't pop end scope\n"); - else - { - scope_ptr = cur_scope; - cur_scope = scope_ptr->prev; - scope_ptr->prev = free_scope; - free_scope = scope_ptr; - } - } - break; - - case st_Proc: - case st_StaticProc: - if (MIPS_IS_STAB(sym_ptr)) - ; - else if (ifd == -1) /* local symbol */ - { - used_ptr[index] = used_ptr[index+1] = 1; - printf (" End+1 symbol: %-7ld Type: %s\n", - (long) aux_base[index].isym, - type_to_string (aux_base, index+1, fdp)); - } - else /* global symbol */ - printf (" Local symbol: %ld\n", index); - - if (want_scope) - { - if (free_scope == (scope_t *) 0) - scope_ptr = (scope_t *) xmalloc (sizeof (scope_t)); - else - { - scope_ptr = free_scope; - free_scope = scope_ptr->prev; - } - scope_ptr->open_sym = number; - scope_ptr->st = symbol_type; - scope_ptr->sc = storage_class; - scope_ptr->prev = cur_scope; - cur_scope = scope_ptr; - } - break; - -#ifdef stStruct - case st_Struct: - case st_Union: - case st_Enum: - printf (" End+1 symbol: %lu\n", index); - break; -#endif - - default: - if (!MIPS_IS_STAB (sym_ptr)) - { - used_ptr[index] = 1; - printf (" Type: %s\n", - type_to_string (aux_base, index, fdp)); - } - break; - } - - if (want_scope) - { - printf (" Scopes: "); - if (cur_scope == (scope_t *) 0) - printf (" none\n"); - else - { - for (scope_ptr = cur_scope; - scope_ptr != (scope_t *) 0; - scope_ptr = scope_ptr->prev) - { - const char *sclass; - if (scope_ptr->st == st_Proc || scope_ptr->st == st_StaticProc) - sclass = "func."; - else if (scope_ptr->st == st_File) - sclass = "file"; - else if (scope_ptr->st == st_Block && scope_ptr->sc == sc_Text) - sclass = "block"; - else if (scope_ptr->st == st_Block && scope_ptr->sc == sc_Info) - sclass = "type"; - else - sclass = "???"; - - printf (" %ld [%s]", scope_ptr->open_sym, sclass); - } - printf ("\n"); - } - } - - printf (" Value: %-13ld ", - (long)sym_ptr->value); - if (ifd == -1) - printf ("String index: %ld\n", (long)sym_ptr->iss); - else - printf ("String index: %-11ld Ifd: %d\n", - (long)sym_ptr->iss, ifd); - - printf (" Symbol type: %-11sStorage class: %-11s", - st_to_string (symbol_type), sc_to_string (storage_class)); - - if (MIPS_IS_STAB(sym_ptr)) - { - int i = ARRAY_SIZE (stab_names); - const char *stab_name = "stab"; - short code = MIPS_UNMARK_STAB(sym_ptr->index); - - while (--i >= 0) - if (stab_names[i].code == code) - { - stab_name = stab_names[i].string; - break; - } - printf ("Index: 0x%lx (%s)\n", (long)sym_ptr->index, stab_name); - } - else if (sym_ptr->st == stLabel && sym_ptr->index != indexNil) - printf ("Index: %ld (line#)\n", (long)sym_ptr->index); - else - printf ("Index: %ld\n", (long)sym_ptr->index); - -} - - -/* Print out a word from the aux. table in various formats. */ - -static void -print_aux (AUXU u, int auxi, int used) -{ - printf ("\t%s#%-5d %11ld, [%4ld/%7ld], [%2d %1d:%1d %1x:%1x:%1x:%1x:%1x:%1x]\n", - (used) ? " " : "* ", - auxi, - (long) u.isym, - (long) u.rndx.rfd, - (long) u.rndx.index, - u.ti.bt, - u.ti.fBitfield, - u.ti.continued, - u.ti.tq0, - u.ti.tq1, - u.ti.tq2, - u.ti.tq3, - u.ti.tq4, - u.ti.tq5); -} - - -/* Write aggregate information to a string. */ - -static void -emit_aggregate (char *string, AUXU u, AUXU u2, const char *which, FDR *fdp) -{ - unsigned int ifd = u.rndx.rfd; - unsigned int index = u.rndx.index; - const char *name; - - if (ifd == ST_RFDESCAPE) - ifd = u2.isym; - - /* An ifd of -1 is an opaque type. An escaped index of 0 is a - struct return type of a procedure compiled without -g. */ - if (ifd == 0xffffffff - || (u.rndx.rfd == ST_RFDESCAPE && index == 0)) - name = "<undefined>"; - else if (index == indexNil) - name = "<no name>"; - else - { - if (fdp == 0 || sym_hdr.crfd == 0) - fdp = &file_desc[ifd]; - else - fdp = &file_desc[rfile_desc[fdp->rfdBase + ifd]]; - name = &l_strings[fdp->issBase + l_symbols[index + fdp->isymBase].iss]; - } - - sprintf (string, - "%s %s { ifd = %u, index = %u }", - which, name, ifd, index); -} - - -/* Print out information about a file descriptor, and the symbols, - procedures, and line numbers within it. */ - -static void -print_file_desc (FDR *fdp, int number) -{ - char *str_base; - AUXU *aux_base; - int symi, pdi; - int width = 20; - char *used_base; - - str_base = l_strings + fdp->issBase; - aux_base = aux_symbols + fdp->iauxBase; - used_base = aux_used + (aux_base - aux_symbols); - - printf ("\nFile #%d, \"%s\"\n\n", - number, - fdp->rss != issNil ? str_base + fdp->rss : "<unknown>"); - - printf (" Name index = %-10ld Readin = %s\n", - (long) fdp->rss, (fdp->fReadin) ? "Yes" : "No"); - - printf (" Merge = %-10s Endian = %s\n", - (fdp->fMerge) ? "Yes" : "No", - (fdp->fBigendian) ? "BIG" : "LITTLE"); - - printf (" Debug level = %-10s Language = %s\n", - glevel_to_string ((glevel_t) fdp->glevel), - lang_to_string((lang_t) fdp->lang)); - - printf (" Adr = 0x%08lx\n\n", (long) fdp->adr); - - printf(" %-*s %11s %11s %11s %11s\n", width, "Info", "Start", "Number", "Size", "Offset"); - printf(" %-*s %11s %11s %11s %11s\n", width, "====", "=====", "======", "====", "======"); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Local strings", - (ulong) fdp->issBase, - (ulong) fdp->cbSs, - (ulong) fdp->cbSs, - (ulong) (fdp->issBase + sym_hdr.cbSsOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Local symbols", - (ulong) fdp->isymBase, - (ulong) fdp->csym, - (ulong) (fdp->csym * sizeof (SYMR)), - (ulong) (fdp->isymBase * sizeof (SYMR) + sym_hdr.cbSymOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Line numbers", - (ulong) fdp->cbLineOffset, - (ulong) fdp->cline, - (ulong) fdp->cbLine, - (ulong) (fdp->cbLineOffset + sym_hdr.cbLineOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Optimization symbols", - (ulong) fdp->ioptBase, - (ulong) fdp->copt, - (ulong) (fdp->copt * sizeof (OPTR)), - (ulong) (fdp->ioptBase * sizeof (OPTR) + sym_hdr.cbOptOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Procedures", - (ulong) fdp->ipdFirst, - (ulong) fdp->cpd, - (ulong) (fdp->cpd * sizeof (PDR)), - (ulong) (fdp->ipdFirst * sizeof (PDR) + sym_hdr.cbPdOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Auxiliary symbols", - (ulong) fdp->iauxBase, - (ulong) fdp->caux, - (ulong) (fdp->caux * sizeof (AUXU)), - (ulong) (fdp->iauxBase * sizeof(AUXU) + sym_hdr.cbAuxOffset)); - - printf(" %-*s %11lu %11lu %11lu %11lu\n", - width, "Relative Files", - (ulong) fdp->rfdBase, - (ulong) fdp->crfd, - (ulong) (fdp->crfd * sizeof (ulong)), - (ulong) (fdp->rfdBase * sizeof(ulong) + sym_hdr.cbRfdOffset)); - - - if (want_scope && cur_scope != (scope_t *) 0) - printf ("\n Warning scope does not start at 0!\n"); - - /* - * print the info about the symbol table. - */ - printf ("\n There are %lu local symbols, starting at %lu\n", - (ulong) fdp->csym, - (ulong) (fdp->isymBase + sym_hdr.cbSymOffset)); - - for(symi = fdp->isymBase; symi < (fdp->csym + fdp->isymBase); symi++) - print_symbol (&l_symbols[symi], - symi - fdp->isymBase, - str_base, - aux_base, - -1, - fdp); - - if (want_scope && cur_scope != (scope_t *) 0) - printf ("\n Warning scope does not end at 0!\n"); - - /* - * print the aux. table if desired. - */ - - if (want_aux && fdp->caux != 0) - { - int auxi; - - printf ("\n There are %lu auxiliary table entries, starting at %lu.\n\n", - (ulong) fdp->caux, - (ulong) (fdp->iauxBase + sym_hdr.cbAuxOffset)); - - for (auxi = fdp->iauxBase; auxi < (fdp->caux + fdp->iauxBase); auxi++) - print_aux (aux_base[auxi], auxi, used_base[auxi]); - } - - /* - * print the relative file descriptors. - */ - if (want_rfd && fdp->crfd != 0) - { - ulong *rfd_ptr, i; - - printf ("\n There are %lu relative file descriptors, starting at %lu.\n", - (ulong) fdp->crfd, - (ulong) fdp->rfdBase); - - rfd_ptr = rfile_desc + fdp->rfdBase; - for (i = 0; i < (ulong) fdp->crfd; i++) - { - printf ("\t#%-5ld %11ld, 0x%08lx\n", i, *rfd_ptr, *rfd_ptr); - rfd_ptr++; - } - } - - /* - * do the procedure descriptors. - */ - printf ("\n There are %lu procedure descriptor entries, ", (ulong) fdp->cpd); - printf ("starting at %lu.\n", (ulong) fdp->ipdFirst); - - for (pdi = fdp->ipdFirst; pdi < (fdp->cpd + fdp->ipdFirst); pdi++) - { - PDR *proc_ptr = &proc_desc[pdi]; - printf ("\n\tProcedure descriptor %d:\n", (pdi - fdp->ipdFirst)); - - if (l_symbols != 0) - printf ("\t Name index = %-11ld Name = \"%s\"\n", - (long) l_symbols[proc_ptr->isym + fdp->isymBase].iss, - l_symbols[proc_ptr->isym + fdp->isymBase].iss + str_base); - - printf ("\t .mask 0x%08lx,%-9ld .fmask 0x%08lx,%ld\n", - (long) proc_ptr->regmask, - (long) proc_ptr->regoffset, - (long) proc_ptr->fregmask, - (long) proc_ptr->fregoffset); - - printf ("\t .frame $%d,%ld,$%d\n", - (int) proc_ptr->framereg, - (long) proc_ptr->frameoffset, - (int) proc_ptr->pcreg); - - printf ("\t Opt. start = %-11ld Symbols start = %ld\n", - (long) proc_ptr->iopt, - (long) proc_ptr->isym); - - printf ("\t First line # = %-11ld Last line # = %ld\n", - (long) proc_ptr->lnLow, - (long) proc_ptr->lnHigh); - - printf ("\t Line Offset = %-11ld Address = 0x%08lx\n", - (long) proc_ptr->cbLineOffset, - (long) proc_ptr->adr); - - /* - * print the line number entries. - */ - - if (want_line && fdp->cline != 0) - { - int delta, count; - long cur_line = proc_ptr->lnLow; - uchar *line_ptr = (((uchar *)lines) + proc_ptr->cbLineOffset - + fdp->cbLineOffset); - uchar *line_end; - - if (pdi == fdp->cpd + fdp->ipdFirst - 1) /* last procedure */ - line_end = ((uchar *)lines) + fdp->cbLine + fdp->cbLineOffset; - else /* not last proc. */ - line_end = (((uchar *)lines) + proc_desc[pdi+1].cbLineOffset - + fdp->cbLineOffset); - - printf ("\n\tThere are %lu bytes holding line numbers, starting at %lu.\n", - (ulong) (line_end - line_ptr), - (ulong) (fdp->ilineBase + sym_hdr.cbLineOffset)); - - while (line_ptr < line_end) - { /* sign extend nibble */ - delta = ((*line_ptr >> 4) ^ 0x8) - 0x8; - count = (*line_ptr & 0xf) + 1; - if (delta != -8) - line_ptr++; - else - { - delta = (((line_ptr[1]) & 0xff) << 8) + ((line_ptr[2]) & 0xff); - delta = (delta ^ 0x8000) - 0x8000; - line_ptr += 3; - } - - cur_line += delta; - printf ("\t Line %11ld, delta %5d, count %2d\n", - cur_line, - delta, - count); - } - } - } -} - - -/* Read in the portions of the .T file that we will print out. */ - -static void -read_tfile (void) -{ - short magic; - off_t sym_hdr_offset = 0; - - read_seek (&magic, sizeof (magic), 0, "Magic number"); - if (!tfile) - { - /* Print out the global header, since this is not a T-file. */ - - read_seek (&global_hdr, sizeof (global_hdr), 0, "Global file header"); - - print_global_hdr (&global_hdr); - - if (global_hdr.f_symptr == 0) - { - printf ("No symbolic header, Goodbye!\n"); - exit (1); - } - - sym_hdr_offset = global_hdr.f_symptr; - } - - read_seek (&sym_hdr, sizeof (sym_hdr), sym_hdr_offset, "Symbolic header"); - - print_sym_hdr (&sym_hdr); - - lines = (LINER *) read_seek (NULL, sym_hdr.cbLine, sym_hdr.cbLineOffset, - "Line numbers"); - - dense_nums = (DNR *) read_seek (NULL, sym_hdr.idnMax * sizeof (DNR), - sym_hdr.cbDnOffset, "Dense numbers"); - - proc_desc = (PDR *) read_seek (NULL, sym_hdr.ipdMax * sizeof (PDR), - sym_hdr.cbPdOffset, "Procedure tables"); - - l_symbols = (SYMR *) read_seek (NULL, sym_hdr.isymMax * sizeof (SYMR), - sym_hdr.cbSymOffset, "Local symbols"); - - opt_symbols = (OPTR *) read_seek (NULL, sym_hdr.ioptMax * sizeof (OPTR), - sym_hdr.cbOptOffset, - "Optimization symbols"); - - aux_symbols = (AUXU *) read_seek (NULL, sym_hdr.iauxMax * sizeof (AUXU), - sym_hdr.cbAuxOffset, "Auxiliary symbols"); - - if (sym_hdr.iauxMax > 0) - aux_used = (char *) xcalloc (sym_hdr.iauxMax, 1); - - l_strings = (char *) read_seek (NULL, sym_hdr.issMax, - sym_hdr.cbSsOffset, "Local string table"); - - e_strings = (char *) read_seek (NULL, sym_hdr.issExtMax, - sym_hdr.cbSsExtOffset, - "External string table"); - - file_desc = (FDR *) read_seek (NULL, sym_hdr.ifdMax * sizeof (FDR), - sym_hdr.cbFdOffset, "File tables"); - - rfile_desc = (ulong *) read_seek (NULL, sym_hdr.crfd * sizeof (ulong), - sym_hdr.cbRfdOffset, - "Relative file tables"); - - e_symbols = (EXTR *) read_seek (NULL, sym_hdr.iextMax * sizeof (EXTR), - sym_hdr.cbExtOffset, "External symbols"); -} - - - -extern int main (int, char **); - -int -main (int argc, char **argv) -{ - int i, opt; - - /* - * Process arguments - */ - while ((opt = getopt_long (argc, argv, "alrsvt", options, NULL)) != -1) - switch (opt) - { - default: errors++; break; - case 'a': want_aux++; break; /* print aux table */ - case 'l': want_line++; break; /* print line numbers */ - case 'r': want_rfd++; break; /* print relative fd's */ - case 's': want_scope++; break; /* print scope info */ - case 'v': verbose++; break; /* print version # */ - case 'V': version++; break; /* print version # */ - case 't': tfile++; break; /* this is a tfile (without header), - and not a .o */ - } - - if (version) - { - printf ("mips-tdump %s%s\n", pkgversion_string, version_string); - fputs ("Copyright (C) 2012 Free Software Foundation, Inc.\n", stdout); - fputs ("This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", - stdout); - exit (0); - } - - if (optind != argc - 1) - errors++; - - if (verbose || errors) - fprintf (stderr, "mips-tdump (GCC) %s\n", version_string); - - if (errors) - { - fprintf (stderr, "Calling Sequence:\n"); - fprintf (stderr, "\t%s [-alrst] <object-or-T-file>\n", argv[0]); - fprintf (stderr, "\n"); - fprintf (stderr, "switches:\n"); - fprintf (stderr, "\t-a Print out auxiliary table.\n"); - fprintf (stderr, "\t-l Print out line numbers.\n"); - fprintf (stderr, "\t-r Print out relative file descriptors.\n"); - fprintf (stderr, "\t-s Print out the current scopes for an item.\n"); - fprintf (stderr, "\t-t Assume there is no global header (ie, a T-file).\n"); - fprintf (stderr, "\t-v Print program version.\n"); - return 1; - } - - /* - * Open and process the input file. - */ - tfile_fd = open (argv[optind], O_RDONLY); - if (tfile_fd < 0) - { - perror (argv[optind]); - return 1; - } - - read_tfile (); - - /* - * Print any global aux words if any. - */ - if (want_aux) - { - long last_aux_in_use; - - if (sym_hdr.ifdMax != 0 && file_desc[0].iauxBase != 0) - { - printf ("\nGlobal auxiliary entries before first file:\n"); - for (i = 0; i < file_desc[0].iauxBase; i++) - print_aux (aux_symbols[i], 0, aux_used[i]); - } - - if (sym_hdr.ifdMax == 0) - last_aux_in_use = 0; - else - last_aux_in_use - = (file_desc[sym_hdr.ifdMax-1].iauxBase - + file_desc[sym_hdr.ifdMax-1].caux - 1); - - if (last_aux_in_use < sym_hdr.iauxMax-1) - { - printf ("\nGlobal auxiliary entries after last file:\n"); - for (i = last_aux_in_use; i < sym_hdr.iauxMax; i++) - print_aux (aux_symbols[i], i - last_aux_in_use, aux_used[i]); - } - } - - /* - * Print the information for each file. - */ - for (i = 0; i < sym_hdr.ifdMax; i++) - print_file_desc (&file_desc[i], i); - - /* - * Print the external symbols. - */ - want_scope = 0; /* scope info is meaning for extern symbols */ - printf ("\nThere are %lu external symbols, starting at %lu\n", - (ulong) sym_hdr.iextMax, - (ulong) sym_hdr.cbExtOffset); - - for(i = 0; i < sym_hdr.iextMax; i++) - print_symbol (&e_symbols[i].asym, i, e_strings, - aux_symbols + file_desc[e_symbols[i].ifd].iauxBase, - e_symbols[i].ifd, - &file_desc[e_symbols[i].ifd]); - - /* - * Print unused aux symbols now. - */ - - if (want_aux) - { - int first_time = 1; - - for (i = 0; i < sym_hdr.iauxMax; i++) - { - if (! aux_used[i]) - { - if (first_time) - { - printf ("\nThe following auxiliary table entries were unused:\n\n"); - first_time = 0; - } - - printf (" #%-5d %11ld 0x%08lx %s\n", - i, - (long) aux_symbols[i].isym, - (long) aux_symbols[i].isym, - type_to_string (aux_symbols, i, (FDR *) 0)); - } - } - } - - return 0; -} diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c deleted file mode 100644 index 25f732a2966..00000000000 --- a/gcc/mips-tfile.c +++ /dev/null @@ -1,5419 +0,0 @@ -/* Update the symbol table (the .T file) in a ECOFF object to - contain debugging information specified by the GNU compiler - in the form of comments (the mips assembler does not support - assembly access to debug information). - Copyright (C) 1991, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. - Contributed by Michael Meissner (meissner@cygnus.com). - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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 GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - - -/* Here is a brief description of the MIPS ECOFF symbol table. The - MIPS symbol table has the following pieces: - - Symbolic Header - | - +-- Auxiliary Symbols - | - +-- Dense number table - | - +-- Optimizer Symbols - | - +-- External Strings - | - +-- External Symbols - | - +-- Relative file descriptors - | - +-- File table - | - +-- Procedure table - | - +-- Line number table - | - +-- Local Strings - | - +-- Local Symbols - - The symbolic header points to each of the other tables, and also - contains the number of entries. It also contains a magic number - and MIPS compiler version number, such as 2.0. - - The auxiliary table is a series of 32 bit integers, that are - referenced as needed from the local symbol table. Unlike standard - COFF, the aux. information does not follow the symbol that uses - it, but rather is a separate table. In theory, this would allow - the MIPS compilers to collapse duplicate aux. entries, but I've not - noticed this happening with the 1.31 compiler suite. The different - types of aux. entries are: - - 1) dnLow: Low bound on array dimension. - - 2) dnHigh: High bound on array dimension. - - 3) isym: Index to the local symbol which is the start of the - function for the end of function first aux. entry. - - 4) width: Width of structures and bitfields. - - 5) count: Count of ranges for variant part. - - 6) rndx: A relative index into the symbol table. The relative - index field has two parts: rfd which is a pointer into the - relative file index table or ST_RFDESCAPE which says the next - aux. entry is the file number, and index: which is the pointer - into the local symbol within a given file table. This is for - things like references to types defined in another file. - - 7) Type information: This is like the COFF type bits, except it - is 32 bits instead of 16; they still have room to add new - basic types; and they can handle more than 6 levels of array, - pointer, function, etc. Each type information field contains - the following structure members: - - a) fBitfield: a bit that says this is a bitfield, and the - size in bits follows as the next aux. entry. - - b) continued: a bit that says the next aux. entry is a - continuation of the current type information (in case - there are more than 6 levels of array/ptr/function). - - c) bt: an integer containing the base type before adding - array, pointer, function, etc. qualifiers. The - current base types that I have documentation for are: - - btNil -- undefined - btAdr -- address - integer same size as ptr - btChar -- character - btUChar -- unsigned character - btShort -- short - btUShort -- unsigned short - btInt -- int - btUInt -- unsigned int - btLong -- long - btULong -- unsigned long - btFloat -- float (real) - btDouble -- Double (real) - btStruct -- Structure (Record) - btUnion -- Union (variant) - btEnum -- Enumerated - btTypedef -- defined via a typedef isymRef - btRange -- subrange of int - btSet -- pascal sets - btComplex -- fortran complex - btDComplex -- fortran double complex - btIndirect -- forward or unnamed typedef - btFixedDec -- Fixed Decimal - btFloatDec -- Float Decimal - btString -- Varying Length Character String - btBit -- Aligned Bit String - btPicture -- Picture - btVoid -- Void (MIPS cc revision >= 2.00) - - d) tq0 - tq5: type qualifier fields as needed. The - current type qualifier fields I have documentation for - are: - - tqNil -- no more qualifiers - tqPtr -- pointer - tqProc -- procedure - tqArray -- array - tqFar -- 8086 far pointers - tqVol -- volatile - - - The dense number table is used in the front ends, and disappears by - the time the .o is created. - - With the 1.31 compiler suite, the optimization symbols don't seem - to be used as far as I can tell. - - The linker is the first entity that creates the relative file - descriptor table, and I believe it is used so that the individual - file table pointers don't have to be rewritten when the objects are - merged together into the program file. - - Unlike COFF, the basic symbol & string tables are split into - external and local symbols/strings. The relocation information - only goes off of the external symbol table, and the debug - information only goes off of the internal symbol table. The - external symbols can have links to an appropriate file index and - symbol within the file to give it the appropriate type information. - Because of this, the external symbols are actually larger than the - internal symbols (to contain the link information), and contain the - local symbol structure as a member, though this member is not the - first member of the external symbol structure (!). I suspect this - split is to make strip easier to deal with. - - Each file table has offsets for where the line numbers, local - strings, local symbols, and procedure table starts from within the - global tables, and the indices are reset to 0 for each of those - tables for the file. - - The procedure table contains the binary equivalents of the .ent - (start of the function address), .frame (what register is the - virtual frame pointer, constant offset from the register to obtain - the VFP, and what register holds the return address), .mask/.fmask - (bitmask of saved registers, and where the first register is stored - relative to the VFP) assembler directives. It also contains the - low and high bounds of the line numbers if debugging is turned on. - - The line number table is a compressed form of the normal COFF line - table. Each line number entry is either 1 or 3 bytes long, and - contains a signed delta from the previous line, and an unsigned - count of the number of instructions this statement takes. - - The local symbol table contains the following fields: - - 1) iss: index to the local string table giving the name of the - symbol. - - 2) value: value of the symbol (address, register number, etc.). - - 3) st: symbol type. The current symbol types are: - - stNil -- Nuthin' special - stGlobal -- external symbol - stStatic -- static - stParam -- procedure argument - stLocal -- local variable - stLabel -- label - stProc -- External Procedure - stBlock -- beginning of block - stEnd -- end (of anything) - stMember -- member (of anything) - stTypedef -- type definition - stFile -- file name - stRegReloc -- register relocation - stForward -- forwarding address - stStaticProc -- Static procedure - stConstant -- const - - 4) sc: storage class. The current storage classes are: - - scText -- text symbol - scData -- initialized data symbol - scBss -- un-initialized data symbol - scRegister -- value of symbol is register number - scAbs -- value of symbol is absolute - scUndefined -- who knows? - scCdbLocal -- variable's value is IN se->va.?? - scBits -- this is a bit field - scCdbSystem -- value is IN debugger's address space - scRegImage -- register value saved on stack - scInfo -- symbol contains debugger information - scUserStruct -- addr in struct user for current process - scSData -- load time only small data - scSBss -- load time only small common - scRData -- load time only read only data - scVar -- Var parameter (fortranpascal) - scCommon -- common variable - scSCommon -- small common - scVarRegister -- Var parameter in a register - scVariant -- Variant record - scSUndefined -- small undefined(external) data - scInit -- .init section symbol - - 5) index: pointer to a local symbol or aux. entry. - - - - For the following program: - - #include <stdio.h> - - main(){ - printf("Hello World!\n"); - return 0; - } - - Mips-tdump produces the following information: - - Global file header: - magic number 0x162 - # sections 2 - timestamp 645311799, Wed Jun 13 17:16:39 1990 - symbolic header offset 284 - symbolic header size 96 - optional header 56 - flags 0x0 - - Symbolic header, magic number = 0x7009, vstamp = 1.31: - - Info Offset Number Bytes - ==== ====== ====== ===== - - Line numbers 380 4 4 [13] - Dense numbers 0 0 0 - Procedures Tables 384 1 52 - Local Symbols 436 16 192 - Optimization Symbols 0 0 0 - Auxiliary Symbols 628 39 156 - Local Strings 784 80 80 - External Strings 864 144 144 - File Tables 1008 2 144 - Relative Files 0 0 0 - External Symbols 1152 20 320 - - File #0, "hello2.c" - - Name index = 1 Readin = No - Merge = No Endian = LITTLE - Debug level = G2 Language = C - Adr = 0x00000000 - - Info Start Number Size Offset - ==== ===== ====== ==== ====== - Local strings 0 15 15 784 - Local symbols 0 6 72 436 - Line numbers 0 13 13 380 - Optimization symbols 0 0 0 0 - Procedures 0 1 52 384 - Auxiliary symbols 0 14 56 628 - Relative Files 0 0 0 0 - - There are 6 local symbols, starting at 436 - - Symbol# 0: "hello2.c" - End+1 symbol = 6 - String index = 1 - Storage class = Text Index = 6 - Symbol type = File Value = 0 - - Symbol# 1: "main" - End+1 symbol = 5 - Type = int - String index = 10 - Storage class = Text Index = 12 - Symbol type = Proc Value = 0 - - Symbol# 2: "" - End+1 symbol = 4 - String index = 0 - Storage class = Text Index = 4 - Symbol type = Block Value = 8 - - Symbol# 3: "" - First symbol = 2 - String index = 0 - Storage class = Text Index = 2 - Symbol type = End Value = 28 - - Symbol# 4: "main" - First symbol = 1 - String index = 10 - Storage class = Text Index = 1 - Symbol type = End Value = 52 - - Symbol# 5: "hello2.c" - First symbol = 0 - String index = 1 - Storage class = Text Index = 0 - Symbol type = End Value = 0 - - There are 14 auxiliary table entries, starting at 628. - - * #0 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #1 24, [ 24/ 0], [ 6 0:0 0:0:0:0:0:0] - * #2 8, [ 8/ 0], [ 2 0:0 0:0:0:0:0:0] - * #3 16, [ 16/ 0], [ 4 0:0 0:0:0:0:0:0] - * #4 24, [ 24/ 0], [ 6 0:0 0:0:0:0:0:0] - * #5 32, [ 32/ 0], [ 8 0:0 0:0:0:0:0:0] - * #6 40, [ 40/ 0], [10 0:0 0:0:0:0:0:0] - * #7 44, [ 44/ 0], [11 0:0 0:0:0:0:0:0] - * #8 12, [ 12/ 0], [ 3 0:0 0:0:0:0:0:0] - * #9 20, [ 20/ 0], [ 5 0:0 0:0:0:0:0:0] - * #10 28, [ 28/ 0], [ 7 0:0 0:0:0:0:0:0] - * #11 36, [ 36/ 0], [ 9 0:0 0:0:0:0:0:0] - #12 5, [ 5/ 0], [ 1 1:0 0:0:0:0:0:0] - #13 24, [ 24/ 0], [ 6 0:0 0:0:0:0:0:0] - - There are 1 procedure descriptor entries, starting at 0. - - Procedure descriptor 0: - Name index = 10 Name = "main" - .mask 0x80000000,-4 .fmask 0x00000000,0 - .frame $29,24,$31 - Opt. start = -1 Symbols start = 1 - First line # = 3 Last line # = 6 - Line Offset = 0 Address = 0x00000000 - - There are 4 bytes holding line numbers, starting at 380. - Line 3, delta 0, count 2 - Line 4, delta 1, count 3 - Line 5, delta 1, count 2 - Line 6, delta 1, count 6 - - File #1, "/usr/include/stdio.h" - - Name index = 1 Readin = No - Merge = Yes Endian = LITTLE - Debug level = G2 Language = C - Adr = 0x00000000 - - Info Start Number Size Offset - ==== ===== ====== ==== ====== - Local strings 15 65 65 799 - Local symbols 6 10 120 508 - Line numbers 0 0 0 380 - Optimization symbols 0 0 0 0 - Procedures 1 0 0 436 - Auxiliary symbols 14 25 100 684 - Relative Files 0 0 0 0 - - There are 10 local symbols, starting at 442 - - Symbol# 0: "/usr/include/stdio.h" - End+1 symbol = 10 - String index = 1 - Storage class = Text Index = 10 - Symbol type = File Value = 0 - - Symbol# 1: "_iobuf" - End+1 symbol = 9 - String index = 22 - Storage class = Info Index = 9 - Symbol type = Block Value = 20 - - Symbol# 2: "_cnt" - Type = int - String index = 29 - Storage class = Info Index = 4 - Symbol type = Member Value = 0 - - Symbol# 3: "_ptr" - Type = ptr to char - String index = 34 - Storage class = Info Index = 15 - Symbol type = Member Value = 32 - - Symbol# 4: "_base" - Type = ptr to char - String index = 39 - Storage class = Info Index = 16 - Symbol type = Member Value = 64 - - Symbol# 5: "_bufsiz" - Type = int - String index = 45 - Storage class = Info Index = 4 - Symbol type = Member Value = 96 - - Symbol# 6: "_flag" - Type = short - String index = 53 - Storage class = Info Index = 3 - Symbol type = Member Value = 128 - - Symbol# 7: "_file" - Type = char - String index = 59 - Storage class = Info Index = 2 - Symbol type = Member Value = 144 - - Symbol# 8: "" - First symbol = 1 - String index = 0 - Storage class = Info Index = 1 - Symbol type = End Value = 0 - - Symbol# 9: "/usr/include/stdio.h" - First symbol = 0 - String index = 1 - Storage class = Text Index = 0 - Symbol type = End Value = 0 - - There are 25 auxiliary table entries, starting at 642. - - * #14 -1, [4095/1048575], [63 1:1 f:f:f:f:f:f] - #15 65544, [ 8/ 16], [ 2 0:0 1:0:0:0:0:0] - #16 65544, [ 8/ 16], [ 2 0:0 1:0:0:0:0:0] - * #17 196656, [ 48/ 48], [12 0:0 3:0:0:0:0:0] - * #18 8191, [4095/ 1], [63 1:1 0:0:0:0:f:1] - * #19 1, [ 1/ 0], [ 0 1:0 0:0:0:0:0:0] - * #20 20479, [4095/ 4], [63 1:1 0:0:0:0:f:4] - * #21 1, [ 1/ 0], [ 0 1:0 0:0:0:0:0:0] - * #22 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #23 2, [ 2/ 0], [ 0 0:1 0:0:0:0:0:0] - * #24 160, [ 160/ 0], [40 0:0 0:0:0:0:0:0] - * #25 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #26 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #27 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #28 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #29 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #30 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #31 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #32 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #33 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #34 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #35 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #36 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #37 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - * #38 0, [ 0/ 0], [ 0 0:0 0:0:0:0:0:0] - - There are 0 procedure descriptor entries, starting at 1. - - There are 20 external symbols, starting at 1152 - - Symbol# 0: "_iob" - Type = array [3 {160}] of struct _iobuf { ifd = 1, index = 1 } - String index = 0 Ifd = 1 - Storage class = Nil Index = 17 - Symbol type = Global Value = 60 - - Symbol# 1: "fopen" - String index = 5 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 2: "fdopen" - String index = 11 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 3: "freopen" - String index = 18 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 4: "popen" - String index = 26 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 5: "tmpfile" - String index = 32 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 6: "ftell" - String index = 40 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 7: "rewind" - String index = 46 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 8: "setbuf" - String index = 53 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 9: "setbuffer" - String index = 60 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 10: "setlinebuf" - String index = 70 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 11: "fgets" - String index = 81 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 12: "gets" - String index = 87 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 13: "ctermid" - String index = 92 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 14: "cuserid" - String index = 100 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 15: "tempnam" - String index = 108 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 16: "tmpnam" - String index = 116 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 17: "sprintf" - String index = 123 Ifd = 1 - Storage class = Nil Index = 1048575 - Symbol type = Proc Value = 0 - - Symbol# 18: "main" - Type = int - String index = 131 Ifd = 0 - Storage class = Text Index = 1 - Symbol type = Proc Value = 0 - - Symbol# 19: "printf" - String index = 136 Ifd = 0 - Storage class = Undefined Index = 1048575 - Symbol type = Proc Value = 0 - - The following auxiliary table entries were unused: - - #0 0 0x00000000 void - #2 8 0x00000008 char - #3 16 0x00000010 short - #4 24 0x00000018 int - #5 32 0x00000020 long - #6 40 0x00000028 float - #7 44 0x0000002c double - #8 12 0x0000000c unsigned char - #9 20 0x00000014 unsigned short - #10 28 0x0000001c unsigned int - #11 36 0x00000024 unsigned long - #14 0 0x00000000 void - #15 24 0x00000018 int - #19 32 0x00000020 long - #20 40 0x00000028 float - #21 44 0x0000002c double - #22 12 0x0000000c unsigned char - #23 20 0x00000014 unsigned short - #24 28 0x0000001c unsigned int - #25 36 0x00000024 unsigned long - #26 48 0x00000030 struct no name { ifd = -1, index = 1048575 } - -*/ - - -#include "config.h" -#include "system.h" -#include "version.h" -#include "intl.h" - -/* Include getopt.h for the sake of getopt_long. */ -#include "getopt.h" - -/* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for - mips-tdump.c to print them out. - - These must match the corresponding definitions in gdb/mipsread.c. - Unfortunately, gcc and gdb do not currently share any directories. */ - -#define CODE_MASK 0x8F300 -#define MIPS_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK) -#define MIPS_MARK_STAB(code) ((code)+CODE_MASK) -#define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) - -/* The following might be called from obstack or malloc, - so they can't be static. */ - -extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN; -extern void botch (const char *) ATTRIBUTE_NORETURN; - -extern void fatal (const char *format, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; -extern void error (const char *format, ...) ATTRIBUTE_PRINTF_1; - -/* The local and global symbols have a field index, so undo any defines - of index -> strchr. */ - -#undef index - -#include <a.out.h> -#include "gstab.h" - -#define IS_ASM_IDENT(ch) \ - (ISIDNUM (ch) || (ch) == '.' || (ch) == '$') - - -/* Redefinition of storage classes as an enumeration for better - debugging. */ - -typedef enum sc { - sc_Nil = scNil, /* no storage class */ - sc_Text = scText, /* text symbol */ - sc_Data = scData, /* initialized data symbol */ - sc_Bss = scBss, /* un-initialized data symbol */ - sc_Register = scRegister, /* value of symbol is register number */ - sc_Abs = scAbs, /* value of symbol is absolute */ - sc_Undefined = scUndefined, /* who knows? */ - sc_CdbLocal = scCdbLocal, /* variable's value is IN se->va.?? */ - sc_Bits = scBits, /* this is a bit field */ - sc_CdbSystem = scCdbSystem, /* value is IN CDB's address space */ - sc_RegImage = scRegImage, /* register value saved on stack */ - sc_Info = scInfo, /* symbol contains debugger information */ - sc_UserStruct = scUserStruct, /* addr in struct user for current process */ - sc_SData = scSData, /* load time only small data */ - sc_SBss = scSBss, /* load time only small common */ - sc_RData = scRData, /* load time only read only data */ - sc_Var = scVar, /* Var parameter (fortran,pascal) */ - sc_Common = scCommon, /* common variable */ - sc_SCommon = scSCommon, /* small common */ - sc_VarRegister = scVarRegister, /* Var parameter in a register */ - sc_Variant = scVariant, /* Variant record */ - sc_SUndefined = scSUndefined, /* small undefined(external) data */ - sc_Init = scInit, /* .init section symbol */ - sc_Max = scMax /* Max storage class+1 */ -} sc_t; - -/* Redefinition of symbol type. */ - -typedef enum st { - st_Nil = stNil, /* Nuthin' special */ - st_Global = stGlobal, /* external symbol */ - st_Static = stStatic, /* static */ - st_Param = stParam, /* procedure argument */ - st_Local = stLocal, /* local variable */ - st_Label = stLabel, /* label */ - st_Proc = stProc, /* " " Procedure */ - st_Block = stBlock, /* beginning of block */ - st_End = stEnd, /* end (of anything) */ - st_Member = stMember, /* member (of anything - struct/union/enum */ - st_Typedef = stTypedef, /* type definition */ - st_File = stFile, /* file name */ - st_RegReloc = stRegReloc, /* register relocation */ - st_Forward = stForward, /* forwarding address */ - st_StaticProc = stStaticProc, /* load time only static procs */ - st_Constant = stConstant, /* const */ - st_Str = stStr, /* string */ - st_Number = stNumber, /* pure number (i.e. 4 NOR 2+2) */ - st_Expr = stExpr, /* 2+2 vs. 4 */ - st_Type = stType, /* post-coercion SER */ - st_Max = stMax /* max type+1 */ -} st_t; - -/* Redefinition of type qualifiers. */ - -typedef enum tq { - tq_Nil = tqNil, /* bt is what you see */ - tq_Ptr = tqPtr, /* pointer */ - tq_Proc = tqProc, /* procedure */ - tq_Array = tqArray, /* duh */ - tq_Far = tqFar, /* longer addressing - 8086/8 land */ - tq_Vol = tqVol, /* volatile */ - tq_Max = tqMax /* Max type qualifier+1 */ -} tq_t; - -/* Redefinition of basic types. */ - -typedef enum bt { - bt_Nil = btNil, /* undefined */ - bt_Adr = btAdr, /* address - integer same size as pointer */ - bt_Char = btChar, /* character */ - bt_UChar = btUChar, /* unsigned character */ - bt_Short = btShort, /* short */ - bt_UShort = btUShort, /* unsigned short */ - bt_Int = btInt, /* int */ - bt_UInt = btUInt, /* unsigned int */ - bt_Long = btLong, /* long */ - bt_ULong = btULong, /* unsigned long */ - bt_Float = btFloat, /* float (real) */ - bt_Double = btDouble, /* Double (real) */ - bt_Struct = btStruct, /* Structure (Record) */ - bt_Union = btUnion, /* Union (variant) */ - bt_Enum = btEnum, /* Enumerated */ - bt_Typedef = btTypedef, /* defined via a typedef, isymRef points */ - bt_Range = btRange, /* subrange of int */ - bt_Set = btSet, /* pascal sets */ - bt_Complex = btComplex, /* fortran complex */ - bt_DComplex = btDComplex, /* fortran double complex */ - bt_Indirect = btIndirect, /* forward or unnamed typedef */ - bt_FixedDec = btFixedDec, /* Fixed Decimal */ - bt_FloatDec = btFloatDec, /* Float Decimal */ - bt_String = btString, /* Varying Length Character String */ - bt_Bit = btBit, /* Aligned Bit String */ - bt_Picture = btPicture, /* Picture */ - -#ifdef btVoid - bt_Void = btVoid, /* Void */ -#else -#define bt_Void bt_Nil -#endif - - bt_Max = btMax /* Max basic type+1 */ -} bt_t; - - - -/* Basic COFF storage classes. */ -enum coff_storage { - C_EFCN = -1, - C_NULL = 0, - C_AUTO = 1, - C_EXT = 2, - C_STAT = 3, - C_REG = 4, - C_EXTDEF = 5, - C_LABEL = 6, - C_ULABEL = 7, - C_MOS = 8, - C_ARG = 9, - C_STRTAG = 10, - C_MOU = 11, - C_UNTAG = 12, - C_TPDEF = 13, - C_USTATIC = 14, - C_ENTAG = 15, - C_MOE = 16, - C_REGPARM = 17, - C_FIELD = 18, - C_BLOCK = 100, - C_FCN = 101, - C_EOS = 102, - C_FILE = 103, - C_LINE = 104, - C_ALIAS = 105, - C_HIDDEN = 106, - C_MAX = 107 -} coff_storage_t; - -/* Regular COFF fundamental type. */ -typedef enum coff_type { - T_NULL = 0, - T_ARG = 1, - T_CHAR = 2, - T_SHORT = 3, - T_INT = 4, - T_LONG = 5, - T_FLOAT = 6, - T_DOUBLE = 7, - T_STRUCT = 8, - T_UNION = 9, - T_ENUM = 10, - T_MOE = 11, - T_UCHAR = 12, - T_USHORT = 13, - T_UINT = 14, - T_ULONG = 15, - T_MAX = 16 -} coff_type_t; - -/* Regular COFF derived types. */ -typedef enum coff_dt { - DT_NON = 0, - DT_PTR = 1, - DT_FCN = 2, - DT_ARY = 3, - DT_MAX = 4 -} coff_dt_t; - -#define N_BTMASK 017 /* bitmask to isolate basic type */ -#define N_TMASK 003 /* bitmask to isolate derived type */ -#define N_BT_SHIFT 4 /* # bits to shift past basic type */ -#define N_TQ_SHIFT 2 /* # bits to shift derived types */ -#define N_TQ 6 /* # of type qualifiers */ - -/* States for whether to hash type or not. */ -typedef enum hash_state { - hash_no = 0, /* don't hash type */ - hash_yes = 1, /* ok to hash type, or use previous hash */ - hash_record = 2 /* ok to record hash, but don't use prev. */ -} hash_state_t; - - -/* Types of different sized allocation requests. */ -enum alloc_type { - alloc_type_none, /* dummy value */ - alloc_type_scope, /* nested scopes linked list */ - alloc_type_vlinks, /* glue linking pages in varray */ - alloc_type_shash, /* string hash element */ - alloc_type_thash, /* type hash element */ - alloc_type_tag, /* struct/union/tag element */ - alloc_type_forward, /* element to hold unknown tag */ - alloc_type_thead, /* head of type hash list */ - alloc_type_varray, /* general varray allocation */ - alloc_type_last /* last+1 element for array bounds */ -}; - - -#define WORD_ALIGN(x) (((x) + (sizeof (long) - 1)) & ~ (sizeof (long) - 1)) -#define DWORD_ALIGN(x) (((x) + 7) & ~7) - - -/* Structures to provide n-number of virtual arrays, each of which can - grow linearly, and which are written in the object file as sequential - pages. On systems with a BSD malloc that define USE_MALLOC, the - MAX_CLUSTER_PAGES should be 1 less than a power of two, since malloc - adds its overhead, and rounds up to the next power of 2. Pages are - linked together via a linked list. */ - -#ifndef PAGE_SIZE -#define PAGE_SIZE 32768 /* size of varray pages */ -#endif - -#define PAGE_USIZE ((size_t) PAGE_SIZE) - - -#ifndef MAX_CLUSTER_PAGES /* # pages to get from system */ -#ifndef USE_MALLOC /* in one memory request */ -#define MAX_CLUSTER_PAGES 64 -#else -#define MAX_CLUSTER_PAGES 63 -#endif -#endif - - -/* Linked list connecting separate page allocations. */ -typedef struct vlinks { - struct vlinks *prev; /* previous set of pages */ - struct vlinks *next; /* next set of pages */ - union page *datum; /* start of page */ - unsigned long start_index; /* starting index # of page */ -} vlinks_t; - - -/* Virtual array header. */ -typedef struct varray { - vlinks_t *first; /* first page link */ - vlinks_t *last; /* last page link */ - unsigned long num_allocated; /* # objects allocated */ - unsigned short object_size; /* size in bytes of each object */ - unsigned short objects_per_page; /* # objects that can fit on a page */ - unsigned short objects_last_page; /* # objects allocated on last page */ -} varray_t; - -#ifndef MALLOC_CHECK -#define OBJECTS_PER_PAGE(type) (PAGE_SIZE / sizeof (type)) -#else -#define OBJECTS_PER_PAGE(type) ((sizeof (type) > 1) ? 1 : PAGE_SIZE) -#endif - -#define INIT_VARRAY(type) { /* macro to initialize a varray */ \ - (vlinks_t *) 0, /* first */ \ - (vlinks_t *) 0, /* last */ \ - 0, /* num_allocated */ \ - sizeof (type), /* object_size */ \ - OBJECTS_PER_PAGE (type), /* objects_per_page */ \ - OBJECTS_PER_PAGE (type), /* objects_last_page */ \ -} - -#define INITIALIZE_VARRAY(x,type) \ -do { \ - (x)->object_size = sizeof (type); \ - (x)->objects_per_page = OBJECTS_PER_PAGE (type); \ - (x)->objects_last_page = OBJECTS_PER_PAGE (type); \ -} while (0) - -/* Master type for indexes within the symbol table. */ -typedef unsigned long symint_t; - - -/* Linked list support for nested scopes (file, block, structure, etc.). */ -typedef struct scope { - struct scope *prev; /* previous scope level */ - struct scope *free; /* free list pointer */ - SYMR *lsym; /* pointer to local symbol node */ - symint_t lnumber; /* lsym index */ - st_t type; /* type of the node */ -} scope_t; - - -/* Forward reference list for tags referenced, but not yet defined. */ -typedef struct forward { - struct forward *next; /* next forward reference */ - struct forward *free; /* free list pointer */ - AUXU *ifd_ptr; /* pointer to store file index */ - AUXU *index_ptr; /* pointer to store symbol index */ - AUXU *type_ptr; /* pointer to munge type info */ -} forward_t; - - -/* Linked list support for tags. The first tag in the list is always - the current tag for that block. */ -typedef struct tag { - struct tag *free; /* free list pointer */ - struct shash *hash_ptr; /* pointer to the hash table head */ - struct tag *same_name; /* tag with same name in outer scope */ - struct tag *same_block; /* next tag defined in the same block. */ - struct forward *forward_ref; /* list of forward references */ - bt_t basic_type; /* bt_Struct, bt_Union, or bt_Enum */ - symint_t ifd; /* file # tag defined in */ - symint_t indx; /* index within file's local symbols */ -} tag_t; - - -/* Head of a block's linked list of tags. */ -typedef struct thead { - struct thead *prev; /* previous block */ - struct thead *free; /* free list pointer */ - struct tag *first_tag; /* first tag in block defined */ -} thead_t; - - -/* Union containing pointers to each the small structures which are freed up. */ -typedef union small_free { - scope_t *f_scope; /* scope structure */ - thead_t *f_thead; /* tag head structure */ - tag_t *f_tag; /* tag element structure */ - forward_t *f_forward; /* forward tag reference */ -} small_free_t; - - -/* String hash table support. The size of the hash table must fit - within a page. */ - -#define SHASH_SIZE 511 - -#define HASH_LEN_MAX ((1 << 12) - 1) /* Max length we can store */ - -typedef struct shash { - struct shash *next; /* next hash value */ - char *string; /* string we are hashing */ - symint_t len; /* string length */ - symint_t indx; /* index within string table */ - EXTR *esym_ptr; /* global symbol pointer */ - SYMR *sym_ptr; /* local symbol pointer */ - SYMR *end_ptr; /* symbol pointer to end block */ - tag_t *tag_ptr; /* tag pointer */ - PDR *proc_ptr; /* procedure descriptor pointer */ -} shash_t; - - -/* Type hash table support. The size of the hash table must fit - within a page with the other extended file descriptor information. - Because unique types which are hashed are fewer in number than - strings, we use a smaller hash value. */ - -#define THASH_SIZE 55 - -typedef struct thash { - struct thash *next; /* next hash value */ - AUXU type; /* type we are hashing */ - symint_t indx; /* index within string table */ -} thash_t; - - -/* Extended file descriptor that contains all of the support necessary - to add things to each file separately. */ -typedef struct efdr { - FDR fdr; /* File header to be written out */ - FDR *orig_fdr; /* original file header */ - char *name; /* filename */ - int name_len; /* length of the filename */ - symint_t void_type; /* aux. pointer to 'void' type */ - symint_t int_type; /* aux. pointer to 'int' type */ - scope_t *cur_scope; /* current nested scopes */ - symint_t file_index; /* current file number */ - int nested_scopes; /* # nested scopes */ - varray_t strings; /* local strings */ - varray_t symbols; /* local symbols */ - varray_t procs; /* procedures */ - varray_t aux_syms; /* auxiliary symbols */ - struct efdr *next_file; /* next file descriptor */ - /* string/type hash tables */ - shash_t **shash_head; /* string hash table */ - thash_t *thash_head[THASH_SIZE]; -} efdr_t; - -/* Pre-initialized extended file structure. */ -static int init_file_initialized = 0; -static efdr_t init_file; - -static efdr_t *first_file; /* first file descriptor */ -static efdr_t **last_file_ptr = &first_file; /* file descriptor tail */ - - -/* Union of various things that are held in pages. */ -typedef union page { - char byte [ PAGE_SIZE ]; - unsigned char ubyte [ PAGE_SIZE ]; - efdr_t file [ PAGE_SIZE / sizeof (efdr_t) ]; - FDR ofile [ PAGE_SIZE / sizeof (FDR) ]; - PDR proc [ PAGE_SIZE / sizeof (PDR) ]; - SYMR sym [ PAGE_SIZE / sizeof (SYMR) ]; - EXTR esym [ PAGE_SIZE / sizeof (EXTR) ]; - AUXU aux [ PAGE_SIZE / sizeof (AUXU) ]; - DNR dense [ PAGE_SIZE / sizeof (DNR) ]; - scope_t scope [ PAGE_SIZE / sizeof (scope_t) ]; - vlinks_t vlinks [ PAGE_SIZE / sizeof (vlinks_t) ]; - shash_t shash [ PAGE_SIZE / sizeof (shash_t) ]; - thash_t thash [ PAGE_SIZE / sizeof (thash_t) ]; - tag_t tag [ PAGE_SIZE / sizeof (tag_t) ]; - forward_t forward [ PAGE_SIZE / sizeof (forward_t) ]; - thead_t thead [ PAGE_SIZE / sizeof (thead_t) ]; -} page_t; - - -/* Structure holding allocation information for small sized structures. */ -typedef struct alloc_info { - const char *alloc_name; /* name of this allocation type (must be first) */ - page_t *cur_page; /* current page being allocated from */ - small_free_t free_list; /* current free list if any */ - int unallocated; /* number of elements unallocated on page */ - int total_alloc; /* total number of allocations */ - int total_free; /* total number of frees */ - int total_pages; /* total number of pages allocated */ -} alloc_info_t; - -/* Type information collected together. */ -typedef struct type_info { - bt_t basic_type; /* basic type */ - coff_type_t orig_type; /* original COFF-based type */ - int num_tq; /* # type qualifiers */ - int num_dims; /* # dimensions */ - int num_sizes; /* # sizes */ - int extra_sizes; /* # extra sizes not tied with dims */ - tag_t * tag_ptr; /* tag pointer */ - int bitfield; /* symbol is a bitfield */ - int unknown_tag; /* this is an unknown tag */ - tq_t type_qualifiers[N_TQ]; /* type qualifiers (ptr, func, array)*/ - symint_t dimensions [N_TQ]; /* dimensions for each array */ - symint_t sizes [N_TQ+2]; /* sizes of each array slice + size of - struct/union/enum + bitfield size */ -} type_info_t; - -/* Pre-initialized type_info struct. */ -static type_info_t type_info_init = { - bt_Nil, /* basic type */ - T_NULL, /* original COFF-based type */ - 0, /* # type qualifiers */ - 0, /* # dimensions */ - 0, /* # sizes */ - 0, /* sizes not tied with dims */ - NULL, /* ptr to tag */ - 0, /* bitfield */ - 0, /* unknown tag */ - { /* type qualifiers */ - tq_Nil, - tq_Nil, - tq_Nil, - tq_Nil, - tq_Nil, - tq_Nil, - }, - { /* dimensions */ - 0, - 0, - 0, - 0, - 0, - 0 - }, - { /* sizes */ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - }, -}; - - -/* Global virtual arrays & hash table for external strings as well as - for the tags table and global tables for file descriptors, and - dense numbers. */ - -static varray_t file_desc = INIT_VARRAY (efdr_t); -static varray_t dense_num = INIT_VARRAY (DNR); -static varray_t tag_strings = INIT_VARRAY (char); -static varray_t ext_strings = INIT_VARRAY (char); -static varray_t ext_symbols = INIT_VARRAY (EXTR); - -static shash_t *orig_str_hash[SHASH_SIZE]; -static shash_t *ext_str_hash [SHASH_SIZE]; -static shash_t *tag_hash [SHASH_SIZE]; - -/* Static types for int and void. Also, remember the last function's - type (which is set up when we encounter the declaration for the - function, and used when the end block for the function is emitted. */ - -static type_info_t int_type_info; -static type_info_t void_type_info; -static type_info_t last_func_type_info; -static EXTR *last_func_eptr; - - -/* Convert COFF basic type to ECOFF basic type. The T_NULL type - really should use bt_Void, but this causes the current ecoff GDB to - issue unsupported type messages, and the Ultrix 4.00 dbx (aka MIPS - 2.0) doesn't understand it, even though the compiler generates it. - Maybe this will be fixed in 2.10 or 2.20 of the MIPS compiler - suite, but for now go with what works. */ - -static const bt_t map_coff_types[ (int) T_MAX ] = { - bt_Nil, /* T_NULL */ - bt_Nil, /* T_ARG */ - bt_Char, /* T_CHAR */ - bt_Short, /* T_SHORT */ - bt_Int, /* T_INT */ - bt_Long, /* T_LONG */ - bt_Float, /* T_FLOAT */ - bt_Double, /* T_DOUBLE */ - bt_Struct, /* T_STRUCT */ - bt_Union, /* T_UNION */ - bt_Enum, /* T_ENUM */ - bt_Enum, /* T_MOE */ - bt_UChar, /* T_UCHAR */ - bt_UShort, /* T_USHORT */ - bt_UInt, /* T_UINT */ - bt_ULong /* T_ULONG */ -}; - -/* Convert COFF storage class to ECOFF storage class. */ -static const sc_t map_coff_storage[ (int) C_MAX ] = { - sc_Nil, /* 0: C_NULL */ - sc_Abs, /* 1: C_AUTO auto var */ - sc_Undefined, /* 2: C_EXT external */ - sc_Data, /* 3: C_STAT static */ - sc_Register, /* 4: C_REG register */ - sc_Undefined, /* 5: C_EXTDEF ??? */ - sc_Text, /* 6: C_LABEL label */ - sc_Text, /* 7: C_ULABEL user label */ - sc_Info, /* 8: C_MOS member of struct */ - sc_Abs, /* 9: C_ARG argument */ - sc_Info, /* 10: C_STRTAG struct tag */ - sc_Info, /* 11: C_MOU member of union */ - sc_Info, /* 12: C_UNTAG union tag */ - sc_Info, /* 13: C_TPDEF typedef */ - sc_Data, /* 14: C_USTATIC ??? */ - sc_Info, /* 15: C_ENTAG enum tag */ - sc_Info, /* 16: C_MOE member of enum */ - sc_Register, /* 17: C_REGPARM register parameter */ - sc_Bits, /* 18; C_FIELD bitfield */ - sc_Nil, /* 19 */ - sc_Nil, /* 20 */ - sc_Nil, /* 21 */ - sc_Nil, /* 22 */ - sc_Nil, /* 23 */ - sc_Nil, /* 24 */ - sc_Nil, /* 25 */ - sc_Nil, /* 26 */ - sc_Nil, /* 27 */ - sc_Nil, /* 28 */ - sc_Nil, /* 29 */ - sc_Nil, /* 30 */ - sc_Nil, /* 31 */ - sc_Nil, /* 32 */ - sc_Nil, /* 33 */ - sc_Nil, /* 34 */ - sc_Nil, /* 35 */ - sc_Nil, /* 36 */ - sc_Nil, /* 37 */ - sc_Nil, /* 38 */ - sc_Nil, /* 39 */ - sc_Nil, /* 40 */ - sc_Nil, /* 41 */ - sc_Nil, /* 42 */ - sc_Nil, /* 43 */ - sc_Nil, /* 44 */ - sc_Nil, /* 45 */ - sc_Nil, /* 46 */ - sc_Nil, /* 47 */ - sc_Nil, /* 48 */ - sc_Nil, /* 49 */ - sc_Nil, /* 50 */ - sc_Nil, /* 51 */ - sc_Nil, /* 52 */ - sc_Nil, /* 53 */ - sc_Nil, /* 54 */ - sc_Nil, /* 55 */ - sc_Nil, /* 56 */ - sc_Nil, /* 57 */ - sc_Nil, /* 58 */ - sc_Nil, /* 59 */ - sc_Nil, /* 60 */ - sc_Nil, /* 61 */ - sc_Nil, /* 62 */ - sc_Nil, /* 63 */ - sc_Nil, /* 64 */ - sc_Nil, /* 65 */ - sc_Nil, /* 66 */ - sc_Nil, /* 67 */ - sc_Nil, /* 68 */ - sc_Nil, /* 69 */ - sc_Nil, /* 70 */ - sc_Nil, /* 71 */ - sc_Nil, /* 72 */ - sc_Nil, /* 73 */ - sc_Nil, /* 74 */ - sc_Nil, /* 75 */ - sc_Nil, /* 76 */ - sc_Nil, /* 77 */ - sc_Nil, /* 78 */ - sc_Nil, /* 79 */ - sc_Nil, /* 80 */ - sc_Nil, /* 81 */ - sc_Nil, /* 82 */ - sc_Nil, /* 83 */ - sc_Nil, /* 84 */ - sc_Nil, /* 85 */ - sc_Nil, /* 86 */ - sc_Nil, /* 87 */ - sc_Nil, /* 88 */ - sc_Nil, /* 89 */ - sc_Nil, /* 90 */ - sc_Nil, /* 91 */ - sc_Nil, /* 92 */ - sc_Nil, /* 93 */ - sc_Nil, /* 94 */ - sc_Nil, /* 95 */ - sc_Nil, /* 96 */ - sc_Nil, /* 97 */ - sc_Nil, /* 98 */ - sc_Nil, /* 99 */ - sc_Text, /* 100: C_BLOCK block start/end */ - sc_Text, /* 101: C_FCN function start/end */ - sc_Info, /* 102: C_EOS end of struct/union/enum */ - sc_Nil, /* 103: C_FILE file start */ - sc_Nil, /* 104: C_LINE line number */ - sc_Nil, /* 105: C_ALIAS combined type info */ - sc_Nil, /* 106: C_HIDDEN ??? */ -}; - -/* Convert COFF storage class to ECOFF symbol type. */ -static const st_t map_coff_sym_type[ (int) C_MAX ] = { - st_Nil, /* 0: C_NULL */ - st_Local, /* 1: C_AUTO auto var */ - st_Global, /* 2: C_EXT external */ - st_Static, /* 3: C_STAT static */ - st_Local, /* 4: C_REG register */ - st_Global, /* 5: C_EXTDEF ??? */ - st_Label, /* 6: C_LABEL label */ - st_Label, /* 7: C_ULABEL user label */ - st_Member, /* 8: C_MOS member of struct */ - st_Param, /* 9: C_ARG argument */ - st_Block, /* 10: C_STRTAG struct tag */ - st_Member, /* 11: C_MOU member of union */ - st_Block, /* 12: C_UNTAG union tag */ - st_Typedef, /* 13: C_TPDEF typedef */ - st_Static, /* 14: C_USTATIC ??? */ - st_Block, /* 15: C_ENTAG enum tag */ - st_Member, /* 16: C_MOE member of enum */ - st_Param, /* 17: C_REGPARM register parameter */ - st_Member, /* 18; C_FIELD bitfield */ - st_Nil, /* 19 */ - st_Nil, /* 20 */ - st_Nil, /* 21 */ - st_Nil, /* 22 */ - st_Nil, /* 23 */ - st_Nil, /* 24 */ - st_Nil, /* 25 */ - st_Nil, /* 26 */ - st_Nil, /* 27 */ - st_Nil, /* 28 */ - st_Nil, /* 29 */ - st_Nil, /* 30 */ - st_Nil, /* 31 */ - st_Nil, /* 32 */ - st_Nil, /* 33 */ - st_Nil, /* 34 */ - st_Nil, /* 35 */ - st_Nil, /* 36 */ - st_Nil, /* 37 */ - st_Nil, /* 38 */ - st_Nil, /* 39 */ - st_Nil, /* 40 */ - st_Nil, /* 41 */ - st_Nil, /* 42 */ - st_Nil, /* 43 */ - st_Nil, /* 44 */ - st_Nil, /* 45 */ - st_Nil, /* 46 */ - st_Nil, /* 47 */ - st_Nil, /* 48 */ - st_Nil, /* 49 */ - st_Nil, /* 50 */ - st_Nil, /* 51 */ - st_Nil, /* 52 */ - st_Nil, /* 53 */ - st_Nil, /* 54 */ - st_Nil, /* 55 */ - st_Nil, /* 56 */ - st_Nil, /* 57 */ - st_Nil, /* 58 */ - st_Nil, /* 59 */ - st_Nil, /* 60 */ - st_Nil, /* 61 */ - st_Nil, /* 62 */ - st_Nil, /* 63 */ - st_Nil, /* 64 */ - st_Nil, /* 65 */ - st_Nil, /* 66 */ - st_Nil, /* 67 */ - st_Nil, /* 68 */ - st_Nil, /* 69 */ - st_Nil, /* 70 */ - st_Nil, /* 71 */ - st_Nil, /* 72 */ - st_Nil, /* 73 */ - st_Nil, /* 74 */ - st_Nil, /* 75 */ - st_Nil, /* 76 */ - st_Nil, /* 77 */ - st_Nil, /* 78 */ - st_Nil, /* 79 */ - st_Nil, /* 80 */ - st_Nil, /* 81 */ - st_Nil, /* 82 */ - st_Nil, /* 83 */ - st_Nil, /* 84 */ - st_Nil, /* 85 */ - st_Nil, /* 86 */ - st_Nil, /* 87 */ - st_Nil, /* 88 */ - st_Nil, /* 89 */ - st_Nil, /* 90 */ - st_Nil, /* 91 */ - st_Nil, /* 92 */ - st_Nil, /* 93 */ - st_Nil, /* 94 */ - st_Nil, /* 95 */ - st_Nil, /* 96 */ - st_Nil, /* 97 */ - st_Nil, /* 98 */ - st_Nil, /* 99 */ - st_Block, /* 100: C_BLOCK block start/end */ - st_Proc, /* 101: C_FCN function start/end */ - st_End, /* 102: C_EOS end of struct/union/enum */ - st_File, /* 103: C_FILE file start */ - st_Nil, /* 104: C_LINE line number */ - st_Nil, /* 105: C_ALIAS combined type info */ - st_Nil, /* 106: C_HIDDEN ??? */ -}; - -/* Map COFF derived types to ECOFF type qualifiers. */ -static const tq_t map_coff_derived_type[ (int) DT_MAX ] = { - tq_Nil, /* 0: DT_NON no more qualifiers */ - tq_Ptr, /* 1: DT_PTR pointer */ - tq_Proc, /* 2: DT_FCN function */ - tq_Array, /* 3: DT_ARY array */ -}; - - -/* Keep track of different sized allocation requests. */ -static alloc_info_t alloc_counts[ (int) alloc_type_last ]; - - -/* Pointers and such to the original symbol table that is read in. */ -static struct filehdr orig_file_header; /* global object file header */ - -static HDRR orig_sym_hdr; /* symbolic header on input */ -static char *orig_linenum; /* line numbers */ -static DNR *orig_dense; /* dense numbers */ -static PDR *orig_procs; /* procedures */ -static SYMR *orig_local_syms; /* local symbols */ -static OPTR *orig_opt_syms; /* optimization symbols */ -static AUXU *orig_aux_syms; /* auxiliary symbols */ -static char *orig_local_strs; /* local strings */ -static char *orig_ext_strs; /* external strings */ -static FDR *orig_files; /* file descriptors */ -static symint_t *orig_rfds; /* relative file desc's */ -static EXTR *orig_ext_syms; /* external symbols */ - -/* Macros to convert an index into a given object within the original - symbol table. */ -#define CHECK(num,max,str) \ - (((unsigned long) num > (unsigned long) max) ? out_of_bounds (num, max, str, __LINE__) : 0) - -#define ORIG_LINENUM(indx) (CHECK ((indx), orig_sym_hdr.cbLine, "line#"), (indx) + orig_linenum) -#define ORIG_DENSE(indx) (CHECK ((indx), orig_sym_hdr.idnMax, "dense"), (indx) + orig_dense) -#define ORIG_PROCS(indx) (CHECK ((indx), orig_sym_hdr.ipdMax, "procs"), (indx) + orig_procs) -#define ORIG_FILES(indx) (CHECK ((indx), orig_sym_hdr.ifdMax, "funcs"), (indx) + orig_files) -#define ORIG_LSYMS(indx) (CHECK ((indx), orig_sym_hdr.isymMax, "lsyms"), (indx) + orig_local_syms) -#define ORIG_LSTRS(indx) (CHECK ((indx), orig_sym_hdr.issMax, "lstrs"), (indx) + orig_local_strs) -#define ORIG_ESYMS(indx) (CHECK ((indx), orig_sym_hdr.iextMax, "esyms"), (indx) + orig_ext_syms) -#define ORIG_ESTRS(indx) (CHECK ((indx), orig_sym_hdr.issExtMax, "estrs"), (indx) + orig_ext_strs) -#define ORIG_OPT(indx) (CHECK ((indx), orig_sym_hdr.ioptMax, "opt"), (indx) + orig_opt_syms) -#define ORIG_AUX(indx) (CHECK ((indx), orig_sym_hdr.iauxMax, "aux"), (indx) + orig_aux_syms) -#define ORIG_RFDS(indx) (CHECK ((indx), orig_sym_hdr.crfd, "rfds"), (indx) + orig_rfds) - -/* Various other statics. */ -static HDRR symbolic_header; /* symbolic header */ -static efdr_t *cur_file_ptr = (efdr_t *) 0; /* current file desc. header */ -static PDR *cur_proc_ptr = (PDR *) 0; /* current procedure header */ -static SYMR *cur_oproc_begin = (SYMR *) 0; /* original proc. sym begin info */ -static SYMR *cur_oproc_end = (SYMR *) 0; /* original proc. sym end info */ -static PDR *cur_oproc_ptr = (PDR *) 0; /* current original procedure*/ -static thead_t *cur_tag_head = (thead_t *) 0;/* current tag head */ -static unsigned long file_offset = 0; /* current file offset */ -static unsigned long max_file_offset = 0; /* maximum file offset */ -static FILE *object_stream = (FILE *) 0; /* file desc. to output .o */ -static FILE *obj_in_stream = (FILE *) 0; /* file desc. to input .o */ -static const char *progname = (const char *) 0;/* program name for errors */ -static const char *input_name = "stdin"; /* name of input file */ -static char *object_name = (char *) 0; /* tmp. name of object file */ -static char *obj_in_name = (char *) 0; /* name of input object file */ -static char *cur_line_start = (char *) 0; /* current line read in */ -static char *cur_line_ptr = (char *) 0; /* ptr within current line */ -static unsigned cur_line_nbytes = 0; /* # bytes for current line */ -static unsigned cur_line_alloc = 0; /* # bytes total in buffer */ -static long line_number = 0; /* current input line number */ -static int debug = 0; /* trace functions */ -static int version = 0; /* print version # */ -static int verbose = 0; -static int had_errors = 0; /* != 0 if errors were found */ -static int rename_output = 0; /* != 0 if rename output file*/ -static int delete_input = 0; /* != 0 if delete input after done */ -static int stabs_seen = 0; /* != 0 if stabs have been seen */ - - -/* Pseudo symbol to use when putting stabs into the symbol table. */ -#ifndef STABS_SYMBOL -#define STABS_SYMBOL "@stabs" -#endif - -static const char stabs_symbol[] = STABS_SYMBOL; - - -/* Forward reference for functions. See the definition for more details. */ - -static int out_of_bounds (symint_t, symint_t, const char *, int); -static shash_t *hash_string (const char *, ptrdiff_t, shash_t **, symint_t *); -static symint_t add_string (varray_t *, shash_t **, const char *, const char *, - shash_t **); -static symint_t add_local_symbol (const char *, const char *, st_t, sc_t, - symint_t, symint_t); -static symint_t add_ext_symbol (EXTR *, int); -static symint_t add_aux_sym_symint (symint_t); -static symint_t add_aux_sym_rndx (int, symint_t); -static symint_t add_aux_sym_tir (type_info_t *, hash_state_t, thash_t **); -static tag_t * get_tag (const char *, const char *, symint_t, bt_t); -static void add_unknown_tag (tag_t *); -static void add_procedure (const char *, const char *); -static void initialize_init_file (void); -static void add_file (const char *, const char *); -static void add_bytes (varray_t *, char *, size_t); -static void add_varray_page (varray_t *); -static void update_headers (void); -static void write_varray (varray_t *, off_t, const char *); -static void write_object (void); -static const char *st_to_string (st_t); -static const char *sc_to_string (sc_t); -static char *read_line (void); -static void parse_input (void); -static void mark_stabs (const char *); -static void parse_begin (const char *); -static void parse_bend (const char *); -static void parse_def (const char *); -static void parse_end (const char *); -static void parse_ent (const char *); -static void parse_file (const char *); -static void parse_stabs_common (const char *, const char *, const char *); -static void parse_stabs (const char *); -static void parse_stabn (const char *); -static page_t *read_seek (size_t, off_t, const char *); -static void copy_object (void); - -static void catch_signal (int) ATTRIBUTE_NORETURN; -static page_t *allocate_page (void); -static page_t *allocate_multiple_pages (size_t); -static void free_multiple_pages (page_t *, size_t); - -#ifndef MALLOC_CHECK -static page_t *allocate_cluster (size_t); -#endif - -static forward_t *allocate_forward (void); -static scope_t *allocate_scope (void); -static shash_t *allocate_shash (void); -static tag_t *allocate_tag (void); -static thash_t *allocate_thash (void); -static thead_t *allocate_thead (void); -static vlinks_t *allocate_vlinks (void); - -static void free_forward (forward_t *); -static void free_scope (scope_t *); -static void free_tag (tag_t *); -static void free_thead (thead_t *); - -extern char *optarg; -extern int optind; -extern int opterr; - -/* List of assembler pseudo ops and beginning sequences that need - special actions. Someday, this should be a hash table, and such, - but for now a linear list of names and calls to memcmp will - do...... */ - -typedef struct _pseudo_ops { - const char *const name; /* pseudo-op in ascii */ - const int len; /* length of name to compare */ - void (*const func) (const char *); /* function to handle line */ -} pseudo_ops_t; - -static const pseudo_ops_t pseudo_ops[] = { - { "#.def", sizeof("#.def")-1, parse_def }, - { "#.begin", sizeof("#.begin")-1, parse_begin }, - { "#.bend", sizeof("#.bend")-1, parse_bend }, - { ".end", sizeof(".end")-1, parse_end }, - { ".ent", sizeof(".ent")-1, parse_ent }, - { ".file", sizeof(".file")-1, parse_file }, - { "#.stabs", sizeof("#.stabs")-1, parse_stabs }, - { "#.stabn", sizeof("#.stabn")-1, parse_stabn }, - { ".stabs", sizeof(".stabs")-1, parse_stabs }, - { ".stabn", sizeof(".stabn")-1, parse_stabn }, - { "#@stabs", sizeof("#@stabs")-1, mark_stabs }, -}; - - -/* Command line options for getopt_long. */ - -static const struct option options[] = -{ - { "version", 0, 0, 'V' }, - { "verbose", 0, 0, 'v' }, - { 0, 0, 0, 0 } -}; - -/* Add a page to a varray object. */ - -static void -add_varray_page (varray_t *vp) -{ - vlinks_t *new_links = allocate_vlinks (); - -#ifdef MALLOC_CHECK - if (vp->object_size > 1) - new_links->datum = xcalloc (1, vp->object_size); - else -#endif - new_links->datum = allocate_page (); - - alloc_counts[ (int) alloc_type_varray ].total_alloc++; - alloc_counts[ (int) alloc_type_varray ].total_pages++; - - new_links->start_index = vp->num_allocated; - vp->objects_last_page = 0; - - if (vp->first == (vlinks_t *) 0) /* first allocation? */ - vp->first = vp->last = new_links; - else - { /* 2nd or greater allocation */ - new_links->prev = vp->last; - vp->last->next = new_links; - vp->last = new_links; - } -} - - -/* Compute hash code (from tree.c) */ - -#define HASHBITS 30 - -static shash_t * -hash_string (const char *text, ptrdiff_t hash_len, shash_t **hash_tbl, - symint_t *ret_hash_index) -{ - unsigned long hi; - ptrdiff_t i; - shash_t *ptr; - int first_ch = *text; - - hi = hash_len; - for (i = 0; i < hash_len; i++) - hi = ((hi & 0x003fffff) * 613) + (text[i] & 0xff); - - hi &= (1 << HASHBITS) - 1; - hi %= SHASH_SIZE; - - if (ret_hash_index != (symint_t *) 0) - *ret_hash_index = hi; - - for (ptr = hash_tbl[hi]; ptr != (shash_t *) 0; ptr = ptr->next) - if ((symint_t) hash_len == ptr->len - && first_ch == ptr->string[0] - && memcmp (text, ptr->string, hash_len) == 0) - break; - - return ptr; -} - - -/* Add a string (and null pad) to one of the string tables. A - consequence of hashing strings, is that we don't let strings cross - page boundaries. The extra nulls will be ignored. VP is a string - virtual array, HASH_TBL a pointer to the hash table, the string - starts at START and the position one byte after the string is given - with END_P1, the resulting hash pointer is returned in RET_HASH. */ - -static symint_t -add_string (varray_t *vp, shash_t **hash_tbl, const char *start, - const char *end_p1, shash_t **ret_hash) -{ - ptrdiff_t len = end_p1 - start; - shash_t *hash_ptr; - symint_t hi; - - if (len >= (ptrdiff_t) PAGE_USIZE) - fatal ("string too big (%ld bytes)", (long) len); - - hash_ptr = hash_string (start, len, hash_tbl, &hi); - if (hash_ptr == (shash_t *) 0) - { - char *p; - - if (vp->objects_last_page + len >= (long) PAGE_USIZE) - { - vp->num_allocated - = ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE; - add_varray_page (vp); - } - - hash_ptr = allocate_shash (); - hash_ptr->next = hash_tbl[hi]; - hash_tbl[hi] = hash_ptr; - - hash_ptr->len = len; - hash_ptr->indx = vp->num_allocated; - hash_ptr->string = p = & vp->last->datum->byte[ vp->objects_last_page ]; - - vp->objects_last_page += len+1; - vp->num_allocated += len+1; - - while (len-- > 0) - *p++ = *start++; - - *p = '\0'; - } - - if (ret_hash != (shash_t **) 0) - *ret_hash = hash_ptr; - - return hash_ptr->indx; -} - - -/* Add a local symbol. The symbol string starts at STR_START and the - first byte after it is marked by STR_END_P1. The symbol has type - TYPE and storage class STORAGE and value VALUE. INDX is an index - to local/aux. symbols. */ - -static symint_t -add_local_symbol (const char *str_start, const char *str_end_p1, st_t type, - sc_t storage, symint_t value, symint_t indx) -{ - symint_t ret; - SYMR *psym; - scope_t *pscope; - thead_t *ptag_head; - tag_t *ptag; - tag_t *ptag_next; - varray_t *vp = &cur_file_ptr->symbols; - int scope_delta = 0; - shash_t *hash_ptr = (shash_t *) 0; - - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - psym = &vp->last->datum->sym[ vp->objects_last_page++ ]; - - psym->value = value; - psym->st = (unsigned) type; - psym->sc = (unsigned) storage; - psym->index = indx; - psym->iss = (str_start == (const char *) 0) - ? 0 - : add_string (&cur_file_ptr->strings, - &cur_file_ptr->shash_head[0], - str_start, - str_end_p1, - &hash_ptr); - - ret = vp->num_allocated++; - - if (MIPS_IS_STAB (psym)) - return ret; - - /* Save the symbol within the hash table if this is a static - item, and it has a name. */ - if (hash_ptr != (shash_t *) 0 - && (type == st_Global || type == st_Static || type == st_Label - || type == st_Proc || type == st_StaticProc)) - hash_ptr->sym_ptr = psym; - - /* push or pop a scope if appropriate. */ - switch (type) - { - default: - break; - - case st_File: /* beginning of file */ - case st_Proc: /* procedure */ - case st_StaticProc: /* static procedure */ - case st_Block: /* begin scope */ - pscope = allocate_scope (); - pscope->prev = cur_file_ptr->cur_scope; - pscope->lsym = psym; - pscope->lnumber = ret; - pscope->type = type; - cur_file_ptr->cur_scope = pscope; - - if (type != st_File) - scope_delta = 1; - - /* For every block type except file, struct, union, or - enumeration blocks, push a level on the tag stack. We omit - file types, so that tags can span file boundaries. */ - if (type != st_File && storage != sc_Info) - { - ptag_head = allocate_thead (); - ptag_head->first_tag = 0; - ptag_head->prev = cur_tag_head; - cur_tag_head = ptag_head; - } - break; - - case st_End: - pscope = cur_file_ptr->cur_scope; - if (pscope == (scope_t *) 0) - error ("internal error, too many st_End's"); - - else - { - st_t begin_type = (st_t) pscope->lsym->st; - - if (begin_type != st_File) - scope_delta = -1; - - /* Except for file, structure, union, or enumeration end - blocks remove all tags created within this scope. */ - if (begin_type != st_File && storage != sc_Info) - { - ptag_head = cur_tag_head; - cur_tag_head = ptag_head->prev; - - for (ptag = ptag_head->first_tag; - ptag != (tag_t *) 0; - ptag = ptag_next) - { - if (ptag->forward_ref != (forward_t *) 0) - add_unknown_tag (ptag); - - ptag_next = ptag->same_block; - ptag->hash_ptr->tag_ptr = ptag->same_name; - free_tag (ptag); - } - - free_thead (ptag_head); - } - - cur_file_ptr->cur_scope = pscope->prev; - psym->index = pscope->lnumber; /* blk end gets begin sym # */ - - if (storage != sc_Info) - psym->iss = pscope->lsym->iss; /* blk end gets same name */ - - if (begin_type == st_File || begin_type == st_Block) - pscope->lsym->index = ret+1; /* block begin gets next sym # */ - - /* Functions push two or more aux words as follows: - 1st word: index+1 of the end symbol - 2nd word: type of the function (plus any aux words needed). - Also, tie the external pointer back to the function begin symbol. */ - else - { - symint_t type; - pscope->lsym->index = add_aux_sym_symint (ret+1); - type = add_aux_sym_tir (&last_func_type_info, - hash_no, - &cur_file_ptr->thash_head[0]); - if (last_func_eptr) - { - last_func_eptr->ifd = cur_file_ptr->file_index; - - /* The index for an external st_Proc symbol is the index - of the st_Proc symbol in the local symbol table. */ - last_func_eptr->asym.index = psym->index; - } - } - - free_scope (pscope); - } - } - - cur_file_ptr->nested_scopes += scope_delta; - - if (debug && type != st_File - && (debug > 2 || type == st_Block || type == st_End - || type == st_Proc || type == st_StaticProc)) - { - const char *sc_str = sc_to_string (storage); - const char *st_str = st_to_string (type); - int depth = cur_file_ptr->nested_scopes + (scope_delta < 0); - - fprintf (stderr, - "\tlsym\tv= %10ld, depth= %2d, sc= %-12s", - value, depth, sc_str); - - if (str_start && str_end_p1 - str_start > 0) - fprintf (stderr, " st= %-11s name= %.*s\n", - st_str, (int) (str_end_p1 - str_start), str_start); - else - { - size_t len = strlen (st_str); - fprintf (stderr, " st= %.*s\n", (int) (len-1), st_str); - } - } - - return ret; -} - - -/* Add an external symbol with symbol pointer ESYM and file index - IFD. */ - -static symint_t -add_ext_symbol (EXTR *esym, int ifd) -{ - const char *str_start; /* first byte in string */ - const char *str_end_p1; /* first byte after string */ - EXTR *psym; - varray_t *vp = &ext_symbols; - shash_t *hash_ptr = (shash_t *) 0; - - str_start = ORIG_ESTRS (esym->asym.iss); - str_end_p1 = str_start + strlen (str_start); - - if (debug > 1) - { - long value = esym->asym.value; - const char *sc_str = sc_to_string ((sc_t) esym->asym.sc); - const char *st_str = st_to_string ((st_t) esym->asym.st); - - fprintf (stderr, - "\tesym\tv= %10ld, ifd= %2d, sc= %-12s", - value, ifd, sc_str); - - if (str_start && str_end_p1 - str_start > 0) - fprintf (stderr, " st= %-11s name= %.*s\n", - st_str, (int) (str_end_p1 - str_start), str_start); - else - fprintf (stderr, " st= %s\n", st_str); - } - - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - psym = &vp->last->datum->esym[ vp->objects_last_page++ ]; - - *psym = *esym; - psym->ifd = ifd; - psym->asym.index = indexNil; - psym->asym.iss = (str_start == (const char *) 0) - ? 0 - : add_string (&ext_strings, - &ext_str_hash[0], - str_start, - str_end_p1, - &hash_ptr); - - hash_ptr->esym_ptr = psym; - return vp->num_allocated++; -} - - -/* Add an auxiliary symbol (passing a symint). */ - -static symint_t -add_aux_sym_symint (symint_t aux_word) -{ - AUXU *aux_ptr; - efdr_t *file_ptr = cur_file_ptr; - varray_t *vp = &file_ptr->aux_syms; - - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ]; - aux_ptr->isym = aux_word; - - return vp->num_allocated++; -} - - -/* Add an auxiliary symbol (passing a file/symbol index combo). */ - -static symint_t -add_aux_sym_rndx (int file_index, symint_t sym_index) -{ - AUXU *aux_ptr; - efdr_t *file_ptr = cur_file_ptr; - varray_t *vp = &file_ptr->aux_syms; - - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ]; - aux_ptr->rndx.rfd = file_index; - aux_ptr->rndx.index = sym_index; - - return vp->num_allocated++; -} - - -/* Add an auxiliary symbol (passing the basic type and possibly - type qualifiers). */ - -static symint_t -add_aux_sym_tir (type_info_t *t, hash_state_t state, thash_t **hash_tbl) -{ - AUXU *aux_ptr; - efdr_t *file_ptr = cur_file_ptr; - varray_t *vp = &file_ptr->aux_syms; - static AUXU init_aux; - symint_t ret; - int i; - AUXU aux; - - aux = init_aux; - aux.ti.bt = (int) t->basic_type; - aux.ti.continued = 0; - aux.ti.fBitfield = t->bitfield; - - aux.ti.tq0 = (int) t->type_qualifiers[0]; - aux.ti.tq1 = (int) t->type_qualifiers[1]; - aux.ti.tq2 = (int) t->type_qualifiers[2]; - aux.ti.tq3 = (int) t->type_qualifiers[3]; - aux.ti.tq4 = (int) t->type_qualifiers[4]; - aux.ti.tq5 = (int) t->type_qualifiers[5]; - - - /* For anything that adds additional information, we must not hash, - so check here, and reset our state. */ - - if (state != hash_no - && (t->type_qualifiers[0] == tq_Array - || t->type_qualifiers[1] == tq_Array - || t->type_qualifiers[2] == tq_Array - || t->type_qualifiers[3] == tq_Array - || t->type_qualifiers[4] == tq_Array - || t->type_qualifiers[5] == tq_Array - || t->basic_type == bt_Struct - || t->basic_type == bt_Union - || t->basic_type == bt_Enum - || t->bitfield - || t->num_dims > 0)) - state = hash_no; - - /* See if we can hash this type, and save some space, but some types - can't be hashed (because they contain arrays or continuations), - and others can be put into the hash list, but cannot use existing - types because other aux entries precede this one. */ - - if (state != hash_no) - { - thash_t *hash_ptr; - symint_t hi; - - hi = aux.isym & ((1 << HASHBITS) - 1); - hi %= THASH_SIZE; - - for (hash_ptr = hash_tbl[hi]; - hash_ptr != (thash_t *) 0; - hash_ptr = hash_ptr->next) - { - if (aux.isym == hash_ptr->type.isym) - break; - } - - if (hash_ptr != (thash_t *) 0 && state == hash_yes) - return hash_ptr->indx; - - if (hash_ptr == (thash_t *) 0) - { - hash_ptr = allocate_thash (); - hash_ptr->next = hash_tbl[hi]; - hash_ptr->type = aux; - hash_ptr->indx = vp->num_allocated; - hash_tbl[hi] = hash_ptr; - } - } - - /* Everything is set up, add the aux symbol. */ - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ]; - *aux_ptr = aux; - - ret = vp->num_allocated++; - - /* Add bitfield length if it exists. - - NOTE: Mips documentation claims bitfield goes at the end of the - AUX record, but the DECstation compiler emits it here. - (This would only make a difference for enum bitfields.) - - Also note: We use the last size given since gcc may emit 2 - for an enum bitfield. */ - - if (t->bitfield) - (void) add_aux_sym_symint ((symint_t) t->sizes[t->num_sizes-1]); - - - /* Add tag information if needed. Structure, union, and enum - references add 2 aux symbols: a [file index, symbol index] - pointer to the structure type, and the current file index. */ - - if (t->basic_type == bt_Struct - || t->basic_type == bt_Union - || t->basic_type == bt_Enum) - { - symint_t file_index = t->tag_ptr->ifd; - symint_t sym_index = t->tag_ptr->indx; - - if (t->unknown_tag) - { - (void) add_aux_sym_rndx (ST_RFDESCAPE, sym_index); - (void) add_aux_sym_symint ((symint_t)-1); - } - else if (sym_index != indexNil) - { - (void) add_aux_sym_rndx (ST_RFDESCAPE, sym_index); - (void) add_aux_sym_symint (file_index); - } - else - { - forward_t *forward_ref = allocate_forward (); - - forward_ref->type_ptr = aux_ptr; - forward_ref->next = t->tag_ptr->forward_ref; - t->tag_ptr->forward_ref = forward_ref; - - (void) add_aux_sym_rndx (ST_RFDESCAPE, sym_index); - forward_ref->index_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; - - (void) add_aux_sym_symint (file_index); - forward_ref->ifd_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; - } - } - - /* Add information about array bounds if they exist. */ - for (i = 0; i < t->num_dims; i++) - { - (void) add_aux_sym_rndx (ST_RFDESCAPE, - cur_file_ptr->int_type); - - (void) add_aux_sym_symint (cur_file_ptr->file_index); /* file index*/ - (void) add_aux_sym_symint ((symint_t) 0); /* low bound */ - (void) add_aux_sym_symint (t->dimensions[i] - 1); /* high bound*/ - (void) add_aux_sym_symint ((t->dimensions[i] == 0) /* stride */ - ? 0 - : (t->sizes[i] * 8) / t->dimensions[i]); - }; - - /* NOTE: Mips documentation claims that the bitfield width goes here. - But it needs to be emitted earlier. */ - - return ret; -} - - -/* Add a tag to the tag table (unless it already exists). */ - -static tag_t * -get_tag (const char *tag_start, /* 1st byte of tag name */ - const char *tag_end_p1, /* 1st byte after tag name */ - symint_t indx, /* index of tag start block */ - bt_t basic_type) /* bt_Struct, bt_Union, or bt_Enum */ - -{ - shash_t *hash_ptr; - tag_t *tag_ptr; - hash_ptr = hash_string (tag_start, - tag_end_p1 - tag_start, - &tag_hash[0], - (symint_t *) 0); - - if (hash_ptr != (shash_t *) 0 - && hash_ptr->tag_ptr != (tag_t *) 0) - { - tag_ptr = hash_ptr->tag_ptr; - if (indx != indexNil) - { - tag_ptr->basic_type = basic_type; - tag_ptr->ifd = cur_file_ptr->file_index; - tag_ptr->indx = indx; - } - return tag_ptr; - } - - (void) add_string (&tag_strings, - &tag_hash[0], - tag_start, - tag_end_p1, - &hash_ptr); - - tag_ptr = allocate_tag (); - tag_ptr->forward_ref = (forward_t *) 0; - tag_ptr->hash_ptr = hash_ptr; - tag_ptr->same_name = hash_ptr->tag_ptr; - tag_ptr->basic_type = basic_type; - tag_ptr->indx = indx; - tag_ptr->ifd = (indx == indexNil - ? (symint_t) -1 : cur_file_ptr->file_index); - tag_ptr->same_block = cur_tag_head->first_tag; - - cur_tag_head->first_tag = tag_ptr; - hash_ptr->tag_ptr = tag_ptr; - - return tag_ptr; -} - - -/* Add an unknown {struct, union, enum} tag. */ - -static void -add_unknown_tag (tag_t *ptag) -{ - shash_t *hash_ptr = ptag->hash_ptr; - char *name_start = hash_ptr->string; - char *name_end_p1 = name_start + hash_ptr->len; - forward_t *f_next = ptag->forward_ref; - forward_t *f_cur; - int sym_index; - int file_index = cur_file_ptr->file_index; - - if (debug > 1) - { - const char *agg_type = "{unknown aggregate type}"; - switch (ptag->basic_type) - { - case bt_Struct: agg_type = "struct"; break; - case bt_Union: agg_type = "union"; break; - case bt_Enum: agg_type = "enum"; break; - default: break; - } - - fprintf (stderr, "unknown %s %.*s found\n", - agg_type, (int) hash_ptr->len, name_start); - } - - sym_index = add_local_symbol (name_start, - name_end_p1, - st_Block, - sc_Info, - (symint_t) 0, - (symint_t) 0); - - (void) add_local_symbol (name_start, - name_end_p1, - st_End, - sc_Info, - (symint_t) 0, - (symint_t) 0); - - while (f_next != (forward_t *) 0) - { - f_cur = f_next; - f_next = f_next->next; - - f_cur->ifd_ptr->isym = file_index; - f_cur->index_ptr->rndx.index = sym_index; - - free_forward (f_cur); - } - - return; -} - - -/* Add a procedure to the current file's list of procedures, and record - this is the current procedure. If the assembler created a PDR for - this procedure, use that to initialize the current PDR. */ - -static void -add_procedure (const char *func_start, /* 1st byte of func name */ - const char *func_end_p1) /* 1st byte after func name */ -{ - PDR *new_proc_ptr; - efdr_t *file_ptr = cur_file_ptr; - varray_t *vp = &file_ptr->procs; - symint_t value = 0; - st_t proc_type = st_Proc; - shash_t *shash_ptr = hash_string (func_start, - func_end_p1 - func_start, - &orig_str_hash[0], - (symint_t *) 0); - - if (debug) - fputc ('\n', stderr); - - if (vp->objects_last_page == vp->objects_per_page) - add_varray_page (vp); - - cur_proc_ptr = new_proc_ptr = &vp->last->datum->proc[ vp->objects_last_page++ ]; - - vp->num_allocated++; - - - /* Did the assembler create this procedure? If so, get the PDR information. */ - cur_oproc_ptr = (PDR *) 0; - if (shash_ptr != (shash_t *) 0) - { - PDR *old_proc_ptr = shash_ptr->proc_ptr; - SYMR *sym_ptr = shash_ptr->sym_ptr; - - if (old_proc_ptr != (PDR *) 0 - && sym_ptr != (SYMR *) 0 - && ((st_t) sym_ptr->st == st_Proc || (st_t) sym_ptr->st == st_StaticProc)) - { - cur_oproc_begin = sym_ptr; - cur_oproc_end = shash_ptr->end_ptr; - value = sym_ptr->value; - - cur_oproc_ptr = old_proc_ptr; - proc_type = (st_t) sym_ptr->st; - *new_proc_ptr = *old_proc_ptr; /* initialize */ - } - } - - if (cur_oproc_ptr == (PDR *) 0) - error ("did not find a PDR block for %.*s", - (int) (func_end_p1 - func_start), func_start); - - /* Determine the start of symbols. */ - new_proc_ptr->isym = file_ptr->symbols.num_allocated; - - /* Push the start of the function. */ - (void) add_local_symbol (func_start, func_end_p1, - proc_type, sc_Text, - value, - (symint_t) 0); -} - - -/* Initialize the init_file structure. */ - -static void -initialize_init_file (void) -{ - union { - unsigned char c[4]; - int i; - } endian_test; - - memset (&init_file, 0, sizeof (init_file)); - - init_file.fdr.lang = langC; - init_file.fdr.fMerge = 1; - init_file.fdr.glevel = GLEVEL_2; - - /* mips-tfile doesn't attempt to perform byte swapping and always writes - out integers in its native ordering. For cross-compilers, this need - not be the same as either the host or the target. The simplest thing - to do is skip the configury and perform an introspective test. */ - /* ??? Despite the name, mips-tfile is currently only used on alpha/Tru64 - and would/may require significant work to be used in cross-compiler - configurations, so we could simply admit defeat and hard code this as - little-endian, i.e. init_file.fdr.fBigendian = 0. */ - endian_test.i = 1; - if (endian_test.c[3]) - init_file.fdr.fBigendian = 1; - - INITIALIZE_VARRAY (&init_file.strings, char); - INITIALIZE_VARRAY (&init_file.symbols, SYMR); - INITIALIZE_VARRAY (&init_file.procs, PDR); - INITIALIZE_VARRAY (&init_file.aux_syms, AUXU); - - init_file_initialized = 1; -} - -/* Add a new filename, and set up all of the file relative - virtual arrays (strings, symbols, aux syms, etc.). Record - where the current file structure lives. */ - -static void -add_file (const char *file_start, /* first byte in string */ - const char *file_end_p1) /* first byte after string */ -{ - static char zero_bytes[2] = { '\0', '\0' }; - - ptrdiff_t len = file_end_p1 - file_start; - int first_ch = *file_start; - efdr_t *file_ptr; - - if (debug) - fprintf (stderr, "\tfile\t%.*s\n", (int) len, file_start); - - /* See if the file has already been created. */ - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - if (first_ch == file_ptr->name[0] - && file_ptr->name[len] == '\0' - && memcmp (file_start, file_ptr->name, len) == 0) - { - cur_file_ptr = file_ptr; - break; - } - } - - /* If this is a new file, create it. */ - if (file_ptr == (efdr_t *) 0) - { - if (file_desc.objects_last_page == file_desc.objects_per_page) - add_varray_page (&file_desc); - - if (! init_file_initialized) - initialize_init_file (); - - file_ptr = cur_file_ptr - = &file_desc.last->datum->file[ file_desc.objects_last_page++ ]; - *file_ptr = init_file; - - file_ptr->file_index = file_desc.num_allocated++; - - /* Allocate the string hash table. */ - file_ptr->shash_head = (shash_t **) allocate_page (); - - /* Make sure 0 byte in string table is null */ - add_string (&file_ptr->strings, - &file_ptr->shash_head[0], - &zero_bytes[0], - &zero_bytes[0], - (shash_t **) 0); - - if (file_end_p1 - file_start > (long) PAGE_USIZE-2) - fatal ("filename goes over one page boundary"); - - /* Push the start of the filename. We assume that the filename - will be stored at string offset 1. */ - (void) add_local_symbol (file_start, file_end_p1, st_File, sc_Text, - (symint_t) 0, (symint_t) 0); - file_ptr->fdr.rss = 1; - file_ptr->name = &file_ptr->strings.last->datum->byte[1]; - file_ptr->name_len = file_end_p1 - file_start; - - /* Update the linked list of file descriptors. */ - *last_file_ptr = file_ptr; - last_file_ptr = &file_ptr->next_file; - - /* Add void & int types to the file (void should be first to catch - errant 0's within the index fields). */ - file_ptr->void_type = add_aux_sym_tir (&void_type_info, - hash_yes, - &cur_file_ptr->thash_head[0]); - - file_ptr->int_type = add_aux_sym_tir (&int_type_info, - hash_yes, - &cur_file_ptr->thash_head[0]); - } -} - - -/* Add a stream of random bytes to a varray. */ - -static void -add_bytes (varray_t *vp, /* virtual array to add too */ - char *input_ptr, /* start of the bytes */ - size_t nitems) /* # items to move */ -{ - size_t move_items; - size_t move_bytes; - char *ptr; - - while (nitems > 0) - { - if (vp->objects_last_page >= vp->objects_per_page) - add_varray_page (vp); - - ptr = &vp->last->datum->byte[ vp->objects_last_page * vp->object_size ]; - move_items = vp->objects_per_page - vp->objects_last_page; - if (move_items > nitems) - move_items = nitems; - - move_bytes = move_items * vp->object_size; - nitems -= move_items; - - if (move_bytes >= 32) - { - (void) memcpy (ptr, input_ptr, move_bytes); - input_ptr += move_bytes; - } - else - { - while (move_bytes-- > 0) - *ptr++ = *input_ptr++; - } - } -} - - -/* Convert storage class to string. */ - -static const char * -sc_to_string (sc_t storage_class) -{ - switch (storage_class) - { - case sc_Nil: return "Nil,"; - case sc_Text: return "Text,"; - case sc_Data: return "Data,"; - case sc_Bss: return "Bss,"; - case sc_Register: return "Register,"; - case sc_Abs: return "Abs,"; - case sc_Undefined: return "Undefined,"; - case sc_CdbLocal: return "CdbLocal,"; - case sc_Bits: return "Bits,"; - case sc_CdbSystem: return "CdbSystem,"; - case sc_RegImage: return "RegImage,"; - case sc_Info: return "Info,"; - case sc_UserStruct: return "UserStruct,"; - case sc_SData: return "SData,"; - case sc_SBss: return "SBss,"; - case sc_RData: return "RData,"; - case sc_Var: return "Var,"; - case sc_Common: return "Common,"; - case sc_SCommon: return "SCommon,"; - case sc_VarRegister: return "VarRegister,"; - case sc_Variant: return "Variant,"; - case sc_SUndefined: return "SUndefined,"; - case sc_Init: return "Init,"; - case sc_Max: return "Max,"; - } - - return "???,"; -} - - -/* Convert symbol type to string. */ - -static const char * -st_to_string (st_t symbol_type) -{ - switch (symbol_type) - { - case st_Nil: return "Nil,"; - case st_Global: return "Global,"; - case st_Static: return "Static,"; - case st_Param: return "Param,"; - case st_Local: return "Local,"; - case st_Label: return "Label,"; - case st_Proc: return "Proc,"; - case st_Block: return "Block,"; - case st_End: return "End,"; - case st_Member: return "Member,"; - case st_Typedef: return "Typedef,"; - case st_File: return "File,"; - case st_RegReloc: return "RegReloc,"; - case st_Forward: return "Forward,"; - case st_StaticProc: return "StaticProc,"; - case st_Constant: return "Constant,"; - case st_Str: return "String,"; - case st_Number: return "Number,"; - case st_Expr: return "Expr,"; - case st_Type: return "Type,"; - case st_Max: return "Max,"; - } - - return "???,"; -} - - -/* Read a line from standard input, and return the start of the buffer - (which is grows if the line is too big). We split lines at the - semi-colon, and return each logical line independently. */ - -static char * -read_line (void) -{ - static int line_split_p = 0; - int string_p = 0; - int comment_p = 0; - int ch; - char *ptr; - - if (cur_line_start == (char *) 0) - { /* allocate initial page */ - cur_line_start = (char *) allocate_page (); - cur_line_alloc = PAGE_SIZE; - } - - if (!line_split_p) - line_number++; - - line_split_p = 0; - cur_line_nbytes = 0; - - for (ptr = cur_line_start; (ch = getchar ()) != EOF; *ptr++ = ch) - { - if (++cur_line_nbytes >= cur_line_alloc-1) - { - int num_pages = cur_line_alloc / PAGE_SIZE; - char *old_buffer = cur_line_start; - - cur_line_alloc += PAGE_SIZE; - cur_line_start = (char *) allocate_multiple_pages (num_pages+1); - memcpy (cur_line_start, old_buffer, num_pages * PAGE_SIZE); - - ptr = cur_line_start + cur_line_nbytes - 1; - } - - if (ch == '\n') - { - *ptr++ = '\n'; - *ptr = '\0'; - cur_line_ptr = cur_line_start; - return cur_line_ptr; - } - - else if (ch == '\0') - error ("null character found in input"); - - else if (!comment_p) - { - if (ch == '"') - string_p = !string_p; - - else if (ch == '#') - comment_p++; - - else if (ch == ';' && !string_p) - { - line_split_p = 1; - *ptr++ = '\n'; - *ptr = '\0'; - cur_line_ptr = cur_line_start; - return cur_line_ptr; - } - } - } - - if (ferror (stdin)) - pfatal_with_name (input_name); - - cur_line_ptr = (char *) 0; - return (char *) 0; -} - - -/* Parse #.begin directives which have a label as the first argument - which gives the location of the start of the block. */ - -static void -parse_begin (const char *start) -{ - const char *end_p1; /* end of label */ - int ch; - shash_t *hash_ptr; /* hash pointer to lookup label */ - - if (cur_file_ptr == (efdr_t *) 0) - { - error ("#.begin directive without a preceding .file directive"); - return; - } - - if (cur_proc_ptr == (PDR *) 0) - { - error ("#.begin directive without a preceding .ent directive"); - return; - } - - for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++) - ; - - hash_ptr = hash_string (start, - end_p1 - start, - &orig_str_hash[0], - (symint_t *) 0); - - if (hash_ptr == (shash_t *) 0) - { - error ("label %.*s not found for #.begin", - (int) (end_p1 - start), start); - return; - } - - if (cur_oproc_begin == (SYMR *) 0) - { - error ("procedure table %.*s not found for #.begin", - (int) (end_p1 - start), start); - return; - } - - (void) add_local_symbol ((const char *) 0, (const char *) 0, - st_Block, sc_Text, - (symint_t) hash_ptr->sym_ptr->value - cur_oproc_begin->value, - (symint_t) 0); -} - - -/* Parse #.bend directives which have a label as the first argument - which gives the location of the end of the block. */ - -static void -parse_bend (const char *start) -{ - const char *end_p1; /* end of label */ - int ch; - shash_t *hash_ptr; /* hash pointer to lookup label */ - - if (cur_file_ptr == (efdr_t *) 0) - { - error ("#.begin directive without a preceding .file directive"); - return; - } - - if (cur_proc_ptr == (PDR *) 0) - { - error ("#.bend directive without a preceding .ent directive"); - return; - } - - for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++) - ; - - hash_ptr = hash_string (start, - end_p1 - start, - &orig_str_hash[0], - (symint_t *) 0); - - if (hash_ptr == (shash_t *) 0) - { - error ("label %.*s not found for #.bend", (int) (end_p1 - start), start); - return; - } - - if (cur_oproc_begin == (SYMR *) 0) - { - error ("procedure table %.*s not found for #.bend", - (int) (end_p1 - start), start); - return; - } - - (void) add_local_symbol ((const char *) 0, (const char *) 0, - st_End, sc_Text, - (symint_t) hash_ptr->sym_ptr->value - cur_oproc_begin->value, - (symint_t) 0); -} - - -/* Parse #.def directives, which are contain standard COFF subdirectives - to describe the debugging format. These subdirectives include: - - .scl specify storage class - .val specify a value - .endef specify end of COFF directives - .type specify the type - .size specify the size of an array - .dim specify an array dimension - .tag specify a tag for a struct, union, or enum. */ - -static void -parse_def (const char *name_start) -{ - const char *dir_start; /* start of current directive*/ - const char *dir_end_p1; /* end+1 of current directive*/ - const char *arg_start; /* start of current argument */ - const char *arg_end_p1; /* end+1 of current argument */ - const char *name_end_p1; /* end+1 of label */ - const char *tag_start = 0; /* start of tag name */ - const char *tag_end_p1 = 0; /* end+1 of tag name */ - sc_t storage_class = sc_Nil; - st_t symbol_type = st_Nil; - type_info_t t; - EXTR *eptr = (EXTR *) 0; /* ext. sym equivalent to def*/ - int is_function = 0; /* != 0 if function */ - symint_t value = 0; - symint_t indx = cur_file_ptr->void_type; - int error_line = 0; - symint_t arg_number; - symint_t temp_array[ N_TQ ]; - int arg_was_number; - int ch, i; - ptrdiff_t len; - - static int inside_enumeration = 0; /* is this an enumeration? */ - - - /* Initialize the type information. */ - t = type_info_init; - - - /* Search for the end of the name being defined. */ - /* Allow spaces and such in names for G++ templates, which produce stabs - that look like: - - #.def SMANIP<long unsigned int>; .scl 10; .type 0x8; .size 8; .endef */ - - for (name_end_p1 = name_start; (ch = *name_end_p1) != ';' && ch != '\0'; name_end_p1++) - ; - - if (ch == '\0') - { - error_line = __LINE__; - goto bomb_out; - } - - /* Parse the remaining subdirectives now. */ - dir_start = name_end_p1+1; - for (;;) - { - while ((ch = *dir_start) == ' ' || ch == '\t') - ++dir_start; - - if (ch != '.') - { - error_line = __LINE__; - goto bomb_out; - } - - /* Are we done? */ - if (dir_start[1] == 'e' - && memcmp (dir_start, ".endef", sizeof (".endef")-1) == 0) - break; - - /* Pick up the subdirective now. */ - for (dir_end_p1 = dir_start+1; - (ch = *dir_end_p1) != ' ' && ch != '\t'; - dir_end_p1++) - { - if (ch == '\0' || ISSPACE (ch)) - { - error_line = __LINE__; - goto bomb_out; - } - } - - /* Pick up the subdirective argument now. */ - arg_was_number = arg_number = 0; - arg_end_p1 = 0; - arg_start = dir_end_p1+1; - ch = *arg_start; - while (ch == ' ' || ch == '\t') - ch = *++arg_start; - - if (ISDIGIT (ch) || ch == '-' || ch == '+') - { - int ch2; - arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - /* It's only a number if followed by ';' or ','. */ - if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) - arg_was_number++; - } - - else if (ch == '\0' || ISSPACE (ch)) - { - error_line = __LINE__; - goto bomb_out; - } - - if (!arg_was_number) - { - /* Allow spaces and such in names for G++ templates. */ - for (arg_end_p1 = arg_start+1; - (ch = *arg_end_p1) != ';' && ch != '\0'; - arg_end_p1++) - ; - - if (ch == '\0') - { - error_line = __LINE__; - goto bomb_out; - } - } - - /* Classify the directives now. */ - len = dir_end_p1 - dir_start; - switch (dir_start[1]) - { - default: - error_line = __LINE__; - goto bomb_out; - - case 'd': - if (len == sizeof (".dim")-1 - && memcmp (dir_start, ".dim", sizeof (".dim")-1) == 0 - && arg_was_number) - { - symint_t *t_ptr = &temp_array[ N_TQ-1 ]; - - *t_ptr = arg_number; - while (*arg_end_p1 == ',' && arg_was_number) - { - arg_start = arg_end_p1+1; - ch = *arg_start; - while (ch == ' ' || ch == '\t') - ch = *++arg_start; - - arg_was_number = 0; - if (ISDIGIT (ch) || ch == '-' || ch == '+') - { - int ch2; - arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) - arg_was_number++; - - if (t_ptr == &temp_array[0]) - { - error_line = __LINE__; - goto bomb_out; - } - - *--t_ptr = arg_number; - } - } - - /* Reverse order of dimensions. */ - while (t_ptr <= &temp_array[ N_TQ-1 ]) - { - if (t.num_dims >= N_TQ-1) - { - error_line = __LINE__; - goto bomb_out; - } - - t.dimensions[ t.num_dims++ ] = *t_ptr++; - } - break; - } - else - { - error_line = __LINE__; - goto bomb_out; - } - - - case 's': - if (len == sizeof (".scl")-1 - && memcmp (dir_start, ".scl", sizeof (".scl")-1) == 0 - && arg_was_number - && arg_number < ((symint_t) C_MAX)) - { - /* If the symbol is a static or external, we have - already gotten the appropriate type and class, so - make sure we don't override those values. This is - needed because there are some type and classes that - are not in COFF, such as short data, etc. */ - if (symbol_type == st_Nil) - { - symbol_type = map_coff_sym_type[arg_number]; - storage_class = map_coff_storage [arg_number]; - } - break; - } - - else if (len == sizeof (".size")-1 - && memcmp (dir_start, ".size", sizeof (".size")-1) == 0 - && arg_was_number) - { - symint_t *t_ptr = &temp_array[ N_TQ-1 ]; - - *t_ptr = arg_number; - while (*arg_end_p1 == ',' && arg_was_number) - { - arg_start = arg_end_p1+1; - ch = *arg_start; - while (ch == ' ' || ch == '\t') - ch = *++arg_start; - - arg_was_number = 0; - if (ISDIGIT (ch) || ch == '-' || ch == '+') - { - int ch2; - arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) - arg_was_number++; - - if (t_ptr == &temp_array[0]) - { - error_line = __LINE__; - goto bomb_out; - } - - *--t_ptr = arg_number; - } - } - - /* Reverse order of sizes. */ - while (t_ptr <= &temp_array[ N_TQ-1 ]) - { - if (t.num_sizes >= N_TQ-1) - { - error_line = __LINE__; - goto bomb_out; - } - - t.sizes[ t.num_sizes++ ] = *t_ptr++; - } - break; - } - - else - { - error_line = __LINE__; - goto bomb_out; - } - - - case 't': - if (len == sizeof (".type")-1 - && memcmp (dir_start, ".type", sizeof (".type")-1) == 0 - && arg_was_number) - { - tq_t *tq_ptr = &t.type_qualifiers[0]; - - t.orig_type = (coff_type_t) (arg_number & N_BTMASK); - t.basic_type = map_coff_types [(int) t.orig_type]; - for (i = N_TQ-1; i >= 0; i--) - { - int dt = (arg_number >> ((i * N_TQ_SHIFT) + N_BT_SHIFT) - & N_TMASK); - - if (dt != (int) DT_NON) - *tq_ptr++ = map_coff_derived_type [dt]; - } - - /* If this is a function, ignore it, so that we don't get - two entries (one from the .ent, and one for the .def - that precedes it). Save the type information so that - the end block can properly add it after the begin block - index. For MIPS knows what reason, we must strip off - the function type at this point. */ - if (tq_ptr != &t.type_qualifiers[0] && tq_ptr[-1] == tq_Proc) - { - is_function = 1; - tq_ptr[-1] = tq_Nil; - } - - break; - } - - else if (len == sizeof (".tag")-1 - && memcmp (dir_start, ".tag", sizeof (".tag")-1) == 0) - { - tag_start = arg_start; - tag_end_p1 = arg_end_p1; - break; - } - - else - { - error_line = __LINE__; - goto bomb_out; - } - - - case 'v': - if (len == sizeof (".val")-1 - && memcmp (dir_start, ".val", sizeof (".val")-1) == 0) - { - if (arg_was_number) - value = arg_number; - - /* If the value is not an integer value, it must be the - name of a static or global item. Look up the name in - the original symbol table to pick up the storage - class, symbol type, etc. */ - else - { - shash_t *orig_hash_ptr; /* hash within orig sym table*/ - shash_t *ext_hash_ptr; /* hash within ext. sym table*/ - - ext_hash_ptr = hash_string (arg_start, - arg_end_p1 - arg_start, - &ext_str_hash[0], - (symint_t *) 0); - - if (ext_hash_ptr != (shash_t *) 0 - && ext_hash_ptr->esym_ptr != (EXTR *) 0) - eptr = ext_hash_ptr->esym_ptr; - - orig_hash_ptr = hash_string (arg_start, - arg_end_p1 - arg_start, - &orig_str_hash[0], - (symint_t *) 0); - - if ((orig_hash_ptr == (shash_t *) 0 - || orig_hash_ptr->sym_ptr == (SYMR *) 0) - && eptr == (EXTR *) 0) - { - fprintf (stderr, "warning, %.*s not found in original or external symbol tables, value defaults to 0\n", - (int) (arg_end_p1 - arg_start), - arg_start); - value = 0; - } - else - { - SYMR *ptr = (orig_hash_ptr != (shash_t *) 0 - && orig_hash_ptr->sym_ptr != (SYMR *) 0) - ? orig_hash_ptr->sym_ptr - : &eptr->asym; - - symbol_type = (st_t) ptr->st; - storage_class = (sc_t) ptr->sc; - value = ptr->value; - } - } - break; - } - else - { - error_line = __LINE__; - goto bomb_out; - } - } - - /* Set up to find next directive. */ - dir_start = arg_end_p1 + 1; - } - - - if (storage_class == sc_Bits) - { - t.bitfield = 1; - t.extra_sizes = 1; - } - else - t.extra_sizes = 0; - - if (t.num_dims > 0) - { - int num_real_sizes = t.num_sizes - t.extra_sizes; - int diff = t.num_dims - num_real_sizes; - int i = t.num_dims - 1; - int j; - - if (num_real_sizes != 1 || diff < 0) - { - error_line = __LINE__; - goto bomb_out; - } - - /* If this is an array, make sure the same number of dimensions - and sizes were passed, creating extra sizes for multiply - dimensioned arrays if not passed. */ - - if (diff) - { - for (j = ARRAY_SIZE (t.sizes) - 1; j >= 0; j--) - t.sizes[ j ] = ((j-diff) >= 0) ? t.sizes[ j-diff ] : 0; - - t.num_sizes = i + 1; - for ( i--; i >= 0; i-- ) - { - if (t.dimensions[ i+1 ]) - t.sizes[ i ] = t.sizes[ i+1 ] / t.dimensions[ i+1 ]; - else - t.sizes[ i ] = t.sizes[ i+1 ]; - } - } - } - - /* Except for enumeration members & begin/ending of scopes, put the - type word in the aux. symbol table. */ - - if (symbol_type == st_Block || symbol_type == st_End) - indx = 0; - - else if (inside_enumeration) - indx = cur_file_ptr->void_type; - - else - { - if (t.basic_type == bt_Struct - || t.basic_type == bt_Union - || t.basic_type == bt_Enum) - { - if (tag_start == (char *) 0) - { - error ("no tag specified for %.*s", - (int) (name_end_p1 - name_start), - name_start); - return; - } - - t.tag_ptr = get_tag (tag_start, tag_end_p1, (symint_t) indexNil, - t.basic_type); - } - - if (is_function) - { - last_func_type_info = t; - last_func_eptr = eptr; - return; - } - - indx = add_aux_sym_tir (&t, - hash_yes, - &cur_file_ptr->thash_head[0]); - } - - - /* If this is an external or static symbol, update the appropriate - external symbol. */ - - if (eptr != (EXTR *) 0 - && (eptr->asym.index == indexNil || cur_proc_ptr == (PDR *) 0)) - { - eptr->ifd = cur_file_ptr->file_index; - eptr->asym.index = indx; - } - - - /* Do any last minute adjustments that are necessary. */ - switch (symbol_type) - { - default: - break; - - - /* For the beginning of structs, unions, and enumerations, the - size info needs to be passed in the value field. */ - - case st_Block: - if (t.num_sizes - t.num_dims - t.extra_sizes != 1) - { - error_line = __LINE__; - goto bomb_out; - } - - else - value = t.sizes[0]; - - inside_enumeration = (t.orig_type == T_ENUM); - break; - - - /* For the end of structs, unions, and enumerations, omit the - name which is always ".eos". This needs to be done last, so - that any error reporting above gives the correct name. */ - - case st_End: - name_start = name_end_p1 = 0; - value = inside_enumeration = 0; - break; - - - /* Members of structures and unions that aren't bitfields, need - to adjust the value from a byte offset to a bit offset. - Members of enumerations do not have the value adjusted, and - can be distinguished by indx == indexNil. For enumerations, - update the maximum enumeration value. */ - - case st_Member: - if (!t.bitfield && !inside_enumeration) - value *= 8; - - break; - } - - - /* Add the symbol, except for global symbols outside of functions, - for which the external symbol table is fine enough. */ - - if (eptr == (EXTR *) 0 - || eptr->asym.st == (int) st_Nil - || cur_proc_ptr != (PDR *) 0) - { - symint_t isym = add_local_symbol (name_start, name_end_p1, - symbol_type, storage_class, - value, - indx); - - /* Deal with struct, union, and enum tags. */ - if (symbol_type == st_Block) - { - /* Create or update the tag information. */ - tag_t *tag_ptr = get_tag (name_start, - name_end_p1, - isym, - t.basic_type); - - /* If there are any forward references, fill in the appropriate - file and symbol indexes. */ - - symint_t file_index = cur_file_ptr->file_index; - forward_t *f_next = tag_ptr->forward_ref; - forward_t *f_cur; - - while (f_next != (forward_t *) 0) - { - f_cur = f_next; - f_next = f_next->next; - - f_cur->ifd_ptr->isym = file_index; - f_cur->index_ptr->rndx.index = isym; - - free_forward (f_cur); - } - - tag_ptr->forward_ref = (forward_t *) 0; - } - } - - /* Normal return */ - return; - - /* Error return, issue message. */ -bomb_out: - if (error_line) - error ("compiler error, badly formed #.def (internal line # = %d)", error_line); - else - error ("compiler error, badly formed #.def"); - - return; -} - - -/* Parse .end directives. */ - -static void -parse_end (const char *start) -{ - const char *start_func, *end_func_p1; - int ch; - symint_t value; - FDR *orig_fdr; - - if (cur_file_ptr == (efdr_t *) 0) - { - error (".end directive without a preceding .file directive"); - return; - } - - if (cur_proc_ptr == (PDR *) 0) - { - error (".end directive without a preceding .ent directive"); - return; - } - - /* Get the function name, skipping whitespace. */ - for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++) - ; - - ch = *start_func; - if (!IS_ASM_IDENT (ch)) - { - error (".end directive has no name"); - return; - } - - for (end_func_p1 = start_func; IS_ASM_IDENT (ch); ch = *++end_func_p1) - ; - - - /* Get the value field for creating the end from the original object - file (which we find by locating the procedure start, and using the - pointer to the end+1 block and backing up. The index points to a - two word aux. symbol, whose first word is the index of the end - symbol, and the second word is the type of the function return - value. */ - - orig_fdr = cur_file_ptr->orig_fdr; - value = 0; - if (orig_fdr != (FDR *) 0 && cur_oproc_end != (SYMR *) 0) - value = cur_oproc_end->value; - - else - error ("cannot find .end block for %.*s", - (int) (end_func_p1 - start_func), start_func); - - (void) add_local_symbol (start_func, end_func_p1, - st_End, sc_Text, - value, - (symint_t) 0); - - cur_proc_ptr = cur_oproc_ptr = (PDR *) 0; -} - - -/* Parse .ent directives. */ - -static void -parse_ent (const char *start) -{ - const char *start_func, *end_func_p1; - int ch; - - if (cur_file_ptr == (efdr_t *) 0) - { - error (".ent directive without a preceding .file directive"); - return; - } - - if (cur_proc_ptr != (PDR *) 0) - { - error ("second .ent directive found before .end directive"); - return; - } - - for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++) - ; - - ch = *start_func; - if (!IS_ASM_IDENT (ch)) - { - error (".ent directive has no name"); - return; - } - - for (end_func_p1 = start_func; IS_ASM_IDENT (ch); ch = *++end_func_p1) - ; - - (void) add_procedure (start_func, end_func_p1); -} - - -/* Parse .file directives. */ - -static void -parse_file (const char *start) -{ - char *p; - char *start_name, *end_name_p1; - - (void) strtol (start, &p, 0); - if (start == p - || (start_name = strchr (p, '"')) == (char *) 0 - || (end_name_p1 = strrchr (++start_name, '"')) == (char *) 0) - { - error ("invalid .file directive"); - return; - } - - if (cur_proc_ptr != (PDR *) 0) - { - error ("no way to handle .file within .ent/.end section"); - return; - } - - add_file (start_name, end_name_p1); -} - - -/* Make sure the @stabs symbol is emitted. */ - -static void -mark_stabs (const char *start ATTRIBUTE_UNUSED) -{ - if (!stabs_seen) - { - /* Add a dummy @stabs symbol. */ - stabs_seen = 1; - (void) add_local_symbol (stabs_symbol, - stabs_symbol + sizeof (stabs_symbol), - (st_t) stNil, (sc_t) scInfo, -1, - MIPS_MARK_STAB (0)); - - } -} - - -/* Parse .stabs directives. - - .stabs directives have five fields: - "string" a string, encoding the type information. - code a numeric code, defined in <stab.h> - 0 a zero - 0 a zero or line number - value a numeric value or an address. - - If the value is relocatable, we transform this into: - iss points as an index into string space - value value from lookup of the name - st st from lookup of the name - sc sc from lookup of the name - index code|CODE_MASK - - If the value is not relocatable, we transform this into: - iss points as an index into string space - value value - st st_Nil - sc sc_Nil - index code|CODE_MASK - - .stabn directives have four fields (string is null): - code a numeric code, defined in <stab.h> - 0 a zero - 0 a zero or a line number - value a numeric value or an address. */ - -static void -parse_stabs_common (const char *string_start, /* start of string or NULL */ - const char *string_end, /* end+1 of string or NULL */ - const char *rest) /* rest of the directive. */ -{ - efdr_t *save_file_ptr = cur_file_ptr; - symint_t code; - symint_t value; - char *p; - st_t st; - sc_t sc; - int ch; - - if (stabs_seen == 0) - mark_stabs (""); - - /* Read code from stabs. */ - if (!ISDIGIT (*rest)) - { - error ("invalid .stabs/.stabn directive, code is non-numeric"); - return; - } - - code = strtol (rest, &p, 0); - - /* Line number stabs are handled differently, since they have two values, - the line number and the address of the label. We use the index field - (aka code) to hold the line number, and the value field to hold the - address. The symbol type is st_Label, which should be different from - the other stabs, so that gdb can recognize it. */ - - if (code == (int) N_SLINE) - { - SYMR *sym_ptr, dummy_symr; - shash_t *shash_ptr; - - /* Skip ,0, */ - if (p[0] != ',' || p[1] != '0' || p[2] != ',' || !ISDIGIT (p[3])) - { - error ("invalid line number .stabs/.stabn directive"); - return; - } - - code = strtol (p+3, &p, 0); - ch = *++p; - if (p[-1] != ',' || ISDIGIT (ch) || !IS_ASM_IDENT (ch)) - { - error ("invalid line number .stabs/.stabn directive"); - return; - } - - dummy_symr.index = code; - if (dummy_symr.index != code) - { - error ("line number (%lu) for .stabs/.stabn directive cannot fit in index field (20 bits)", - code); - - return; - } - - shash_ptr = hash_string (p, - strlen (p) - 1, - &orig_str_hash[0], - (symint_t *) 0); - - if (shash_ptr == (shash_t *) 0 - || (sym_ptr = shash_ptr->sym_ptr) == (SYMR *) 0) - { - error ("invalid .stabs/.stabn directive, value not found"); - return; - } - - if ((st_t) sym_ptr->st != st_Label) - { - error ("invalid line number .stabs/.stabn directive"); - return; - } - - st = st_Label; - sc = (sc_t) sym_ptr->sc; - value = sym_ptr->value; - } - else - { - /* Skip ,<num>,<num>, */ - if (*p++ != ',') - goto failure; - for (; ISDIGIT (*p); p++) - ; - if (*p++ != ',') - goto failure; - for (; ISDIGIT (*p); p++) - ; - if (*p++ != ',') - goto failure; - ch = *p; - if (!IS_ASM_IDENT (ch) && ch != '-') - { - failure: - error ("invalid .stabs/.stabn directive, bad character"); - return; - } - - if (ISDIGIT (ch) || ch == '-') - { - st = st_Nil; - sc = sc_Nil; - value = strtol (p, &p, 0); - if (*p != '\n') - { - error ("invalid .stabs/.stabn directive, stuff after numeric value"); - return; - } - } - else if (!IS_ASM_IDENT (ch)) - { - error ("invalid .stabs/.stabn directive, bad character"); - return; - } - else - { - SYMR *sym_ptr; - shash_t *shash_ptr; - const char *start, *end_p1; - - start = p; - if ((end_p1 = strchr (start, '+')) == (char *) 0) - { - if ((end_p1 = strchr (start, '-')) == (char *) 0) - end_p1 = start + strlen (start) - 1; - } - - shash_ptr = hash_string (start, - end_p1 - start, - &orig_str_hash[0], - (symint_t *) 0); - - if (shash_ptr == (shash_t *) 0 - || (sym_ptr = shash_ptr->sym_ptr) == (SYMR *) 0) - { - shash_ptr = hash_string (start, - end_p1 - start, - &ext_str_hash[0], - (symint_t *) 0); - - if (shash_ptr == (shash_t *) 0 - || shash_ptr->esym_ptr == (EXTR *) 0) - { - error ("invalid .stabs/.stabn directive, value not found"); - return; - } - else - sym_ptr = &(shash_ptr->esym_ptr->asym); - } - - /* Traditionally, N_LBRAC and N_RBRAC are *not* relocated. */ - if (code == (int) N_LBRAC || code == (int) N_RBRAC) - { - sc = (sc_t) scNil; - st = (st_t) stNil; - } - else - { - sc = (sc_t) sym_ptr->sc; - st = (st_t) sym_ptr->st; - } - value = sym_ptr->value; - - ch = *end_p1++; - if (ch != '\n') - { - if (((!ISDIGIT (*end_p1)) && (*end_p1 != '-')) - || ((ch != '+') && (ch != '-'))) - { - error ("invalid .stabs/.stabn directive, badly formed value"); - return; - } - if (ch == '+') - value += strtol (end_p1, &p, 0); - else if (ch == '-') - value -= strtol (end_p1, &p, 0); - - if (*p != '\n') - { - error ("invalid .stabs/.stabn directive, stuff after numeric value"); - return; - } - } - } - code = MIPS_MARK_STAB (code); - } - - (void) add_local_symbol (string_start, string_end, st, sc, value, code); - /* Restore normal file type. */ - cur_file_ptr = save_file_ptr; -} - - -static void -parse_stabs (const char *start) -{ - const char *end = strchr (start+1, '"'); - - if (*start != '"' || end == (const char *) 0 || end[1] != ',') - { - error ("invalid .stabs directive, no string"); - return; - } - - parse_stabs_common (start+1, end, end+2); -} - - -static void -parse_stabn (const char *start) -{ - parse_stabs_common ((const char *) 0, (const char *) 0, start); -} - - -/* Parse the input file, and write the lines to the output file - if needed. */ - -static void -parse_input (void) -{ - char *p; - size_t i; - thead_t *ptag_head; - tag_t *ptag; - tag_t *ptag_next; - - if (debug) - fprintf (stderr, "\tinput\n"); - - /* Add a dummy scope block around the entire compilation unit for - structures defined outside of blocks. */ - ptag_head = allocate_thead (); - ptag_head->first_tag = 0; - ptag_head->prev = cur_tag_head; - cur_tag_head = ptag_head; - - while ((p = read_line ()) != (char *) 0) - { - /* Skip leading blanks. */ - while (ISSPACE ((unsigned char)*p)) - p++; - - /* See if it's a directive we handle. If so, dispatch handler. */ - for (i = 0; i < ARRAY_SIZE (pseudo_ops); i++) - if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0 - && ISSPACE ((unsigned char)(p[pseudo_ops[i].len]))) - { - p += pseudo_ops[i].len; /* skip to first argument */ - while (ISSPACE ((unsigned char)*p)) - p++; - - (*pseudo_ops[i].func)( p ); - break; - } - } - - /* Process any tags at global level. */ - ptag_head = cur_tag_head; - cur_tag_head = ptag_head->prev; - - for (ptag = ptag_head->first_tag; - ptag != (tag_t *) 0; - ptag = ptag_next) - { - if (ptag->forward_ref != (forward_t *) 0) - add_unknown_tag (ptag); - - ptag_next = ptag->same_block; - ptag->hash_ptr->tag_ptr = ptag->same_name; - free_tag (ptag); - } - - free_thead (ptag_head); - -} - - -/* Update the global headers with the final offsets in preparation - to write out the .T file. */ - -static void -update_headers (void) -{ - symint_t i; - efdr_t *file_ptr; - - /* Set up the symbolic header. */ - file_offset = sizeof (symbolic_header) + orig_file_header.f_symptr; - symbolic_header.magic = orig_sym_hdr.magic; - symbolic_header.vstamp = orig_sym_hdr.vstamp; - - /* Set up global counts. */ - symbolic_header.issExtMax = ext_strings.num_allocated; - symbolic_header.idnMax = dense_num.num_allocated; - symbolic_header.ifdMax = file_desc.num_allocated; - symbolic_header.iextMax = ext_symbols.num_allocated; - symbolic_header.ilineMax = orig_sym_hdr.ilineMax; - symbolic_header.ioptMax = orig_sym_hdr.ioptMax; - symbolic_header.cbLine = orig_sym_hdr.cbLine; - symbolic_header.crfd = orig_sym_hdr.crfd; - - - /* Loop through each file, figuring out how many local syms, - line numbers, etc. there are. Also, put out end symbol - for the filename. */ - - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - SYMR *sym_start; - SYMR *sym; - SYMR *sym_end_p1; - FDR *fd_ptr = file_ptr->orig_fdr; - - cur_file_ptr = file_ptr; - - /* Copy st_Static symbols from the original local symbol table if - they did not get added to the new local symbol table. - This happens with stabs-in-ecoff or if the source file is - compiled without debugging. */ - sym_start = ORIG_LSYMS (fd_ptr->isymBase); - sym_end_p1 = sym_start + fd_ptr->csym; - for (sym = sym_start; sym < sym_end_p1; sym++) - { - if ((st_t) sym->st == st_Static) - { - char *str = ORIG_LSTRS (fd_ptr->issBase + sym->iss); - size_t len = strlen (str); - shash_t *hash_ptr; - - /* Ignore internal labels. */ - if (str[0] == '$' && str[1] == 'L') - continue; - hash_ptr = hash_string (str, - (ptrdiff_t) len, - &file_ptr->shash_head[0], - (symint_t *) 0); - if (hash_ptr == (shash_t *) 0) - { - (void) add_local_symbol (str, str + len, - (st_t) sym->st, (sc_t) sym->sc, - (symint_t) sym->value, - (symint_t) indexNil); - } - } - } - (void) add_local_symbol ((const char *) 0, (const char *) 0, - st_End, sc_Text, - (symint_t) 0, - (symint_t) 0); - - file_ptr->fdr.cpd = file_ptr->procs.num_allocated; - file_ptr->fdr.ipdFirst = symbolic_header.ipdMax; - symbolic_header.ipdMax += file_ptr->fdr.cpd; - - file_ptr->fdr.csym = file_ptr->symbols.num_allocated; - file_ptr->fdr.isymBase = symbolic_header.isymMax; - symbolic_header.isymMax += file_ptr->fdr.csym; - - file_ptr->fdr.caux = file_ptr->aux_syms.num_allocated; - file_ptr->fdr.iauxBase = symbolic_header.iauxMax; - symbolic_header.iauxMax += file_ptr->fdr.caux; - - file_ptr->fdr.cbSs = file_ptr->strings.num_allocated; - file_ptr->fdr.issBase = symbolic_header.issMax; - symbolic_header.issMax += file_ptr->fdr.cbSs; - } - -/* Align ecoff symbol tables to avoid OSF1/1.3 nm complaints. */ -#define ALIGN_SYMTABLE_OFFSET(OFFSET) (((OFFSET) + 7) & ~7) - - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - i = WORD_ALIGN (symbolic_header.cbLine); /* line numbers */ - if (i > 0) - { - symbolic_header.cbLineOffset = file_offset; - file_offset += i; - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.ioptMax; /* optimization symbols */ - if (((long) i) > 0) - { - symbolic_header.cbOptOffset = file_offset; - file_offset += i * sizeof (OPTR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.idnMax; /* dense numbers */ - if (i > 0) - { - symbolic_header.cbDnOffset = file_offset; - file_offset += i * sizeof (DNR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.ipdMax; /* procedure tables */ - if (i > 0) - { - symbolic_header.cbPdOffset = file_offset; - file_offset += i * sizeof (PDR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.isymMax; /* local symbols */ - if (i > 0) - { - symbolic_header.cbSymOffset = file_offset; - file_offset += i * sizeof (SYMR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.iauxMax; /* aux syms. */ - if (i > 0) - { - symbolic_header.cbAuxOffset = file_offset; - file_offset += i * sizeof (TIR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = WORD_ALIGN (symbolic_header.issMax); /* local strings */ - if (i > 0) - { - symbolic_header.cbSsOffset = file_offset; - file_offset += i; - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = WORD_ALIGN (symbolic_header.issExtMax); /* external strings */ - if (i > 0) - { - symbolic_header.cbSsExtOffset = file_offset; - file_offset += i; - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.ifdMax; /* file tables */ - if (i > 0) - { - symbolic_header.cbFdOffset = file_offset; - file_offset += i * sizeof (FDR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.crfd; /* relative file descriptors */ - if (i > 0) - { - symbolic_header.cbRfdOffset = file_offset; - file_offset += i * sizeof (symint_t); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } - - i = symbolic_header.iextMax; /* external symbols */ - if (i > 0) - { - symbolic_header.cbExtOffset = file_offset; - file_offset += i * sizeof (EXTR); - file_offset = ALIGN_SYMTABLE_OFFSET (file_offset); - } -} - - -/* Write out a varray at a given location. */ - -static void -write_varray (varray_t *vp, /* virtual array */ - off_t offset, /* offset to write varray to */ - const char *str) /* string to print out when tracing */ -{ - int num_write, sys_write; - vlinks_t *ptr; - - if (vp->num_allocated == 0) - return; - - if (debug) - fprintf (stderr, "\twarray\tvp = " HOST_PTR_PRINTF - ", offset = %7lu, size = %7lu, %s\n", - (void *) vp, (unsigned long) offset, - vp->num_allocated * vp->object_size, str); - - if (file_offset != (unsigned long) offset - && fseek (object_stream, (long) offset, SEEK_SET) < 0) - pfatal_with_name (object_name); - - for (ptr = vp->first; ptr != (vlinks_t *) 0; ptr = ptr->next) - { - num_write = (ptr->next == (vlinks_t *) 0) - ? vp->objects_last_page * vp->object_size - : vp->objects_per_page * vp->object_size; - - sys_write = fwrite (ptr->datum, 1, num_write, object_stream); - if (sys_write <= 0) - pfatal_with_name (object_name); - - else if (sys_write != num_write) - fatal ("wrote %d bytes to %s, system returned %d", - num_write, - object_name, - sys_write); - - file_offset += num_write; - } -} - - -/* Write out the symbol table in the object file. */ - -static void -write_object (void) -{ - int sys_write; - efdr_t *file_ptr; - off_t offset; - - if (debug) - fprintf (stderr, "\n\twrite\tvp = " HOST_PTR_PRINTF - ", offset = %7u, size = %7lu, %s\n", - (void *) &symbolic_header, 0, - (unsigned long) sizeof (symbolic_header), "symbolic header"); - - sys_write = fwrite (&symbolic_header, - 1, - sizeof (symbolic_header), - object_stream); - - if (sys_write < 0) - pfatal_with_name (object_name); - - else if (sys_write != sizeof (symbolic_header)) - fatal ("wrote %d bytes to %s, system returned %d", - (int) sizeof (symbolic_header), - object_name, - sys_write); - - - file_offset = sizeof (symbolic_header) + orig_file_header.f_symptr; - - if (symbolic_header.cbLine > 0) /* line numbers */ - { - long sys_write; - - if (file_offset != (unsigned long) symbolic_header.cbLineOffset - && fseek (object_stream, symbolic_header.cbLineOffset, SEEK_SET) != 0) - pfatal_with_name (object_name); - - if (debug) - fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF - ", offset = %7lu, size = %7lu, %s\n", - (void *) &orig_linenum, (long) symbolic_header.cbLineOffset, - (long) symbolic_header.cbLine, "Line numbers"); - - sys_write = fwrite (orig_linenum, - 1, - symbolic_header.cbLine, - object_stream); - - if (sys_write <= 0) - pfatal_with_name (object_name); - - else if (sys_write != symbolic_header.cbLine) - fatal ("wrote %ld bytes to %s, system returned %ld", - (long) symbolic_header.cbLine, - object_name, - sys_write); - - file_offset = symbolic_header.cbLineOffset + symbolic_header.cbLine; - } - - if (symbolic_header.ioptMax > 0) /* optimization symbols */ - { - long sys_write; - long num_write = symbolic_header.ioptMax * sizeof (OPTR); - - if (file_offset != (unsigned long) symbolic_header.cbOptOffset - && fseek (object_stream, symbolic_header.cbOptOffset, SEEK_SET) != 0) - pfatal_with_name (object_name); - - if (debug) - fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF - ", offset = %7lu, size = %7lu, %s\n", - (void *) &orig_opt_syms, (long) symbolic_header.cbOptOffset, - num_write, "Optimizer symbols"); - - sys_write = fwrite (orig_opt_syms, - 1, - num_write, - object_stream); - - if (sys_write <= 0) - pfatal_with_name (object_name); - - else if (sys_write != num_write) - fatal ("wrote %ld bytes to %s, system returned %ld", - num_write, - object_name, - sys_write); - - file_offset = symbolic_header.cbOptOffset + num_write; - } - - if (symbolic_header.idnMax > 0) /* dense numbers */ - write_varray (&dense_num, (off_t) symbolic_header.cbDnOffset, "Dense numbers"); - - if (symbolic_header.ipdMax > 0) /* procedure tables */ - { - offset = symbolic_header.cbPdOffset; - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - write_varray (&file_ptr->procs, offset, "Procedure tables"); - offset = file_offset; - } - } - - if (symbolic_header.isymMax > 0) /* local symbols */ - { - offset = symbolic_header.cbSymOffset; - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - write_varray (&file_ptr->symbols, offset, "Local symbols"); - offset = file_offset; - } - } - - if (symbolic_header.iauxMax > 0) /* aux symbols */ - { - offset = symbolic_header.cbAuxOffset; - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - write_varray (&file_ptr->aux_syms, offset, "Aux. symbols"); - offset = file_offset; - } - } - - if (symbolic_header.issMax > 0) /* local strings */ - { - offset = symbolic_header.cbSsOffset; - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - write_varray (&file_ptr->strings, offset, "Local strings"); - offset = file_offset; - } - } - - if (symbolic_header.issExtMax > 0) /* external strings */ - write_varray (&ext_strings, symbolic_header.cbSsExtOffset, "External strings"); - - if (symbolic_header.ifdMax > 0) /* file tables */ - { - offset = symbolic_header.cbFdOffset; - if (file_offset != (unsigned long) offset - && fseek (object_stream, (long) offset, SEEK_SET) < 0) - pfatal_with_name (object_name); - - file_offset = offset; - for (file_ptr = first_file; - file_ptr != (efdr_t *) 0; - file_ptr = file_ptr->next_file) - { - if (debug) - fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF - ", offset = %7lu, size = %7lu, %s\n", - (void *) &file_ptr->fdr, file_offset, - (unsigned long) sizeof (FDR), "File header"); - - sys_write = fwrite (&file_ptr->fdr, - 1, - sizeof (FDR), - object_stream); - - if (sys_write < 0) - pfatal_with_name (object_name); - - else if (sys_write != sizeof (FDR)) - fatal ("wrote %d bytes to %s, system returned %d", - (int) sizeof (FDR), - object_name, - sys_write); - - file_offset = offset += sizeof (FDR); - } - } - - if (symbolic_header.crfd > 0) /* relative file descriptors */ - { - long sys_write; - symint_t num_write = symbolic_header.crfd * sizeof (symint_t); - - if (file_offset != (unsigned long) symbolic_header.cbRfdOffset - && fseek (object_stream, symbolic_header.cbRfdOffset, SEEK_SET) != 0) - pfatal_with_name (object_name); - - if (debug) - fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF - ", offset = %7lu, size = %7lu, %s\n", - (void *) &orig_rfds, (long) symbolic_header.cbRfdOffset, - num_write, "Relative file descriptors"); - - sys_write = fwrite (orig_rfds, - 1, - num_write, - object_stream); - - if (sys_write <= 0) - pfatal_with_name (object_name); - - else if (sys_write != (long) num_write) - fatal ("wrote %lu bytes to %s, system returned %ld", - num_write, - object_name, - sys_write); - - file_offset = symbolic_header.cbRfdOffset + num_write; - } - - if (symbolic_header.issExtMax > 0) /* external symbols */ - write_varray (&ext_symbols, (off_t) symbolic_header.cbExtOffset, "External symbols"); - - if (fclose (object_stream) != 0) - pfatal_with_name (object_name); -} - - -/* Read some bytes at a specified location, and return a pointer. */ - -static page_t * -read_seek (size_t size, /* # bytes to read */ - off_t offset, /* offset to read at */ - const char *str) /* name for tracing */ -{ - page_t *ptr; - long sys_read = 0; - - if (size == 0) /* nothing to read */ - return (page_t *) 0; - - if (debug) - fprintf (stderr, - "\trseek\tsize = %7lu, offset = %7lu, currently at %7lu, %s\n", - (unsigned long) size, (unsigned long) offset, file_offset, str); - -#ifndef MALLOC_CHECK - ptr = allocate_multiple_pages ((size + PAGE_USIZE - 1) / PAGE_USIZE); -#else - ptr = xcalloc (1, size); -#endif - - /* If we need to seek, and the distance is nearby, just do some reads, - to speed things up. */ - if (file_offset != (unsigned long) offset) - { - symint_t difference = offset - file_offset; - - if (difference < 8) - { - char small_buffer[8]; - - sys_read = fread (small_buffer, 1, difference, obj_in_stream); - if (sys_read <= 0) - pfatal_with_name (obj_in_name); - - if ((symint_t) sys_read != difference) - fatal ("wanted to read %lu bytes from %s, system returned %ld", - (unsigned long) size, - obj_in_name, - sys_read); - } - else if (fseek (obj_in_stream, offset, SEEK_SET) < 0) - pfatal_with_name (obj_in_name); - } - - sys_read = fread (ptr, 1, size, obj_in_stream); - if (sys_read <= 0) - pfatal_with_name (obj_in_name); - - if (sys_read != (long) size) - fatal ("wanted to read %lu bytes from %s, system returned %ld", - (unsigned long) size, - obj_in_name, - sys_read); - - file_offset = offset + size; - - if (file_offset > max_file_offset) - max_file_offset = file_offset; - - return ptr; -} - - -/* Read the existing object file (and copy to the output object file - if it is different from the input object file), and remove the old - symbol table. */ - -static void -copy_object (void) -{ - char buffer[ PAGE_SIZE ]; - int sys_read; - int remaining; - int num_write; - int sys_write; - int fd, es; - int delete_ifd = 0; - int *remap_file_number; - struct stat stat_buf; - - if (debug) - fprintf (stderr, "\tcopy\n"); - - if (fstat (fileno (obj_in_stream), &stat_buf) != 0 - || fseek (obj_in_stream, 0L, SEEK_SET) != 0) - pfatal_with_name (obj_in_name); - - sys_read = fread (&orig_file_header, - 1, - sizeof (struct filehdr), - obj_in_stream); - - if (sys_read < 0) - pfatal_with_name (obj_in_name); - - else if (sys_read == 0 && feof (obj_in_stream)) - return; /* create a .T file sans file header */ - - else if (sys_read < (int) sizeof (struct filehdr)) - fatal ("wanted to read %d bytes from %s, system returned %d", - (int) sizeof (struct filehdr), - obj_in_name, - sys_read); - - - if (orig_file_header.f_nsyms != sizeof (HDRR)) - fatal ("%s symbolic header wrong size (%ld bytes, should be %ld)", - input_name, (long) orig_file_header.f_nsyms, (long) sizeof (HDRR)); - - - /* Read in the current symbolic header. */ - if (fseek (obj_in_stream, (long) orig_file_header.f_symptr, SEEK_SET) != 0) - pfatal_with_name (input_name); - - sys_read = fread (&orig_sym_hdr, - 1, - sizeof (orig_sym_hdr), - obj_in_stream); - - if (sys_read < 0) - pfatal_with_name (object_name); - - else if (sys_read < (int) sizeof (struct filehdr)) - fatal ("wanted to read %d bytes from %s, system returned %d", - (int) sizeof (struct filehdr), - obj_in_name, - sys_read); - - - /* Read in each of the sections if they exist in the object file. - We read things in the order the mips assembler creates the - sections, so in theory no extra seeks are done. - - For simplicity sake, round each read up to a page boundary, - we may want to revisit this later.... */ - - file_offset = orig_file_header.f_symptr + sizeof (struct filehdr); - - if (orig_sym_hdr.cbLine > 0) /* line numbers */ - orig_linenum = (char *) read_seek (orig_sym_hdr.cbLine, - orig_sym_hdr.cbLineOffset, - "Line numbers"); - - if (orig_sym_hdr.ipdMax > 0) /* procedure tables */ - orig_procs = (PDR *) read_seek (orig_sym_hdr.ipdMax * sizeof (PDR), - orig_sym_hdr.cbPdOffset, - "Procedure tables"); - - if (orig_sym_hdr.isymMax > 0) /* local symbols */ - orig_local_syms = (SYMR *) read_seek (orig_sym_hdr.isymMax * sizeof (SYMR), - orig_sym_hdr.cbSymOffset, - "Local symbols"); - - if (orig_sym_hdr.iauxMax > 0) /* aux symbols */ - orig_aux_syms = (AUXU *) read_seek (orig_sym_hdr.iauxMax * sizeof (AUXU), - orig_sym_hdr.cbAuxOffset, - "Aux. symbols"); - - if (orig_sym_hdr.issMax > 0) /* local strings */ - orig_local_strs = (char *) read_seek (orig_sym_hdr.issMax, - orig_sym_hdr.cbSsOffset, - "Local strings"); - - if (orig_sym_hdr.issExtMax > 0) /* external strings */ - orig_ext_strs = (char *) read_seek (orig_sym_hdr.issExtMax, - orig_sym_hdr.cbSsExtOffset, - "External strings"); - - if (orig_sym_hdr.ifdMax > 0) /* file tables */ - orig_files = (FDR *) read_seek (orig_sym_hdr.ifdMax * sizeof (FDR), - orig_sym_hdr.cbFdOffset, - "File tables"); - - if (orig_sym_hdr.crfd > 0) /* relative file descriptors */ - orig_rfds = (symint_t *) read_seek (orig_sym_hdr.crfd * sizeof (symint_t), - orig_sym_hdr.cbRfdOffset, - "Relative file descriptors"); - - if (orig_sym_hdr.issExtMax > 0) /* external symbols */ - orig_ext_syms = (EXTR *) read_seek (orig_sym_hdr.iextMax * sizeof (EXTR), - orig_sym_hdr.cbExtOffset, - "External symbols"); - - if (orig_sym_hdr.idnMax > 0) /* dense numbers */ - { - orig_dense = (DNR *) read_seek (orig_sym_hdr.idnMax * sizeof (DNR), - orig_sym_hdr.cbDnOffset, - "Dense numbers"); - - add_bytes (&dense_num, (char *) orig_dense, orig_sym_hdr.idnMax); - } - - if (orig_sym_hdr.ioptMax > 0) /* opt symbols */ - orig_opt_syms = (OPTR *) read_seek (orig_sym_hdr.ioptMax * sizeof (OPTR), - orig_sym_hdr.cbOptOffset, - "Optimizer symbols"); - - - - /* The symbol table should be last. */ - if (max_file_offset != (unsigned long) stat_buf.st_size) - fatal ("symbol table is not last (symbol table ends at %ld, .o ends at %ld", - max_file_offset, - (long) stat_buf.st_size); - - - /* If the first original file descriptor is a dummy which the assembler - put out, but there are no symbols in it, skip it now. */ - if (orig_sym_hdr.ifdMax > 1 - && orig_files->csym == 2 - && orig_files->caux == 0) - { - char *filename = orig_local_strs + (orig_files->issBase + orig_files->rss); - char *suffix = strrchr (filename, '.'); - - if (suffix != (char *) 0 && strcmp (suffix, ".s") == 0) - delete_ifd = 1; - } - - - /* Create array to map original file numbers to the new file numbers - (in case there are duplicate filenames, we collapse them into one - file section, the MIPS assembler may or may not collapse them). */ - - remap_file_number = (int *) alloca (sizeof (int) * orig_sym_hdr.ifdMax); - - for (fd = delete_ifd; fd < orig_sym_hdr.ifdMax; fd++) - { - FDR *fd_ptr = ORIG_FILES (fd); - char *filename = ORIG_LSTRS (fd_ptr->issBase + fd_ptr->rss); - - /* file support itself. */ - add_file (filename, filename + strlen (filename)); - remap_file_number[fd] = cur_file_ptr->file_index; - } - - if (delete_ifd > 0) /* just in case */ - remap_file_number[0] = remap_file_number[1]; - - - /* Loop, adding each of the external symbols. These must be in - order or otherwise we would have to change the relocation - entries. We don't just call add_bytes, because we need to have - the names put into the external hash table. We set the type to - 'void' for now, and parse_def will fill in the correct type if it - is in the symbol table. We must add the external symbols before - the locals, since the locals do lookups against the externals. */ - - if (debug) - fprintf (stderr, "\tehash\n"); - - for (es = 0; es < orig_sym_hdr.iextMax; es++) - { - EXTR *eptr = orig_ext_syms + es; - int ifd = eptr->ifd; - - (void) add_ext_symbol (eptr, ((long) ifd < orig_sym_hdr.ifdMax) - ? remap_file_number[ ifd ] : ifd ); - } - - - /* For each of the files in the object file, copy the symbols, and such - into the varrays for the new object file. */ - - for (fd = delete_ifd; fd < orig_sym_hdr.ifdMax; fd++) - { - FDR *fd_ptr = ORIG_FILES (fd); - char *filename = ORIG_LSTRS (fd_ptr->issBase + fd_ptr->rss); - SYMR *sym_start; - SYMR *sym; - SYMR *sym_end_p1; - PDR *proc_start; - PDR *proc; - PDR *proc_end_p1; - - /* file support itself. */ - add_file (filename, filename + strlen (filename)); - cur_file_ptr->orig_fdr = fd_ptr; - - /* Copy stuff that's just passed through (such as line #'s) */ - cur_file_ptr->fdr.adr = fd_ptr->adr; - cur_file_ptr->fdr.ilineBase = fd_ptr->ilineBase; - cur_file_ptr->fdr.cline = fd_ptr->cline; - cur_file_ptr->fdr.rfdBase = fd_ptr->rfdBase; - cur_file_ptr->fdr.crfd = fd_ptr->crfd; - cur_file_ptr->fdr.cbLineOffset = fd_ptr->cbLineOffset; - cur_file_ptr->fdr.cbLine = fd_ptr->cbLine; - cur_file_ptr->fdr.fMerge = fd_ptr->fMerge; - cur_file_ptr->fdr.fReadin = fd_ptr->fReadin; - cur_file_ptr->fdr.glevel = fd_ptr->glevel; - - if (debug) - fprintf (stderr, "\thash\tstart, filename %s\n", filename); - - /* For each of the static and global symbols defined, add them - to the hash table of original symbols, so we can look up - their values. */ - - sym_start = ORIG_LSYMS (fd_ptr->isymBase); - sym_end_p1 = sym_start + fd_ptr->csym; - for (sym = sym_start; sym < sym_end_p1; sym++) - { - switch ((st_t) sym->st) - { - default: - break; - - case st_Global: - case st_Static: - case st_Label: - case st_Proc: - case st_StaticProc: - { - auto symint_t hash_index; - char *str = ORIG_LSTRS (fd_ptr->issBase + sym->iss); - size_t len = strlen (str); - shash_t *shash_ptr = hash_string (str, - (ptrdiff_t) len, - &orig_str_hash[0], - &hash_index); - - if (shash_ptr != (shash_t *) 0) - error ("internal error, %s is already in original symbol table", str); - - else - { - shash_ptr = allocate_shash (); - shash_ptr->next = orig_str_hash[hash_index]; - orig_str_hash[hash_index] = shash_ptr; - - shash_ptr->len = len; - shash_ptr->indx = indexNil; - shash_ptr->string = str; - shash_ptr->sym_ptr = sym; - } - } - break; - - case st_End: - if ((sc_t) sym->sc == sc_Text) - { - char *str = ORIG_LSTRS (fd_ptr->issBase + sym->iss); - - if (*str != '\0') - { - size_t len = strlen (str); - shash_t *shash_ptr = hash_string (str, - (ptrdiff_t) len, - &orig_str_hash[0], - (symint_t *) 0); - - if (shash_ptr != (shash_t *) 0) - shash_ptr->end_ptr = sym; - } - } - break; - - } - } - - if (debug) - { - fprintf (stderr, "\thash\tdone, filename %s\n", filename); - fprintf (stderr, "\tproc\tstart, filename %s\n", filename); - } - - /* Go through each of the procedures in this file, and add the - procedure pointer to the hash entry for the given name. */ - - proc_start = ORIG_PROCS (fd_ptr->ipdFirst); - proc_end_p1 = proc_start + fd_ptr->cpd; - for (proc = proc_start; proc < proc_end_p1; proc++) - { - SYMR *proc_sym = ORIG_LSYMS (fd_ptr->isymBase + proc->isym); - char *str = ORIG_LSTRS (fd_ptr->issBase + proc_sym->iss); - size_t len = strlen (str); - shash_t *shash_ptr = hash_string (str, - (ptrdiff_t) len, - &orig_str_hash[0], - (symint_t *) 0); - - if (shash_ptr == (shash_t *) 0) - error ("internal error, function %s is not in original symbol table", str); - - else - shash_ptr->proc_ptr = proc; - } - - if (debug) - fprintf (stderr, "\tproc\tdone, filename %s\n", filename); - - } - cur_file_ptr = first_file; - - - /* Copy all of the object file up to the symbol table. Originally - we were going to use ftruncate, but that doesn't seem to work - on Ultrix 3.1.... */ - - if (fseek (obj_in_stream, (long) 0, SEEK_SET) != 0) - pfatal_with_name (obj_in_name); - - if (fseek (object_stream, (long) 0, SEEK_SET) != 0) - pfatal_with_name (object_name); - - for (remaining = orig_file_header.f_symptr; - remaining > 0; - remaining -= num_write) - { - num_write - = (remaining <= (int) sizeof (buffer)) - ? remaining : (int) sizeof (buffer); - sys_read = fread (buffer, 1, num_write, obj_in_stream); - if (sys_read <= 0) - pfatal_with_name (obj_in_name); - - else if (sys_read != num_write) - fatal ("wanted to read %d bytes from %s, system returned %d", - num_write, - obj_in_name, - sys_read); - - sys_write = fwrite (buffer, 1, num_write, object_stream); - if (sys_write <= 0) - pfatal_with_name (object_name); - - else if (sys_write != num_write) - fatal ("wrote %d bytes to %s, system returned %d", - num_write, - object_name, - sys_write); - } -} - - -/* Ye olde main program. */ - -extern int main (int, char **); - -int -main (int argc, char **argv) -{ - int iflag = 0; - char *num_end; - int option; - int i; - - progname = lbasename (argv[0]); - - (void) signal (SIGSEGV, catch_signal); - (void) signal (SIGBUS, catch_signal); - (void) signal (SIGABRT, catch_signal); - -#ifndef lint - if (sizeof (efdr_t) > PAGE_USIZE) - fatal ("efdr_t has a sizeof %d bytes, when it should be less than %d", - (int) sizeof (efdr_t), - (int) PAGE_USIZE); - - if (sizeof (page_t) != PAGE_USIZE) - fatal ("page_t has a sizeof %d bytes, when it should be %d", - (int) sizeof (page_t), - (int) PAGE_USIZE); - -#endif - - alloc_counts[ alloc_type_none ].alloc_name = "none"; - alloc_counts[ alloc_type_scope ].alloc_name = "scope"; - alloc_counts[ alloc_type_vlinks ].alloc_name = "vlinks"; - alloc_counts[ alloc_type_shash ].alloc_name = "shash"; - alloc_counts[ alloc_type_thash ].alloc_name = "thash"; - alloc_counts[ alloc_type_tag ].alloc_name = "tag"; - alloc_counts[ alloc_type_forward ].alloc_name = "forward"; - alloc_counts[ alloc_type_thead ].alloc_name = "thead"; - alloc_counts[ alloc_type_varray ].alloc_name = "varray"; - - int_type_info = type_info_init; - int_type_info.basic_type = bt_Int; - - void_type_info = type_info_init; - void_type_info.basic_type = bt_Void; - - while ((option = getopt_long (argc, argv, "d:i:I:o:v", options, NULL)) != -1) - switch (option) - { - default: - had_errors++; - break; - - case 'd': - debug = strtol (optarg, &num_end, 0); - if ((unsigned) debug > 4 || num_end == optarg) - had_errors++; - - break; - - case 'I': - if (rename_output || obj_in_name != (char *) 0) - had_errors++; - else - rename_output = 1; - - /* Fall through to 'i' case. */ - - case 'i': - if (obj_in_name == (char *) 0) - { - obj_in_name = optarg; - iflag++; - } - else - had_errors++; - break; - - case 'o': - if (object_name == (char *) 0) - object_name = optarg; - else - had_errors++; - break; - - case 'v': - verbose++; - break; - - case 'V': - version++; - break; - } - - if (version) - { - printf (_("mips-tfile %s%s\n"), pkgversion_string, version_string); - fputs ("Copyright (C) 2012 Free Software Foundation, Inc.\n", stdout); - fputs (_("This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), - stdout); - exit (0); - } - - if (obj_in_name == (char *) 0 && optind <= argc - 2) - obj_in_name = argv[--argc]; - - if (object_name == (char *) 0 && optind <= argc - 2) - object_name = argv[--argc]; - - /* If there is an output name, but no input name use - the same file for both, deleting the name between - opening it for input and opening it for output. */ - if (obj_in_name == (char *) 0 && object_name != (char *) 0) - { - obj_in_name = object_name; - delete_input = 1; - } - - if (optind != argc - 1) - had_errors++; - - if (verbose || had_errors) - fprintf (stderr, _("mips-tfile (GCC) %s\n"), version_string); - - if (object_name == (char *) 0 || had_errors) - { - fprintf (stderr, _("Calling Sequence:\n")); - fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] [-i <o-in-file>] -o <o-out-file> <s-file> (or)\n")); - fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] [-I <o-in-file>] -o <o-out-file> <s-file> (or)\n")); - fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] <s-file> <o-in-file> <o-out-file>\n")); - fprintf (stderr, "\n"); - fprintf (stderr, _("Debug levels are:\n")); - fprintf (stderr, _(" 1\tGeneral debug + trace functions/blocks.\n")); - fprintf (stderr, _(" 2\tDebug level 1 + trace externals.\n")); - fprintf (stderr, _(" 3\tDebug level 2 + trace all symbols.\n")); - fprintf (stderr, _(" 4\tDebug level 3 + trace memory allocations.\n")); - return 1; - } - - if (obj_in_name == (char *) 0) - obj_in_name = object_name; - - if (rename_output && rename (object_name, obj_in_name) != 0) - { - char *buffer = (char *) allocate_multiple_pages (4); - int len; - int len2; - int in_fd; - int out_fd; - - /* Rename failed, copy input file */ - in_fd = open (object_name, O_RDONLY, 0666); - if (in_fd < 0) - pfatal_with_name (object_name); - - out_fd = open (obj_in_name, O_WRONLY | O_CREAT | O_TRUNC, 0666); - if (out_fd < 0) - pfatal_with_name (obj_in_name); - - while ((len = read (in_fd, buffer, 4*PAGE_SIZE)) > 0) - { - len2 = write (out_fd, buffer, len); - if (len2 < 0) - pfatal_with_name (object_name); - - if (len != len2) - fatal ("wrote %d bytes to %s, expected to write %d", len2, obj_in_name, len); - } - - free_multiple_pages ((page_t *) buffer, 4); - - if (len < 0) - pfatal_with_name (object_name); - - if (close (in_fd) < 0) - pfatal_with_name (object_name); - - if (close (out_fd) < 0) - pfatal_with_name (obj_in_name); - } - - /* Must open input before output, since the output may be the same file, and - we need to get the input handle before truncating it. */ - obj_in_stream = fopen (obj_in_name, "r"); - if (obj_in_stream == (FILE *) 0) - pfatal_with_name (obj_in_name); - - if (delete_input && unlink (obj_in_name) != 0) - pfatal_with_name (obj_in_name); - - object_stream = fopen (object_name, "w"); - if (object_stream == (FILE *) 0) - pfatal_with_name (object_name); - - if (strcmp (argv[optind], "-") != 0) - { - input_name = argv[optind]; - if (freopen (argv[optind], "r", stdin) != stdin) - pfatal_with_name (argv[optind]); - } - - copy_object (); /* scan & copy object file */ - parse_input (); /* scan all of input */ - - update_headers (); /* write out tfile */ - write_object (); - - if (debug) - { - fprintf (stderr, "\n\tAllocation summary:\n\n"); - for (i = (int) alloc_type_none; i < (int) alloc_type_last; i++) - if (alloc_counts[i].total_alloc) - { - fprintf (stderr, - "\t%s\t%5d allocation(s), %5d free(s), %2d page(s)\n", - alloc_counts[i].alloc_name, - alloc_counts[i].total_alloc, - alloc_counts[i].total_free, - alloc_counts[i].total_pages); - } - } - - return (had_errors) ? 1 : 0; -} - - -/* Catch a signal and exit without dumping core. */ - -static void -catch_signal (int signum) -{ - (void) signal (signum, SIG_DFL); /* just in case... */ - fatal ("%s", strsignal (signum)); -} - -/* Print a fatal error message. NAME is the text. - Also include a system error message based on `errno'. */ - -void -pfatal_with_name (const char *msg) -{ - int save_errno = errno; /* just in case.... */ - if (line_number > 0) - fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number); - else - fprintf (stderr, "%s:", progname); - - errno = save_errno; - if (errno == 0) - fprintf (stderr, "[errno = 0] %s\n", msg); - else - perror (msg); - - exit (1); -} - - -/* Procedure to die with an out of bounds error message. It has - type int, so it can be used with an ?: expression within the - ORIG_xxx macros, but the function never returns. */ - -static int -out_of_bounds (symint_t indx, /* index that is out of bounds */ - symint_t max, /* maximum index */ - const char *str, /* string to print out */ - int prog_line) /* line number within mips-tfile.c */ -{ - if (indx < max) /* just in case */ - return 0; - - fprintf (stderr, "%s, %s:%ld index %lu is out of bounds for %s, max is %lu, mips-tfile.c line# %d\n", - progname, input_name, line_number, indx, str, max, prog_line); - - exit (1); - return 0; /* turn off warning messages */ -} - - -/* Allocate a cluster of pages. USE_MALLOC says that malloc does not - like sbrk's behind its back (or sbrk isn't available). If we use - sbrk, we assume it gives us zeroed pages. */ - -#ifndef MALLOC_CHECK -#ifdef USE_MALLOC - -static page_t * -allocate_cluster (size_t npages) -{ - page_t *value = xcalloc (npages, PAGE_USIZE); - - if (debug > 3) - fprintf (stderr, "\talloc\tnpages = %d, value = 0x%.8x\n", npages, value); - - return value; -} - -#else /* USE_MALLOC */ - -static page_t * -allocate_cluster (size_t npages) -{ - page_t *ptr = (page_t *) sbrk (0); /* current sbreak */ - unsigned long offset = ((unsigned long) ptr) & (PAGE_SIZE - 1); - - if (offset != 0) /* align to a page boundary */ - { - if (sbrk (PAGE_USIZE - offset) == (char *)-1) - pfatal_with_name ("allocate_cluster"); - - ptr = (page_t *) (((char *) ptr) + PAGE_SIZE - offset); - } - - if (sbrk (npages * PAGE_USIZE) == (char *) -1) - pfatal_with_name ("allocate_cluster"); - - if (debug > 3) - fprintf (stderr, "\talloc\tnpages = %lu, value = " HOST_PTR_PRINTF "\n", - (unsigned long) npages, (void *) ptr); - - return ptr; -} - -#endif /* USE_MALLOC */ - - -static page_t *cluster_ptr = NULL; -static unsigned pages_left = 0; - -#endif /* MALLOC_CHECK */ - - -/* Allocate some pages (which is initialized to 0). */ - -static page_t * -allocate_multiple_pages (size_t npages) -{ -#ifndef MALLOC_CHECK - if (pages_left == 0 && npages < MAX_CLUSTER_PAGES) - { - pages_left = MAX_CLUSTER_PAGES; - cluster_ptr = allocate_cluster (MAX_CLUSTER_PAGES); - } - - if (npages <= pages_left) - { - page_t *ptr = cluster_ptr; - cluster_ptr += npages; - pages_left -= npages; - return ptr; - } - - return allocate_cluster (npages); - -#else /* MALLOC_CHECK */ - return xcalloc (npages, PAGE_SIZE); - -#endif /* MALLOC_CHECK */ -} - - -/* Release some pages. */ - -static void -free_multiple_pages (page_t *page_ptr, size_t npages) -{ -#ifndef MALLOC_CHECK - if (pages_left == 0) - { - cluster_ptr = page_ptr; - pages_left = npages; - } - - else if ((page_ptr + npages) == cluster_ptr) - { - cluster_ptr -= npages; - pages_left += npages; - } - - /* otherwise the page is not freed. If more than call is - done, we probably should worry about it, but at present, - the free pages is done right after an allocate. */ - -#else /* MALLOC_CHECK */ - free (page_ptr); - -#endif /* MALLOC_CHECK */ -} - - -/* Allocate one page (which is initialized to 0). */ - -static page_t * -allocate_page (void) -{ -#ifndef MALLOC_CHECK - if (pages_left == 0) - { - pages_left = MAX_CLUSTER_PAGES; - cluster_ptr = allocate_cluster (MAX_CLUSTER_PAGES); - } - - pages_left--; - return cluster_ptr++; - -#else /* MALLOC_CHECK */ - return xcalloc (1, PAGE_SIZE); - -#endif /* MALLOC_CHECK */ -} - - -/* Allocate scoping information. */ - -static scope_t * -allocate_scope (void) -{ - scope_t *ptr; - static scope_t initial_scope; - -#ifndef MALLOC_CHECK - ptr = alloc_counts[ (int) alloc_type_scope ].free_list.f_scope; - if (ptr != (scope_t *) 0) - alloc_counts[ (int) alloc_type_scope ].free_list.f_scope = ptr->free; - - else - { - int unallocated = alloc_counts[ (int) alloc_type_scope ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_scope ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (scope_t); - alloc_counts[ (int) alloc_type_scope ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_scope ].total_pages++; - } - - ptr = &cur_page->scope[ --unallocated ]; - alloc_counts[ (int) alloc_type_scope ].unallocated = unallocated; - } - -#else - ptr = xmalloc (sizeof (scope_t)); - -#endif - - alloc_counts[ (int) alloc_type_scope ].total_alloc++; - *ptr = initial_scope; - return ptr; -} - -/* Free scoping information. */ - -static void -free_scope (scope_t *ptr) -{ - alloc_counts[ (int) alloc_type_scope ].total_free++; - -#ifndef MALLOC_CHECK - ptr->free = alloc_counts[ (int) alloc_type_scope ].free_list.f_scope; - alloc_counts[ (int) alloc_type_scope ].free_list.f_scope = ptr; - -#else - free (ptr); -#endif - -} - - -/* Allocate links for pages in a virtual array. */ - -static vlinks_t * -allocate_vlinks (void) -{ - vlinks_t *ptr; - static vlinks_t initial_vlinks; - -#ifndef MALLOC_CHECK - int unallocated = alloc_counts[ (int) alloc_type_vlinks ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_vlinks ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (vlinks_t); - alloc_counts[ (int) alloc_type_vlinks ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_vlinks ].total_pages++; - } - - ptr = &cur_page->vlinks[ --unallocated ]; - alloc_counts[ (int) alloc_type_vlinks ].unallocated = unallocated; - -#else - ptr = xmalloc (sizeof (vlinks_t)); - -#endif - - alloc_counts[ (int) alloc_type_vlinks ].total_alloc++; - *ptr = initial_vlinks; - return ptr; -} - - -/* Allocate string hash buckets. */ - -static shash_t * -allocate_shash (void) -{ - shash_t *ptr; - static shash_t initial_shash; - -#ifndef MALLOC_CHECK - int unallocated = alloc_counts[ (int) alloc_type_shash ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_shash ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (shash_t); - alloc_counts[ (int) alloc_type_shash ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_shash ].total_pages++; - } - - ptr = &cur_page->shash[ --unallocated ]; - alloc_counts[ (int) alloc_type_shash ].unallocated = unallocated; - -#else - ptr = xmalloc (sizeof (shash_t)); - -#endif - - alloc_counts[ (int) alloc_type_shash ].total_alloc++; - *ptr = initial_shash; - return ptr; -} - - -/* Allocate type hash buckets. */ - -static thash_t * -allocate_thash (void) -{ - thash_t *ptr; - static thash_t initial_thash; - -#ifndef MALLOC_CHECK - int unallocated = alloc_counts[ (int) alloc_type_thash ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_thash ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (thash_t); - alloc_counts[ (int) alloc_type_thash ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_thash ].total_pages++; - } - - ptr = &cur_page->thash[ --unallocated ]; - alloc_counts[ (int) alloc_type_thash ].unallocated = unallocated; - -#else - ptr = xmalloc (sizeof (thash_t)); - -#endif - - alloc_counts[ (int) alloc_type_thash ].total_alloc++; - *ptr = initial_thash; - return ptr; -} - - -/* Allocate structure, union, or enum tag information. */ - -static tag_t * -allocate_tag (void) -{ - tag_t *ptr; - static tag_t initial_tag; - -#ifndef MALLOC_CHECK - ptr = alloc_counts[ (int) alloc_type_tag ].free_list.f_tag; - if (ptr != (tag_t *) 0) - alloc_counts[ (int) alloc_type_tag ].free_list.f_tag = ptr->free; - - else - { - int unallocated = alloc_counts[ (int) alloc_type_tag ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_tag ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (tag_t); - alloc_counts[ (int) alloc_type_tag ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_tag ].total_pages++; - } - - ptr = &cur_page->tag[ --unallocated ]; - alloc_counts[ (int) alloc_type_tag ].unallocated = unallocated; - } - -#else - ptr = xmalloc (sizeof (tag_t)); - -#endif - - alloc_counts[ (int) alloc_type_tag ].total_alloc++; - *ptr = initial_tag; - return ptr; -} - -/* Free scoping information. */ - -static void -free_tag (tag_t *ptr) -{ - alloc_counts[ (int) alloc_type_tag ].total_free++; - -#ifndef MALLOC_CHECK - ptr->free = alloc_counts[ (int) alloc_type_tag ].free_list.f_tag; - alloc_counts[ (int) alloc_type_tag ].free_list.f_tag = ptr; - -#else - free (ptr); -#endif - -} - - -/* Allocate forward reference to a yet unknown tag. */ - -static forward_t * -allocate_forward (void) -{ - forward_t *ptr; - static forward_t initial_forward; - -#ifndef MALLOC_CHECK - ptr = alloc_counts[ (int) alloc_type_forward ].free_list.f_forward; - if (ptr != (forward_t *) 0) - alloc_counts[ (int) alloc_type_forward ].free_list.f_forward = ptr->free; - - else - { - int unallocated = alloc_counts[ (int) alloc_type_forward ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_forward ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (forward_t); - alloc_counts[ (int) alloc_type_forward ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_forward ].total_pages++; - } - - ptr = &cur_page->forward[ --unallocated ]; - alloc_counts[ (int) alloc_type_forward ].unallocated = unallocated; - } - -#else - ptr = xmalloc (sizeof (forward_t)); - -#endif - - alloc_counts[ (int) alloc_type_forward ].total_alloc++; - *ptr = initial_forward; - return ptr; -} - -/* Free scoping information. */ - -static void -free_forward (forward_t *ptr) -{ - alloc_counts[ (int) alloc_type_forward ].total_free++; - -#ifndef MALLOC_CHECK - ptr->free = alloc_counts[ (int) alloc_type_forward ].free_list.f_forward; - alloc_counts[ (int) alloc_type_forward ].free_list.f_forward = ptr; - -#else - free (ptr); -#endif - -} - - -/* Allocate head of type hash list. */ - -static thead_t * -allocate_thead (void) -{ - thead_t *ptr; - static thead_t initial_thead; - -#ifndef MALLOC_CHECK - ptr = alloc_counts[ (int) alloc_type_thead ].free_list.f_thead; - if (ptr != (thead_t *) 0) - alloc_counts[ (int) alloc_type_thead ].free_list.f_thead = ptr->free; - - else - { - int unallocated = alloc_counts[ (int) alloc_type_thead ].unallocated; - page_t *cur_page = alloc_counts[ (int) alloc_type_thead ].cur_page; - - if (unallocated == 0) - { - unallocated = PAGE_SIZE / sizeof (thead_t); - alloc_counts[ (int) alloc_type_thead ].cur_page = cur_page = allocate_page (); - alloc_counts[ (int) alloc_type_thead ].total_pages++; - } - - ptr = &cur_page->thead[ --unallocated ]; - alloc_counts[ (int) alloc_type_thead ].unallocated = unallocated; - } - -#else - ptr = xmalloc (sizeof (thead_t)); - -#endif - - alloc_counts[ (int) alloc_type_thead ].total_alloc++; - *ptr = initial_thead; - return ptr; -} - -/* Free scoping information. */ - -static void -free_thead (thead_t *ptr) -{ - alloc_counts[ (int) alloc_type_thead ].total_free++; - -#ifndef MALLOC_CHECK - ptr->free = (thead_t *) alloc_counts[ (int) alloc_type_thead ].free_list.f_thead; - alloc_counts[ (int) alloc_type_thead ].free_list.f_thead = ptr; - -#else - free (ptr); -#endif - -} - -/* Output an error message and exit. */ - -void -fatal (const char *format, ...) -{ - va_list ap; - - va_start (ap, format); - - if (line_number > 0) - fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number); - else - fprintf (stderr, "%s:", progname); - - vfprintf (stderr, format, ap); - va_end (ap); - fprintf (stderr, "\n"); - if (line_number > 0) - fprintf (stderr, "line:\t%s\n", cur_line_start); - - exit (1); -} - -void -error (const char *format, ...) -{ - va_list ap; - - va_start (ap, format); - - if (line_number > 0) - fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number); - else - fprintf (stderr, "%s:", progname); - - vfprintf (stderr, format, ap); - fprintf (stderr, "\n"); - if (line_number > 0) - fprintf (stderr, "line:\t%s\n", cur_line_start); - - had_errors++; - va_end (ap); -} - -/* More 'friendly' abort that prints the line and file. */ - -void -fancy_abort (const char *file, int line, const char *func) -{ - fatal ("abort in %s, at %s:%d", func, file, line); -} - - -/* When `malloc.c' is compiled with `rcheck' defined, - it calls this function to report clobberage. */ - -void -botch (const char *s) -{ - fatal ("%s", s); -} diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 189164e173c..90058318cfc 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. + 2012-03-12 Joseph Myers <joseph@codesourcery.com> * sv.po: Update. diff --git a/gcc/po/EXCLUDES b/gcc/po/EXCLUDES index e04b9239363..2568218965b 100644 --- a/gcc/po/EXCLUDES +++ b/gcc/po/EXCLUDES @@ -1,4 +1,5 @@ -# Copyright (C) 2001, 2004, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001, 2004, 2009, 2010, 2011, 2012 +# Free Software Foundation, Inc. # # This file is part of GCC. # @@ -53,8 +54,3 @@ genrecog.c gensupport.c gensupport.h read-md.c - -# These files are not yet internationalized, because they contain -# many strings that require a lot of analysis, and are little-used. -mips-tdump.c -mips-tfile.c diff --git a/gcc/system.h b/gcc/system.h index 6575acd308b..16e427e2b4c 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1,7 +1,7 @@ /* Get common system includes and various definitions and declarations based on autoconf macros. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, - 2009, 2010, 2011 + 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -890,7 +890,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; TARGET_PROMOTE_FUNCTION_ARGS TARGET_PROMOTE_FUNCTION_RETURN \ LANG_HOOKS_MISSING_ARGUMENT LANG_HOOKS_HASH_TYPES \ TARGET_HANDLE_OFAST TARGET_OPTION_OPTIMIZATION \ - TARGET_IRA_COVER_CLASSES TARGET_HELP + TARGET_IRA_COVER_CLASSES TARGET_HELP \ + TARGET_HANDLE_PRAGMA_EXTERN_PREFIX /* Arrays that were deleted in favor of a functional interface. */ #pragma GCC poison built_in_decls implicit_built_in_decls diff --git a/gcc/target.def b/gcc/target.def index 6084b21dca5..d658b118c88 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2721,11 +2721,6 @@ DEFHOOKPOD "", bool, false) -DEFHOOKPOD -(handle_pragma_extern_prefix, -"True if @code{#pragma extern_prefix} is to be supported.", - bool, 0) - /* True if the target is allowed to reorder memory accesses unless synchronization is explicitly requested. */ DEFHOOKPOD diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 29981edae1f..8a630a0d764 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,51 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. + * g++.dg/abi/thunk4.C: Likewise. + * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. + Adapt line numbers. + * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* + handling. + * g++.dg/cpp0x/constexpr-rom.C: Likewise. + * g++.dg/eh/spbp.C: Likewise. + * g++.dg/ext/label13.C: Likewise. + * g++.dg/guality/guality.exp: Likewise. + * g++.dg/other/anon5.C: Likewise. + * g++.dg/other/pragma-ep-1.C: Remove. + * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. + * g++.dg/warn/pr31246.C: Likewise. + * g++.dg/warn/weak1.C: Likewise. + * g++.old-deja/g++.eh/badalloc1.C: Likewise. + * g++.old-deja/g++.ext/attrib5.C: Likewise. + * gcc.c-torture/compile/limits-declparen.c: Likewise. + * gcc.c-torture/compile/limits-pointer.c: Likewise. + * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. + * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. + * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. + * gcc.dg/c99-tgmath-1.c: Likewise. + * gcc.dg/c99-tgmath-2.c: Likewise. + * gcc.dg/c99-tgmath-3.c: Likewise. + * gcc.dg/c99-tgmath-4.c: Likewise. + * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* + handling. + * gcc.dg/debug/pr49032.c: Likewise. + * gcc.dg/guality/guality.exp: Likewise. + * gcc.dg/intmax_t-1.c: Likewise. + * gcc.dg/pr48616.c: Likewise. + * gcc.dg/pragma-ep-1.c: Remove. + * gcc.dg/pragma-ep-2.c: Remove. + * gcc.dg/pragma-ep-3.c: Remove. + * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. + * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. + * gcc.misc-tests/gcov-14.c: Likewise. + * gfortran.dg/guality/guality.exp: Likewise. + * lib/target-supports.exp (check_weak_available): Likewise. + (add_options_for_tls): Likewise. + (check_ascii_locale_available): Likewise. + * obj-c++.dg/dwarf-2.mm: Likewise. + * objc.dg/dwarf-1.m: Likewise. + * objc.dg/dwarf-2.m: Likewise. + 2012-03-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/51721 diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C index 60dc9b8d628..c03e4611c0b 100644 --- a/gcc/testsuite/g++.dg/abi/rtti3.C +++ b/gcc/testsuite/g++.dg/abi/rtti3.C @@ -3,12 +3,10 @@ // { dg-require-weak "" } // { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } } -// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } -// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } +// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } } +// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } } // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } } // { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } } -// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZTSPP1A" { target { alpha*-dec-osf* } } } } -// { dg-final { scan-assembler-not ".weakext\[ \t\]_?_ZTIPP1A" { target { alpha*-dec-osf* } } } } struct A; diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C index cd9eac3ea10..fa5fbd43277 100644 --- a/gcc/testsuite/g++.dg/abi/thunk4.C +++ b/gcc/testsuite/g++.dg/abi/thunk4.C @@ -1,8 +1,7 @@ // { dg-require-weak "" } // { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } } -// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } +// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } } // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } } -// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZThn._N7Derived3FooEv" { target { alpha*-dec-osf* } } } } struct Base { diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C index 1174b192684..726e9ec5123 100644 --- a/gcc/testsuite/g++.dg/cdce3.C +++ b/gcc/testsuite/g++.dg/cdce3.C @@ -1,12 +1,12 @@ /* { dg-do run } */ /* { dg-require-effective-target c99_runtime } */ -/* { dg-skip-if "exp2* missing despite C99 runtime" { alpha*-dec-osf5* } } */ /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ /* { dg-additional-options "-DLARGE_LONG_DOUBLE" { target large_long_double } } */ /* { dg-additional-options "-DGNU_EXTENSION" { target pow10 } } */ /* { dg-add-options ieee } */ +/* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ /* { dg-final { scan-tree-dump "cdce3.C:93: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ -/* { dg-final { scan-tree-dump "cdce3.C:94: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */ +/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:98: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ @@ -20,7 +20,6 @@ /* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ -/* { dg-final { scan-tree-dump "cdce3.C:109: note: function call is shrink-wrapped into error conditions\." "cdce" } } */ /* { dg-final { cleanup-tree-dump "cdce" } } */ #include <stdlib.h> diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c index 5ad3f4409f6..2cf08946e36 100644 --- a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c +++ b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c @@ -1,5 +1,5 @@ /* Structure layout test generator. - Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011 + Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. Contributed by Jakub Jelinek <jakub@redhat.com>. @@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see const char *dg_options[] = { "/* { dg-options \"%s-I%s\" } */\n", "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n", -"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n", +"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n", "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n", "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n", "/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n" diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C index 5213d5930ac..0536b356185 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C @@ -1,6 +1,6 @@ // PR c++/49673: check that test_data goes into .rodata // { dg-options -std=c++0x } -// { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-osf* alpha*-*-*vms* } } } } } +// { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-*vms* } } } } } // { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } } // { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu || *-*-elf } && { ! mips*-*-* } } } } } diff --git a/gcc/testsuite/g++.dg/eh/spbp.C b/gcc/testsuite/g++.dg/eh/spbp.C index a781622ef4e..181e65d213f 100644 --- a/gcc/testsuite/g++.dg/eh/spbp.C +++ b/gcc/testsuite/g++.dg/eh/spbp.C @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-options "-gdwarf-2" } */ -/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ +/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ /* This was a bug on x86-darwin, where the register numbering for SP and BP was swapped (it's easy to do because on that port it's diff --git a/gcc/testsuite/g++.dg/ext/label13.C b/gcc/testsuite/g++.dg/ext/label13.C index db349b5cbf3..6551c0a41d4 100644 --- a/gcc/testsuite/g++.dg/ext/label13.C +++ b/gcc/testsuite/g++.dg/ext/label13.C @@ -8,7 +8,7 @@ struct C C(); }; -C::C() // { dg-bogus "can never be copied" "" { xfail { { *-apple-darwin* alpha*-dec-osf* } || { hppa*-*-hpux* && { ! lp64 } } } } } +C::C() // { dg-bogus "can never be copied" "" { xfail { { *-apple-darwin* } || { hppa*-*-hpux* && { ! lp64 } } } } } { static void *labelref = &&label; goto *labelref; diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp index 749691dab7e..9a1785036ef 100644 --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -4,8 +4,7 @@ load_lib g++-dg.exp load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. -# Disable on Tru64 UNIX (PR testsuite/48251). -if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } { +if { [istarget *-*-darwin*] } { return } diff --git a/gcc/testsuite/g++.dg/other/anon5.C b/gcc/testsuite/g++.dg/other/anon5.C index e8ebe0cc2b4..b2b979ff668 100644 --- a/gcc/testsuite/g++.dg/other/anon5.C +++ b/gcc/testsuite/g++.dg/other/anon5.C @@ -1,5 +1,5 @@ // PR c++/34094 -// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } } +// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* mips-sgi-irix* } } } } // { dg-options "-g" } namespace { diff --git a/gcc/testsuite/g++.dg/other/pragma-ep-1.C b/gcc/testsuite/g++.dg/other/pragma-ep-1.C deleted file mode 100644 index 9362943a527..00000000000 --- a/gcc/testsuite/g++.dg/other/pragma-ep-1.C +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do compile { target *-*-osf5* } } */ -/* { dg-final { scan-assembler "xyzzy_one" } } */ -/* { dg-final { scan-assembler "xyzzy_two" } } */ -/* { dg-final { scan-assembler "xyzzz_three" } } */ -/* { dg-final { scan-assembler "four" } } */ -/* { dg-final { scan-assembler-not "_four" } } */ - -#ifndef __PRAGMA_EXTERN_PREFIX -#error -#endif - -#pragma extern_prefix "xyzzy_" - -extern "C" int one(void); -extern "C" int two(void); - -#pragma extern_prefix "xyzzz_" - -extern "C" int three(void); - -#pragma extern_prefix "" - -extern "C" int four(void); - -int (*p[])(void) = { - one, two, three, four -}; diff --git a/gcc/testsuite/g++.dg/warn/miss-format-1.C b/gcc/testsuite/g++.dg/warn/miss-format-1.C index a35cd9ca9af..0d8954d1288 100644 --- a/gcc/testsuite/g++.dg/warn/miss-format-1.C +++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C @@ -4,7 +4,7 @@ /* { dg-options "-Wmissing-format-attribute" } */ /* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */ /* VxWorks does not provide vscanf, either in kernel or RTP mode. */ -/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } 26 } */ +/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* } } 26 } */ #include <stdio.h> #include <stdarg.h> @@ -23,7 +23,7 @@ bar (const char *fmt, ...) { va_list ap; va_start (ap, fmt); - vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } */ + vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.8 *-*-vxworks* } } */ va_end (ap); } diff --git a/gcc/testsuite/g++.dg/warn/pr31246.C b/gcc/testsuite/g++.dg/warn/pr31246.C index a96dc96c197..f3603af4787 100644 --- a/gcc/testsuite/g++.dg/warn/pr31246.C +++ b/gcc/testsuite/g++.dg/warn/pr31246.C @@ -1,7 +1,6 @@ // PR 31246 // { dg-do compile } // { dg-options "-Wunreachable-code -D_GLIBCXX_DEBUG" } -// { dg-xfail-if "lack of weak symbols" { alpha*-dec-osf* } } #include <vector> int main() diff --git a/gcc/testsuite/g++.dg/warn/weak1.C b/gcc/testsuite/g++.dg/warn/weak1.C index 8a50030bc9d..efce90a2bcf 100644 --- a/gcc/testsuite/g++.dg/warn/weak1.C +++ b/gcc/testsuite/g++.dg/warn/weak1.C @@ -1,8 +1,7 @@ // { dg-do run } // { dg-require-weak "" } -// The PA HP-UX and Tru64 UNIX dynamic loaders don't support unsatisfied -// weak symbols. -// { dg-skip-if "No unsat" { alpha*-dec-osf* hppa*-*-hpux* } { "*" } { "" } } +// The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols. +// { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } } // The darwin loader does, but they do need to exist at link time. // { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } } // For kernel modules and static RTPs, the loader treats undefined weak diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C index cd902fbc3c0..c0341019845 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C @@ -3,7 +3,7 @@ // itself call malloc(), and will fail if there is no more // memory available. // { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp } } } -// Copyright (C) 2000, 2002, 2003, 2010 Free Software Foundation, Inc. +// Copyright (C) 2000, 2002, 2003, 2010, 2012 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com> // Check we can throw a bad_alloc exception when malloc dies. @@ -18,9 +18,9 @@ extern "C" void *memcpy(void *, const void *, size_t); #ifdef STACK_SIZE const int arena_size = 256; #else -#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__) || defined(__osf__) -// FreeBSD, Solaris, HP-UX and Tru64 UNIX with threads require even more -// space at initialization time. FreeBSD 5 now requires over 131072 bytes. +#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__) +// FreeBSD, Solaris and HP-UX require even more space at initialization time. +// FreeBSD 5 now requires over 131072 bytes. const int arena_size = 262144; #else const int arena_size = 32768; diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C index fcc3c61677a..65c0d6dadcb 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C @@ -1,4 +1,4 @@ -// { dg-do run { xfail alpha*-dec-osf* i?86-pc-cygwin } } +// { dg-do run { xfail i?86-pc-cygwin } } // Test that attributes weak and alias coexist. // { dg-require-weak "" } // { dg-require-alias "" } diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c b/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c index ee855800667..41bf9c5cdc1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c +++ b/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c @@ -1,4 +1,3 @@ -/* { dg-xfail-if "" { alpha*-dec-osf5* } { "-g" } { "" } } */ #define PTR1 (* (* (* (* (* (* (* (* (* (* #define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 #define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c b/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c index 43515556616..1e50ea7cf34 100644 --- a/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c +++ b/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c @@ -1,4 +1,3 @@ -/* { dg-xfail-if "" { alpha*-dec-osf5* } { "-g" } { "" } } */ #define PTR1 * * * * * * * * * * #define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 #define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 diff --git a/gcc/testsuite/gcc.c-torture/execute/20001229-1.c b/gcc/testsuite/gcc.c-torture/execute/20001229-1.c index 39b58af62e7..69ce6dab86d 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20001229-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20001229-1.c @@ -7,8 +7,7 @@ So: If we know how, ask the kernel to deliver SIGBUS instead so that the test case visibly fails. */ -#if defined(__alpha__) && (defined(__linux__) || defined(__osf__)) -#ifdef __linux__ +#if defined(__alpha__) && defined(__linux__) #include <asm/sysinfo.h> #include <asm/unistd.h> @@ -19,11 +18,6 @@ setsysinfo(unsigned long op, void *buffer, unsigned long size, syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag); } -#else -#include <sys/sysinfo.h> -#include <sys/proc.h> -#endif - static void __attribute__((constructor)) trap_unaligned(void) { diff --git a/gcc/testsuite/gcc.dg/attr-weakref-1.c b/gcc/testsuite/gcc.dg/attr-weakref-1.c index 31d5379e47c..898bc4169a0 100644 --- a/gcc/testsuite/gcc.dg/attr-weakref-1.c +++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c @@ -2,10 +2,9 @@ // { dg-require-weak "" } // On darwin, we use attr-weakref-1-darwin.c. // This test requires support for undefined weak symbols. This support -// is not available on alpha*-dec-osf* and hppa*-*-hpux*. The test is -// skipped rather than xfailed to suppress the warning that would otherwise -// arise. -// { dg-skip-if "" { "alpha*-dec-osf*" "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } } +// is not available on hppa*-*-hpux*. The test is skipped rather than +// xfailed to suppress the warning that would otherwise arise. +// { dg-skip-if "" { "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } } // For kernel modules and static RTPs, the loader treats undefined weak // symbols in the same way as undefined strong symbols. The test // therefore fails to load, so skip it. diff --git a/gcc/testsuite/gcc.dg/c99-stdint-6.c b/gcc/testsuite/gcc.dg/c99-stdint-6.c index 2563eeb581a..3fe1473e011 100644 --- a/gcc/testsuite/gcc.dg/c99-stdint-6.c +++ b/gcc/testsuite/gcc.dg/c99-stdint-6.c @@ -3,7 +3,6 @@ /* { dg-do compile { target inttypes_types } } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ /* { dg-options "-std=gnu99 -pedantic-errors -DNO_FAST_TYPES" { target *-*-solaris2.[89]* } } */ -/* { dg-options "-std=gnu99 -pedantic-errors -DNO_LEAST_TYPES -DNO_FAST_TYPES -DNO_MAX_TYPES" { target alpha*-dec-osf5* } } */ #include <inttypes.h> #ifndef SIGNAL_SUPPRESS diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-1.c b/gcc/testsuite/gcc.dg/c99-tgmath-1.c index f33b4c5a9ea..c7d848c7a6c 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-1.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-1.c @@ -3,7 +3,6 @@ /* { dg-do preprocess { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ -/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */ /* Test that tgmath defines the macros it's supposed to. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c index fa8d80166bd..d4f1f87cfa9 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-2.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c @@ -3,7 +3,6 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ -/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */ /* Test that invoking type-generic sin on a float invokes sinf. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c index 83e34a23055..3e983042751 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-3.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c @@ -3,7 +3,6 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ -/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */ /* Test that invoking type-generic exp on a complex invokes cexp. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c index 90653260d15..d8dc043c261 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-4.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c @@ -3,7 +3,6 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ -/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */ /* Test that invoking type-generic pow on complex float invokes cpowf. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c index 76878ff954c..b6ae34e0003 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c @@ -1,5 +1,5 @@ /* Structure layout test generator. - Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011 + Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. Contributed by Jakub Jelinek <jakub@redhat.com>. @@ -47,7 +47,7 @@ const char *dg_options[] = { "/* { dg-options \"%s-I%s\" } */\n", "/* { dg-options \"%s-I%s -Wno-abi\" } */\n", "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n", -"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* } } */\n", +"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* } } */\n", "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n", "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n", "/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n" diff --git a/gcc/testsuite/gcc.dg/debug/pr49032.c b/gcc/testsuite/gcc.dg/debug/pr49032.c index 9074c756452..3985040d712 100644 --- a/gcc/testsuite/gcc.dg/debug/pr49032.c +++ b/gcc/testsuite/gcc.dg/debug/pr49032.c @@ -1,7 +1,5 @@ /* PR debug/49032 */ /* { dg-do link } */ -/* Prune mips-tfile warning on alpha*-dec-osf* with -gcoff* -O*. */ -/* { dg-prune-output "warning, s not found in .*symbol tables" } */ static int s = 42; diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp index 5e3284d5d11..49e2ac5a550 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -4,8 +4,7 @@ load_lib gcc-dg.exp load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. -# Disable on Tru64 UNIX (PR testsuite/48251). -if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } { +if { [istarget *-*-darwin*] } { return } diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c index 2f21c63f029..00b503c2509 100644 --- a/gcc/testsuite/gcc.dg/intmax_t-1.c +++ b/gcc/testsuite/gcc.dg/intmax_t-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Wall" } */ /* { dg-error "" "" { target { { *arm*-*-*elf* xtensa*-*-elf* } || vxworks_kernel } } 0 } */ -/* { dg-skip-if "No *intmax_t in <inttypes.h>" { alpha*-dec-osf* } } */ /* Compile with -Wall to get a warning if built-in and system intmax_t don't match. */ diff --git a/gcc/testsuite/gcc.dg/pr48616.c b/gcc/testsuite/gcc.dg/pr48616.c index 303f9a3dd3a..4517d792119 100644 --- a/gcc/testsuite/gcc.dg/pr48616.c +++ b/gcc/testsuite/gcc.dg/pr48616.c @@ -1,7 +1,7 @@ /* PR tree-optimization/48616 */ /* { dg-do run } */ /* { dg-options "-O2 -ftree-vectorize" } */ -/* { dg-additional-options "-fno-common" { target alpha*-dec-osf* hppa*-*-hpux* } } */ +/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ extern void abort (void); int a[4] __attribute__((aligned (32))); diff --git a/gcc/testsuite/gcc.dg/pragma-ep-1.c b/gcc/testsuite/gcc.dg/pragma-ep-1.c deleted file mode 100644 index e110ff90004..00000000000 --- a/gcc/testsuite/gcc.dg/pragma-ep-1.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do compile { target *-*-osf5* } } */ -/* { dg-final { scan-assembler "xyzzy_one" } } */ -/* { dg-final { scan-assembler "xyzzy_two" } } */ -/* { dg-final { scan-assembler "xyzzz_three" } } */ -/* { dg-final { scan-assembler "four" } } */ -/* { dg-final { scan-assembler-not "_four" } } */ - -#ifndef __PRAGMA_EXTERN_PREFIX -#error -#endif - -#pragma extern_prefix "xyzzy_" - -extern int one(void); -extern int two(void); - -#pragma extern_prefix "xyzzz_" - -extern int three(void); - -#pragma extern_prefix "" - -extern int four(void); - -int (*p[]) (void) = { - one, two, three, four -}; diff --git a/gcc/testsuite/gcc.dg/pragma-ep-2.c b/gcc/testsuite/gcc.dg/pragma-ep-2.c deleted file mode 100644 index 1151d9b4bf1..00000000000 --- a/gcc/testsuite/gcc.dg/pragma-ep-2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target *-*-osf5* } } */ - -#pragma extern_prefix /* { dg-warning "malformed" } */ -#pragma extern_prefix foo /* { dg-warning "malformed" } */ -#pragma extern_prefix "foo" 1 /* { dg-warning "junk" } */ - -int bar; /* silence `ISO C forbids an empty translation unit' warning */ diff --git a/gcc/testsuite/gcc.dg/pragma-ep-3.c b/gcc/testsuite/gcc.dg/pragma-ep-3.c deleted file mode 100644 index a3e1e6e6845..00000000000 --- a/gcc/testsuite/gcc.dg/pragma-ep-3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target alpha*-*-osf5* } } */ -/* { dg-final { scan-assembler ",Xfoo" } } */ - -#pragma extern_prefix "X" -void foo(void) __attribute__((noreturn)); -void foo(void) __attribute__((noreturn)); -void bar() -{ - foo(); -} diff --git a/gcc/testsuite/gcc.dg/torture/pr47917.c b/gcc/testsuite/gcc.dg/torture/pr47917.c index d3649fb7409..97e37657939 100644 --- a/gcc/testsuite/gcc.dg/torture/pr47917.c +++ b/gcc/testsuite/gcc.dg/torture/pr47917.c @@ -1,6 +1,5 @@ /* { dg-do run } */ /* { dg-options "-std=c99" } */ -/* { dg-options "-std=c99 -D_ISO_C_SOURCE=19990L" { target alpha*-dec-osf5* } } */ /* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 *-*-solaris2.[89] } } */ /* { dg-options "-std=gnu99" { target *-*-hpux* } } */ /* { dg-additional-options "-D__USE_MINGW_ANSI_STDIO=1" { target *-*-mingw* } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c b/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c index b1bc4f7a39e..d01b8abdda7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c @@ -35,6 +35,6 @@ Cyc_string_ungetc (int ignore, struct _fat_ptr *sptr) /* Whether the structs are totally scalarized or not depends on the MOVE_RATIO macro defintion in the back end. The scalarization will not take place when using small values for MOVE_RATIO. */ -/* { dg-final { scan-tree-dump-times "struct _fat_ptr _ans" 0 "optimized" { target { ! "alpha*-dec-osf* arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */ -/* { dg-final { scan-tree-dump-times "struct _fat_ptr _T2" 0 "optimized" { target { ! "alpha*-dec-osf* arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */ +/* { dg-final { scan-tree-dump-times "struct _fat_ptr _ans" 0 "optimized" { target { ! "arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */ +/* { dg-final { scan-tree-dump-times "struct _fat_ptr _T2" 0 "optimized" { target { ! "arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.misc-tests/gcov-14.c b/gcc/testsuite/gcc.misc-tests/gcov-14.c index 564b08eaa99..5b9cd4189c1 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-14.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-14.c @@ -5,7 +5,6 @@ /* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* } } */ /* { dg-require-weak "" } */ /* { dg-do run { target native } } */ -/* { dg-skip-if "undefined weak not supported" { alpha*-dec-osf* } } */ /* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */ extern int __attribute__ ((weak)) Foo (); diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp index 8bb19a54b15..2444d8de7b8 100644 --- a/gcc/testsuite/gfortran.dg/guality/guality.exp +++ b/gcc/testsuite/gfortran.dg/guality/guality.exp @@ -4,8 +4,7 @@ load_lib gfortran-dg.exp load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. -# Disable on Tru64 UNIX (PR testsuite/48251). -if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } { +if { [istarget *-*-darwin*] } { return } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7741f91cf30..85cef99119c 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -233,12 +233,6 @@ proc check_weak_available { } { return 1 } - # DEC OSF/1/Digital UNIX/Tru64 UNIX supports it - - if { [istarget alpha*-dec-osf*] } { - return 1 - } - # Windows targets Cygwin and MingW32 support it if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } { @@ -584,11 +578,6 @@ proc check_effective_target_pcc_bitfield_type_matters { } { # Add to FLAGS all the target-specific flags needed to use thread-local storage. proc add_options_for_tls { flags } { - # Tru64 UNIX uses emutls, which relies on a couple of pthread functions - # which only live in libpthread, so always pass -pthread for TLS. - if { [istarget alpha*-dec-osf*] } { - return "$flags -pthread" - } # On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in # libthread, so always pass -pthread for native TLS. # Need to duplicate native TLS check from @@ -993,8 +982,8 @@ proc check_iconv_available { test_what } { # Return 1 if an ASCII locale is supported on this host, 0 otherwise. proc check_ascii_locale_available { } { - if { ([ishost alpha*-dec-osf*] || [ishost mips-sgi-irix*]) } { - # Neither Tru64 UNIX nor IRIX support an ASCII locale. + if { ([ishost mips-sgi-irix*]) } { + # IRIX doesn't support an ASCII locale. return 0 } else { return 1 diff --git a/gcc/testsuite/obj-c++.dg/dwarf-2.mm b/gcc/testsuite/obj-c++.dg/dwarf-2.mm index f936b6baef4..3720a8871ed 100644 --- a/gcc/testsuite/obj-c++.dg/dwarf-2.mm +++ b/gcc/testsuite/obj-c++.dg/dwarf-2.mm @@ -1,4 +1,4 @@ /* { dg-options "-gdwarf-2 -dA" } */ -/* { dg-skip-if "No Dwarf" { { alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ +/* { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ /* { dg-final { scan-assembler "0x11\[^0-9a-f\].*DW_AT_language" } } */ int x; diff --git a/gcc/testsuite/objc.dg/dwarf-1.m b/gcc/testsuite/objc.dg/dwarf-1.m index c04b613502e..3bfabbae475 100644 --- a/gcc/testsuite/objc.dg/dwarf-1.m +++ b/gcc/testsuite/objc.dg/dwarf-1.m @@ -1,6 +1,6 @@ /* { dg-options "-gdwarf-2 -dA" } */ /* { dg-final { scan-assembler "\"id.0\".*DW_AT_name" } } */ -/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ +/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ @interface foo id x; @end diff --git a/gcc/testsuite/objc.dg/dwarf-2.m b/gcc/testsuite/objc.dg/dwarf-2.m index bedc520a65b..967f5159013 100644 --- a/gcc/testsuite/objc.dg/dwarf-2.m +++ b/gcc/testsuite/objc.dg/dwarf-2.m @@ -1,4 +1,4 @@ /* { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } */ /* { dg-final { scan-assembler "0x10\[^0-9a-f\].*DW_AT_language" } } */ -/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ +/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ int x; diff --git a/gnattools/configure b/gnattools/configure index 8667058788f..bb648163ece 100755 --- a/gnattools/configure +++ b/gnattools/configure @@ -2076,9 +2076,6 @@ case "${target}" in mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \ indepsw.adb<indepsw-aix.adb" ;; - alpha*-dec-osf*) - TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb" - ;; alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \ | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*) TOOLS_TARGET_PAIRS="\ diff --git a/gnattools/configure.ac b/gnattools/configure.ac index 450cb727243..443528e5b8e 100644 --- a/gnattools/configure.ac +++ b/gnattools/configure.ac @@ -1,5 +1,5 @@ # Configure script for libada. -# Copyright 2003, 2004, 2009 Free Software Foundation, Inc. +# Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc. # # 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 @@ -116,9 +116,6 @@ case "${target}" in mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \ indepsw.adb<indepsw-aix.adb" ;; - alpha*-dec-osf*) - TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb" - ;; alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \ | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*) TOOLS_TARGET_PAIRS="\ diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a3294848a76..0037eaa43e4 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,16 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config.host: Remove alpha*-dec-osf5.1* handling. + * config/alpha/gthr-posix.c: Remove. + * config/alpha/libgcc-osf5.ver: Remove. + * config/alpha/osf5-unwind.h: Remove. + * config/alpha/t-osf-pthread: Remove. + * config/alpha/t-slibgcc-osf: Remove. + * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. + * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. + [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. + * mkmap-flat.awk: Remove osf_export handling. + 2012-03-12 Richard Guenther <rguenther@suse.de> * gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification. diff --git a/libgcc/config.host b/libgcc/config.host index 257622a09ff..2fe4e34b559 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -266,8 +266,7 @@ case ${host} in esac case ${host} in -*-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2* | \ - alpha*-dec-osf5.1*) +*-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2*) enable_execute_stack=enable-execute-stack-mprotect.c ;; i[34567]86-*-mingw* | x86_64-*-mingw*) @@ -294,16 +293,6 @@ alpha*-*-netbsd*) alpha*-*-openbsd*) tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee" ;; -alpha*-dec-osf5.1*) - tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm t-slibgcc alpha/t-slibgcc-osf" - case ${target_thread_file} in - posix) - tmake_file="${tmake_file} alpha/t-osf-pthread" - ;; - esac - extra_parts="${extra_parts} crtfastmath.o" - md_unwind_header=alpha/osf5-unwind.h - ;; alpha64-dec-*vms*) tmake_file="$tmake_file alpha/t-alpha alpha/t-ieee alpha/t-vms t-slibgcc-vms" extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o" diff --git a/libgcc/config/alpha/gthr-posix.c b/libgcc/config/alpha/gthr-posix.c deleted file mode 100644 index 02681a4371e..00000000000 --- a/libgcc/config/alpha/gthr-posix.c +++ /dev/null @@ -1,266 +0,0 @@ -/* POSIX threads dummy routines for systems without weak definitions. */ -/* Compile this one with gcc. */ -/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2011 - Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#include "tconfig.h" -#include "tm.h" -#include "libgcc_tm.h" -# define __gthrw_pragma(pragma) _Pragma (#pragma) -/* Define so we provide weak definitions of functions used by libobjc only. */ -#define _LIBOBJC_WEAK -#include "gthr.h" - -int -pthread_once (pthread_once_t *once ATTRIBUTE_UNUSED, - void (*func) (void) ATTRIBUTE_UNUSED) -{ - return -1; -} - -int -pthread_key_create (pthread_key_t *key ATTRIBUTE_UNUSED, - void (*dtor) (void *) ATTRIBUTE_UNUSED) -{ - return -1; -} - -int -pthread_key_delete (pthread_key_t key ATTRIBUTE_UNUSED) -{ - return 0; -} - -void * -pthread_getspecific (pthread_key_t key ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_setspecific (pthread_key_t key ATTRIBUTE_UNUSED, - const void *ptr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_create (pthread_t *thread ATTRIBUTE_UNUSED, - const pthread_attr_t *attr ATTRIBUTE_UNUSED, - void *(*start_routine) (void *) ATTRIBUTE_UNUSED, - void *arg ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_join (pthread_t thread ATTRIBUTE_UNUSED, - void **value_ptr ATTRIBUTE_UNUSED) -{ - return 0; -} - -void -pthread_exit (void *value_ptr ATTRIBUTE_UNUSED) -{ -} - -int -pthread_detach (pthread_t thread ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutex_lock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutex_trylock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) -{ - return 0; -} - -#ifdef _POSIX_TIMEOUTS -#if _POSIX_TIMEOUTS >= 0 -int -pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED, - const struct timespec *abs_timeout ATTRIBUTE_UNUSED) -{ - return 0; -} -#endif -#endif /* _POSIX_TIMEOUTS */ - -int -pthread_mutex_unlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutexattr_init (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutexattr_settype (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED, - int type ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutexattr_destroy (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_broadcast (pthread_cond_t *cond ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_destroy (pthread_cond_t *cond ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_init (pthread_cond_t *cond ATTRIBUTE_UNUSED, - const pthread_condattr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_signal (pthread_cond_t *cond ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_wait (pthread_cond_t *cond ATTRIBUTE_UNUSED, - pthread_mutex_t *mutex ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_cond_timedwait (pthread_cond_t *cond ATTRIBUTE_UNUSED, - pthread_mutex_t *mutex ATTRIBUTE_UNUSED, - const struct timespec *abstime ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutex_init (pthread_mutex_t *mutex ATTRIBUTE_UNUSED, - const pthread_mutexattr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_mutex_destroy (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) -{ - return 0; -} - -pthread_t -pthread_self (void) -{ - return (pthread_t) 0; -} - -#ifdef _POSIX_PRIORITY_SCHEDULING -#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING -int -sched_get_priority_max (int policy ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -sched_get_priority_min (int policy ATTRIBUTE_UNUSED) -{ - return 0; -} -#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ -#endif /* _POSIX_PRIORITY_SCHEDULING */ - -int -sched_yield (void) -{ - return 0; -} - -int -pthread_attr_destroy (pthread_attr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_attr_init (pthread_attr_t *attr ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_attr_setdetachstate (pthread_attr_t *attr ATTRIBUTE_UNUSED, - int detachstate ATTRIBUTE_UNUSED) -{ - return 0; -} - -#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING -int -pthread_getschedparam (pthread_t thread ATTRIBUTE_UNUSED, - int *policy ATTRIBUTE_UNUSED, - struct sched_param *param ATTRIBUTE_UNUSED) -{ - return 0; -} - -int -pthread_setschedparam (pthread_t thread ATTRIBUTE_UNUSED, - int policy ATTRIBUTE_UNUSED, - const struct sched_param *param ATTRIBUTE_UNUSED) -{ - return 0; -} -#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ - diff --git a/libgcc/config/alpha/libgcc-osf5.ver b/libgcc/config/alpha/libgcc-osf5.ver deleted file mode 100644 index 4266928d1cf..00000000000 --- a/libgcc/config/alpha/libgcc-osf5.ver +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2011 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Tru64 UNIX specific additions to libgcc-std.ver. - -GCC_4.7.0 { - __udiv_qrnnd - # Beware *not* to hide the POSIX threads related symbols provided by - # gthr-posix.c, as this would prevent their preemption by real symbols. - __pthread_cancel - __pthread_cond_broadcast - __pthread_cond_destroy - __pthread_cond_init - __pthread_cond_signal - __pthread_cond_timedwait - __pthread_cond_wait - __pthread_create - __pthread_detach - __pthread_exit - __pthread_getspecific - __pthread_join - __pthread_mutex_destroy - __pthread_mutex_init - __pthread_mutex_lock - __pthread_mutex_trylock - __pthread_mutex_unlock - __pthread_once - __pthread_self - __pthread_setspecific - pthread_attr_destroy - pthread_attr_init - pthread_attr_setdetachstate - pthread_getschedparam - pthread_key_create - pthread_key_delete - pthread_mutexattr_destroy - pthread_mutexattr_init - pthread_mutexattr_settype - pthread_setschedparam - sched_get_priority_max - sched_get_priority_min - sched_yield -} diff --git a/libgcc/config/alpha/osf5-unwind.h b/libgcc/config/alpha/osf5-unwind.h deleted file mode 100644 index c649099349e..00000000000 --- a/libgcc/config/alpha/osf5-unwind.h +++ /dev/null @@ -1,329 +0,0 @@ -/* DWARF2 EH unwinding support for Alpha Tru64. - Copyright (C) 2010 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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 3, or (at your option) any later -version. - -GCC 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 GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -/* This file implements the MD_FALLBACK_FRAME_STATE_FOR macro, triggered when - the GCC table based unwinding process hits a frame for which no unwind info - has been registered. This typically occurs when raising an exception from a - signal handler, because the handler is actually called from the OS kernel. - - The basic idea is to detect that we are indeed trying to unwind past a - signal handler and to fill out the GCC internal unwinding structures for - the OS kernel frame as if it had been directly called from the interrupted - context. - - This is all assuming that the code to set the handler asked the kernel to - pass a pointer to such context information. */ - -/* -------------------------------------------------------------------------- - -- Basic principles of operation: - -------------------------------------------------------------------------- - - 1/ We first need a way to detect if we are trying to unwind past a signal - handler. - - The typical method that is used on most platforms is to look at the code - around the return address we have and check if it matches the OS code - calling a handler. To determine what this code is expected to be, get a - breakpoint into a real signal handler and look at the code around the - return address. Depending on the library versions the pattern of the - signal handler is different; this is the reason why we check against more - than one pattern. - - On this target, the return address is right after the call and every - instruction is 4 bytes long. For the simple case of a null dereference in - a single-threaded app, it went like: - - # Check that we indeed have something we expect: the instruction right - # before the return address is within a __sigtramp function and is a call. - - [... run gdb and break at the signal handler entry ...] - - (gdb) x /i $ra-4 - <__sigtramp+160>: jsr ra,(a3),0x3ff800d0ed4 <_fpdata+36468> - - # Look at the code around that return address, and eventually observe a - # significantly large chunk of *constant* code right before the call: - - (gdb) x /10i $ra-44 - <__sigtramp+120>: lda gp,-27988(gp) - <__sigtramp+124>: ldq at,-18968(gp) - <__sigtramp+128>: lda t0,-1 - <__sigtramp+132>: stq t0,0(at) - <__sigtramp+136>: ldq at,-18960(gp) - <__sigtramp+140>: ldl t1,8(at) - <__sigtramp+144>: ldq at,-18960(gp) - <__sigtramp+148>: stl t1,12(at) - <__sigtramp+152>: ldq at,-18960(gp) - <__sigtramp+156>: stl t0,8(at) - - # The hexadecimal equivalent that we will have to match is: - - (gdb) x /10x $ra-44 - <__sigtramp+120>: 0x23bd92ac 0xa79db5e8 0x203fffff 0xb43c0000 - <__sigtramp+136>: 0xa79db5f0 0xa05c0008 0xa79db5f0 0xb05c000c - <__sigtramp+152>: 0xa79db5f0 0xb03c0008 - - The problem observed on this target with this approach is that although - we found a constant set of instruction patterns there were some - gp-related offsets that made the machine code to differ from one - installation to another. This problem could have been overcome by masking - these offsets, but we found that it would be simpler and more efficient to - check whether the return address was part of a signal handler, by comparing - it against some expected code offset from __sigtramp. - - # Check that we indeed have something we expect: the instruction - # right before the return address is within a __sigtramp - # function and is a call. We also need to obtain the offset - # between the return address and the start address of __sigtramp. - - [... run gdb and break at the signal handler entry ...] - - (gdb) x /2i $ra-4 - <__sigtramp+160>: jsr ra,(a3),0x3ff800d0ed4 <_fpdata+36468> - <__sigtramp+164>: ldah gp,16381(ra) - - (gdb) p (long)$ra - (long)&__sigtramp - $2 = 164 - - -------------------------------------------------------------------------- - - 2/ Once we know we are going through a signal handler, we need a way to - retrieve information about the interrupted run-time context. - - On this platform, the third handler's argument is a pointer to a structure - describing this context (struct sigcontext *). We unfortunately have no - direct way to transfer this value here, so a couple of tricks are required - to compute it. - - As documented at least in some header files (e.g. sys/machine/context.h), - the structure the handler gets a pointer to is located on the stack. As of - today, while writing this macro, we have unfortunately not been able to - find a detailed description of the full stack layout at handler entry time, - so we'll have to resort to empirism :) - - When unwinding here, we have the handler's CFA at hand, as part of the - current unwinding context which is one of our arguments. We presume that - for each call to a signal handler by the same kernel routine, the context's - structure location on the stack is always at the same offset from the - handler's CFA, and we compute that offset from bare observation: - - For the simple case of a bare null dereference in a single-threaded app, - computing the offset was done using GNAT like this: - - # Break on the first handler's instruction, before the prologue to have the - # CFA in $sp, and get there: - - (gdb) b *&__gnat_error_handler - Breakpoint 1 at 0x120016090: file init.c, line 378. - - (gdb) r - Program received signal SIGSEGV, Segmentation fault. - - (gdb) c - Breakpoint 1, __gnat_error_handler (sig=..., sip=..., context=...) - - # The displayed argument value are meaningless because we stopped before - # their final "homing". We know they are passed through $a0, $a1 and $a2 - # from the ABI, though, so ... - - # Observe that $sp and the context pointer are in the same (stack) area, - # and compute the offset: - - (gdb) p /x $sp - $2 = 0x11fffbc80 - - (gdb) p /x $a2 - $3 = 0x11fffbcf8 - - (gdb) p /x (long)$a2 - (long)$sp - $4 = 0x78 - - -------------------------------------------------------------------------- - - 3/ Once we know we are unwinding through a signal handler and have the - address of the structure describing the interrupted context at hand, we - have to fill the internal frame-state/unwind-context structures properly - to allow the unwinding process to proceed. - - Roughly, we are provided with an *unwinding* CONTEXT, describing the state - of some point P in the call chain we are unwinding through. The macro we - implement has to fill a "frame state" structure FS that describe the P's - caller state, by way of *rules* to compute its CFA, return address, and - **saved** registers *locations*. - - For the case we are going to deal with, the caller is some kernel code - calling a signal handler, and: - - o The saved registers are all in the interrupted run-time context, - - o The CFA is the stack pointer value when the kernel code is entered, that - is, the stack pointer value at the interruption point, also part of the - interrupted run-time context. - - o We want the return address to appear as the address of the active - instruction at the interruption point, so that the unwinder proceeds as - if the interruption had been a regular call. This address is also part - of the interrupted run-time context. - - -- - - Also, note that there is an important difference between the return address - we need to claim for the kernel frame and the value of the return address - register at the interruption point. - - The latter might be required to be able to unwind past the interrupted - routine, for instance if it is interrupted before saving the incoming - register value in its own frame, which may typically happen during stack - probes for stack-checking purposes. - - It is then essential that the rules stated to locate the kernel frame - return address don't clobber the rules describing where is saved the return - address register at the interruption point, so some scratch register state - entry should be used for the former. We have DWARF_ALT_FRAME_RETURN_COLUMN - at hand exactly for that purpose. - - -------------------------------------------------------------------------- - - 4/ Depending on the context (single-threaded or multi-threaded app, ...), - the code calling the handler and the handler-cfa to interrupted-context - offset might change, so we use a simple generic data structure to track - the possible variants. */ - -/* This is the structure to wrap information about each possible sighandler - caller we may have to identify. */ - -typedef struct { - /* Expected return address when being called from a sighandler. */ - void *ra_value; - - /* Offset to get to the sigcontext structure from the handler's CFA - when the pattern matches. */ - int cfa_to_context_offset; - -} sighandler_call_t; - -/* Helper macro for MD_FALLBACK_FRAME_STATE_FOR below. - - Look at RA to see if it matches within a sighandler caller. - Set SIGCTX to the corresponding sigcontext structure (computed from - CFA) if it does, or to 0 otherwise. */ - -#define COMPUTE_SIGCONTEXT_FOR(RA,CFA,SIGCTX) \ -do { \ - /* Define and register the applicable patterns. */ \ - extern void __sigtramp (void); \ - \ - sighandler_call_t sighandler_calls [] = { \ - {__sigtramp + 164, 0x78} \ - }; \ - \ - int n_patterns_to_match \ - = sizeof (sighandler_calls) / sizeof (sighandler_call_t); \ - \ - int pn; /* pattern number */ \ - \ - int match = 0; /* Did last pattern match ? */ \ - \ - /* Try to match each pattern in turn. */ \ - for (pn = 0; !match && pn < n_patterns_to_match; pn ++) \ - match = ((RA) == sighandler_calls[pn].ra_value); \ - \ - (SIGCTX) = (struct sigcontext *) \ - (match ? ((CFA) + sighandler_calls[pn - 1].cfa_to_context_offset) : 0); \ -} while (0); - -#include <sys/context_t.h> - -#define REG_SP 30 /* hard reg for stack pointer */ -#define REG_RA 26 /* hard reg for return address */ - -#define MD_FALLBACK_FRAME_STATE_FOR alpha_fallback_frame_state - -static _Unwind_Reason_Code -alpha_fallback_frame_state (struct _Unwind_Context *context, - _Unwind_FrameState *fs) -{ - /* Return address and CFA of the frame we're attempting to unwind through, - possibly a signal handler. */ - void *ctx_ra = (void *)context->ra; - void *ctx_cfa = (void *)context->cfa; - - /* CFA of the intermediate abstract kernel frame between the interrupted - code and the signal handler, if we're indeed unwinding through a signal - handler. */ - void *k_cfa; - - /* Pointer to the sigcontext structure pushed by the kernel when we're - unwinding through a signal handler. */ - struct sigcontext *sigctx; - int i; - - COMPUTE_SIGCONTEXT_FOR (ctx_ra, ctx_cfa, sigctx); - - if (sigctx == 0) - return _URC_END_OF_STACK; - - /* The kernel frame's CFA is exactly the stack pointer value at the - interruption point. */ - k_cfa = (void *) sigctx->sc_regs [REG_SP]; - - /* State the rules to compute the CFA we have the value of: use the - previous CFA and offset by the difference between the two. See - uw_update_context_1 for the supporting details. */ - fs->regs.cfa_how = CFA_REG_OFFSET; - fs->regs.cfa_reg = __builtin_dwarf_sp_column (); - fs->regs.cfa_offset = k_cfa - ctx_cfa; - - /* Fill the internal frame_state structure with information stating - where each register of interest in the saved context can be found - from the CFA. */ - - /* The general registers are in sigctx->sc_regs. Leave out r31, which - is read-as-zero. It makes no sense restoring it, and we are going to - use the state entry for the kernel return address rule below. - - This loop must cover at least all the callee-saved registers, and - we just don't bother specializing the set here. */ - for (i = 0; i <= 30; i ++) - { - fs->regs.reg[i].how = REG_SAVED_OFFSET; - fs->regs.reg[i].loc.offset - = (void *) &sigctx->sc_regs[i] - (void *) k_cfa; - } - - /* Ditto for the floating point registers in sigctx->sc_fpregs. */ - for (i = 0; i <= 31; i ++) - { - fs->regs.reg[32+i].how = REG_SAVED_OFFSET; - fs->regs.reg[32+i].loc.offset - = (void *) &sigctx->sc_fpregs[i] - (void *) k_cfa; - } - - /* State the rules to find the kernel's code "return address", which - is the address of the active instruction when the signal was caught, - in sigctx->sc_pc. Use DWARF_ALT_FRAME_RETURN_COLUMN since the return - address register is a general register and should be left alone. */ - fs->retaddr_column = DWARF_ALT_FRAME_RETURN_COLUMN; - fs->regs.reg[DWARF_ALT_FRAME_RETURN_COLUMN].how = REG_SAVED_OFFSET; - fs->regs.reg[DWARF_ALT_FRAME_RETURN_COLUMN].loc.offset - = (void *) &sigctx->sc_pc - (void *) k_cfa; - fs->signal_frame = 1; - - return _URC_NO_REASON; -} diff --git a/libgcc/config/alpha/t-osf-pthread b/libgcc/config/alpha/t-osf-pthread deleted file mode 100644 index 9a175dbeb9e..00000000000 --- a/libgcc/config/alpha/t-osf-pthread +++ /dev/null @@ -1,5 +0,0 @@ -# Compile libgcc2 with POSIX threads supports -HOST_LIBGCC2_CFLAGS += -pthread - -# Provide dummy POSIX threads functions -LIB2ADD += $(srcdir)/config/alpha/gthr-posix.c diff --git a/libgcc/config/alpha/t-slibgcc-osf b/libgcc/config/alpha/t-slibgcc-osf deleted file mode 100644 index 66e5cf12aa1..00000000000 --- a/libgcc/config/alpha/t-slibgcc-osf +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2011 -# Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Build a shared libgcc library with the Tru64 UNIX linker. - -SHLIB_LDFLAGS = -Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \ - -Wl,-hidden -Wl,-input,$(SHLIB_MAP) - -SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MKMAP_OPTS = -v osf_export=1 -# Needed so mkmap-flat.awk can parse the nm output. -SHLIB_NM_FLAGS = -Bg -SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/alpha/libgcc-osf5.ver diff --git a/libgcc/config/t-crtfm b/libgcc/config/t-crtfm index 1d3b8ecfc35..61e62696bfd 100644 --- a/libgcc/config/t-crtfm +++ b/libgcc/config/t-crtfm @@ -1,5 +1,2 @@ -# -frandom-seed is necessary to avoid bootstrap comparison failures due to -# changing mangled names of the constructor on Tru64 Unix, but harmless -# otherwise. crtfastmath.o: $(srcdir)/config/$(cpu_type)/crtfastmath.c - $(gcc_compile) -frandom-seed=gcc-crtfastmath -c $< + $(gcc_compile) -c $< diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h index 6c9af1a4765..67d79ff3e7c 100644 --- a/libgcc/gthr-posix.h +++ b/libgcc/gthr-posix.h @@ -1,7 +1,7 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ /* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -33,11 +33,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define __GTHREADS 1 #define __GTHREADS_CXX0X 1 -/* Some implementations of <pthread.h> require this to be defined. */ -#if !defined(_REENTRANT) && defined(__osf__) -#define _REENTRANT 1 -#endif - #include <pthread.h> #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ @@ -105,39 +100,6 @@ typedef struct timespec __gthread_time_t; /* Typically, __gthrw_foo is a weak reference to symbol foo. */ #define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name) -/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to - map a subset of the POSIX pthread API to mangled versions of their - names. */ -#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_) -#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name) -__gthrw3(pthread_once) -__gthrw3(pthread_getspecific) -__gthrw3(pthread_setspecific) - -__gthrw3(pthread_create) -__gthrw3(pthread_join) -__gthrw3(pthread_detach) -__gthrw3(pthread_equal) -__gthrw3(pthread_self) -__gthrw3(pthread_cancel) -__gthrw3(sched_yield) - -__gthrw3(pthread_mutex_lock) -__gthrw3(pthread_mutex_trylock) -#if _GTHREAD_USE_MUTEX_TIMEDLOCK -__gthrw3(pthread_mutex_timedlock) -#endif -__gthrw3(pthread_mutex_unlock) -__gthrw3(pthread_mutex_init) -__gthrw3(pthread_mutex_destroy) - -__gthrw3(pthread_cond_init) -__gthrw3(pthread_cond_broadcast) -__gthrw3(pthread_cond_signal) -__gthrw3(pthread_cond_wait) -__gthrw3(pthread_cond_timedwait) -__gthrw3(pthread_cond_destroy) -#else __gthrw(pthread_once) __gthrw(pthread_getspecific) __gthrw(pthread_setspecific) @@ -167,7 +129,6 @@ __gthrw(pthread_cond_signal) __gthrw(pthread_cond_wait) __gthrw(pthread_cond_timedwait) __gthrw(pthread_cond_destroy) -#endif __gthrw(pthread_key_create) __gthrw(pthread_key_delete) @@ -178,11 +139,7 @@ __gthrw(pthread_mutexattr_destroy) #if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK) /* Objective-C. */ -#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_) -__gthrw3(pthread_exit) -#else __gthrw(pthread_exit) -#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */ #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING __gthrw(sched_get_priority_max) diff --git a/libgcc/mkmap-flat.awk b/libgcc/mkmap-flat.awk index ec5e1fdf513..234de223c64 100644 --- a/libgcc/mkmap-flat.awk +++ b/libgcc/mkmap-flat.awk @@ -1,5 +1,6 @@ # Generate a flat list of symbols to export. -# Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2009, 2011, 2012 +# Free Software Foundation, Inc. # Contributed by Richard Henderson <rth@cygnus.com> # # This file is part of GCC. @@ -20,8 +21,6 @@ # Options: # "-v leading_underscore=1" : Symbols in map need leading underscore. -# "-v osf_export=1" : Create -input file for Tru64 UNIX linker -# instead of map file. # "-v pe_dll=1" : Create .DEF file for Windows PECOFF # DLL link instead of map file. @@ -100,10 +99,6 @@ END { } for (sym in export) - if (def[sym] || (pe_dll && def["_" sym])) { - if (!osf_export) - print sym; - else - print "-exported_symbol " sym; - } + if (def[sym] || (pe_dll && def["_" sym])) + print sym; } diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index a5094358aac..ef81d3104c5 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,11 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.ac: Remove Tru64 reference. + * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* + handling. + * configure: Regenerate. + * intrinsics/c99_functions.c [__osf__]: Remove. + 2012-03-10 Tobias Burnus <burnus@net-b.de> * libgfortran.h (descriptor_dimension, GFC_DIMENSION_LBOUND, diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 index 645b248deb4..d4acf76ba42 100644 --- a/libgfortran/acinclude.m4 +++ b/libgfortran/acinclude.m4 @@ -99,7 +99,7 @@ void foo (void); [Define to 1 if the target supports #pragma weak]) fi case "$host" in - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | alpha*-dec-osf* ) + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) AC_DEFINE(GTHREAD_USE_WEAK, 0, [Define to 0 if the target shouldn't use #pragma weak]) ;; diff --git a/libgfortran/configure b/libgfortran/configure index 0498238c739..ff524eef4ee 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25196,7 +25196,7 @@ $as_echo "#define HAVE_FEENABLEEXCEPT 1" >>confdefs.h fi -# At least for glibc and Tru64, clock_gettime is in librt. But don't +# At least for glibc, clock_gettime is in librt. But don't # pull that in if it still doesn't give us the function we want. This # test is copied from libgomp, and modified to not link in -lrt as # libgfortran calls clock_gettime via a weak reference if it's found @@ -25564,7 +25564,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h fi case "$host" in - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | alpha*-dec-osf* ) + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index af987bd2916..7011a937bba 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -484,7 +484,7 @@ LIBGFOR_CHECK_FLOAT128 # Check for GNU libc feenableexcept AC_CHECK_LIB([m],[feenableexcept],[have_feenableexcept=yes AC_DEFINE([HAVE_FEENABLEEXCEPT],[1],[libm includes feenableexcept])]) -# At least for glibc and Tru64, clock_gettime is in librt. But don't +# At least for glibc, clock_gettime is in librt. But don't # pull that in if it still doesn't give us the function we want. This # test is copied from libgomp, and modified to not link in -lrt as # libgfortran calls clock_gettime via a weak reference if it's found diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c index a95f09ac01d..b65723c9baa 100644 --- a/libgfortran/intrinsics/c99_functions.c +++ b/libgfortran/intrinsics/c99_functions.c @@ -1,5 +1,5 @@ /* Implementation of various C99 functions - Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2004, 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -41,19 +41,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define cabsl __gfc_cabsl #endif -/* Tru64's <math.h> declares a non-C99 compliant implementation of cabs, - which takes two floating point arguments instead of a single complex. - To work around this we redirect cabs{,f,l} calls to __gfc_cabs{,f,l}. */ - -#ifdef __osf__ -#undef HAVE_CABS -#undef HAVE_CABSF -#undef HAVE_CABSL -#define cabs __gfc_cabs -#define cabsf __gfc_cabsf -#define cabsl __gfc_cabsl -#endif - /* On a C99 system "I" (with I*I = -1) should be defined in complex.h; if not, we define a fallback version here. */ #ifndef I diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 44fabda7b36..315e43482a2 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,10 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.tgt (alpha*-dec-osf*): Remove. + + * config/osf/sem.h: Remove. + * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. + 2012-02-29 Eric Botcazou <ebotcazou@adacore.com> * config/linux/sparc/futex.h (cpu_relax): Read from CC register. diff --git a/libgomp/config/osf/sem.h b/libgomp/config/osf/sem.h deleted file mode 100644 index 7dcb542d55c..00000000000 --- a/libgomp/config/osf/sem.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. - - This file is part of the GNU OpenMP Library (libgomp). - - Libgomp 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 3, or (at your option) - any later version. - - Libgomp 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -/* This is a variant of config/posix/sem.h for Tru64 UNIX. The librt - sem_init implementation assumes int (4-byte) alignment for sem_t, while - the type only requires short (2-byte) alignment. This mismatch causes - lots of unaligned access warnings from the kernel, so enforce that - alignment. */ - -#ifndef GOMP_SEM_H -#define GOMP_SEM_H 1 - -#include <semaphore.h> - -typedef sem_t gomp_sem_t __attribute__((aligned (__alignof__ (int)))); - -static inline void gomp_sem_init (gomp_sem_t *sem, int value) -{ - sem_init (sem, 0, value); -} - -extern void gomp_sem_wait (gomp_sem_t *sem); - -static inline void gomp_sem_post (gomp_sem_t *sem) -{ - sem_post (sem); -} - -static inline void gomp_sem_destroy (gomp_sem_t *sem) -{ - sem_destroy (sem); -} -#endif /* GOMP_SEM_H */ diff --git a/libgomp/config/posix/lock.c b/libgomp/config/posix/lock.c index 8cd715e645f..258af015f15 100644 --- a/libgomp/config/posix/lock.c +++ b/libgomp/config/posix/lock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2008, 2009, 2012 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU OpenMP Library (libgomp). @@ -30,12 +30,8 @@ to do better and streamline the locking as well as reduce the size of the types exported. */ -/* We need Unix98 extensions to get recursive locks. On Tru64 UNIX V4.0F, - the declarations are available without _XOPEN_SOURCE, which actually - breaks compilation. */ -#ifndef __osf__ +/* We need Unix98 extensions to get recursive locks. */ #define _XOPEN_SOURCE 500 -#endif #include "libgomp.h" diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index 210dd5da348..6fd55a232dc 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -133,11 +133,6 @@ case "${target}" in XLDFLAGS="${XLDFLAGS} -lpthread" ;; - alpha*-dec-osf*) - # Use Tru64 UNIX-specific sem.h version. - config_path="osf posix" - ;; - mips-sgi-irix6*) # Need to link with -lpthread so libgomp.so is self-contained. XLDFLAGS="${XLDFLAGS} -lpthread" diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 9a3e484fc8a..5df1380f606 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,8 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.tgt (*-*-osf*): Remove. + * configure: Regenerate. + 2012-03-05 Torvald Riegel <triegel@redhat.com> * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute diff --git a/libitm/configure b/libitm/configure index 47c7b0cd484..76d11c42dd7 100644 --- a/libitm/configure +++ b/libitm/configure @@ -17332,7 +17332,6 @@ else if test "$cross_compiling" = yes; then : case "${host}" in - alpha*-dec-osf*) ac_cv_have_elf_style_weakref=no ;; *-apple-darwin[89]*) ac_cv_have_elf_style_weakref=no ;; *) ac_cv_have_elf_style_weakref=yes;; esac diff --git a/libitm/configure.tgt b/libitm/configure.tgt index b68c86b05f4..e60e7449e6a 100644 --- a/libitm/configure.tgt +++ b/libitm/configure.tgt @@ -130,7 +130,7 @@ case "${target}" in *-*-gnu* | *-*-k*bsd*-gnu \ | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \ - | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \ + | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-hpux11* \ | *-*-darwin* | *-*-aix*) # POSIX system. The OS is supported. ;; diff --git a/libjava/ChangeLog b/libjava/ChangeLog index aa456129c72..989d7704a3a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,37 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.ac (alpha*-dec-osf*): Remove. + * configure: Regenerate. + * configure.host (alpha*-dec-osf*): Remove. + + * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use + IPV6_MULTICAST_IF unconditionally. + * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): + Likewise. + * gnu/java/net/natPlainSocketImplPosix.cc + (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of + _Jv_accept. + * include/posix-signal.h [__alpha__ && __osf__]: Remove. + * include/posix.h (_POSIX_PII_SOCKET): Don't define. + (_Jv_accept): Remove. + + * java/io/File.java (File._access): Rename to access. + Change callers. + (File._stat): Likewise. + * java/io/File.h: Regenerate. + * classpath/lib/java/io/File.class: Regenerate. + * java/io/natFilePosix.cc (java::io::File::_access): Rename to + access. + (java::io::File::_stat): Rename to stat. + * java/io/natFileWin32.cc: Likewise. + + * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): + Remove alpha*-dec-osf* handling. + * testsuite/libjava.jvmti/jvmti-interp.exp + (gcj_jni_compile_c_to_so): Likewise. + * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): + Likewise. + 2012-02-23 Patrick Marlier <patrick.marlier@gmail.com> Jack Howarth <howarth@bromo.med.uc.edu> diff --git a/libjava/classpath/lib/java/io/File.class b/libjava/classpath/lib/java/io/File.class Binary files differindex 8bcfe7989f9..3481ccff47f 100644 --- a/libjava/classpath/lib/java/io/File.class +++ b/libjava/classpath/lib/java/io/File.class diff --git a/libjava/configure b/libjava/configure index 8ea1aec5ee0..2d80c8067f6 100755 --- a/libjava/configure +++ b/libjava/configure @@ -20744,7 +20744,7 @@ case "$THREADS" in THREADLDFLAGS=-pthread THREADSPEC=-lpthread ;; - alpha*-dec-osf* | hppa*-hp-hpux*) + hppa*-hp-hpux*) THREADCXXFLAGS=-pthread # boehm-gc needs some functions from librt, so link that too. THREADLIBS='-lpthread -lrt' @@ -24220,7 +24220,7 @@ SYSDEP_SOURCES= SIGNAL_HANDLER_AUX= case "${host}" in - alpha*-dec-osf* | mips-sgi-irix* | *-*-solaris2*) + mips-sgi-irix* | *-*-solaris2*) SIGNAL_HANDLER=include/posix-signal.h ;; i?86-*-linux*) diff --git a/libjava/configure.ac b/libjava/configure.ac index ce428cac257..434f92364dd 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1088,7 +1088,7 @@ case "$THREADS" in THREADLDFLAGS=-pthread THREADSPEC=-lpthread ;; - alpha*-dec-osf* | hppa*-hp-hpux*) + hppa*-hp-hpux*) THREADCXXFLAGS=-pthread # boehm-gc needs some functions from librt, so link that too. THREADLIBS='-lpthread -lrt' @@ -1732,7 +1732,7 @@ SYSDEP_SOURCES= SIGNAL_HANDLER_AUX= case "${host}" in - alpha*-dec-osf* | mips-sgi-irix* | *-*-solaris2*) + mips-sgi-irix* | *-*-solaris2*) SIGNAL_HANDLER=include/posix-signal.h ;; i?86-*-linux*) diff --git a/libjava/configure.host b/libjava/configure.host index 105785e5434..8ce7044a574 100644 --- a/libjava/configure.host +++ b/libjava/configure.host @@ -277,9 +277,6 @@ EOF rm -f conftest conftest.c fi ;; - alpha*-dec-osf*) - can_unwind_signal=yes - ;; i[34567]86*-kfreebsd*-gnu | x86_64*-kfreebsd*-gnu) libgcj_ld_symbolic='-Wl,-Bsymbolic' slow_pthread_self= diff --git a/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc index 7cbf011ab50..65a42f95d42 100644 --- a/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc +++ b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005, 2006 Free Software Foundation +/* Copyright (C) 2003, 2005, 2006, 2012 Free Software Foundation This file is part of libgcj. @@ -660,8 +660,6 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, len = sizeof (struct in_addr); ptr = (const char *) &u.addr; } -// Tru64 UNIX V5.0 has struct sockaddr_in6, but no IPV6_MULTICAST_IF -#if defined (HAVE_INET6) && defined (IPV6_MULTICAST_IF) else if (len == 16) { level = IPPROTO_IPV6; @@ -670,7 +668,6 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, len = sizeof (struct in6_addr); ptr = (const char *) &u.addr6; } -#endif else throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); diff --git a/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc index e410196653d..8d83720fffe 100644 --- a/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc +++ b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2006 Free Software Foundation +/* Copyright (C) 2003, 2006, 2012 Free Software Foundation This file is part of libgcj. @@ -545,8 +545,6 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, len = sizeof (struct in_addr); ptr = (const char *) &u.addr; } -// Tru64 UNIX V5.0 has struct sockaddr_in6, but no IPV6_MULTICAST_IF -#if defined (HAVE_INET6) && defined (IPV6_MULTICAST_IF) else if (len == 16) { level = IPPROTO_IPV6; @@ -555,7 +553,6 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, len = sizeof (struct in6_addr); ptr = (const char *) &u.addr6; } -#endif else throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); diff --git a/libjava/gnu/java/net/natPlainSocketImplPosix.cc b/libjava/gnu/java/net/natPlainSocketImplPosix.cc index e21013bf72e..dabf6e65fc0 100644 --- a/libjava/gnu/java/net/natPlainSocketImplPosix.cc +++ b/libjava/gnu/java/net/natPlainSocketImplPosix.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation +/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2012 Free Software Foundation This file is part of libgcj. @@ -277,7 +277,7 @@ gnu::java::net::PlainSocketImpl::accept (gnu::java::net::PlainSocketImpl *s) JvNewStringUTF("Accept timed out")); } - new_socket = _Jv_accept (native_fd, (sockaddr*) &u, &addrlen); + new_socket = ::accept (native_fd, (sockaddr*) &u, &addrlen); if (new_socket < 0) goto error; diff --git a/libjava/include/posix-signal.h b/libjava/include/posix-signal.h index 726fde3a66e..7be37f59b1f 100644 --- a/libjava/include/posix-signal.h +++ b/libjava/include/posix-signal.h @@ -1,6 +1,6 @@ // posix-signal.h - Catch runtime signals and turn them into exceptions. -/* Copyright (C) 1998, 1999, 2000, 2009, 2011 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2009, 2011, 2012 Free Software Foundation This file is part of libgcj. @@ -20,8 +20,7 @@ details. */ SA_SIGINFO being set or fail if so. Cf. gcc/ada/init.c (__gnat_install_handler) for details. */ -#if (defined __alpha__ && defined __osf__) \ - || (defined __sun__ && defined __svr4__) +#if defined __sun__ && defined __svr4__ #define SA_FLAGS SA_NODEFER | SA_SIGINFO #elif defined __sgi__ #define SA_FLAGS SA_NODEFER diff --git a/libjava/include/posix.h b/libjava/include/posix.h index c49da05eb11..6bd560c5a23 100644 --- a/libjava/include/posix.h +++ b/libjava/include/posix.h @@ -1,6 +1,6 @@ // posix.h -- Helper functions for POSIX-flavored OSs. -/* Copyright (C) 2000, 2002, 2003, 2006, 2010 Free Software Foundation +/* Copyright (C) 2000, 2002, 2003, 2006, 2010, 2012 Free Software Foundation This file is part of libgcj. @@ -11,11 +11,6 @@ details. */ #ifndef __JV_POSIX_H__ #define __JV_POSIX_H__ -/* Required on Tru64 UNIX V4/V5 so <sys/socket.h> defines prototypes of - socket functions with socklen_t instead of size_t. This must be defined - early so <standards.h> defines the correct version of __PIIX. */ -#define _POSIX_PII_SOCKET - #include <time.h> #include <sys/types.h> @@ -155,15 +150,6 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen) #undef bind -// Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET -inline int -_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) -{ - return ::accept (fd, addr, addrlen); -} - -#undef accept - inline int _Jv_listen (int fd, int backlog) { diff --git a/libjava/java/io/File.h b/libjava/java/io/File.h index b53f6ab7d02..f1365361bce 100644 --- a/libjava/java/io/File.h +++ b/libjava/java/io/File.h @@ -25,8 +25,8 @@ class java::io::File : public ::java::lang::Object { jlong attr(jint); - jboolean _access(jint); - jboolean _stat(jint); + jboolean access(jint); + jboolean stat(jint); static void init_native(); public: virtual jboolean canRead(); diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index 0c4fb6932f5..ff008e0643d 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -1,5 +1,5 @@ /* File.java -- Class representing a file on disk - Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2012 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -79,11 +79,8 @@ public class File implements Serializable, Comparable<File> private final static int LENGTH = 1; private final native long attr (int query); - // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name - // `_stat' instead. We do the same thing for `_access' just in - // case. - private final native boolean _access (int query); - private final native boolean _stat (int query); + private final native boolean access (int query); + private final native boolean stat (int query); /** * This is the path separator string for the current host. This field @@ -161,7 +158,7 @@ public class File implements Serializable, Comparable<File> public boolean canRead() { checkRead(); - return _access (READ); + return access (READ); } /** @@ -181,7 +178,7 @@ public class File implements Serializable, Comparable<File> public boolean canWrite() { checkWrite(); - return _access (WRITE); + return access (WRITE); } /** @@ -202,7 +199,7 @@ public class File implements Serializable, Comparable<File> if (!exists()) return false; checkExec(); - return _access (EXEC); + return access (EXEC); } private native boolean performCreate() throws IOException; @@ -288,7 +285,7 @@ public class File implements Serializable, Comparable<File> */ private boolean internalExists() { - return _access (EXISTS); + return access (EXISTS); } /** @@ -725,7 +722,7 @@ public class File implements Serializable, Comparable<File> */ private boolean internalIsDirectory() { - return _stat (DIRECTORY); + return stat (DIRECTORY); } /** @@ -757,7 +754,7 @@ public class File implements Serializable, Comparable<File> public boolean isFile() { checkRead(); - return _stat (ISFILE); + return stat (ISFILE); } /** @@ -774,7 +771,7 @@ public class File implements Serializable, Comparable<File> public boolean isHidden() { checkRead(); - return _stat (ISHIDDEN); + return stat (ISHIDDEN); } /** diff --git a/libjava/java/io/natFilePosix.cc b/libjava/java/io/natFilePosix.cc index 5b6ec8458ac..2c255beacee 100644 --- a/libjava/java/io/natFilePosix.cc +++ b/libjava/java/io/natFilePosix.cc @@ -1,6 +1,6 @@ // natFile.cc - Native part of File class for POSIX. -/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008 +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008, 2012 Free Software Foundation This file is part of libgcj. @@ -38,7 +38,7 @@ details. */ #include <java/lang/System.h> jboolean -java::io::File::_access (jint query) +java::io::File::access (jint query) { char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1); jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); @@ -62,7 +62,7 @@ java::io::File::_access (jint query) } jboolean -java::io::File::_stat (jint query) +java::io::File::stat (jint query) { if (query == ISHIDDEN) return getName()->charAt(0) == '.'; diff --git a/libjava/java/io/natFileWin32.cc b/libjava/java/io/natFileWin32.cc index 316977b08a9..a8e88789222 100644 --- a/libjava/java/io/natFileWin32.cc +++ b/libjava/java/io/natFileWin32.cc @@ -1,6 +1,6 @@ // natFileWin32.cc - Native part of File class for Win32. -/* Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2002, 2003, 2012 Free Software Foundation, Inc. This file is part of libgcj. @@ -38,7 +38,7 @@ details. */ #define WIN32_EPOCH_MILLIS 11644473600000LL jboolean -java::io::File::_access (jint query) +java::io::File::access (jint query) { JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); if (!canon) @@ -63,7 +63,7 @@ java::io::File::_access (jint query) } jboolean -java::io::File::_stat (jint query) +java::io::File::stat (jint query) { JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); if (!canon) diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index c84d86f2f2a..ebdee1b44c9 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -280,11 +280,6 @@ proc gcj_jni_get_cxxflags_invocation {} { lappend cxxflags "-shared-libgcc" } - # Tru64 UNIX needs -liconv linked explicitly since gcc does the linking. - if { [istarget "alpha*-dec-osf*"] } { - lappend cxxflags $libiconv - } - return $cxxflags } diff --git a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp index fd660f35164..62c82e92afc 100644 --- a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp +++ b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp @@ -37,10 +37,6 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { if { [istarget "arm*"] } { lappend options "additional_flags=-Wno-abi" } - # Tru64 UNIX requires <pthread.h> to be compiled with -pthread. - if { [istarget "alpha*-dec-osf*"] } { - lappend options "additional_flags=-pthread" - } set filename [file tail $file] set name [file rootname $filename] diff --git a/libjava/testsuite/libjava.jvmti/jvmti.exp b/libjava/testsuite/libjava.jvmti/jvmti.exp index 2d939852e5e..571952e807c 100644 --- a/libjava/testsuite/libjava.jvmti/jvmti.exp +++ b/libjava/testsuite/libjava.jvmti/jvmti.exp @@ -20,10 +20,6 @@ proc gcj_jvmti_compile_cxx_to_o {file {options {}}} { if { [istarget "arm*"] } { lappend options "additional_flags=-Wno-abi" } - # Tru64 UNIX requires <pthread.h> to be compiled with -pthread. - if { [istarget "alpha*-dec-osf*"] } { - lappend options "additional_flags=-pthread" - } set x [libjava_prune_warnings \ [target_compile $file $oname object $options]] diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 3999b439b9d..704981d9c13 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,10 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. + * configure: Regenerate. + + * thr.c (_XOPEN_SOURCE): Define unconditionally. + 2011-11-21 Andreas Tobler <andreast@fgznet.ch> * configure: Regenerate. diff --git a/libobjc/configure b/libobjc/configure index 8c07356af0c..2807d7394f9 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -2329,13 +2329,6 @@ if test "${enable_objc_gc+set}" = set; then : OBJC_GCFLAGS='-DOBJC_WITH_GC=1' OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la' OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include' - case "${host}" in - alpha*-dec-osf*) - # boehm-gc headers include <pthread.h>, which needs to be compiled - # with -pthread on Tru64 UNIX. - OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread" - ;; - esac ;; esac else @@ -10594,7 +10587,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10597 "configure" +#line 10590 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10700,7 +10693,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10703 "configure" +#line 10696 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11471,7 +11464,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 11474 "configure" +#line 11467 "configure" @interface Frob @end @implementation Frob diff --git a/libobjc/configure.ac b/libobjc/configure.ac index 52599e6019e..42db163e0ae 100644 --- a/libobjc/configure.ac +++ b/libobjc/configure.ac @@ -1,6 +1,6 @@ # Process this file with autoconf to produce a configure script. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004 -# 2005, 2006, 2009, 2011 Free Software Foundation, Inc. +# 2005, 2006, 2009, 2011, 2012 Free Software Foundation, Inc. # Originally contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GCC. @@ -71,13 +71,6 @@ AC_ARG_ENABLE(objc-gc, OBJC_GCFLAGS='-DOBJC_WITH_GC=1' OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la' OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include' - case "${host}" in - alpha*-dec-osf*) - # boehm-gc headers include <pthread.h>, which needs to be compiled - # with -pthread on Tru64 UNIX. - OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread" - ;; - esac ;; esac], [OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES='']) diff --git a/libobjc/thr.c b/libobjc/thr.c index 095b9403a47..e8a8f5e84c3 100644 --- a/libobjc/thr.c +++ b/libobjc/thr.c @@ -1,5 +1,5 @@ /* GNU Objective C Runtime Thread Interface - Copyright (C) 1996, 1997, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2009, 2010, 2012 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) This file is part of GCC. @@ -27,11 +27,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define _LIBOBJC /* The line below is needed for declarations of functions such as pthread_mutexattr_settype, without which gthr-posix.h may fail to - compile within libobjc. Unfortunately, this breaks compilation on - Tru64 UNIX V4.0F, so disable it there. */ -#ifndef __osf__ + compile within libobjc. */ #define _XOPEN_SOURCE 500 -#endif #include "config.h" #include "tconfig.h" #include "coretypes.h" diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 78d23a5a9fe..76da6880be7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,257 @@ +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.host: Remove osf* handling. + * config/os/osf: Remove. + * doc/xml/manual/using.xml: Remove OSF reference. + + * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* + handling. + * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: + Likewise. + * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: + Likewise. + * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. + * testsuite/21_strings/basic_string/pthread4.cc: Likewise. + * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. + * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. + * testsuite/23_containers/list/pthread1.cc: Likewise. + * testsuite/23_containers/list/pthread5.cc: Likewise. + * testsuite/23_containers/map/pthread6.cc: Likewise. + * testsuite/23_containers/vector/debug/multithreaded_swap.cc: + Likewise. + * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. + * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. + * testsuite/30_threads/async/42819.cc: Likewise. + + * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: + Likewise. + * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: + Likewise. + * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. + * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: + Likewise. + * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. + 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/52562 diff --git a/libstdc++-v3/config/os/osf/ctype_base.h b/libstdc++-v3/config/os/osf/ctype_base.h deleted file mode 100644 index 72aa6f2ccb0..00000000000 --- a/libstdc++-v3/config/os/osf/ctype_base.h +++ /dev/null @@ -1,59 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2003, 2009, 2010 -// 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 3, 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. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -// -// ISO C++ 14882: 22.1 Locales -// - -// Default information, may not be appropriate for specific host. - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - /// @brief Base class for ctype. - struct ctype_base - { - // Non-standard typedefs. - typedef const int* __to_type; - - // NB: Offsets into ctype<char>::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. - typedef unsigned int mask; - static const mask upper = 1 << 0; - static const mask lower = 1 << 1; - static const mask alpha = 1 << 2; - static const mask digit = 1 << 3; - static const mask xdigit = 1 << 4; - static const mask space = 1 << 5; - static const mask print = 1 << 6; - static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct - static const mask cntrl = 1 << 8; - static const mask punct = 1 << 9; - static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit - }; - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace diff --git a/libstdc++-v3/config/os/osf/ctype_configure_char.cc b/libstdc++-v3/config/os/osf/ctype_configure_char.cc deleted file mode 100644 index 0daedf54356..00000000000 --- a/libstdc++-v3/config/os/osf/ctype_configure_char.cc +++ /dev/null @@ -1,99 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2011 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 3, 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. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -/** @file ctype_configure_char.cc */ - -// -// ISO C++ 14882: 22.1 Locales -// - -#include <locale> -#include <cstdlib> -#include <cstring> - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype<char>::classic_table() throw() - { return 0; } - - ctype<char>::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype<char>::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype<char>::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype<char>::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype<char>::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace diff --git a/libstdc++-v3/config/os/osf/ctype_inline.h b/libstdc++-v3/config/os/osf/ctype_inline.h deleted file mode 100644 index ae54f2968be..00000000000 --- a/libstdc++-v3/config/os/osf/ctype_inline.h +++ /dev/null @@ -1,168 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2003, 2009, 2010 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 3, 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. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -/** @file bits/ctype_inline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) -// functions go in ctype.cc - -// The following definitions are portable, but insanely slow. If one -// cares at all about performance, then specialized ctype -// functionality should be added for the native os in question: see -// the config/os/bits/ctype_*.h files. - -// Constructing a synthetic "C" table should be seriously considered... - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - bool - ctype<char>:: - is(mask __m, char __c) const - { - if (_M_table) - return _M_table[static_cast<unsigned char>(__c)] & __m; - else - { - bool __ret = false; - const size_t __bitmasksize = 15; - size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 - for (; __bitcur <= __bitmasksize; ++__bitcur) - { - const mask __bit = static_cast<mask>(1 << __bitcur); - if (__m & __bit) - { - bool __testis; - switch (__bit) - { - case space: - __testis = isspace(__c); - break; - case print: - __testis = isprint(__c); - break; - case cntrl: - __testis = iscntrl(__c); - break; - case upper: - __testis = isupper(__c); - break; - case lower: - __testis = islower(__c); - break; - case alpha: - __testis = isalpha(__c); - break; - case digit: - __testis = isdigit(__c); - break; - case punct: - __testis = ispunct(__c); - break; - case xdigit: - __testis = isxdigit(__c); - break; - case alnum: - __testis = isalnum(__c); - break; - case graph: - __testis = isgraph(__c); - break; - default: - __testis = false; - break; - } - __ret |= __testis; - } - } - return __ret; - } - } - - const char* - ctype<char>:: - is(const char* __low, const char* __high, mask* __vec) const - { - if (_M_table) - while (__low < __high) - *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; - else - { - // Highest bitmask in ctype_base == 10. - const size_t __bitmasksize = 15; - for (;__low < __high; ++__vec, ++__low) - { - mask __m = 0; - // Lowest bitmask in ctype_base == 0 - size_t __i = 0; - for (;__i <= __bitmasksize; ++__i) - { - const mask __bit = static_cast<mask>(1 << __i); - if (this->is(__bit, *__low)) - __m |= __bit; - } - *__vec = __m; - } - } - return __high; - } - - const char* - ctype<char>:: - scan_is(mask __m, const char* __low, const char* __high) const - { - if (_M_table) - while (__low < __high - && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) - ++__low; - else - while (__low < __high && !this->is(__m, *__low)) - ++__low; - return __low; - } - - const char* - ctype<char>:: - scan_not(mask __m, const char* __low, const char* __high) const - { - if (_M_table) - while (__low < __high - && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) - ++__low; - else - while (__low < __high && this->is(__m, *__low) != 0) - ++__low; - return __low; - } - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace diff --git a/libstdc++-v3/config/os/osf/error_constants.h b/libstdc++-v3/config/os/osf/error_constants.h deleted file mode 100644 index 88ea56506c2..00000000000 --- a/libstdc++-v3/config/os/osf/error_constants.h +++ /dev/null @@ -1,178 +0,0 @@ -// Specific definitions for generic platforms -*- C++ -*- - -// Copyright (C) 2007, 2008, 2009, 2010 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 3, 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. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -/** @file bits/error_constants.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{system_error} - */ - -#ifndef _GLIBCXX_ERROR_CONSTANTS -#define _GLIBCXX_ERROR_CONSTANTS 1 - -#include <bits/c++config.h> -#include <cerrno> - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - enum class errc - { - address_family_not_supported = EAFNOSUPPORT, - address_in_use = EADDRINUSE, - address_not_available = EADDRNOTAVAIL, - already_connected = EISCONN, - argument_list_too_long = E2BIG, - argument_out_of_domain = EDOM, - bad_address = EFAULT, - bad_file_descriptor = EBADF, - -#ifdef _GLIBCXX_HAVE_EBADMSG - bad_message = EBADMSG, -#endif - - broken_pipe = EPIPE, - connection_aborted = ECONNABORTED, - connection_already_in_progress = EALREADY, - connection_refused = ECONNREFUSED, - connection_reset = ECONNRESET, - cross_device_link = EXDEV, - destination_address_required = EDESTADDRREQ, - device_or_resource_busy = EBUSY, - directory_not_empty = ENOTEMPTY, - executable_format_error = ENOEXEC, - file_exists = EEXIST, - file_too_large = EFBIG, - filename_too_long = ENAMETOOLONG, - function_not_supported = ENOSYS, - host_unreachable = EHOSTUNREACH, - -#ifdef _GLIBCXX_HAVE_EIDRM - identifier_removed = EIDRM, -#endif - - illegal_byte_sequence = EILSEQ, - inappropriate_io_control_operation = ENOTTY, - interrupted = EINTR, - invalid_argument = EINVAL, - invalid_seek = ESPIPE, - io_error = EIO, - is_a_directory = EISDIR, - message_size = EMSGSIZE, - network_down = ENETDOWN, - network_reset = ENETRESET, - network_unreachable = ENETUNREACH, - no_buffer_space = ENOBUFS, - no_child_process = ECHILD, - -#ifdef _GLIBCXX_HAVE_ENOLINK - no_link = ENOLINK, -#endif - - no_lock_available = ENOLCK, - -#ifdef _GLIBCXX_HAVE_ENODATA - no_message_available = ENODATA, -#endif - - no_message = ENOMSG, - no_protocol_option = ENOPROTOOPT, - no_space_on_device = ENOSPC, - -#ifdef _GLIBCXX_HAVE_ENOSR - no_stream_resources = ENOSR, -#endif - - no_such_device_or_address = ENXIO, - no_such_device = ENODEV, - no_such_file_or_directory = ENOENT, - no_such_process = ESRCH, - not_a_directory = ENOTDIR, - not_a_socket = ENOTSOCK, - -#ifdef _GLIBCXX_HAVE_ENOSTR - not_a_stream = ENOSTR, -#endif - - not_connected = ENOTCONN, - not_enough_memory = ENOMEM, - -#ifdef _GLIBCXX_HAVE_ENOTSUP - not_supported = ENOTSUP, -#endif - -#ifdef _GLIBCXX_HAVE_ECANCELED - operation_canceled = ECANCELED, -#endif - - operation_in_progress = EINPROGRESS, - operation_not_permitted = EPERM, - operation_not_supported = EOPNOTSUPP, - operation_would_block = EWOULDBLOCK, - -#ifdef _GLIBCXX_HAVE_EOWNERDEAD - owner_dead = EOWNERDEAD, -#endif - - permission_denied = EACCES, - -#ifdef _GLIBCXX_HAVE_EPROTO - protocol_error = EPROTO, -#endif - - protocol_not_supported = EPROTONOSUPPORT, - read_only_file_system = EROFS, - resource_deadlock_would_occur = EDEADLK, - resource_unavailable_try_again = EAGAIN, - result_out_of_range = ERANGE, - -#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE - state_not_recoverable = ENOTRECOVERABLE, -#endif - -#ifdef _GLIBCXX_HAVE_ETIME - stream_timeout = ETIME, -#endif - -#ifdef _GLIBCXX_HAVE_ETXTBSY - text_file_busy = ETXTBSY, -#endif - - timed_out = ETIMEDOUT, - too_many_files_open_in_system = ENFILE, - too_many_files_open = EMFILE, - too_many_links = EMLINK, - too_many_symbolic_link_levels = ELOOP, - -#ifdef _GLIBCXX_HAVE_EOVERFLOW - value_too_large = EOVERFLOW, -#endif - - wrong_protocol_type = EPROTOTYPE - }; - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace - -#endif diff --git a/libstdc++-v3/config/os/osf/os_defines.h b/libstdc++-v3/config/os/osf/os_defines.h deleted file mode 100644 index 68c278d87bc..00000000000 --- a/libstdc++-v3/config/os/osf/os_defines.h +++ /dev/null @@ -1,41 +0,0 @@ -// Specific definitions for Tru64 UNIX -*- C++ -*- - -// Copyright (C) 2000, 2009, 2010, 2012 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 3, 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. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -/** @file bits/os_defines.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{iosfwd} - */ - -#ifndef _GLIBCXX_OS_DEFINES -#define _GLIBCXX_OS_DEFINES 1 - -// System-specific #define, typedefs, corrections, etc, go here. This -// file will come before all others. - -// Tru64 UNIX requires using pthread_mutex_init()/pthread_cond_init() to -// initialized non-statically allocated mutexes/condvars. -#define _GTHREAD_USE_MUTEX_INIT_FUNC -#define _GTHREAD_USE_COND_INIT_FUNC - -#endif diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index ca4d81957b6..689f19d824a 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -279,13 +279,6 @@ case "${host_os}" in netbsd*) os_include_dir="os/bsd/netbsd" ;; - osf*) - os_include_dir="os/osf" - # libstdc++.so relies on emutls on Tru64 UNIX, which only works with the - # real functions implemented in libpthread.so, not with the dummies in - # libgcc, so always pass -lpthread. - OPT_LDFLAGS="${OPT_LDFLAGS} -lpthread" - ;; qnx6.[12]*) os_include_dir="os/qnx/qnx6.1" c_model=c diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index d2d5e4b2850..89174c5a6c2 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -1267,9 +1267,8 @@ A quick read of the relevant part of the GCC just linking) and link-library additions and/or replacements at link time. The documentation is weak. Here is a quick summary to display how ad hoc this is: On Solaris, both -pthreads and - -threads (with subtly different meanings) are honored. On OSF, - -pthread and -threads (with subtly different meanings) are - honored. On GNU/Linux x86, -pthread is honored. On FreeBSD, + -threads (with subtly different meanings) are honored. + On GNU/Linux x86, -pthread is honored. On FreeBSD, -pthread is honored. Some other ports use other switches. AFAIK, none of this is properly documented anywhere other than in ``gcc -dumpspecs'' (look at lib and cpp entries). diff --git a/libstdc++-v3/testsuite/18_support/pthread_guard.cc b/libstdc++-v3/testsuite/18_support/pthread_guard.cc index 5389316bab0..883b089248d 100644 --- a/libstdc++-v3/testsuite/18_support/pthread_guard.cc +++ b/libstdc++-v3/testsuite/18_support/pthread_guard.cc @@ -1,5 +1,5 @@ // -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2012 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 @@ -16,8 +16,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-darwin* alpha*-*-osf* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-darwin* } } #include <cstdlib> #include <pthread.h> diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc index b215f654aeb..29c23cf3d73 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation +// Copyright (C) 2006, 2007, 2008, 2009, 2012 Free Software Foundation // // 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 @@ -17,8 +17,8 @@ // 20.6.6.2 Template class shared_ptr [util.smartptr.shared] -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread -std=gnu++0x" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread -std=gnu++0x" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads -std=gnu++0x" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc index c1ca796bb19..b8f14922d06 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation +// Copyright (C) 2006, 2007, 2008, 2009, 2012 Free Software Foundation // // 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 @@ -17,8 +17,8 @@ // 20.6.6.2 Template class shared_ptr [util.smartptr.shared] -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc index 12f80c443dc..b3290a633c7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc @@ -1,5 +1,5 @@ // -// Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2007, 2009, 2012 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 @@ -16,8 +16,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <ext/new_allocator.h> diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc index b3dc9b20e7c..f1b3ea95dd9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc @@ -2,7 +2,7 @@ // 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, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -20,8 +20,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <string> diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc index 86b4216d1c3..66c0b0d44bc 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc @@ -1,10 +1,10 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } // { dg-require-namedlocale "en_US" } // { dg-require-namedlocale "fr_FR" } -// Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation +// Copyright (C) 2004, 2005, 2007, 2009, 2010, 2012 Free Software Foundation // // 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 diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc index 40c8c66742b..7097675b549 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc @@ -1,10 +1,10 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } // { dg-require-namedlocale "en_US" } // { dg-require-namedlocale "fr_FR" } -// Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation +// Copyright (C) 2004, 2005, 2007, 2009, 2010, 2012 Free Software Foundation // // 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 diff --git a/libstdc++-v3/testsuite/23_containers/list/pthread1.cc b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc index 00dc817b152..e0700a26b8a 100644 --- a/libstdc++-v3/testsuite/23_containers/list/pthread1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc @@ -1,6 +1,6 @@ // 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -18,8 +18,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } // This multi-threading C++/STL/POSIX code adheres to rules outlined here: diff --git a/libstdc++-v3/testsuite/23_containers/list/pthread5.cc b/libstdc++-v3/testsuite/23_containers/list/pthread5.cc index 4f464372124..85f5763520c 100644 --- a/libstdc++-v3/testsuite/23_containers/list/pthread5.cc +++ b/libstdc++-v3/testsuite/23_containers/list/pthread5.cc @@ -2,7 +2,7 @@ // Adpated from libstdc++/5464 submitted by jjessel@amadeus.net // Jean-Francois JESSEL (Amadeus SAS Development) // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -20,8 +20,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/map/pthread6.cc b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc index 38c20ed647f..1291ea45007 100644 --- a/libstdc++-v3/testsuite/23_containers/map/pthread6.cc +++ b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc @@ -1,7 +1,7 @@ // 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, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -19,8 +19,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <string> diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc index b2a50aa21c8..8cd7f0a6d3e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc @@ -1,11 +1,11 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } // { dg-require-gthreads "" } // { dg-require-debug-mode "" } -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2012 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 diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc index cb683666ccc..5cdb8b702f0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc @@ -1,7 +1,7 @@ // 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, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -19,8 +19,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <fstream> diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc index 5b87d84c022..8bd21a58c56 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc @@ -1,7 +1,7 @@ // 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, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -19,8 +19,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <sstream> diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc index 7b7a409ec02..43665c212f0 100644 --- a/libstdc++-v3/testsuite/30_threads/async/42819.cc +++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc index a8bd399d1bd..b0a9348aa56 100644 --- a/libstdc++-v3/testsuite/30_threads/async/49668.cc +++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc index 1e3616ef375..7033890b36e 100644 --- a/libstdc++-v3/testsuite/30_threads/async/any.cc +++ b/libstdc++-v3/testsuite/30_threads/async/any.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc index 93dc57dce70..0ce92a90dfe 100644 --- a/libstdc++-v3/testsuite/30_threads/async/async.cc +++ b/libstdc++-v3/testsuite/30_threads/async/async.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc index e17b4bc61ab..54ced9cf440 100644 --- a/libstdc++-v3/testsuite/30_threads/async/launch.cc +++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc index 8b519923669..5a1ac244002 100644 --- a/libstdc++-v3/testsuite/30_threads/async/sync.cc +++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/call_once/39909.cc b/libstdc++-v3/testsuite/30_threads/call_once/39909.cc index 3fced50c4bc..c5fe7fa8ca4 100644 --- a/libstdc++-v3/testsuite/30_threads/call_once/39909.cc +++ b/libstdc++-v3/testsuite/30_threads/call_once/39909.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/call_once/49668.cc b/libstdc++-v3/testsuite/30_threads/call_once/49668.cc index 63b15c7f637..30337cf1e83 100644 --- a/libstdc++-v3/testsuite/30_threads/call_once/49668.cc +++ b/libstdc++-v3/testsuite/30_threads/call_once/49668.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc b/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc index 23eb27455a8..b5c07da7c64 100644 --- a/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc +++ b/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc index 1dc23041ac9..a7f4bbbba2d 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc index 1ae7abf0b0f..7194fb87ca1 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc index 08ad213863a..87db514af42 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc index 5b8cb881d30..039b480e776 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc index afc6bb78984..884787ccafa 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc index 3f019da1248..7b12d8f5313 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc index f7322f65a46..27b1e0827d7 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc index 6cecdb9d93d..7a642cc8a93 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc index 49846a7d80a..da9768035f8 100644 --- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc +++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc index af8cce6f65e..165e1d4a1ad 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc index 45c706b311e..0649d785f45 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc index 2ae83b147a3..631f9392526 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc index 91325970fa9..215d2819704 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc index 977b37954dd..8e42918d50f 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc index e1a5a941b26..5e91d7fb8e2 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc index 476bfd95412..57a426e6cba 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc index c588be8b6cd..a880bbb1c40 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/lock/1.cc b/libstdc++-v3/testsuite/30_threads/lock/1.cc index 29406b0377a..45d84b330ce 100644 --- a/libstdc++-v3/testsuite/30_threads/lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/lock/2.cc b/libstdc++-v3/testsuite/30_threads/lock/2.cc index c39e817aac5..8a78889998d 100644 --- a/libstdc++-v3/testsuite/30_threads/lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/lock/3.cc b/libstdc++-v3/testsuite/30_threads/lock/3.cc index 33e39bfa5d7..25c453a9f9c 100644 --- a/libstdc++-v3/testsuite/30_threads/lock/3.cc +++ b/libstdc++-v3/testsuite/30_threads/lock/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/lock/4.cc b/libstdc++-v3/testsuite/30_threads/lock/4.cc index 397c424fabe..8ba18448ca7 100644 --- a/libstdc++-v3/testsuite/30_threads/lock/4.cc +++ b/libstdc++-v3/testsuite/30_threads/lock/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc b/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc index c135e28e48b..463a7e5676f 100644 --- a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc index 5e8ec117a72..a7bb148c4da 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc index a3730c593c3..c80d8e36a6c 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc index bebbd222ae4..66157ad85c0 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc index aefdeff3fba..a2fb9ab8ddf 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc index bf6d5d78aca..5a4a32d1905 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc index e05c236f44f..4607e881092 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc index d6a08f77e2a..a6fd3757305 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc index 1d3c05068bd..57d4945b78d 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc index 5c217dff994..4516e57ba80 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc index d7fefe7548f..1c678a8e711 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc index fd1daf881a3..a3fe4e799f7 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc index 33cec40d615..1d0b79b7004 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc index f16af2d33b1..12ade1de318 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc index 961a9cef700..9f4a7812ca3 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc index ecbf2cf7753..4ecd0ff699a 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc index 79d4c1f6417..8cd84990bf6 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc index ffcca11981d..b1e9e4758c3 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc index f6b676ae74f..1082082dbae 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc index fc780339b3e..6fcdd176160 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc index 9fc2bdb710d..cdc18f747d1 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc index d94f810eb9a..ce6e4b1377d 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc index d4866a4d981..78e3cfd3946 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc index ed679434798..06fc9f0ba01 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc index 19d66c3b3c7..ef2608ed74c 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc index 9c016a9fb04..1babdab5794 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc index df251bdfa3e..c9adef5cc59 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc index 1a22c74c8a4..f2c4a43797e 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc index c704b5a646d..de5d4713d62 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc index 5ea26958878..980a0a15371 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc index 165d252ed8e..7a2a8e26e9e 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc index 59882bfbbc7..3cca2e235d3 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc index 0b2b99683bb..87691c77d52 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc index 8fd599c9712..a10d4fba6d1 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc index ab128007646..dcdda73c9d9 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc index 981343ebc93..4383e3c56ff 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc index 7dbf079d95a..03c8092faaa 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc index 268d162b3ac..6ae175695d3 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc index 93a0026643f..a4f6d0ceb1f 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc index 29211d93ed7..733f8faba56 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc index 1855495a440..0bde7beeb92 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc index a1c4447e5ca..ca17b7162f6 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc index 993d2149185..eebaaf18183 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc index 5fa4a48ae7c..7dd337865f8 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc index f1dc3b535a5..0506af284c2 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc index 41dcecda583..c6366886ca5 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc index 1c8f1063c07..2aeb322c2f1 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc index 6663b92a565..44fc029b674 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc index 0518a2b6a70..3998bf8daca 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc index 4872886a63f..415ad3276a6 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc index 1937a6e6ea6..c563961e301 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc index 55fd76533e3..2487407300e 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc index 16945d49b71..be598d03faf 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc index 8e57e801196..4b5cccbd738 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc index 9cd30638f0f..70ba42ac344 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options "-std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options "-std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options "-std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options "-std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc index 378dc14c4d1..8f5916d18b4 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc index 239af231688..e70b4e08d1c 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc index 06634d83ed2..9b258e47a77 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc index 8e57e801196..4b5cccbd738 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc index f7c37419133..ca4b4a39535 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc index 48a7279acbf..732f357ca7d 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc index d08dd697df1..5006f7ade93 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc index ba3f00f3986..6497b65f3b9 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc index c49cafb2966..2b38a36801c 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc index 0077fed64e1..7f819255081 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc index 3cbb898960b..f5a23f5d634 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc index 6e445c2d0ff..460a369a80f 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc index 2c4ec1d0095..8ddb0f41aa3 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc index c6fcb931508..62b04c18e99 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/1.cc b/libstdc++-v3/testsuite/30_threads/this_thread/1.cc index 2ba099302a3..06da152f695 100644 --- a/libstdc++-v3/testsuite/30_threads/this_thread/1.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/2.cc b/libstdc++-v3/testsuite/30_threads/this_thread/2.cc index 49aa9c01811..e8cd665625b 100644 --- a/libstdc++-v3/testsuite/30_threads/this_thread/2.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/3.cc b/libstdc++-v3/testsuite/30_threads/this_thread/3.cc index 3a3a025ed83..b96bbdd5d41 100644 --- a/libstdc++-v3/testsuite/30_threads/this_thread/3.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/4.cc b/libstdc++-v3/testsuite/30_threads/this_thread/4.cc index f015986c78d..e87afab4cf7 100644 --- a/libstdc++-v3/testsuite/30_threads/this_thread/4.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc index 04c453a1c70..95dc6ae454f 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc index db8f2893319..8d0be65a088 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc index 0f85b4018c6..af3b5c98445 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc index 54ef5164446..a78c4d77c79 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc index 7f0fdf11967..f6d6bf8d13f 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc index a99a386cbca..c9785209b78 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc index e0b15f7cb19..f9ba8caedf5 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc index c75114db958..aafb6d8435f 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc index cd0cc659db0..1a3b9f6d131 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc index 7877f05d4d0..8f8e9176deb 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc index 1d74e2074b7..c18c09fb40f 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/1.cc b/libstdc++-v3/testsuite/30_threads/thread/members/1.cc index a6a9805033d..ba1a685b9c2 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/1.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/2.cc b/libstdc++-v3/testsuite/30_threads/thread/members/2.cc index bd35fff4e1b..d01cc6cbd11 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/2.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/3.cc b/libstdc++-v3/testsuite/30_threads/thread/members/3.cc index e71ea7e33fb..818db130632 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/3.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/4.cc b/libstdc++-v3/testsuite/30_threads/thread/members/4.cc index 3ef570d8244..53721dda9d2 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/4.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/5.cc b/libstdc++-v3/testsuite/30_threads/thread/members/5.cc index 57ad3aa589d..cddb4027414 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/5.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/5.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc b/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc index 345b9852e38..94188453786 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc index 19f97f107cd..8d37a3518b7 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc index 072d1d2c5aa..f538bedc428 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc index 3af01f1fc8d..e4d92a9c63d 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc index a93e8edf733..530f4744a96 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc index 0ecbe240b82..c0f7dbc8b33 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc index 84a1cc6a7e8..a524c2f1348 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc index 9ea019d7b8e..b1035a02131 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc index a46de651478..fde8bdfa775 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc index 2a03cfee9f6..36e686e932e 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc index f98dc004737..c3126f77c90 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc index 265b5748054..c6b70553d6e 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc index 9ea019d7b8e..b1035a02131 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc index a46de651478..fde8bdfa775 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc index 7dc5f8da4a9..3621c9e18bb 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/try_lock/1.cc index ca1f9ec3417..59703ff7095 100644 --- a/libstdc++-v3/testsuite/30_threads/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/try_lock/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/try_lock/2.cc index 154ae91b8e9..395b0aff19f 100644 --- a/libstdc++-v3/testsuite/30_threads/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/try_lock/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/3.cc b/libstdc++-v3/testsuite/30_threads/try_lock/3.cc index 2c5aabca02d..04901c65be4 100644 --- a/libstdc++-v3/testsuite/30_threads/try_lock/3.cc +++ b/libstdc++-v3/testsuite/30_threads/try_lock/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc index 09ed5e7da6e..ee734b42614 100644 --- a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc +++ b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc index ca2c8e38ddc..b19d372f168 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc index 87a44253edd..44d4b5c31e5 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc index 3dca85a3ad1..5b011331c8b 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc index ae51bc04ac9..1ac32e7e077 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc index 808521f0e4b..0e51c232e0f 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc index 5278a4d639f..1d353c7c74d 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc index 36a7945f736..553696c729a 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc index 9882f78164b..1dcfdf1bf03 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc index f5cc74b2ccf..2330680104b 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc index 43cae03fbfe..c13e8634db1 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc index 1c96ef1766e..2587157a682 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc index 4b7080a8d1d..69c20cd7458 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc @@ -1,5 +1,5 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* powerpc-ibm-aix* } } // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } diff --git a/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc index fd1ed09c6c3..c0cd70921f5 100644 --- a/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc @@ -1,6 +1,6 @@ // 2003-05-03 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -18,8 +18,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <ext/rope> diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc index 31f26adcfaa..af406b3457c 100644 --- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc +++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2006, 2007, 2009 Free Software Foundation +// Copyright (C) 2006, 2007, 2009, 2012 Free Software Foundation // // 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 @@ -17,8 +17,8 @@ // TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared] -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <tr1/memory> diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc index 6b94d04b600..a523e686f7a 100644 --- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc +++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2006, 2007, 2009 Free Software Foundation +// Copyright (C) 2006, 2007, 2009, 2012 Free Software Foundation // // 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 @@ -17,8 +17,8 @@ // TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared] -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* mips-sgi-irix6* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* mips-sgi-irix6* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <tr1/memory> |