# HG changeset patch # Parent 38d681ec07686a092be2c779b81b171605c2db1c Remove obsolete Solaris 9 support diff --git a/contrib/config-list.mk b/contrib/config-list.mk --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -75,7 +75,6 @@ LIST = aarch64-elf aarch64-linux-gnu \ x86_64-knetbsd-gnu x86_64-w64-mingw32 \ x86_64-mingw32OPT-enable-sjlj-exceptions=yes xstormy16-elf xtensa-elf \ xtensa-linux \ - sparc-sun-solaris2.9OPT-enable-obsolete i686-solaris2.9OPT-enable-obsolete \ i686-interix3OPT-enable-obsolete score-elfOPT-enable-obsolete LOGFILES = $(patsubst %,log/%-make.out,$(LIST)) diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2767,6 +2767,9 @@ fix = { */ bypass = 'We have a problem when using C\+\+|for C\+\+, ' '_[a-z0-9A-Z_]+_exception; for C, exception'; + /* The Solaris 10 headers already get this right. */ + mach = '*-*-solaris2.1[0-9]*'; + not_machine = true; c_fix = wrap; c_fix_arg = "#ifdef __cplusplus\n" @@ -3407,42 +3410,6 @@ fix = { }; /* - * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use - * of Standard C99 64-bit types in 32-bit mode. - */ -fix = { - hackname = solaris_int_types; - select = "__STDC__ - 0 == 0"; - bypass = "_LONGLONG_TYPE"; - files = sys/int_types.h; - c_fix = format; - c_fix_arg = - "(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))"; - test_text = - "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "typedef long long int64_t;\n" - "#endif\n\n" - "#if defined(_LP64) || (__STDC__ - 0 == 0 && !defined(_NO_LONGLONG))\n" - "typedef int64_t intmax_t;\n" - "#endif"; -}; - -/* - * Before Solaris 10, doesn't mark longjump noreturn. - */ -fix = { - hackname = solaris_longjmp_noreturn; - mach = "*-*-solaris2*"; - files = "iso/setjmp_iso.h"; - bypass = "__NORETURN"; - select = "(.*longjmp\\(jmp_buf.*[^)]+\\));"; - c_fix = format; - c_fix_arg = "%1 __attribute__ ((__noreturn__));"; - - test_text = "extern void longjmp(jmp_buf, int);"; -}; - -/* * Sun Solaris 10 defines several C99 math macros in terms of * builtins specific to the Studio compiler, in particular not * compatible with the GNU compiler. @@ -3595,44 +3562,6 @@ fix = { }; /* - * Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing - * "0" for the last field of the pthread_mutex_t structure, which is - * of type upad64_t, which itself is typedef'd to int64_t, but with - * __STDC__ defined (e.g. by -ansi) it is a union. So change the - * initializer to "{0}" instead - */ -fix = { - hackname = solaris_mutex_init_2; - select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = pthread.h; - /* - * On Solaris 10, this fix is unnecessary because upad64_t is - * always defined correctly regardless of the definition of the - * __STDC__ macro. The first "mach" pattern matches up to - * solaris9. The second "mach" pattern will not match any two (or - * more) digit solaris version, but it will match e.g. 2.5.1. - */ - mach = '*-*-solaris2.[0-9]', '*-*-solaris2.[0-9][!0-9]*'; - c_fix = format; - c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "%0\n" - "#else\n" - "%1, {0}}%4\n" - "#endif"; - c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+" - "(|/\*.*\*/[ \t]*\\\\\n[ \t]*)\\{.*)" - ",[ \t]*0\\}" "(|[ \t].*)$"; - test_text = - '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" - "#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n" - "#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n" - "#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \\\\\n" - " {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}\n" - "#define PTHREAD_COND_INITIALIZER /* = DEFAULTCV */ \\\\\n" - " {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}"; -}; - -/* * Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a * structure. As such, it need two levels of brackets, but only * contains one. Wrap the macro definition in an extra layer. @@ -3651,38 +3580,6 @@ fix = { }; /* - * Sun Solaris defines PTHREAD_ONCE_INIT with a "0" for some - * fields of the pthread_once_t structure, which are of type - * upad64_t, which itself is typedef'd to int64_t, but with __STDC__ - * defined (e.g. by -ansi) it is a union. So change the initializer - * to "{0}" instead. This test relies on solaris_once_init_1. - */ -fix = { - hackname = solaris_once_init_2; - select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = pthread.h; - /* - * On Solaris 10, this fix is unnecessary because upad64_t is - * always defined correctly regardless of the definition of the - * __STDC__ macro. The first "mach" pattern matches up to - * solaris9. The second "mach" pattern will not match any two (or - * more) digit solaris version, but it will match e.g. 2.5.1. - */ - mach = '*-*-solaris2.[0-9]', '*-*-solaris2.[0-9][!0-9]*'; - c_fix = format; - c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "%0\n" - "#else\n" - "%1{0}, {0}, {0}, {%3}%4\n" - "#endif"; - c_fix_arg = "(^#define[ \t]+PTHREAD_ONCE_INIT[ \t]+\\{\\{)" - "(0, 0, 0, )(PTHREAD_[A-Z_]+)(\\}\\})[ \t]*$"; - test_text = - '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" - "#define PTHREAD_ONCE_INIT\t{{0, 0, 0, PTHREAD_ONCE_NOTDONE}}\n"; -}; - -/* * Solaris 10+ uses char *const argv[_RESTRICT_KYWD] in the * posix_spawn declarations, which doesn't work with C++. */ @@ -3780,33 +3677,6 @@ fix = { }; /* - * On Solaris 9, __va_list needs to become a typedef for - * __builtin_va_list to make -Wmissing-format-attribute work. - */ -fix = { - hackname = solaris_sys_va_list; - files = sys/va_list.h; - mach = '*-*-solaris2.9'; - select = "#if.*__STDC__.*\n" - "typedef void \\*__va_list;\n" - "#else\n" - "typedef char \\*__va_list;\n" - "#endif"; - - c_fix = format; - c_fix_arg = "#ifdef __GNUC__\n" - "typedef __builtin_va_list __va_list;\n" - "#else\n" - "%0\n" - "#endif"; - test_text = "#if defined(__STDC__) && !defined(__ia64)\n" - "typedef void *__va_list;\n" - "#else\n" - "typedef char *__va_list;\n" - "#endif"; -}; - -/* * a missing semi-colon at the end of the statsswtch structure definition. */ fix = { diff --git a/fixincludes/tests/base/iso/setjmp_iso.h b/fixincludes/tests/base/iso/setjmp_iso.h deleted file mode 100644 --- a/fixincludes/tests/base/iso/setjmp_iso.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/iso/setjmp_iso.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SOLARIS_LONGJMP_NORETURN_CHECK ) -extern void longjmp(jmp_buf, int) __attribute__ ((__noreturn__)); -#endif /* SOLARIS_LONGJMP_NORETURN_CHECK */ diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -96,56 +96,12 @@ extern int __sigsetjmp (struct __jmp_buf #endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */ -#if defined( SOLARIS_MUTEX_INIT_2_CHECK ) -#ident "@(#)pthread.h 1.26 98/04/12 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, 0} -#else -#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, {0}} -#endif -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* DEFAULTCV */ -#else -#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */ -#endif -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \ - {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0} -#else -#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \ - {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, {0}} -#endif -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER /* = DEFAULTCV */ \ - {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0} -#else -#define PTHREAD_COND_INITIALIZER /* = DEFAULTCV */ \ - {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, {0}} -#endif -#endif /* SOLARIS_MUTEX_INIT_2_CHECK */ - - #if defined( SOLARIS_ONCE_INIT_1_CHECK ) #pragma ident "@(#)pthread.h 1.37 04/09/28 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) #define PTHREAD_ONCE_INIT {{0, 0, 0, PTHREAD_ONCE_NOTDONE}} -#else -#define PTHREAD_ONCE_INIT {{{0}, {0}, {0}, {PTHREAD_ONCE_NOTDONE}}} -#endif #endif /* SOLARIS_ONCE_INIT_1_CHECK */ -#if defined( SOLARIS_ONCE_INIT_2_CHECK ) -#ident "@(#)pthread.h 1.26 98/04/12 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_ONCE_INIT {{0, 0, 0, PTHREAD_ONCE_NOTDONE}} -#else -#define PTHREAD_ONCE_INIT {{{0}, {0}, {0}, {PTHREAD_ONCE_NOTDONE}}} -#endif - -#endif /* SOLARIS_ONCE_INIT_2_CHECK */ - - #if defined( SOLARIS_RWLOCK_INIT_1_CHECK ) #ident "@(#)pthread.h 1.26 98/04/12 SMI" #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) diff --git a/fixincludes/tests/base/sys/int_types.h b/fixincludes/tests/base/sys/int_types.h deleted file mode 100644 --- a/fixincludes/tests/base/sys/int_types.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/int_types.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SOLARIS_INT_TYPES_CHECK ) -#if (defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__)) && !defined(_NO_LONGLONG) -typedef long long int64_t; -#endif - -#if defined(_LP64) || ((defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__)) && !defined(_NO_LONGLONG)) -typedef int64_t intmax_t; -#endif -#endif /* SOLARIS_INT_TYPES_CHECK */ diff --git a/fixincludes/tests/base/sys/va_list.h b/fixincludes/tests/base/sys/va_list.h deleted file mode 100644 --- a/fixincludes/tests/base/sys/va_list.h +++ /dev/null @@ -1,22 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/va_list.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SOLARIS_SYS_VA_LIST_CHECK ) -#ifdef __GNUC__ -typedef __builtin_va_list __va_list; -#else -#if defined(__STDC__) && !defined(__ia64) -typedef void *__va_list; -#else -typedef char *__va_list; -#endif -#endif -#endif /* SOLARIS_SYS_VA_LIST_CHECK */ diff --git a/gcc/config.gcc b/gcc/config.gcc --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -246,7 +246,6 @@ md_file= case ${target} in picochip-* \ | score-* \ - | *-*-solaris2.9* \ ) if test "x$enable_obsolete" != xyes; then echo "*** Configuration ${target} is obsolete." >&2 @@ -287,8 +286,8 @@ case ${target} in | *-*-rtemsaout* \ | *-*-rtemscoff* \ | *-*-solaris2 \ - | *-*-solaris2.[0-8] \ - | *-*-solaris2.[0-8].* \ + | *-*-solaris2.[0-9] \ + | *-*-solaris2.[0-9].* \ | *-*-sysv* \ | vax-*-vms* \ ) @@ -810,15 +809,8 @@ case ${target} in # i?86-*-solaris2* needs to insert headers between cpu default and # Solaris 2 specific ones. sol2_tm_file="dbxelf.h elfos.h ${cpu_type}/sysv4.h sol2.h ${cpu_type}/sol2.h" - case ${target} in - *-*-solaris2.1[0-9]*) - sol2_tm_file="${sol2_tm_file} sol2-10.h" - use_gcc_stdint=wrap - ;; - *) - use_gcc_stdint=provide - ;; - esac + sol2_tm_file="${sol2_tm_file} sol2-10.h" + use_gcc_stdint=wrap if test x$gnu_ld = xyes; then tm_file="usegld.h ${tm_file}" fi @@ -1526,42 +1518,27 @@ i[34567]86-*-solaris2* | x86_64-*-solari tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}" # Set default arch_32 to pentium4, tune_32 to generic like the other # i386 targets, although config.guess defaults to i386-pc-solaris2*. - case ${target} in - *-*-solaris2.9*) - # Solaris 9/x86 cannot execute SSE/SSE2 instructions by default. - with_arch_32=${with_arch_32:-pentiumpro} - ;; - *) - with_arch_32=${with_arch_32:-pentium4} - ;; - esac + with_arch_32=${with_arch_32:-pentium4} with_tune_32=${with_tune_32:-generic} - case ${target} in - *-*-solaris2.9*) - tm_file="${tm_file} i386/sol2-9.h" - ;; - *-*-solaris2.1[0-9]*) - tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h" - tm_defines="${tm_defines} TARGET_BI_ARCH=1" - tmake_file="$tmake_file i386/t-sol2-64" - need_64bit_isa=yes - if test x$with_cpu = x; then - if test x$with_cpu_64 = x; then - with_cpu_64=generic - fi - else - case " $x86_cpus $x86_archs $x86_64_archs " in - *" $with_cpu "*) - ;; - *) - echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 - echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2 - exit 1 - ;; - esac + tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h" + tm_defines="${tm_defines} TARGET_BI_ARCH=1" + tmake_file="$tmake_file i386/t-sol2-64" + need_64bit_isa=yes + if test x$with_cpu = x; then + if test x$with_cpu_64 = x; then + with_cpu_64=generic fi - ;; - esac + else + case " $x86_cpus $x86_archs $x86_64_archs " in + *" $with_cpu "*) + ;; + *) + echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 + echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2 + exit 1 + ;; + esac + fi ;; i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae) tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h" diff --git a/gcc/config/i386/sol2-9.h b/gcc/config/i386/sol2-9.h deleted file mode 100644 --- a/gcc/config/i386/sol2-9.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Target definitions for GCC for Intel 80386 running Solaris 9 - Copyright (C) 2014 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 -. */ - -/* Solaris 9 only guarantees 4-byte stack alignment as required by the i386 - psABI, so realign it as necessary for SSE instructions. */ -#undef STACK_REALIGN_DEFAULT -#define STACK_REALIGN_DEFAULT 1 diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2314,35 +2314,7 @@ gcc_GAS_CHECK_FEATURE([.nsubspa comdat], gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden, [elf,2,13,0],, [ .hidden foobar -foobar:],[ -# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with -# STV_HIDDEN, so disable .hidden support if so. -case "${target}" in - i?86-*-solaris2* | x86_64-*-solaris2.1[[0-9]]*) - if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then - cat > conftest.s <