From b24513a1a2bb350286e09bb124c3dbcea348be92 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 14 Mar 2012 16:33:37 +0000 Subject: Remove obsolete IRIX 6.5 support libstdc++-v3: * configure.host (irix6.5*): Remove. * config/os/irix: Remove. * config/io/basic_file_stdio.cc (__basic_file::showmanyc()) [_GLIBCXX_FIONREAD_TAKES_OFF_T]: Remove. * doc/xml/faq.xml: Remove IRIX reference. * doc/xml/manual/using.xml (Finding Dynamic or Shared Libraries): Remove IRIX example. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Remove mips-sgi-irix6* handling. * 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. * testsuite/30_threads/async/49668.cc: Likewise. * testsuite/30_threads/async/any.cc: Likewise. * testsuite/30_threads/async/async.cc: Likewise. * testsuite/30_threads/async/launch.cc: Likewise. * testsuite/30_threads/async/sync.cc: Likewise. * testsuite/30_threads/call_once/39909.cc: Likewise. * testsuite/30_threads/call_once/49668.cc: Likewise. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/2.cc: Likewise. * testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * testsuite/30_threads/future/cons/move.cc: Likewise. * testsuite/30_threads/future/members/45133.cc: Likewise. * testsuite/30_threads/future/members/get.cc: Likewise. * testsuite/30_threads/future/members/get2.cc: Likewise. * testsuite/30_threads/future/members/share.cc: Likewise. * testsuite/30_threads/future/members/valid.cc: Likewise. * testsuite/30_threads/future/members/wait.cc: Likewise. * testsuite/30_threads/future/members/wait_for.cc: Likewise. * testsuite/30_threads/future/members/wait_until.cc: Likewise. * testsuite/30_threads/lock/1.cc: Likewise. * testsuite/30_threads/lock/2.cc: Likewise. * testsuite/30_threads/lock/3.cc: Likewise. * testsuite/30_threads/lock/4.cc: Likewise. * testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/packaged_task/49668.cc: Likewise. * testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * testsuite/30_threads/promise/cons/1.cc: Likewise. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. * testsuite/30_threads/promise/cons/move.cc: Likewise. * testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * testsuite/30_threads/promise/members/get_future.cc: Likewise. * testsuite/30_threads/promise/members/get_future2.cc: Likewise. * testsuite/30_threads/promise/members/set_exception.cc: Likewise. * testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * testsuite/30_threads/promise/members/set_value.cc: Likewise. * testsuite/30_threads/promise/members/set_value2.cc: Likewise. * testsuite/30_threads/promise/members/set_value3.cc: Likewise. * testsuite/30_threads/promise/members/swap.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/shared_future/cons/move.cc: Likewise. * testsuite/30_threads/shared_future/members/45133.cc: Likewise. * testsuite/30_threads/shared_future/members/get.cc: Likewise. * testsuite/30_threads/shared_future/members/get2.cc: Likewise. * testsuite/30_threads/shared_future/members/valid.cc: Likewise. * testsuite/30_threads/shared_future/members/wait.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * testsuite/30_threads/this_thread/1.cc: Likewise. * testsuite/30_threads/this_thread/2.cc: Likewise. * testsuite/30_threads/this_thread/3.cc: Likewise. * testsuite/30_threads/this_thread/4.cc: Likewise. * testsuite/30_threads/thread/cons/1.cc: Likewise. * testsuite/30_threads/thread/cons/2.cc: Likewise. * testsuite/30_threads/thread/cons/3.cc: Likewise. * testsuite/30_threads/thread/cons/4.cc: Likewise. * testsuite/30_threads/thread/cons/49668.cc: Likewise. * testsuite/30_threads/thread/cons/5.cc: Likewise. * testsuite/30_threads/thread/cons/6.cc: Likewise. * testsuite/30_threads/thread/cons/7.cc: Likewise. * testsuite/30_threads/thread/cons/8.cc: Likewise. * testsuite/30_threads/thread/cons/9.cc: Likewise. * testsuite/30_threads/thread/cons/moveable.cc: Likewise. * testsuite/30_threads/thread/members/1.cc: Likewise. * testsuite/30_threads/thread/members/2.cc: Likewise. * testsuite/30_threads/thread/members/3.cc: Likewise. * testsuite/30_threads/thread/members/4.cc: Likewise. * testsuite/30_threads/thread/members/5.cc: Likewise. * testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/thread/swap/1.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/try_lock/1.cc: Likewise. * testsuite/30_threads/try_lock/2.cc: Likewise. * testsuite/30_threads/try_lock/3.cc: Likewise. * testsuite/30_threads/try_lock/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/ext/rope/pthread7-rope.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/23_containers/vector/capacity/resize/1.cc: Remove dg-options for mips*-*-irix6*. * testsuite/27_io/ios_base/storage/1.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/storage/3.cc: Likewise. * testsuite/lib/libstdc++.exp (v3-build_support): Remove IRIX 6 workaround. libjava: * configure.ac (libgcj_cv_exidx): Remove IRIX 6 ld workaround. (mips-sgi-irix6*): Remove. (mips-sgi-irix*): Remove. (AC_CHECK_HEADERS): Remove bstring.h. * configure: Regenerate. * include/config.h.in: Regenerate. * configure.host (mips-sgi-irix6*): Remove. * include/posix-signal.h [__sgi__]: Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc [HAVE_BSTRING_H]: Remove. * gnu/java/net/natPlainDatagramSocketImplWin32.cc: Likewise. * gnu/java/net/natPlainSocketImplPosix.cc: Likewise. libitm: * configure.tgt (*-*-irix6*): Remove. libgomp: * configure.tgt (mips-sgi-irix6*): Remove. libgfortran: * intrinsics/c99_functions.c [__sgi__ && !HAVE_COMPLEX_H]: Remove. libgcc: * config.host (mips-sgi-irix6.5*): Remove. * config/mips/irix-crti.S: Remove. * config/mips/irix-crtn.S: Remove. * config/mips/irix6-unwind.h: Remove. * config/mips/t-irix6: Remove. * config/mips/t-slibgcc-irix: Remove. gnattools: * configure.ac (mips-sgi-irix*): Remove. * configure: Regenerate. gcc/testsuite: * g++.dg/other/anon5.C: Don't skip on mips-sgi-irix*. * g++.dg/tree-prof/partition1.C: Likewise. * g++.dg/tree-prof/partition2.C: Likewise. * g++.old-deja/g++.other/init19.C: Remove mips-sgi-irix* handling. * gcc.c-torture/compile/labels-3.c: Remove dg-options. * gcc.c-torture/execute/20010724-1.c: Remove. * gcc.c-torture/execute/20010724-1.x: Remove. * gcc.c-torture/execute/20040208-2.c: Remove. * gcc.c-torture/execute/20040208-2.x: Remove. * gcc.c-torture/execute/ieee/20000320-1.c [__mips__ && __sgi__]: Remove. (main) [__mips__ && __sgi__]: Remove. * gcc.c-torture/execute/ieee/copysign1.c: Remove IRIX reference. * gcc.c-torture/execute/ieee/copysign2.c: Likewise. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Remove mips-sgi-irix6* handling. * gcc.dg/cpp/assert4.c [__mips__]: Remove __sgi__, sgi. * gcc.dg/torture/20090618-1.c: Don't skip on mips-sgi-irix*. * gcc.dg/torture/builtin-frexp-1.c: Remove mips*-*-irix6* handling. * gcc.dg/torture/builtin-logb-1.c: Likewise. * gcc.dg/torture/pr47917.c: Remove mips-sgi-irix6.5 handling. * gcc.dg/tree-ssa/ssa-store-ccp-3.c: Don't skip on mips*-*-irix*. * gcc.misc-tests/linkage.exp: Remove mips-sgi-irix6* handling. * gcc.target/mips/args-1.c [!__sgi__]: Remove. * gcc.target/mips/interrupt_handler-2.c: Don't skip on mips-sgi-irix6*. * gcc.target/mips/interrupt_handler-3.c: Likewise. * gcc.target/mips/save-restore-1.c: Don't skip on mips-sgi-irix6*. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. * gfortran.dg/g77/cabs.f: Don't xfail on mips-sgi-irix6*. * lib/prune.exp (prune_gcc_output): Remove pruning of IRIX 6 ld messages. * lib/target-libpath.exp (set_ld_library_path_env_vars): Remove IRIX 6 handling. (restore_ld_library_path_env_vars): Likewise. * lib/target-supports.exp (check_profiling_available): Remove mips*-*-irix* handling. (check_ascii_locale_available): Remove mips-sgi-irix* handling. (add_options_for_c99_runtime): Remove mips-sgi-irix6.5* handling. * objc.dg/stabs-1.m: Don't xfail on mips-sgi-irix6.5. gcc/ada: * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove. * a-intnam-irix.ads, mlib-tgt-specific-irix.adb, s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads, s-proinf-irix-athread.adb, s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads, system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads: Remove. * adaint.c [__mips && __sgi]: Remove. (__gnat_number_of_cpus) [__mips && __sgi]: Remove. [IS_CROSS && !(__mips && __sgi)]: Remove. * adaint.h [sgi && _LFAPI]: Remove. * cstreams.c (__gnat_full_name) [sgi]: Remove. * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove. (__gnat_clearenv) [__mips && __sgi]: Remove. * errno.c (_SGI_MP_SOURCE): Remove. * gsocket.h [sgi]: Remove. * init.c: Remove IRIX reference. [sgi]: Remove. * link.c [sgi]: Remove. * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define. (main) [__mips && __sgi] (MAX_tv_sec): Don't define. (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove. * sysdep.c [sgi]: Remove. (getc_immediate_common) [sgi]: Remove. (__gnat_localtime_tzoff) [sgi]: Remove. * terminals.c [__mips && __sgi] (IRIX): Don't define. [IRIX] (USE_GETPTY): Don't define. (allocate_pty_desc) [USE_GETPTY]: Remove. * g-traceb.ads: Remove IRIX reference. * g-trasym.ads: Likewise. * memtrack.adb: Likewise. * s-interr-sigaction.adb: Likewise. * gnat_rm.texi (Implementation Advice): Remove SGI info. (Implementation Defined Characteristics): Likewise. * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix): Remove. (Irix-Specific Considerations): Remove. gcc/cp: * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference. gcc: * config.gcc (enable_obsolete): Remove mips-sgi-irix6.5. (mips-sgi-irix6.5*): Remove. * config.host (mips-sgi-irix*): Remove. * configure.ac (enable_fixed_point): Remove mips*-sgi-irix*. (set_have_as_tls): Remove *-*-irix6*. (gcc_cv_ld_static_dynamic): Remove mips-sgi-irix6*. * configure: Regenerate. * config/mips/iris6.h: Remove. * config/mips/iris6.opt: Remove. * config/mips/t-irix6: Remove. * config/mips/mips.h (TARGET_GPWORD): Remove IRIX 6 N64 handling. (TARGET_IRIX6): Remove. (TARGET_CPU_CPP_BUILTINS): Remove IRIX 6 handling. Don't define LANGUAGE_C, _LANGUAGE_C for Objective-C. * config/mips/mips.c (mips_build_builtin_va_list): Remove IRIX 6 handling. (mips_file_start): Likewise. * config/mips/mips-protos.h (irix_asm_output_align): Remove. * config/mips/driver-native.c [__sgi__]: Remove. (host_detect_local_cpu) [__sgi__]: Remove. * config/mips/gnu-user.h: Remove iris5.h reference. * config/mips/mips-modes.def: Remove IRIX 6 reference. * config/mips/gnu-user64.h (MIPS_TFMODE_FORMAT): Remove. * config/mips/mips.c (mips_option_override) [MIPS_TFMODE_FORMAT]: Remove. * gcc.c (main): Move asm_debug initialization ... (asm_debug): ... here. * ginclude/stddef.h (__STDDEF_H__): Don't define. * defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove. * system.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Poison. * collect2.c [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. (main) [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES] (is_in_args): Remove. * doc/tm.texi.in (Driver, LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove. * doc/tm.texi: Regenerate. * doc/invoke.texi (Debugging Options, -gdwarf-): Remove IRIX 6 reference. (MIPS Options, -march): Remove IRIX reference. * doc/install.texi (Binaries, SGI IRIX): Remove. (Specific, mips-sgi-irix6): Document IRIX 6.5 removal, remove rest of section. * doc/trouble.texi (Interoperation): Remove -lgl_s handling. fixincludes: * inclhack.def (broken_cabs): Remove IRIX and SunOS 4 support. (irix___restrict): Remove. (irix___generic1): Remove. (irix___generic2): Remove. (irix_asm_apostrophe): Remove. (irix_complex): Remove. (irix_pthread_init): Remove. (irix_socklen_t): Remove. (irix_stdint_c99_mode): Remove. (irix_stdint_c99_types): Remove. (irix_stdint_c99_macros): Remove. (irix_stdio_va_list): Remove IRIX 6.5 support. (irix_wcsftime): Remove. (stdio_va_list): Remove IRIX 6.5 support. (svr4_profil): Remove IRIX bypass. * fixincl.x: Regenerate. * tests/base/complex.h [IRIX_COMPLEX_CHECK]: Remove. * tests/base/internal/math_core.h: Remove. * tests/base/internal/sgimacros.h: Remove. * tests/base/internal/wchar_core.h: Remove. * tests/base/math.h [BROKEN_CABS_CHECK]: Remove IRIX and SunOS 4 support. * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: Remove. * tests/base/stdint-irix65.h: Remove. * tests/base/stdint.h [IRIX_STDINT_C99_MODE_CHECK]: Remove. * tests/base/sys/asm.h: Remove. * tests/base/sys/socket.h [IRIX_SOCKLEN_T_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove mips-sgi-irix6.5. toplevel: * MAINTAINERS (OS Port Maintainers): Remove irix. * configure.ac (enable_libgomp): Remove *-*-irix6*. (unsupported_languages): Remove mips-sgi-irix6.*. (noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*. (with_stabs): Remove. * configure: Regenerate. From-SVN: r185390 --- ChangeLog | 9 + MAINTAINERS | 2 +- configure | 23 +- configure.ac | 23 +- contrib/ChangeLog | 4 + contrib/config-list.mk | 1 - fixincludes/ChangeLog | 31 + fixincludes/fixincl.x | 520 +------- fixincludes/inclhack.def | 288 +---- fixincludes/tests/base/complex.h | 6 - fixincludes/tests/base/internal/math_core.h | 30 - fixincludes/tests/base/internal/sgimacros.h | 17 - fixincludes/tests/base/internal/wchar_core.h | 15 - fixincludes/tests/base/math.h | 4 - fixincludes/tests/base/pthread.h | 7 - fixincludes/tests/base/stdint-irix65.h | 40 - fixincludes/tests/base/stdint.h | 7 - fixincludes/tests/base/sys/asm.h | 14 - fixincludes/tests/base/sys/socket.h | 10 - gcc/ChangeLog | 55 + gcc/ada/ChangeLog | 44 + gcc/ada/a-intnam-irix.ads | 195 --- gcc/ada/adaint.c | 8 +- gcc/ada/adaint.h | 4 +- gcc/ada/cstreams.c | 4 +- gcc/ada/env.c | 7 +- gcc/ada/errno.c | 3 +- gcc/ada/g-traceb.ads | 1 - gcc/ada/g-trasym.ads | 1 - gcc/ada/gcc-interface/Makefile.in | 43 - gcc/ada/gnat_rm.texi | 21 +- gcc/ada/gnat_ugn.texi | 25 - gcc/ada/gsocket.h | 2 +- gcc/ada/init.c | 171 +-- gcc/ada/link.c | 22 +- gcc/ada/memtrack.adb | 1 - gcc/ada/mlib-tgt-specific-irix.adb | 182 --- gcc/ada/s-interr-sigaction.adb | 4 +- gcc/ada/s-intman-irix.adb | 137 -- gcc/ada/s-mastop-irix.adb | 351 ----- gcc/ada/s-oscons-tmplt.c | 18 +- gcc/ada/s-osinte-irix.adb | 87 -- gcc/ada/s-osinte-irix.ads | 519 -------- gcc/ada/s-proinf-irix-athread.adb | 225 ---- gcc/ada/s-proinf-irix-athread.ads | 76 -- gcc/ada/s-taprop-irix.adb | 1358 -------------------- gcc/ada/s-tasinf-irix.ads | 118 -- gcc/ada/sysdep.c | 10 +- gcc/ada/system-irix-n32.ads | 158 --- gcc/ada/system-irix-n64.ads | 159 --- gcc/ada/system-irix-o32.ads | 146 --- gcc/ada/terminals.c | 9 - gcc/collect2.c | 30 +- gcc/config.gcc | 21 - gcc/config.host | 4 +- gcc/config/mips/driver-native.c | 61 +- gcc/config/mips/gnu-user.h | 3 +- gcc/config/mips/gnu-user64.h | 8 +- gcc/config/mips/iris6.h | 353 ----- gcc/config/mips/iris6.opt | 45 - gcc/config/mips/mips-modes.def | 3 +- gcc/config/mips/mips-protos.h | 3 +- gcc/config/mips/mips.c | 86 +- gcc/config/mips/mips.h | 46 +- gcc/configure | 24 +- gcc/configure.ac | 19 +- gcc/cp/ChangeLog | 4 + gcc/cp/Make-lang.in | 6 +- gcc/defaults.h | 9 +- gcc/doc/install.texi | 107 +- gcc/doc/invoke.texi | 7 +- gcc/doc/tm.texi | 6 - gcc/doc/tm.texi.in | 6 - gcc/doc/trouble.texi | 6 - gcc/gcc.c | 6 +- gcc/ginclude/stddef.h | 4 +- gcc/system.h | 3 +- gcc/testsuite/ChangeLog | 47 + gcc/testsuite/g++.dg/other/anon5.C | 2 +- gcc/testsuite/g++.dg/tree-prof/partition1.C | 1 - gcc/testsuite/g++.dg/tree-prof/partition2.C | 1 - gcc/testsuite/g++.old-deja/g++.other/init19.C | 2 +- gcc/testsuite/gcc.c-torture/compile/labels-3.c | 6 - gcc/testsuite/gcc.c-torture/execute/20010724-1.c | 59 - gcc/testsuite/gcc.c-torture/execute/20010724-1.x | 3 - gcc/testsuite/gcc.c-torture/execute/20040208-2.c | 11 - gcc/testsuite/gcc.c-torture/execute/20040208-2.x | 1 - .../gcc.c-torture/execute/ieee/20000320-1.c | 12 - .../gcc.c-torture/execute/ieee/copysign1.c | 2 +- .../gcc.c-torture/execute/ieee/copysign2.c | 2 +- .../execute/ieee/mul-subnormal-single-1.x | 5 - gcc/testsuite/gcc.dg/cpp/assert4.c | 9 +- gcc/testsuite/gcc.dg/torture/20090618-1.c | 1 - gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c | 2 +- gcc/testsuite/gcc.dg/torture/builtin-logb-1.c | 2 +- gcc/testsuite/gcc.dg/torture/pr47917.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c | 4 +- gcc/testsuite/gcc.misc-tests/linkage.exp | 14 +- gcc/testsuite/gcc.target/mips/args-1.c | 4 +- .../gcc.target/mips/interrupt_handler-2.c | 1 - .../gcc.target/mips/interrupt_handler-3.c | 1 - gcc/testsuite/gcc.target/mips/save-restore-1.c | 1 - gcc/testsuite/gcc.target/mips/save-restore-3.c | 1 - gcc/testsuite/gcc.target/mips/save-restore-4.c | 1 - gcc/testsuite/gcc.target/mips/save-restore-5.c | 1 - gcc/testsuite/gfortran.dg/g77/cabs.f | 1 - gcc/testsuite/lib/prune.exp | 5 +- gcc/testsuite/lib/target-libpath.exp | 55 +- gcc/testsuite/lib/target-supports.exp | 19 +- gcc/testsuite/objc.dg/stabs-1.m | 2 +- gnattools/ChangeLog | 5 + gnattools/configure | 3 - gnattools/configure.ac | 3 - libgcc/config.host | 5 - libgcc/config/mips/irix-crti.S | 71 - libgcc/config/mips/irix-crtn.S | 38 - libgcc/config/mips/irix6-unwind.h | 180 --- libgcc/config/mips/t-irix6 | 24 - libgcc/config/mips/t-slibgcc-irix | 7 - libgfortran/ChangeLog | 4 + libgfortran/intrinsics/c99_functions.c | 14 - libgomp/ChangeLog | 4 + libgomp/configure.tgt | 4 - libitm/ChangeLog | 4 + libitm/configure.tgt | 2 +- libjava/ChangeLog | 17 + libjava/configure | 24 +- libjava/configure.ac | 16 +- libjava/configure.host | 4 - .../java/net/natPlainDatagramSocketImplPosix.cc | 5 - .../java/net/natPlainDatagramSocketImplWin32.cc | 5 - libjava/gnu/java/net/natPlainSocketImplPosix.cc | 5 - libjava/include/config.h.in | 3 - libjava/include/posix-signal.h | 2 - libstdc++-v3/ChangeLog | 202 +++ libstdc++-v3/config/io/basic_file_stdio.cc | 6 +- libstdc++-v3/config/os/irix/atomic_word.h | 35 - libstdc++-v3/config/os/irix/atomicity.h | 41 - libstdc++-v3/config/os/irix/irix6.5/ctype_base.h | 64 - .../config/os/irix/irix6.5/ctype_configure_char.cc | 101 -- libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h | 74 -- libstdc++-v3/config/os/irix/irix6.5/os_defines.h | 54 - libstdc++-v3/configure.host | 9 - libstdc++-v3/doc/xml/faq.xml | 5 +- libstdc++-v3/doc/xml/manual/using.xml | 6 - .../shared_ptr/thread/default_weaktoshared.cc | 4 +- .../shared_ptr/thread/mutex_weaktoshared.cc | 4 +- .../21_strings/basic_string/pthread18185.cc | 4 +- .../testsuite/21_strings/basic_string/pthread4.cc | 4 +- .../22_locale/locale/cons/12658_thread-1.cc | 4 +- .../22_locale/locale/cons/12658_thread-2.cc | 4 +- .../testsuite/23_containers/list/pthread1.cc | 4 +- .../testsuite/23_containers/list/pthread5.cc | 4 +- .../testsuite/23_containers/map/pthread6.cc | 4 +- .../23_containers/vector/capacity/resize/1.cc | 8 +- .../vector/debug/multithreaded_swap.cc | 4 +- .../testsuite/27_io/basic_ofstream/pthread2.cc | 4 +- .../27_io/basic_ostringstream/pthread3.cc | 4 +- libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc | 8 +- libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc | 8 +- libstdc++-v3/testsuite/27_io/ios_base/storage/3.cc | 8 +- libstdc++-v3/testsuite/30_threads/async/42819.cc | 4 +- libstdc++-v3/testsuite/30_threads/async/49668.cc | 4 +- libstdc++-v3/testsuite/30_threads/async/any.cc | 4 +- libstdc++-v3/testsuite/30_threads/async/async.cc | 4 +- libstdc++-v3/testsuite/30_threads/async/launch.cc | 4 +- libstdc++-v3/testsuite/30_threads/async/sync.cc | 4 +- .../testsuite/30_threads/call_once/39909.cc | 4 +- .../testsuite/30_threads/call_once/49668.cc | 4 +- .../testsuite/30_threads/call_once/call_once1.cc | 4 +- .../30_threads/condition_variable/cons/1.cc | 4 +- .../30_threads/condition_variable/members/1.cc | 4 +- .../30_threads/condition_variable/members/2.cc | 4 +- .../condition_variable/native_handle/typesizes.cc | 4 +- .../30_threads/condition_variable_any/50862.cc | 4 +- .../30_threads/condition_variable_any/cons/1.cc | 4 +- .../30_threads/condition_variable_any/members/1.cc | 4 +- .../30_threads/condition_variable_any/members/2.cc | 4 +- .../testsuite/30_threads/future/cons/move.cc | 4 +- .../testsuite/30_threads/future/members/45133.cc | 4 +- .../testsuite/30_threads/future/members/get.cc | 4 +- .../testsuite/30_threads/future/members/get2.cc | 4 +- .../testsuite/30_threads/future/members/share.cc | 4 +- .../testsuite/30_threads/future/members/valid.cc | 4 +- .../testsuite/30_threads/future/members/wait.cc | 4 +- .../30_threads/future/members/wait_for.cc | 4 +- .../30_threads/future/members/wait_until.cc | 4 +- libstdc++-v3/testsuite/30_threads/lock/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/lock/2.cc | 4 +- libstdc++-v3/testsuite/30_threads/lock/3.cc | 4 +- libstdc++-v3/testsuite/30_threads/lock/4.cc | 4 +- .../testsuite/30_threads/lock_guard/cons/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc | 4 +- .../30_threads/mutex/dest/destructor_locked.cc | 4 +- libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc | 4 +- .../testsuite/30_threads/mutex/native_handle/1.cc | 4 +- .../30_threads/mutex/native_handle/typesizes.cc | 4 +- .../testsuite/30_threads/mutex/try_lock/1.cc | 4 +- .../testsuite/30_threads/mutex/try_lock/2.cc | 4 +- .../testsuite/30_threads/mutex/unlock/1.cc | 4 +- .../testsuite/30_threads/packaged_task/49668.cc | 4 +- .../testsuite/30_threads/packaged_task/cons/1.cc | 4 +- .../testsuite/30_threads/packaged_task/cons/2.cc | 4 +- .../testsuite/30_threads/packaged_task/cons/3.cc | 4 +- .../30_threads/packaged_task/cons/alloc.cc | 4 +- .../30_threads/packaged_task/cons/move.cc | 4 +- .../30_threads/packaged_task/cons/move_assign.cc | 4 +- .../30_threads/packaged_task/members/get_future.cc | 4 +- .../packaged_task/members/get_future2.cc | 4 +- .../30_threads/packaged_task/members/invoke.cc | 4 +- .../30_threads/packaged_task/members/invoke2.cc | 4 +- .../30_threads/packaged_task/members/invoke3.cc | 4 +- .../30_threads/packaged_task/members/invoke4.cc | 4 +- .../30_threads/packaged_task/members/invoke5.cc | 4 +- .../30_threads/packaged_task/members/reset.cc | 4 +- .../30_threads/packaged_task/members/reset2.cc | 4 +- .../30_threads/packaged_task/members/swap.cc | 4 +- .../30_threads/packaged_task/members/valid.cc | 4 +- .../testsuite/30_threads/promise/cons/1.cc | 4 +- .../testsuite/30_threads/promise/cons/alloc.cc | 4 +- .../testsuite/30_threads/promise/cons/move.cc | 4 +- .../30_threads/promise/cons/move_assign.cc | 4 +- .../30_threads/promise/members/get_future.cc | 4 +- .../30_threads/promise/members/get_future2.cc | 4 +- .../30_threads/promise/members/set_exception.cc | 4 +- .../30_threads/promise/members/set_exception2.cc | 4 +- .../30_threads/promise/members/set_value.cc | 4 +- .../30_threads/promise/members/set_value2.cc | 4 +- .../30_threads/promise/members/set_value3.cc | 4 +- .../testsuite/30_threads/promise/members/swap.cc | 4 +- .../testsuite/30_threads/recursive_mutex/cons/1.cc | 4 +- .../recursive_mutex/dest/destructor_locked.cc | 4 +- .../testsuite/30_threads/recursive_mutex/lock/1.cc | 4 +- .../30_threads/recursive_mutex/native_handle/1.cc | 4 +- .../recursive_mutex/native_handle/typesizes.cc | 4 +- .../30_threads/recursive_mutex/try_lock/1.cc | 4 +- .../30_threads/recursive_mutex/try_lock/2.cc | 4 +- .../30_threads/recursive_mutex/unlock/1.cc | 4 +- .../30_threads/recursive_timed_mutex/cons/1.cc | 4 +- .../dest/destructor_locked.cc | 4 +- .../30_threads/recursive_timed_mutex/lock/1.cc | 4 +- .../30_threads/recursive_timed_mutex/lock/2.cc | 4 +- .../recursive_timed_mutex/native_handle/1.cc | 4 +- .../native_handle/typesizes.cc | 4 +- .../30_threads/recursive_timed_mutex/try_lock/1.cc | 4 +- .../30_threads/recursive_timed_mutex/try_lock/2.cc | 4 +- .../recursive_timed_mutex/try_lock_for/1.cc | 4 +- .../recursive_timed_mutex/try_lock_for/2.cc | 4 +- .../recursive_timed_mutex/try_lock_for/3.cc | 4 +- .../recursive_timed_mutex/try_lock_until/1.cc | 4 +- .../recursive_timed_mutex/try_lock_until/2.cc | 4 +- .../30_threads/recursive_timed_mutex/unlock/1.cc | 4 +- .../30_threads/shared_future/cons/move.cc | 4 +- .../30_threads/shared_future/members/45133.cc | 4 +- .../30_threads/shared_future/members/get.cc | 4 +- .../30_threads/shared_future/members/get2.cc | 4 +- .../30_threads/shared_future/members/valid.cc | 4 +- .../30_threads/shared_future/members/wait.cc | 4 +- .../30_threads/shared_future/members/wait_for.cc | 4 +- .../30_threads/shared_future/members/wait_until.cc | 4 +- libstdc++-v3/testsuite/30_threads/this_thread/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/this_thread/2.cc | 4 +- libstdc++-v3/testsuite/30_threads/this_thread/3.cc | 4 +- libstdc++-v3/testsuite/30_threads/this_thread/4.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/2.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/3.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/4.cc | 4 +- .../testsuite/30_threads/thread/cons/49668.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/5.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/6.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/7.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/8.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/cons/9.cc | 4 +- .../testsuite/30_threads/thread/cons/moveable.cc | 4 +- .../testsuite/30_threads/thread/members/1.cc | 4 +- .../testsuite/30_threads/thread/members/2.cc | 4 +- .../testsuite/30_threads/thread/members/3.cc | 4 +- .../testsuite/30_threads/thread/members/4.cc | 4 +- .../testsuite/30_threads/thread/members/5.cc | 4 +- .../thread/members/hardware_concurrency.cc | 4 +- .../30_threads/thread/native_handle/typesizes.cc | 4 +- libstdc++-v3/testsuite/30_threads/thread/swap/1.cc | 4 +- .../testsuite/30_threads/timed_mutex/cons/1.cc | 4 +- .../timed_mutex/dest/destructor_locked.cc | 4 +- .../testsuite/30_threads/timed_mutex/lock/1.cc | 4 +- .../30_threads/timed_mutex/native_handle/1.cc | 4 +- .../timed_mutex/native_handle/typesizes.cc | 4 +- .../testsuite/30_threads/timed_mutex/try_lock/1.cc | 4 +- .../testsuite/30_threads/timed_mutex/try_lock/2.cc | 4 +- .../30_threads/timed_mutex/try_lock_for/1.cc | 4 +- .../30_threads/timed_mutex/try_lock_for/2.cc | 4 +- .../30_threads/timed_mutex/try_lock_for/3.cc | 4 +- .../30_threads/timed_mutex/try_lock_until/1.cc | 4 +- .../30_threads/timed_mutex/try_lock_until/2.cc | 4 +- .../testsuite/30_threads/timed_mutex/unlock/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/try_lock/1.cc | 4 +- libstdc++-v3/testsuite/30_threads/try_lock/2.cc | 4 +- libstdc++-v3/testsuite/30_threads/try_lock/3.cc | 4 +- libstdc++-v3/testsuite/30_threads/try_lock/4.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/1.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/2.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/3.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/4.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/5.cc | 4 +- .../testsuite/30_threads/unique_lock/cons/6.cc | 4 +- .../testsuite/30_threads/unique_lock/locking/1.cc | 4 +- .../testsuite/30_threads/unique_lock/locking/2.cc | 4 +- .../testsuite/30_threads/unique_lock/locking/3.cc | 4 +- .../testsuite/30_threads/unique_lock/locking/4.cc | 4 +- .../30_threads/unique_lock/modifiers/1.cc | 4 +- .../30_threads/unique_lock/modifiers/2.cc | 4 +- libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc | 4 +- libstdc++-v3/testsuite/lib/libstdc++.exp | 11 +- .../shared_ptr/thread/default_weaktoshared.cc | 4 +- .../shared_ptr/thread/mutex_weaktoshared.cc | 4 +- 316 files changed, 925 insertions(+), 7193 deletions(-) delete mode 100644 fixincludes/tests/base/internal/math_core.h delete mode 100644 fixincludes/tests/base/internal/sgimacros.h delete mode 100644 fixincludes/tests/base/internal/wchar_core.h delete mode 100644 fixincludes/tests/base/stdint-irix65.h delete mode 100644 fixincludes/tests/base/sys/asm.h delete mode 100644 gcc/ada/a-intnam-irix.ads delete mode 100644 gcc/ada/mlib-tgt-specific-irix.adb delete mode 100644 gcc/ada/s-intman-irix.adb delete mode 100644 gcc/ada/s-mastop-irix.adb delete mode 100644 gcc/ada/s-osinte-irix.adb delete mode 100644 gcc/ada/s-osinte-irix.ads delete mode 100644 gcc/ada/s-proinf-irix-athread.adb delete mode 100644 gcc/ada/s-proinf-irix-athread.ads delete mode 100644 gcc/ada/s-taprop-irix.adb delete mode 100644 gcc/ada/s-tasinf-irix.ads delete mode 100644 gcc/ada/system-irix-n32.ads delete mode 100644 gcc/ada/system-irix-n64.ads delete mode 100644 gcc/ada/system-irix-o32.ads delete mode 100644 gcc/config/mips/iris6.h delete mode 100644 gcc/config/mips/iris6.opt delete mode 100644 gcc/testsuite/gcc.c-torture/execute/20010724-1.c delete mode 100644 gcc/testsuite/gcc.c-torture/execute/20010724-1.x delete mode 100644 gcc/testsuite/gcc.c-torture/execute/20040208-2.c delete mode 100644 gcc/testsuite/gcc.c-torture/execute/20040208-2.x delete mode 100644 libgcc/config/mips/irix-crti.S delete mode 100644 libgcc/config/mips/irix-crtn.S delete mode 100644 libgcc/config/mips/irix6-unwind.h delete mode 100644 libgcc/config/mips/t-irix6 delete mode 100644 libgcc/config/mips/t-slibgcc-irix delete mode 100644 libstdc++-v3/config/os/irix/atomic_word.h delete mode 100644 libstdc++-v3/config/os/irix/atomicity.h delete mode 100644 libstdc++-v3/config/os/irix/irix6.5/ctype_base.h delete mode 100644 libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc delete mode 100644 libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h delete mode 100644 libstdc++-v3/config/os/irix/irix6.5/os_defines.h diff --git a/ChangeLog b/ChangeLog index 72f713b..c652b19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-03-14 Rainer Orth + + * MAINTAINERS (OS Port Maintainers): Remove irix. + * configure.ac (enable_libgomp): Remove *-*-irix6*. + (unsupported_languages): Remove mips-sgi-irix6.*. + (noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*. + (with_stabs): Remove. + * configure: Regenerate. + 2012-03-12 Rainer Orth * MAINTAINERS (OS Port Maintainers): Remove osf. diff --git a/MAINTAINERS b/MAINTAINERS index 1d64cc7..9514f70 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, solaris Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE +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/configure b/configure index 4fd8267..ac34e66 100755 --- a/configure +++ b/configure @@ -3054,7 +3054,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) ;; - *-*-solaris2* | *-*-irix6* | *-*-hpux11*) + *-*-solaris2* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -3145,7 +3145,7 @@ case "${target}" in ;; m68k-*-*) ;; - mips-sgi-irix6.* | mips*-*-rtems*) + mips*-*-rtems*) ;; mips*-*-linux*) ;; @@ -3261,13 +3261,6 @@ case "${target}" in rs6000-*-aix*) noconfigdirs="$noconfigdirs ${libgcj}" ;; - mips*-*-irix6*) - # Linking libjava exceeds command-line length limits on at least - # IRIX 6.2, but not on IRIX 6.5. - # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham - # - noconfigdirs="$noconfigdirs ${libgcj}" - ;; *-*-lynxos*) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -6873,18 +6866,6 @@ case "${enable_target_optspace}:${target}" in ;; esac -# Default to using --with-stabs for certain targets. -if test x${with_stabs} = x ; then - case "${target}" in - mips*-*-irix[56]*) - ;; - mips*-*-*) - with_stabs=yes; - extra_host_args="${extra_host_args} --with-stabs" - ;; - esac -fi - # Some systems (e.g., one of the i386-aix systems the gas testers are # using) don't handle "\$" correctly, so don't use it here. tooldir='${exec_prefix}'/${target_noncanonical} diff --git a/configure.ac b/configure.ac index f6ab734..9195bd7 100644 --- a/configure.ac +++ b/configure.ac @@ -483,7 +483,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) ;; - *-*-solaris2* | *-*-irix6* | *-*-hpux11*) + *-*-solaris2* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -571,7 +571,7 @@ case "${target}" in ;; m68k-*-*) ;; - mips-sgi-irix6.* | mips*-*-rtems*) + mips*-*-rtems*) ;; mips*-*-linux*) ;; @@ -687,13 +687,6 @@ case "${target}" in rs6000-*-aix*) noconfigdirs="$noconfigdirs ${libgcj}" ;; - mips*-*-irix6*) - # Linking libjava exceeds command-line length limits on at least - # IRIX 6.2, but not on IRIX 6.5. - # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham - # - noconfigdirs="$noconfigdirs ${libgcj}" - ;; *-*-lynxos*) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -2331,18 +2324,6 @@ case "${enable_target_optspace}:${target}" in ;; esac -# Default to using --with-stabs for certain targets. -if test x${with_stabs} = x ; then - case "${target}" in - mips*-*-irix[[56]]*) - ;; - mips*-*-*) - with_stabs=yes; - extra_host_args="${extra_host_args} --with-stabs" - ;; - esac -fi - # Some systems (e.g., one of the i386-aix systems the gas testers are # using) don't handle "\$" correctly, so don't use it here. tooldir='${exec_prefix}'/${target_noncanonical} diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 9a490a2..210a7dc 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2012-03-14 Rainer Orth + + * config-list.mk (LIST): Remove mips-sgi-irix6.5. + 2012-03-13 Joseph Myers * gennews (files): Add files for GCC 4.7. diff --git a/contrib/config-list.mk b/contrib/config-list.mk index 7e6debd..7281315 100644 --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -36,7 +36,6 @@ LIST = alpha-linux-gnu alpha-freebsd6 alpha-netbsd alpha-openbsd \ m32r-linux m32rle-linux m68k-elf m68k-netbsdelf \ m68k-openbsd m68k-uclinux m68k-linux m68k-rtems \ mcore-elf mep-elf microblaze-linux microblaze-elf \ - mips-sgi-irix6.5OPT-with-stabsOPT-enable-threads=posixOPT-enable-obsolete \ mips-netbsd \ mips64el-st-linux-gnu mips64octeon-linux mipsisa64r2-linux \ mipsisa32r2-linux-gnu mipsisa64r2-sde-elf mipsisa32-elfoabi \ diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 14dd8a8..4f59eda 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,34 @@ +2012-03-14 Rainer Orth + + * inclhack.def (broken_cabs): Remove IRIX and SunOS 4 support. + (irix___restrict): Remove. + (irix___generic1): Remove. + (irix___generic2): Remove. + (irix_asm_apostrophe): Remove. + (irix_complex): Remove. + (irix_pthread_init): Remove. + (irix_socklen_t): Remove. + (irix_stdint_c99_mode): Remove. + (irix_stdint_c99_types): Remove. + (irix_stdint_c99_macros): Remove. + (irix_stdio_va_list): Remove IRIX 6.5 support. + (irix_wcsftime): Remove. + (stdio_va_list): Remove IRIX 6.5 support. + (svr4_profil): Remove IRIX bypass. + * fixincl.x: Regenerate. + + * tests/base/complex.h [IRIX_COMPLEX_CHECK]: Remove. + * tests/base/internal/math_core.h: Remove. + * tests/base/internal/sgimacros.h: Remove. + * tests/base/internal/wchar_core.h: Remove. + * tests/base/math.h [BROKEN_CABS_CHECK]: Remove IRIX and SunOS 4 + support. + * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: Remove. + * tests/base/stdint-irix65.h: Remove. + * tests/base/stdint.h [IRIX_STDINT_C99_MODE_CHECK]: Remove. + * tests/base/sys/asm.h: Remove. + * tests/base/sys/socket.h [IRIX_SOCKLEN_T_CHECK]: Remove. + 2012-03-12 Rainer Orth * inclhack.def (alpha___extern_prefix): Remove. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 57bc488..ba7babc 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 Monday March 12, 2012 at 04:25:19 PM MET + * It has been AutoGen-ed Wednesday March 14, 2012 at 02:41:19 PM MET * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Mar 12 16:25:19 MET 2012 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Mar 14 14:41: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 223 fixup descriptions. + * This file contains 212 fixup descriptions. * * See README for more information. * @@ -4316,203 +4316,6 @@ static const char* apzIp_Missing_SemiPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix___Restrict fix - */ -tSCC zIrix___RestrictName[] = - "irix___restrict"; - -/* - * File name selection pattern - */ -tSCC zIrix___RestrictList[] = - "internal/sgimacros.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___RestrictMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___RestrictSelect0[] = - "(#ifdef __c99\n\ -)(#[ \t]*define __restrict restrict)"; - -#define IRIX___RESTRICT_TEST_CT 1 -static tTestDesc aIrix___RestrictTests[] = { - { TT_EGREP, zIrix___RestrictSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Restrict - */ -static const char* apzIrix___RestrictPatch[] = { - "format", - "%1# ifndef __cplusplus\n\ -%2\n\ -# endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix___Generic1 fix - */ -tSCC zIrix___Generic1Name[] = - "irix___generic1"; - -/* - * File name selection pattern - */ -tSCC zIrix___Generic1List[] = - "internal/math_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___Generic1Machs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___Generic1Select0[] = - "#define ([a-z]+)\\(x\\) *__generic.*"; - -#define IRIX___GENERIC1_TEST_CT 1 -static tTestDesc aIrix___Generic1Tests[] = { - { TT_EGREP, zIrix___Generic1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Generic1 - */ -static const char* apzIrix___Generic1Patch[] = { - "format", - "extern int %1(double);\n\ -extern int %1f(float);\n\ -extern int %1l(long double);\n\ -#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n\ - : sizeof(x) == sizeof(float) ? _%1f(x) \\\n\ - : _%1l(x))\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix___Generic2 fix - */ -tSCC zIrix___Generic2Name[] = - "irix___generic2"; - -/* - * File name selection pattern - */ -tSCC zIrix___Generic2List[] = - "internal/math_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___Generic2Machs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___Generic2Select0[] = - "#define ([a-z]+)\\(x,y\\) *__generic.*"; - -#define IRIX___GENERIC2_TEST_CT 1 -static tTestDesc aIrix___Generic2Tests[] = { - { TT_EGREP, zIrix___Generic2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Generic2 - */ -static const char* apzIrix___Generic2Patch[] = { - "format", - "#define %1(x,y) \\\n\ - ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n\ - : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n\ - : _%1l(x,y))\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Asm_Apostrophe fix - */ -tSCC zIrix_Asm_ApostropheName[] = - "irix_asm_apostrophe"; - -/* - * File name selection pattern - */ -tSCC zIrix_Asm_ApostropheList[] = - "sys/asm.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzIrix_Asm_ApostropheMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Asm_ApostropheSelect0[] = - "^[ \t]*#.*[Ww]e're"; - -#define IRIX_ASM_APOSTROPHE_TEST_CT 1 -static tTestDesc aIrix_Asm_ApostropheTests[] = { - { TT_EGREP, zIrix_Asm_ApostropheSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Asm_Apostrophe - */ -static const char* apzIrix_Asm_ApostrophePatch[] = { - "format", - "%1 are", - "^([ \t]*#.*[Ww]e)'re", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Complex fix - */ -tSCC zIrix_ComplexName[] = - "irix_complex"; - -/* - * File name selection pattern - */ -tSCC zIrix_ComplexList[] = - "complex.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_ComplexMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_ComplexSelect0[] = - "#define[ \t]_Complex_I[ \t]\\(\\(float[ \t]_Complex\\)[ \t]\\(__I__\\)\\)"; - -#define IRIX_COMPLEX_TEST_CT 1 -static tTestDesc aIrix_ComplexTests[] = { - { TT_EGREP, zIrix_ComplexSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Complex - */ -static const char* apzIrix_ComplexPatch[] = { sed_cmd_z, - "-e", "s/#define[ \t]_Complex_I[ \t]((float[ \t]_Complex)[ \t](__I__))/#define _Complex_I (__extension__ 1.0iF)/", - "-e", "/#define[ \t]imaginary[ \t]_Imaginary/d", - "-e", "/#define[ \t]_Imaginary_I/d", - "-e", "s/#define[ \t]I[ \t]_Imaginary_I/#define I _Complex_I/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Irix_Limits_Const fix */ tSCC zIrix_Limits_ConstName[] = @@ -4548,201 +4351,6 @@ static const char* apzIrix_Limits_ConstPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix_Pthread_Init fix - */ -tSCC zIrix_Pthread_InitName[] = - "irix_pthread_init"; - -/* - * File name selection pattern - */ -tSCC zIrix_Pthread_InitList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Pthread_InitMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Pthread_InitSelect0[] = - "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})"; - -#define IRIX_PTHREAD_INIT_TEST_CT 1 -static tTestDesc aIrix_Pthread_InitTests[] = { - { TT_EGREP, zIrix_Pthread_InitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Pthread_Init - */ -static const char* apzIrix_Pthread_InitPatch[] = { - "format", - "%1{ %2 }", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Socklen_T fix - */ -tSCC zIrix_Socklen_TName[] = - "irix_socklen_t"; - -/* - * File name selection pattern - */ -tSCC zIrix_Socklen_TList[] = - "sys/socket.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Socklen_TMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Socklen_TSelect0[] = - "(#define _SOCKLEN_T\n\ -)(typedef u_int32_t socklen_t;)"; - -#define IRIX_SOCKLEN_T_TEST_CT 1 -static tTestDesc aIrix_Socklen_TTests[] = { - { TT_EGREP, zIrix_Socklen_TSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Socklen_T - */ -static const char* apzIrix_Socklen_TPatch[] = { - "format", - "%1#if _NO_XOPEN4 && _NO_XOPEN5\n\ -typedef int socklen_t;\n\ -#else\n\ -%2\n\ -#endif /* _NO_XOPEN4 && _NO_XOPEN5 */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Mode fix - */ -tSCC zIrix_Stdint_C99_ModeName[] = - "irix_stdint_c99_mode"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_ModeList[] = - "stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_ModeMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Stdint_C99_ModeSelect0[] = - "(#ifndef __c99\n\ -)(#error This header file is to be used only for c99 mode compilations)"; - -#define IRIX_STDINT_C99_MODE_TEST_CT 1 -static tTestDesc aIrix_Stdint_C99_ModeTests[] = { - { TT_EGREP, zIrix_Stdint_C99_ModeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Stdint_C99_Mode - */ -static const char* apzIrix_Stdint_C99_ModePatch[] = { - "format", - "#if 0\n\ -%2", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Types fix - */ -tSCC zIrix_Stdint_C99_TypesName[] = - "irix_stdint_c99_types"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_TypesList[] = - "stdint-irix65.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_TypesMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; -#define IRIX_STDINT_C99_TYPES_TEST_CT 0 -#define aIrix_Stdint_C99_TypesTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Irix_Stdint_C99_Types - */ -static const char* apzIrix_Stdint_C99_TypesPatch[] = { sed_cmd_z, - "-e", "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@#define INT64_MIN (-0x7fffffffffffffffLL - 1)@", - "-e", "s@^#define INT64_MAX.*0x7fffffffffffffff$@#define INT64_MAX 0x7fffffffffffffffLL@", - "-e", "s@^#define UINT32_MAX.*0xffffffff$@#define UINT32_MAX 0xffffffffU@", - "-e", "s@^#define UINT64_MAX.*0xffffffffffffffff$@#define UINT64_MAX 0xffffffffffffffffULL@", - "-e", "s@^#define INTPTR_MIN.*INT32_MIN$@#define INTPTR_MIN (-0x7fffffffL - 1)@", - "-e", "s@^#define INTPTR_MAX.*INT32_MAX$@#define INTPTR_MAX 0x7fffffffL@", - "-e", "s@^#define UINTPTR_MAX.*UINT32_MAX$@#define UINTPTR_MAX 0xffffffffUL@", - "-e", "s@^#define INTPTR_MIN.*INT64_MIN@#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@", - "-e", "s@^#define INTPTR_MAX.*INT64_MAX$@#define INTPTR_MAX 0x7fffffffffffffffL@", - "-e", "s@^#define UINTPTR_MAX.*UINT64_MAX$@#define UINTPTR_MAX 0xffffffffffffffffUL@", - "-e", "s@^#define PTRDIFF_MIN.*INT64_MIN$@#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@", - "-e", "s@^#define PTRDIFF_MAX.*INT64_MAX$@#define PTRDIFF_MAX 0x7fffffffffffffffL@", - "-e", "s@^#define SIZE_MAX.*UINT64_MAX$@#define SIZE_MAX 0xffffffffffffffffUL@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Macros fix - */ -tSCC zIrix_Stdint_C99_MacrosName[] = - "irix_stdint_c99_macros"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_MacrosList[] = - "stdint-irix65.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_MacrosMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; -#define IRIX_STDINT_C99_MACROS_TEST_CT 0 -#define aIrix_Stdint_C99_MacrosTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Irix_Stdint_C99_Macros - */ -static const char* apzIrix_Stdint_C99_MacrosPatch[] = { sed_cmd_z, - "-e", "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@", - "-e", "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@", - "-e", "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@", - "-e", "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@", - "-e", "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@", - "-e", "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@", - "-e", "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@", - "-e", "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@", - "-e", "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@", - "-e", "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Irix_Stdio_Va_List fix */ tSCC zIrix_Stdio_Va_ListName[] = @@ -4752,7 +4360,7 @@ tSCC zIrix_Stdio_Va_ListName[] = * File name selection pattern */ tSCC zIrix_Stdio_Va_ListList[] = - "stdio.h\0internal/stdio_core.h\0"; + "stdio.h\0"; /* * Machine/OS name selection pattern */ @@ -4778,45 +4386,6 @@ static const char* apzIrix_Stdio_Va_ListPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix_Wcsftime fix - */ -tSCC zIrix_WcsftimeName[] = - "irix_wcsftime"; - -/* - * File name selection pattern - */ -tSCC zIrix_WcsftimeList[] = - "internal/wchar_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_WcsftimeMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_WcsftimeSelect0[] = - "#if _NO_XOPEN5\n\ -(extern size_t[ \t]+wcsftime.*const char *.*)"; - -#define IRIX_WCSFTIME_TEST_CT 1 -static tTestDesc aIrix_WcsftimeTests[] = { - { TT_EGREP, zIrix_WcsftimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Wcsftime - */ -static const char* apzIrix_WcsftimePatch[] = { - "format", - "#if _NO_XOPEN5 && !defined(__c99)\n\ -%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Kandr_Concat fix */ tSCC zKandr_ConcatName[] = @@ -7269,7 +6838,7 @@ tSCC zStdio_Va_ListName[] = * File name selection pattern */ tSCC zStdio_Va_ListList[] = - "stdio.h\0internal/stdio_core.h\0internal/wchar_core.h\0"; + "stdio.h\0"; /* * Machine/OS name selection pattern */ @@ -7929,15 +7498,8 @@ tSCC zSvr4_ProfilList[] = tSCC zSvr4_ProfilSelect0[] = "profil\\(unsigned short \\*, unsigned int, unsigned int, unsigned int\\)"; -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSvr4_ProfilBypass0[] = - "Silicon Graphics"; - -#define SVR4_PROFIL_TEST_CT 2 +#define SVR4_PROFIL_TEST_CT 1 static tTestDesc aSvr4_ProfilTests[] = { - { TT_NEGREP, zSvr4_ProfilBypass0, (regex_t*)NULL }, { TT_EGREP, zSvr4_ProfilSelect0, (regex_t*)NULL }, }; /* @@ -9068,9 +8630,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 265 +#define REGEX_COUNT 255 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 223 +#define FIX_COUNT 212 /* * Enumerate the fixes @@ -9180,19 +8742,8 @@ typedef enum { IO_QUOTES_DEF_FIXIDX, IO_QUOTES_USE_FIXIDX, IP_MISSING_SEMI_FIXIDX, - IRIX___RESTRICT_FIXIDX, - IRIX___GENERIC1_FIXIDX, - IRIX___GENERIC2_FIXIDX, - IRIX_ASM_APOSTROPHE_FIXIDX, - IRIX_COMPLEX_FIXIDX, IRIX_LIMITS_CONST_FIXIDX, - IRIX_PTHREAD_INIT_FIXIDX, - IRIX_SOCKLEN_T_FIXIDX, - IRIX_STDINT_C99_MODE_FIXIDX, - IRIX_STDINT_C99_TYPES_FIXIDX, - IRIX_STDINT_C99_MACROS_FIXIDX, IRIX_STDIO_VA_LIST_FIXIDX, - IRIX_WCSFTIME_FIXIDX, KANDR_CONCAT_FIXIDX, LINUX_IA64_UCONTEXT_FIXIDX, LYNXOS_NO_WARNING_IN_SYS_TIME_H_FIXIDX, @@ -9822,71 +9373,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { IP_MISSING_SEMI_TEST_CT, FD_MACH_ONLY, aIp_Missing_SemiTests, apzIp_Missing_SemiPatch, 0 }, - { zIrix___RestrictName, zIrix___RestrictList, - apzIrix___RestrictMachs, - IRIX___RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___RestrictTests, apzIrix___RestrictPatch, 0 }, - - { zIrix___Generic1Name, zIrix___Generic1List, - apzIrix___Generic1Machs, - IRIX___GENERIC1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___Generic1Tests, apzIrix___Generic1Patch, 0 }, - - { zIrix___Generic2Name, zIrix___Generic2List, - apzIrix___Generic2Machs, - IRIX___GENERIC2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___Generic2Tests, apzIrix___Generic2Patch, 0 }, - - { zIrix_Asm_ApostropheName, zIrix_Asm_ApostropheList, - apzIrix_Asm_ApostropheMachs, - IRIX_ASM_APOSTROPHE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Asm_ApostropheTests, apzIrix_Asm_ApostrophePatch, 0 }, - - { zIrix_ComplexName, zIrix_ComplexList, - apzIrix_ComplexMachs, - IRIX_COMPLEX_TEST_CT, FD_MACH_ONLY, - aIrix_ComplexTests, apzIrix_ComplexPatch, 0 }, - { zIrix_Limits_ConstName, zIrix_Limits_ConstList, apzIrix_Limits_ConstMachs, IRIX_LIMITS_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aIrix_Limits_ConstTests, apzIrix_Limits_ConstPatch, 0 }, - { zIrix_Pthread_InitName, zIrix_Pthread_InitList, - apzIrix_Pthread_InitMachs, - IRIX_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Pthread_InitTests, apzIrix_Pthread_InitPatch, 0 }, - - { zIrix_Socklen_TName, zIrix_Socklen_TList, - apzIrix_Socklen_TMachs, - IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Socklen_TTests, apzIrix_Socklen_TPatch, 0 }, - - { zIrix_Stdint_C99_ModeName, zIrix_Stdint_C99_ModeList, - apzIrix_Stdint_C99_ModeMachs, - IRIX_STDINT_C99_MODE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Stdint_C99_ModeTests, apzIrix_Stdint_C99_ModePatch, 0 }, - - { zIrix_Stdint_C99_TypesName, zIrix_Stdint_C99_TypesList, - apzIrix_Stdint_C99_TypesMachs, - IRIX_STDINT_C99_TYPES_TEST_CT, FD_MACH_ONLY, - aIrix_Stdint_C99_TypesTests, apzIrix_Stdint_C99_TypesPatch, 0 }, - - { zIrix_Stdint_C99_MacrosName, zIrix_Stdint_C99_MacrosList, - apzIrix_Stdint_C99_MacrosMachs, - IRIX_STDINT_C99_MACROS_TEST_CT, FD_MACH_ONLY, - aIrix_Stdint_C99_MacrosTests, apzIrix_Stdint_C99_MacrosPatch, 0 }, - { zIrix_Stdio_Va_ListName, zIrix_Stdio_Va_ListList, apzIrix_Stdio_Va_ListMachs, IRIX_STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aIrix_Stdio_Va_ListTests, apzIrix_Stdio_Va_ListPatch, 0 }, - { zIrix_WcsftimeName, zIrix_WcsftimeList, - apzIrix_WcsftimeMachs, - IRIX_WCSFTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_WcsftimeTests, apzIrix_WcsftimePatch, 0 }, - { zKandr_ConcatName, zKandr_ConcatList, apzKandr_ConcatMachs, KANDR_CONCAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 40b8d0f..8f36077 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -780,10 +780,6 @@ fix = { /* * Remove `extern double cabs' declarations from math.h. * This conflicts with C99. Discovered on AIX. - * IRIX 5 and IRIX 6 before 6.5.18 (where C99 support was introduced) - * declares cabs() to take a struct __cabs_s argument. - * SunOS4 has its cabs() declaration followed by a comment which - * terminates on the following line. * Darwin hides its broken cabs in architecture-specific subdirs. */ fix = { @@ -799,11 +795,7 @@ fix = { "#else\n" "extern double cabs();\n" "#endif\n" - "extern double cabs ( _Complex z );\n" - "extern double cabs(); /* This is a comment\n" - " and it ends here. */\n" - "extern double cabs(struct __cabs_s);\n" - "extern long double cabsl( struct __cabsl_s );"; + "extern double cabs ( _Complex z );"; }; @@ -2243,110 +2235,6 @@ fix = { /* - * IRIX 6.5.1[89] unconditionally defines - * __restrict as restrict iff __c99. This is wrong for C++, which - * needs many C99 features, but only supports __restrict. - */ -fix = { - hackname = irix___restrict; - files = internal/sgimacros.h; - select = "(#ifdef __c99\n)(#[ \t]*define __restrict restrict)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1" - "# ifndef __cplusplus\n%2\n# endif"; - - test_text = "#ifdef __c99\n# define __restrict restrict"; -}; - -/* - * IRIX 6.5.22 uses the SGI c99 __generic() intrinsic - * to define the fpclasify, isfinite, isinf, isnan, isnormal and signbit - * functions. - * - * This was probably introduced around IRIX 6.5.18 - */ -fix = { - hackname = irix___generic1; - files = internal/math_core.h; - mach = "mips-sgi-irix6.5"; - select = "#define ([a-z]+)\\(x\\) *__generic.*"; - - c_fix = format; - c_fix_arg = "extern int %1(double);\n" - "extern int %1f(float);\n" - "extern int %1l(long double);\n" - "#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n" - " : sizeof(x) == sizeof(float) ? _%1f(x) \\\n" - " : _%1l(x))\n"; - - test_text = - "#define isnan(x) __generic(x,,, _isnan, _isnanf, _isnanl,,,)(x)\n"; -}; - - -/* Likewise on IRIX 6.5.19 and later uses the SGI - compiler's __generic intrinsic to define isgreater, isgreaterequal, - isless, islessequal, islessgreater and isunordered functions. */ -fix = { - hackname = irix___generic2; - files = internal/math_core.h; - mach = "mips-sgi-irix6.5"; - select = "#define ([a-z]+)\\(x,y\\) *__generic.*"; - - c_fix = format; - c_fix_arg = "#define %1(x,y) \\\n" - " ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n" - " : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n" - " : _%1l(x,y))\n"; - - test_text = - "#define isless(x,y) __generic(x,y,, _isless, _islessf, _islessl,,,)(x,y)"; -}; - - -/* - * IRIX 5.2's contains an asm comment with a contraction - * that causes the assembly preprocessor to complain about an - * unterminated character constant. - */ -fix = { - hackname = irix_asm_apostrophe; - files = sys/asm.h; - - select = "^[ \t]*#.*[Ww]e're"; - c_fix = format; - c_fix_arg = "%1 are"; - c_fix_arg = "^([ \t]*#.*[Ww]e)'re"; - test_text = "\t# and we're on vacation"; -}; - - -/* - * IRIX 6.5 complex.h defines _Complex_I and _Imaginary_I in terms of __I__, - * which is a MIPSpro compiler builtin. Remove _Imaginary_I and imaginary - * definitions which are not supported by GCC. - */ -fix = { - hackname = irix_complex; - mach = "mips-sgi-irix6.5"; - files = complex.h; - select = "#define[ \t]_Complex_I[ \t]\\(\\(float[ \t]_Complex\\)[ \t]\\(__I__\\)\\)"; - sed = "s/#define[ \t]_Complex_I[ \t]((float[ \t]_Complex)[ \t](__I__))/" - "#define _Complex_I (__extension__ 1.0iF)/"; - sed = "/#define[ \t]imaginary[ \t]_Imaginary/d"; - sed = "/#define[ \t]_Imaginary_I/d"; - sed = "s/#define[ \t]I[ \t]_Imaginary_I/#define I _Complex_I/"; - test_text = "#define _Complex_I ((float _Complex) (__I__))\n" - "#define imaginary _Imaginary\n" - "// #define _Imaginary_I ((float _Imaginary) 1)\n" - "#define _Imaginary_I __I__\n" - "#define I _Imaginary_I"; -}; - - -/* * Non-traditional "const" declaration in Irix's limits.h. */ fix = { @@ -2360,155 +2248,12 @@ fix = { /* - * IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in - * . - */ -fix = { - hackname = irix_pthread_init; - files = pthread.h; - select = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1{ %2 }"; - test_text = "#define PTHREAD_MUTEX_INITIALIZER { 0 }\n" - "#define PTHREAD_COND_INITIALIZER { 0 }\n" - "#define PTHREAD_RWLOCK_INITIALIZER { 0 }"; -}; - - -/* - * IRIX 6.5.1[78] has a broken definition of socklen_t. - * Various socket function prototypes use different types instead, - * depending on the API in use (BSD, XPG4/5), but the socklen_t - * definition doesn't reflect this (SGI Bug Id 864477, fixed in - * IRIX 6.5.19). - */ -fix = { - hackname = irix_socklen_t; - files = sys/socket.h; - select = "(#define _SOCKLEN_T\n)(typedef u_int32_t socklen_t;)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1" - "#if _NO_XOPEN4 && _NO_XOPEN5\n" - "typedef int socklen_t;\n" - "#else\n" - "%2\n" - "#endif /* _NO_XOPEN4 && _NO_XOPEN5 */"; - - test_text = "#define _SOCKLEN_T\ntypedef u_int32_t socklen_t;"; -}; - -/* - * IRIX 6.5 only works with ISO C99 and errors out - * otherwise. - */ -fix = { - hackname = irix_stdint_c99_mode; - files = stdint.h; - select = "(#ifndef __c99\n)(#error This header file is to be used only for c99 mode compilations)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "#if 0\n" - "%2"; - test_text = - "#ifndef __c99\n#error This header file is to be used only for c99 mode compilations\n#else"; -}; - - -/* - * IRIX 6.5 has some *_MIN/MAX constants whose types don't - * match the corresponding types, as required by ISO C99. - */ -fix = { - hackname = irix_stdint_c99_types; - files = stdint-irix65.h, stdint.h; - mach = "mips-sgi-irix6.5"; - sed = "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@" - "#define INT64_MIN (-0x7fffffffffffffffLL - 1)@"; - sed = "s@^#define INT64_MAX.*0x7fffffffffffffff$@" - "#define INT64_MAX 0x7fffffffffffffffLL@"; - sed = "s@^#define UINT32_MAX.*0xffffffff$@" - "#define UINT32_MAX 0xffffffffU@"; - sed = "s@^#define UINT64_MAX.*0xffffffffffffffff$@" - "#define UINT64_MAX 0xffffffffffffffffULL@"; - sed = "s@^#define INTPTR_MIN.*INT32_MIN$@" - "#define INTPTR_MIN (-0x7fffffffL - 1)@"; - sed = "s@^#define INTPTR_MAX.*INT32_MAX$@" - "#define INTPTR_MAX 0x7fffffffL@"; - sed = "s@^#define UINTPTR_MAX.*UINT32_MAX$@" - "#define UINTPTR_MAX 0xffffffffUL@"; - sed = "s@^#define INTPTR_MIN.*INT64_MIN@" - "#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@"; - sed = "s@^#define INTPTR_MAX.*INT64_MAX$@" - "#define INTPTR_MAX 0x7fffffffffffffffL@"; - sed = "s@^#define UINTPTR_MAX.*UINT64_MAX$@" - "#define UINTPTR_MAX 0xffffffffffffffffUL@"; - sed = "s@^#define PTRDIFF_MIN.*INT64_MIN$@" - "#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@"; - sed = "s@^#define PTRDIFF_MAX.*INT64_MAX$@" - "#define PTRDIFF_MAX 0x7fffffffffffffffL@"; - sed = "s@^#define SIZE_MAX.*UINT64_MAX$@" - "#define SIZE_MAX 0xffffffffffffffffUL@"; - test_text = "#define INT64_MIN (-0x7fffffffffffffff - 1)\n" - "#define INT64_MAX 0x7fffffffffffffff\n" - "#define UINT32_MAX 0xffffffff\n" - "#define UINT64_MAX 0xffffffffffffffff\n" - "#define INTPTR_MIN INT32_MIN\n" - "#define INTPTR_MAX INT32_MAX\n" - "#define UINTPTR_MAX UINT32_MAX\n" - "#define INTPTR_MIN INT64_MIN\n" - "#define INTPTR_MAX INT64_MAX\n" - "#define UINTPTR_MAX UINT64_MAX\n" - "#define PTRDIFF_MIN INT64_MIN\n" - "#define PTRDIFF_MAX INT64_MAX\n" - "#define SIZE_MAX UINT64_MAX"; -}; - - -/* - * IRIX 6.5 uses casts in some macros which cannot thus be used - * in preprocessor tests, although ISO C99 requires this. - */ -fix = { - hackname = irix_stdint_c99_macros; - files = stdint-irix65.h, stdint.h; - mach = "mips-sgi-irix6.5"; - sed = "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@"; - sed = "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@"; - sed = "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@"; - sed = "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@"; - sed = "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@"; - sed = "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@"; - sed = "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@"; - sed = "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@"; - sed = "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@"; - sed = "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@"; - test_text = "#define INT8_C(x) (int_least8_t)(x)\n" - "#define INT16_C(x) (int_least16_t)(x)\n" - "#define INT32_C(x) (int_least32_t)(x)\n" - "#define INT64_C(x) (int_least64_t)(x)\n" - "#define UINT8_C(x) (uint_least8_t)(x)\n" - "#define UINT16_C(x) (uint_least16_t)(x)\n" - "#define UINT32_C(x) (uint_least32_t)(x)\n" - "#define UINT64_C(x) (uint_least64_t)(x)\n" - "#define INTMAX_C(x) (intmax_t)(x)\n" - "#define UINTMAX_C(x) (uintmax_t)(x)"; -}; - - -/* - * IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare - * some functions that take a va_list as + * IRIX 5.x's stdio.h declares some functions that take a va_list as * taking char *. However, GCC uses void * for va_list, so * calling vfprintf with a va_list fails in C++. */ fix = { hackname = irix_stdio_va_list; files = stdio.h; - files = internal/stdio_core.h; select = '/\* va_list \*/ char \*'; c_fix = format; @@ -2519,26 +2264,6 @@ fix = { /* - * IRIX 6.5.19 provides the XPG4 variant of - * wcsftime by default. ISO C99 requires the XPG5 variant instead. - */ -fix = { - hackname = irix_wcsftime; - files = internal/wchar_core.h; - select = "#if _NO_XOPEN5\n(extern size_t[ \t]+wcsftime.*const char \*.*)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "#if _NO_XOPEN5 && !defined(__c99)\n%1"; - - test_text = "#if _NO_XOPEN5\n" - "extern size_t wcsftime(wchar_t *, " - "__SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, " - "const struct tm *);"; -}; - - -/* * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3 * use / * * / to concatenate tokens. */ @@ -3767,15 +3492,11 @@ fix = { * of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken to * indicate that the header knows what it's doing -- under SUSv2, * stdio.h is required to define va_list, and we shouldn't break - * that. On IRIX 6.5, internal/wchar_core.h used to get its - * definition of va_list from stdio.h. Since this doesn't happen any - * longer, use __gnuc_va_list there, too. + * that. */ fix = { hackname = stdio_va_list; files = stdio.h; - files = internal/stdio_core.h; - files = internal/wchar_core.h; bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; /* * On Solaris 10, the definition in @@ -4151,9 +3872,6 @@ fix = { select = 'profil\(unsigned short \*, unsigned int, unsigned int, unsigned int\)'; - /* The fix is wrong on IRIX 5/6 and creates a conflict with another - prototype in . */ - bypass = 'Silicon Graphics'; c_fix = format; c_fix_arg = 'profil(unsigned short *, size_t, int, unsigned int)'; diff --git a/fixincludes/tests/base/complex.h b/fixincludes/tests/base/complex.h index b3fe27a..f648d6f 100644 --- a/fixincludes/tests/base/complex.h +++ b/fixincludes/tests/base/complex.h @@ -21,12 +21,6 @@ #endif /* HPUX_IMAGINARY_I_CHECK */ -#if defined( IRIX_COMPLEX_CHECK ) -#define _Complex_I (__extension__ 1.0iF) -#define I _Complex_I -#endif /* IRIX_COMPLEX_CHECK */ - - #if defined( SOLARIS_COMPLEX_CHECK ) #define _Complex_I (__extension__ 1.0iF) #define complex _Complex diff --git a/fixincludes/tests/base/internal/math_core.h b/fixincludes/tests/base/internal/math_core.h deleted file mode 100644 index f39ac3f..0000000 --- a/fixincludes/tests/base/internal/math_core.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/math_core.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX___GENERIC1_CHECK ) -extern int isnan(double); -extern int isnanf(float); -extern int isnanl(long double); -#define isnan(x) (sizeof(x) == sizeof(double) ? _isnan(x) \ - : sizeof(x) == sizeof(float) ? _isnanf(x) \ - : _isnanl(x)) - - -#endif /* IRIX___GENERIC1_CHECK */ - - -#if defined( IRIX___GENERIC2_CHECK ) -#define isless(x,y) \ - ((sizeof(x)<=4 && sizeof(y)<=4) ? _islessf(x,y) \ - : (sizeof(x)<=8 && sizeof(y)<=8) ? _isless(x,y) \ - : _islessl(x,y)) - -#endif /* IRIX___GENERIC2_CHECK */ diff --git a/fixincludes/tests/base/internal/sgimacros.h b/fixincludes/tests/base/internal/sgimacros.h deleted file mode 100644 index a491e865..0000000 --- a/fixincludes/tests/base/internal/sgimacros.h +++ /dev/null @@ -1,17 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/sgimacros.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX___RESTRICT_CHECK ) -#ifdef __c99 -# ifndef __cplusplus -# define __restrict restrict -# endif -#endif /* IRIX___RESTRICT_CHECK */ diff --git a/fixincludes/tests/base/internal/wchar_core.h b/fixincludes/tests/base/internal/wchar_core.h deleted file mode 100644 index 9c9fc4e..0000000 --- a/fixincludes/tests/base/internal/wchar_core.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/wchar_core.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX_WCSFTIME_CHECK ) -#if _NO_XOPEN5 && !defined(__c99) -extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *); -#endif /* IRIX_WCSFTIME_CHECK */ diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h index 9733744..a97e88b 100644 --- a/fixincludes/tests/base/math.h +++ b/fixincludes/tests/base/math.h @@ -27,10 +27,6 @@ #endif - /* This is a comment - and it ends here. */ - - #endif /* BROKEN_CABS_CHECK */ diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h index 054fe50..cb4cfc9 100644 --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -70,13 +70,6 @@ #endif /* GLIBC_MUTEX_INIT_CHECK */ -#if defined( IRIX_PTHREAD_INIT_CHECK ) -#define PTHREAD_MUTEX_INITIALIZER { { 0 } } -#define PTHREAD_COND_INITIALIZER { { 0 } } -#define PTHREAD_RWLOCK_INITIALIZER { { 0 } } -#endif /* IRIX_PTHREAD_INIT_CHECK */ - - #if defined( PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK ) extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */ diff --git a/fixincludes/tests/base/stdint-irix65.h b/fixincludes/tests/base/stdint-irix65.h deleted file mode 100644 index d1757fb..0000000 --- a/fixincludes/tests/base/stdint-irix65.h +++ /dev/null @@ -1,40 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/stdint-irix65.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX_STDINT_C99_TYPES_CHECK ) -#define INT64_MIN (-0x7fffffffffffffffLL - 1) -#define INT64_MAX 0x7fffffffffffffffLL -#define UINT32_MAX 0xffffffffU -#define UINT64_MAX 0xffffffffffffffffULL -#define INTPTR_MIN (-0x7fffffffL - 1) -#define INTPTR_MAX 0x7fffffffL -#define UINTPTR_MAX 0xffffffffUL -#define INTPTR_MIN (-0x7fffffffffffffffL - 1) -#define INTPTR_MAX 0x7fffffffffffffffL -#define UINTPTR_MAX 0xffffffffffffffffUL -#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1) -#define PTRDIFF_MAX 0x7fffffffffffffffL -#define SIZE_MAX 0xffffffffffffffffUL -#endif /* IRIX_STDINT_C99_TYPES_CHECK */ - - -#if defined( IRIX_STDINT_C99_MACROS_CHECK ) -#define INT8_C(x) (x) -#define INT16_C(x) (x) -#define INT32_C(x) (x) -#define INT64_C(x) (x ## LL) -#define UINT8_C(x) (x) -#define UINT16_C(x) (x) -#define UINT32_C(x) (x ## U) -#define UINT64_C(x) (x ## ULL) -#define INTMAX_C(x) (x ## LL) -#define UINTMAX_C(x) (x ## ULL) -#endif /* IRIX_STDINT_C99_MACROS_CHECK */ diff --git a/fixincludes/tests/base/stdint.h b/fixincludes/tests/base/stdint.h index 3d897f8..54da0a1 100644 --- a/fixincludes/tests/base/stdint.h +++ b/fixincludes/tests/base/stdint.h @@ -14,10 +14,3 @@ # define UINT8_C(c) c # define UINT16_C(c) c #endif /* GLIBC_STDINT_CHECK */ - - -#if defined( IRIX_STDINT_C99_MODE_CHECK ) -#if 0 -#error This header file is to be used only for c99 mode compilations -#else -#endif /* IRIX_STDINT_C99_MODE_CHECK */ diff --git a/fixincludes/tests/base/sys/asm.h b/fixincludes/tests/base/sys/asm.h deleted file mode 100644 index 658830a..0000000 --- a/fixincludes/tests/base/sys/asm.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/asm.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX_ASM_APOSTROPHE_CHECK ) - # and we are on vacation -#endif /* IRIX_ASM_APOSTROPHE_CHECK */ diff --git a/fixincludes/tests/base/sys/socket.h b/fixincludes/tests/base/sys/socket.h index 3c6e420..d0cd37e 100644 --- a/fixincludes/tests/base/sys/socket.h +++ b/fixincludes/tests/base/sys/socket.h @@ -25,13 +25,3 @@ #endif #endif /* HPUX11_EXTERN_SENDPATH_CHECK */ - - -#if defined( IRIX_SOCKLEN_T_CHECK ) -#define _SOCKLEN_T -#if _NO_XOPEN4 && _NO_XOPEN5 -typedef int socklen_t; -#else -typedef u_int32_t socklen_t; -#endif /* _NO_XOPEN4 && _NO_XOPEN5 */ -#endif /* IRIX_SOCKLEN_T_CHECK */ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e01bd4b..a12bdeb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,58 @@ +2012-03-14 Rainer Orth + + * config.gcc (enable_obsolete): Remove mips-sgi-irix6.5. + (mips-sgi-irix6.5*): Remove. + * config.host (mips-sgi-irix*): Remove. + * configure.ac (enable_fixed_point): Remove mips*-sgi-irix*. + (set_have_as_tls): Remove *-*-irix6*. + (gcc_cv_ld_static_dynamic): Remove mips-sgi-irix6*. + * configure: Regenerate. + + * config/mips/iris6.h: Remove. + * config/mips/iris6.opt: Remove. + * config/mips/t-irix6: Remove. + + * config/mips/mips.h (TARGET_GPWORD): Remove IRIX 6 N64 handling. + (TARGET_IRIX6): Remove. + (TARGET_CPU_CPP_BUILTINS): Remove IRIX 6 handling. + Don't define LANGUAGE_C, _LANGUAGE_C for Objective-C. + * config/mips/mips.c (mips_build_builtin_va_list): Remove IRIX 6 + handling. + (mips_file_start): Likewise. + * config/mips/mips-protos.h (irix_asm_output_align): Remove. + + * config/mips/driver-native.c [__sgi__]: Remove. + (host_detect_local_cpu) [__sgi__]: Remove. + + * config/mips/gnu-user.h: Remove iris5.h reference. + + * config/mips/mips-modes.def: Remove IRIX 6 reference. + * config/mips/gnu-user64.h (MIPS_TFMODE_FORMAT): Remove. + * config/mips/mips.c (mips_option_override) [MIPS_TFMODE_FORMAT]: + Remove. + + * gcc.c (main): Move asm_debug initialization ... + (asm_debug): ... here. + + * ginclude/stddef.h (__STDDEF_H__): Don't define. + + * defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove. + * system.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Poison. + * collect2.c [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. + (main) [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. + [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES] (is_in_args): Remove. + * doc/tm.texi.in (Driver, LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): + Remove. + * doc/tm.texi: Regenerate. + + * doc/invoke.texi (Debugging Options, -gdwarf-): Remove + IRIX 6 reference. + (MIPS Options, -march): Remove IRIX reference. + * doc/install.texi (Binaries, SGI IRIX): Remove. + (Specific, mips-sgi-irix6): Document IRIX 6.5 removal, remove rest + of section. + * doc/trouble.texi (Interoperation): Remove -lgl_s handling. + 2012-03-14 Martin Jambor * expr.c (expand_assignment): Use expand_expr with EXPAND_WRITE diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fc30f6a..b6e79e9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,47 @@ +2012-03-14 Rainer Orth + + * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove. + + * a-intnam-irix.ads, mlib-tgt-specific-irix.adb, + s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb, + s-osinte-irix.ads, s-proinf-irix-athread.adb, + s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads, + system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads: + Remove. + + * adaint.c [__mips && __sgi]: Remove. + (__gnat_number_of_cpus) [__mips && __sgi]: Remove. + [IS_CROSS && !(__mips && __sgi)]: Remove. + * adaint.h [sgi && _LFAPI]: Remove. + * cstreams.c (__gnat_full_name) [sgi]: Remove. + * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove. + (__gnat_clearenv) [__mips && __sgi]: Remove. + * errno.c (_SGI_MP_SOURCE): Remove. + * gsocket.h [sgi]: Remove. + * init.c: Remove IRIX reference. + [sgi]: Remove. + * link.c [sgi]: Remove. + * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define. + (main) [__mips && __sgi] (MAX_tv_sec): Don't define. + (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove. + * sysdep.c [sgi]: Remove. + (getc_immediate_common) [sgi]: Remove. + (__gnat_localtime_tzoff) [sgi]: Remove. + * terminals.c [__mips && __sgi] (IRIX): Don't define. + [IRIX] (USE_GETPTY): Don't define. + (allocate_pty_desc) [USE_GETPTY]: Remove. + + * g-traceb.ads: Remove IRIX reference. + * g-trasym.ads: Likewise. + * memtrack.adb: Likewise. + * s-interr-sigaction.adb: Likewise. + + * gnat_rm.texi (Implementation Advice): Remove SGI info. + (Implementation Defined Characteristics): Likewise. + * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix): + Remove. + (Irix-Specific Considerations): Remove. + 2012-03-13 Tristan Gingold * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition. diff --git a/gcc/ada/a-intnam-irix.ads b/gcc/ada/a-intnam-irix.ads deleted file mode 100644 index 65859c0..0000000 --- a/gcc/ada/a-intnam-irix.ads +++ /dev/null @@ -1,195 +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 -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the Irix version of this package - --- The following signals are reserved by the run time (Athread library): - --- SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGTRAP, SIGSTOP, SIGKILL - --- The following signals are reserved by the run time (Pthread library): - --- SIGTSTP, SIGILL, SIGTRAP, SIGEMT, SIGFPE, SIGBUS, SIGSTOP, SIGKILL, --- SIGSEGV, SIGSYS, SIGXCPU, SIGXFSZ, SIGPROF, SIGPTINTR, SIGPTRESCHED, --- SIGABRT, SIGINT - --- The pragma Unreserve_All_Interrupts affects the following signal --- (Pthread library): - --- SIGINT: made available for Ada handler - --- This target-dependent package spec contains names of interrupts --- supported by the local system. - -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 := - System.OS_Interface.SIGABRT; -- used by abort, 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 := - System.OS_Interface.SIGPIPE; -- write on pipe with 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 - - SIGCLD : constant Interrupt_ID := - System.OS_Interface.SIGCLD; -- alias for SIGCHLD - - SIGCHLD : constant Interrupt_ID := - System.OS_Interface.SIGCHLD; -- child status change - - SIGPWR : constant Interrupt_ID := - System.OS_Interface.SIGPWR; -- power-fail restart - - 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 := - System.OS_Interface.SIGIO; -- I/O possible (Solaris SIGPOLL alias) - - 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 - - SIGK32 : constant Interrupt_ID := - System.OS_Interface.SIGK32; -- reserved for kernel (IRIX) - - SIGCKPT : constant Interrupt_ID := - System.OS_Interface.SIGCKPT; -- Checkpoint warning - - SIGRESTART : constant Interrupt_ID := - System.OS_Interface.SIGRESTART; -- Restart warning - - SIGUME : constant Interrupt_ID := - System.OS_Interface.SIGUME; -- Uncorrectable memory error - - -- Signals defined for Posix 1003.1c - - SIGPTINTR : constant Interrupt_ID := - System.OS_Interface.SIGPTINTR; -- Pthread Interrupt Signal - - SIGPTRESCHED : constant Interrupt_ID := - System.OS_Interface.SIGPTRESCHED; -- Pthread Rescheduling Signal - - -- Posix 1003.1b signals - - SIGRTMIN : constant Interrupt_ID := - System.OS_Interface.SIGRTMIN; -- Posix 1003.1b signals - - SIGRTMAX : constant Interrupt_ID := - System.OS_Interface.SIGRTMAX; -- Posix 1003.1b signals - -end Ada.Interrupts.Names; diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 8309123..e13b01c 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -62,7 +62,7 @@ extern "C" { #endif /* VxWorks */ -#if (defined (__mips) && defined (__sgi)) || defined (__APPLE__) +#if defined (__APPLE__) #include #endif @@ -2470,9 +2470,6 @@ __gnat_number_of_cpus (void) #if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__) cores = (int) sysconf (_SC_NPROCESSORS_ONLN); -#elif (defined (__mips) && defined (__sgi)) - cores = (int) sysconf (_SC_NPROC_ONLN); - #elif defined (__hpux__) struct pst_dynamic psd; if (pstat_getdynamic (&psd, sizeof (psd), 1, 0) != -1) @@ -3541,8 +3538,7 @@ _flush_cache() && ! defined (__APPLE__) \ && ! defined (_AIX) \ && ! defined (VMS) \ - && ! defined (__MINGW32__) \ - && ! (defined (__mips) && defined (__sgi))) + && ! defined (__MINGW32__)) /* Dummy function to satisfy g-trasym.o. See the preprocessor conditional just above for a list of native platforms that provide a non-dummy diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 12e671f..8c46aed 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -6,7 +6,7 @@ * * * C Header 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- * @@ -51,7 +51,7 @@ extern "C" { determine at compile time what support the system offers for large files. For now we just list the platforms we have manually tested. */ -#if defined (__GLIBC__) || defined (sun) || (defined (__sgi) && defined(_LFAPI)) +#if defined (__GLIBC__) || defined (sun) #define GNAT_FOPEN fopen64 #define GNAT_STAT stat64 #define GNAT_FSTAT fstat64 diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 9b2e9b2..894b056 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -6,7 +6,7 @@ * * * Auxiliary C functions for Interfaces.C.Streams * * * - * 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- * @@ -187,7 +187,7 @@ __gnat_full_name (char *nam, char *buffer) *p = '\\'; } -#elif defined (sgi) || defined (__FreeBSD__) +#elif defined (__FreeBSD__) /* Use realpath function which resolves links and references to . and .. on those Unix systems that support it. Note that GNU/Linux provides it but diff --git a/gcc/ada/env.c b/gcc/ada/env.c index ac7ee21..78328dc 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -229,11 +229,10 @@ void __gnat_unsetenv (char *name) { /* Not implemented */ return; #elif defined (__hpux__) || defined (sun) \ - || (defined (__mips) && defined (__sgi)) \ || (defined (__vxworks) && ! defined (__RTP__)) \ || defined (_AIX) || defined (__Lynx__) - /* On Solaris, HP-UX and IRIX there is no function to clear an environment + /* On Solaris and HP-UX there is no function to clear an environment variable. So we look for the variable in the environ table and delete it by setting the entry to NULL. This can clearly cause some memory leaks but free cannot be used on this context as not all strings in the environ @@ -287,9 +286,9 @@ void __gnat_clearenv (void) { #if defined (VMS) /* not implemented */ return; -#elif defined (sun) || (defined (__mips) && defined (__sgi)) \ +#elif defined (sun) \ || (defined (__vxworks) && ! defined (__RTP__)) || defined (__Lynx__) - /* On Solaris, IRIX, VxWorks (not RTPs), and Lynx there is no system + /* On Solaris, VxWorks (not RTPs), and Lynx there is no system call to unset a variable or to clear the environment so set all the entries in the environ table to NULL (see comment in __gnat_unsetenv for more explanation). */ diff --git a/gcc/ada/errno.c b/gcc/ada/errno.c index 2eec9ac..93c8660 100644 --- a/gcc/ada/errno.c +++ b/gcc/ada/errno.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2009, 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- * @@ -38,7 +38,6 @@ #define _REENTRANT #define _THREAD_SAFE -#define _SGI_MP_SOURCE #ifdef MaRTE diff --git a/gcc/ada/g-traceb.ads b/gcc/ada/g-traceb.ads index 3397014..debb0c4 100644 --- a/gcc/ada/g-traceb.ads +++ b/gcc/ada/g-traceb.ads @@ -60,7 +60,6 @@ -- AiX PowerPC -- HP-UX -- GNU/Linux x86 --- Irix MIPS -- LynxOS x86 -- Solaris x86 -- Solaris sparc diff --git a/gcc/ada/g-trasym.ads b/gcc/ada/g-trasym.ads index 1cc6551..7b4e003 100644 --- a/gcc/ada/g-trasym.ads +++ b/gcc/ada/g-trasym.ads @@ -34,7 +34,6 @@ -- The full capability is currently supported on the following targets: -- HP-UX ia64 --- IRIX -- GNU/Linux x86, x86_64, ia64 -- FreeBSD x86, x86_64 -- Solaris sparc and x86 diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 75d80c5..25d4d91 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1306,49 +1306,6 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),) LIBRARY_VERSION := $(LIB_VERSION) endif -ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),) - LIBGNAT_TARGET_PAIRS = \ - a-intnam.ads -#include - -#ifndef NULL -#define NULL 0 -#endif - -#define SIGADAABORT 48 -#define SIGNAL_STACK_SIZE 4096 -#define SIGNAL_STACK_ALIGNMENT 64 - -#define Check_Abort_Status \ - system__soft_links__check_abort_status -extern int (*Check_Abort_Status) (void); - -extern struct Exception_Data _abort_signal; - -/* We are not setting the SA_SIGINFO bit in the sigaction flags when - connecting that handler, with the effects described in the sigaction - man page: - - SA_SIGINFO If set and the signal is caught, sig is passed as the - first argument to the signal-catching function. If the - second argument is not equal to NULL, it points to a - siginfo_t structure containing the reason why the - signal was generated [see siginfo(5)]; the third - argument points to a ucontext_t structure containing - the receiving process's context when the signal was - delivered [see ucontext(5)]. If cleared and the signal - is caught, the first argument is also the signal number - but the second argument is the signal code identifying - the cause of the signal. The third argument points to a - sigcontext_t structure containing the receiving - process's context when the signal was delivered. This - is the default behavior (see signal(5) for more - details). Additionally, when SA_SIGINFO is set for a - signal, multiple occurrences of that signal will be - queued for delivery in FIFO order (see sigqueue(3) for - a more detailed explanation of this concept), if those - occurrences of that signal were generated using - sigqueue(3). */ - -static void -__gnat_error_handler (int sig, siginfo_t *reason, void *uc ATTRIBUTE_UNUSED) -{ - /* This handler is installed with SA_SIGINFO cleared, but there's no - prototype for the resulting alternative three-argument form, so we - have to hack around this by casting reason to the int actually - passed. */ - int code = (int) reason; - struct Exception_Data *exception; - const char *msg; - - switch (sig) - { - case SIGSEGV: - if (code == EFAULT) - { - exception = &program_error; - msg = "SIGSEGV: (Invalid virtual address)"; - } - else if (code == ENXIO) - { - exception = &program_error; - msg = "SIGSEGV: (Read beyond mapped object)"; - } - else if (code == ENOSPC) - { - exception = &program_error; /* ??? storage_error ??? */ - msg = "SIGSEGV: (Autogrow for file failed)"; - } - else if (code == EACCES || code == EEXIST) - { - /* ??? We handle stack overflows here, some of which do trigger - SIGSEGV + EEXIST on Irix 6.5 although EEXIST is not part of - the documented valid codes for SEGV in the signal(5) man - page. */ - - /* ??? Re-add smarts to further verify that we launched - the stack into a guard page, not an attempt to - write to .text or something. */ - exception = &storage_error; - msg = "SIGSEGV: stack overflow or erroneous memory access"; - } - else - { - /* Just in case the OS guys did it to us again. Sometimes - they fail to document all of the valid codes that are - passed to signal handlers, just in case someone depends - on knowing all the codes. */ - exception = &program_error; - msg = "SIGSEGV: (Undocumented reason)"; - } - break; - - case SIGBUS: - /* Map all bus errors to Program_Error. */ - exception = &program_error; - msg = "SIGBUS"; - break; - - case SIGFPE: - /* Map all fpe errors to Constraint_Error. */ - exception = &constraint_error; - msg = "SIGFPE"; - break; - - case SIGADAABORT: - if ((*Check_Abort_Status) ()) - { - exception = &_abort_signal; - msg = ""; - } - else - return; - - break; - - default: - /* Everything else is a Program_Error. */ - exception = &program_error; - msg = "unhandled signal"; - } - - Raise_From_Signal_Handler (exception, 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! - - The handler is installed with SA_SIGINFO cleared, but there's no - C++ prototype for the three-argument form, so fake it by using - sa_sigaction and casting the arguments instead. */ - - act.sa_sigaction = __gnat_error_handler; - act.sa_flags = SA_NODEFER + SA_RESTART; - sigfillset (&act.sa_mask); - 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); - if (__gnat_get_interrupt_state (SIGADAABORT) != 's') - sigaction (SIGADAABORT, &act, NULL); - - __gnat_handler_installed = 1; -} - /*******************/ /* LynxOS Section */ /*******************/ diff --git a/gcc/ada/link.c b/gcc/ada/link.c index 223147d..88c4846 100644 --- a/gcc/ada/link.c +++ b/gcc/ada/link.c @@ -96,27 +96,7 @@ extern "C" { #define SHARED 'H' #define STATIC 'T' -#if defined (sgi) -const char *__gnat_object_file_option = "-Wl,-objectlist,"; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -int __gnat_link_max = 5000; -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; - -/* The libgcc_s locations have changed in GCC 4. The n32 version used - to be in "lib", it moved to "lib32" and "lib" became the home of - the o32 version. We are targetting n32 by default, so ... */ -#if __GNUC__ < 4 -const char *__gnat_default_libgcc_subdir = "lib"; -#else -const char *__gnat_default_libgcc_subdir = "lib32"; -#endif - -#elif defined (__WIN32) +#if defined (__WIN32) const char *__gnat_object_file_option = ""; const char *__gnat_run_path_option = ""; int __gnat_link_max = 30000; diff --git a/gcc/ada/memtrack.adb b/gcc/ada/memtrack.adb index ec490e2..2499bb7 100644 --- a/gcc/ada/memtrack.adb +++ b/gcc/ada/memtrack.adb @@ -59,7 +59,6 @@ -- AIX -- GNU/Linux -- HP-UX --- Irix -- Solaris -- Alpha OpenVMS diff --git a/gcc/ada/mlib-tgt-specific-irix.adb b/gcc/ada/mlib-tgt-specific-irix.adb deleted file mode 100644 index cba8738..0000000 --- a/gcc/ada/mlib-tgt-specific-irix.adb +++ /dev/null @@ -1,182 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- M L I B . T G T . S P E C I F I C -- --- (IRIX Version) -- --- -- --- B o d y -- --- -- --- Copyright (C) 2003-2008, 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. 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 IRIX version of the body - -with MLib.Fil; -with MLib.Utl; -with Opt; -with Output; use Output; - -package body MLib.Tgt.Specific is - - -- 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; - - --------------------------- - -- 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); - - Lib_File : constant String := - "lib" & MLib.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; - - N_Options : Argument_List := Options; - Options_Last : Natural := N_Options'Last; - -- After moving -lxxx to Options_2, N_Options up to index Options_Last - -- will contain the Options to pass to MLib.Utl.Gcc. - - Real_Options_2 : Argument_List (1 .. Options'Length); - Real_Options_2_Last : Natural := 0; - -- Real_Options_2 up to index Real_Options_2_Last will contain the - -- Options_2 to pass to MLib.Utl.Gcc. - - begin - if Opt.Verbose_Mode then - Write_Str ("building relocatable shared library "); - Write_Line (Lib_Path); - end if; - - -- Move all -lxxx to Options_2 - - declare - Index : Natural := N_Options'First; - Arg : String_Access; - - begin - while Index <= Options_Last loop - Arg := N_Options (Index); - - if Arg'Length > 2 - and then Arg (Arg'First .. Arg'First + 1) = "-l" - then - Real_Options_2_Last := Real_Options_2_Last + 1; - Real_Options_2 (Real_Options_2_Last) := Arg; - N_Options (Index .. Options_Last - 1) := - N_Options (Index + 1 .. Options_Last); - Options_Last := Options_Last - 1; - - else - Index := Index + 1; - end if; - end loop; - end; - - if Lib_Version = "" then - MLib.Utl.Gcc - (Output_File => Lib_Path, - Objects => Ofiles, - Options => N_Options (N_Options'First .. Options_Last), - Driver_Name => Driver_Name, - Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); - - 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 - MLib.Utl.Gcc - (Output_File => Lib_Version, - Objects => Ofiles, - Options => N_Options (N_Options'First .. Options_Last) & - Version_Arg, - Driver_Name => Driver_Name, - Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); - Symbolic_Link_Needed := Lib_Version /= Lib_Path; - - else - MLib.Utl.Gcc - (Output_File => Lib_Dir & Directory_Separator & Lib_Version, - Objects => Ofiles, - Options => N_Options (N_Options'First .. Options_Last) & - Version_Arg, - Driver_Name => Driver_Name, - Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); - 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; - -begin - Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access; - Is_Archive_Ext_Ptr := Is_Archive_Ext'Access; -end MLib.Tgt.Specific; diff --git a/gcc/ada/s-interr-sigaction.adb b/gcc/ada/s-interr-sigaction.adb index b405bb7..46d38f3 100644 --- a/gcc/ada/s-interr-sigaction.adb +++ b/gcc/ada/s-interr-sigaction.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2012, 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- -- @@ -29,7 +29,7 @@ -- -- ------------------------------------------------------------------------------ --- This is the IRIX & NT version of this package +-- This is the NT version of this package with Ada.Task_Identification; with Ada.Unchecked_Conversion; diff --git a/gcc/ada/s-intman-irix.adb b/gcc/ada/s-intman-irix.adb deleted file mode 100644 index 8084d47..0000000 --- a/gcc/ada/s-intman-irix.adb +++ /dev/null @@ -1,137 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T -- --- -- --- B o d y -- --- -- --- Copyright (C) 1995-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 -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is a SGI Pthread version of this package - --- Make a careful study of all signals available under the OS, to see which --- need to be reserved, kept always unmasked, or kept always unmasked. Be on --- the lookout for special signals that may be used by the thread library. - -package body System.Interrupt_Management is - - use System.OS_Interface; - - type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID; - Exception_Interrupts : constant Interrupt_List := - (SIGTSTP, SIGILL, SIGTRAP, SIGEMT, SIGFPE, SIGBUS, SIGSTOP, SIGKILL, - SIGSEGV, SIGSYS, SIGXCPU, SIGXFSZ, SIGPROF, SIGPTINTR, SIGPTRESCHED, - SIGABRT, SIGPIPE); - - Unreserve_All_Interrupts : Interfaces.C.int; - pragma Import - (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts"); - - function State (Int : 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: - - User : constant Character := 'u'; - Runtime : constant Character := 'r'; - 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) - - ---------------- - -- Initialize -- - ---------------- - - Initialized : Boolean := False; - - procedure Initialize is - use type Interfaces.C.int; - begin - if Initialized then - return; - end if; - - Initialized := True; - Abort_Task_Interrupt := SIGABRT; - - -- Change this if you want to use another signal for task abort. - -- SIGTERM might be a good one. - - pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False)); - pragma Assert (Reserve = (Interrupt_ID'Range => False)); - - -- Process state of exception signals - - for J in Exception_Interrupts'Range loop - if State (Exception_Interrupts (J)) /= User then - Keep_Unmasked (Exception_Interrupts (J)) := True; - Reserve (Exception_Interrupts (J)) := True; - end if; - end loop; - - if State (Abort_Task_Interrupt) /= User then - Keep_Unmasked (Abort_Task_Interrupt) := True; - Reserve (Abort_Task_Interrupt) := True; - end if; - - -- Set SIGINT to unmasked state as long as it's - -- not in "User" state. Check for Unreserve_All_Interrupts last - - if State (SIGINT) /= User then - Keep_Unmasked (SIGINT) := True; - end if; - - -- Check all signals for state that requires keeping them - -- unmasked and reserved - - for J in Interrupt_ID'Range loop - if State (J) = Default or else State (J) = Runtime then - Keep_Unmasked (J) := True; - Reserve (J) := True; - end if; - end loop; - - -- Process pragma Unreserve_All_Interrupts. This overrides any - -- settings due to pragma Interrupt_State: - - if Unreserve_All_Interrupts /= 0 then - Keep_Unmasked (SIGINT) := False; - Reserve (SIGINT) := False; - end if; - - -- We do not have Signal 0 in reality. We just use this value - -- to identify not existing signals (see s-intnam.ads). Therefore, - -- Signal 0 should not be used in all signal related operations hence - -- mark it as reserved. - - Reserve (0) := True; - end Initialize; - -end System.Interrupt_Management; diff --git a/gcc/ada/s-mastop-irix.adb b/gcc/ada/s-mastop-irix.adb deleted file mode 100644 index 2c8968b..0000000 --- a/gcc/ada/s-mastop-irix.adb +++ /dev/null @@ -1,351 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- SYSTEM.MACHINE_STATE_OPERATIONS -- --- -- --- B o d y -- --- (Version for IRIX/MIPS) -- --- -- --- Copyright (C) 1999-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 -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This version of Ada.Exceptions.Machine_State_Operations is for use on --- SGI Irix systems. By means of compile time conditional calculations, it --- can handle both n32/n64 and o32 modes. - -with System.Machine_Code; use System.Machine_Code; -with System.Memory; -with System.Soft_Links; use System.Soft_Links; -with Ada.Unchecked_Conversion; - -package body System.Machine_State_Operations is - - use System.Storage_Elements; - - -- The exc_unwind function in libexc operates on a Sigcontext - - -- Type sigcontext_t is defined in /usr/include/sys/signal.h. - -- We define an equivalent Ada type here. From the comments in - -- signal.h: - - -- sigcontext is not part of the ABI - so this version is used to - -- handle 32 and 64 bit applications - it is a constant size regardless - -- of compilation mode, and always returns 64 bit register values - - type Uns32 is mod 2 ** 32; - type Uns64 is mod 2 ** 64; - - type Uns32_Ptr is access all Uns32; - type Uns64_Array is array (Integer range <>) of Uns64; - - type Reg_Array is array (0 .. 31) of Uns64; - - type Sigcontext is record - SC_Regmask : Uns32; -- 0 - SC_Status : Uns32; -- 4 - SC_PC : Uns64; -- 8 - SC_Regs : Reg_Array; -- 16 - SC_Fpregs : Reg_Array; -- 272 - SC_Ownedfp : Uns32; -- 528 - SC_Fpc_Csr : Uns32; -- 532 - SC_Fpc_Eir : Uns32; -- 536 - SC_Ssflags : Uns32; -- 540 - SC_Mdhi : Uns64; -- 544 - SC_Mdlo : Uns64; -- 552 - SC_Cause : Uns64; -- 560 - SC_Badvaddr : Uns64; -- 568 - SC_Triggersave : Uns64; -- 576 - SC_Sigset : Uns64; -- 584 - SC_Fp_Rounded_Result : Uns64; -- 592 - SC_Pancake : Uns64_Array (0 .. 5); - SC_Pad : Uns64_Array (0 .. 26); - end record; - - type Sigcontext_Ptr is access all Sigcontext; - - SC_Regs_Pos : constant String := "16"; - SC_Fpregs_Pos : constant String := "272"; - -- Byte offset of the Integer and Floating Point register save areas - -- within the Sigcontext. - - function To_Sigcontext_Ptr is - new Ada.Unchecked_Conversion (Machine_State, Sigcontext_Ptr); - - type Addr_Int is mod 2 ** Long_Integer'Size; - -- An unsigned integer type whose size is the same as System.Address. - -- We rely on the fact that Long_Integer'Size = System.Address'Size in - -- all ABIs. Type Addr_Int can be converted to Uns64. - - function To_Code_Loc is - new Ada.Unchecked_Conversion (Addr_Int, Code_Loc); - function To_Addr_Int is - new Ada.Unchecked_Conversion (System.Address, Addr_Int); - function To_Uns32_Ptr is - new Ada.Unchecked_Conversion (Addr_Int, Uns32_Ptr); - - -------------------------------- - -- ABI-Dependent Declarations -- - -------------------------------- - - o32 : constant Boolean := System.Word_Size = 32; - n32 : constant Boolean := System.Word_Size = 64; - o32n : constant Natural := Boolean'Pos (o32); - n32n : constant Natural := Boolean'Pos (n32); - -- Flags to indicate which ABI is in effect for this compilation. For the - -- purposes of this unit, the n32 and n64 ABIs are identical. - - LSC : constant Character := Character'Val (o32n * Character'Pos ('w') + - n32n * Character'Pos ('d')); - -- This is 'w' for o32, and 'd' for n32/n64, used for constructing the - -- load/store instructions used to save/restore machine instructions. - - Roff : constant Character := Character'Val (o32n * Character'Pos ('4') + - n32n * Character'Pos ('0')); - -- Offset from first byte of a __uint64 register save location where - -- the register value is stored. For n32/64 we store the entire 64 - -- bit register into the uint64. For o32, only 32 bits are stored - -- at an offset of 4 bytes. This is used as part of expressions with - -- '+' signs on both sides, so a null offset has to be '0' and not ' ' - -- to avoid assembler syntax errors on "X + + Y" in the latter case. - - procedure Update_GP (Scp : Sigcontext_Ptr); - - --------------- - -- Update_GP -- - --------------- - - procedure Update_GP (Scp : Sigcontext_Ptr) is - - type F_op is mod 2 ** 6; - type F_reg is mod 2 ** 5; - type F_imm is new Short_Integer; - - type I_Type is record - op : F_op; - rs : F_reg; - rt : F_reg; - imm : F_imm; - end record; - - pragma Pack (I_Type); - for I_Type'Size use 32; - - type I_Type_Ptr is access all I_Type; - - LW : constant F_op := 2#100011#; - Reg_GP : constant := 28; - - type Address_Int is mod 2 ** Standard'Address_Size; - function To_I_Type_Ptr is new - Ada.Unchecked_Conversion (Address_Int, I_Type_Ptr); - - Ret_Ins : constant I_Type_Ptr := To_I_Type_Ptr (Address_Int (Scp.SC_PC)); - GP_Ptr : Uns32_Ptr; - - begin - if Ret_Ins.op = LW and then Ret_Ins.rt = Reg_GP then - GP_Ptr := To_Uns32_Ptr - (Addr_Int (Scp.SC_Regs (Integer (Ret_Ins.rs))) - + Addr_Int (Ret_Ins.imm)); - Scp.SC_Regs (Reg_GP) := Uns64 (GP_Ptr.all); - end if; - end Update_GP; - - ---------------------------- - -- Allocate_Machine_State -- - ---------------------------- - - function Allocate_Machine_State return Machine_State is - begin - return Machine_State - (Memory.Alloc (Sigcontext'Max_Size_In_Storage_Elements)); - 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 - SC : constant Sigcontext_Ptr := To_Sigcontext_Ptr (M); - begin - return To_Code_Loc (Addr_Int (SC.SC_PC)); - end Get_Code_Loc; - - -------------------------- - -- Machine_State_Length -- - -------------------------- - - function Machine_State_Length return Storage_Offset is - begin - return Sigcontext'Max_Size_In_Storage_Elements; - end Machine_State_Length; - - --------------- - -- Pop_Frame -- - --------------- - - procedure Pop_Frame (M : Machine_State) is - Scp : constant Sigcontext_Ptr := To_Sigcontext_Ptr (M); - - procedure Exc_Unwind (Scp : Sigcontext_Ptr; Fde : Long_Integer := 0); - pragma Import (C, Exc_Unwind, "exc_unwind"); - - pragma Linker_Options ("-lexc"); - - begin - -- exc_unwind is apparently not thread-safe under IRIX, so protect it - -- against race conditions within the GNAT run time. - -- ??? Note that we might want to use a fine grained lock here since - -- Lock_Task is used in many other places. - - Lock_Task.all; - - Exc_Unwind (Scp); - - Unlock_Task.all; - - if Scp.SC_PC = 0 or else Scp.SC_PC = 1 then - - -- A return value of 0 or 1 means exc_unwind couldn't find a parent - -- frame. Propagate_Exception expects a zero return address to - -- indicate TOS. - - Scp.SC_PC := 0; - - else - -- Set the GP to restore to the caller value (not callee value) - -- This is done only in o32 mode. In n32/n64 mode, GP is a normal - -- callee save register - - if o32 then - Update_GP (Scp); - end if; - - -- Adjust the return address to the call site, not the - -- instruction following the branch delay slot. This may - -- be necessary if the last instruction of a pragma No_Return - -- subprogram is a call. The first instruction following the - -- delay slot may be the start of another subprogram. We back - -- off the address by 8, which points safely into the middle - -- of the generated subprogram code, avoiding end effects. - - Scp.SC_PC := Scp.SC_PC - 8; - end if; - end Pop_Frame; - - ----------------------- - -- Set_Machine_State -- - ----------------------- - - procedure Set_Machine_State (M : Machine_State) is - - SI : constant String (1 .. 2) := 's' & LSC; - -- This is "sw" in o32 mode, and "sd" in n32 mode - - SF : constant String (1 .. 4) := 's' & LSC & "c1"; - -- This is "swc1" in o32 mode and "sdc1" in n32 mode - - PI : String renames SC_Regs_Pos; - PF : String renames SC_Fpregs_Pos; - - Scp : Sigcontext_Ptr; - - begin - -- Save the integer registers. Note that we know that $4 points - -- to M, since that is where the first parameter is passed. - -- Restore integer registers from machine state. Note that we know - -- that $4 points to M since this is the standard calling sequence - - <> - - Asm (SI & " $16, 16*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $17, 17*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $18, 18*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $19, 19*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $20, 20*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $21, 21*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $22, 22*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $23, 23*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $24, 24*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $25, 25*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $26, 26*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $27, 27*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $28, 28*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $29, 29*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $30, 30*8+" & Roff & "+" & PI & "($4)", Volatile => True); - Asm (SI & " $31, 31*8+" & Roff & "+" & PI & "($4)", Volatile => True); - - -- Restore floating-point registers from machine state - - Asm (SF & " $f16, 16*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f17, 17*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f18, 18*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f19, 19*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f20, 20*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f21, 21*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f22, 22*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f23, 23*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f24, 24*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f25, 25*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f26, 26*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f27, 27*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f28, 28*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f29, 29*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f30, 30*8+" & Roff & "+" & PF & "($4)", Volatile => True); - Asm (SF & " $f31, 31*8+" & Roff & "+" & PF & "($4)", Volatile => True); - - -- Set the PC value for the context to a location after the - -- prolog has been executed. - - Scp := To_Sigcontext_Ptr (M); - Scp.SC_PC := Uns64 (To_Addr_Int (Past_Prolog'Address)); - - -- We saved the state *inside* this routine, but what we want is - -- the state at the call site. So we need to do one pop operation. - -- This pop operation will properly set the PC value in the machine - -- state, so there is no need to save PC in the above code. - - 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 3005ba7..6ea5775 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -84,15 +84,6 @@ pragma Style_Checks ("M32766"); /** For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX 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. - **/ -#ifdef _XOPEN_IOV_MAX -#define _XOPEN5 -#define IOV_MAX _XOPEN_IOV_MAX -#endif #endif /* Include gsocket.h before any system header so it can redefine FD_SETSIZE */ @@ -1233,11 +1224,11 @@ CND(SIZEOF_tv_usec, "tv_usec") */ /** - ** On Solaris and IRIX, field tv_sec in struct timeval has an undocumented + ** On Solaris, field tv_sec in struct timeval has an undocumented ** hard-wired limit of 100 million. ** On IA64 HP-UX the limit is 2**31 - 1. **/ -#if defined (sun) || (defined (__mips) && defined (__sgi)) +#if defined (sun) # define MAX_tv_sec "100_000_000" #elif defined (__hpux__) @@ -1348,11 +1339,6 @@ CND(CLOCK_MONOTONIC, "System monotonic clock") CND(CLOCK_FASTEST, "Fastest clock") #endif -#if defined (__sgi) -CND(CLOCK_SGI_FAST, "SGI fast clock") -CND(CLOCK_SGI_CYCLE, "SGI CPU clock") -#endif - #ifndef CLOCK_THREAD_CPUTIME_ID # define CLOCK_THREAD_CPUTIME_ID -1 #endif diff --git a/gcc/ada/s-osinte-irix.adb b/gcc/ada/s-osinte-irix.adb deleted file mode 100644 index cc3e015..0000000 --- a/gcc/ada/s-osinte-irix.adb +++ /dev/null @@ -1,87 +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) 1992-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 -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the IRIX 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; - -package body System.OS_Interface is - - ------------------ - -- pthread_init -- - ------------------ - - procedure pthread_init is - begin - null; - end pthread_init; - - ----------------- - -- 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-irix.ads b/gcc/ada/s-osinte-irix.ads deleted file mode 100644 index 365a3de..0000000 --- a/gcc/ada/s-osinte-irix.ads +++ /dev/null @@ -1,519 +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 -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the SGI Pthreads 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 Ada.Unchecked_Conversion; - -with Interfaces.C; - -package System.OS_Interface is - - pragma Preelaborate; - - pragma Linker_Options ("-lpthread"); - - 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; - - ----------- - -- Errno -- - ----------- - - function errno return int; - pragma Import (C, errno, "__get_errno"); - - EINTR : constant := 4; -- interrupted system call - EAGAIN : constant := 11; -- No more processes - ENOMEM : constant := 12; -- Not enough core - EINVAL : constant := 22; -- Invalid argument - ETIMEDOUT : constant := 145; -- Connection timed out - - ------------- - -- Signals -- - ------------- - - Max_Interrupt : constant := 64; - 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) - SIGIOT : constant := 6; -- IOT instruction - SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future - 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 - SIGUSR1 : constant := 16; -- user defined signal 1 - SIGUSR2 : constant := 17; -- user defined signal 2 - SIGCLD : constant := 18; -- alias for SIGCHLD - SIGCHLD : constant := 18; -- child status change - SIGPWR : constant := 19; -- power-fail restart - SIGWINCH : constant := 20; -- window size change - SIGURG : constant := 21; -- urgent condition on IO channel - SIGPOLL : constant := 22; -- pollable event occurred - SIGIO : constant := 22; -- I/O possible (Solaris SIGPOLL alias) - SIGSTOP : constant := 23; -- stop (cannot be caught or ignored) - SIGTSTP : constant := 24; -- user stop requested from tty - SIGCONT : constant := 25; -- stopped process has been continued - SIGTTIN : constant := 26; -- background tty read attempted - SIGTTOU : constant := 27; -- background tty write attempted - SIGVTALRM : constant := 28; -- virtual timer expired - SIGPROF : constant := 29; -- profiling timer expired - SIGXCPU : constant := 30; -- CPU time limit exceeded - SIGXFSZ : constant := 31; -- filesize limit exceeded - SIGK32 : constant := 32; -- reserved for kernel (IRIX) - SIGCKPT : constant := 33; -- Checkpoint warning - SIGRESTART : constant := 34; -- Restart warning - SIGUME : constant := 35; -- Uncorrectable memory error - -- Signals defined for Posix 1003.1c - SIGPTINTR : constant := 47; - SIGPTRESCHED : constant := 48; - -- Posix 1003.1b signals - SIGRTMIN : constant := 49; -- Posix 1003.1b signals - SIGRTMAX : constant := 64; -- Posix 1003.1b signals - - type sigset_t is private; - - function sigaddset (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigaddset, "sigaddset"); - - function sigdelset (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigdelset, "sigdelset"); - - function sigfillset (set : access sigset_t) return int; - pragma Import (C, sigfillset, "sigfillset"); - - function sigismember (set : access sigset_t; sig : Signal) return int; - pragma Import (C, sigismember, "sigismember"); - - function sigemptyset (set : access sigset_t) return int; - pragma Import (C, sigemptyset, "sigemptyset"); - - type array_type_2 is array (Integer range 0 .. 1) of int; - type struct_sigaction is record - sa_flags : int; - sa_handler : System.Address; - sa_mask : sigset_t; - sa_resv : array_type_2; - 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; - - function sigaction - (sig : Signal; - act : struct_sigaction_ptr; - oact : struct_sigaction_ptr := null) return int; - pragma Import (C, sigaction, "sigaction"); - - ---------- - -- Time -- - ---------- - - type timespec is private; - type timespec_ptr is access all timespec; - - type clockid_t is new int; - - SGI_CYCLECNTR_SIZE : constant := 165; - - function syssgi (request : Interfaces.C.int) return Interfaces.C.ptrdiff_t; - pragma Import (C, syssgi, "syssgi"); - - function clock_gettime - (clock_id : clockid_t; - tp : access timespec) return int; - pragma Import (C, clock_gettime, "clock_gettime"); - - function clock_getres - (clock_id : clockid_t; - tp : access timespec) return int; - pragma Import (C, clock_getres, "clock_getres"); - - function To_Duration (TS : timespec) return Duration; - pragma Inline (To_Duration); - - function To_Timespec (D : Duration) return timespec; - pragma Inline (To_Timespec); - - ------------------------- - -- Priority Scheduling -- - ------------------------- - - SCHED_FIFO : constant := 1; - SCHED_RR : constant := 2; - SCHED_TS : constant := 3; - SCHED_OTHER : constant := 3; - SCHED_NP : constant := 4; - - function sched_get_priority_min (Policy : int) return int; - pragma Import (C, sched_get_priority_min, "sched_get_priority_min"); - - function sched_get_priority_max (Policy : int) return int; - pragma Import (C, sched_get_priority_max, "sched_get_priority_max"); - - ------------- - -- Process -- - ------------- - - type pid_t is private; - - function kill (pid : pid_t; sig : Signal) return int; - pragma Import (C, kill, "kill"); - - function getpid return pid_t; - pragma Import (C, getpid, "getpid"); - - ------------- - -- 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; - - -- Read/Write lock not supported on SGI. To add support both types - -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined - -- with the associated routines pthread_rwlock_[init/destroy] and - -- pthread_rwlock_[rdlock/wrlock/unlock]. - - subtype pthread_rwlock_t is pthread_mutex_t; - subtype pthread_rwlockattr_t is pthread_mutexattr_t; - - ----------- - -- Stack -- - ----------- - - Alternate_Stack_Size : constant := 0; - -- No alternate signal stack is used on this platform - - --------------------------------------- - -- 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, "sigwait"); - - function pthread_kill - (thread : pthread_t; - sig : Signal) return int; - pragma Import (C, pthread_kill, "pthread_kill"); - - function pthread_sigmask - (how : int; - set : access sigset_t; - oset : access sigset_t) return int; - pragma Import (C, pthread_sigmask, "pthread_sigmask"); - - -------------------------- - -- POSIX.1c Section 11 -- - -------------------------- - - function pthread_mutexattr_init - (attr : access pthread_mutexattr_t) return int; - pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init"); - - function pthread_mutexattr_destroy - (attr : access pthread_mutexattr_t) return int; - pragma Import (C, pthread_mutexattr_destroy, "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, "pthread_condattr_init"); - - function pthread_condattr_destroy - (attr : access pthread_condattr_t) return int; - pragma Import (C, pthread_condattr_destroy, "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 -- - -------------------------- - - PTHREAD_PRIO_NONE : constant := 0; - PTHREAD_PRIO_PROTECT : constant := 2; - PTHREAD_PRIO_INHERIT : constant := 1; - - 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; - end record; - pragma Convention (C, struct_sched_param); - - function pthread_setschedparam - (thread : pthread_t; - policy : int; - param : access struct_sched_param) - return int; - pragma Import (C, pthread_setschedparam, "pthread_setschedparam"); - - function pthread_attr_setscope - (attr : access pthread_attr_t; - contentionscope : int) return int; - pragma Import (C, pthread_attr_setscope, "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, "pthread_attr_setschedparam"); - - function sched_yield return int; - pragma Import (C, sched_yield, "sched_yield"); - - --------------------------- - -- P1003.1c - Section 16 -- - --------------------------- - - function pthread_attr_init (attributes : access pthread_attr_t) return int; - pragma Import (C, pthread_attr_init, "pthread_attr_init"); - - function pthread_attr_destroy - (attributes : access pthread_attr_t) return int; - pragma Import (C, pthread_attr_destroy, "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 Import (C, pthread_self, "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, "pthread_key_create"); - - ------------------- - -- SGI Additions -- - ------------------- - - -- Non portable SGI 6.5 additions to the pthread interface must be - -- executed from within the context of a system scope task. - - function pthread_setrunon_np (cpu : int) return int; - pragma Import (C, pthread_setrunon_np, "pthread_setrunon_np"); - -private - - type array_type_1 is array (Integer range 0 .. 3) of unsigned; - type sigset_t is record - X_X_sigbits : array_type_1; - end record; - pragma Convention (C, sigset_t); - - type pid_t is new long; - - type time_t is new long; - - type timespec is record - tv_sec : time_t; - tv_nsec : long; - end record; - pragma Convention (C, timespec); - - type array_type_9 is array (Integer range 0 .. 4) of long; - type pthread_attr_t is record - X_X_D : array_type_9; - end record; - pragma Convention (C, pthread_attr_t); - - type array_type_8 is array (Integer range 0 .. 1) of long; - type pthread_condattr_t is record - X_X_D : array_type_8; - end record; - pragma Convention (C, pthread_condattr_t); - - type array_type_7 is array (Integer range 0 .. 1) of long; - type pthread_mutexattr_t is record - X_X_D : array_type_7; - end record; - pragma Convention (C, pthread_mutexattr_t); - - type pthread_t is new unsigned; - - type array_type_10 is array (Integer range 0 .. 7) of long; - type pthread_mutex_t is record - X_X_D : array_type_10; - end record; - pragma Convention (C, pthread_mutex_t); - - type array_type_11 is array (Integer range 0 .. 7) of long; - type pthread_cond_t is record - X_X_D : array_type_11; - end record; - pragma Convention (C, pthread_cond_t); - - type pthread_key_t is new int; - -end System.OS_Interface; diff --git a/gcc/ada/s-proinf-irix-athread.adb b/gcc/ada/s-proinf-irix-athread.adb deleted file mode 100644 index 31e4dcc..0000000 --- a/gcc/ada/s-proinf-irix-athread.adb +++ /dev/null @@ -1,225 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- S Y S T E M . P R O G R A M _ I N F O -- --- -- --- B o d y -- --- -- --- Copyright (C) 1997-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 -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is an Irix (old pthread library) version of this package - --- This package contains the parameters used by the run-time system at --- program startup. These parameters are isolated in this package body to --- facilitate replacement by the end user. --- --- To replace the default values, copy this source file into your build --- directory, edit the file to reflect your desired behavior, and recompile --- with the command: --- --- % gcc -c -O2 -gnatpg s-proinf.adb --- --- then relink your application as usual. - -pragma Warnings (Off); -- why??? -with System.OS_Lib; -pragma Warnings (On); - -package body System.Program_Info is - - Kbytes : constant := 1024; - - Default_Initial_Sproc_Count : constant := 0; - Default_Max_Sproc_Count : constant := 128; - Default_Sproc_Stack_Size : constant := 16#4000#; - Default_Stack_Guard_Pages : constant := 1; - Default_Default_Time_Slice : constant := 0.0; - Default_Default_Task_Stack : constant := 12 * Kbytes; - Default_Pthread_Sched_Signal : constant := 35; - Default_Pthread_Arena_Size : constant := 16#40000#; - Default_Os_Default_Priority : constant := 0; - - ------------------------- - -- Initial_Sproc_Count -- - ------------------------- - - function Initial_Sproc_Count return Integer is - - function sysmp (P1 : Integer) return Integer; - pragma Import (C, sysmp, "sysmp", "sysmp"); - - MP_NPROCS : constant := 1; -- # processor in complex - - Pthread_Sproc_Count : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv ("PTHREAD_SPROC_COUNT"); - - begin - if Pthread_Sproc_Count.all'Length = 0 then - return Default_Initial_Sproc_Count; - - elsif Pthread_Sproc_Count.all = "AUTO" then - return sysmp (MP_NPROCS); - - else - return Integer'Value (Pthread_Sproc_Count.all); - end if; - - exception - when others => - return Default_Initial_Sproc_Count; - end Initial_Sproc_Count; - - --------------------- - -- Max_Sproc_Count -- - --------------------- - - function Max_Sproc_Count return Integer is - Pthread_Max_Sproc_Count : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv ("PTHREAD_MAX_SPROC_COUNT"); - - begin - if Pthread_Max_Sproc_Count.all'Length = 0 then - return Default_Max_Sproc_Count; - else - return Integer'Value (Pthread_Max_Sproc_Count.all); - end if; - exception - when others => - return Default_Max_Sproc_Count; - end Max_Sproc_Count; - - ---------------------- - -- Sproc_Stack_Size -- - ---------------------- - - function Sproc_Stack_Size return Integer is - begin - return Default_Sproc_Stack_Size; - end Sproc_Stack_Size; - - ------------------------ - -- Default_Time_Slice -- - ------------------------ - - function Default_Time_Slice return Duration is - Pthread_Time_Slice_Sec : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv - ("PTHREAD_TIME_SLICE_SEC"); - Pthread_Time_Slice_Usec : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv - ("PTHREAD_TIME_SLICE_USEC"); - - Val_Sec, Val_Usec : Integer := 0; - - begin - if Pthread_Time_Slice_Sec.all'Length /= 0 or - Pthread_Time_Slice_Usec.all'Length /= 0 - then - if Pthread_Time_Slice_Sec.all'Length /= 0 then - Val_Sec := Integer'Value (Pthread_Time_Slice_Sec.all); - end if; - - if Pthread_Time_Slice_Usec.all'Length /= 0 then - Val_Usec := Integer'Value (Pthread_Time_Slice_Usec.all); - end if; - - return Duration (Val_Sec) + Duration (Val_Usec) / 1000.0; - else - return Default_Default_Time_Slice; - end if; - - exception - when others => - return Default_Default_Time_Slice; - end Default_Time_Slice; - - ------------------------ - -- Default_Task_Stack -- - ------------------------ - - function Default_Task_Stack return Integer is - begin - return Default_Default_Task_Stack; - end Default_Task_Stack; - - ----------------------- - -- Stack_Guard_Pages -- - ----------------------- - - function Stack_Guard_Pages return Integer is - Pthread_Stack_Guard_Pages : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv - ("PTHREAD_STACK_GUARD_PAGES"); - begin - if Pthread_Stack_Guard_Pages.all'Length /= 0 then - return Integer'Value (Pthread_Stack_Guard_Pages.all); - else - return Default_Stack_Guard_Pages; - end if; - exception - when others => - return Default_Stack_Guard_Pages; - end Stack_Guard_Pages; - - -------------------------- - -- Pthread_Sched_Signal -- - -------------------------- - - function Pthread_Sched_Signal return Integer is - begin - return Default_Pthread_Sched_Signal; - end Pthread_Sched_Signal; - - ------------------------ - -- Pthread_Arena_Size -- - ------------------------ - - function Pthread_Arena_Size return Integer is - Pthread_Arena_Size : constant System.OS_Lib.String_Access := - System.OS_Lib.Getenv - ("PTHREAD_ARENA_SIZE"); - - begin - if Pthread_Arena_Size.all'Length = 0 then - return Default_Pthread_Arena_Size; - else - return Integer'Value (Pthread_Arena_Size.all); - end if; - - exception - when others => - return Default_Pthread_Arena_Size; - end Pthread_Arena_Size; - - ------------------------- - -- Os_Default_Priority -- - ------------------------- - - function Os_Default_Priority return Integer is - begin - return Default_Os_Default_Priority; - end Os_Default_Priority; - -end System.Program_Info; diff --git a/gcc/ada/s-proinf-irix-athread.ads b/gcc/ada/s-proinf-irix-athread.ads deleted file mode 100644 index 8c24a55..0000000 --- a/gcc/ada/s-proinf-irix-athread.ads +++ /dev/null @@ -1,76 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- S Y S T E M . P R O G R A M _ I N F O -- --- -- --- S p e c -- --- -- --- Copyright (C) 1997-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 -- --- . -- --- -- --- 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 used as parameters to --- the run-time system at program startup for the SGI implementation. - -package System.Program_Info is - pragma Preelaborate; - - function Initial_Sproc_Count return Integer; - -- The number of sproc created at program startup for scheduling threads - - function Max_Sproc_Count return Integer; - -- The maximum number of sprocs that can be created by the program for - -- servicing threads. This limit includes both the pre-created sprocs and - -- those explicitly created under program control. - - function Sproc_Stack_Size return Integer; - -- The size, in bytes, of the sproc's initial stack - - function Default_Time_Slice return Duration; - -- The default time quanta for round-robin scheduling of threads of - -- equal priority. This default value can be overridden on a per-task - -- basis by specifying an alternate value via the implementation-defined - -- Task_Info pragma. See s-tasinf.ads for more information. - - function Default_Task_Stack return Integer; - -- The default stack size for each created thread. This default value can - -- be overridden on a per-task basis by the language-defined Storage_Size - -- pragma. - - function Stack_Guard_Pages return Integer; - -- The number of non-writable, guard pages to append to the bottom of - -- each thread's stack. - - function Pthread_Sched_Signal return Integer; - -- The signal used by the Pthreads library to affect scheduling actions - -- in remote sprocs. - - function Pthread_Arena_Size return Integer; - -- The size of the shared arena from which pthread locks are allocated. - -- See the usinit(3p) man page for more information on shared arenas. - - function Os_Default_Priority return Integer; - -- The default Irix Non-Degrading priority for each sproc created to - -- service threads. - -end System.Program_Info; diff --git a/gcc/ada/s-taprop-irix.adb b/gcc/ada/s-taprop-irix.adb deleted file mode 100644 index 8893c01..0000000 --- a/gcc/ada/s-taprop-irix.adb +++ /dev/null @@ -1,1358 +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 -- --- . -- --- -- --- GNARL was developed by the GNARL team at Florida State University. -- --- Extensive contributions were provided by Ada Core Technologies, Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is a IRIX (pthread library) 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 Ada.Unchecked_Conversion; - -with Interfaces.C; - -with System.Task_Info; -with System.Tasking.Debug; -with System.Interrupt_Management; -with System.OS_Constants; -with System.OS_Primitives; -with System.IO; - -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; - use System.Tasking.Debug; - use Interfaces.C; - use System.OS_Interface; - use System.OS_Primitives; - use System.Parameters; - - ---------------- - -- 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 - - Locking_Policy : Character; - pragma Import (C, Locking_Policy, "__gl_locking_policy"); - - Time_Slice_Val : Integer; - pragma Import (C, Time_Slice_Val, "__gl_time_slice_val"); - - Dispatching_Policy : Character; - pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); - - Unblocked_Signal_Mask : aliased sigset_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 -- - ----------------------- - - function To_Address is - new Ada.Unchecked_Conversion (Task_Id, System.Address); - - procedure Abort_Handler (Sig : Signal); - -- Signal handler used to implement asynchronous abort - - ------------------- - -- Abort_Handler -- - ------------------- - - procedure Abort_Handler (Sig : Signal) is - pragma Unreferenced (Sig); - - T : constant Task_Id := Self; - Result : Interfaces.C.int; - Old_Set : aliased sigset_t; - - 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 - then - -- 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 (On); - pragma Unreferenced (T); - 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 - Result := - pthread_mutexattr_setprotocol - (Attributes'Access, PTHREAD_PRIO_PROTECT); - pragma Assert (Result = 0); - - Result := - pthread_mutexattr_setprioceiling - (Attributes'Access, Interfaces.C.int (Prio)); - pragma Assert (Result = 0); - end if; - - Result := pthread_mutex_init (L.WO'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; - - if Locking_Policy = 'C' then - Result := pthread_mutexattr_setprotocol - (Attributes'Access, PTHREAD_PRIO_PROTECT); - pragma Assert (Result = 0); - - Result := pthread_mutexattr_setprioceiling - (Attributes'Access, Interfaces.C.int (System.Any_Priority'Last)); - pragma Assert (Result = 0); - 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.WO'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; - - begin - Result := pthread_mutex_lock (L.WO'Access); - Ceiling_Violation := Result = EINVAL; - - -- Assumes the cause of EINVAL is a priority ceiling violation - - pragma Assert (Result = 0 or else Result = EINVAL); - 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.WO'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 : ST.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 -- - ----------------- - - procedure Timed_Sleep - (Self_ID : Task_Id; - Time : Duration; - Mode : ST.Delay_Modes; - Reason : 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 else errno = EINTR then - Timedout := False; - exit; - end if; - 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 - -- The clock_getres (OSC.CLOCK_RT_Ada) function appears to return - -- the interrupt resolution of the realtime clock and not the actual - -- resolution of reading the clock. Even though this last value is - -- only guaranteed to be 100 Hz, at least the Origin 200 appears to - -- have a microsecond resolution or better. - - -- ??? We should figure out a method to return the right value on - -- all SGI hardware. - - return 0.000_001; - end RT_Resolution; - - ------------ - -- Wakeup -- - ------------ - - procedure Wakeup (T : ST.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; - Sched_Policy : Interfaces.C.int; - - use type System.Task_Info.Task_Info_Type; - - function To_Int is new Ada.Unchecked_Conversion - (System.Task_Info.Thread_Scheduling_Policy, Interfaces.C.int); - - function Get_Policy (Prio : System.Any_Priority) return Character; - pragma Import (C, Get_Policy, "__gnat_get_specific_dispatching"); - -- Get priority specific dispatching policy - - 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 (Prio); - - if T.Common.Task_Info /= null then - Sched_Policy := To_Int (T.Common.Task_Info.Policy); - - elsif Dispatching_Policy = 'R' - or else Priority_Specific_Policy = 'R' - or else Time_Slice_Val > 0 - then - Sched_Policy := SCHED_RR; - - else - Sched_Policy := SCHED_FIFO; - end if; - - Result := pthread_setschedparam (T.Common.LL.Thread, Sched_Policy, - Param'Access); - 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 - Result : Interfaces.C.int; - - function To_Int is new Ada.Unchecked_Conversion - (System.Task_Info.CPU_Number, Interfaces.C.int); - - use System.Task_Info; - - begin - Self_ID.Common.LL.Thread := pthread_self; - Specific.Set (Self_ID); - - if Self_ID.Common.Task_Info /= null - and then Self_ID.Common.Task_Info.Scope = PTHREAD_SCOPE_SYSTEM - and then Self_ID.Common.Task_Info.Runon_CPU /= ANY_CPU - then - Result := pthread_setrunon_np - (To_Int (Self_ID.Common.Task_Info.Runon_CPU)); - pragma Assert (Result = 0); - end if; - 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 - Result : Interfaces.C.int; - Cond_Attr : aliased pthread_condattr_t; - - begin - if not Single_Lock then - Initialize_Lock (Self_ID.Common.LL.L'Access, ATCB_Level); - 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 - use System.Task_Info; - - Attributes : aliased pthread_attr_t; - Sched_Param : aliased struct_sched_param; - Result : Interfaces.C.int; - - function Thread_Body_Access is new - Ada.Unchecked_Conversion (System.Address, Thread_Body); - function To_Int is new Ada.Unchecked_Conversion - (System.Task_Info.Thread_Scheduling_Scope, Interfaces.C.int); - function To_Int is new Ada.Unchecked_Conversion - (System.Task_Info.Thread_Scheduling_Inheritance, Interfaces.C.int); - function To_Int is new Ada.Unchecked_Conversion - (System.Task_Info.Thread_Scheduling_Policy, Interfaces.C.int); - - begin - 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, Interfaces.C.size_t (Stack_Size)); - pragma Assert (Result = 0); - - if T.Common.Task_Info /= null then - Result := - pthread_attr_setscope - (Attributes'Access, To_Int (T.Common.Task_Info.Scope)); - pragma Assert (Result = 0); - - Result := - pthread_attr_setinheritsched - (Attributes'Access, To_Int (T.Common.Task_Info.Inheritance)); - pragma Assert (Result = 0); - - Result := - pthread_attr_setschedpolicy - (Attributes'Access, To_Int (T.Common.Task_Info.Policy)); - pragma Assert (Result = 0); - - Sched_Param.sched_priority := - Interfaces.C.int (T.Common.Task_Info.Priority); - - Result := - pthread_attr_setschedparam - (Attributes'Access, Sched_Param'Access); - 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)); - - if Result /= 0 - and then T.Common.Task_Info /= null - and then T.Common.Task_Info.Scope = PTHREAD_SCOPE_SYSTEM - then - -- The pthread_create call may have failed because we asked for a - -- system scope pthread and none were available (probably because - -- the program was not executed by the superuser). Let's try for - -- a process scope pthread instead of raising Tasking_Error. - - System.IO.Put_Line - ("Request for PTHREAD_SCOPE_SYSTEM in Task_Info pragma for task"); - System.IO.Put (""""); - System.IO.Put (T.Common.Task_Image (1 .. T.Common.Task_Image_Len)); - System.IO.Put_Line (""" could not be honored. "); - System.IO.Put_Line ("Scope changed to PTHREAD_SCOPE_PROCESS"); - - T.Common.Task_Info.Scope := PTHREAD_SCOPE_PROCESS; - Result := - pthread_attr_setscope - (Attributes'Access, To_Int (T.Common.Task_Info.Scope)); - pragma Assert (Result = 0); - - -- 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 - -- aliasing problems and Unrestricted_Access bypasses this check. - - Result := - pthread_create - (T.Common.LL.Thread'Unrestricted_Access, - Attributes'Access, - Thread_Body_Access (Wrapper), - To_Address (T)); - end if; - - pragma Assert (Result = 0 or else Result = EAGAIN); - - Succeeded := Result = 0; - - if Succeeded then - - -- The following needs significant commenting ??? - - if T.Common.Task_Info /= null then - T.Common.Base_Priority := T.Common.Task_Info.Priority; - Set_Priority (T, T.Common.Task_Info.Priority); - else - Set_Priority (T, Priority); - end if; - end if; - - Result := pthread_attr_destroy (Attributes'Access); - pragma Assert (Result = 0); - 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); - 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); - pragma Assert (Result = 0); - - 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); - - 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; - - 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 - Result := pthread_condattr_destroy (Cond_Attr'Access); - pragma Assert (Result = 0); - raise Storage_Error; - end if; - end if; - - Result := pthread_condattr_destroy (Cond_Attr'Access); - pragma Assert (Result = 0); - 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 it is specified in ARM D.10 par. 9. Otherwise, it just leaves - -- the state 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 - -- (RM 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 (ARM D.10 par. 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); - pragma Unreferenced (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); - pragma Unreferenced (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; - - -- 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); - - -- 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; - - 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-irix.ads b/gcc/ada/s-tasinf-irix.ads deleted file mode 100644 index 6e9394f..0000000 --- a/gcc/ada/s-tasinf-irix.ads +++ /dev/null @@ -1,118 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT COMPILER COMPONENTS -- --- -- --- S Y S T E M . T A S K _ I N F O -- --- -- --- S p e c -- --- -- --- Copyright (C) 1992-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 -- --- . -- --- -- --- 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 the IRIX (kernel threads) version of this package - -with Interfaces.C; - -package System.Task_Info is - pragma Preelaborate; - pragma Elaborate_Body; - -- To ensure that a body is allowed - - ----------------------------------------- - -- Implementation of Task_Info Feature -- - ----------------------------------------- - - -- Pragma Task_Info allows an application to set the underlying - -- pthread scheduling attributes for a specific task. - - ------------------ - -- Declarations -- - ------------------ - - type Thread_Scheduling_Scope is - (PTHREAD_SCOPE_PROCESS, PTHREAD_SCOPE_SYSTEM); - - for Thread_Scheduling_Scope'Size use Interfaces.C.int'Size; - - type Thread_Scheduling_Inheritance is - (PTHREAD_EXPLICIT_SCHED, PTHREAD_INHERIT_SCHED); - - for Thread_Scheduling_Inheritance'Size use Interfaces.C.int'Size; - - type Thread_Scheduling_Policy is - (SCHED_FIFO, -- The first-in-first-out real-time policy - SCHED_RR, -- The round-robin real-time scheduling policy - SCHED_TS); -- The timeshare earnings based scheduling policy - - for Thread_Scheduling_Policy'Size use Interfaces.C.int'Size; - for Thread_Scheduling_Policy use - (SCHED_FIFO => 1, - SCHED_RR => 2, - SCHED_TS => 3); - - function SCHED_OTHER return Thread_Scheduling_Policy renames SCHED_TS; - - No_Specified_Priority : constant := -1; - - subtype Thread_Scheduling_Priority is Integer range - No_Specified_Priority .. 255; - - subtype FIFO_Priority is Thread_Scheduling_Priority range 0 .. 255; - - subtype RR_Priority is Thread_Scheduling_Priority range 0 .. 255; - - subtype TS_Priority is Thread_Scheduling_Priority range 1 .. 40; - - subtype OTHER_Priority is Thread_Scheduling_Priority range 1 .. 40; - - subtype CPU_Number is Integer range -1 .. Integer'Last; - ANY_CPU : constant CPU_Number := CPU_Number'First; - - type Thread_Attributes is record - Scope : Thread_Scheduling_Scope := PTHREAD_SCOPE_PROCESS; - Inheritance : Thread_Scheduling_Inheritance := PTHREAD_EXPLICIT_SCHED; - Policy : Thread_Scheduling_Policy := SCHED_RR; - Priority : Thread_Scheduling_Priority := No_Specified_Priority; - Runon_CPU : CPU_Number := ANY_CPU; - end record; - - Default_Thread_Attributes : constant Thread_Attributes := - (PTHREAD_SCOPE_PROCESS, PTHREAD_EXPLICIT_SCHED, SCHED_RR, - No_Specified_Priority, ANY_CPU); - - type Task_Info_Type is access all Thread_Attributes; - - Unspecified_Task_Info : constant Task_Info_Type := null; - -- Value passed to task in the absence of a Task_Info pragma - -end System.Task_Info; diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 3fc51f8..61e934f 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -251,7 +251,7 @@ __gnat_ttyname (int filedes) } #endif -#if defined (linux) || defined (sun) || defined (sgi) \ +#if defined (linux) || defined (sun) \ || defined (WINNT) \ || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \ || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \ @@ -309,7 +309,7 @@ getc_immediate_common (FILE *stream, int *avail, int waiting) { -#if defined (linux) || defined (sun) || defined (sgi) \ +#if defined (linux) || defined (sun) \ || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \ || defined (_AIX) || (defined (__svr4__) && defined (i386)) \ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ @@ -329,7 +329,7 @@ getc_immediate_common (FILE *stream, /* Set RAW mode, with no echo */ termios_rec.c_lflag = termios_rec.c_lflag & ~ICANON & ~ECHO; -#if defined(linux) || defined (sun) || defined (sgi) \ +#if defined(linux) || defined (sun) \ || defined (__MACHTEN__) || defined (__hpux__) \ || defined (_AIX) || (defined (__svr4__) && defined (i386)) \ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ @@ -780,8 +780,8 @@ __gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off) { struct tm tp; -/* AIX, HPUX, SGI Irix, Sun Solaris */ -#if defined (_AIX) || defined (__hpux__) || defined (sgi) || defined (sun) +/* AIX, HPUX, Sun Solaris */ +#if defined (_AIX) || defined (__hpux__) || defined (sun) { (*Lock_Task) (); diff --git a/gcc/ada/system-irix-n32.ads b/gcc/ada/system-irix-n32.ads deleted file mode 100644 index 3dd0810..0000000 --- a/gcc/ada/system-irix-n32.ads +++ /dev/null @@ -1,158 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (SGI Irix, n32 ABI) -- --- -- --- 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 -- --- . -- --- -- --- 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 := 0.01; - - -- 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 ** 32; - - -- 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 := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- IRIX priorities as defined by realtime(5): - -- - -- 255 is for system-level interrupts - -- 240 - 254 are suggested for hard real-time threads - -- 200 - 239 are used by system device driver interrupt threads - -- 110 - 199 are suggested for interactive real-time applications - -- 90 - 109 are used by system daemon threads - -- 0 - 89 are suggested for soft real-time applications - -- - -- We don't express the full range of IRIX priorities. For now, we - -- handle only the subset for soft real-time applications. - - Max_Priority : constant Positive := 88; - Max_Interrupt_Priority : constant Positive := 89; - - subtype Any_Priority is Integer range 0 .. 89; - subtype Priority is Any_Priority range 0 .. 88; - subtype Interrupt_Priority is Any_Priority range 89 .. 89; - - Default_Priority : constant Priority := 44; - -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 := False; - 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 not supported on the - -- R10000, and we want the code to be valid for this processor. - -end System; diff --git a/gcc/ada/system-irix-n64.ads b/gcc/ada/system-irix-n64.ads deleted file mode 100644 index 916fa4d..0000000 --- a/gcc/ada/system-irix-n64.ads +++ /dev/null @@ -1,159 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (SGI Irix, n64 ABI) -- --- -- --- 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 -- --- . -- --- -- --- 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 := 0.01; - - -- 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 := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- IRIX priorities as defined by realtime(5): - -- - -- 255 is for system-level interrupts - -- 240 - 254 are suggested for hard real-time threads - -- 200 - 239 are used by system device driver interrupt threads - -- 110 - 199 are suggested for interactive real-time applications - -- 90 - 109 are used by system daemon threads - -- 0 - 89 are suggested for soft real-time applications - -- - -- We don't express the full range of IRIX priorities. For now, we - -- handle only the subset for soft real-time applications. - - Max_Priority : constant Positive := 88; - Max_Interrupt_Priority : constant Positive := 89; - - subtype Any_Priority is Integer range 0 .. 89; - subtype Priority is Any_Priority range 0 .. 88; - subtype Interrupt_Priority is Any_Priority range 89 .. 89; - - Default_Priority : constant Priority := 44; - -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 := False; - 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 := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_64_Bit_Divides : constant Boolean := True; - 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 not supported on the - -- R10000, and we want the code to be valid for this processor. - -end System; diff --git a/gcc/ada/system-irix-o32.ads b/gcc/ada/system-irix-o32.ads deleted file mode 100644 index 91d0afd..0000000 --- a/gcc/ada/system-irix-o32.ads +++ /dev/null @@ -1,146 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (SGI Irix, o32 ABI) -- --- -- --- 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 -- --- . -- --- -- --- 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 := 0.01; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- 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 := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - Max_Priority : constant Positive := 30; - Max_Interrupt_Priority : constant Positive := 31; - - subtype Any_Priority is Integer range 0 .. 31; - subtype Priority is Any_Priority range 0 .. 30; - subtype Interrupt_Priority is Any_Priority range 31 .. 31; - - Default_Priority : constant Priority := 15; - -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 := False; - 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 not supported on the - -- R10000, and we want the code to be valid for this processor. - -end System; diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c index cb1414a..ca672c4 100644 --- a/gcc/ada/terminals.c +++ b/gcc/ada/terminals.c @@ -976,9 +976,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) || defined (__DragonFly__) # define FREEBSD #endif -#if defined (__mips) && defined (__sgi) -# define IRIX -#endif /* Include every system header we need */ #define _GNU_SOURCE @@ -1025,7 +1022,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) 1- using a cloning device (USE_CLONE_DEVICE) 2- getpt (USE_GETPT) 3- openpty (USE_OPENPTY) - 4- _getpty (USE_GETPTY) When using the cloning device method, the macro USE_CLONE_DEVICE should contains a full path to the adequate device. @@ -1037,8 +1033,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) /* Configurable part */ #if defined (__APPLE__) || defined (FREEBSD) #define USE_OPENPTY -#elif defined (IRIX) -#define USE_GETPTY #elif defined (linux) #define USE_GETPT #elif defined (sun) @@ -1093,9 +1087,6 @@ allocate_pty_desc (pty_desc **desc) { master_fd = getpt (); #elif defined (USE_OPENPTY) status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); -#elif defined (USE_GETPTY) - slave_name = _getpty (&master_fd, O_RDWR | O_NDELAY, 0600, 0); - if (slave_name == NULL) status = -1; #elif defined (USE_CLONE_DEVICE) master_fd = open (USE_CLONE_DEVICE, O_RDWR | O_NONBLOCK, 0); #else diff --git a/gcc/collect2.c b/gcc/collect2.c index a44b2e7..a52e95a 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1,7 +1,7 @@ /* Collect static initialization info into data structures that can be traversed by C++ initialization and finalization routines. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). Heavily modified by Michael Meissner (meissner@cygnus.com), @@ -323,9 +323,6 @@ static void write_c_file_glob (FILE *, const char *); #ifdef SCAN_LIBRARIES static void scan_libraries (const char *); #endif -#if LINK_ELIMINATE_DUPLICATE_LDIRECTORIES -static int is_in_args (const char *, const char **, const char **); -#endif #ifdef COLLECT_EXPORT_LIST #if 0 static int is_in_list (const char *, struct id *); @@ -1524,15 +1521,6 @@ main (int argc, char **argv) case 'L': add_prefix (&cmdline_lib_dirs, arg+2); break; -#else -#if LINK_ELIMINATE_DUPLICATE_LDIRECTORIES - case 'L': - if (is_in_args (arg, - CONST_CAST2 (const char **, char **, ld1_argv), - ld1 - 1)) - --ld1; - break; -#endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */ #endif case 'o': @@ -2235,22 +2223,6 @@ write_list (FILE *stream, const char *prefix, struct id *list) } } -#if LINK_ELIMINATE_DUPLICATE_LDIRECTORIES -/* Given a STRING, return nonzero if it occurs in the list in range - [ARGS_BEGIN,ARGS_END). */ - -static int -is_in_args (const char *string, const char **args_begin, - const char **args_end) -{ - const char **args_pointer; - for (args_pointer = args_begin; args_pointer != args_end; ++args_pointer) - if (strcmp (string, *args_pointer) == 0) - return 1; - return 0; -} -#endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */ - #ifdef COLLECT_EXPORT_LIST /* This function is really used only on AIX, but may be useful. */ #if 0 diff --git a/gcc/config.gcc b/gcc/config.gcc index 805fa65..6fb3b35 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -250,7 +250,6 @@ case ${target} in | arm*-*-rtems* \ | arm*-*-uclinux* \ | arm*-wince-pe* \ - | mips-sgi-irix6.5 \ | score-* \ | *-*-solaris2.8* \ ) @@ -1682,26 +1681,6 @@ microblaze*-*-*) cxx_target_objs="${cxx_target_objs} microblaze-c.o" tmake_file="${tmake_file} microblaze/t-microblaze" ;; -mips-sgi-irix6.5*) - tm_file="elfos.h ${tm_file} mips/iris6.h" - tmake_file="mips/t-irix6 t-slibgcc" - extra_options="${extra_options} rpath.opt mips/iris6.opt" - target_cpu_default="MASK_ABICALLS" - tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" - # Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h. - use_gcc_stdint=wrap - if test "x$stabs" = xyes - then - tm_file="${tm_file} dbx.h" - fi - if test "x$gnu_ld" = xyes - then - tm_defines="${tm_defines} IRIX_USING_GNU_LD" - fi - case ${enable_threads}:${have_pthread_h} in - "":yes | yes:yes ) thread_file=posix ;; - esac - ;; mips*-*-netbsd*) # NetBSD/mips, either endian. target_cpu_default="MASK_ABICALLS" tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h" diff --git a/gcc/config.host b/gcc/config.host index df865e2..0a01ddb 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -126,9 +126,9 @@ case ${host} in ;; esac ;; - mips*-*-linux* | mips-sgi-irix*) + mips*-*-linux*) case ${target} in - mips*-*-linux* | mips-sgi-irix*) + mips*-*-linux*) host_extra_gcc_objs="driver-native.o" host_xmake_file="${host_xmake_file} mips/x-native" ;; diff --git a/gcc/config/mips/driver-native.c b/gcc/config/mips/driver-native.c index f565c57..f221d78 100644 --- a/gcc/config/mips/driver-native.c +++ b/gcc/config/mips/driver-native.c @@ -1,5 +1,5 @@ /* Subroutines for the gcc driver. - Copyright (C) 2008, 2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -22,59 +22,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" -#ifdef __sgi__ -#include -#include - -/* Cf. MIPS R10000 Microprocessor User Guide, Version 2.0, 14.13 Processor - Revision Identifier (PRId) Register (15). - - http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_279.html */ - -static const struct cpu_types { - int impl; - const char *cpu; -} cpu_types[] = { - { C0_IMP_R2000, "r2000" }, - { C0_IMP_R3000, "r3000" }, - { C0_IMP_R6000, "r6000" }, - { C0_IMP_R4000, "r4000" }, - { C0_IMP_R6000A, "r6000" }, - { C0_IMP_R10000, "r10000" }, - { C0_IMP_R12000, "r12000" }, - { C0_IMP_R14000, "r14000" }, - { C0_IMP_R8000, "r8000" }, - { C0_IMP_R4600, "r4600" }, - { C0_IMP_R4700, "r4600" }, - { C0_IMP_R4650, "r4650" }, - { C0_IMP_R5000, "vr5000" }, - { C0_IMP_RM7000, "rm7000" }, - { C0_IMP_RM5271, "vr5000" }, - { 0, 0 } -}; - -static int -cputype (inventory_t *inv, void *arg) -{ - if (inv != NULL - && inv->inv_class == INV_PROCESSOR - && inv->inv_type == INV_CPUCHIP) - { - int i; - /* inv_state is the cpu revision number. */ - int impl = (inv->inv_state & C0_IMPMASK) >> C0_IMPSHIFT; - - for (i = 0; cpu_types[i].cpu != NULL; i++) - if (cpu_types[i].impl == impl) - { - *((const char **) arg) = cpu_types[i].cpu; - break; - } - } - return 0; -} -#endif - /* This will be called by the spec parser in gcc.c when it sees a %:local_cpu_detect(args) construct. Currently it will be called with either "arch" or "tune" as argument depending on if -march=native @@ -92,10 +39,8 @@ const char * host_detect_local_cpu (int argc, const char **argv) { const char *cpu = NULL; -#ifndef __sgi__ char buf[128]; FILE *f; -#endif bool arch; if (argc < 1) @@ -105,9 +50,6 @@ host_detect_local_cpu (int argc, const char **argv) if (!arch && strcmp (argv[0], "tune")) return NULL; -#ifdef __sgi__ - scaninvent (cputype, &cpu); -#else f = fopen ("/proc/cpuinfo", "r"); if (f == NULL) return NULL; @@ -133,7 +75,6 @@ host_detect_local_cpu (int argc, const char **argv) } fclose (f); -#endif if (cpu == NULL) return NULL; diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h index 49c459bc..af03c3d 100644 --- a/gcc/config/mips/gnu-user.h +++ b/gcc/config/mips/gnu-user.h @@ -1,6 +1,6 @@ /* Definitions for MIPS systems using GNU userspace. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2010, 2011 Free Software Foundation, Inc. + 2007, 2008, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -48,7 +48,6 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_CC1_SPEC #define SUBTARGET_CC1_SPEC "%{profile:-p}" -/* From iris5.h */ /* -G is incompatible with -KPIC which is the default, so only allow objects in the small data section if the user explicitly asks for it. */ #undef MIPS_DEFAULT_GVALUE diff --git a/gcc/config/mips/gnu-user64.h b/gcc/config/mips/gnu-user64.h index 91b021d..a4e2649 100644 --- a/gcc/config/mips/gnu-user64.h +++ b/gcc/config/mips/gnu-user64.h @@ -1,5 +1,5 @@ /* Definitions for MIPS systems using GNU userspace and n32/64 abi. - Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 + Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -52,9 +52,3 @@ along with GCC; see the file COPYING3. If not see #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".") - -/* GNU/Linux doesn't use the same floating-point format that IRIX uses - for long double. There's no need to override this here, since - ieee_quad_format is the default, but let's put this here to make - sure nobody thinks we just forgot to set it to something else. */ -#define MIPS_TFMODE_FORMAT mips_quad_format diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h deleted file mode 100644 index 7ab1f78..0000000 --- a/gcc/config/mips/iris6.h +++ /dev/null @@ -1,353 +0,0 @@ -/* Definitions of target machine for GNU compiler. IRIX 6.5 version. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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 -. */ - -/* We are compiling for IRIX 6 now. */ -#undef TARGET_IRIX6 -#define TARGET_IRIX6 1 - -/* Default to -mabi=n32 and -mips3. */ -#undef MULTILIB_DEFAULTS -#define MULTILIB_DEFAULTS { "mabi=n32" } - -/* -march=native handling only makes sense with compiler running on - a MIPS chip. */ -#if defined(__mips__) -extern const char *host_detect_local_cpu (int argc, const char **argv); -# define EXTRA_SPEC_FUNCTIONS \ - { "local_cpu_detect", host_detect_local_cpu }, - -# define MARCH_MTUNE_NATIVE_SPECS \ - " %{march=native:%