5c30094f48
libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
400 lines
11 KiB
Plaintext
400 lines
11 KiB
Plaintext
# Tests for JNI code.
|
|
|
|
# Compile a single C file and produce a .so file. OPTIONS is a list
|
|
# of options to pass to the compiler. Returns 0 on failure, 1 on
|
|
# success.
|
|
proc gcj_jni_compile_c_to_so {file {options {}}} {
|
|
global srcdir subdir
|
|
global host_triplet
|
|
verbose "options: $options"
|
|
set options_cxx $options
|
|
set options ""
|
|
|
|
# Apple uses a different extension for shared/dynamic libraries
|
|
# so we check against powerpc-apple-darwin and set them to
|
|
# dylib.
|
|
# HP-UX uses sl, so we check this too, otherwise we take so.
|
|
|
|
if { [istarget "*-*-darwin*"] } {
|
|
set so_extension "dylib"
|
|
set so_flag "-dynamiclib"
|
|
} elseif { [istarget "hppa*-hp-hpux*"] } {
|
|
set so_extension "sl"
|
|
set so_flag "-shared"
|
|
} elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } {
|
|
set so_extension "dll"
|
|
set so_flag "-shared"
|
|
} else {
|
|
set so_extension "so"
|
|
set so_flag "-shared"
|
|
}
|
|
set filename [file tail $file]
|
|
set name [file rootname $filename]
|
|
set soname lib${name}.${so_extension}
|
|
|
|
if { [istarget "*arm-*eabi*"] } {
|
|
lappend options "additional_flags=-fexceptions"
|
|
}
|
|
|
|
lappend options "additional_flags=${so_flag} -fPIC"
|
|
# Find the generated header.
|
|
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers"
|
|
|
|
# Ensure that the generated header has correct prototypes.
|
|
set cfile [file rootname $file].c
|
|
if { [file exists $cfile]} {
|
|
# This option is only valid for C sources.
|
|
lappend options "additional_flags=-Wmissing-prototypes"
|
|
}
|
|
|
|
# Find jni.h and jni_md.h.
|
|
lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include"
|
|
|
|
# Append C++ options
|
|
lappend options "additional_flags=$options_cxx"
|
|
|
|
set x [libjava_prune_warnings \
|
|
[target_compile $file $soname executable $options]]
|
|
if {$x != ""} {
|
|
verbose "target_compile failed: $x" 2
|
|
fail "$filename compilation"
|
|
return 0
|
|
}
|
|
|
|
pass "$filename compilation"
|
|
return 1
|
|
}
|
|
|
|
# Build a header file from a .class file. Return 0 on failure.
|
|
proc gcj_jni_build_header {file} {
|
|
global libgcj_jar
|
|
|
|
set gcjh [find_gcjh]
|
|
set file [file rootname $file]
|
|
|
|
set cmd "$gcjh -jni -force -classpath .:$libgcj_jar $file"
|
|
verbose $cmd
|
|
|
|
set x [string trim [libjava_prune_warnings \
|
|
[lindex [local_exec $cmd "" "" 300] 1]]]
|
|
if {$x != ""} {
|
|
verbose "local_exec failed: $x" 2
|
|
fail "$file header generation"
|
|
return 0
|
|
}
|
|
|
|
pass "$file header generation"
|
|
return 1
|
|
}
|
|
|
|
# Do all the work for a single JNI test. Return 0 on failure.
|
|
proc gcj_jni_test_one {file} {
|
|
global runtests
|
|
global host_triplet
|
|
global INTERPRETER
|
|
|
|
# Apple uses a different extension for shared/dynamic libraries
|
|
# so we check against powerpc-apple-darwin and set them to
|
|
# dylib.
|
|
# HP-UX uses sl, so we check this too, otherwise we take so.
|
|
|
|
if { [istarget "*-*-darwin*"] } {
|
|
set so_extension "dylib"
|
|
} elseif { [istarget "hppa*-hp-hpux*"] } {
|
|
set so_extension "sl"
|
|
} elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } {
|
|
set so_extension "dll"
|
|
} else {
|
|
set so_extension "so"
|
|
}
|
|
|
|
# The base name. We use it for several purposes.
|
|
set main [file rootname [file tail $file]]
|
|
if {! [runtest_file_p $runtests $main]
|
|
|| $main == "pr29812" || $main == "pr29812_injar"} {
|
|
# Simply skip it.
|
|
return 1
|
|
}
|
|
|
|
# if {! [bytecompile_file $file [pwd]]} {
|
|
# fail "bytecompile $file"
|
|
# # FIXME - should use `untested' on all remaining tests.
|
|
# # But that is hard.
|
|
# return 0
|
|
# }
|
|
# pass "bytecompile $file"
|
|
|
|
# set bytefile [file rootname [file tail $file]].class
|
|
# if {! [gcj_jni_build_header $bytefile]} {
|
|
# # FIXME
|
|
# return 0
|
|
# }
|
|
|
|
set cfile [file rootname $file].c
|
|
set cxxflags ""
|
|
set cxxldlibflags {}
|
|
# If there is no `.c' file, assume there is a `.cc' file.
|
|
if {! [file exists $cfile]} {
|
|
set cfile [file rootname $file].cc
|
|
|
|
set cxxflaglist {}
|
|
foreach arg [split [libjava_find_lib libstdc++-v3/src stdc++] " "] {
|
|
switch -glob -- $arg {
|
|
"-L*" {
|
|
set arg [string range $arg 2 end]
|
|
lappend cxxldlibflags $arg
|
|
# Strip the `.libs' directory; we link with libtool which
|
|
# doesn't need it.
|
|
set arg "-L[file dirname $arg]"
|
|
}
|
|
}
|
|
lappend cxxflaglist $arg
|
|
# In case the libstdc++ is not installed yet, we pass the build
|
|
# directory of it to the cxxflaglist.
|
|
lappend cxxflaglist "-L$cxxldlibflags"
|
|
}
|
|
|
|
# If you're building the compiler with --prefix set to a place
|
|
# where it's not yet installed, then the linker won't be able to
|
|
# find the libgcc used by libffi.dylib. We could pass the
|
|
# -dylib_file option, but that's complicated, and it's much easier
|
|
# to just make the linker find libgcc using -L options.
|
|
if { [istarget "*-*-darwin*"] } {
|
|
lappend cxxflaglist "-shared-libgcc -lstdc++"
|
|
} else {
|
|
lappend cxxflaglist "-lstdc++"
|
|
}
|
|
|
|
# ARM C++ emits an ABI warning for varargs.
|
|
if { [istarget "arm*"] } {
|
|
lappend cxxflaglist "-Wno-abi"
|
|
}
|
|
|
|
set cxxflags [join $cxxflaglist]
|
|
}
|
|
|
|
if {! [gcj_jni_compile_c_to_so $cfile $cxxflags]} {
|
|
# FIXME
|
|
return 0
|
|
}
|
|
|
|
set args [list "additional_flags=-fjni"]
|
|
if {! [gcj_link $main $main $file $args]} {
|
|
# FIXME
|
|
return 0
|
|
}
|
|
|
|
set resultfile [file rootname $file].out
|
|
|
|
if {! [gcj_invoke $main $resultfile $cxxldlibflags]} {
|
|
# FIXME
|
|
return 0
|
|
}
|
|
|
|
# We purposely ignore errors here; we still want to run the other
|
|
# appropriate tests.
|
|
set errname [file rootname [file tail $file]]
|
|
set gij [libjava_find_gij]
|
|
# libjava_find_gij will return "" if it couldn't find the
|
|
# program; in this case we want to skip the test.
|
|
# If the libraries are not installed yet, we have to pass them via
|
|
# cxxldlibflags to libjava_invoke.
|
|
if {$INTERPRETER == "yes" && $gij != ""} {
|
|
libjava_invoke $errname "gij test" opts $gij \
|
|
"" $resultfile $cxxldlibflags \
|
|
-classpath $file $main
|
|
}
|
|
|
|
# When we succeed we remove all our clutter.
|
|
eval gcj_cleanup [glob -nocomplain -- ${main}.*] \
|
|
[list $main lib${main}.${so_extension}]
|
|
|
|
return 1
|
|
}
|
|
|
|
# Compile a single C file and produce a binary. OPTIONS is a list of
|
|
# options to pass to the compiler. Returns 0 on failure, 1 on
|
|
# success.
|
|
proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} {
|
|
global srcdir subdir
|
|
global host_triplet
|
|
verbose "options: $options"
|
|
set options_cxx $options
|
|
set options ""
|
|
|
|
set filename [file tail $file]
|
|
set name [file rootname $filename]
|
|
|
|
# Set some darwin specific options
|
|
if { [istarget "*-*-darwin*"] } {
|
|
lappend options "additional_flags= -bind_at_load -multiply_defined suppress"
|
|
}
|
|
# Find the generated header.
|
|
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
|
|
|
# Find jni.h and jni_md.h.
|
|
lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -fdollars-in-identifiers"
|
|
|
|
# Append C++ options
|
|
lappend options "additional_flags=$options_cxx"
|
|
|
|
set x [libjava_prune_warnings \
|
|
[target_compile $file $name executable $options]]
|
|
if {$x != ""} {
|
|
verbose "target_compile failed: $x" 2
|
|
fail "$filename compilation"
|
|
return 0
|
|
}
|
|
|
|
pass "$filename compilation"
|
|
return 1
|
|
}
|
|
|
|
proc gcj_jni_get_cxxflags_invocation {} {
|
|
global libiconv
|
|
global LIBJAVA
|
|
if {$libiconv == ""} {
|
|
set libiconv "-liconv"
|
|
}
|
|
if [info exists LIBJAVA] {
|
|
set libjava $LIBJAVA;
|
|
} else {
|
|
set libjava [libjava_find_lib libjava gcj]
|
|
}
|
|
set cxxflags "$libjava -ljvm"
|
|
|
|
# Darwin needs -liconv linked, otherwise we get some unresolved.
|
|
# If you're building the compiler with --prefix set to a place
|
|
# where it's not yet installed, then the linker won't be able to
|
|
# find the libgcc used by libffi.dylib. We could pass the
|
|
# -dylib_file option, but that's complicated, and it's much easier
|
|
# to just make the linker find libgcc using -L options.
|
|
# Similar logic applies to libgcj.
|
|
if { [istarget "*-*-darwin*"] } {
|
|
eval lappend cxxflags "-shared-libgcc -lgcj $libiconv"
|
|
}
|
|
|
|
# Make sure libgcc unwinder is used on 64-bit Solaris 10+/x86 rather than
|
|
# the libc one.
|
|
if { [istarget "*-*-solaris*"] } {
|
|
lappend cxxflags "-shared-libgcc"
|
|
}
|
|
|
|
return $cxxflags
|
|
}
|
|
|
|
# Do all the work for a single invocation API test. Return 0 on
|
|
# failure.
|
|
proc gcj_jni_invocation_test_one {file} {
|
|
global env
|
|
global runtests
|
|
global host_triplet
|
|
global INTERPRETER
|
|
|
|
# The base name. We use it for several purposes.
|
|
set main [file rootname [file tail $file]]
|
|
if {! [runtest_file_p $runtests $main]} {
|
|
# Simply skip it.
|
|
return 1
|
|
}
|
|
|
|
# if {! [bytecompile_file $file [pwd]]} {
|
|
# fail "bytecompile $file"
|
|
# # FIXME - should use `untested' on all remaining tests.
|
|
# # But that is hard.
|
|
# return 0
|
|
# }
|
|
# pass "bytecompile $file"
|
|
|
|
set cfile [file rootname $file].c
|
|
|
|
set cxxflags [gcj_jni_get_cxxflags_invocation]
|
|
if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} {
|
|
# FIXME
|
|
return 0
|
|
}
|
|
|
|
set resultfile [file rootname $file].out
|
|
|
|
set env(CLASSPATH) $file
|
|
verbose "CLASSPATH = $env(CLASSPATH)"
|
|
if {! [gcj_invoke $main $resultfile ""]} {
|
|
unset env(CLASSPATH)
|
|
# FIXME
|
|
return 0
|
|
}
|
|
unset env(CLASSPATH)
|
|
|
|
# We purposely ignore errors here; we still want to run the other
|
|
# appropriate tests.
|
|
set errname [file rootname [file tail $file]]
|
|
|
|
# When we succeed we remove all our clutter.
|
|
eval gcj_cleanup [glob -nocomplain -- ${main}.*] \
|
|
[list $main]
|
|
|
|
return 1
|
|
}
|
|
|
|
proc gcj_jni_pr29812 {} {
|
|
global srcdir subdir
|
|
global INTERPRETER runtests
|
|
|
|
# Set up a global we need.
|
|
libjava_arguments
|
|
|
|
set b ${srcdir}/${subdir}
|
|
|
|
if {! [runtest_file_p $runtests pr29812]} {
|
|
# Simply skip it.
|
|
return 1
|
|
}
|
|
|
|
if {! [gcj_jni_compile_c_to_so $b/pr29812.c ""]} {
|
|
return 0
|
|
}
|
|
if {! [gcj_jni_compile_c_to_so $b/pr29812_injar.c ""]} {
|
|
return 0
|
|
}
|
|
|
|
set gij [libjava_find_gij]
|
|
if {$INTERPRETER == "yes" && $gij != ""} {
|
|
if {! [libjava_invoke pr29812 "gij test" opts $gij \
|
|
"" $b/pr29812.out "" \
|
|
-classpath $b/pr29812.jar pr29812 $b/pr29812_injar.jar]} {
|
|
return 0
|
|
}
|
|
}
|
|
|
|
# When we succeed we remove all our clutter.
|
|
eval gcj_cleanup [glob -nocomplain -- *pr29812*]
|
|
}
|
|
|
|
# Run the JNI tests.
|
|
proc gcj_jni_run {} {
|
|
global srcdir subdir
|
|
global build_triplet host_triplet
|
|
|
|
# For now we only test JNI on native builds.
|
|
if {$build_triplet == $host_triplet} {
|
|
catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.jar] } srcfiles
|
|
|
|
foreach x $srcfiles {
|
|
gcj_jni_test_one $x
|
|
}
|
|
|
|
# Run JNI invocation API tests
|
|
catch { lsort [glob -nocomplain ${srcdir}/${subdir}/invocation/*.jar] } srcfiles
|
|
|
|
foreach x $srcfiles {
|
|
gcj_jni_invocation_test_one $x
|
|
}
|
|
|
|
gcj_jni_pr29812
|
|
} else {
|
|
verbose "JNI tests not run in cross-compilation environment"
|
|
}
|
|
}
|
|
|
|
gcj_jni_run
|