From 31db0fe044cc9d4ba43dd4535575aeac3aa3952b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 8 Jun 2018 09:53:31 +0200 Subject: [PATCH] Remove MPX 2018-06-08 Martin Liska * MAINTAINERS: Remove MPX-related entries. * Makefile.def: Remove libmpx support. * Makefile.in: Likewise. * configure: Remove removed files. * configure.ac: Likewise. * libmpx/ChangeLog: Remove. * libmpx/Makefile.am: Remove. * libmpx/Makefile.in: Remove. * libmpx/acinclude.m4: Remove. * libmpx/aclocal.m4: Remove. * libmpx/config.h.in: Remove. * libmpx/configure: Remove. * libmpx/configure.ac: Remove. * libmpx/configure.tgt: Remove. * libmpx/libmpx.spec.in: Remove. * libmpx/mpxrt/Makefile.am: Remove. * libmpx/mpxrt/Makefile.in: Remove. * libmpx/mpxrt/libmpx.map: Remove. * libmpx/mpxrt/libtool-version: Remove. * libmpx/mpxrt/mpxrt-utils.c: Remove. * libmpx/mpxrt/mpxrt-utils.h: Remove. * libmpx/mpxrt/mpxrt.c: Remove. * libmpx/mpxrt/mpxrt.h: Remove. * libmpx/mpxwrap/Makefile.am: Remove. * libmpx/mpxwrap/Makefile.in: Remove. * libmpx/mpxwrap/libmpxwrappers.map: Remove. * libmpx/mpxwrap/libtool-version: Remove. * libmpx/mpxwrap/mpx_wrappers.c: Remove. 2018-06-08 Martin Liska * bootstrap-mpx.mk: Remove. 2018-06-08 Martin Liska * Makefile.in: Remove support for MPX (macros, related functions, fields in cgraph_node, ...). * builtin-types.def (BT_BND): Likewise. (BT_FN_BND_CONST_PTR): Likewise. (BT_FN_CONST_PTR_BND): Likewise. (BT_FN_VOID_PTR_BND): Likewise. (BT_FN_BND_CONST_PTR_SIZE): Likewise. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise. * builtins.c (expand_builtin_memcpy_with_bounds): Likewise. (expand_builtin_mempcpy_with_bounds): Likewise. (expand_builtin_memset_with_bounds): Likewise. (expand_builtin_memset_args): Likewise. (std_expand_builtin_va_start): Likewise. (expand_builtin): Likewise. (expand_builtin_with_bounds): Likewise. * builtins.def (DEF_BUILTIN_CHKP): Likewise. (DEF_LIB_BUILTIN_CHKP): Likewise. (DEF_EXT_LIB_BUILTIN_CHKP): Likewise. (DEF_CHKP_BUILTIN): Likewise. (BUILT_IN_MEMCPY): Likewise. (BUILT_IN_MEMMOVE): Likewise. (BUILT_IN_MEMPCPY): Likewise. (BUILT_IN_MEMSET): Likewise. (BUILT_IN_STPCPY): Likewise. (BUILT_IN_STRCAT): Likewise. (BUILT_IN_STRCHR): Likewise. (BUILT_IN_STRCPY): Likewise. (BUILT_IN_STRLEN): Likewise. (BUILT_IN_MEMCPY_CHK): Likewise. (BUILT_IN_MEMMOVE_CHK): Likewise. (BUILT_IN_MEMPCPY_CHK): Likewise. (BUILT_IN_MEMSET_CHK): Likewise. (BUILT_IN_STPCPY_CHK): Likewise. (BUILT_IN_STRCAT_CHK): Likewise. (BUILT_IN_STRCPY_CHK): Likewise. * calls.c (store_bounds): Likewise. (emit_call_1): Likewise. (special_function_p): Likewise. (maybe_warn_nonstring_arg): Likewise. (initialize_argument_information): Likewise. (finalize_must_preallocate): Likewise. (compute_argument_addresses): Likewise. (expand_call): Likewise. * cfgexpand.c (expand_call_stmt): Likewise. (expand_return): Likewise. (expand_gimple_stmt_1): Likewise. (pass_expand::execute): Likewise. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise. (cgraph_node::remove): Likewise. (cgraph_node::dump): Likewise. (cgraph_node::verify_node): Likewise. * cgraph.h (chkp_function_instrumented_p): Likewise. (symtab_node::get_alias_target): Likewise. (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_local_p): Likewise. * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise. (cgraph_edge::rebuild_references): Likewise. * cgraphunit.c (varpool_node::finalize_decl): Likewise. (walk_polymorphic_call_targets): Likewise. (cgraph_node::expand_thunk): Likewise. (symbol_table::output_weakrefs): Likewise. * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise. (ix86_handle_option): Likewise. * config/i386/constraints.md: Likewise. * config/i386/i386-builtin-types.def (BND): Likewise. (VOID): Likewise. (PVOID): Likewise. (ULONG): Likewise. * config/i386/i386-builtin.def (BDESC_END): Likewise. (BDESC_FIRST): Likewise. (BDESC): Likewise. * config/i386/i386-c.c (ix86_target_macros_internal): Likewise. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise. * config/i386/i386.c (enum reg_class): Likewise. (ix86_target_string): Likewise. (ix86_option_override_internal): Likewise. (ix86_conditional_register_usage): Likewise. (ix86_valid_target_attribute_inner_p): Likewise. (ix86_set_indirect_branch_type): Likewise. (ix86_set_current_function): Likewise. (ix86_function_arg_regno_p): Likewise. (init_cumulative_args): Likewise. (ix86_function_arg_advance): Likewise. (ix86_function_arg): Likewise. (ix86_pass_by_reference): Likewise. (ix86_function_value_regno_p): Likewise. (ix86_function_value_1): Likewise. (ix86_function_value_bounds): Likewise. (ix86_return_in_memory): Likewise. (ix86_setup_incoming_vararg_bounds): Likewise. (ix86_va_start): Likewise. (indirect_thunk_need_prefix): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_expand_call): Likewise. (ix86_output_function_return): Likewise. (reg_encoded_number): Likewise. (BDESC_VERIFYS): Likewise. (ix86_init_mpx_builtins): Likewise. (ix86_init_builtins): Likewise. (ix86_emit_cmove): Likewise. (ix86_emit_move_max): Likewise. (ix86_expand_builtin): Likewise. (ix86_builtin_mpx_function): Likewise. (ix86_get_arg_address_for_bt): Likewise. (ix86_load_bounds): Likewise. (ix86_store_bounds): Likewise. (ix86_load_returned_bounds): Likewise. (ix86_store_returned_bounds): Likewise. (ix86_class_likely_spilled_p): Likewise. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_mitigate_rop): Likewise. (ix86_bnd_prefixed_insn_p): Likewise. (ix86_mpx_bound_mode): Likewise. (ix86_make_bounds_constant): Likewise. (ix86_initialize_bounds): Likewise. (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise. (TARGET_STORE_BOUNDS_FOR_ARG): Likewise. (TARGET_LOAD_RETURNED_BOUNDS): Likewise. (TARGET_STORE_RETURNED_BOUNDS): Likewise. (TARGET_CHKP_BOUND_MODE): Likewise. (TARGET_BUILTIN_CHKP_FUNCTION): Likewise. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise. (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise. * config/i386/i386.h (TARGET_MPX): Likewise. (TARGET_MPX_P): Likewise. (VALID_BND_REG_MODE): Likewise. (FIRST_BND_REG): Likewise. (LAST_BND_REG): Likewise. (enum reg_class): Likewise. (BND_REG_P): Likewise. (BND_REGNO_P): Likewise. (BNDmode): Likewise. (ADJUST_INSN_LENGTH): Likewise. * config/i386/i386.md: Likewise. * config/i386/i386.opt: Likewise. * config/i386/linux-common.h (LIBMPX_LIBS): Likewise. (defined): Likewise. (LINK_MPX): Likewise. (MPX_SPEC): Likewise. (LIBMPX_SPEC): Likewise. (LIBMPXWRAPPERS_SPEC): Likewise. (CHKP_SPEC): Likewise. * config/i386/predicates.md: Likewise. * dbxout.c (dbxout_type): Likewise. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * doc/tm.texi: Likewise. * doc/tm.texi.in: Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_formal_types_die): Likewise. (gen_subprogram_die): Likewise. (gen_type_die_with_usage): Likewise. (gen_decl_die): Likewise. (dwarf2out_late_global_decl): Likewise. * expr.c (expand_assignment): Likewise. (emit_storent_insn): Likewise. (store_expr_with_bounds): Likewise. (store_expr): Likewise. (expand_expr_real_1): Likewise. * expr.h (store_expr_with_bounds): Likewise. * function.c (use_register_for_decl): Likewise. (struct bounds_parm_data): Likewise. (assign_parms_augmented_arg_list): Likewise. (assign_parm_find_entry_rtl): Likewise. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): Likewise. (assign_bounds): Likewise. (assign_parms): Likewise. (expand_function_start): Likewise. * gcc.c (CHKP_SPEC): Likewise. * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise. * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise. (wrestrict_dom_walker::check_call): Likewise. * gimple.c (gimple_build_call_from_tree): Likewise. * gimple.h (enum gf_mask): Likewise. (gimple_call_with_bounds_p): Likewise. (gimple_call_set_with_bounds): Likewise. * gimplify.c (gimplify_init_constructor): Likewise. * ipa-cp.c (initialize_node_lattices): Likewise. (propagate_constants_across_call): Likewise. (find_more_scalar_values_for_callers_subset): Likewise. * ipa-hsa.c (process_hsa_functions): Likewise. * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise. * ipa-icf.c (sem_function::merge): Likewise. * ipa-inline.c (early_inliner): Likewise. * ipa-pure-const.c (warn_function_noreturn): Likewise. (warn_function_cold): Likewise. (propagate_pure_const): Likewise. * ipa-ref.h (enum GTY): Likewise. * ipa-split.c (find_retbnd): Likewise. (consider_split): Likewise. (split_function): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Likewise. * ipa.c (walk_polymorphic_call_targets): Likewise. (symbol_table::remove_unreachable_nodes): Likewise. (process_references): Likewise. (cgraph_build_static_cdtor_1): Likewise. * lto-cgraph.c (lto_output_node): Likewise. (output_refs): Likewise. (compute_ltrans_boundary): Likewise. (input_overwrite_node): Likewise. (input_node): Likewise. (input_cgraph_1): Likewise. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise. * passes.c (pass_manager::execute_early_local_passes): Likewise. (class pass_chkp_instrumentation_passes): Likewise. (make_pass_chkp_instrumentation_passes): Likewise. * passes.def: Likewise. * rtl.h (struct GTY): Likewise. (CALL_EXPR_WITH_BOUNDS_P): Likewise. * stor-layout.c (layout_type): Likewise. * symtab.c: Likewise. * target.def: Likewise. * targhooks.c (default_chkp_bound_type): Likewise. (default_chkp_bound_mode): Likewise. (default_builtin_chkp_function): Likewise. (default_chkp_function_value_bounds): Likewise. (default_chkp_make_bounds_constant): Likewise. (default_chkp_initialize_bounds): Likewise. * targhooks.h (default_chkp_bound_type): Likewise. (default_chkp_bound_mode): Likewise. (default_builtin_chkp_function): Likewise. (default_chkp_function_value_bounds): Likewise. (default_chkp_make_bounds_constant): Likewise. (default_chkp_initialize_bounds): Likewise. * toplev.c (compile_file): Likewise. (process_options): Likewise. * tree-core.h (DEF_BUILTIN): Likewise. (DEF_BUILTIN_CHKP): Likewise. * tree-inline.c (declare_return_variable): Likewise. (remap_gimple_stmt): Likewise. (copy_bb): Likewise. (initialize_inlined_parameters): Likewise. (expand_call_inline): Likewise. * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise. (make_pass_ipa_chkp_early_produce_thunks): Likewise. (make_pass_ipa_chkp_produce_thunks): Likewise. (make_pass_chkp): Likewise. (make_pass_chkp_opt): Likewise. (make_pass_chkp_instrumentation_passes): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise. * tree-ssa-dce.c (propagate_necessity): Likewise. (eliminate_unnecessary_stmts): Likewise. * tree-ssa-pre.c (create_expression_by_pieces): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-strlen.c (get_string_length): Likewise. (valid_builtin_call): Likewise. (adjust_last_stmt): Likewise. (handle_builtin_strchr): Likewise. (handle_builtin_strcpy): Likewise. (handle_builtin_stxncpy): Likewise. (handle_builtin_memcpy): Likewise. (handle_builtin_strcat): Likewise. (strlen_check_and_optimize_stmt): Likewise. * tree-stdarg.c (expand_ifn_va_arg_1): Likewise. * tree-streamer-in.c: Likewise. * tree-streamer.c (record_common_node): Likewise. * tree.c (tree_code_size): Likewise. (wide_int_to_tree_1): Likewise. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Likewise. * tree.def (POINTER_BOUNDS_TYPE): Likewise. * tree.h (POINTER_BOUNDS_TYPE_P): Likewise. (POINTER_BOUNDS_P): Likewise. (BOUNDED_TYPE_P): Likewise. (BOUNDED_P): Likewise. (CALL_WITH_BOUNDS_P): Likewise. (pointer_bounds_type_node): Likewise. * value-prof.c (gimple_ic): Likewise. * var-tracking.c (vt_add_function_parameters): Likewise. * varasm.c (make_decl_rtl): Likewise. (assemble_start_function): Likewise. (output_constant): Likewise. (maybe_assemble_visibility): Likewise. * varpool.c (ctor_for_folding): Likewise. * chkp-builtins.def: Remove. * ipa-chkp.c: Remove. * ipa-chkp.h: Remove. * rtl-chkp.c: Remove. * rtl-chkp.h: Remove. * tree-chkp-opt.c: Remove. * tree-chkp.c: Remove. * tree-chkp.h: Remove. 2018-06-08 Martin Liska * c-attribs.c (handle_bnd_variable_size_attribute): Remove support for MPX (macros, related functions, fields in cgraph_node, ...). (handle_bnd_legacy): Likewise. (handle_bnd_instrument): Likewise. * c.opt: Likewise. 2018-06-08 Martin Liska * lto-partition.c (add_references_to_partition): Remove support for MPX (macros, related functions, fields in cgraph_node, ...). (add_symbol_to_partition_1): Likewise. (privatize_symbol_name): Likewise. * lto-symtab.c (lto_cgraph_replace_node): Likewise. 2018-06-08 Martin Liska * g++.dg/dg.exp: Do not use mpx.exp. * g++.dg/lto/lto.exp: Likewise. * g++.dg/lto/pr69729_0.C: Remove. * g++.dg/opt/pr71529.C: Remove. * g++.dg/pr63995-1.C: Remove. * g++.dg/pr68270.C: Remove. * g++.dg/pr71624.C: Remove. * g++.dg/pr71633.C: Remove. * g++.dg/pr79761.C: Remove. * g++.dg/pr79764.C: Remove. * g++.dg/pr79769.C: Remove. * gcc.dg/lto/chkp-privatize-1_0.c: Remove. * gcc.dg/lto/chkp-privatize-2_0.c: Remove. * gcc.dg/lto/chkp-privatize_0.c: Remove. * gcc.dg/lto/chkp-removed-alias_0.c: Remove. * gcc.dg/lto/chkp-static-bounds_0.c: Remove. * gcc.dg/lto/chkp-wrap-asm-name_0.c: Remove. * gcc.dg/lto/lto.exp: Do not use mpx.exp. * gcc.dg/lto/pr66221_0.c: Remove. * gcc.target/i386/chkp-always_inline.c: Remove. * gcc.target/i386/chkp-bndret.c: Remove. * gcc.target/i386/chkp-builtins-1.c: Remove. * gcc.target/i386/chkp-builtins-2.c: Remove. * gcc.target/i386/chkp-builtins-3.c: Remove. * gcc.target/i386/chkp-builtins-4.c: Remove. * gcc.target/i386/chkp-const-check-1.c: Remove. * gcc.target/i386/chkp-const-check-2.c: Remove. * gcc.target/i386/chkp-hidden-def.c: Remove. * gcc.target/i386/chkp-label-address.c: Remove. * gcc.target/i386/chkp-lifetime-1.c: Remove. * gcc.target/i386/chkp-narrow-bounds.c: Remove. * gcc.target/i386/chkp-pr69044.c: Remove. * gcc.target/i386/chkp-remove-bndint-1.c: Remove. * gcc.target/i386/chkp-remove-bndint-2.c: Remove. * gcc.target/i386/chkp-strchr.c: Remove. * gcc.target/i386/chkp-strlen-1.c: Remove. * gcc.target/i386/chkp-strlen-2.c: Remove. * gcc.target/i386/chkp-strlen-3.c: Remove. * gcc.target/i386/chkp-strlen-4.c: Remove. * gcc.target/i386/chkp-strlen-5.c: Remove. * gcc.target/i386/chkp-stropt-1.c: Remove. * gcc.target/i386/chkp-stropt-10.c: Remove. * gcc.target/i386/chkp-stropt-11.c: Remove. * gcc.target/i386/chkp-stropt-12.c: Remove. * gcc.target/i386/chkp-stropt-13.c: Remove. * gcc.target/i386/chkp-stropt-14.c: Remove. * gcc.target/i386/chkp-stropt-15.c: Remove. * gcc.target/i386/chkp-stropt-16.c: Remove. * gcc.target/i386/chkp-stropt-17.c: Remove. * gcc.target/i386/chkp-stropt-2.c: Remove. * gcc.target/i386/chkp-stropt-3.c: Remove. * gcc.target/i386/chkp-stropt-4.c: Remove. * gcc.target/i386/chkp-stropt-5.c: Remove. * gcc.target/i386/chkp-stropt-6.c: Remove. * gcc.target/i386/chkp-stropt-7.c: Remove. * gcc.target/i386/chkp-stropt-8.c: Remove. * gcc.target/i386/chkp-stropt-9.c: Remove. * gcc.target/i386/i386.exp: Do not use mpx.exp. * gcc.target/i386/indirect-thunk-11.c: Remove. * gcc.target/i386/indirect-thunk-12.c: Remove. * gcc.target/i386/indirect-thunk-attr-12.c: Remove. * gcc.target/i386/indirect-thunk-attr-13.c: Remove. * gcc.target/i386/indirect-thunk-bnd-1.c: Remove. * gcc.target/i386/indirect-thunk-bnd-2.c: Remove. * gcc.target/i386/indirect-thunk-bnd-3.c: Remove. * gcc.target/i386/indirect-thunk-bnd-4.c: Remove. * gcc.target/i386/interrupt-bnd-err-1.c: Remove. * gcc.target/i386/interrupt-bnd-err-2.c: Remove. * gcc.target/i386/mpx/alloca-1-lbv.c: Remove. * gcc.target/i386/mpx/alloca-1-nov.c: Remove. * gcc.target/i386/mpx/alloca-1-ubv.c: Remove. * gcc.target/i386/mpx/arg-addr-1-lbv.c: Remove. * gcc.target/i386/mpx/arg-addr-1-nov.c: Remove. * gcc.target/i386/mpx/arg-addr-1-ubv.c: Remove. * gcc.target/i386/mpx/bitfields-1-lbv.c: Remove. * gcc.target/i386/mpx/bitfields-1-nov.c: Remove. * gcc.target/i386/mpx/bitfields-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c: Remove. * gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c: Remove. * gcc.target/i386/mpx/calloc-1-lbv.c: Remove. * gcc.target/i386/mpx/calloc-1-nov.c: Remove. * gcc.target/i386/mpx/calloc-1-ubv.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-1.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-2.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-3.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-4.c: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-1.cc: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-2.cc: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-3.c: Remove. * gcc.target/i386/mpx/fastcall-1-lbv.c: Remove. * gcc.target/i386/mpx/fastcall-1-nov.c: Remove. * gcc.target/i386/mpx/fastcall-1-ubv.c: Remove. * gcc.target/i386/mpx/fastcall-2-lbv.c: Remove. * gcc.target/i386/mpx/fastcall-2-nov.c: Remove. * gcc.target/i386/mpx/fastcall-2-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-1-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-1-nov.c: Remove. * gcc.target/i386/mpx/field-addr-1-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-10-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-10-nov.c: Remove. * gcc.target/i386/mpx/field-addr-10-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-2-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-2-nov.c: Remove. * gcc.target/i386/mpx/field-addr-2-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-3-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-3-nov.c: Remove. * gcc.target/i386/mpx/field-addr-3-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-4-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-4-nov.c: Remove. * gcc.target/i386/mpx/field-addr-4-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-5-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-5-nov.c: Remove. * gcc.target/i386/mpx/field-addr-5-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-6-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-6-nov.c: Remove. * gcc.target/i386/mpx/field-addr-6-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-7-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-7-nov.c: Remove. * gcc.target/i386/mpx/field-addr-7-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-8-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-8-nov.c: Remove. * gcc.target/i386/mpx/field-addr-8-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-9-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-9-nov.c: Remove. * gcc.target/i386/mpx/field-addr-9-ubv.c: Remove. * gcc.target/i386/mpx/frame-address-1-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-1-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-2-lbv.c: Remove. * gcc.target/i386/mpx/hard-reg-2-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-2-ubv.c: Remove. * gcc.target/i386/mpx/if-stmt-1-lbv.c: Remove. * gcc.target/i386/mpx/if-stmt-1-nov.c: Remove. * gcc.target/i386/mpx/if-stmt-1-ubv.c: Remove. * gcc.target/i386/mpx/if-stmt-2-lbv.c: Remove. * gcc.target/i386/mpx/if-stmt-2-nov.c: Remove. * gcc.target/i386/mpx/if-stmt-2-ubv.c: Remove. * gcc.target/i386/mpx/label-address-1.c: Remove. * gcc.target/i386/mpx/legacy-1-nov.c: Remove. * gcc.target/i386/mpx/macro.c: Remove. * gcc.target/i386/mpx/malloc-1-lbv.c: Remove. * gcc.target/i386/mpx/malloc-1-nov.c: Remove. * gcc.target/i386/mpx/malloc-1-ubv.c: Remove. * gcc.target/i386/mpx/memcpy-1.c: Remove. * gcc.target/i386/mpx/memmove-1.c: Remove. * gcc.target/i386/mpx/memmove-2.c: Remove. * gcc.target/i386/mpx/memmove-zero-length.c: Remove. * gcc.target/i386/mpx/mpx-check.h: Remove. * gcc.target/i386/mpx/mpx-os-support.h: Remove. * gcc.target/i386/mpx/mpx.exp: Remove. * gcc.target/i386/mpx/nested-function-1-lbv.c: Remove. * gcc.target/i386/mpx/nested-function-1-nov.c: Remove. * gcc.target/i386/mpx/nested-function-1-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-ubv.c: Remove. * gcc.target/i386/mpx/pointer-diff-1.c: Remove. * gcc.target/i386/mpx/pointer-store-1-lbv.c: Remove. * gcc.target/i386/mpx/pointer-store-1-nov.c: Remove. * gcc.target/i386/mpx/pointer-store-1-ubv.c: Remove. * gcc.target/i386/mpx/pr65508.c: Remove. * gcc.target/i386/mpx/pr65531.cc: Remove. * gcc.target/i386/mpx/pr66048.cc: Remove. * gcc.target/i386/mpx/pr66134.c: Remove. * gcc.target/i386/mpx/pr66566.c: Remove. * gcc.target/i386/mpx/pr66567.c: Remove. * gcc.target/i386/mpx/pr66568.c: Remove. * gcc.target/i386/mpx/pr66569.c: Remove. * gcc.target/i386/mpx/pr66581.c: Remove. * gcc.target/i386/mpx/pr68337-1.c: Remove. * gcc.target/i386/mpx/pr68337-2.c: Remove. * gcc.target/i386/mpx/pr68416.c: Remove. * gcc.target/i386/mpx/pr78339.c: Remove. * gcc.target/i386/mpx/pr79631.c: Remove. * gcc.target/i386/mpx/pr79633.c: Remove. * gcc.target/i386/mpx/pr79753.c: Remove. * gcc.target/i386/mpx/pr79770.c: Remove. * gcc.target/i386/mpx/pr79987.c: Remove. * gcc.target/i386/mpx/pr79988.c: Remove. * gcc.target/i386/mpx/realloc-1-lbv.c: Remove. * gcc.target/i386/mpx/realloc-1-nov.c: Remove. * gcc.target/i386/mpx/realloc-1-ubv.c: Remove. * gcc.target/i386/mpx/realloc-2-lbv.c: Remove. * gcc.target/i386/mpx/realloc-2-nov.c: Remove. * gcc.target/i386/mpx/realloc-2-ubv.c: Remove. * gcc.target/i386/mpx/reference-1-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-1-nov.cpp: Remove. * gcc.target/i386/mpx/reference-1-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-2-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-2-nov.cpp: Remove. * gcc.target/i386/mpx/reference-2-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-3-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-3-nov.cpp: Remove. * gcc.target/i386/mpx/reference-3-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-4-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-4-nov.cpp: Remove. * gcc.target/i386/mpx/reference-4-ubv.cpp: Remove. * gcc.target/i386/mpx/return-pointer-1-lbv.c: Remove. * gcc.target/i386/mpx/return-pointer-1-nov.c: Remove. * gcc.target/i386/mpx/return-pointer-1-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-1-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-1-nov.c: Remove. * gcc.target/i386/mpx/return-struct-1-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-2-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-2-nov.c: Remove. * gcc.target/i386/mpx/return-struct-2-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-3-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-3-nov.c: Remove. * gcc.target/i386/mpx/return-struct-3-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-4-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-4-nov.c: Remove. * gcc.target/i386/mpx/return-struct-4-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-5-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-5-nov.c: Remove. * gcc.target/i386/mpx/return-struct-5-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-6-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-6-nov.c: Remove. * gcc.target/i386/mpx/return-struct-6-ubv.c: Remove. * gcc.target/i386/mpx/sincos-1-nov.c: Remove. * gcc.target/i386/mpx/static-array-1-lbv.c: Remove. * gcc.target/i386/mpx/static-array-1-nov.c: Remove. * gcc.target/i386/mpx/static-array-1-ubv.c: Remove. * gcc.target/i386/mpx/static-init-1-lbv.c: Remove. * gcc.target/i386/mpx/static-init-1-nov.c: Remove. * gcc.target/i386/mpx/static-init-1-ubv.c: Remove. * gcc.target/i386/mpx/static-init-2-lbv.c: Remove. * gcc.target/i386/mpx/static-init-2-nov.c: Remove. * gcc.target/i386/mpx/static-init-2-ubv.c: Remove. * gcc.target/i386/mpx/static-init-3-lbv.c: Remove. * gcc.target/i386/mpx/static-init-3-nov.c: Remove. * gcc.target/i386/mpx/static-init-3-ubv.c: Remove. * gcc.target/i386/mpx/static-init-4-lbv.c: Remove. * gcc.target/i386/mpx/static-init-4-nov.c: Remove. * gcc.target/i386/mpx/static-init-4-ubv.c: Remove. * gcc.target/i386/mpx/static-init-5-lbv.c: Remove. * gcc.target/i386/mpx/static-init-5-nov.c: Remove. * gcc.target/i386/mpx/static-init-5-ubv.c: Remove. * gcc.target/i386/mpx/static-init-6-lbv.c: Remove. * gcc.target/i386/mpx/static-init-6-nov.c: Remove. * gcc.target/i386/mpx/static-init-6-ubv.c: Remove. * gcc.target/i386/mpx/static-string-1-lbv.c: Remove. * gcc.target/i386/mpx/static-string-1-nov.c: Remove. * gcc.target/i386/mpx/static-string-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-1-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-10-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-10-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-10-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-2-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-2-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-2-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-3-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-3-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-3-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-4-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-4-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-4-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-5-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-5-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-5-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-6-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-6-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-6-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-7-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-7-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-7-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-8-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-8-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-8-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-9-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-9-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-9-ubv.c: Remove. * gcc.target/i386/mpx/struct-copy-1-lbv.c: Remove. * gcc.target/i386/mpx/struct-copy-1-nov.c: Remove. * gcc.target/i386/mpx/struct-copy-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-copy-2-lbv.c: Remove. * gcc.target/i386/mpx/struct-copy-2-nov.c: Remove. * gcc.target/i386/mpx/struct-copy-2-ubv.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-lbv.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-nov.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-ubv.c: Remove. * gcc.target/i386/mpx/union-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/union-arg-1-nov.c: Remove. * gcc.target/i386/mpx/union-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-lbv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-nov.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-ubv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-lbv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-nov.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-ubv.c: Remove. * gcc.target/i386/mpx/vararg-1-lbv.c: Remove. * gcc.target/i386/mpx/vararg-1-nov.c: Remove. * gcc.target/i386/mpx/vararg-1-ubv.c: Remove. * gcc.target/i386/mpx/vararg-2-lbv.c: Remove. * gcc.target/i386/mpx/vararg-2-nov.c: Remove. * gcc.target/i386/mpx/vararg-2-ubv.c: Remove. * gcc.target/i386/mpx/vararg-3-lbv.c: Remove. * gcc.target/i386/mpx/vararg-3-nov.c: Remove. * gcc.target/i386/mpx/vararg-3-ubv.c: Remove. * gcc.target/i386/mpx/vararg-4-lbv.c: Remove. * gcc.target/i386/mpx/vararg-4-nov.c: Remove. * gcc.target/i386/mpx/vararg-4-ubv.c: Remove. * gcc.target/i386/mpx/vararg-5-lbv.c: Remove. * gcc.target/i386/mpx/vararg-5-nov.c: Remove. * gcc.target/i386/mpx/vararg-5-ubv.c: Remove. * gcc.target/i386/mpx/vararg-6-lbv.c: Remove. * gcc.target/i386/mpx/vararg-6-nov.c: Remove. * gcc.target/i386/mpx/vararg-6-ubv.c: Remove. * gcc.target/i386/mpx/vararg-7-lbv.c: Remove. * gcc.target/i386/mpx/vararg-7-nov.c: Remove. * gcc.target/i386/mpx/vararg-7-ubv.c: Remove. * gcc.target/i386/mpx/vararg-8-lbv.c: Remove. * gcc.target/i386/mpx/vararg-8-nov.c: Remove. * gcc.target/i386/mpx/vararg-8-ubv.c: Remove. * gcc.target/i386/mpx/vla-1-lbv.c: Remove. * gcc.target/i386/mpx/vla-1-nov.c: Remove. * gcc.target/i386/mpx/vla-1-ubv.c: Remove. * gcc.target/i386/mpx/vla-2-lbv.c: Remove. * gcc.target/i386/mpx/vla-2-nov.c: Remove. * gcc.target/i386/mpx/vla-2-ubv.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-lbv.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-nov.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-ubv.c: Remove. * gcc.target/i386/pr63995-2.c: Remove. * gcc.target/i386/pr64805.c: Remove. * gcc.target/i386/pr65044.c: Remove. * gcc.target/i386/pr65167.c: Remove. * gcc.target/i386/pr65183.c: Remove. * gcc.target/i386/pr65184.c: Remove. * gcc.target/i386/pr65523.c: Remove. * gcc.target/i386/pr70876.c: Remove. * gcc.target/i386/pr70877.c: Remove. * gcc.target/i386/pr71458.c: Remove. * gcc.target/i386/pr80880.c: Remove. * gcc.target/i386/ret-thunk-25.c: Remove. * gcc.target/i386/thunk-retbnd.c: Remove. * lib/mpx-dg.exp: Remove. * gcc.target/i386/funcspec-56.inc: Adjust test case. From-SVN: r261304 --- ChangeLog | 31 + MAINTAINERS | 3 - Makefile.def | 3 - Makefile.in | 1291 +- config/ChangeLog | 4 + config/bootstrap-mpx.mk | 9 - configure | 32 +- configure.ac | 27 - gcc/ChangeLog | 292 + gcc/Makefile.in | 7 +- gcc/builtin-types.def | 7 - gcc/builtins.c | 236 +- gcc/builtins.def | 60 +- gcc/c-family/ChangeLog | 8 + gcc/c-family/c-attribs.c | 63 - gcc/c-family/c.opt | 53 +- gcc/calls.c | 214 +- gcc/cfgexpand.c | 83 +- gcc/cgraph.c | 127 +- gcc/cgraph.h | 33 - gcc/cgraphbuild.c | 9 - gcc/cgraphunit.c | 24 - gcc/chkp-builtins.def | 71 - gcc/common/config/i386/i386-common.c | 4 +- gcc/config/i386/constraints.md | 11 - gcc/config/i386/i386-builtin-types.def | 12 - gcc/config/i386/i386-builtin.def | 24 +- gcc/config/i386/i386-c.c | 2 - gcc/config/i386/i386-protos.h | 2 - gcc/config/i386/i386.c | 1008 +- gcc/config/i386/i386.h | 29 - gcc/config/i386/i386.md | 195 +- gcc/config/i386/i386.opt | 4 +- gcc/config/i386/linux-common.h | 60 - gcc/config/i386/predicates.md | 62 - gcc/dbxout.c | 4 - gcc/doc/extend.texi | 226 +- gcc/doc/invoke.texi | 237 +- gcc/doc/md.texi | 6 - gcc/doc/tm.texi | 93 - gcc/doc/tm.texi.in | 8 - gcc/dwarf2out.c | 35 +- gcc/expr.c | 78 +- gcc/expr.h | 1 - gcc/function.c | 241 +- gcc/gcc.c | 6 +- gcc/gimple-fold.c | 13 - gcc/gimple-ssa-warn-restrict.c | 40 +- gcc/gimple.c | 1 - gcc/gimple.h | 39 - gcc/gimplify.c | 12 +- gcc/ipa-chkp.c | 876 - gcc/ipa-chkp.h | 29 - gcc/ipa-cp.c | 24 +- gcc/ipa-hsa.c | 2 +- gcc/ipa-icf-gimple.c | 3 +- gcc/ipa-icf.c | 3 +- gcc/ipa-inline.c | 7 - gcc/ipa-pure-const.c | 9 - gcc/ipa-ref.h | 3 +- gcc/ipa-split.c | 78 +- gcc/ipa-visibility.c | 4 - gcc/ipa.c | 56 +- gcc/lto-cgraph.c | 71 +- gcc/lto/ChangeLog | 8 + gcc/lto/lto-partition.c | 32 +- gcc/lto/lto-symtab.c | 15 - gcc/params.def | 6 - gcc/passes.c | 38 - gcc/passes.def | 11 - gcc/rtl-chkp.c | 302 - gcc/rtl-chkp.h | 38 - gcc/rtl.h | 5 - gcc/stor-layout.c | 5 - gcc/symtab.c | 2 +- gcc/target.def | 110 - gcc/targhooks.c | 47 - gcc/targhooks.h | 7 - gcc/testsuite/ChangeLog | 391 + gcc/testsuite/g++.dg/dg.exp | 1 - gcc/testsuite/g++.dg/lto/lto.exp | 3 - gcc/testsuite/g++.dg/lto/pr69729_0.C | 35 - gcc/testsuite/g++.dg/opt/pr71529.C | 22 - gcc/testsuite/g++.dg/pr63995-1.C | 15 - gcc/testsuite/g++.dg/pr68270.C | 16 - gcc/testsuite/g++.dg/pr71624.C | 35 - gcc/testsuite/g++.dg/pr71633.C | 29 - gcc/testsuite/g++.dg/pr79761.C | 34 - gcc/testsuite/g++.dg/pr79764.C | 12 - gcc/testsuite/g++.dg/pr79769.C | 4 - gcc/testsuite/gcc.dg/lto/chkp-privatize-1_0.c | 17 - gcc/testsuite/gcc.dg/lto/chkp-privatize-2_0.c | 18 - gcc/testsuite/gcc.dg/lto/chkp-privatize_0.c | 18 - .../gcc.dg/lto/chkp-removed-alias_0.c | 28 - .../gcc.dg/lto/chkp-static-bounds_0.c | 26 - .../gcc.dg/lto/chkp-wrap-asm-name_0.c | 20 - gcc/testsuite/gcc.dg/lto/lto.exp | 2 - gcc/testsuite/gcc.dg/lto/pr66221_0.c | 10 - .../gcc.target/i386/chkp-always_inline.c | 12 - gcc/testsuite/gcc.target/i386/chkp-bndret.c | 13 - .../gcc.target/i386/chkp-builtins-1.c | 9 - .../gcc.target/i386/chkp-builtins-2.c | 9 - .../gcc.target/i386/chkp-builtins-3.c | 9 - .../gcc.target/i386/chkp-builtins-4.c | 9 - .../gcc.target/i386/chkp-const-check-1.c | 10 - .../gcc.target/i386/chkp-const-check-2.c | 8 - .../gcc.target/i386/chkp-hidden-def.c | 15 - .../gcc.target/i386/chkp-label-address.c | 23 - .../gcc.target/i386/chkp-lifetime-1.c | 15 - .../gcc.target/i386/chkp-narrow-bounds.c | 11 - gcc/testsuite/gcc.target/i386/chkp-pr69044.c | 10 - .../gcc.target/i386/chkp-remove-bndint-1.c | 16 - .../gcc.target/i386/chkp-remove-bndint-2.c | 16 - gcc/testsuite/gcc.target/i386/chkp-strchr.c | 16 - gcc/testsuite/gcc.target/i386/chkp-strlen-1.c | 12 - gcc/testsuite/gcc.target/i386/chkp-strlen-2.c | 14 - gcc/testsuite/gcc.target/i386/chkp-strlen-3.c | 12 - gcc/testsuite/gcc.target/i386/chkp-strlen-4.c | 14 - gcc/testsuite/gcc.target/i386/chkp-strlen-5.c | 14 - gcc/testsuite/gcc.target/i386/chkp-stropt-1.c | 10 - .../gcc.target/i386/chkp-stropt-10.c | 10 - .../gcc.target/i386/chkp-stropt-11.c | 10 - .../gcc.target/i386/chkp-stropt-12.c | 12 - .../gcc.target/i386/chkp-stropt-13.c | 10 - .../gcc.target/i386/chkp-stropt-14.c | 10 - .../gcc.target/i386/chkp-stropt-15.c | 10 - .../gcc.target/i386/chkp-stropt-16.c | 12 - .../gcc.target/i386/chkp-stropt-17.c | 68 - gcc/testsuite/gcc.target/i386/chkp-stropt-2.c | 10 - gcc/testsuite/gcc.target/i386/chkp-stropt-3.c | 10 - gcc/testsuite/gcc.target/i386/chkp-stropt-4.c | 12 - gcc/testsuite/gcc.target/i386/chkp-stropt-5.c | 10 - gcc/testsuite/gcc.target/i386/chkp-stropt-6.c | 10 - gcc/testsuite/gcc.target/i386/chkp-stropt-7.c | 10 - gcc/testsuite/gcc.target/i386/chkp-stropt-8.c | 12 - gcc/testsuite/gcc.target/i386/chkp-stropt-9.c | 10 - gcc/testsuite/gcc.target/i386/funcspec-56.inc | 2 - gcc/testsuite/gcc.target/i386/i386.exp | 1 - .../gcc.target/i386/indirect-thunk-11.c | 7 - .../gcc.target/i386/indirect-thunk-12.c | 7 - .../gcc.target/i386/indirect-thunk-attr-12.c | 8 - .../gcc.target/i386/indirect-thunk-attr-13.c | 8 - .../gcc.target/i386/indirect-thunk-bnd-1.c | 20 - .../gcc.target/i386/indirect-thunk-bnd-2.c | 19 - .../gcc.target/i386/indirect-thunk-bnd-3.c | 20 - .../gcc.target/i386/indirect-thunk-bnd-4.c | 19 - .../gcc.target/i386/interrupt-bnd-err-1.c | 16 - .../gcc.target/i386/interrupt-bnd-err-2.c | 8 - .../gcc.target/i386/mpx/alloca-1-lbv.c | 24 - .../gcc.target/i386/mpx/alloca-1-nov.c | 22 - .../gcc.target/i386/mpx/alloca-1-ubv.c | 24 - .../gcc.target/i386/mpx/arg-addr-1-lbv.c | 27 - .../gcc.target/i386/mpx/arg-addr-1-nov.c | 24 - .../gcc.target/i386/mpx/arg-addr-1-ubv.c | 27 - .../gcc.target/i386/mpx/bitfields-1-lbv.c | 33 - .../gcc.target/i386/mpx/bitfields-1-nov.c | 31 - .../gcc.target/i386/mpx/bitfields-1-ubv.c | 33 - .../mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c | 16 - .../mpx/builtin-bnd-chk-ptr-bounds-1-nov.c | 13 - .../mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c | 16 - .../i386/mpx/builtin-bnd-chk-ptr-bounds-2.c | 14 - .../mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c | 16 - .../mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c | 13 - .../i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c | 13 - .../mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c | 13 - .../mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c | 16 - .../i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c | 13 - .../i386/mpx/builtin-bnd-copy-ptr-bounds-1.c | 13 - .../mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c | 18 - .../mpx/builtin-bnd-copy-ptr-bounds-2-nov.c | 16 - .../mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c | 18 - .../i386/mpx/builtin-bnd-copy-ptr-bounds-3.c | 13 - .../i386/mpx/builtin-bnd-get-ptr-lbound-1.c | 13 - .../i386/mpx/builtin-bnd-get-ptr-lbound-2.c | 13 - .../i386/mpx/builtin-bnd-get-ptr-ubound-1.c | 13 - .../i386/mpx/builtin-bnd-get-ptr-ubound-2.c | 13 - .../i386/mpx/builtin-bnd-init-ptr-bounds-1.c | 13 - .../mpx/builtin-bnd-init-ptr-bounds-2-nov.c | 16 - .../i386/mpx/builtin-bnd-init-ptr-bounds-3.c | 13 - .../mpx/builtin-bnd-narrow-ptr-bounds-1.c | 13 - .../mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c | 17 - .../mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c | 15 - .../mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c | 17 - .../mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c | 17 - .../mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c | 15 - .../mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c | 17 - .../mpx/builtin-bnd-narrow-ptr-bounds-4.c | 13 - .../mpx/builtin-bnd-null-ptr-bounds-1-bbv.c | 17 - .../i386/mpx/builtin-bnd-set-ptr-bounds-1.c | 13 - .../mpx/builtin-bnd-set-ptr-bounds-2-lbv.c | 17 - .../mpx/builtin-bnd-set-ptr-bounds-2-nov.c | 15 - .../mpx/builtin-bnd-set-ptr-bounds-2-ubv.c | 17 - .../i386/mpx/builtin-bnd-set-ptr-bounds-3.c | 13 - .../mpx/builtin-bnd-store-ptr-bounds-1-lbv.c | 20 - .../mpx/builtin-bnd-store-ptr-bounds-1-nov.c | 18 - .../mpx/builtin-bnd-store-ptr-bounds-1-ubv.c | 20 - .../i386/mpx/builtin-bnd-store-ptr-bounds-2.c | 16 - .../gcc.target/i386/mpx/calloc-1-lbv.c | 26 - .../gcc.target/i386/mpx/calloc-1-nov.c | 24 - .../gcc.target/i386/mpx/calloc-1-ubv.c | 26 - .../gcc.target/i386/mpx/chkp-fix-calls-1.c | 16 - .../gcc.target/i386/mpx/chkp-fix-calls-2.c | 16 - .../gcc.target/i386/mpx/chkp-fix-calls-3.c | 33 - .../gcc.target/i386/mpx/chkp-fix-calls-4.c | 17 - .../i386/mpx/chkp-thunk-comdat-1.cc | 18 - .../i386/mpx/chkp-thunk-comdat-2.cc | 26 - .../gcc.target/i386/mpx/chkp-thunk-comdat-3.c | 23 - .../gcc.target/i386/mpx/fastcall-1-lbv.c | 26 - .../gcc.target/i386/mpx/fastcall-1-nov.c | 24 - .../gcc.target/i386/mpx/fastcall-1-ubv.c | 26 - .../gcc.target/i386/mpx/fastcall-2-lbv.c | 26 - .../gcc.target/i386/mpx/fastcall-2-nov.c | 24 - .../gcc.target/i386/mpx/fastcall-2-ubv.c | 26 - .../gcc.target/i386/mpx/field-addr-1-lbv.c | 29 - .../gcc.target/i386/mpx/field-addr-1-nov.c | 27 - .../gcc.target/i386/mpx/field-addr-1-ubv.c | 29 - .../gcc.target/i386/mpx/field-addr-10-lbv.c | 29 - .../gcc.target/i386/mpx/field-addr-10-nov.c | 27 - .../gcc.target/i386/mpx/field-addr-10-ubv.c | 29 - .../gcc.target/i386/mpx/field-addr-2-lbv.c | 30 - .../gcc.target/i386/mpx/field-addr-2-nov.c | 27 - .../gcc.target/i386/mpx/field-addr-2-ubv.c | 30 - .../gcc.target/i386/mpx/field-addr-3-lbv.c | 29 - .../gcc.target/i386/mpx/field-addr-3-nov.c | 27 - .../gcc.target/i386/mpx/field-addr-3-ubv.c | 29 - .../gcc.target/i386/mpx/field-addr-4-lbv.c | 35 - .../gcc.target/i386/mpx/field-addr-4-nov.c | 33 - .../gcc.target/i386/mpx/field-addr-4-ubv.c | 35 - .../gcc.target/i386/mpx/field-addr-5-lbv.c | 35 - .../gcc.target/i386/mpx/field-addr-5-nov.c | 33 - .../gcc.target/i386/mpx/field-addr-5-ubv.c | 35 - .../gcc.target/i386/mpx/field-addr-6-lbv.c | 36 - .../gcc.target/i386/mpx/field-addr-6-nov.c | 34 - .../gcc.target/i386/mpx/field-addr-6-ubv.c | 36 - .../gcc.target/i386/mpx/field-addr-7-lbv.c | 42 - .../gcc.target/i386/mpx/field-addr-7-nov.c | 40 - .../gcc.target/i386/mpx/field-addr-7-ubv.c | 42 - .../gcc.target/i386/mpx/field-addr-8-lbv.c | 43 - .../gcc.target/i386/mpx/field-addr-8-nov.c | 43 - .../gcc.target/i386/mpx/field-addr-8-ubv.c | 43 - .../gcc.target/i386/mpx/field-addr-9-lbv.c | 44 - .../gcc.target/i386/mpx/field-addr-9-nov.c | 42 - .../gcc.target/i386/mpx/field-addr-9-ubv.c | 44 - .../gcc.target/i386/mpx/frame-address-1-nov.c | 12 - .../gcc.target/i386/mpx/hard-reg-1-nov.c | 24 - .../gcc.target/i386/mpx/hard-reg-2-lbv.c | 21 - .../gcc.target/i386/mpx/hard-reg-2-nov.c | 18 - .../gcc.target/i386/mpx/hard-reg-2-ubv.c | 21 - .../gcc.target/i386/mpx/if-stmt-1-lbv.c | 30 - .../gcc.target/i386/mpx/if-stmt-1-nov.c | 28 - .../gcc.target/i386/mpx/if-stmt-1-ubv.c | 30 - .../gcc.target/i386/mpx/if-stmt-2-lbv.c | 30 - .../gcc.target/i386/mpx/if-stmt-2-nov.c | 28 - .../gcc.target/i386/mpx/if-stmt-2-ubv.c | 30 - .../gcc.target/i386/mpx/label-address-1.c | 14 - .../gcc.target/i386/mpx/legacy-1-nov.c | 25 - gcc/testsuite/gcc.target/i386/mpx/macro.c | 18 - .../gcc.target/i386/mpx/malloc-1-lbv.c | 26 - .../gcc.target/i386/mpx/malloc-1-nov.c | 24 - .../gcc.target/i386/mpx/malloc-1-ubv.c | 26 - gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c | 24 - gcc/testsuite/gcc.target/i386/mpx/memmove-1.c | 117 - gcc/testsuite/gcc.target/i386/mpx/memmove-2.c | 40 - .../gcc.target/i386/mpx/memmove-zero-length.c | 18 - gcc/testsuite/gcc.target/i386/mpx/mpx-check.h | 48 - .../gcc.target/i386/mpx/mpx-os-support.h | 16 - gcc/testsuite/gcc.target/i386/mpx/mpx.exp | 39 - .../i386/mpx/nested-function-1-lbv.c | 22 - .../i386/mpx/nested-function-1-nov.c | 20 - .../i386/mpx/nested-function-1-ubv.c | 22 - .../gcc.target/i386/mpx/pointer-arg-1-lbv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-1-nov.c | 24 - .../gcc.target/i386/mpx/pointer-arg-1-ubv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-2-lbv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-2-nov.c | 24 - .../gcc.target/i386/mpx/pointer-arg-2-ubv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-3-lbv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-3-nov.c | 24 - .../gcc.target/i386/mpx/pointer-arg-3-ubv.c | 26 - .../gcc.target/i386/mpx/pointer-arg-4-lbv.c | 27 - .../gcc.target/i386/mpx/pointer-arg-4-nov.c | 25 - .../gcc.target/i386/mpx/pointer-arg-4-ubv.c | 27 - .../gcc.target/i386/mpx/pointer-arg-5-lbv.c | 27 - .../gcc.target/i386/mpx/pointer-arg-5-nov.c | 25 - .../gcc.target/i386/mpx/pointer-arg-5-ubv.c | 27 - .../gcc.target/i386/mpx/pointer-diff-1.c | 8 - .../gcc.target/i386/mpx/pointer-store-1-lbv.c | 31 - .../gcc.target/i386/mpx/pointer-store-1-nov.c | 29 - .../gcc.target/i386/mpx/pointer-store-1-ubv.c | 31 - gcc/testsuite/gcc.target/i386/mpx/pr65508.c | 12 - gcc/testsuite/gcc.target/i386/mpx/pr65531.cc | 13 - gcc/testsuite/gcc.target/i386/mpx/pr66048.cc | 16 - gcc/testsuite/gcc.target/i386/mpx/pr66134.c | 17 - gcc/testsuite/gcc.target/i386/mpx/pr66566.c | 12 - gcc/testsuite/gcc.target/i386/mpx/pr66567.c | 16 - gcc/testsuite/gcc.target/i386/mpx/pr66568.c | 11 - gcc/testsuite/gcc.target/i386/mpx/pr66569.c | 14 - gcc/testsuite/gcc.target/i386/mpx/pr66581.c | 18 - gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c | 32 - gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c | 9 - gcc/testsuite/gcc.target/i386/mpx/pr68416.c | 9 - gcc/testsuite/gcc.target/i386/mpx/pr78339.c | 5 - gcc/testsuite/gcc.target/i386/mpx/pr79631.c | 15 - gcc/testsuite/gcc.target/i386/mpx/pr79633.c | 11 - gcc/testsuite/gcc.target/i386/mpx/pr79753.c | 14 - gcc/testsuite/gcc.target/i386/mpx/pr79770.c | 19 - gcc/testsuite/gcc.target/i386/mpx/pr79987.c | 5 - gcc/testsuite/gcc.target/i386/mpx/pr79988.c | 6 - .../gcc.target/i386/mpx/realloc-1-lbv.c | 27 - .../gcc.target/i386/mpx/realloc-1-nov.c | 25 - .../gcc.target/i386/mpx/realloc-1-ubv.c | 27 - .../gcc.target/i386/mpx/realloc-2-lbv.c | 27 - .../gcc.target/i386/mpx/realloc-2-nov.c | 25 - .../gcc.target/i386/mpx/realloc-2-ubv.c | 27 - .../gcc.target/i386/mpx/reference-1-lbv.cpp | 33 - .../gcc.target/i386/mpx/reference-1-nov.cpp | 31 - .../gcc.target/i386/mpx/reference-1-ubv.cpp | 33 - .../gcc.target/i386/mpx/reference-2-lbv.cpp | 33 - .../gcc.target/i386/mpx/reference-2-nov.cpp | 31 - .../gcc.target/i386/mpx/reference-2-ubv.cpp | 33 - .../gcc.target/i386/mpx/reference-3-lbv.cpp | 27 - .../gcc.target/i386/mpx/reference-3-nov.cpp | 25 - .../gcc.target/i386/mpx/reference-3-ubv.cpp | 27 - .../gcc.target/i386/mpx/reference-4-lbv.cpp | 31 - .../gcc.target/i386/mpx/reference-4-nov.cpp | 29 - .../gcc.target/i386/mpx/reference-4-ubv.cpp | 31 - .../i386/mpx/return-pointer-1-lbv.c | 43 - .../i386/mpx/return-pointer-1-nov.c | 41 - .../i386/mpx/return-pointer-1-ubv.c | 43 - .../gcc.target/i386/mpx/return-struct-1-lbv.c | 38 - .../gcc.target/i386/mpx/return-struct-1-nov.c | 36 - .../gcc.target/i386/mpx/return-struct-1-ubv.c | 38 - .../gcc.target/i386/mpx/return-struct-2-lbv.c | 41 - .../gcc.target/i386/mpx/return-struct-2-nov.c | 39 - .../gcc.target/i386/mpx/return-struct-2-ubv.c | 41 - .../gcc.target/i386/mpx/return-struct-3-lbv.c | 41 - .../gcc.target/i386/mpx/return-struct-3-nov.c | 39 - .../gcc.target/i386/mpx/return-struct-3-ubv.c | 41 - .../gcc.target/i386/mpx/return-struct-4-lbv.c | 40 - .../gcc.target/i386/mpx/return-struct-4-nov.c | 38 - .../gcc.target/i386/mpx/return-struct-4-ubv.c | 40 - .../gcc.target/i386/mpx/return-struct-5-lbv.c | 40 - .../gcc.target/i386/mpx/return-struct-5-nov.c | 38 - .../gcc.target/i386/mpx/return-struct-5-ubv.c | 40 - .../gcc.target/i386/mpx/return-struct-6-lbv.c | 42 - .../gcc.target/i386/mpx/return-struct-6-nov.c | 40 - .../gcc.target/i386/mpx/return-struct-6-ubv.c | 42 - .../gcc.target/i386/mpx/sincos-1-nov.c | 18 - .../gcc.target/i386/mpx/static-array-1-lbv.c | 16 - .../gcc.target/i386/mpx/static-array-1-nov.c | 14 - .../gcc.target/i386/mpx/static-array-1-ubv.c | 16 - .../gcc.target/i386/mpx/static-init-1-lbv.c | 18 - .../gcc.target/i386/mpx/static-init-1-nov.c | 16 - .../gcc.target/i386/mpx/static-init-1-ubv.c | 18 - .../gcc.target/i386/mpx/static-init-2-lbv.c | 24 - .../gcc.target/i386/mpx/static-init-2-nov.c | 22 - .../gcc.target/i386/mpx/static-init-2-ubv.c | 24 - .../gcc.target/i386/mpx/static-init-3-lbv.c | 25 - .../gcc.target/i386/mpx/static-init-3-nov.c | 23 - .../gcc.target/i386/mpx/static-init-3-ubv.c | 25 - .../gcc.target/i386/mpx/static-init-4-lbv.c | 18 - .../gcc.target/i386/mpx/static-init-4-nov.c | 16 - .../gcc.target/i386/mpx/static-init-4-ubv.c | 18 - .../gcc.target/i386/mpx/static-init-5-lbv.c | 30 - .../gcc.target/i386/mpx/static-init-5-nov.c | 34 - .../gcc.target/i386/mpx/static-init-5-ubv.c | 30 - .../gcc.target/i386/mpx/static-init-6-lbv.c | 30 - .../gcc.target/i386/mpx/static-init-6-nov.c | 28 - .../gcc.target/i386/mpx/static-init-6-ubv.c | 30 - .../gcc.target/i386/mpx/static-string-1-lbv.c | 29 - .../gcc.target/i386/mpx/static-string-1-nov.c | 26 - .../gcc.target/i386/mpx/static-string-1-ubv.c | 29 - .../gcc.target/i386/mpx/struct-arg-1-lbv.c | 36 - .../gcc.target/i386/mpx/struct-arg-1-nov.c | 38 - .../gcc.target/i386/mpx/struct-arg-1-ubv.c | 36 - .../gcc.target/i386/mpx/struct-arg-10-lbv.c | 33 - .../gcc.target/i386/mpx/struct-arg-10-nov.c | 31 - .../gcc.target/i386/mpx/struct-arg-10-ubv.c | 33 - .../gcc.target/i386/mpx/struct-arg-2-lbv.c | 36 - .../gcc.target/i386/mpx/struct-arg-2-nov.c | 38 - .../gcc.target/i386/mpx/struct-arg-2-ubv.c | 36 - .../gcc.target/i386/mpx/struct-arg-3-lbv.c | 37 - .../gcc.target/i386/mpx/struct-arg-3-nov.c | 39 - .../gcc.target/i386/mpx/struct-arg-3-ubv.c | 37 - .../gcc.target/i386/mpx/struct-arg-4-lbv.c | 37 - .../gcc.target/i386/mpx/struct-arg-4-nov.c | 39 - .../gcc.target/i386/mpx/struct-arg-4-ubv.c | 37 - .../gcc.target/i386/mpx/struct-arg-5-lbv.c | 37 - .../gcc.target/i386/mpx/struct-arg-5-nov.c | 39 - .../gcc.target/i386/mpx/struct-arg-5-ubv.c | 37 - .../gcc.target/i386/mpx/struct-arg-6-lbv.c | 37 - .../gcc.target/i386/mpx/struct-arg-6-nov.c | 39 - .../gcc.target/i386/mpx/struct-arg-6-ubv.c | 37 - .../gcc.target/i386/mpx/struct-arg-7-lbv.c | 37 - .../gcc.target/i386/mpx/struct-arg-7-nov.c | 39 - .../gcc.target/i386/mpx/struct-arg-7-ubv.c | 37 - .../gcc.target/i386/mpx/struct-arg-8-lbv.c | 31 - .../gcc.target/i386/mpx/struct-arg-8-nov.c | 29 - .../gcc.target/i386/mpx/struct-arg-8-ubv.c | 31 - .../gcc.target/i386/mpx/struct-arg-9-lbv.c | 31 - .../gcc.target/i386/mpx/struct-arg-9-nov.c | 29 - .../gcc.target/i386/mpx/struct-arg-9-ubv.c | 31 - .../gcc.target/i386/mpx/struct-copy-1-lbv.c | 32 - .../gcc.target/i386/mpx/struct-copy-1-nov.c | 36 - .../gcc.target/i386/mpx/struct-copy-1-ubv.c | 32 - .../gcc.target/i386/mpx/struct-copy-2-lbv.c | 31 - .../gcc.target/i386/mpx/struct-copy-2-nov.c | 29 - .../gcc.target/i386/mpx/struct-copy-2-ubv.c | 31 - .../i386/mpx/thread-local-var-1-lbv.c | 34 - .../i386/mpx/thread-local-var-1-nov.c | 33 - .../i386/mpx/thread-local-var-1-ubv.c | 34 - .../gcc.target/i386/mpx/union-arg-1-lbv.c | 43 - .../gcc.target/i386/mpx/union-arg-1-nov.c | 45 - .../gcc.target/i386/mpx/union-arg-1-ubv.c | 43 - .../gcc.target/i386/mpx/va-arg-pack-1-lbv.c | 42 - .../gcc.target/i386/mpx/va-arg-pack-1-nov.c | 40 - .../gcc.target/i386/mpx/va-arg-pack-1-ubv.c | 42 - .../gcc.target/i386/mpx/va-arg-pack-2-lbv.c | 45 - .../gcc.target/i386/mpx/va-arg-pack-2-nov.c | 43 - .../gcc.target/i386/mpx/va-arg-pack-2-ubv.c | 45 - .../gcc.target/i386/mpx/vararg-1-lbv.c | 37 - .../gcc.target/i386/mpx/vararg-1-nov.c | 35 - .../gcc.target/i386/mpx/vararg-1-ubv.c | 37 - .../gcc.target/i386/mpx/vararg-2-lbv.c | 38 - .../gcc.target/i386/mpx/vararg-2-nov.c | 36 - .../gcc.target/i386/mpx/vararg-2-ubv.c | 38 - .../gcc.target/i386/mpx/vararg-3-lbv.c | 38 - .../gcc.target/i386/mpx/vararg-3-nov.c | 36 - .../gcc.target/i386/mpx/vararg-3-ubv.c | 38 - .../gcc.target/i386/mpx/vararg-4-lbv.c | 38 - .../gcc.target/i386/mpx/vararg-4-nov.c | 36 - .../gcc.target/i386/mpx/vararg-4-ubv.c | 38 - .../gcc.target/i386/mpx/vararg-5-lbv.c | 38 - .../gcc.target/i386/mpx/vararg-5-nov.c | 36 - .../gcc.target/i386/mpx/vararg-5-ubv.c | 38 - .../gcc.target/i386/mpx/vararg-6-lbv.c | 38 - .../gcc.target/i386/mpx/vararg-6-nov.c | 36 - .../gcc.target/i386/mpx/vararg-6-ubv.c | 38 - .../gcc.target/i386/mpx/vararg-7-lbv.c | 37 - .../gcc.target/i386/mpx/vararg-7-nov.c | 35 - .../gcc.target/i386/mpx/vararg-7-ubv.c | 37 - .../gcc.target/i386/mpx/vararg-8-lbv.c | 40 - .../gcc.target/i386/mpx/vararg-8-nov.c | 38 - .../gcc.target/i386/mpx/vararg-8-ubv.c | 40 - gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c | 29 - gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c | 27 - gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c | 29 - gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c | 27 - gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c | 25 - gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c | 27 - .../gcc.target/i386/mpx/vla-trailing-1-lbv.c | 29 - .../gcc.target/i386/mpx/vla-trailing-1-nov.c | 29 - .../gcc.target/i386/mpx/vla-trailing-1-ubv.c | 29 - gcc/testsuite/gcc.target/i386/pr63995-2.c | 27 - gcc/testsuite/gcc.target/i386/pr64805.c | 21 - gcc/testsuite/gcc.target/i386/pr65044.c | 11 - gcc/testsuite/gcc.target/i386/pr65167.c | 10 - gcc/testsuite/gcc.target/i386/pr65183.c | 19 - gcc/testsuite/gcc.target/i386/pr65184.c | 16 - gcc/testsuite/gcc.target/i386/pr65523.c | 11 - gcc/testsuite/gcc.target/i386/pr70876.c | 13 - gcc/testsuite/gcc.target/i386/pr70877.c | 14 - gcc/testsuite/gcc.target/i386/pr71458.c | 7 - gcc/testsuite/gcc.target/i386/pr80880.c | 10 - gcc/testsuite/gcc.target/i386/ret-thunk-25.c | 15 - gcc/testsuite/gcc.target/i386/thunk-retbnd.c | 17 - gcc/testsuite/lib/mpx-dg.exp | 146 - gcc/toplev.c | 47 - gcc/tree-chkp-opt.c | 1355 -- gcc/tree-chkp.c | 4678 ------ gcc/tree-chkp.h | 64 - gcc/tree-core.h | 14 - gcc/tree-inline.c | 130 +- gcc/tree-pass.h | 6 - gcc/tree-pretty-print.c | 1 - gcc/tree-ssa-ccp.c | 3 - gcc/tree-ssa-dce.c | 38 +- gcc/tree-ssa-pre.c | 1 - gcc/tree-ssa-sccvn.c | 2 - gcc/tree-ssa-sccvn.h | 2 - gcc/tree-ssa-strlen.c | 148 +- gcc/tree-stdarg.c | 6 - gcc/tree-streamer-in.c | 1 - gcc/tree-streamer.c | 1 - gcc/tree.c | 5 - gcc/tree.def | 11 +- gcc/tree.h | 20 - gcc/value-prof.c | 55 - gcc/var-tracking.c | 3 +- gcc/varasm.c | 22 +- gcc/varpool.c | 6 - libmpx/ChangeLog | 199 - libmpx/Makefile.am | 52 - libmpx/Makefile.in | 672 - libmpx/acinclude.m4 | 14 - libmpx/aclocal.m4 | 716 - libmpx/config.h.in | 100 - libmpx/configure | 13979 ---------------- libmpx/configure.ac | 150 - libmpx/configure.tgt | 29 - libmpx/libmpx.spec.in | 3 - libmpx/mpxrt/Makefile.am | 61 - libmpx/mpxrt/Makefile.in | 580 - libmpx/mpxrt/libmpx.map | 10 - libmpx/mpxrt/libtool-version | 6 - libmpx/mpxrt/mpxrt-utils.c | 551 - libmpx/mpxrt/mpxrt-utils.h | 71 - libmpx/mpxrt/mpxrt.c | 494 - libmpx/mpxrt/mpxrt.h | 75 - libmpx/mpxwrap/Makefile.am | 58 - libmpx/mpxwrap/Makefile.in | 576 - libmpx/mpxwrap/libmpxwrappers.map | 23 - libmpx/mpxwrap/libtool-version | 6 - libmpx/mpxwrap/mpx_wrappers.c | 646 - 514 files changed, 923 insertions(+), 42014 deletions(-) delete mode 100644 config/bootstrap-mpx.mk delete mode 100644 gcc/chkp-builtins.def delete mode 100644 gcc/ipa-chkp.c delete mode 100644 gcc/ipa-chkp.h delete mode 100644 gcc/rtl-chkp.c delete mode 100644 gcc/rtl-chkp.h delete mode 100644 gcc/testsuite/g++.dg/lto/pr69729_0.C delete mode 100644 gcc/testsuite/g++.dg/opt/pr71529.C delete mode 100644 gcc/testsuite/g++.dg/pr63995-1.C delete mode 100644 gcc/testsuite/g++.dg/pr68270.C delete mode 100644 gcc/testsuite/g++.dg/pr71624.C delete mode 100644 gcc/testsuite/g++.dg/pr71633.C delete mode 100644 gcc/testsuite/g++.dg/pr79761.C delete mode 100644 gcc/testsuite/g++.dg/pr79764.C delete mode 100644 gcc/testsuite/g++.dg/pr79769.C delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-privatize-1_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-privatize-2_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-privatize_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-removed-alias_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-static-bounds_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/chkp-wrap-asm-name_0.c delete mode 100644 gcc/testsuite/gcc.dg/lto/pr66221_0.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-always_inline.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-bndret.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-builtins-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-builtins-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-builtins-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-builtins-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-const-check-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-const-check-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-hidden-def.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-label-address.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-pr69044.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strchr.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strlen-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strlen-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strlen-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strlen-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-strlen-5.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-10.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-11.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-12.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-13.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-14.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-15.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-16.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-17.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-5.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-6.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-7.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-8.c delete mode 100644 gcc/testsuite/gcc.target/i386/chkp-stropt-9.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-11.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-12.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/label-address-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/macro.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/memmove-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/memmove-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/mpx-check.h delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/mpx.exp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr65508.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr65531.cc delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66048.cc delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66134.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66566.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66567.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66568.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66569.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr66581.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr68416.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr78339.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79631.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79633.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79753.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79770.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79987.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/pr79988.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c delete mode 100644 gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr63995-2.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr64805.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr65044.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr65167.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr65183.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr65184.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr65523.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr70876.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr70877.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr71458.c delete mode 100644 gcc/testsuite/gcc.target/i386/pr80880.c delete mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-25.c delete mode 100644 gcc/testsuite/gcc.target/i386/thunk-retbnd.c delete mode 100644 gcc/testsuite/lib/mpx-dg.exp delete mode 100644 gcc/tree-chkp-opt.c delete mode 100644 gcc/tree-chkp.c delete mode 100644 gcc/tree-chkp.h delete mode 100644 libmpx/ChangeLog delete mode 100644 libmpx/Makefile.am delete mode 100644 libmpx/Makefile.in delete mode 100644 libmpx/acinclude.m4 delete mode 100644 libmpx/aclocal.m4 delete mode 100644 libmpx/config.h.in delete mode 100644 libmpx/configure delete mode 100644 libmpx/configure.ac delete mode 100644 libmpx/configure.tgt delete mode 100644 libmpx/libmpx.spec.in delete mode 100644 libmpx/mpxrt/Makefile.am delete mode 100644 libmpx/mpxrt/Makefile.in delete mode 100644 libmpx/mpxrt/libmpx.map delete mode 100644 libmpx/mpxrt/libtool-version delete mode 100644 libmpx/mpxrt/mpxrt-utils.c delete mode 100644 libmpx/mpxrt/mpxrt-utils.h delete mode 100644 libmpx/mpxrt/mpxrt.c delete mode 100644 libmpx/mpxrt/mpxrt.h delete mode 100644 libmpx/mpxwrap/Makefile.am delete mode 100644 libmpx/mpxwrap/Makefile.in delete mode 100644 libmpx/mpxwrap/libmpxwrappers.map delete mode 100644 libmpx/mpxwrap/libtool-version delete mode 100644 libmpx/mpxwrap/mpx_wrappers.c diff --git a/ChangeLog b/ChangeLog index bdf0225fb81..7b0524fa602 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2018-06-08 Martin Liska + + * MAINTAINERS: Remove MPX-related entries. + * Makefile.def: Remove libmpx support. + * Makefile.in: Likewise. + * configure: Remove removed files. + * configure.ac: Likewise. + * libmpx/ChangeLog: Remove. + * libmpx/Makefile.am: Remove. + * libmpx/Makefile.in: Remove. + * libmpx/acinclude.m4: Remove. + * libmpx/aclocal.m4: Remove. + * libmpx/config.h.in: Remove. + * libmpx/configure: Remove. + * libmpx/configure.ac: Remove. + * libmpx/configure.tgt: Remove. + * libmpx/libmpx.spec.in: Remove. + * libmpx/mpxrt/Makefile.am: Remove. + * libmpx/mpxrt/Makefile.in: Remove. + * libmpx/mpxrt/libmpx.map: Remove. + * libmpx/mpxrt/libtool-version: Remove. + * libmpx/mpxrt/mpxrt-utils.c: Remove. + * libmpx/mpxrt/mpxrt-utils.h: Remove. + * libmpx/mpxrt/mpxrt.c: Remove. + * libmpx/mpxrt/mpxrt.h: Remove. + * libmpx/mpxwrap/Makefile.am: Remove. + * libmpx/mpxwrap/Makefile.in: Remove. + * libmpx/mpxwrap/libmpxwrappers.map: Remove. + * libmpx/mpxwrap/libtool-version: Remove. + * libmpx/mpxwrap/mpx_wrappers.c: Remove. + 2018-06-04 Martin Liska * MAINTAINERS: Add myself as gcov maintainer. diff --git a/MAINTAINERS b/MAINTAINERS index 9cbcc432814..62f74a8d74e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -168,7 +168,6 @@ libgomp Jakub Jelinek libiberty DJ Delorie libiberty Ian Lance Taylor libitm Torvald Riegel -libmpx Ilya Enkovich libobjc Nicola Pero libobjc Andrew Pinski libquadmath Tobias Burnus @@ -247,8 +246,6 @@ register allocation Vladimir Makarov gdbhooks.py David Malcolm SLSR Bill Schmidt jit David Malcolm -pointer bounds checker Ilya Enkovich -i386 MPX Ilya Enkovich gen* on machine desc Richard Sandiford Note that individuals who maintain parts of the compiler need approval to diff --git a/Makefile.def b/Makefile.def index 4b9f757f586..062d2fb3e75 100644 --- a/Makefile.def +++ b/Makefile.def @@ -137,9 +137,6 @@ target_modules = { module= libsanitizer; bootstrap=true; lib_path=.libs; raw_cxx=true; }; -target_modules = { module= libmpx; - bootstrap=true; - lib_path=.libs; }; target_modules = { module= libvtv; bootstrap=true; lib_path=.libs; diff --git a/Makefile.in b/Makefile.in index 2bf83b72265..be6b7757cd6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -622,7 +622,7 @@ all: # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the target machine work. -TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc) +TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc) @if target-libstdc++-v3 TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: @@ -632,10 +632,6 @@ TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: TARGET_LIB_PATH_libsanitizer = $$r/$(TARGET_SUBDIR)/libsanitizer/.libs: @endif target-libsanitizer -@if target-libmpx -TARGET_LIB_PATH_libmpx = $$r/$(TARGET_SUBDIR)/libmpx/.libs: -@endif target-libmpx - @if target-libvtv TARGET_LIB_PATH_libvtv = $$r/$(TARGET_SUBDIR)/libvtv/.libs: @endif target-libvtv @@ -1001,7 +997,6 @@ configure-host: \ configure-target: \ maybe-configure-target-libstdc++-v3 \ maybe-configure-target-libsanitizer \ - maybe-configure-target-libmpx \ maybe-configure-target-libvtv \ maybe-configure-target-liboffloadmic \ maybe-configure-target-libssp \ @@ -1160,9 +1155,6 @@ all-target: maybe-all-target-libstdc++-v3 @if target-libsanitizer-no-bootstrap all-target: maybe-all-target-libsanitizer @endif target-libsanitizer-no-bootstrap -@if target-libmpx-no-bootstrap -all-target: maybe-all-target-libmpx -@endif target-libmpx-no-bootstrap @if target-libvtv-no-bootstrap all-target: maybe-all-target-libvtv @endif target-libvtv-no-bootstrap @@ -1258,7 +1250,6 @@ info-host: maybe-info-gotools info-target: maybe-info-target-libstdc++-v3 info-target: maybe-info-target-libsanitizer -info-target: maybe-info-target-libmpx info-target: maybe-info-target-libvtv info-target: maybe-info-target-liboffloadmic info-target: maybe-info-target-libssp @@ -1343,7 +1334,6 @@ dvi-host: maybe-dvi-gotools dvi-target: maybe-dvi-target-libstdc++-v3 dvi-target: maybe-dvi-target-libsanitizer -dvi-target: maybe-dvi-target-libmpx dvi-target: maybe-dvi-target-libvtv dvi-target: maybe-dvi-target-liboffloadmic dvi-target: maybe-dvi-target-libssp @@ -1428,7 +1418,6 @@ pdf-host: maybe-pdf-gotools pdf-target: maybe-pdf-target-libstdc++-v3 pdf-target: maybe-pdf-target-libsanitizer -pdf-target: maybe-pdf-target-libmpx pdf-target: maybe-pdf-target-libvtv pdf-target: maybe-pdf-target-liboffloadmic pdf-target: maybe-pdf-target-libssp @@ -1513,7 +1502,6 @@ html-host: maybe-html-gotools html-target: maybe-html-target-libstdc++-v3 html-target: maybe-html-target-libsanitizer -html-target: maybe-html-target-libmpx html-target: maybe-html-target-libvtv html-target: maybe-html-target-liboffloadmic html-target: maybe-html-target-libssp @@ -1598,7 +1586,6 @@ TAGS-host: maybe-TAGS-gotools TAGS-target: maybe-TAGS-target-libstdc++-v3 TAGS-target: maybe-TAGS-target-libsanitizer -TAGS-target: maybe-TAGS-target-libmpx TAGS-target: maybe-TAGS-target-libvtv TAGS-target: maybe-TAGS-target-liboffloadmic TAGS-target: maybe-TAGS-target-libssp @@ -1683,7 +1670,6 @@ install-info-host: maybe-install-info-gotools install-info-target: maybe-install-info-target-libstdc++-v3 install-info-target: maybe-install-info-target-libsanitizer -install-info-target: maybe-install-info-target-libmpx install-info-target: maybe-install-info-target-libvtv install-info-target: maybe-install-info-target-liboffloadmic install-info-target: maybe-install-info-target-libssp @@ -1768,7 +1754,6 @@ install-pdf-host: maybe-install-pdf-gotools install-pdf-target: maybe-install-pdf-target-libstdc++-v3 install-pdf-target: maybe-install-pdf-target-libsanitizer -install-pdf-target: maybe-install-pdf-target-libmpx install-pdf-target: maybe-install-pdf-target-libvtv install-pdf-target: maybe-install-pdf-target-liboffloadmic install-pdf-target: maybe-install-pdf-target-libssp @@ -1853,7 +1838,6 @@ install-html-host: maybe-install-html-gotools install-html-target: maybe-install-html-target-libstdc++-v3 install-html-target: maybe-install-html-target-libsanitizer -install-html-target: maybe-install-html-target-libmpx install-html-target: maybe-install-html-target-libvtv install-html-target: maybe-install-html-target-liboffloadmic install-html-target: maybe-install-html-target-libssp @@ -1938,7 +1922,6 @@ installcheck-host: maybe-installcheck-gotools installcheck-target: maybe-installcheck-target-libstdc++-v3 installcheck-target: maybe-installcheck-target-libsanitizer -installcheck-target: maybe-installcheck-target-libmpx installcheck-target: maybe-installcheck-target-libvtv installcheck-target: maybe-installcheck-target-liboffloadmic installcheck-target: maybe-installcheck-target-libssp @@ -2023,7 +2006,6 @@ mostlyclean-host: maybe-mostlyclean-gotools mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target: maybe-mostlyclean-target-libsanitizer -mostlyclean-target: maybe-mostlyclean-target-libmpx mostlyclean-target: maybe-mostlyclean-target-libvtv mostlyclean-target: maybe-mostlyclean-target-liboffloadmic mostlyclean-target: maybe-mostlyclean-target-libssp @@ -2108,7 +2090,6 @@ clean-host: maybe-clean-gotools clean-target: maybe-clean-target-libstdc++-v3 clean-target: maybe-clean-target-libsanitizer -clean-target: maybe-clean-target-libmpx clean-target: maybe-clean-target-libvtv clean-target: maybe-clean-target-liboffloadmic clean-target: maybe-clean-target-libssp @@ -2193,7 +2174,6 @@ distclean-host: maybe-distclean-gotools distclean-target: maybe-distclean-target-libstdc++-v3 distclean-target: maybe-distclean-target-libsanitizer -distclean-target: maybe-distclean-target-libmpx distclean-target: maybe-distclean-target-libvtv distclean-target: maybe-distclean-target-liboffloadmic distclean-target: maybe-distclean-target-libssp @@ -2278,7 +2258,6 @@ maintainer-clean-host: maybe-maintainer-clean-gotools maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer -maintainer-clean-target: maybe-maintainer-clean-target-libmpx maintainer-clean-target: maybe-maintainer-clean-target-libvtv maintainer-clean-target: maybe-maintainer-clean-target-liboffloadmic maintainer-clean-target: maybe-maintainer-clean-target-libssp @@ -2419,7 +2398,6 @@ check-host: \ check-target: \ maybe-check-target-libstdc++-v3 \ maybe-check-target-libsanitizer \ - maybe-check-target-libmpx \ maybe-check-target-libvtv \ maybe-check-target-liboffloadmic \ maybe-check-target-libssp \ @@ -2600,7 +2578,6 @@ install-host: \ install-target: \ maybe-install-target-libstdc++-v3 \ maybe-install-target-libsanitizer \ - maybe-install-target-libmpx \ maybe-install-target-libvtv \ maybe-install-target-liboffloadmic \ maybe-install-target-libssp \ @@ -2705,7 +2682,6 @@ install-strip-host: \ install-strip-target: \ maybe-install-strip-target-libstdc++-v3 \ maybe-install-strip-target-libsanitizer \ - maybe-install-strip-target-libmpx \ maybe-install-strip-target-libvtv \ maybe-install-strip-target-liboffloadmic \ maybe-install-strip-target-libssp \ @@ -40365,1249 +40341,6 @@ maintainer-clean-target-libsanitizer: -.PHONY: configure-target-libmpx maybe-configure-target-libmpx -maybe-configure-target-libmpx: -@if gcc-bootstrap -configure-target-libmpx: stage_current -@endif gcc-bootstrap -@if target-libmpx -maybe-configure-target-libmpx: configure-target-libmpx -configure-target-libmpx: - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - echo "Checking multilib configuration for libmpx..."; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - $(NORMAL_TARGET_EXPORTS) \ - echo Configuring in $(TARGET_SUBDIR)/libmpx; \ - cd "$(TARGET_SUBDIR)/libmpx" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - rm -f no-such-file || : ; \ - CONFIG_SITE=no-such-file $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - || exit 1 -@endif target-libmpx - - - -.PHONY: configure-stage1-target-libmpx maybe-configure-stage1-target-libmpx -maybe-configure-stage1-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stage1-target-libmpx: configure-stage1-target-libmpx -configure-stage1-target-libmpx: - @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE1_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage 1 in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - \ - $(STAGE1_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stage2-target-libmpx maybe-configure-stage2-target-libmpx -maybe-configure-stage2-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stage2-target-libmpx: configure-stage2-target-libmpx -configure-stage2-target-libmpx: - @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE2_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage 2 in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE2_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stage3-target-libmpx maybe-configure-stage3-target-libmpx -maybe-configure-stage3-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stage3-target-libmpx: configure-stage3-target-libmpx -configure-stage3-target-libmpx: - @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE3_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage 3 in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE3_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stage4-target-libmpx maybe-configure-stage4-target-libmpx -maybe-configure-stage4-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stage4-target-libmpx: configure-stage4-target-libmpx -configure-stage4-target-libmpx: - @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE4_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage 4 in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE4_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stageprofile-target-libmpx maybe-configure-stageprofile-target-libmpx -maybe-configure-stageprofile-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stageprofile-target-libmpx: configure-stageprofile-target-libmpx -configure-stageprofile-target-libmpx: - @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEprofile_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage profile in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEprofile_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stagetrain-target-libmpx maybe-configure-stagetrain-target-libmpx -maybe-configure-stagetrain-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stagetrain-target-libmpx: configure-stagetrain-target-libmpx -configure-stagetrain-target-libmpx: - @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEtrain_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage train in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEtrain_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stagefeedback-target-libmpx maybe-configure-stagefeedback-target-libmpx -maybe-configure-stagefeedback-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stagefeedback-target-libmpx: configure-stagefeedback-target-libmpx -configure-stagefeedback-target-libmpx: - @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEfeedback_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage feedback in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEfeedback_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stageautoprofile-target-libmpx maybe-configure-stageautoprofile-target-libmpx -maybe-configure-stageautoprofile-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stageautoprofile-target-libmpx: configure-stageautoprofile-target-libmpx -configure-stageautoprofile-target-libmpx: - @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage autoprofile in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautoprofile_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - -.PHONY: configure-stageautofeedback-target-libmpx maybe-configure-stageautofeedback-target-libmpx -maybe-configure-stageautofeedback-target-libmpx: -@if target-libmpx-bootstrap -maybe-configure-stageautofeedback-target-libmpx: configure-stageautofeedback-target-libmpx -configure-stageautofeedback-target-libmpx: - @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ - echo "Checking multilib configuration for libmpx..."; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ - echo Configuring stage autofeedback in $(TARGET_SUBDIR)/libmpx; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \ - cd $(TARGET_SUBDIR)/libmpx || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=libmpx; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautofeedback_CONFIGURE_FLAGS) -@endif target-libmpx-bootstrap - - - - - -.PHONY: all-target-libmpx maybe-all-target-libmpx -maybe-all-target-libmpx: -@if gcc-bootstrap -all-target-libmpx: stage_current -@endif gcc-bootstrap -@if target-libmpx -TARGET-target-libmpx=all -maybe-all-target-libmpx: all-target-libmpx -all-target-libmpx: configure-target-libmpx - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ - $(TARGET-target-libmpx)) -@endif target-libmpx - - - -.PHONY: all-stage1-target-libmpx maybe-all-stage1-target-libmpx -.PHONY: clean-stage1-target-libmpx maybe-clean-stage1-target-libmpx -maybe-all-stage1-target-libmpx: -maybe-clean-stage1-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stage1-target-libmpx: all-stage1-target-libmpx -all-stage1: all-stage1-target-libmpx -TARGET-stage1-target-libmpx = $(TARGET-target-libmpx) -all-stage1-target-libmpx: configure-stage1-target-libmpx - @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE1_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - \ - TFLAGS="$(STAGE1_TFLAGS)" \ - $(TARGET-stage1-target-libmpx) - -maybe-clean-stage1-target-libmpx: clean-stage1-target-libmpx -clean-stage1: clean-stage1-target-libmpx -clean-stage1-target-libmpx: - @if [ $(current_stage) = stage1 ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stage1-libmpx/Makefile ] || exit 0; \ - $(MAKE) stage1-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) \ - clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stage2-target-libmpx maybe-all-stage2-target-libmpx -.PHONY: clean-stage2-target-libmpx maybe-clean-stage2-target-libmpx -maybe-all-stage2-target-libmpx: -maybe-clean-stage2-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stage2-target-libmpx: all-stage2-target-libmpx -all-stage2: all-stage2-target-libmpx -TARGET-stage2-target-libmpx = $(TARGET-target-libmpx) -all-stage2-target-libmpx: configure-stage2-target-libmpx - @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE2_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGE2_TFLAGS)" \ - $(TARGET-stage2-target-libmpx) - -maybe-clean-stage2-target-libmpx: clean-stage2-target-libmpx -clean-stage2: clean-stage2-target-libmpx -clean-stage2-target-libmpx: - @if [ $(current_stage) = stage2 ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stage2-libmpx/Makefile ] || exit 0; \ - $(MAKE) stage2-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stage3-target-libmpx maybe-all-stage3-target-libmpx -.PHONY: clean-stage3-target-libmpx maybe-clean-stage3-target-libmpx -maybe-all-stage3-target-libmpx: -maybe-clean-stage3-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stage3-target-libmpx: all-stage3-target-libmpx -all-stage3: all-stage3-target-libmpx -TARGET-stage3-target-libmpx = $(TARGET-target-libmpx) -all-stage3-target-libmpx: configure-stage3-target-libmpx - @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE3_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGE3_TFLAGS)" \ - $(TARGET-stage3-target-libmpx) - -maybe-clean-stage3-target-libmpx: clean-stage3-target-libmpx -clean-stage3: clean-stage3-target-libmpx -clean-stage3-target-libmpx: - @if [ $(current_stage) = stage3 ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stage3-libmpx/Makefile ] || exit 0; \ - $(MAKE) stage3-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stage4-target-libmpx maybe-all-stage4-target-libmpx -.PHONY: clean-stage4-target-libmpx maybe-clean-stage4-target-libmpx -maybe-all-stage4-target-libmpx: -maybe-clean-stage4-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stage4-target-libmpx: all-stage4-target-libmpx -all-stage4: all-stage4-target-libmpx -TARGET-stage4-target-libmpx = $(TARGET-target-libmpx) -all-stage4-target-libmpx: configure-stage4-target-libmpx - @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE4_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGE4_TFLAGS)" \ - $(TARGET-stage4-target-libmpx) - -maybe-clean-stage4-target-libmpx: clean-stage4-target-libmpx -clean-stage4: clean-stage4-target-libmpx -clean-stage4-target-libmpx: - @if [ $(current_stage) = stage4 ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stage4-libmpx/Makefile ] || exit 0; \ - $(MAKE) stage4-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stageprofile-target-libmpx maybe-all-stageprofile-target-libmpx -.PHONY: clean-stageprofile-target-libmpx maybe-clean-stageprofile-target-libmpx -maybe-all-stageprofile-target-libmpx: -maybe-clean-stageprofile-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stageprofile-target-libmpx: all-stageprofile-target-libmpx -all-stageprofile: all-stageprofile-target-libmpx -TARGET-stageprofile-target-libmpx = $(TARGET-target-libmpx) -all-stageprofile-target-libmpx: configure-stageprofile-target-libmpx - @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEprofile_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGEprofile_TFLAGS)" \ - $(TARGET-stageprofile-target-libmpx) - -maybe-clean-stageprofile-target-libmpx: clean-stageprofile-target-libmpx -clean-stageprofile: clean-stageprofile-target-libmpx -clean-stageprofile-target-libmpx: - @if [ $(current_stage) = stageprofile ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stageprofile-libmpx/Makefile ] || exit 0; \ - $(MAKE) stageprofile-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stagetrain-target-libmpx maybe-all-stagetrain-target-libmpx -.PHONY: clean-stagetrain-target-libmpx maybe-clean-stagetrain-target-libmpx -maybe-all-stagetrain-target-libmpx: -maybe-clean-stagetrain-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stagetrain-target-libmpx: all-stagetrain-target-libmpx -all-stagetrain: all-stagetrain-target-libmpx -TARGET-stagetrain-target-libmpx = $(TARGET-target-libmpx) -all-stagetrain-target-libmpx: configure-stagetrain-target-libmpx - @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEtrain_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGEtrain_TFLAGS)" \ - $(TARGET-stagetrain-target-libmpx) - -maybe-clean-stagetrain-target-libmpx: clean-stagetrain-target-libmpx -clean-stagetrain: clean-stagetrain-target-libmpx -clean-stagetrain-target-libmpx: - @if [ $(current_stage) = stagetrain ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stagetrain-libmpx/Makefile ] || exit 0; \ - $(MAKE) stagetrain-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stagefeedback-target-libmpx maybe-all-stagefeedback-target-libmpx -.PHONY: clean-stagefeedback-target-libmpx maybe-clean-stagefeedback-target-libmpx -maybe-all-stagefeedback-target-libmpx: -maybe-clean-stagefeedback-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stagefeedback-target-libmpx: all-stagefeedback-target-libmpx -all-stagefeedback: all-stagefeedback-target-libmpx -TARGET-stagefeedback-target-libmpx = $(TARGET-target-libmpx) -all-stagefeedback-target-libmpx: configure-stagefeedback-target-libmpx - @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEfeedback_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGEfeedback_TFLAGS)" \ - $(TARGET-stagefeedback-target-libmpx) - -maybe-clean-stagefeedback-target-libmpx: clean-stagefeedback-target-libmpx -clean-stagefeedback: clean-stagefeedback-target-libmpx -clean-stagefeedback-target-libmpx: - @if [ $(current_stage) = stagefeedback ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stagefeedback-libmpx/Makefile ] || exit 0; \ - $(MAKE) stagefeedback-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stageautoprofile-target-libmpx maybe-all-stageautoprofile-target-libmpx -.PHONY: clean-stageautoprofile-target-libmpx maybe-clean-stageautoprofile-target-libmpx -maybe-all-stageautoprofile-target-libmpx: -maybe-clean-stageautoprofile-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stageautoprofile-target-libmpx: all-stageautoprofile-target-libmpx -all-stageautoprofile: all-stageautoprofile-target-libmpx -TARGET-stageautoprofile-target-libmpx = $(TARGET-target-libmpx) -all-stageautoprofile-target-libmpx: configure-stageautoprofile-target-libmpx - @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - $$s/gcc/config/i386/$(AUTO_PROFILE) \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGEautoprofile_TFLAGS)" \ - $(TARGET-stageautoprofile-target-libmpx) - -maybe-clean-stageautoprofile-target-libmpx: clean-stageautoprofile-target-libmpx -clean-stageautoprofile: clean-stageautoprofile-target-libmpx -clean-stageautoprofile-target-libmpx: - @if [ $(current_stage) = stageautoprofile ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stageautoprofile-libmpx/Makefile ] || exit 0; \ - $(MAKE) stageautoprofile-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - -.PHONY: all-stageautofeedback-target-libmpx maybe-all-stageautofeedback-target-libmpx -.PHONY: clean-stageautofeedback-target-libmpx maybe-clean-stageautofeedback-target-libmpx -maybe-all-stageautofeedback-target-libmpx: -maybe-clean-stageautofeedback-target-libmpx: -@if target-libmpx-bootstrap -maybe-all-stageautofeedback-target-libmpx: all-stageautofeedback-target-libmpx -all-stageautofeedback: all-stageautofeedback-target-libmpx -TARGET-stageautofeedback-target-libmpx = $(TARGET-target-libmpx) -all-stageautofeedback-target-libmpx: configure-stageautofeedback-target-libmpx - @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ - $(NORMAL_TARGET_EXPORTS) \ - \ - cd $(TARGET_SUBDIR)/libmpx && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_TARGET_FLAGS) \ - TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ - $(TARGET-stageautofeedback-target-libmpx) - -maybe-clean-stageautofeedback-target-libmpx: clean-stageautofeedback-target-libmpx -clean-stageautofeedback: clean-stageautofeedback-target-libmpx -clean-stageautofeedback-target-libmpx: - @if [ $(current_stage) = stageautofeedback ]; then \ - [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - else \ - [ -f $(TARGET_SUBDIR)/stageautofeedback-libmpx/Makefile ] || exit 0; \ - $(MAKE) stageautofeedback-start; \ - fi; \ - cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(EXTRA_TARGET_FLAGS) clean -@endif target-libmpx-bootstrap - - - - - - -.PHONY: check-target-libmpx maybe-check-target-libmpx -maybe-check-target-libmpx: -@if target-libmpx -maybe-check-target-libmpx: check-target-libmpx - -check-target-libmpx: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check) - -@endif target-libmpx - -.PHONY: install-target-libmpx maybe-install-target-libmpx -maybe-install-target-libmpx: -@if target-libmpx -maybe-install-target-libmpx: install-target-libmpx - -install-target-libmpx: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install) - -@endif target-libmpx - -.PHONY: install-strip-target-libmpx maybe-install-strip-target-libmpx -maybe-install-strip-target-libmpx: -@if target-libmpx -maybe-install-strip-target-libmpx: install-strip-target-libmpx - -install-strip-target-libmpx: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) - -@endif target-libmpx - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-target-libmpx info-target-libmpx -maybe-info-target-libmpx: -@if target-libmpx -maybe-info-target-libmpx: info-target-libmpx - -info-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing info in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-dvi-target-libmpx dvi-target-libmpx -maybe-dvi-target-libmpx: -@if target-libmpx -maybe-dvi-target-libmpx: dvi-target-libmpx - -dvi-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing dvi in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-pdf-target-libmpx pdf-target-libmpx -maybe-pdf-target-libmpx: -@if target-libmpx -maybe-pdf-target-libmpx: pdf-target-libmpx - -pdf-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing pdf in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-html-target-libmpx html-target-libmpx -maybe-html-target-libmpx: -@if target-libmpx -maybe-html-target-libmpx: html-target-libmpx - -html-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing html in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-TAGS-target-libmpx TAGS-target-libmpx -maybe-TAGS-target-libmpx: -@if target-libmpx -maybe-TAGS-target-libmpx: TAGS-target-libmpx - -TAGS-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing TAGS in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-install-info-target-libmpx install-info-target-libmpx -maybe-install-info-target-libmpx: -@if target-libmpx -maybe-install-info-target-libmpx: install-info-target-libmpx - -install-info-target-libmpx: \ - configure-target-libmpx \ - info-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-info in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-install-pdf-target-libmpx install-pdf-target-libmpx -maybe-install-pdf-target-libmpx: -@if target-libmpx -maybe-install-pdf-target-libmpx: install-pdf-target-libmpx - -install-pdf-target-libmpx: \ - configure-target-libmpx \ - pdf-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-pdf in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-pdf) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-install-html-target-libmpx install-html-target-libmpx -maybe-install-html-target-libmpx: -@if target-libmpx -maybe-install-html-target-libmpx: install-html-target-libmpx - -install-html-target-libmpx: \ - configure-target-libmpx \ - html-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-html in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-html) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-installcheck-target-libmpx installcheck-target-libmpx -maybe-installcheck-target-libmpx: -@if target-libmpx -maybe-installcheck-target-libmpx: installcheck-target-libmpx - -installcheck-target-libmpx: \ - configure-target-libmpx - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing installcheck in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-mostlyclean-target-libmpx mostlyclean-target-libmpx -maybe-mostlyclean-target-libmpx: -@if target-libmpx -maybe-mostlyclean-target-libmpx: mostlyclean-target-libmpx - -mostlyclean-target-libmpx: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing mostlyclean in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - mostlyclean) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-clean-target-libmpx clean-target-libmpx -maybe-clean-target-libmpx: -@if target-libmpx -maybe-clean-target-libmpx: clean-target-libmpx - -clean-target-libmpx: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing clean in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - clean) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-distclean-target-libmpx distclean-target-libmpx -maybe-distclean-target-libmpx: -@if target-libmpx -maybe-distclean-target-libmpx: distclean-target-libmpx - -distclean-target-libmpx: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing distclean in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - distclean) \ - || exit 1 - -@endif target-libmpx - -.PHONY: maybe-maintainer-clean-target-libmpx maintainer-clean-target-libmpx -maybe-maintainer-clean-target-libmpx: -@if target-libmpx -maybe-maintainer-clean-target-libmpx: maintainer-clean-target-libmpx - -maintainer-clean-target-libmpx: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libmpx"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libmpx && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - maintainer-clean) \ - || exit 1 - -@endif target-libmpx - - - - - .PHONY: configure-target-libvtv maybe-configure-target-libvtv maybe-configure-target-libvtv: @if gcc-bootstrap @@ -56757,15 +55490,6 @@ configure-stagetrain-target-libsanitizer: maybe-all-stagetrain-gcc configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-gcc configure-stageautoprofile-target-libsanitizer: maybe-all-stageautoprofile-gcc configure-stageautofeedback-target-libsanitizer: maybe-all-stageautofeedback-gcc -configure-stage1-target-libmpx: maybe-all-stage1-gcc -configure-stage2-target-libmpx: maybe-all-stage2-gcc -configure-stage3-target-libmpx: maybe-all-stage3-gcc -configure-stage4-target-libmpx: maybe-all-stage4-gcc -configure-stageprofile-target-libmpx: maybe-all-stageprofile-gcc -configure-stagetrain-target-libmpx: maybe-all-stagetrain-gcc -configure-stagefeedback-target-libmpx: maybe-all-stagefeedback-gcc -configure-stageautoprofile-target-libmpx: maybe-all-stageautoprofile-gcc -configure-stageautofeedback-target-libmpx: maybe-all-stageautofeedback-gcc configure-stage1-target-libvtv: maybe-all-stage1-gcc configure-stage2-target-libvtv: maybe-all-stage2-gcc configure-stage3-target-libvtv: maybe-all-stage3-gcc @@ -56816,7 +55540,6 @@ configure-target-libatomic: stage_last @if gcc-no-bootstrap configure-target-libstdc++-v3: maybe-all-gcc configure-target-libsanitizer: maybe-all-gcc -configure-target-libmpx: maybe-all-gcc configure-target-libvtv: maybe-all-gcc configure-target-liboffloadmic: maybe-all-gcc configure-target-libssp: maybe-all-gcc @@ -58034,15 +56757,6 @@ configure-stagetrain-target-libsanitizer: maybe-all-stagetrain-target-libgcc configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libgcc configure-stageautoprofile-target-libsanitizer: maybe-all-stageautoprofile-target-libgcc configure-stageautofeedback-target-libsanitizer: maybe-all-stageautofeedback-target-libgcc -configure-stage1-target-libmpx: maybe-all-stage1-target-libgcc -configure-stage2-target-libmpx: maybe-all-stage2-target-libgcc -configure-stage3-target-libmpx: maybe-all-stage3-target-libgcc -configure-stage4-target-libmpx: maybe-all-stage4-target-libgcc -configure-stageprofile-target-libmpx: maybe-all-stageprofile-target-libgcc -configure-stagetrain-target-libmpx: maybe-all-stagetrain-target-libgcc -configure-stagefeedback-target-libmpx: maybe-all-stagefeedback-target-libgcc -configure-stageautoprofile-target-libmpx: maybe-all-stageautoprofile-target-libgcc -configure-stageautofeedback-target-libmpx: maybe-all-stageautofeedback-target-libgcc configure-stage1-target-libvtv: maybe-all-stage1-target-libgcc configure-stage2-target-libvtv: maybe-all-stage2-target-libgcc configure-stage3-target-libvtv: maybe-all-stage3-target-libgcc @@ -58066,7 +56780,6 @@ configure-stageautofeedback-target-libgomp: maybe-all-stageautofeedback-target-l @if gcc-no-bootstrap configure-target-libstdc++-v3: maybe-all-target-libgcc configure-target-libsanitizer: maybe-all-target-libgcc -configure-target-libmpx: maybe-all-target-libgcc configure-target-libvtv: maybe-all-target-libgcc configure-target-liboffloadmic: maybe-all-target-libgcc configure-target-libssp: maybe-all-target-libgcc @@ -58094,8 +56807,6 @@ configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libsanitizer: maybe-all-target-newlib maybe-all-target-libgloss -configure-target-libmpx: maybe-all-target-newlib maybe-all-target-libgloss - configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss configure-target-liboffloadmic: maybe-all-target-newlib maybe-all-target-libgloss diff --git a/config/ChangeLog b/config/ChangeLog index ef58a91545b..8a7ee130aad 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2018-06-08 Martin Liska + + * bootstrap-mpx.mk: Remove. + 2018-05-10 Martin Liska PR bootstrap/64914 diff --git a/config/bootstrap-mpx.mk b/config/bootstrap-mpx.mk deleted file mode 100644 index acc2a2e7a9c..00000000000 --- a/config/bootstrap-mpx.mk +++ /dev/null @@ -1,9 +0,0 @@ -# This option enables -fcheck-pointer-bounds -mmpx for stage2 and stage3. - -STAGE2_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 -STAGE3_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 -POSTSTAGE1_LDFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 \ - -static-libmpx -static-libmpxwrappers \ - -B$$r/prev-$(TARGET_SUBDIR)/libmpx \ - -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxrt/.libs \ - -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxwrap/.libs diff --git a/configure b/configure index 69c99e99cca..fe8e0f63410 100755 --- a/configure +++ b/configure @@ -2758,7 +2758,6 @@ target_libraries="target-libgcc \ target-libstdc++-v3 \ target-libsanitizer \ target-libvtv \ - target-libmpx \ target-libssp \ target-libquadmath \ target-libgfortran \ @@ -3264,25 +3263,6 @@ $as_echo "yes" >&6; } fi -# Enable libmpx on supported systems by request. -if test -d ${srcdir}/libmpx; then - if test x$enable_libmpx = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpx support" >&5 -$as_echo_n "checking for libmpx support... " >&6; } - if (srcdir=${srcdir}/libmpx; \ - . ${srcdir}/configure.tgt; \ - test "$LIBMPX_SUPPORTED" != "yes") - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - noconfigdirs="$noconfigdirs target-libmpx" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - fi -fi - # Disable libhsail-rt on unsupported systems. if test -d ${srcdir}/libhsail-rt; then if test x$enable_libhsail_rt = x; then @@ -6656,7 +6636,7 @@ fi # Check whether --with-gcc-major-version-only was given. if test "${with_gcc_major_version_only+set}" = set; then : withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then - get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'" + get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'" fi fi @@ -7110,16 +7090,6 @@ if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 && bootstrap_target_libs=${bootstrap_target_libs}target-libvtv, fi -# If we are building libmpx and $BUILD_CONFIG contains bootstrap-mpx, -# bootstrap it. -if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then - case "$BUILD_CONFIG" in - *bootstrap-mpx* ) - bootstrap_target_libs=${bootstrap_target_libs}target-libmpx, - ;; - esac -fi - # Determine whether gdb needs tk/tcl or not. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh! diff --git a/configure.ac b/configure.ac index a1edc369a27..28155a0e593 100644 --- a/configure.ac +++ b/configure.ac @@ -157,7 +157,6 @@ target_libraries="target-libgcc \ target-libstdc++-v3 \ target-libsanitizer \ target-libvtv \ - target-libmpx \ target-libssp \ target-libquadmath \ target-libgfortran \ @@ -601,22 +600,6 @@ if test -d ${srcdir}/libvtv; then fi -# Enable libmpx on supported systems by request. -if test -d ${srcdir}/libmpx; then - if test x$enable_libmpx = x; then - AC_MSG_CHECKING([for libmpx support]) - if (srcdir=${srcdir}/libmpx; \ - . ${srcdir}/configure.tgt; \ - test "$LIBMPX_SUPPORTED" != "yes") - then - AC_MSG_RESULT([no]) - noconfigdirs="$noconfigdirs target-libmpx" - else - AC_MSG_RESULT([yes]) - fi - fi -fi - # Disable libhsail-rt on unsupported systems. if test -d ${srcdir}/libhsail-rt; then if test x$enable_libhsail_rt = x; then @@ -2696,16 +2679,6 @@ if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 && bootstrap_target_libs=${bootstrap_target_libs}target-libvtv, fi -# If we are building libmpx and $BUILD_CONFIG contains bootstrap-mpx, -# bootstrap it. -if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then - case "$BUILD_CONFIG" in - *bootstrap-mpx* ) - bootstrap_target_libs=${bootstrap_target_libs}target-libmpx, - ;; - esac -fi - # Determine whether gdb needs tk/tcl or not. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh! diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e85b7423576..7e7efe5f3f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,295 @@ +2018-06-08 Martin Liska + + * Makefile.in: Remove support for MPX (macros, related functions, + fields in cgraph_node, ...). + * builtin-types.def (BT_BND): Likewise. + (BT_FN_BND_CONST_PTR): Likewise. + (BT_FN_CONST_PTR_BND): Likewise. + (BT_FN_VOID_PTR_BND): Likewise. + (BT_FN_BND_CONST_PTR_SIZE): Likewise. + (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise. + * builtins.c (expand_builtin_memcpy_with_bounds): Likewise. + (expand_builtin_mempcpy_with_bounds): Likewise. + (expand_builtin_memset_with_bounds): Likewise. + (expand_builtin_memset_args): Likewise. + (std_expand_builtin_va_start): Likewise. + (expand_builtin): Likewise. + (expand_builtin_with_bounds): Likewise. + * builtins.def (DEF_BUILTIN_CHKP): Likewise. + (DEF_LIB_BUILTIN_CHKP): Likewise. + (DEF_EXT_LIB_BUILTIN_CHKP): Likewise. + (DEF_CHKP_BUILTIN): Likewise. + (BUILT_IN_MEMCPY): Likewise. + (BUILT_IN_MEMMOVE): Likewise. + (BUILT_IN_MEMPCPY): Likewise. + (BUILT_IN_MEMSET): Likewise. + (BUILT_IN_STPCPY): Likewise. + (BUILT_IN_STRCAT): Likewise. + (BUILT_IN_STRCHR): Likewise. + (BUILT_IN_STRCPY): Likewise. + (BUILT_IN_STRLEN): Likewise. + (BUILT_IN_MEMCPY_CHK): Likewise. + (BUILT_IN_MEMMOVE_CHK): Likewise. + (BUILT_IN_MEMPCPY_CHK): Likewise. + (BUILT_IN_MEMSET_CHK): Likewise. + (BUILT_IN_STPCPY_CHK): Likewise. + (BUILT_IN_STRCAT_CHK): Likewise. + (BUILT_IN_STRCPY_CHK): Likewise. + * calls.c (store_bounds): Likewise. + (emit_call_1): Likewise. + (special_function_p): Likewise. + (maybe_warn_nonstring_arg): Likewise. + (initialize_argument_information): Likewise. + (finalize_must_preallocate): Likewise. + (compute_argument_addresses): Likewise. + (expand_call): Likewise. + * cfgexpand.c (expand_call_stmt): Likewise. + (expand_return): Likewise. + (expand_gimple_stmt_1): Likewise. + (pass_expand::execute): Likewise. + * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise. + (cgraph_node::remove): Likewise. + (cgraph_node::dump): Likewise. + (cgraph_node::verify_node): Likewise. + * cgraph.h (chkp_function_instrumented_p): Likewise. + (symtab_node::get_alias_target): Likewise. + (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise. + (cgraph_local_p): Likewise. + * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise. + (cgraph_edge::rebuild_references): Likewise. + * cgraphunit.c (varpool_node::finalize_decl): Likewise. + (walk_polymorphic_call_targets): Likewise. + (cgraph_node::expand_thunk): Likewise. + (symbol_table::output_weakrefs): Likewise. + * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise. + (ix86_handle_option): Likewise. + * config/i386/constraints.md: Likewise. + * config/i386/i386-builtin-types.def (BND): Likewise. + (VOID): Likewise. + (PVOID): Likewise. + (ULONG): Likewise. + * config/i386/i386-builtin.def (BDESC_END): Likewise. + (BDESC_FIRST): Likewise. + (BDESC): Likewise. + * config/i386/i386-c.c (ix86_target_macros_internal): Likewise. + * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise. + * config/i386/i386.c (enum reg_class): Likewise. + (ix86_target_string): Likewise. + (ix86_option_override_internal): Likewise. + (ix86_conditional_register_usage): Likewise. + (ix86_valid_target_attribute_inner_p): Likewise. + (ix86_set_indirect_branch_type): Likewise. + (ix86_set_current_function): Likewise. + (ix86_function_arg_regno_p): Likewise. + (init_cumulative_args): Likewise. + (ix86_function_arg_advance): Likewise. + (ix86_function_arg): Likewise. + (ix86_pass_by_reference): Likewise. + (ix86_function_value_regno_p): Likewise. + (ix86_function_value_1): Likewise. + (ix86_function_value_bounds): Likewise. + (ix86_return_in_memory): Likewise. + (ix86_setup_incoming_vararg_bounds): Likewise. + (ix86_va_start): Likewise. + (indirect_thunk_need_prefix): Likewise. + (print_reg): Likewise. + (ix86_print_operand): Likewise. + (ix86_expand_call): Likewise. + (ix86_output_function_return): Likewise. + (reg_encoded_number): Likewise. + (BDESC_VERIFYS): Likewise. + (ix86_init_mpx_builtins): Likewise. + (ix86_init_builtins): Likewise. + (ix86_emit_cmove): Likewise. + (ix86_emit_move_max): Likewise. + (ix86_expand_builtin): Likewise. + (ix86_builtin_mpx_function): Likewise. + (ix86_get_arg_address_for_bt): Likewise. + (ix86_load_bounds): Likewise. + (ix86_store_bounds): Likewise. + (ix86_load_returned_bounds): Likewise. + (ix86_store_returned_bounds): Likewise. + (ix86_class_likely_spilled_p): Likewise. + (ix86_hard_regno_mode_ok): Likewise. + (x86_order_regs_for_local_alloc): Likewise. + (ix86_mitigate_rop): Likewise. + (ix86_bnd_prefixed_insn_p): Likewise. + (ix86_mpx_bound_mode): Likewise. + (ix86_make_bounds_constant): Likewise. + (ix86_initialize_bounds): Likewise. + (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise. + (TARGET_STORE_BOUNDS_FOR_ARG): Likewise. + (TARGET_LOAD_RETURNED_BOUNDS): Likewise. + (TARGET_STORE_RETURNED_BOUNDS): Likewise. + (TARGET_CHKP_BOUND_MODE): Likewise. + (TARGET_BUILTIN_CHKP_FUNCTION): Likewise. + (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise. + (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise. + (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise. + * config/i386/i386.h (TARGET_MPX): Likewise. + (TARGET_MPX_P): Likewise. + (VALID_BND_REG_MODE): Likewise. + (FIRST_BND_REG): Likewise. + (LAST_BND_REG): Likewise. + (enum reg_class): Likewise. + (BND_REG_P): Likewise. + (BND_REGNO_P): Likewise. + (BNDmode): Likewise. + (ADJUST_INSN_LENGTH): Likewise. + * config/i386/i386.md: Likewise. + * config/i386/i386.opt: Likewise. + * config/i386/linux-common.h (LIBMPX_LIBS): Likewise. + (defined): Likewise. + (LINK_MPX): Likewise. + (MPX_SPEC): Likewise. + (LIBMPX_SPEC): Likewise. + (LIBMPXWRAPPERS_SPEC): Likewise. + (CHKP_SPEC): Likewise. + * config/i386/predicates.md: Likewise. + * dbxout.c (dbxout_type): Likewise. + * doc/extend.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/md.texi: Likewise. + * doc/tm.texi: Likewise. + * doc/tm.texi.in: Likewise. + * dwarf2out.c (is_base_type): Likewise. + (gen_formal_types_die): Likewise. + (gen_subprogram_die): Likewise. + (gen_type_die_with_usage): Likewise. + (gen_decl_die): Likewise. + (dwarf2out_late_global_decl): Likewise. + * expr.c (expand_assignment): Likewise. + (emit_storent_insn): Likewise. + (store_expr_with_bounds): Likewise. + (store_expr): Likewise. + (expand_expr_real_1): Likewise. + * expr.h (store_expr_with_bounds): Likewise. + * function.c (use_register_for_decl): Likewise. + (struct bounds_parm_data): Likewise. + (assign_parms_augmented_arg_list): Likewise. + (assign_parm_find_entry_rtl): Likewise. + (assign_parm_is_stack_parm): Likewise. + (assign_parm_load_bounds): Likewise. + (assign_bounds): Likewise. + (assign_parms): Likewise. + (expand_function_start): Likewise. + * gcc.c (CHKP_SPEC): Likewise. + * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise. + * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise. + (wrestrict_dom_walker::check_call): Likewise. + * gimple.c (gimple_build_call_from_tree): Likewise. + * gimple.h (enum gf_mask): Likewise. + (gimple_call_with_bounds_p): Likewise. + (gimple_call_set_with_bounds): Likewise. + * gimplify.c (gimplify_init_constructor): Likewise. + * ipa-cp.c (initialize_node_lattices): Likewise. + (propagate_constants_across_call): Likewise. + (find_more_scalar_values_for_callers_subset): Likewise. + * ipa-hsa.c (process_hsa_functions): Likewise. + * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise. + * ipa-icf.c (sem_function::merge): Likewise. + * ipa-inline.c (early_inliner): Likewise. + * ipa-pure-const.c (warn_function_noreturn): Likewise. + (warn_function_cold): Likewise. + (propagate_pure_const): Likewise. + * ipa-ref.h (enum GTY): Likewise. + * ipa-split.c (find_retbnd): Likewise. + (consider_split): Likewise. + (split_function): Likewise. + * ipa-visibility.c (cgraph_externally_visible_p): Likewise. + * ipa.c (walk_polymorphic_call_targets): Likewise. + (symbol_table::remove_unreachable_nodes): Likewise. + (process_references): Likewise. + (cgraph_build_static_cdtor_1): Likewise. + * lto-cgraph.c (lto_output_node): Likewise. + (output_refs): Likewise. + (compute_ltrans_boundary): Likewise. + (input_overwrite_node): Likewise. + (input_node): Likewise. + (input_cgraph_1): Likewise. + * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise. + * passes.c (pass_manager::execute_early_local_passes): Likewise. + (class pass_chkp_instrumentation_passes): Likewise. + (make_pass_chkp_instrumentation_passes): Likewise. + * passes.def: Likewise. + * rtl.h (struct GTY): Likewise. + (CALL_EXPR_WITH_BOUNDS_P): Likewise. + * stor-layout.c (layout_type): Likewise. + * symtab.c: Likewise. + * target.def: Likewise. + * targhooks.c (default_chkp_bound_type): Likewise. + (default_chkp_bound_mode): Likewise. + (default_builtin_chkp_function): Likewise. + (default_chkp_function_value_bounds): Likewise. + (default_chkp_make_bounds_constant): Likewise. + (default_chkp_initialize_bounds): Likewise. + * targhooks.h (default_chkp_bound_type): Likewise. + (default_chkp_bound_mode): Likewise. + (default_builtin_chkp_function): Likewise. + (default_chkp_function_value_bounds): Likewise. + (default_chkp_make_bounds_constant): Likewise. + (default_chkp_initialize_bounds): Likewise. + * toplev.c (compile_file): Likewise. + (process_options): Likewise. + * tree-core.h (DEF_BUILTIN): Likewise. + (DEF_BUILTIN_CHKP): Likewise. + * tree-inline.c (declare_return_variable): Likewise. + (remap_gimple_stmt): Likewise. + (copy_bb): Likewise. + (initialize_inlined_parameters): Likewise. + (expand_call_inline): Likewise. + * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise. + (make_pass_ipa_chkp_early_produce_thunks): Likewise. + (make_pass_ipa_chkp_produce_thunks): Likewise. + (make_pass_chkp): Likewise. + (make_pass_chkp_opt): Likewise. + (make_pass_chkp_instrumentation_passes): Likewise. + * tree-pretty-print.c (dump_generic_node): Likewise. + * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise. + * tree-ssa-dce.c (propagate_necessity): Likewise. + (eliminate_unnecessary_stmts): Likewise. + * tree-ssa-pre.c (create_expression_by_pieces): Likewise. + * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise. + * tree-ssa-sccvn.h: Likewise. + * tree-ssa-strlen.c (get_string_length): Likewise. + (valid_builtin_call): Likewise. + (adjust_last_stmt): Likewise. + (handle_builtin_strchr): Likewise. + (handle_builtin_strcpy): Likewise. + (handle_builtin_stxncpy): Likewise. + (handle_builtin_memcpy): Likewise. + (handle_builtin_strcat): Likewise. + (strlen_check_and_optimize_stmt): Likewise. + * tree-stdarg.c (expand_ifn_va_arg_1): Likewise. + * tree-streamer-in.c: Likewise. + * tree-streamer.c (record_common_node): Likewise. + * tree.c (tree_code_size): Likewise. + (wide_int_to_tree_1): Likewise. + (type_contains_placeholder_1): Likewise. + (build_common_tree_nodes): Likewise. + * tree.def (POINTER_BOUNDS_TYPE): Likewise. + * tree.h (POINTER_BOUNDS_TYPE_P): Likewise. + (POINTER_BOUNDS_P): Likewise. + (BOUNDED_TYPE_P): Likewise. + (BOUNDED_P): Likewise. + (CALL_WITH_BOUNDS_P): Likewise. + (pointer_bounds_type_node): Likewise. + * value-prof.c (gimple_ic): Likewise. + * var-tracking.c (vt_add_function_parameters): Likewise. + * varasm.c (make_decl_rtl): Likewise. + (assemble_start_function): Likewise. + (output_constant): Likewise. + (maybe_assemble_visibility): Likewise. + * varpool.c (ctor_for_folding): Likewise. + * chkp-builtins.def: Remove. + * ipa-chkp.c: Remove. + * ipa-chkp.h: Remove. + * rtl-chkp.c: Remove. + * rtl-chkp.h: Remove. + * tree-chkp-opt.c: Remove. + * tree-chkp.c: Remove. + * tree-chkp.h: Remove. + 2018-06-07 Carl Love * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth, diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 256a21546ee..d8f3e886118 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1355,7 +1355,6 @@ OBJS = \ incpath.o \ init-regs.o \ internal-fn.o \ - ipa-chkp.o \ ipa-cp.o \ ipa-devirt.o \ ipa-fnsummary.o \ @@ -1452,7 +1451,6 @@ OBJS = \ reload1.o \ reorg.o \ resource.o \ - rtl-chkp.o \ rtl-error.o \ rtl-tests.o \ rtl.o \ @@ -1518,8 +1516,6 @@ OBJS = \ tree-outof-ssa.o \ tree-parloops.o \ tree-phinodes.o \ - tree-chkp.o \ - tree-chkp-opt.o \ tree-predcom.o \ tree-pretty-print.o \ tree-profile.o \ @@ -2552,7 +2548,6 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \ $(srcdir)/gimple.h \ $(srcdir)/gimple-ssa.h \ - $(srcdir)/tree-chkp.c \ $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \ $(srcdir)/tree-cfg.c $(srcdir)/tree-ssa-loop-ivopts.c \ $(srcdir)/tree-dfa.c \ @@ -3512,7 +3507,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ tree-ssa-loop-niter.h tree-ssa-ter.h tree-ssa-threadedge.h \ tree-ssa-threadupdate.h inchash.h wide-int.h signop.h hash-map.h \ hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \ - lcm.h cfgloopmanip.h file-prefix-map.h builtins.def chkp-builtins.def \ + lcm.h cfgloopmanip.h file-prefix-map.h builtins.def \ pass-instances.def params.list # generate the 'build fragment' b-header-vars diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def index 5365befd351..845810c3736 100644 --- a/gcc/builtin-types.def +++ b/gcc/builtin-types.def @@ -152,8 +152,6 @@ DEF_PRIMITIVE_TYPE (BT_I4, builtin_type_for_size (BITS_PER_UNIT*4, 1)) DEF_PRIMITIVE_TYPE (BT_I8, builtin_type_for_size (BITS_PER_UNIT*8, 1)) DEF_PRIMITIVE_TYPE (BT_I16, builtin_type_for_size (BITS_PER_UNIT*16, 1)) -DEF_PRIMITIVE_TYPE (BT_BND, pointer_bounds_type_node) - /* The C type `char * const *'. */ DEF_PRIMITIVE_TYPE (BT_PTR_CONST_STRING, build_pointer_type @@ -300,8 +298,6 @@ DEF_FUNCTION_TYPE_1 (BT_FN_UINT64_FLOAT, BT_UINT64, BT_FLOAT) DEF_FUNCTION_TYPE_1 (BT_FN_BOOL_INT, BT_BOOL, BT_INT) DEF_FUNCTION_TYPE_1 (BT_FN_PTR_CONST_PTR, BT_PTR, BT_CONST_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_CONST_PTR_CONST_PTR, BT_CONST_PTR, BT_CONST_PTR) -DEF_FUNCTION_TYPE_1 (BT_FN_BND_CONST_PTR, BT_BND, BT_CONST_PTR) -DEF_FUNCTION_TYPE_1 (BT_FN_CONST_PTR_BND, BT_CONST_PTR, BT_BND) DEF_FUNCTION_TYPE_1 (BT_FN_UINT16_UINT32, BT_UINT16, BT_UINT32) DEF_FUNCTION_TYPE_1 (BT_FN_UINT32_UINT16, BT_UINT32, BT_UINT16) DEF_FUNCTION_TYPE_1 (BT_FN_INT_FENV_T_PTR, BT_INT, BT_FENV_T_PTR) @@ -487,9 +483,7 @@ DEF_FUNCTION_TYPE_2 (BT_FN_PTR_CONST_PTR_SIZE, BT_PTR, BT_CONST_PTR, BT_SIZE) DEF_FUNCTION_TYPE_2 (BT_FN_PTR_CONST_PTR_CONST_PTR, BT_PTR, BT_CONST_PTR, BT_CONST_PTR) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTRPTR_CONST_PTR, BT_VOID, BT_PTR_PTR, BT_CONST_PTR) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_CONST_PTR_SIZE, BT_VOID, BT_CONST_PTR, BT_SIZE) -DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_BND, BT_VOID, BT_PTR, BT_BND) DEF_FUNCTION_TYPE_2 (BT_FN_CONST_PTR_CONST_PTR_CONST_PTR, BT_CONST_PTR, BT_CONST_PTR, BT_CONST_PTR) -DEF_FUNCTION_TYPE_2 (BT_FN_BND_CONST_PTR_SIZE, BT_BND, BT_CONST_PTR, BT_SIZE) DEF_FUNCTION_TYPE_2 (BT_FN_UINT32_UINT64_PTR, BT_UINT32, BT_UINT64, BT_PTR) DEF_FUNCTION_TYPE_2 (BT_FN_INT_FEXCEPT_T_PTR_INT, BT_INT, BT_FEXCEPT_T_PTR, @@ -607,7 +601,6 @@ DEF_FUNCTION_TYPE_3 (BT_FN_VOID_VPTR_I8_INT, BT_VOID, BT_VOLATILE_PTR, BT_I8, BT DEF_FUNCTION_TYPE_3 (BT_FN_VOID_VPTR_I16_INT, BT_VOID, BT_VOLATILE_PTR, BT_I16, BT_INT) DEF_FUNCTION_TYPE_3 (BT_FN_INT_PTRPTR_SIZE_SIZE, BT_INT, BT_PTR_PTR, BT_SIZE, BT_SIZE) DEF_FUNCTION_TYPE_3 (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE, BT_PTR, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE) -DEF_FUNCTION_TYPE_3 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR, BT_VOID, BT_CONST_PTR, BT_BND, BT_CONST_PTR) DEF_FUNCTION_TYPE_3 (BT_FN_BOOL_INT_INT_INTPTR, BT_BOOL, BT_INT, BT_INT, BT_INT_PTR) DEF_FUNCTION_TYPE_3 (BT_FN_BOOL_LONG_LONG_LONGPTR, BT_BOOL, BT_LONG, BT_LONG, diff --git a/gcc/builtins.c b/gcc/builtins.c index d4150d877dd..8707e0cfbc3 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -64,8 +64,6 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "asan.h" -#include "tree-chkp.h" -#include "rtl-chkp.h" #include "internal-fn.h" #include "case-cfn-macros.h" #include "gimple-fold.h" @@ -125,12 +123,10 @@ static rtx expand_builtin_strncmp (tree, rtx, machine_mode); static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, scalar_int_mode); static rtx expand_builtin_memchr (tree, rtx); static rtx expand_builtin_memcpy (tree, rtx); -static rtx expand_builtin_memcpy_with_bounds (tree, rtx); static rtx expand_builtin_memory_copy_args (tree dest, tree src, tree len, rtx target, tree exp, int endp); static rtx expand_builtin_memmove (tree, rtx); static rtx expand_builtin_mempcpy (tree, rtx); -static rtx expand_builtin_mempcpy_with_bounds (tree, rtx); static rtx expand_builtin_mempcpy_args (tree, tree, tree, rtx, tree, int); static rtx expand_builtin_strcat (tree, rtx); static rtx expand_builtin_strcpy (tree, rtx); @@ -141,7 +137,6 @@ static rtx expand_builtin_strncat (tree, rtx); static rtx expand_builtin_strncpy (tree, rtx); static rtx builtin_memset_gen_str (void *, HOST_WIDE_INT, scalar_int_mode); static rtx expand_builtin_memset (tree, rtx, machine_mode); -static rtx expand_builtin_memset_with_bounds (tree, rtx, machine_mode); static rtx expand_builtin_memset_args (tree, tree, tree, rtx, machine_mode, tree); static rtx expand_builtin_bzero (tree); static rtx expand_builtin_strlen (tree, rtx, machine_mode); @@ -3479,38 +3474,6 @@ expand_builtin_memmove (tree exp, rtx) return NULL_RTX; } -/* Expand an instrumented call EXP to the memcpy builtin. - Return NULL_RTX if we failed, the caller should emit a normal call, - otherwise try to get the result in TARGET, if convenient (and in - mode MODE if that's convenient). */ - -static rtx -expand_builtin_memcpy_with_bounds (tree exp, rtx target) -{ - if (!validate_arglist (exp, - POINTER_TYPE, POINTER_BOUNDS_TYPE, - POINTER_TYPE, POINTER_BOUNDS_TYPE, - INTEGER_TYPE, VOID_TYPE)) - return NULL_RTX; - else - { - tree dest = CALL_EXPR_ARG (exp, 0); - tree src = CALL_EXPR_ARG (exp, 2); - tree len = CALL_EXPR_ARG (exp, 4); - rtx res = expand_builtin_memory_copy_args (dest, src, len, target, exp, - /*end_p=*/ 0); - - /* Return src bounds with the result. */ - if (res) - { - rtx bnd = force_reg (targetm.chkp_bound_mode (), - expand_normal (CALL_EXPR_ARG (exp, 1))); - res = chkp_join_splitted_slot (res, bnd); - } - return res; - } -} - /* Expand a call EXP to the mempcpy builtin. Return NULL_RTX if we failed; the caller should emit a normal call, otherwise try to get the result in TARGET, if convenient (and in @@ -3553,38 +3516,6 @@ expand_builtin_mempcpy (tree exp, rtx target) target, exp, /*endp=*/ 1); } -/* Expand an instrumented call EXP to the mempcpy builtin. - Return NULL_RTX if we failed, the caller should emit a normal call, - otherwise try to get the result in TARGET, if convenient (and in - mode MODE if that's convenient). */ - -static rtx -expand_builtin_mempcpy_with_bounds (tree exp, rtx target) -{ - if (!validate_arglist (exp, - POINTER_TYPE, POINTER_BOUNDS_TYPE, - POINTER_TYPE, POINTER_BOUNDS_TYPE, - INTEGER_TYPE, VOID_TYPE)) - return NULL_RTX; - else - { - tree dest = CALL_EXPR_ARG (exp, 0); - tree src = CALL_EXPR_ARG (exp, 2); - tree len = CALL_EXPR_ARG (exp, 4); - rtx res = expand_builtin_mempcpy_args (dest, src, len, target, - exp, 1); - - /* Return src bounds with the result. */ - if (res) - { - rtx bnd = force_reg (targetm.chkp_bound_mode (), - expand_normal (CALL_EXPR_ARG (exp, 1))); - res = chkp_join_splitted_slot (res, bnd); - } - return res; - } -} - /* Helper function to do the actual work for expand of memory copy family functions (memcpy, mempcpy, stpcpy). Expansing should assign LEN bytes of memory from SRC to DEST and assign to TARGET if convenient. @@ -4205,36 +4136,6 @@ expand_builtin_memset (tree exp, rtx target, machine_mode mode) return expand_builtin_memset_args (dest, val, len, target, mode, exp); } -/* Expand expression EXP, which is an instrumented call to the memset builtin. - Return NULL_RTX if we failed the caller should emit a normal call, otherwise - try to get the result in TARGET, if convenient (and in mode MODE if that's - convenient). */ - -static rtx -expand_builtin_memset_with_bounds (tree exp, rtx target, machine_mode mode) -{ - if (!validate_arglist (exp, - POINTER_TYPE, POINTER_BOUNDS_TYPE, - INTEGER_TYPE, INTEGER_TYPE, VOID_TYPE)) - return NULL_RTX; - else - { - tree dest = CALL_EXPR_ARG (exp, 0); - tree val = CALL_EXPR_ARG (exp, 2); - tree len = CALL_EXPR_ARG (exp, 3); - rtx res = expand_builtin_memset_args (dest, val, len, target, mode, exp); - - /* Return src bounds with the result. */ - if (res) - { - rtx bnd = force_reg (targetm.chkp_bound_mode (), - expand_normal (CALL_EXPR_ARG (exp, 1))); - res = chkp_join_splitted_slot (res, bnd); - } - return res; - } -} - /* Helper function to do the actual work for expand_builtin_memset. The arguments to the builtin_memset call DEST, VAL, and LEN are broken out so that this can also be called without constructing an actual CALL_EXPR. @@ -4363,8 +4264,7 @@ expand_builtin_memset_args (tree dest, tree val, tree len, do_libcall: fndecl = get_callee_fndecl (orig_exp); fcode = DECL_FUNCTION_CODE (fndecl); - if (fcode == BUILT_IN_MEMSET - || fcode == BUILT_IN_CHKP_MEMSET_NOBND_NOCHK_CHKP) + if (fcode == BUILT_IN_MEMSET) fn = build_call_nofold_loc (EXPR_LOCATION (orig_exp), fndecl, 3, dest, val, len); else if (fcode == BUILT_IN_BZERO) @@ -4889,13 +4789,6 @@ std_expand_builtin_va_start (tree valist, rtx nextarg) { rtx va_r = expand_expr (valist, NULL_RTX, VOIDmode, EXPAND_WRITE); convert_move (va_r, nextarg, 0); - - /* We do not have any valid bounds for the pointer, so - just store zero bounds for it. */ - if (chkp_function_instrumented_p (current_function_decl)) - chkp_expand_bounds_reset_for_mem (valist, - make_tree (TREE_TYPE (valist), - nextarg)); } /* Expand EXP, a call to __builtin_va_start. */ @@ -6766,19 +6659,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, && fcode != BUILT_IN_EXECVP && fcode != BUILT_IN_EXECVE && !ALLOCA_FUNCTION_CODE_P (fcode) - && fcode != BUILT_IN_FREE - && fcode != BUILT_IN_CHKP_SET_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_INIT_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_NULL_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_COPY_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_NARROW_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_STORE_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_LBOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_UBOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_GET_PTR_LBOUND - && fcode != BUILT_IN_CHKP_GET_PTR_UBOUND - && fcode != BUILT_IN_CHKP_BNDRET) + && fcode != BUILT_IN_FREE) return expand_call (exp, target, ignore); /* The built-in function expanders test for target == const0_rtx @@ -6812,10 +6693,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, } } - /* expand_builtin_with_bounds is supposed to be used for - instrumented builtin calls. */ - gcc_assert (!CALL_WITH_BOUNDS_P (exp)); - switch (fcode) { CASE_FLT_FN (BUILT_IN_FABS): @@ -7840,51 +7717,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, expand_builtin_set_thread_pointer (exp); return const0_rtx; - case BUILT_IN_CHKP_INIT_PTR_BOUNDS: - case BUILT_IN_CHKP_NULL_PTR_BOUNDS: - case BUILT_IN_CHKP_COPY_PTR_BOUNDS: - case BUILT_IN_CHKP_CHECK_PTR_LBOUNDS: - case BUILT_IN_CHKP_CHECK_PTR_UBOUNDS: - case BUILT_IN_CHKP_CHECK_PTR_BOUNDS: - case BUILT_IN_CHKP_SET_PTR_BOUNDS: - case BUILT_IN_CHKP_NARROW_PTR_BOUNDS: - case BUILT_IN_CHKP_STORE_PTR_BOUNDS: - case BUILT_IN_CHKP_GET_PTR_LBOUND: - case BUILT_IN_CHKP_GET_PTR_UBOUND: - /* We allow user CHKP builtins if Pointer Bounds - Checker is off. */ - if (!chkp_function_instrumented_p (current_function_decl)) - { - if (fcode == BUILT_IN_CHKP_SET_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_NARROW_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_INIT_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_NULL_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_COPY_PTR_BOUNDS) - return expand_normal (CALL_EXPR_ARG (exp, 0)); - else if (fcode == BUILT_IN_CHKP_GET_PTR_LBOUND) - return expand_normal (size_zero_node); - else if (fcode == BUILT_IN_CHKP_GET_PTR_UBOUND) - return expand_normal (size_int (-1)); - else - return const0_rtx; - } - /* FALLTHROUGH */ - - case BUILT_IN_CHKP_BNDMK: - case BUILT_IN_CHKP_BNDSTX: - case BUILT_IN_CHKP_BNDCL: - case BUILT_IN_CHKP_BNDCU: - case BUILT_IN_CHKP_BNDLDX: - case BUILT_IN_CHKP_BNDRET: - case BUILT_IN_CHKP_INTERSECT: - case BUILT_IN_CHKP_NARROW: - case BUILT_IN_CHKP_EXTRACT_LOWER: - case BUILT_IN_CHKP_EXTRACT_UPPER: - /* Software implementation of Pointer Bounds Checker is NYI. - Target support is required. */ - error ("Your target platform does not support -fcheck-pointer-bounds"); - break; - case BUILT_IN_ACC_ON_DEVICE: /* Do library call, if we failed to expand the builtin when folding. */ @@ -7903,70 +7735,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, return expand_call (exp, target, ignore); } -/* Similar to expand_builtin but is used for instrumented calls. */ - -rtx -expand_builtin_with_bounds (tree exp, rtx target, - rtx subtarget ATTRIBUTE_UNUSED, - machine_mode mode, int ignore) -{ - tree fndecl = get_callee_fndecl (exp); - enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl); - - gcc_assert (CALL_WITH_BOUNDS_P (exp)); - - if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD) - return targetm.expand_builtin (exp, target, subtarget, mode, ignore); - - gcc_assert (fcode > BEGIN_CHKP_BUILTINS - && fcode < END_CHKP_BUILTINS); - - switch (fcode) - { - case BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK_CHKP: - target = expand_builtin_memcpy_with_bounds (exp, target); - if (target) - return target; - break; - - case BUILT_IN_CHKP_MEMPCPY_NOBND_NOCHK_CHKP: - target = expand_builtin_mempcpy_with_bounds (exp, target); - if (target) - return target; - break; - - case BUILT_IN_CHKP_MEMSET_NOBND_NOCHK_CHKP: - target = expand_builtin_memset_with_bounds (exp, target, mode); - if (target) - return target; - break; - - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMMOVE_CHKP: - case BUILT_IN_MEMPCPY_CHKP: - if (call_expr_nargs (exp) > 3) - { - /* memcpy_chkp (void *dst, size_t dstbnd, - const void *src, size_t srcbnd, size_t n) - and others take a pointer bound argument just after each - pointer argument. */ - tree dest = CALL_EXPR_ARG (exp, 0); - tree src = CALL_EXPR_ARG (exp, 2); - tree len = CALL_EXPR_ARG (exp, 4); - - check_memop_access (exp, dest, src, len); - break; - } - - default: - break; - } - - /* The switch statement above can drop through to cause the function - to be called normally. */ - return expand_call (exp, target, ignore); - } - /* Determine whether a tree node represents a call to a built-in function. If the tree T is a call to a built-in function with the right number of arguments of the appropriate types, return diff --git a/gcc/builtins.def b/gcc/builtins.def index 58b469844a7..9776dfabddf 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -63,16 +63,6 @@ along with GCC; see the file COPYING3. If not see The builtins is registered only if COND is true. */ -/* A macro for builtins where the - BUILT_IN_*_CHKP = BUILT_IN_* + BEGIN_CHKP_BUILTINS + 1 - enums should be defined too. */ -#ifndef DEF_BUILTIN_CHKP -#define DEF_BUILTIN_CHKP(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, \ - FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT, COND) \ - DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, FALLBACK_P, \ - NONANSI_P, ATTRS, IMPLICIT, COND) -#endif - /* A GCC builtin (like __builtin_saveregs) is provided by the compiler, but does not correspond to a function in the standard library. */ @@ -110,10 +100,6 @@ along with GCC; see the file COPYING3. If not see #define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ true, true, false, ATTRS, true, true) -#undef DEF_LIB_BUILTIN_CHKP -#define DEF_LIB_BUILTIN_CHKP(ENUM, NAME, TYPE, ATTRS) \ - DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, \ - TYPE, true, true, false, ATTRS, true, true) /* Like DEF_LIB_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant we @@ -123,10 +109,6 @@ along with GCC; see the file COPYING3. If not see #define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ true, true, true, ATTRS, false, true) -#undef DEF_EXT_LIB_BUILTIN_CHKP -#define DEF_EXT_LIB_BUILTIN_CHKP(ENUM, NAME, TYPE, ATTRS) \ - DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, \ - TYPE, true, true, true, ATTRS, false, true) /* A set of GCC builtins for _FloatN and _FloatNx types. TYPE_MACRO is called with an argument such as FLOAT32 to produce the enum value for the type. If @@ -259,12 +241,6 @@ along with GCC; see the file COPYING3. If not see | SANITIZE_UNDEFINED_NONDEFAULT) \ || flag_sanitize_coverage)) -/* Builtin used by the implementation of Pointer Bounds Checker. */ -#undef DEF_CHKP_BUILTIN -#define DEF_CHKP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ - DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, \ - TYPE, true, true, false, ATTRS, true, true) - /* Define an attribute list for math functions that are normally "impure" because some of them may write into global memory for `errno'. If !flag_errno_math they are instead "const". */ @@ -713,22 +689,22 @@ DEF_EXT_LIB_BUILTIN (BUILT_IN_BZERO, "bzero", BT_FN_VOID_PTR_SIZE, ATTR_NOTHR DEF_EXT_LIB_BUILTIN (BUILT_IN_INDEX, "index", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_MEMCHR, "memchr", BT_FN_PTR_CONST_PTR_INT_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_MEMCMP, "memcmp", BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_MEMCPY, "memcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_MEMMOVE, "memmove", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMPCPY, "mempcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_MEMSET, "memset", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_MEMCPY, "memcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_MEMMOVE, "memmove", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_MEMPCPY, "mempcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_MEMSET, "memset", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_RINDEX, "rindex", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STPCPY, "stpcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RETNONNULL_NOTHROW_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_STPCPY, "stpcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RETNONNULL_NOTHROW_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STPNCPY, "stpncpy", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRCASECMP, "strcasecmp", BT_FN_INT_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_STRCAT, "strcat", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_STRCHR, "strchr", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_STRCAT, "strcat", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_STRCHR, "strchr", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_STRCMP, "strcmp", BT_FN_INT_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_STRCPY, "strcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_STRCPY, "strcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_STRCSPN, "strcspn", BT_FN_SIZE_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRDUP, "strdup", BT_FN_STRING_CONST_STRING, ATTR_MALLOC_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNDUP, "strndup", BT_FN_STRING_CONST_STRING_SIZE, ATTR_MALLOC_NOTHROW_NONNULL_LEAF) -DEF_LIB_BUILTIN_CHKP (BUILT_IN_STRLEN, "strlen", BT_FN_SIZE_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF) +DEF_LIB_BUILTIN (BUILT_IN_STRLEN, "strlen", BT_FN_SIZE_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNCASECMP, "strncasecmp", BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_STRNCAT, "strncat", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_LIB_BUILTIN (BUILT_IN_STRNCMP, "strncmp", BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) @@ -978,14 +954,14 @@ DEF_BUILTIN_STUB (BUILT_IN_STRNCMP_EQ, "__builtin_strncmp_eq") /* Object size checking builtins. */ DEF_GCC_BUILTIN (BUILT_IN_OBJECT_SIZE, "object_size", BT_FN_SIZE_CONST_PTR_INT, ATTR_PURE_NOTHROW_LEAF_LIST) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMCPY_CHK, "__memcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMMOVE_CHK, "__memmove_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMPCPY_CHK, "__mempcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMSET_CHK, "__memset_chk", BT_FN_PTR_PTR_INT_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STPCPY_CHK, "__stpcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_MEMCPY_CHK, "__memcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_MEMMOVE_CHK, "__memmove_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_MEMPCPY_CHK, "__mempcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_MEMSET_CHK, "__memset_chk", BT_FN_PTR_PTR_INT_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_STPCPY_CHK, "__stpcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STPNCPY_CHK, "__stpncpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_RETNONNULL_NOTHROW_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STRCAT_CHK, "__strcat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STRCPY_CHK, "__strcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_STRCAT_CHK, "__strcat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) +DEF_EXT_LIB_BUILTIN (BUILT_IN_STRCPY_CHK, "__strcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNCAT_CHK, "__strncat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNCPY_CHK, "__strncpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) DEF_EXT_LIB_BUILTIN (BUILT_IN_SNPRINTF_CHK, "__snprintf_chk", BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VAR, ATTR_FORMAT_PRINTF_NOTHROW_5_6) @@ -1053,9 +1029,6 @@ DEF_GCC_BUILTIN (BUILT_IN_LINE, "LINE", BT_FN_INT, ATTR_NOTHROW_LEAF_LIST) /* Sanitizer builtins. */ #include "sanitizer.def" -/* Pointer Bounds Checker builtins. */ -#include "chkp-builtins.def" - /* Do not expose the BRIG builtins by default gcc-wide, but only privately in the BRIG FE as long as there are no references for them in the middle end or any of the upstream backends. */ @@ -1099,5 +1072,4 @@ DEF_GCC_BUILTIN (BUILT_IN_LINE, "LINE", BT_FN_INT, ATTR_NOTHROW_LEAF_LIST) /* HSAIL/BRIG frontend builtins. */ #include "brig-builtins.def" -#undef DEF_BUILTIN_CHKP #undef DEF_BUILTIN diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 74bf0a49ab0..28ff01ae241 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,11 @@ +2018-06-08 Martin Liska + + * c-attribs.c (handle_bnd_variable_size_attribute): Remove support + for MPX (macros, related functions, fields in cgraph_node, ...). + (handle_bnd_legacy): Likewise. + (handle_bnd_instrument): Likewise. + * c.opt: Likewise. + 2018-06-06 Jakub Jelinek PR c++/86068 diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index d302b4f22c7..73901bdf47c 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -143,9 +143,6 @@ static tree handle_simd_attribute (tree *, tree, tree, int, bool *); static tree handle_omp_declare_target_attribute (tree *, tree, tree, int, bool *); static tree handle_designated_init_attribute (tree *, tree, tree, int, bool *); -static tree handle_bnd_variable_size_attribute (tree *, tree, tree, int, bool *); -static tree handle_bnd_legacy (tree *, tree, tree, int, bool *); -static tree handle_bnd_instrument (tree *, tree, tree, int, bool *); static tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); static tree handle_patchable_function_entry_attribute (tree *, tree, tree, int, bool *); @@ -239,9 +236,6 @@ static const struct attribute_spec::exclusions attr_const_pure_exclusions[] = /* Table of machine-independent attributes common to all C-like languages. - All attributes referencing arguments should be additionally processed - in chkp_copy_function_type_adding_bounds for correct instrumentation - by Pointer Bounds Checker. Current list of processed common attributes: nonnull. */ const struct attribute_spec c_common_attribute_table[] = { @@ -452,12 +446,6 @@ const struct attribute_spec c_common_attribute_table[] = handle_assume_aligned_attribute, NULL }, { "designated_init", 0, 0, false, true, false, false, handle_designated_init_attribute, NULL }, - { "bnd_variable_size", 0, 0, true, false, false, false, - handle_bnd_variable_size_attribute, NULL }, - { "bnd_legacy", 0, 0, true, false, false, false, - handle_bnd_legacy, NULL }, - { "bnd_instrument", 0, 0, true, false, false, false, - handle_bnd_instrument, NULL }, { "fallthrough", 0, 0, false, false, false, false, handle_fallthrough_attribute, NULL }, { "patchable_function_entry", 1, 2, true, false, false, false, @@ -471,9 +459,6 @@ const struct attribute_spec c_common_attribute_table[] = /* Give the specifications for the format attributes, used by C and all descendants. - All attributes referencing arguments should be additionally processed - in chkp_copy_function_type_adding_bounds for correct instrumentation - by Pointer Bounds Checker. Current list of processed format attributes: format, format_arg. */ const struct attribute_spec c_common_format_attribute_table[] = { @@ -2489,54 +2474,6 @@ handle_fnspec_attribute (tree *node ATTRIBUTE_UNUSED, tree ARG_UNUSED (name), return NULL_TREE; } -/* Handle a "bnd_variable_size" attribute; arguments as in - struct attribute_spec.handler. */ - -static tree -handle_bnd_variable_size_attribute (tree *node, tree name, tree ARG_UNUSED (args), - int ARG_UNUSED (flags), bool *no_add_attrs) -{ - if (TREE_CODE (*node) != FIELD_DECL) - { - warning (OPT_Wattributes, "%qE attribute ignored", name); - *no_add_attrs = true; - } - - return NULL_TREE; -} - -/* Handle a "bnd_legacy" attribute; arguments as in - struct attribute_spec.handler. */ - -static tree -handle_bnd_legacy (tree *node, tree name, tree ARG_UNUSED (args), - int ARG_UNUSED (flags), bool *no_add_attrs) -{ - if (TREE_CODE (*node) != FUNCTION_DECL) - { - warning (OPT_Wattributes, "%qE attribute ignored", name); - *no_add_attrs = true; - } - - return NULL_TREE; -} - -/* Handle a "bnd_instrument" attribute; arguments as in - struct attribute_spec.handler. */ - -static tree -handle_bnd_instrument (tree *node, tree name, tree ARG_UNUSED (args), - int ARG_UNUSED (flags), bool *no_add_attrs) -{ - if (TREE_CODE (*node) != FUNCTION_DECL) - { - warning (OPT_Wattributes, "%qE attribute ignored", name); - *no_add_attrs = true; - } - - return NULL_TREE; -} - /* Handle a "warn_unused" attribute; arguments as in struct attribute_spec.handler. */ diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 5e0397f3614..1d7eafff1f7 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -410,7 +410,7 @@ Warn about subscripts whose type is \"char\". Wchkp C ObjC C++ ObjC++ Var(warn_chkp) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) -Warn about memory access errors found by Pointer Bounds Checker. +Deprecated in GCC 9. This switch has no effect. Wclobbered C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra) @@ -1260,97 +1260,86 @@ Where shorter, use canonicalized paths to systems headers. fcheck-pointer-bounds C ObjC C++ ObjC++ LTO Report Var(flag_check_pointer_bounds) -Add Pointer Bounds Checker instrumentation. fchkp-* flags are used to -control instrumentation. Currently available for C, C++ and ObjC. +Deprecated in GCC 9. This switch has no effect. fchkp-check-incomplete-type C ObjC C++ ObjC++ LTO Report Var(flag_chkp_incomplete_type) Init(1) -Generate pointer bounds checks for variables with incomplete type. +Deprecated in GCC 9. This switch has no effect. fchkp-zero-input-bounds-for-main C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_input_bounds_for_main) Init(0) -Use zero bounds for all incoming arguments in 'main' function. It helps when -instrumented binaries are used with legacy libs. +Deprecated in GCC 9. This switch has no effect. fchkp-first-field-has-own-bounds C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_first_field_has_own_bounds) -Forces Pointer Bounds Checker to use narrowed bounds for address of the first -field in the structure. By default pointer to the first field has the same -bounds as pointer to the whole structure. +Deprecated in GCC 9. This switch has no effect. fchkp-narrow-bounds C ObjC C++ ObjC++ LTO Report Var(flag_chkp_narrow_bounds) Init(1) -Control how Pointer Bounds Checker handle pointers to object fields. When -narrowing is on, field bounds are used. Otherwise full object bounds are used. +Deprecated in GCC 9. This switch has no effect. fchkp-narrow-to-innermost-array C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_narrow_to_innermost_arrray) -Forces Pointer Bounds Checker to use bounds of the innermost arrays in case of -nested static arrays access. By default outermost array is used. +Deprecated in GCC 9. This switch has no effect. fchkp-flexible-struct-trailing-arrays C ObjC C++ ObjC++ LTO Report Var(flag_chkp_flexible_struct_trailing_arrays) -Forces Pointer Bounds Checker to treat all trailing arrays in structures as -possibly flexible. By default only arrays fields with zero length or that are -marked with attribute bnd_variable_size are treated as flexible. +Deprecated in GCC 9. This switch has no effect. fchkp-optimize C ObjC C++ ObjC++ LTO Report Var(flag_chkp_optimize) Init(-1) -Allow Pointer Bounds Checker optimizations. By default allowed -on optimization levels >0. fchkp-use-fast-string-functions C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_fast_string_functions) Init(0) -Allow to use *_nobnd versions of string functions by Pointer Bounds Checker. +Deprecated in GCC 9. This switch has no effect. fchkp-use-nochk-string-functions C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_nochk_string_functions) Init(0) -Allow to use *_nochk versions of string functions by Pointer Bounds Checker. +Deprecated in GCC 9. This switch has no effect. fchkp-use-static-bounds C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_bounds) Init(1) -Use statically initialized variable for vars bounds instead of -generating them each time it is required. +Deprecated in GCC 9. This switch has no effect. fchkp-use-static-const-bounds C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_const_bounds) Init(-1) -Use statically initialized variable for constant bounds instead of -generating them each time it is required. +Deprecated in GCC 9. This switch has no effect. fchkp-treat-zero-dynamic-size-as-infinite C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_dynamic_size_as_infinite) Init(0) -With this option zero size obtained dynamically for objects with -incomplete type will be treated as infinite. +Deprecated in GCC 9. This switch has no effect. fchkp-check-read C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_read) Init(1) -Generate checks for all read accesses to memory. +Deprecated in GCC 9. This switch has no effect. fchkp-check-write C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_write) Init(1) -Generate checks for all write accesses to memory. +Deprecated in GCC 9. This switch has no effect. fchkp-store-bounds C ObjC C++ ObjC++ LTO Report Var(flag_chkp_store_bounds) Init(1) -Generate bounds stores for pointer writes. +Deprecated in GCC 9. This switch has no effect. fchkp-instrument-calls C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_calls) Init(1) -Generate bounds passing for calls. +Deprecated in GCC 9. This switch has no effect. fchkp-instrument-marked-only C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_marked_only) Init(0) -Instrument only functions marked with bnd_instrument attribute. +Deprecated in GCC 9. This switch has no effect. fchkp-use-wrappers C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_wrappers) Init(1) -Transform instrumented builtin calls into calls to wrappers. +Deprecated in GCC 9. This switch has no effect. static-libmpx Driver +Deprecated in GCC 9. This switch has no effect. static-libmpxwrappers Driver +Deprecated in GCC 9. This switch has no effect. fcilkplus Undocumented C ObjC C++ ObjC++ LTO Report Var(flag_cilkplus) Init(0) diff --git a/gcc/calls.c b/gcc/calls.c index 6e1ea925157..a5bba8195af 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -47,10 +47,8 @@ along with GCC; see the file COPYING3. If not see #include "except.h" #include "dbgcnt.h" #include "rtl-iter.h" -#include "tree-chkp.h" #include "tree-vrp.h" #include "tree-ssanames.h" -#include "rtl-chkp.h" #include "intl.h" #include "stringpool.h" #include "attribs.h" @@ -154,7 +152,6 @@ static unsigned HOST_WIDE_INT stored_args_watermark; static int stack_arg_under_construction; static void precompute_register_parameters (int, struct arg_data *, int *); -static void store_bounds (struct arg_data *, struct arg_data *); static int store_one_arg (struct arg_data *, rtx, int, int, int); static void store_unaligned_arguments_into_pseudos (struct arg_data *, int); static int finalize_must_preallocate (int, int, struct arg_data *, @@ -488,10 +485,6 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU && MEM_EXPR (funmem) != NULL_TREE) set_mem_expr (XEXP (call, 0), MEM_EXPR (funmem)); - /* Mark instrumented calls. */ - if (call && fntree) - CALL_EXPR_WITH_BOUNDS_P (call) = CALL_WITH_BOUNDS_P (fntree); - /* Put the register usage information there. */ add_function_usage_to (call_insn, call_fusage); @@ -598,12 +591,6 @@ special_function_p (const_tree fndecl, int flags) { tree name_decl = DECL_NAME (fndecl); - /* For instrumentation clones we want to derive flags - from the original name. */ - if (cgraph_node::get (fndecl) - && cgraph_node::get (fndecl)->instrumentation_clone) - name_decl = DECL_NAME (cgraph_node::get (fndecl)->orig_decl); - if (fndecl && name_decl && IDENTIFIER_LENGTH (name_decl) <= 11 /* Exclude functions not at the file scope, or not `extern', @@ -1626,8 +1613,6 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp) if (!fndecl || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL) return; - bool with_bounds = CALL_WITH_BOUNDS_P (exp); - unsigned nargs = call_expr_nargs (exp); /* The bound argument to a bounded string function like strncpy. */ @@ -1651,8 +1636,7 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp) the range of their known or possible lengths and use it conservatively as the bound for the unbounded function, and to adjust the range of the bound of the bounded ones. */ - unsigned stride = with_bounds ? 2 : 1; - for (unsigned argno = 0; argno < nargs && !*lenrng; argno += stride) + for (unsigned argno = 0; argno < nargs && !*lenrng; argno ++) { tree arg = CALL_EXPR_ARG (exp, argno); if (!get_attr_nonstring_decl (arg)) @@ -1662,11 +1646,9 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp) /* Fall through. */ case BUILT_IN_STPNCPY: - case BUILT_IN_STPNCPY_CHK: case BUILT_IN_STRNCPY: - case BUILT_IN_STRNCPY_CHK: { - unsigned argno = with_bounds ? 4 : 2; + unsigned argno = 2; if (argno < nargs) bound = CALL_EXPR_ARG (exp, argno); break; @@ -1674,7 +1656,7 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp) case BUILT_IN_STRNDUP: { - unsigned argno = with_bounds ? 2 : 1; + unsigned argno = 1; if (argno < nargs) bound = CALL_EXPR_ARG (exp, argno); break; @@ -1879,7 +1861,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, i = num_actuals - 1; { - int j = i, ptr_arg = -1; + int j = i; call_expr_arg_iterator iter; tree arg; bitmap slots = NULL; @@ -1888,79 +1870,12 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, { args[j].tree_value = struct_value_addr_value; j--; - - /* If we pass structure address then we need to - create bounds for it. Since created bounds is - a call statement, we expand it right here to avoid - fixing all other places where it may be expanded. */ - if (CALL_WITH_BOUNDS_P (exp)) - { - args[j].value = gen_reg_rtx (targetm.chkp_bound_mode ()); - args[j].tree_value - = chkp_make_bounds_for_struct_addr (struct_value_addr_value); - expand_expr_real (args[j].tree_value, args[j].value, VOIDmode, - EXPAND_NORMAL, 0, false); - args[j].pointer_arg = j + 1; - j--; - } } argpos = 0; FOR_EACH_CALL_EXPR_ARG (arg, iter, exp) { tree argtype = TREE_TYPE (arg); - /* Remember last param with pointer and associate it - with following pointer bounds. */ - if (CALL_WITH_BOUNDS_P (exp) - && chkp_type_has_pointer (argtype)) - { - if (slots) - BITMAP_FREE (slots); - ptr_arg = j; - if (!BOUNDED_TYPE_P (argtype)) - { - slots = BITMAP_ALLOC (NULL); - chkp_find_bound_slots (argtype, slots); - } - } - else if (CALL_WITH_BOUNDS_P (exp) - && pass_by_reference (NULL, TYPE_MODE (argtype), argtype, - argpos < n_named_args)) - { - if (slots) - BITMAP_FREE (slots); - ptr_arg = j; - } - else if (POINTER_BOUNDS_TYPE_P (argtype)) - { - /* We expect bounds in instrumented calls only. - Otherwise it is a sign we lost flag due to some optimization - and may emit call args incorrectly. */ - gcc_assert (CALL_WITH_BOUNDS_P (exp)); - - /* For structures look for the next available pointer. */ - if (ptr_arg != -1 && slots) - { - unsigned bnd_no = bitmap_first_set_bit (slots); - args[j].pointer_offset = - bnd_no * POINTER_SIZE / BITS_PER_UNIT; - - bitmap_clear_bit (slots, bnd_no); - - /* Check we have no more pointers in the structure. */ - if (bitmap_empty_p (slots)) - BITMAP_FREE (slots); - } - args[j].pointer_arg = ptr_arg; - - /* Check we covered all pointers in the previous - non bounds arg. */ - if (!slots) - ptr_arg = -1; - } - else - ptr_arg = -1; - if (targetm.calls.split_complex_arg && argtype && TREE_CODE (argtype) == COMPLEX_TYPE @@ -2205,11 +2120,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, || (args[i].pass_on_stack && args[i].reg != 0)) *must_preallocate = 1; - /* No stack allocation and padding for bounds. */ - if (POINTER_BOUNDS_P (args[i].tree_value)) - ; /* Compute the stack-size of this argument. */ - else if (args[i].reg == 0 || args[i].partial != 0 + if (args[i].reg == 0 || args[i].partial != 0 || reg_parm_stack_space > 0 || args[i].pass_on_stack) locate_and_pad_parm (mode, type, @@ -2442,12 +2354,6 @@ finalize_must_preallocate (int must_preallocate, int num_actuals, partial_seen = 1; else if (partial_seen && args[i].reg == 0) must_preallocate = 1; - /* We preallocate in case there are bounds passed - in the bounds table to have precomputed address - for bounds association. */ - else if (POINTER_BOUNDS_P (args[i].tree_value) - && !args[i].reg) - must_preallocate = 1; if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode && (TREE_CODE (args[i].tree_value) == CALL_EXPR @@ -2506,10 +2412,6 @@ compute_argument_addresses (struct arg_data *args, rtx argblock, int num_actuals if (TYPE_EMPTY_P (TREE_TYPE (args[i].tree_value))) continue; - /* Pointer Bounds are never passed on the stack. */ - if (POINTER_BOUNDS_P (args[i].tree_value)) - continue; - addr = simplify_gen_binary (PLUS, Pmode, arg_reg, offset); addr = plus_constant (Pmode, addr, arg_offset); @@ -3320,8 +3222,6 @@ expand_call (tree exp, rtx target, int ignore) /* Register in which non-BLKmode value will be returned, or 0 if no value or if value is BLKmode. */ rtx valreg; - /* Register(s) in which bounds are returned. */ - rtx valbnd = NULL; /* Address where we should return a BLKmode value; 0 if value not BLKmode. */ rtx structure_value_addr = 0; @@ -3589,7 +3489,7 @@ expand_call (tree exp, rtx target, int ignore) structure_value_addr_value = make_tree (build_pointer_type (TREE_TYPE (funtype)), temp); - structure_value_addr_parm = CALL_WITH_BOUNDS_P (exp) ? 2 : 1; + structure_value_addr_parm = 1; } /* Count the arguments and set NUM_ACTUALS. */ @@ -4126,10 +4026,7 @@ expand_call (tree exp, rtx target, int ignore) for (i = 0; i < num_actuals; i++) { - /* Delay bounds until all other args are stored. */ - if (POINTER_BOUNDS_P (args[i].tree_value)) - continue; - else if (args[i].reg == 0 || args[i].pass_on_stack) + if (args[i].reg == 0 || args[i].pass_on_stack) { rtx_insn *before_arg = get_last_insn (); @@ -4203,28 +4100,15 @@ expand_call (tree exp, rtx target, int ignore) /* Figure out the register where the value, if any, will come back. */ valreg = 0; - valbnd = 0; if (TYPE_MODE (rettype) != VOIDmode && ! structure_value_addr) { if (pcc_struct_value) - { - valreg = hard_function_value (build_pointer_type (rettype), - fndecl, NULL, (pass == 0)); - if (CALL_WITH_BOUNDS_P (exp)) - valbnd = targetm.calls. - chkp_function_value_bounds (build_pointer_type (rettype), - fndecl, (pass == 0)); - } + valreg = hard_function_value (build_pointer_type (rettype), + fndecl, NULL, (pass == 0)); else - { - valreg = hard_function_value (rettype, fndecl, fntype, - (pass == 0)); - if (CALL_WITH_BOUNDS_P (exp)) - valbnd = targetm.calls.chkp_function_value_bounds (rettype, - fndecl, - (pass == 0)); - } + valreg = hard_function_value (rettype, fndecl, fntype, + (pass == 0)); /* If VALREG is a PARALLEL whose first member has a zero offset, use that. This is for targets such as m68k that @@ -4240,17 +4124,6 @@ expand_call (tree exp, rtx target, int ignore) } } - /* Store all bounds not passed in registers. */ - for (i = 0; i < num_actuals; i++) - { - if (POINTER_BOUNDS_P (args[i].tree_value) - && !args[i].reg) - store_bounds (&args[i], - args[i].pointer_arg == -1 - ? NULL - : &args[args[i].pointer_arg]); - } - /* If register arguments require space on the stack and stack space was not preallocated, allocate stack space here for arguments passed in registers. */ @@ -4655,10 +4528,6 @@ expand_call (tree exp, rtx target, int ignore) free (stack_usage_map_buf); free (args); - - /* Join result with returned bounds so caller may use them if needed. */ - target = chkp_join_splitted_slot (target, valbnd); - return target; } @@ -5513,67 +5382,6 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, } -/* Store pointer bounds argument ARG into Bounds Table entry - associated with PARM. */ -static void -store_bounds (struct arg_data *arg, struct arg_data *parm) -{ - rtx slot = NULL, ptr = NULL, addr = NULL; - - /* We may pass bounds not associated with any pointer. */ - if (!parm) - { - gcc_assert (arg->special_slot); - slot = arg->special_slot; - ptr = const0_rtx; - } - /* Find pointer associated with bounds and where it is - passed. */ - else - { - if (!parm->reg) - { - gcc_assert (!arg->special_slot); - - addr = adjust_address (parm->stack, Pmode, arg->pointer_offset); - } - else if (REG_P (parm->reg)) - { - gcc_assert (arg->special_slot); - slot = arg->special_slot; - - if (MEM_P (parm->value)) - addr = adjust_address (parm->value, Pmode, arg->pointer_offset); - else if (REG_P (parm->value)) - ptr = gen_rtx_SUBREG (Pmode, parm->value, arg->pointer_offset); - else - { - gcc_assert (!arg->pointer_offset); - ptr = parm->value; - } - } - else - { - gcc_assert (GET_CODE (parm->reg) == PARALLEL); - - gcc_assert (arg->special_slot); - slot = arg->special_slot; - - if (parm->parallel_value) - ptr = chkp_get_value_with_offs (parm->parallel_value, - GEN_INT (arg->pointer_offset)); - else - gcc_unreachable (); - } - } - - /* Expand bounds. */ - if (!arg->value) - arg->value = expand_normal (arg->tree_value); - - targetm.calls.store_bounds_for_arg (ptr, addr, arg->value, slot); -} - /* Store a single argument for a function call into the register or memory area where it must be passed. *ARG describes the argument value and where to pass it. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c61104d1683..bf8c54bf873 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -74,8 +74,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-address.h" #include "output.h" #include "builtins.h" -#include "tree-chkp.h" -#include "rtl-chkp.h" /* Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to @@ -2665,7 +2663,6 @@ expand_call_stmt (gcall *stmt) CALL_EXPR_VA_ARG_PACK (exp) = gimple_call_va_arg_pack_p (stmt); CALL_EXPR_BY_DESCRIPTOR (exp) = gimple_call_by_descriptor_p (stmt); SET_EXPR_LOCATION (exp, gimple_location (stmt)); - CALL_WITH_BOUNDS_P (exp) = gimple_call_with_bounds_p (stmt); /* Ensure RTL is created for debug args. */ if (decl && DECL_HAS_DEBUG_ARGS_P (decl)) @@ -3444,12 +3441,11 @@ expand_value_return (rtx val) from the current function. */ static void -expand_return (tree retval, tree bounds) +expand_return (tree retval) { rtx result_rtl; rtx val = 0; tree retval_rhs; - rtx bounds_rtl; /* If function wants no value, give it none. */ if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) @@ -3475,71 +3471,6 @@ expand_return (tree retval, tree bounds) result_rtl = DECL_RTL (DECL_RESULT (current_function_decl)); - /* Put returned bounds to the right place. */ - bounds_rtl = DECL_BOUNDS_RTL (DECL_RESULT (current_function_decl)); - if (bounds_rtl) - { - rtx addr = NULL; - rtx bnd = NULL; - - if (bounds && bounds != error_mark_node) - { - bnd = expand_normal (bounds); - targetm.calls.store_returned_bounds (bounds_rtl, bnd); - } - else if (REG_P (bounds_rtl)) - { - if (bounds) - bnd = chkp_expand_zero_bounds (); - else - { - addr = expand_normal (build_fold_addr_expr (retval_rhs)); - addr = gen_rtx_MEM (Pmode, addr); - bnd = targetm.calls.load_bounds_for_arg (addr, NULL, NULL); - } - - targetm.calls.store_returned_bounds (bounds_rtl, bnd); - } - else - { - int n; - - gcc_assert (GET_CODE (bounds_rtl) == PARALLEL); - - if (bounds) - bnd = chkp_expand_zero_bounds (); - else - { - addr = expand_normal (build_fold_addr_expr (retval_rhs)); - addr = gen_rtx_MEM (Pmode, addr); - } - - for (n = 0; n < XVECLEN (bounds_rtl, 0); n++) - { - rtx slot = XEXP (XVECEXP (bounds_rtl, 0, n), 0); - if (!bounds) - { - rtx offs = XEXP (XVECEXP (bounds_rtl, 0, n), 1); - rtx from = adjust_address (addr, Pmode, INTVAL (offs)); - bnd = targetm.calls.load_bounds_for_arg (from, NULL, NULL); - } - targetm.calls.store_returned_bounds (slot, bnd); - } - } - } - else if (chkp_function_instrumented_p (current_function_decl) - && !BOUNDED_P (retval_rhs) - && chkp_type_has_pointer (TREE_TYPE (retval_rhs)) - && TREE_CODE (retval_rhs) != RESULT_DECL) - { - rtx addr = expand_normal (build_fold_addr_expr (retval_rhs)); - addr = gen_rtx_MEM (Pmode, addr); - - gcc_assert (MEM_P (result_rtl)); - - chkp_copy_bounds_for_stack_parm (result_rtl, addr, TREE_TYPE (retval_rhs)); - } - /* If we are returning the RESULT_DECL, then the value has already been stored into it, so we don't have to do anything special. */ if (TREE_CODE (retval_rhs) == RESULT_DECL) @@ -3646,19 +3577,12 @@ expand_gimple_stmt_1 (gimple *stmt) case GIMPLE_RETURN: { - tree bnd = gimple_return_retbnd (as_a (stmt)); op0 = gimple_return_retval (as_a (stmt)); if (op0 && op0 != error_mark_node) { tree result = DECL_RESULT (current_function_decl); - /* Mark we have return statement with missing bounds. */ - if (!bnd - && chkp_function_instrumented_p (cfun->decl) - && !DECL_P (op0)) - bnd = error_mark_node; - /* If we are not returning the current function's RESULT_DECL, build an assignment to it. */ if (op0 != result) @@ -3680,7 +3604,7 @@ expand_gimple_stmt_1 (gimple *stmt) if (!op0) expand_null_return (); else - expand_return (op0, bnd); + expand_return (op0); } break; @@ -6267,9 +6191,6 @@ pass_expand::execute (function *fun) rtl_profile_for_bb (ENTRY_BLOCK_PTR_FOR_FN (fun)); - if (chkp_function_instrumented_p (current_function_decl)) - chkp_reset_rtl_bounds (); - insn_locations_init (); if (!DECL_IS_BUILTIN (current_function_decl)) { diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 9f3a2929f6b..f922b70a430 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -58,7 +58,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-dfa.h" #include "profile.h" #include "params.h" -#include "tree-chkp.h" #include "context.h" #include "gimplify.h" #include "stringpool.h" @@ -1275,7 +1274,6 @@ cgraph_edge::redirect_call_stmt_to_callee (void) tree decl = gimple_call_fndecl (e->call_stmt); gcall *new_stmt; gimple_stmt_iterator gsi; - bool skip_bounds = false; if (e->speculative) { @@ -1333,24 +1331,6 @@ cgraph_edge::redirect_call_stmt_to_callee (void) e->caller->set_call_stmt_including_clones (e->call_stmt, new_stmt, false); e->count = gimple_bb (e->call_stmt)->count; - - /* Fix edges for BUILT_IN_CHKP_BNDRET calls attached to the - processed call stmt. */ - if (gimple_call_with_bounds_p (new_stmt) - && gimple_call_lhs (new_stmt) - && chkp_retbnd_call_by_val (gimple_call_lhs (e2->call_stmt))) - { - tree dresult = gimple_call_lhs (new_stmt); - tree iresult = gimple_call_lhs (e2->call_stmt); - gcall *dbndret = chkp_retbnd_call_by_val (dresult); - gcall *ibndret = chkp_retbnd_call_by_val (iresult); - struct cgraph_edge *iedge - = e2->caller->cgraph_node::get_edge (ibndret); - - if (dbndret) - iedge->caller->create_edge (iedge->callee, dbndret, e->count); - } - e2->speculative = false; e2->count = gimple_bb (e2->call_stmt)->count; ref->speculative = false; @@ -1364,16 +1344,9 @@ cgraph_edge::redirect_call_stmt_to_callee (void) } } - /* We might propagate instrumented function pointer into - not instrumented function and vice versa. In such a - case we need to either fix function declaration or - remove bounds from call statement. */ - if (flag_check_pointer_bounds && e->callee) - skip_bounds = chkp_redirect_edge (e); if (e->indirect_unknown_callee - || (decl == e->callee->decl - && !skip_bounds)) + || decl == e->callee->decl) return e->call_stmt; if (flag_checking && decl) @@ -1395,8 +1368,7 @@ cgraph_edge::redirect_call_stmt_to_callee (void) } } - if (e->callee->clone.combined_args_to_skip - || skip_bounds) + if (e->callee->clone.combined_args_to_skip) { int lp_nr; @@ -1405,9 +1377,6 @@ cgraph_edge::redirect_call_stmt_to_callee (void) new_stmt = gimple_call_copy_skip_args (new_stmt, e->callee->clone.combined_args_to_skip); - if (skip_bounds) - new_stmt = chkp_copy_call_skip_bounds (new_stmt); - tree old_fntype = gimple_call_fntype (e->call_stmt); gimple_call_set_fndecl (new_stmt, e->callee->decl); cgraph_node *origin = e->callee; @@ -1906,12 +1875,6 @@ cgraph_node::remove (void) call_site_hash = NULL; } - if (instrumented_version) - { - instrumented_version->instrumented_version = NULL; - instrumented_version = NULL; - } - symtab->release_symbol (this, uid); } @@ -2234,11 +2197,6 @@ cgraph_node::dump (FILE *f) if (edge->indirect_info->polymorphic) edge->indirect_info->context.dump (f); } - - if (instrumentation_clone) - fprintf (f, " Is instrumented version.\n"); - else if (instrumented_version) - fprintf (f, " Has instrumented version.\n"); } /* Dump call graph node NODE to stderr. */ @@ -3335,9 +3293,7 @@ cgraph_node::verify_node (void) error_found = true; } for (i = 0; iterate_reference (i, ref); i++) - if (ref->use == IPA_REF_CHKP) - ; - else if (ref->use != IPA_REF_ALIAS) + if (ref->use != IPA_REF_ALIAS) { error ("Alias has non-alias reference"); error_found = true; @@ -3356,77 +3312,6 @@ cgraph_node::verify_node (void) } } - /* Check instrumented version reference. */ - if (instrumented_version - && instrumented_version->instrumented_version != this) - { - error ("Instrumentation clone does not reference original node"); - error_found = true; - } - - /* Cannot have orig_decl for not instrumented nodes. */ - if (!instrumentation_clone && orig_decl) - { - error ("Not instrumented node has non-NULL original declaration"); - error_found = true; - } - - /* If original not instrumented node still exists then we may check - original declaration is set properly. */ - if (instrumented_version - && orig_decl - && orig_decl != instrumented_version->decl) - { - error ("Instrumented node has wrong original declaration"); - error_found = true; - } - - /* Check all nodes have chkp reference to their instrumented versions. */ - if (analyzed - && instrumented_version - && !instrumentation_clone) - { - bool ref_found = false; - int i; - struct ipa_ref *ref; - - for (i = 0; iterate_reference (i, ref); i++) - if (ref->use == IPA_REF_CHKP) - { - if (ref_found) - { - error ("Node has more than one chkp reference"); - error_found = true; - } - if (ref->referred != instrumented_version) - { - error ("Wrong node is referenced with chkp reference"); - error_found = true; - } - ref_found = true; - } - - if (!ref_found) - { - error ("Analyzed node has no reference to instrumented version"); - error_found = true; - } - } - - if (instrumentation_clone - && DECL_BUILT_IN_CLASS (decl) == NOT_BUILT_IN) - { - tree name = DECL_ASSEMBLER_NAME (decl); - tree orig_name = DECL_ASSEMBLER_NAME (orig_decl); - - if (!IDENTIFIER_TRANSPARENT_ALIAS (name) - || TREE_CHAIN (name) != orig_name) - { - error ("Alias chain for instrumented node is broken"); - error_found = true; - } - } - if (analyzed && thunk.thunk_p) { if (!callees) @@ -3444,12 +3329,6 @@ cgraph_node::verify_node (void) error ("Thunk is not supposed to have body"); error_found = true; } - if (thunk.add_pointer_bounds_args - && !instrumented_version->semantically_equivalent_p (callees->callee)) - { - error ("Instrumentation thunk has wrong edge callee"); - error_found = true; - } } else if (analyzed && gimple_has_body_p (decl) && !TREE_ASM_WRITTEN (decl) diff --git a/gcc/cgraph.h b/gcc/cgraph.h index afb2745a841..f0f9961b1b5 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1362,13 +1362,6 @@ public: cgraph_node *prev_sibling_clone; cgraph_node *clones; cgraph_node *clone_of; - /* If instrumentation_clone is 1 then instrumented_version points - to the original function used to make instrumented version. - Otherwise points to instrumented version of the function. */ - cgraph_node *instrumented_version; - /* If instrumentation_clone is 1 then orig_decl is the original - function declaration. */ - tree orig_decl; /* For functions with many calls sites it holds map from call expression to the edge to speed up cgraph_edge function. */ hash_table *GTY(()) call_site_hash; @@ -1433,9 +1426,6 @@ public: unsigned calls_comdat_local : 1; /* True if node has been created by merge operation in IPA-ICF. */ unsigned icf_merged: 1; - /* True when function is clone created for Pointer Bounds Checker - instrumentation. */ - unsigned instrumentation_clone : 1; /* True if call to node can't result in a call to free, munmap or other operation that could make previously non-trapping memory accesses trapping. */ @@ -2386,9 +2376,6 @@ bool ipa_discover_readonly_nonaddressable_vars (void); /* In varpool.c */ tree ctor_for_folding (tree); -/* In tree-chkp.c */ -extern bool chkp_function_instrumented_p (tree fndecl); - /* In ipa-inline-analysis.c */ void initialize_inline_failed (struct cgraph_edge *); bool speculation_useful_p (struct cgraph_edge *e, bool anticipate_inlining); @@ -2449,8 +2436,6 @@ symtab_node::get_alias_target (void) { ipa_ref *ref = NULL; iterate_reference (0, ref); - if (ref->use == IPA_REF_CHKP) - iterate_reference (1, ref); gcc_checking_assert (ref->use == IPA_REF_ALIAS); return ref->referred; } @@ -2905,12 +2890,6 @@ inline bool cgraph_node::can_remove_if_no_direct_calls_and_refs_p (void) { gcc_checking_assert (!global.inlined_to); - /* Instrumentation clones should not be removed before - instrumentation happens. New callers may appear after - instrumentation. */ - if (instrumentation_clone - && !chkp_function_instrumented_p (decl)) - return false; /* Extern inlines can always go, we will use the external definition. */ if (DECL_EXTERNAL (decl)) return true; @@ -3318,18 +3297,6 @@ ipa_polymorphic_call_context::useless_p () const return (!outer_type && !speculative_outer_type); } -/* Return true if NODE is local. Instrumentation clones are counted as local - only when original function is local. */ - -static inline bool -cgraph_local_p (cgraph_node *node) -{ - if (!node->instrumentation_clone || !node->instrumented_version) - return node->local.local; - - return node->local.local && node->instrumented_version->local.local; -} - /* When using fprintf (or similar), problems can arise with transient generated strings. Many string-generation APIs only support one result being alive at once (e.g. by diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index c453a2d7991..c2ad5cf2ef7 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -429,11 +429,6 @@ cgraph_edge::rebuild_edges (void) } record_eh_tables (node, cfun); gcc_assert (!node->global.inlined_to); - - if (node->instrumented_version - && !node->instrumentation_clone) - node->create_reference (node->instrumented_version, IPA_REF_CHKP, NULL); - return 0; } @@ -464,10 +459,6 @@ cgraph_edge::rebuild_references (void) node->record_stmt_references (gsi_stmt (gsi)); } record_eh_tables (node, cfun); - - if (node->instrumented_version - && !node->instrumentation_clone) - node->create_reference (node->instrumented_version, IPA_REF_CHKP, NULL); } namespace { diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index b2dafc669dd..04b6919be48 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -202,7 +202,6 @@ along with GCC; see the file COPYING3. If not see #include "pass_manager.h" #include "tree-nested.h" #include "dbgcnt.h" -#include "tree-chkp.h" #include "lto-section-names.h" #include "stringpool.h" #include "attribs.h" @@ -865,9 +864,6 @@ varpool_node::finalize_decl (tree decl) || (node->no_reorder && symtab->state == EXPANSION)) node->assemble_decl (); - - if (DECL_INITIAL (decl)) - chkp_register_var_initializer (decl); } /* EDGE is an polymorphic call. Mark all possible targets as reachable @@ -941,10 +937,6 @@ walk_polymorphic_call_targets (hash_set *reachable_call_targets, edge->make_direct (target); edge->redirect_call_stmt_to_callee (); - /* Call to __builtin_unreachable shouldn't be instrumented. */ - if (!targets.length ()) - gimple_call_set_with_bounds (edge->call_stmt, false); - if (symtab->dump_file) { fprintf (symtab->dump_file, @@ -1924,7 +1916,6 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) call = gimple_build_call_vec (build_fold_addr_expr_loc (0, alias), vargs); callees->call_stmt = call; gimple_call_set_from_thunk (call, true); - gimple_call_set_with_bounds (call, instrumentation_clone); /* Return slot optimization is always possible and in fact requred to return values with DECL_BY_REFERENCE. */ @@ -1942,17 +1933,6 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) gsi_insert_after (&bsi, call, GSI_NEW_STMT); if (!alias_is_noreturn) { - if (instrumentation_clone - && !DECL_BY_REFERENCE (resdecl) - && restmp - && BOUNDED_P (restmp)) - { - resbnd = chkp_insert_retbnd_call (NULL, restmp, &bsi); - create_edge (get_create (gimple_call_fndecl (gsi_stmt (bsi))), - as_a (gsi_stmt (bsi)), - callees->count); - } - if (restmp && !this_adjusting && (fixed_offset || virtual_offset)) { @@ -2503,13 +2483,9 @@ void symbol_table::output_weakrefs (void) { symtab_node *node; - cgraph_node *cnode; FOR_EACH_SYMBOL (node) if (node->alias && !TREE_ASM_WRITTEN (node->decl) - && (!(cnode = dyn_cast (node)) - || !cnode->instrumented_version - || !TREE_ASM_WRITTEN (cnode->instrumented_version->decl)) && node->weakref) { tree target; diff --git a/gcc/chkp-builtins.def b/gcc/chkp-builtins.def deleted file mode 100644 index 559391446bb..00000000000 --- a/gcc/chkp-builtins.def +++ /dev/null @@ -1,71 +0,0 @@ -/* This file contains the definitions and documentation for the - builtins used in the GNU compiler. - Copyright (C) 2013-2018 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 -. */ - -/* Before including this file, you should define macros: - - DEF_BUILTIN_STUB(ENUM, NAME) - DEF_CHKP_BUILTIN(ENUM, NAME, TYPE, ATTRS) - - See builtins.def for details. */ - -/* Following builtins are used by compiler for Pointer Bounds Checker - instrumentation. Currently these generic builtins are not - implemented and target has to provide his own version. See - builtin_chkp_function target hook documentation for more details. */ -DEF_BUILTIN_STUB (BUILT_IN_CHKP_INTERSECT, "__chkp_intersect") -DEF_BUILTIN_STUB (BUILT_IN_CHKP_SIZEOF, "__chkp_sizeof") -DEF_BUILTIN_STUB (BUILT_IN_CHKP_NARROW, "__chkp_narrow") -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDCL, "__chkp_bndcl", BT_FN_VOID_PTR_BND, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDCU, "__chkp_bndcu", BT_FN_VOID_PTR_BND, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDSTX, "__chkp_bndstx", BT_FN_VOID_CONST_PTR_BND_CONST_PTR, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDLDX, "__chkp_bndldx", BT_FN_CONST_PTR_CONST_PTR_CONST_PTR, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDRET, "__chkp_bndret", BT_FN_BND_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_BNDMK, "__chkp_bndmk", BT_FN_BND_CONST_PTR_SIZE, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_EXTRACT_LOWER, "__chkp_extract_lower", BT_FN_CONST_PTR_BND, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_EXTRACT_UPPER, "__chkp_extract_upper", BT_FN_CONST_PTR_BND, ATTR_CONST_NOTHROW_LEAF_LIST) - -/* Pointer Bounds Checker builtins for users. - All builtins calls are expanded in the - Pointer Bounds Checker pass. */ -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_SET_PTR_BOUNDS, "__bnd_set_ptr_bounds", BT_FN_PTR_CONST_PTR_SIZE, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_INIT_PTR_BOUNDS, "__bnd_init_ptr_bounds", BT_FN_PTR_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_NULL_PTR_BOUNDS, "__bnd_null_ptr_bounds", BT_FN_PTR_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_COPY_PTR_BOUNDS, "__bnd_copy_ptr_bounds", BT_FN_PTR_CONST_PTR_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_NARROW_PTR_BOUNDS, "__bnd_narrow_ptr_bounds", BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_STORE_PTR_BOUNDS, "__bnd_store_ptr_bounds", BT_FN_VOID_PTRPTR_CONST_PTR, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, "__bnd_chk_ptr_lbounds", BT_FN_VOID_CONST_PTR, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, "__bnd_chk_ptr_ubounds", BT_FN_VOID_CONST_PTR, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_CHECK_PTR_BOUNDS, "__bnd_chk_ptr_bounds", BT_FN_VOID_CONST_PTR_SIZE, ATTR_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_GET_PTR_LBOUND, "__bnd_get_ptr_lbound", BT_FN_CONST_PTR_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_GET_PTR_UBOUND, "__bnd_get_ptr_ubound", BT_FN_CONST_PTR_CONST_PTR, ATTR_CONST_NOTHROW_LEAF_LIST) - -/* Pointer Bounds Checker specific versions of string functions. */ -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMCPY_NOBND, "chkp_memcpy_nobnd", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMCPY_NOCHK, "chkp_memcpy_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK, "chkp_memcpy_nobnd_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMMOVE_NOBND, "chkp_memmove_nobnd", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMMOVE_NOCHK, "chkp_memmove_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMMOVE_NOBND_NOCHK, "chkp_memmove_nobnd_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMPCPY_NOBND, "chkp_mempcpy_nobnd", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMPCPY_NOCHK, "chkp_mempcpy_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMPCPY_NOBND_NOCHK, "chkp_mempcpy_nobnd_nochk", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMSET_NOBND, "chkp_memset_nobnd", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMSET_NOCHK, "chkp_memset_nochk", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) -DEF_CHKP_BUILTIN (BUILT_IN_CHKP_MEMSET_NOBND_NOCHK, "chkp_memset_nobnd_nochk", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 3aa32f5934b..664240e7e8d 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -273,7 +273,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA2_AVX512F_UNSET \ (OPTION_MASK_ISA_AVX5124FMAPS_UNSET | OPTION_MASK_ISA_AVX5124VNNIW_UNSET) #define OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET \ - (OPTION_MASK_ISA2_AVX512F_UNSET | OPTION_MASK_ISA_MPX) + (OPTION_MASK_ISA2_AVX512F_UNSET) /* Implement TARGET_HANDLE_OPTION. */ @@ -291,7 +291,7 @@ ix86_handle_option (struct gcc_options *opts, case OPT_mgeneral_regs_only: if (value) { - /* Disable MPX, MMX, SSE and x87 instructions if only + /* Disable MMX, SSE and x87 instructions if only general registers are allowed. */ opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET; diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md index 51f0f518632..132365743e1 100644 --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -94,9 +94,6 @@ (define_register_constraint "v" "TARGET_SSE ? ALL_SSE_REGS : NO_REGS" "Any EVEX encodable SSE register (@code{%xmm0-%xmm31}).") -(define_register_constraint "w" "TARGET_MPX ? BND_REGS : NO_REGS" - "@internal Any bound register.") - ;; We use the Y prefix to denote any number of conditional register sets: ;; z First SSE register. ;; d any EVEX encodable SSE register for AVX512BW target or @@ -319,11 +316,3 @@ (define_address_constraint "Ts" "Address operand without segment register" (match_operand 0 "address_no_seg_operand")) - -(define_address_constraint "Ti" - "MPX address operand without index" - (match_operand 0 "address_mpx_no_index_operand")) - -(define_address_constraint "Tb" - "MPX address operand without base" - (match_operand 0 "address_mpx_no_base_operand")) diff --git a/gcc/config/i386/i386-builtin-types.def b/gcc/config/i386/i386-builtin-types.def index 6a75415d1fd..886cf1b6ecc 100644 --- a/gcc/config/i386/i386-builtin-types.def +++ b/gcc/config/i386/i386-builtin-types.def @@ -47,7 +47,6 @@ DEF_PRIMITIVE_TYPE (UCHAR, unsigned_char_type_node) DEF_PRIMITIVE_TYPE (QI, char_type_node) DEF_PRIMITIVE_TYPE (HI, intHI_type_node) DEF_PRIMITIVE_TYPE (SI, intSI_type_node) -DEF_PRIMITIVE_TYPE (BND, pointer_bounds_type_node) # ??? Logically this should be intDI_type_node, but that maps to "long" # with 64-bit, and that's not how the emmintrin.h is written. Again, # changing this would change name mangling. @@ -1208,17 +1207,6 @@ DEF_FUNCTION_TYPE_ALIAS (V4SF_FTYPE_V4SF_V4SF, TF) DEF_FUNCTION_TYPE_ALIAS (V4SI_FTYPE_V4SI_V4SI, TF) DEF_FUNCTION_TYPE_ALIAS (V8HI_FTYPE_V8HI_V8HI, TF) -# MPX builtins -DEF_FUNCTION_TYPE (BND, PCVOID, ULONG) -DEF_FUNCTION_TYPE (VOID, PCVOID, BND) -DEF_FUNCTION_TYPE (VOID, PCVOID, BND, PCVOID) -DEF_FUNCTION_TYPE (BND, PCVOID, PCVOID) -DEF_FUNCTION_TYPE (BND, PCVOID) -DEF_FUNCTION_TYPE (BND, BND, BND) -DEF_FUNCTION_TYPE (PVOID, PCVOID, BND, ULONG) -DEF_FUNCTION_TYPE (ULONG, VOID) -DEF_FUNCTION_TYPE (PVOID, BND) - #GFNI builtins DEF_FUNCTION_TYPE (V64QI, V64QI, V64QI, INT) DEF_FUNCTION_TYPE (V64QI, V64QI, V64QI, INT, V64QI, UDI) diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def index 14041293795..383f9cc890c 100644 --- a/gcc/config/i386/i386-builtin.def +++ b/gcc/config/i386/i386-builtin.def @@ -2847,29 +2847,7 @@ BDESC_FIRST (special_args2, SPECIAL_ARGS2, OPTION_MASK_ISA_WBNOINVD, CODE_FOR_wbnoinvd, "__builtin_ia32_wbnoinvd", IX86_BUILTIN_WBNOINVD, UNKNOWN, (int) VOID_FTYPE_VOID) BDESC (OPTION_MASK_ISA_MOVDIR64B, CODE_FOR_nothing, "__builtin_ia32_movdir64b", IX86_BUILTIN_MOVDIR64B, UNKNOWN, (int) VOID_FTYPE_PVOID_PCVOID) -BDESC_END (SPECIAL_ARGS2, MPX) - - -/* Builtins for MPX. */ -BDESC_FIRST (mpx, MPX, - OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndstx", IX86_BUILTIN_BNDSTX, UNKNOWN, (int) VOID_FTYPE_PCVOID_BND_PCVOID) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndcl", IX86_BUILTIN_BNDCL, UNKNOWN, (int) VOID_FTYPE_PCVOID_BND) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndcu", IX86_BUILTIN_BNDCU, UNKNOWN, (int) VOID_FTYPE_PCVOID_BND) - -BDESC_END (MPX, MPX_CONST) - -/* Const builtins for MPX. */ -BDESC_FIRST (mpx_const, MPX_CONST, - OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndmk", IX86_BUILTIN_BNDMK, UNKNOWN, (int) BND_FTYPE_PCVOID_ULONG) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndldx", IX86_BUILTIN_BNDLDX, UNKNOWN, (int) BND_FTYPE_PCVOID_PCVOID) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_narrow_bounds", IX86_BUILTIN_BNDNARROW, UNKNOWN, (int) PVOID_FTYPE_PCVOID_BND_ULONG) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndint", IX86_BUILTIN_BNDINT, UNKNOWN, (int) BND_FTYPE_BND_BND) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_sizeof", IX86_BUILTIN_SIZEOF, UNKNOWN, (int) ULONG_FTYPE_VOID) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndlower", IX86_BUILTIN_BNDLOWER, UNKNOWN, (int) PVOID_FTYPE_BND) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndupper", IX86_BUILTIN_BNDUPPER, UNKNOWN, (int) PVOID_FTYPE_BND) -BDESC (OPTION_MASK_ISA_MPX, (enum insn_code)0, "__builtin_ia32_bndret", IX86_BUILTIN_BNDRET, UNKNOWN, (int) BND_FTYPE_PCVOID) - -BDESC_END (MPX_CONST, MULTI_ARG) +BDESC_END (SPECIAL_ARGS2, MULTI_ARG) /* FMA4 and XOP. */ BDESC_FIRST (multi_arg, MULTI_ARG, diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index 8996a8531a7..005e1a5b308 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -508,8 +508,6 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, def_or_undef (parse_in, "__XSAVEC__"); if (isa_flag & OPTION_MASK_ISA_XSAVES) def_or_undef (parse_in, "__XSAVES__"); - if (isa_flag2 & OPTION_MASK_ISA_MPX) - def_or_undef (parse_in, "__MPX__"); if (isa_flag & OPTION_MASK_ISA_CLWB) def_or_undef (parse_in, "__CLWB__"); if (isa_flag2 & OPTION_MASK_ISA_MWAITX) diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 02991a55509..d1d59633dc0 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -232,8 +232,6 @@ extern void ix86_expand_sse2_mulv4si3 (rtx, rtx, rtx); extern void ix86_expand_sse2_mulvxdi3 (rtx, rtx, rtx); extern void ix86_expand_sse2_abs (rtx, rtx); -extern bool ix86_bnd_prefixed_insn_p (rtx); - /* In i386-c.c */ extern void ix86_target_macros (void); extern void ix86_register_pragmas (void); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index b95f0612562..de32377efb3 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -73,8 +73,6 @@ along with GCC; see the file COPYING3. If not see #include "builtins.h" #include "rtl-iter.h" #include "tree-iterator.h" -#include "tree-chkp.h" -#include "rtl-chkp.h" #include "dbgcnt.h" #include "case-cfn-macros.h" #include "regrename.h" @@ -263,8 +261,6 @@ enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER] = /* Mask registers. */ MASK_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, MASK_EVEX_REGS, - /* MPX bound registers */ - BND_REGS, BND_REGS, BND_REGS, BND_REGS, }; /* The "default" register map used in 32bit mode. */ @@ -2765,7 +2761,6 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, static struct ix86_target_opts isa2_opts[] = { { "-mcx16", OPTION_MASK_ISA_CX16 }, - { "-mmpx", OPTION_MASK_ISA_MPX }, { "-mvaes", OPTION_MASK_ISA_VAES }, { "-mrdpid", OPTION_MASK_ISA_RDPID }, { "-mpconfig", OPTION_MASK_ISA_PCONFIG }, @@ -3433,7 +3428,7 @@ ix86_option_override_internal (bool main_args_p, const wide_int_bitmask PTA_AVX512ER (HOST_WIDE_INT_1U << 41); const wide_int_bitmask PTA_AVX512PF (HOST_WIDE_INT_1U << 42); const wide_int_bitmask PTA_AVX512CD (HOST_WIDE_INT_1U << 43); - const wide_int_bitmask PTA_MPX (HOST_WIDE_INT_1U << 44); + /* Hole after PTA_MPX was removed. */ const wide_int_bitmask PTA_SHA (HOST_WIDE_INT_1U << 45); const wide_int_bitmask PTA_PREFETCHWT1 (HOST_WIDE_INT_1U << 46); const wide_int_bitmask PTA_CLFLUSHOPT (HOST_WIDE_INT_1U << 47); @@ -4135,9 +4130,6 @@ ix86_option_override_internal (bool main_args_p, if (((processor_alias_table[i].flags & PTA_AVX512VL) != 0) && !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_AVX512VL)) opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX512VL; - if (((processor_alias_table[i].flags & PTA_MPX) != 0) - && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA_MPX)) - opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_MPX; if (((processor_alias_table[i].flags & PTA_AVX512VBMI) != 0) && !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_AVX512VBMI)) opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX512VBMI; @@ -4213,12 +4205,6 @@ ix86_option_override_internal (bool main_args_p, break; } - if (TARGET_X32 && (opts->x_ix86_isa_flags2 & OPTION_MASK_ISA_MPX)) - error ("Intel MPX does not support x32"); - - if (TARGET_X32 && (ix86_isa_flags2 & OPTION_MASK_ISA_MPX)) - error ("Intel MPX does not support x32"); - if (i == pta_size) { error (main_args_p @@ -5054,11 +5040,6 @@ ix86_conditional_register_usage (void) for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++) fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; } - - /* If MPX is disabled, squash the registers. */ - if (! TARGET_MPX) - for (i = FIRST_BND_REG; i <= LAST_BND_REG; i++) - fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; } /* Canonicalize a comparison from one we don't have to one we do have. */ @@ -5392,7 +5373,6 @@ ix86_valid_target_attribute_inner_p (tree args, char *p_strings[], IX86_ATTR_ISA ("lwp", OPT_mlwp), IX86_ATTR_ISA ("hle", OPT_mhle), IX86_ATTR_ISA ("fxsr", OPT_mfxsr), - IX86_ATTR_ISA ("mpx", OPT_mmpx), IX86_ATTR_ISA ("clwb", OPT_mclwb), IX86_ATTR_ISA ("rdpid", OPT_mrdpid), IX86_ATTR_ISA ("gfni", OPT_mgfni), @@ -5925,16 +5905,6 @@ ix86_set_indirect_branch_type (tree fndecl) ((cfun->machine->indirect_branch_type == indirect_branch_thunk_extern) ? "thunk-extern" : "thunk")); - - /* -mindirect-branch=thunk-extern, -fcf-protection=branch and - -fcheck-pointer-bounds are not compatible. */ - if ((cfun->machine->indirect_branch_type - == indirect_branch_thunk_extern) - && flag_check_pointer_bounds - && (flag_cf_protection & CF_BRANCH) != 0) - error ("%<-mindirect-branch=thunk-extern%>, " - "%<-fcf-protection=branch%> and " - "%<-fcheck-pointer-bounds%> are not compatible"); } if (cfun->machine->function_return_type == indirect_branch_unset) @@ -6050,12 +6020,10 @@ ix86_set_current_function (tree fndecl) if (cfun->machine->func_type != TYPE_NORMAL || cfun->machine->no_caller_saved_registers) { - /* Don't allow MPX, SSE, MMX nor x87 instructions since they + /* Don't allow SSE, MMX nor x87 instructions since they may change processor state. */ const char *isa; - if (TARGET_MPX) - isa = "MPX"; - else if (TARGET_SSE) + if (TARGET_SSE) isa = "SSE"; else if (TARGET_MMX) isa = "MMX/3Dnow"; @@ -7049,9 +7017,6 @@ ix86_function_arg_regno_p (int regno) enum calling_abi call_abi; const int *parm_regs; - if (TARGET_MPX && BND_REGNO_P (regno)) - return true; - if (!TARGET_64BIT) { if (TARGET_MACHO) @@ -7396,9 +7361,6 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ ? (!prototype_p (fntype) || stdarg_p (fntype)) : !libname); - cum->bnd_regno = FIRST_BND_REG; - cum->bnds_in_bt = 0; - cum->force_bnd_pass = 0; cum->decl = fndecl; cum->warn_empty = !warn_abi || cum->stdarg; @@ -8571,36 +8533,6 @@ ix86_function_arg_advance (cumulative_args_t cum_v, machine_mode mode, if (type) mode = type_natural_mode (type, NULL, false); - if ((type && POINTER_BOUNDS_TYPE_P (type)) - || POINTER_BOUNDS_MODE_P (mode)) - { - /* If we pass bounds in BT then just update remained bounds count. */ - if (cum->bnds_in_bt) - { - cum->bnds_in_bt--; - return; - } - - /* Update remained number of bounds to force. */ - if (cum->force_bnd_pass) - cum->force_bnd_pass--; - - cum->bnd_regno++; - - return; - } - - /* The first arg not going to Bounds Tables resets this counter. */ - cum->bnds_in_bt = 0; - /* For unnamed args we always pass bounds to avoid bounds mess when - passed and received types do not match. If bounds do not follow - unnamed arg, still pretend required number of bounds were passed. */ - if (cum->force_bnd_pass) - { - cum->bnd_regno += cum->force_bnd_pass; - cum->force_bnd_pass = 0; - } - if (TARGET_64BIT) { enum calling_abi call_abi = cum ? cum->call_abi : ix86_abi; @@ -8613,10 +8545,6 @@ ix86_function_arg_advance (cumulative_args_t cum_v, machine_mode mode, else nregs = function_arg_advance_32 (cum, mode, type, bytes, words); - /* For stdarg we expect bounds to be passed for each value passed - in register. */ - if (cum->stdarg) - cum->force_bnd_pass = nregs; /* For pointers passed in memory we expect bounds passed in Bounds Table. */ if (!nregs) @@ -8624,9 +8552,6 @@ ix86_function_arg_advance (cumulative_args_t cum_v, machine_mode mode, /* Track if there are outgoing arguments on stack. */ if (cum->caller) cfun->machine->outgoing_args_on_stack = true; - - if (flag_check_pointer_bounds) - cum->bnds_in_bt = chkp_type_bounds_count (type); } } @@ -8914,23 +8839,6 @@ ix86_function_arg (cumulative_args_t cum_v, machine_mode omode, return arg; } - /* All pointer bounds arguments are handled separately here. */ - if ((type && POINTER_BOUNDS_TYPE_P (type)) - || POINTER_BOUNDS_MODE_P (mode)) - { - /* Return NULL if bounds are forced to go in Bounds Table. */ - if (cum->bnds_in_bt) - arg = NULL; - /* Return the next available bound reg if any. */ - else if (cum->bnd_regno <= LAST_BND_REG) - arg = gen_rtx_REG (BNDmode, cum->bnd_regno); - /* Return the next special slot number otherwise. */ - else - arg = GEN_INT (cum->bnd_regno - LAST_BND_REG - 1); - - return arg; - } - if (mode == BLKmode) bytes = int_size_in_bytes (type); else @@ -8973,11 +8881,6 @@ ix86_pass_by_reference (cumulative_args_t cum_v, machine_mode mode, { CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); - /* Bounds are never passed by reference. */ - if ((type && POINTER_BOUNDS_TYPE_P (type)) - || POINTER_BOUNDS_MODE_P (mode)) - return false; - if (TARGET_64BIT) { enum calling_abi call_abi = cum ? cum->call_abi : ix86_abi; @@ -9221,10 +9124,6 @@ ix86_function_value_regno_p (const unsigned int regno) case SI_REG: return TARGET_64BIT && ix86_cfun_abi () != MS_ABI; - case BND0_REG: - case BND1_REG: - return chkp_function_instrumented_p (current_function_decl); - /* Complex values are returned in %st(0)/%st(1) pair. */ case ST0_REG: case ST1_REG: @@ -9408,10 +9307,7 @@ ix86_function_value_1 (const_tree valtype, const_tree fntype_or_decl, fn = fntype_or_decl; fntype = fn ? TREE_TYPE (fn) : fntype_or_decl; - if ((valtype && POINTER_BOUNDS_TYPE_P (valtype)) - || POINTER_BOUNDS_MODE_P (mode)) - return gen_rtx_REG (BNDmode, FIRST_BND_REG); - else if (TARGET_64BIT && ix86_function_type_abi (fntype) == MS_ABI) + if (TARGET_64BIT && ix86_function_type_abi (fntype) == MS_ABI) return function_value_ms_64 (orig_mode, mode, valtype); else if (TARGET_64BIT) return function_value_64 (orig_mode, mode, valtype); @@ -9429,57 +9325,6 @@ ix86_function_value (const_tree valtype, const_tree fntype_or_decl, bool) return ix86_function_value_1 (valtype, fntype_or_decl, orig_mode, mode); } -/* Return an RTX representing a place where a function returns - or recieves pointer bounds or NULL if no bounds are returned. - - VALTYPE is a data type of a value returned by the function. - - FN_DECL_OR_TYPE is a tree node representing FUNCTION_DECL - or FUNCTION_TYPE of the function. - - If OUTGOING is false, return a place in which the caller will - see the return value. Otherwise, return a place where a - function returns a value. */ - -static rtx -ix86_function_value_bounds (const_tree valtype, - const_tree fntype_or_decl ATTRIBUTE_UNUSED, - bool outgoing ATTRIBUTE_UNUSED) -{ - rtx res = NULL_RTX; - - if (BOUNDED_TYPE_P (valtype)) - res = gen_rtx_REG (BNDmode, FIRST_BND_REG); - else if (chkp_type_has_pointer (valtype)) - { - bitmap slots; - rtx bounds[2]; - bitmap_iterator bi; - unsigned i, bnd_no = 0; - - bitmap_obstack_initialize (NULL); - slots = BITMAP_ALLOC (NULL); - chkp_find_bound_slots (valtype, slots); - - EXECUTE_IF_SET_IN_BITMAP (slots, 0, i, bi) - { - rtx reg = gen_rtx_REG (BNDmode, FIRST_BND_REG + bnd_no); - rtx offs = GEN_INT (i * POINTER_SIZE / BITS_PER_UNIT); - gcc_assert (bnd_no < 2); - bounds[bnd_no++] = gen_rtx_EXPR_LIST (VOIDmode, reg, offs); - } - - res = gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (bnd_no, bounds)); - - BITMAP_FREE (slots); - bitmap_obstack_release (NULL); - } - else - res = NULL_RTX; - - return res; -} - /* Pointer function arguments and return values are promoted to word_mode for normal functions. */ @@ -9528,9 +9373,6 @@ ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) const machine_mode mode = type_natural_mode (type, NULL, true); HOST_WIDE_INT size; - if (POINTER_BOUNDS_TYPE_P (type)) - return false; - if (TARGET_64BIT) { if (ix86_function_type_abi (fntype) == MS_ABI) @@ -9858,8 +9700,7 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v, CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); CUMULATIVE_ARGS next_cum; tree fntype; - rtx save_area; - int bnd_reg, i, max; + int max; gcc_assert (!no_rtl); @@ -9875,40 +9716,10 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v, if (stdarg_p (fntype)) ix86_function_arg_advance (pack_cumulative_args (&next_cum), mode, type, true); - save_area = frame_pointer_rtx; max = cum->regno + cfun->va_list_gpr_size / UNITS_PER_WORD; if (max > X86_64_REGPARM_MAX) max = X86_64_REGPARM_MAX; - - bnd_reg = cum->bnd_regno + cum->force_bnd_pass; - if (chkp_function_instrumented_p (current_function_decl)) - for (i = cum->regno; i < max; i++) - { - rtx addr = plus_constant (Pmode, save_area, i * UNITS_PER_WORD); - rtx ptr = gen_rtx_REG (Pmode, - x86_64_int_parameter_registers[i]); - rtx bounds; - - if (bnd_reg <= LAST_BND_REG) - bounds = gen_rtx_REG (BNDmode, bnd_reg); - else - { - rtx ldx_addr = - plus_constant (Pmode, arg_pointer_rtx, - (LAST_BND_REG - bnd_reg) * GET_MODE_SIZE (Pmode)); - bounds = gen_reg_rtx (BNDmode); - emit_insn (BNDmode == BND64mode - ? gen_bnd64_ldx (bounds, ldx_addr, ptr) - : gen_bnd32_ldx (bounds, ldx_addr, ptr)); - } - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_stx (addr, ptr, bounds) - : gen_bnd32_stx (addr, ptr, bounds)); - - bnd_reg++; - } } @@ -9986,13 +9797,6 @@ ix86_va_start (tree valist, rtx nextarg) crtl->args.arg_offset_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); convert_move (va_r, next, 0); - - /* Store zero bounds for va_list. */ - if (chkp_function_instrumented_p (current_function_decl)) - chkp_expand_bounds_reset_for_mem (valist, - make_tree (TREE_TYPE (valist), - next)); - } return; } @@ -10047,10 +9851,6 @@ ix86_va_start (tree valist, rtx nextarg) if (words != 0) t = fold_build_pointer_plus_hwi (t, words * UNITS_PER_WORD); - /* Store zero bounds for overflow area pointer. */ - if (chkp_function_instrumented_p (current_function_decl)) - chkp_expand_bounds_reset_for_mem (ovf, t); - t = build2 (MODIFY_EXPR, type, ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -10064,10 +9864,6 @@ ix86_va_start (tree valist, rtx nextarg) if (!ix86_varargs_gpr_size) t = fold_build_pointer_plus_hwi (t, -8 * X86_64_REGPARM_MAX); - /* Store zero bounds for save area pointer. */ - if (chkp_function_instrumented_p (current_function_decl)) - chkp_expand_bounds_reset_for_mem (sav, t); - t = build2 (MODIFY_EXPR, type, sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -10869,9 +10665,7 @@ enum indirect_thunk_prefix indirect_thunk_need_prefix (rtx_insn *insn) { enum indirect_thunk_prefix need_prefix; - if (ix86_bnd_prefixed_insn_p (insn)) - need_prefix = indirect_thunk_prefix_bnd; - else if ((cfun->machine->indirect_branch_type + if ((cfun->machine->indirect_branch_type == indirect_branch_thunk_extern) && ix86_notrack_prefixed_insn_p (insn)) { @@ -18086,7 +17880,7 @@ print_reg (rtx x, int code, FILE *file) ; -- print a semicolon (after prefixes due to bug in older gas). ~ -- print "i" if TARGET_AVX2, "f" otherwise. ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode - ! -- print MPX prefix for jxx/call/ret instructions if required. + ! -- print NOTRACK prefix for jxx/call/ret instructions if required. */ void @@ -18639,8 +18433,6 @@ ix86_print_operand (FILE *file, rtx x, int code) return; case '!': - if (ix86_bnd_prefixed_insn_p (current_output_insn)) - fputs ("bnd ", file); if (ix86_notrack_prefixed_insn_p (current_output_insn)) fputs ("notrack ", file); return; @@ -28595,30 +28387,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1, call = gen_rtx_CALL (VOIDmode, fnaddr, callarg1); if (retval) - { - /* We should add bounds as destination register in case - pointer with bounds may be returned. */ - if (TARGET_MPX && SCALAR_INT_MODE_P (GET_MODE (retval))) - { - rtx b0 = gen_rtx_REG (BND64mode, FIRST_BND_REG); - rtx b1 = gen_rtx_REG (BND64mode, FIRST_BND_REG + 1); - if (GET_CODE (retval) == PARALLEL) - { - b0 = gen_rtx_EXPR_LIST (VOIDmode, b0, const0_rtx); - b1 = gen_rtx_EXPR_LIST (VOIDmode, b1, const0_rtx); - rtx par = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, b0, b1)); - retval = chkp_join_splitted_slot (retval, par); - } - else - { - retval = gen_rtx_PARALLEL (VOIDmode, - gen_rtvec (3, retval, b0, b1)); - chkp_put_regs_to_expr_list (retval); - } - } - - call = gen_rtx_SET (retval, call); - } + call = gen_rtx_SET (retval, call); vec[vec_len++] = call; if (pop) @@ -29034,7 +28803,7 @@ ix86_output_function_return (bool long_p) return ""; } - if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn)) + if (!long_p) return "%!ret"; return "rep%; ret"; @@ -29348,8 +29117,6 @@ reg_encoded_number (rtx reg) return regno - FIRST_REX_INT_REG; if (IN_RANGE (regno, FIRST_MASK_REG, LAST_MASK_REG)) return regno - FIRST_MASK_REG; - if (IN_RANGE (regno, FIRST_BND_REG, LAST_BND_REG)) - return regno - FIRST_BND_REG; return -1; } @@ -31297,12 +31064,8 @@ BDESC_VERIFYS (IX86_BUILTIN__BDESC_ARGS2_FIRST, IX86_BUILTIN__BDESC_ROUND_ARGS_LAST, 1); BDESC_VERIFYS (IX86_BUILTIN__BDESC_SPECIAL_ARGS2_FIRST, IX86_BUILTIN__BDESC_ARGS2_LAST, 1); -BDESC_VERIFYS (IX86_BUILTIN__BDESC_MPX_FIRST, - IX86_BUILTIN__BDESC_SPECIAL_ARGS2_LAST, 1); -BDESC_VERIFYS (IX86_BUILTIN__BDESC_MPX_CONST_FIRST, - IX86_BUILTIN__BDESC_MPX_LAST, 1); BDESC_VERIFYS (IX86_BUILTIN__BDESC_MULTI_ARG_FIRST, - IX86_BUILTIN__BDESC_MPX_CONST_LAST, 1); + IX86_BUILTIN__BDESC_SPECIAL_ARGS2_LAST, 1); BDESC_VERIFYS (IX86_BUILTIN__BDESC_CET_FIRST, IX86_BUILTIN__BDESC_MULTI_ARG_LAST, 1); BDESC_VERIFYS (IX86_BUILTIN__BDESC_CET_NORMAL_FIRST, @@ -32051,74 +31814,6 @@ ix86_init_mmx_sse_builtins (void) ARRAY_SIZE (bdesc_cet_rdssp) - 1); } -static void -ix86_init_mpx_builtins () -{ - const struct builtin_description * d; - enum ix86_builtin_func_type ftype; - tree decl; - size_t i; - - for (i = 0, d = bdesc_mpx; - i < ARRAY_SIZE (bdesc_mpx); - i++, d++) - { - BDESC_VERIFY (d->code, IX86_BUILTIN__BDESC_MPX_FIRST, i); - if (d->name == 0) - continue; - - ftype = (enum ix86_builtin_func_type) d->flag; - decl = def_builtin2 (d->mask, d->name, ftype, d->code); - - /* With no leaf and nothrow flags for MPX builtins - abnormal edges may follow its call when setjmp - presents in the function. Since we may have a lot - of MPX builtins calls it causes lots of useless - edges and enormous PHI nodes. To avoid this we mark - MPX builtins as leaf and nothrow. */ - if (decl) - { - DECL_ATTRIBUTES (decl) = build_tree_list (get_identifier ("leaf"), - NULL_TREE); - TREE_NOTHROW (decl) = 1; - } - else - { - ix86_builtins_isa[(int)d->code].leaf_p = true; - ix86_builtins_isa[(int)d->code].nothrow_p = true; - } - } - BDESC_VERIFYS (IX86_BUILTIN__BDESC_MPX_LAST, - IX86_BUILTIN__BDESC_MPX_FIRST, - ARRAY_SIZE (bdesc_mpx) - 1); - - for (i = 0, d = bdesc_mpx_const; - i < ARRAY_SIZE (bdesc_mpx_const); - i++, d++) - { - BDESC_VERIFY (d->code, IX86_BUILTIN__BDESC_MPX_CONST_FIRST, i); - if (d->name == 0) - continue; - - ftype = (enum ix86_builtin_func_type) d->flag; - decl = def_builtin_const2 (d->mask, d->name, ftype, d->code); - - if (decl) - { - DECL_ATTRIBUTES (decl) = build_tree_list (get_identifier ("leaf"), - NULL_TREE); - TREE_NOTHROW (decl) = 1; - } - else - { - ix86_builtins_isa[(int)d->code].leaf_p = true; - ix86_builtins_isa[(int)d->code].nothrow_p = true; - } - } - BDESC_VERIFYS (IX86_BUILTIN__BDESC_MPX_CONST_LAST, - IX86_BUILTIN__BDESC_MPX_CONST_FIRST, - ARRAY_SIZE (bdesc_mpx_const) - 1); -} #undef BDESC_VERIFY #undef BDESC_VERIFYS @@ -34350,7 +34045,6 @@ ix86_init_builtins (void) ix86_init_tm_builtins (); ix86_init_mmx_sse_builtins (); - ix86_init_mpx_builtins (); if (TARGET_LP64) ix86_init_builtins_va_builtins_abi (); @@ -37032,36 +36726,6 @@ ix86_expand_vec_set_builtin (tree exp) return target; } -/* Emit conditional move of SRC to DST with condition - OP1 CODE OP2. */ -static void -ix86_emit_cmove (rtx dst, rtx src, enum rtx_code code, rtx op1, rtx op2) -{ - rtx t; - - if (TARGET_CMOVE) - { - t = ix86_expand_compare (code, op1, op2); - emit_insn (gen_rtx_SET (dst, gen_rtx_IF_THEN_ELSE (GET_MODE (dst), t, - src, dst))); - } - else - { - rtx_code_label *nomove = gen_label_rtx (); - emit_cmp_and_jump_insns (op1, op2, reverse_condition (code), - const0_rtx, GET_MODE (op1), 1, nomove); - emit_move_insn (dst, src); - emit_label (nomove); - } -} - -/* Choose max of DST and SRC and put it to DST. */ -static void -ix86_emit_move_max (rtx dst, rtx src) -{ - ix86_emit_cmove (dst, src, LTU, dst, src); -} - /* Expand an expression EXP that calls a built-in function, with result going to TARGET if that's convenient (and in mode MODE if that's convenient). @@ -37143,342 +36807,6 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, switch (fcode) { - case IX86_BUILTIN_BNDMK: - if (!target - || GET_MODE (target) != BNDmode - || !register_operand (target, BNDmode)) - target = gen_reg_rtx (BNDmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - - if (!register_operand (op0, Pmode)) - op0 = ix86_zero_extend_to_Pmode (op0); - if (!register_operand (op1, Pmode)) - op1 = ix86_zero_extend_to_Pmode (op1); - - /* Builtin arg1 is size of block but instruction op1 should - be (size - 1). */ - op1 = expand_simple_binop (Pmode, PLUS, op1, constm1_rtx, - NULL_RTX, 1, OPTAB_DIRECT); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_mk (target, op0, op1) - : gen_bnd32_mk (target, op0, op1)); - return target; - - case IX86_BUILTIN_BNDSTX: - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - arg2 = CALL_EXPR_ARG (exp, 2); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - op2 = expand_normal (arg2); - - if (!register_operand (op0, Pmode)) - op0 = ix86_zero_extend_to_Pmode (op0); - if (!register_operand (op1, BNDmode)) - op1 = copy_to_mode_reg (BNDmode, op1); - if (!register_operand (op2, Pmode)) - op2 = ix86_zero_extend_to_Pmode (op2); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_stx (op2, op0, op1) - : gen_bnd32_stx (op2, op0, op1)); - return 0; - - case IX86_BUILTIN_BNDLDX: - if (!target - || GET_MODE (target) != BNDmode - || !register_operand (target, BNDmode)) - target = gen_reg_rtx (BNDmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - - if (!register_operand (op0, Pmode)) - op0 = ix86_zero_extend_to_Pmode (op0); - if (!register_operand (op1, Pmode)) - op1 = ix86_zero_extend_to_Pmode (op1); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_ldx (target, op0, op1) - : gen_bnd32_ldx (target, op0, op1)); - return target; - - case IX86_BUILTIN_BNDCL: - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - - if (!register_operand (op0, Pmode)) - op0 = ix86_zero_extend_to_Pmode (op0); - if (!register_operand (op1, BNDmode)) - op1 = copy_to_mode_reg (BNDmode, op1); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_cl (op1, op0) - : gen_bnd32_cl (op1, op0)); - return 0; - - case IX86_BUILTIN_BNDCU: - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - - if (!register_operand (op0, Pmode)) - op0 = ix86_zero_extend_to_Pmode (op0); - if (!register_operand (op1, BNDmode)) - op1 = copy_to_mode_reg (BNDmode, op1); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_cu (op1, op0) - : gen_bnd32_cu (op1, op0)); - return 0; - - case IX86_BUILTIN_BNDRET: - arg0 = CALL_EXPR_ARG (exp, 0); - target = chkp_get_rtl_bounds (arg0); - - /* If no bounds were specified for returned value, - then use INIT bounds. It usually happens when - some built-in function is expanded. */ - if (!target) - { - rtx t1 = gen_reg_rtx (Pmode); - rtx t2 = gen_reg_rtx (Pmode); - target = gen_reg_rtx (BNDmode); - emit_move_insn (t1, const0_rtx); - emit_move_insn (t2, constm1_rtx); - emit_insn (BNDmode == BND64mode - ? gen_bnd64_mk (target, t1, t2) - : gen_bnd32_mk (target, t1, t2)); - } - - gcc_assert (target && REG_P (target)); - return target; - - case IX86_BUILTIN_BNDNARROW: - { - rtx m1, m1h1, m1h2, lb, ub, t1; - - /* Return value and lb. */ - arg0 = CALL_EXPR_ARG (exp, 0); - /* Bounds. */ - arg1 = CALL_EXPR_ARG (exp, 1); - /* Size. */ - arg2 = CALL_EXPR_ARG (exp, 2); - - lb = expand_normal (arg0); - op1 = expand_normal (arg1); - op2 = expand_normal (arg2); - - /* Size was passed but we need to use (size - 1) as for bndmk. */ - op2 = expand_simple_binop (Pmode, PLUS, op2, constm1_rtx, - NULL_RTX, 1, OPTAB_DIRECT); - - /* Add LB to size and inverse to get UB. */ - op2 = expand_simple_binop (Pmode, PLUS, op2, lb, - op2, 1, OPTAB_DIRECT); - ub = expand_simple_unop (Pmode, NOT, op2, op2, 1); - - if (!register_operand (lb, Pmode)) - lb = ix86_zero_extend_to_Pmode (lb); - if (!register_operand (ub, Pmode)) - ub = ix86_zero_extend_to_Pmode (ub); - - /* We need to move bounds to memory before any computations. */ - if (MEM_P (op1)) - m1 = op1; - else - { - m1 = assign_386_stack_local (BNDmode, SLOT_TEMP); - emit_move_insn (m1, op1); - } - - /* Generate mem expression to be used for access to LB and UB. */ - m1h1 = adjust_address (m1, Pmode, 0); - m1h2 = adjust_address (m1, Pmode, GET_MODE_SIZE (Pmode)); - - t1 = gen_reg_rtx (Pmode); - - /* Compute LB. */ - emit_move_insn (t1, m1h1); - ix86_emit_move_max (t1, lb); - emit_move_insn (m1h1, t1); - - /* Compute UB. UB is stored in 1's complement form. Therefore - we also use max here. */ - emit_move_insn (t1, m1h2); - ix86_emit_move_max (t1, ub); - emit_move_insn (m1h2, t1); - - op2 = gen_reg_rtx (BNDmode); - emit_move_insn (op2, m1); - - return chkp_join_splitted_slot (lb, op2); - } - - case IX86_BUILTIN_BNDINT: - { - rtx res, rh1, rh2, lb1, lb2, ub1, ub2; - - if (!target - || GET_MODE (target) != BNDmode - || !register_operand (target, BNDmode)) - target = gen_reg_rtx (BNDmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - - res = assign_386_stack_local (BNDmode, SLOT_TEMP); - rh1 = adjust_address (res, Pmode, 0); - rh2 = adjust_address (res, Pmode, GET_MODE_SIZE (Pmode)); - - /* Put first bounds to temporaries. */ - lb1 = gen_reg_rtx (Pmode); - ub1 = gen_reg_rtx (Pmode); - if (MEM_P (op0)) - { - emit_move_insn (lb1, adjust_address (op0, Pmode, 0)); - emit_move_insn (ub1, adjust_address (op0, Pmode, - GET_MODE_SIZE (Pmode))); - } - else - { - emit_move_insn (res, op0); - emit_move_insn (lb1, rh1); - emit_move_insn (ub1, rh2); - } - - /* Put second bounds to temporaries. */ - lb2 = gen_reg_rtx (Pmode); - ub2 = gen_reg_rtx (Pmode); - if (MEM_P (op1)) - { - emit_move_insn (lb2, adjust_address (op1, Pmode, 0)); - emit_move_insn (ub2, adjust_address (op1, Pmode, - GET_MODE_SIZE (Pmode))); - } - else - { - emit_move_insn (res, op1); - emit_move_insn (lb2, rh1); - emit_move_insn (ub2, rh2); - } - - /* Compute LB. */ - ix86_emit_move_max (lb1, lb2); - emit_move_insn (rh1, lb1); - - /* Compute UB. UB is stored in 1's complement form. Therefore - we also use max here. */ - ix86_emit_move_max (ub1, ub2); - emit_move_insn (rh2, ub1); - - emit_move_insn (target, res); - - return target; - } - - case IX86_BUILTIN_SIZEOF: - { - tree name; - rtx symbol; - - if (!target - || GET_MODE (target) != Pmode - || !register_operand (target, Pmode)) - target = gen_reg_rtx (Pmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - gcc_assert (VAR_P (arg0)); - - name = DECL_ASSEMBLER_NAME (arg0); - symbol = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (name)); - - emit_insn (Pmode == SImode - ? gen_move_size_reloc_si (target, symbol) - : gen_move_size_reloc_di (target, symbol)); - - return target; - } - - case IX86_BUILTIN_BNDLOWER: - { - rtx mem, hmem; - - if (!target - || GET_MODE (target) != Pmode - || !register_operand (target, Pmode)) - target = gen_reg_rtx (Pmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - op0 = expand_normal (arg0); - - /* We need to move bounds to memory first. */ - if (MEM_P (op0)) - mem = op0; - else - { - mem = assign_386_stack_local (BNDmode, SLOT_TEMP); - emit_move_insn (mem, op0); - } - - /* Generate mem expression to access LB and load it. */ - hmem = adjust_address (mem, Pmode, 0); - emit_move_insn (target, hmem); - - return target; - } - - case IX86_BUILTIN_BNDUPPER: - { - rtx mem, hmem, res; - - if (!target - || GET_MODE (target) != Pmode - || !register_operand (target, Pmode)) - target = gen_reg_rtx (Pmode); - - arg0 = CALL_EXPR_ARG (exp, 0); - op0 = expand_normal (arg0); - - /* We need to move bounds to memory first. */ - if (MEM_P (op0)) - mem = op0; - else - { - mem = assign_386_stack_local (BNDmode, SLOT_TEMP); - emit_move_insn (mem, op0); - } - - /* Generate mem expression to access UB. */ - hmem = adjust_address (mem, Pmode, GET_MODE_SIZE (Pmode)); - - /* We need to inverse all bits of UB. */ - res = expand_simple_unop (Pmode, NOT, hmem, target, 1); - - if (res != target) - emit_move_insn (target, res); - - return target; - } - case IX86_BUILTIN_MASKMOVQ: case IX86_BUILTIN_MASKMOVDQU: icode = (fcode == IX86_BUILTIN_MASKMOVQ @@ -39449,199 +38777,6 @@ static tree ix86_get_builtin (enum ix86_builtins code) return NULL_TREE; } -/* Return function decl for target specific builtin - for given MPX builtin passed i FCODE. */ -static tree -ix86_builtin_mpx_function (unsigned fcode) -{ - switch (fcode) - { - case BUILT_IN_CHKP_BNDMK: - return ix86_builtins[IX86_BUILTIN_BNDMK]; - - case BUILT_IN_CHKP_BNDSTX: - return ix86_builtins[IX86_BUILTIN_BNDSTX]; - - case BUILT_IN_CHKP_BNDLDX: - return ix86_builtins[IX86_BUILTIN_BNDLDX]; - - case BUILT_IN_CHKP_BNDCL: - return ix86_builtins[IX86_BUILTIN_BNDCL]; - - case BUILT_IN_CHKP_BNDCU: - return ix86_builtins[IX86_BUILTIN_BNDCU]; - - case BUILT_IN_CHKP_BNDRET: - return ix86_builtins[IX86_BUILTIN_BNDRET]; - - case BUILT_IN_CHKP_INTERSECT: - return ix86_builtins[IX86_BUILTIN_BNDINT]; - - case BUILT_IN_CHKP_NARROW: - return ix86_builtins[IX86_BUILTIN_BNDNARROW]; - - case BUILT_IN_CHKP_SIZEOF: - return ix86_builtins[IX86_BUILTIN_SIZEOF]; - - case BUILT_IN_CHKP_EXTRACT_LOWER: - return ix86_builtins[IX86_BUILTIN_BNDLOWER]; - - case BUILT_IN_CHKP_EXTRACT_UPPER: - return ix86_builtins[IX86_BUILTIN_BNDUPPER]; - - default: - return NULL_TREE; - } - - gcc_unreachable (); -} - -/* Helper function for ix86_load_bounds and ix86_store_bounds. - - Return an address to be used to load/store bounds for pointer - passed in SLOT. - - SLOT_NO is an integer constant holding number of a target - dependent special slot to be used in case SLOT is not a memory. - - SPECIAL_BASE is a pointer to be used as a base of fake address - to access special slots in Bounds Table. SPECIAL_BASE[-1], - SPECIAL_BASE[-2] etc. will be used as fake pointer locations. */ - -static rtx -ix86_get_arg_address_for_bt (rtx slot, rtx slot_no, rtx special_base) -{ - rtx addr = NULL; - - /* NULL slot means we pass bounds for pointer not passed to the - function at all. Register slot means we pass pointer in a - register. In both these cases bounds are passed via Bounds - Table. Since we do not have actual pointer stored in memory, - we have to use fake addresses to access Bounds Table. We - start with (special_base - sizeof (void*)) and decrease this - address by pointer size to get addresses for other slots. */ - if (!slot || REG_P (slot)) - { - gcc_assert (CONST_INT_P (slot_no)); - addr = plus_constant (Pmode, special_base, - -(INTVAL (slot_no) + 1) * GET_MODE_SIZE (Pmode)); - } - /* If pointer is passed in a memory then its address is used to - access Bounds Table. */ - else if (MEM_P (slot)) - { - addr = XEXP (slot, 0); - if (!register_operand (addr, Pmode)) - addr = copy_addr_to_reg (addr); - } - else - gcc_unreachable (); - - return addr; -} - -/* Expand pass uses this hook to load bounds for function parameter - PTR passed in SLOT in case its bounds are not passed in a register. - - If SLOT is a memory, then bounds are loaded as for regular pointer - loaded from memory. PTR may be NULL in case SLOT is a memory. - In such case value of PTR (if required) may be loaded from SLOT. - - If SLOT is NULL or a register then SLOT_NO is an integer constant - holding number of the target dependent special slot which should be - used to obtain bounds. - - Return loaded bounds. */ - -static rtx -ix86_load_bounds (rtx slot, rtx ptr, rtx slot_no) -{ - rtx reg = gen_reg_rtx (BNDmode); - rtx addr; - - /* Get address to be used to access Bounds Table. Special slots start - at the location of return address of the current function. */ - addr = ix86_get_arg_address_for_bt (slot, slot_no, arg_pointer_rtx); - - /* Load pointer value from a memory if we don't have it. */ - if (!ptr) - { - gcc_assert (MEM_P (slot)); - ptr = copy_addr_to_reg (slot); - } - - if (!register_operand (ptr, Pmode)) - ptr = ix86_zero_extend_to_Pmode (ptr); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_ldx (reg, addr, ptr) - : gen_bnd32_ldx (reg, addr, ptr)); - - return reg; -} - -/* Expand pass uses this hook to store BOUNDS for call argument PTR - passed in SLOT in case BOUNDS are not passed in a register. - - If SLOT is a memory, then BOUNDS are stored as for regular pointer - stored in memory. PTR may be NULL in case SLOT is a memory. - In such case value of PTR (if required) may be loaded from SLOT. - - If SLOT is NULL or a register then SLOT_NO is an integer constant - holding number of the target dependent special slot which should be - used to store BOUNDS. */ - -static void -ix86_store_bounds (rtx ptr, rtx slot, rtx bounds, rtx slot_no) -{ - rtx addr; - - /* Get address to be used to access Bounds Table. Special slots start - at the location of return address of a called function. */ - addr = ix86_get_arg_address_for_bt (slot, slot_no, stack_pointer_rtx); - - /* Load pointer value from a memory if we don't have it. */ - if (!ptr) - { - gcc_assert (MEM_P (slot)); - ptr = copy_addr_to_reg (slot); - } - - if (!register_operand (ptr, Pmode)) - ptr = ix86_zero_extend_to_Pmode (ptr); - - gcc_assert (POINTER_BOUNDS_MODE_P (GET_MODE (bounds))); - if (!register_operand (bounds, BNDmode)) - bounds = copy_to_mode_reg (BNDmode, bounds); - - emit_insn (BNDmode == BND64mode - ? gen_bnd64_stx (addr, ptr, bounds) - : gen_bnd32_stx (addr, ptr, bounds)); -} - -/* Load and return bounds returned by function in SLOT. */ - -static rtx -ix86_load_returned_bounds (rtx slot) -{ - rtx res; - - gcc_assert (REG_P (slot)); - res = gen_reg_rtx (BNDmode); - emit_move_insn (res, slot); - - return res; -} - -/* Store BOUNDS returned by function into SLOT. */ - -static void -ix86_store_returned_bounds (rtx slot, rtx bounds) -{ - gcc_assert (REG_P (slot)); - emit_move_insn (slot, bounds); -} - /* Returns a function decl for a vectorized version of the combined function with combined_fn code FN and the result vector type TYPE, or NULL_TREE if it is not available. */ @@ -40656,7 +39791,6 @@ ix86_class_likely_spilled_p (reg_class_t rclass) case SSE_FIRST_REG: case FP_TOP_REG: case FP_SECOND_REG: - case BND_REGS: return true; default: @@ -41066,8 +40200,6 @@ ix86_hard_regno_mode_ok (unsigned int regno, machine_mode mode) return (VALID_MASK_REG_MODE (mode) || (TARGET_AVX512BW && VALID_MASK_AVX512BW_MODE (mode))); - if (BND_REGNO_P (regno)) - return VALID_BND_REG_MODE (mode); if (SSE_REGNO_P (regno)) { /* We implement the move patterns for all vector modes into and @@ -42064,10 +41196,6 @@ x86_order_regs_for_local_alloc (void) for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++) reg_alloc_order [pos++] = i; - /* MPX bound registers. */ - for (i = FIRST_BND_REG; i <= LAST_BND_REG; i++) - reg_alloc_order [pos++] = i; - /* x87 registers. */ if (TARGET_SSE_MATH) for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) @@ -43088,7 +42216,6 @@ ix86_mitigate_rop (void) set_rop_modrm_reg_bits (FIRST_REX_SSE_REG, input_risky, output_risky); set_rop_modrm_reg_bits (FIRST_EXT_REX_SSE_REG, input_risky, output_risky); set_rop_modrm_reg_bits (FIRST_MASK_REG, input_risky, output_risky); - set_rop_modrm_reg_bits (FIRST_BND_REG, input_risky, output_risky); COPY_HARD_REG_SET (inout_risky, input_risky); IOR_HARD_REG_SET (inout_risky, output_risky); @@ -50416,27 +49543,6 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2) gen_rtx_MULT (mode, op1, op2)); } -/* Return 1 if control tansfer instruction INSN - should be encoded with bnd prefix. - If insn is NULL then return 1 when control - transfer instructions should be prefixed with - bnd by default for current function. */ - -bool -ix86_bnd_prefixed_insn_p (rtx insn) -{ - /* For call insns check special flag. */ - if (insn && CALL_P (insn)) - { - rtx call = get_call_rtx_from (insn); - if (call) - return CALL_EXPR_WITH_BOUNDS_P (call); - } - - /* All other insns are prefixed only if function is instrumented. */ - return chkp_function_instrumented_p (current_function_decl); -} - /* Return 1 if control tansfer instruction INSN should be encoded with notrack prefix. */ @@ -51744,73 +50850,6 @@ ix86_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) atomic_feraiseexcept_call); } -/* Return mode to be used for bounds or VOIDmode - if bounds are not supported. */ - -static machine_mode -ix86_mpx_bound_mode () -{ - /* Do not support pointer checker if MPX - is not enabled. */ - if (!TARGET_MPX) - { - if (flag_check_pointer_bounds) - warning (0, "Pointer Checker requires MPX support on this target." - " Use -mmpx options to enable MPX."); - return VOIDmode; - } - - return BNDmode; -} - -/* Return constant used to statically initialize constant bounds. - - This function is used to create special bound values. For now - only INIT bounds and NONE bounds are expected. More special - values may be added later. */ - -static tree -ix86_make_bounds_constant (HOST_WIDE_INT lb, HOST_WIDE_INT ub) -{ - tree low = lb ? build_minus_one_cst (pointer_sized_int_node) - : build_zero_cst (pointer_sized_int_node); - tree high = ub ? build_zero_cst (pointer_sized_int_node) - : build_minus_one_cst (pointer_sized_int_node); - - /* This function is supposed to be used to create INIT and - NONE bounds only. */ - gcc_assert ((lb == 0 && ub == -1) - || (lb == -1 && ub == 0)); - - return build_complex (NULL, low, high); -} - -/* Generate a list of statements STMTS to initialize pointer bounds - variable VAR with bounds LB and UB. Return the number of generated - statements. */ - -static int -ix86_initialize_bounds (tree var, tree lb, tree ub, tree *stmts) -{ - tree bnd_ptr = build_pointer_type (pointer_sized_int_node); - tree lhs, modify, var_p; - - ub = build1 (BIT_NOT_EXPR, pointer_sized_int_node, ub); - var_p = fold_convert (bnd_ptr, build_fold_addr_expr (var)); - - lhs = build1 (INDIRECT_REF, pointer_sized_int_node, var_p); - modify = build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, lb); - append_to_statement_list (modify, stmts); - - lhs = build1 (INDIRECT_REF, pointer_sized_int_node, - build2 (POINTER_PLUS_EXPR, bnd_ptr, var_p, - TYPE_SIZE_UNIT (pointer_sized_int_node))); - modify = build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, ub); - append_to_statement_list (modify, stmts); - - return 2; -} - #if !TARGET_MACHO && !TARGET_DLLIMPORT_DECL_ATTRIBUTES /* For i386, common symbol is local only for non-PIE binaries. For x86-64, common symbol is local only for non-PIE binaries or linker @@ -52790,33 +51829,6 @@ ix86_run_selftests (void) #undef TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS #define TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS true -#undef TARGET_LOAD_BOUNDS_FOR_ARG -#define TARGET_LOAD_BOUNDS_FOR_ARG ix86_load_bounds - -#undef TARGET_STORE_BOUNDS_FOR_ARG -#define TARGET_STORE_BOUNDS_FOR_ARG ix86_store_bounds - -#undef TARGET_LOAD_RETURNED_BOUNDS -#define TARGET_LOAD_RETURNED_BOUNDS ix86_load_returned_bounds - -#undef TARGET_STORE_RETURNED_BOUNDS -#define TARGET_STORE_RETURNED_BOUNDS ix86_store_returned_bounds - -#undef TARGET_CHKP_BOUND_MODE -#define TARGET_CHKP_BOUND_MODE ix86_mpx_bound_mode - -#undef TARGET_BUILTIN_CHKP_FUNCTION -#define TARGET_BUILTIN_CHKP_FUNCTION ix86_builtin_mpx_function - -#undef TARGET_CHKP_FUNCTION_VALUE_BOUNDS -#define TARGET_CHKP_FUNCTION_VALUE_BOUNDS ix86_function_value_bounds - -#undef TARGET_CHKP_MAKE_BOUNDS_CONSTANT -#define TARGET_CHKP_MAKE_BOUNDS_CONSTANT ix86_make_bounds_constant - -#undef TARGET_CHKP_INITIALIZE_BOUNDS -#define TARGET_CHKP_INITIALIZE_BOUNDS ix86_initialize_bounds - #undef TARGET_SETUP_INCOMING_VARARG_BOUNDS #define TARGET_SETUP_INCOMING_VARARG_BOUNDS ix86_setup_incoming_vararg_bounds diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 05255dc2c9e..049760efe34 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -175,8 +175,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_XSAVEOPT_P(x) TARGET_ISA_XSAVEOPT_P(x) #define TARGET_PREFETCHWT1 TARGET_ISA_PREFETCHWT1 #define TARGET_PREFETCHWT1_P(x) TARGET_ISA_PREFETCHWT1_P(x) -#define TARGET_MPX TARGET_ISA_MPX -#define TARGET_MPX_P(x) TARGET_ISA_MPX_P(x) #define TARGET_CLWB TARGET_ISA_CLWB #define TARGET_CLWB_P(x) TARGET_ISA_CLWB_P(x) #define TARGET_MWAITX TARGET_ISA_MWAITX @@ -1157,9 +1155,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define VALID_MASK_AVX512BW_MODE(MODE) ((MODE) == SImode || (MODE) == DImode) -#define VALID_BND_REG_MODE(MODE) \ - (TARGET_64BIT ? (MODE) == BND64mode : (MODE) == BND32mode) - #define VALID_DFP_MODE_P(MODE) \ ((MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode) @@ -1261,9 +1256,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define FIRST_MASK_REG MASK0_REG #define LAST_MASK_REG MASK7_REG -#define FIRST_BND_REG BND0_REG -#define LAST_BND_REG BND3_REG - /* Override this in other tm.h files to cope with various OS lossage requiring a frame pointer. */ #ifndef SUBTARGET_FRAME_POINTER_REQUIRED @@ -1345,7 +1337,6 @@ enum reg_class NO_REX_SSE_REGS, SSE_REGS, EVEX_SSE_REGS, - BND_REGS, ALL_SSE_REGS, MMX_REGS, FP_TOP_SSE_REGS, @@ -1408,7 +1399,6 @@ enum reg_class "NO_REX_SSE_REGS", \ "SSE_REGS", \ "EVEX_SSE_REGS", \ - "BND_REGS", \ "ALL_SSE_REGS", \ "MMX_REGS", \ "FP_TOP_SSE_REGS", \ @@ -1451,7 +1441,6 @@ enum reg_class { 0x1fe00000, 0x000000, 0x0 }, /* NO_REX_SSE_REGS */ \ { 0x1fe00000, 0x1fe000, 0x0 }, /* SSE_REGS */ \ { 0x0,0xffe00000, 0x1f }, /* EVEX_SSE_REGS */ \ - { 0x0, 0x0,0x1e000 }, /* BND_REGS */ \ { 0x1fe00000,0xffffe000, 0x1f }, /* ALL_SSE_REGS */ \ { 0xe0000000, 0x1f, 0x0 }, /* MMX_REGS */ \ { 0x1fe00100,0xffffe000, 0x1f }, /* FP_TOP_SSE_REG */ \ @@ -1526,9 +1515,6 @@ enum reg_class #define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X))) #define CC_REGNO_P(X) ((X) == FLAGS_REG || (X) == FPSR_REG) -#define BND_REG_P(X) (REG_P (X) && BND_REGNO_P (REGNO (X))) -#define BND_REGNO_P(N) IN_RANGE ((N), FIRST_BND_REG, LAST_BND_REG) - #define MOD4_SSE_REG_P(X) (REG_P (X) && MOD4_SSE_REGNO_P (REGNO (X))) #define MOD4_SSE_REGNO_P(N) ((N) == XMM0_REG \ || (N) == XMM4_REG \ @@ -1670,9 +1656,6 @@ typedef struct ix86_args { int float_in_sse; /* Set to 1 or 2 for 32bit targets if SFmode/DFmode arguments should be passed in SSE registers. Otherwise 0. */ - int bnd_regno; /* next available bnd register number */ - int bnds_in_bt; /* number of bounds expected in BT. */ - int force_bnd_pass; /* number of bounds expected for stdarg arg. */ int stdarg; /* Set to 1 if function is stdarg. */ enum calling_abi call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise MS_ABI for ms abi. */ @@ -1964,9 +1947,6 @@ do { \ #define STACK_SAVEAREA_MODE(LEVEL) \ ((LEVEL) == SAVE_NONLOCAL ? (TARGET_64BIT ? TImode : DImode) : Pmode) -/* Specify the machine mode that bounds have. */ -#define BNDmode (ix86_pmode == PMODE_DI ? BND64mode : BND32mode) - /* A C expression whose value is zero if pointers that need to be extended from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and greater then zero if they are zero-extended and less then zero if the @@ -2257,15 +2237,6 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; /* Default threshold for putting data in large sections with x86-64 medium memory model */ #define DEFAULT_LARGE_SECTION_THRESHOLD 65536 - -/* Adjust the length of the insn with the length of BND prefix. */ - -#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ -do { \ - if (NONDEBUG_INSN_P (INSN) && INSN_CODE (INSN) >= 0 \ - && get_attr_maybe_prefix_bnd (INSN)) \ - LENGTH += ix86_bnd_prefixed_insn_p (INSN); \ -} while (0) /* Which processor to tune code generation for. These must be in sync with processor_target_table in i386.c. */ diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index f1948468db5..eb77ef3c08f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -62,7 +62,7 @@ ;; ; -- print a semicolon (after prefixes due to bug in older gas). ;; ~ -- print "i" if TARGET_AVX2, "f" otherwise. ;; ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode -;; ! -- print MPX or NOTRACK prefix for jxx/call/ret instructions if required. +;; ! -- print NOTRACK prefix for jxx/call/ret instructions if required. (define_c_enum "unspec" [ ;; Relocation specifiers @@ -550,9 +550,6 @@ (const_int 0) (and (eq_attr "unit" "sse") (eq_attr "mode" "SF,DF")) (const_int 1) - (and (eq_attr "type" "ibr,call,callv") - (match_test "ix86_bnd_prefixed_insn_p (insn)")) - (const_int 1) ] (const_int 0))) @@ -596,9 +593,6 @@ ] (const_int 0))) -;; Set when BND opcode prefix may be used. -(define_attr "maybe_prefix_bnd" "" (const_int 0)) - ;; Prefix used: original, VEX or maybe VEX. (define_attr "prefix" "orig,vex,maybe_vex,evex,maybe_evex" (cond [(eq_attr "mode" "OI,V8SF,V4DF") @@ -1074,17 +1068,6 @@ (define_mode_iterator BND [(BND32 "!TARGET_LP64") (BND64 "TARGET_LP64")]) -;; Pointer mode corresponding to bound mode. -(define_mode_attr bnd_ptr [(BND32 "SI") (BND64 "DI")]) - -;; MPX check types -(define_int_iterator BNDCHECK [UNSPEC_BNDCL UNSPEC_BNDCU UNSPEC_BNDCN]) - -;; Check name -(define_int_attr bndcheck [(UNSPEC_BNDCL "cl") - (UNSPEC_BNDCU "cu") - (UNSPEC_BNDCN "cn")]) - ;; Instruction suffix for integer modes. (define_mode_attr imodesuffix [(QI "b") (HI "w") (SI "l") (DI "q")]) @@ -12601,8 +12584,7 @@ (lt (minus (match_dup 0) (pc)) (const_int 128))) (const_int 2) - (const_int 6))) - (set_attr "maybe_prefix_bnd" "1")]) + (const_int 6)))]) ;; In general it is not safe to assume too much about CCmode registers, ;; so simplify-rtx stops when it sees a second one. Under certain @@ -12670,8 +12652,7 @@ (lt (minus (match_dup 0) (pc)) (const_int 128))) (const_int 2) - (const_int 5))) - (set_attr "maybe_prefix_bnd" "1")]) + (const_int 5)))]) (define_expand "indirect_jump" [(set (pc) (match_operand 0 "indirect_branch_operand"))] @@ -12691,8 +12672,7 @@ != indirect_branch_keep)") (const_string "multi") (const_string "ibr"))) - (set_attr "length_immediate" "0") - (set_attr "maybe_prefix_bnd" "1")]) + (set_attr "length_immediate" "0")]) (define_expand "tablejump" [(parallel [(set (pc) (match_operand 0 "indirect_branch_operand")) @@ -12746,8 +12726,7 @@ != indirect_branch_keep)") (const_string "multi") (const_string "ibr"))) - (set_attr "length_immediate" "0") - (set_attr "maybe_prefix_bnd" "1")]) + (set_attr "length_immediate" "0")]) ;; Convert setcc + movzbl to xor + setcc if operands don't overlap. @@ -13444,8 +13423,7 @@ [(set_attr "length" "1") (set_attr "atom_unit" "jeu") (set_attr "length_immediate" "0") - (set_attr "modrm" "0") - (set_attr "maybe_prefix_bnd" "1")]) + (set_attr "modrm" "0")]) (define_insn "interrupt_return" [(simple_return) @@ -13480,8 +13458,7 @@ [(set_attr "length" "3") (set_attr "atom_unit" "jeu") (set_attr "length_immediate" "2") - (set_attr "modrm" "0") - (set_attr "maybe_prefix_bnd" "1")]) + (set_attr "modrm" "0")]) (define_expand "simple_return_indirect_internal" [(parallel @@ -13498,8 +13475,7 @@ != indirect_branch_keep)") (const_string "multi") (const_string "ibr"))) - (set_attr "length_immediate" "0") - (set_attr "maybe_prefix_bnd" "1")]) + (set_attr "length_immediate" "0")]) (define_insn "nop" [(const_int 0)] @@ -20844,161 +20820,6 @@ [(set_attr "length" "3") (set_attr "memory" "unknown")]) -;; MPX instructions - -(define_expand "_mk" - [(set (match_operand:BND 0 "register_operand") - (unspec:BND - [(mem: - (match_par_dup 3 - [(match_operand: 1 "register_operand") - (match_operand: 2 "address_mpx_no_base_operand")]))] - UNSPEC_BNDMK))] - "TARGET_MPX" -{ - operands[3] = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, operands[1], - operands[2]), - UNSPEC_BNDMK_ADDR); -}) - -(define_insn "*_mk" - [(set (match_operand:BND 0 "register_operand" "=w") - (unspec:BND - [(match_operator: 3 "bnd_mem_operator" - [(unspec: - [(match_operand: 1 "register_operand" "r") - (match_operand: 2 "address_mpx_no_base_operand" "Tb")] - UNSPEC_BNDMK_ADDR)])] - UNSPEC_BNDMK))] - "TARGET_MPX" - "bndmk\t{%3, %0|%0, %3}" - [(set_attr "type" "mpxmk")]) - -(define_expand "mov" - [(set (match_operand:BND 0 "general_operand") - (match_operand:BND 1 "general_operand"))] - "TARGET_MPX" - "ix86_expand_move (mode, operands); DONE;") - -(define_insn "*mov_internal_mpx" - [(set (match_operand:BND 0 "nonimmediate_operand" "=w,m") - (match_operand:BND 1 "general_operand" "wm,w"))] - "TARGET_MPX" - "bndmov\t{%1, %0|%0, %1}" - [(set_attr "type" "mpxmov")]) - -(define_expand "_" - [(parallel - [(unspec - [(match_operand:BND 0 "register_operand") - (match_operand: 1 "address_no_seg_operand")] BNDCHECK) - (set (match_dup 2) - (unspec:BLK [(match_dup 2)] UNSPEC_MPX_FENCE))])] - "TARGET_MPX" -{ - operands[2] = gen_rtx_MEM (BLKmode, operands[1]); - MEM_VOLATILE_P (operands[2]) = 1; -}) - -(define_insn "*_" - [(unspec - [(match_operand:BND 0 "register_operand" "w") - (match_operand: 1 "address_no_seg_operand" "Ts")] BNDCHECK) - (set (match_operand:BLK 2 "bnd_mem_operator") - (unspec:BLK [(match_dup 2)] UNSPEC_MPX_FENCE))] - "TARGET_MPX" - "bnd\t{%a1, %0|%0, %a1}" - [(set_attr "type" "mpxchk")]) - -(define_expand "_ldx" - [(parallel - [(set (match_operand:BND 0 "register_operand") - (unspec:BND - [(mem: - (match_par_dup 3 - [(match_operand: 1 "address_mpx_no_index_operand") - (match_operand: 2 "register_operand")]))] - UNSPEC_BNDLDX)) - (use (mem:BLK (match_dup 1)))])] - "TARGET_MPX" -{ - /* Avoid registers which cannot be used as index. */ - if (!index_register_operand (operands[2], Pmode)) - operands[2] = copy_addr_to_reg (operands[2]); - - operands[3] = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, operands[1], - operands[2]), - UNSPEC_BNDLDX_ADDR); -}) - -(define_insn "*_ldx" - [(set (match_operand:BND 0 "register_operand" "=w") - (unspec:BND - [(match_operator: 3 "bnd_mem_operator" - [(unspec: - [(match_operand: 1 "address_mpx_no_index_operand" "Ti") - (match_operand: 2 "register_operand" "l")] - UNSPEC_BNDLDX_ADDR)])] - UNSPEC_BNDLDX)) - (use (mem:BLK (match_dup 1)))] - "TARGET_MPX" - "bndldx\t{%3, %0|%0, %3}" - [(set_attr "type" "mpxld")]) - -(define_expand "_stx" - [(parallel - [(unspec - [(mem: - (match_par_dup 3 - [(match_operand: 0 "address_mpx_no_index_operand") - (match_operand: 1 "register_operand")])) - (match_operand:BND 2 "register_operand")] - UNSPEC_BNDSTX) - (set (match_dup 4) - (unspec:BLK [(match_dup 4)] UNSPEC_MPX_FENCE))])] - "TARGET_MPX" -{ - /* Avoid registers which cannot be used as index. */ - if (!index_register_operand (operands[1], Pmode)) - operands[1] = copy_addr_to_reg (operands[1]); - - operands[3] = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, operands[0], - operands[1]), - UNSPEC_BNDLDX_ADDR); - operands[4] = gen_rtx_MEM (BLKmode, operands[0]); - MEM_VOLATILE_P (operands[4]) = 1; -}) - -(define_insn "*_stx" - [(unspec - [(match_operator: 3 "bnd_mem_operator" - [(unspec: - [(match_operand: 0 "address_mpx_no_index_operand" "Ti") - (match_operand: 1 "register_operand" "l")] - UNSPEC_BNDLDX_ADDR)]) - (match_operand:BND 2 "register_operand" "w")] - UNSPEC_BNDSTX) - (set (match_operand:BLK 4 "bnd_mem_operator") - (unspec:BLK [(match_dup 4)] UNSPEC_MPX_FENCE))] - "TARGET_MPX" - "bndstx\t{%2, %3|%3, %2}" - [(set_attr "type" "mpxst")]) - -(define_insn "move_size_reloc_" - [(set (match_operand:SWI48 0 "register_operand" "=r") - (unspec:SWI48 - [(match_operand:SWI48 1 "symbol_operand")] - UNSPEC_SIZEOF))] - "TARGET_MPX" -{ - if (x86_64_immediate_size_operand (operands[1], VOIDmode)) - return "mov{l}\t{%1@SIZE, %k0|%k0, %1@SIZE}"; - else - return "movabs{q}\t{%1@SIZE, %0|%0, %1@SIZE}"; -} - [(set_attr "type" "imov") - (set_attr "mode" "")]) - ;; RDPKRU and WRPKRU (define_expand "rdpkru" diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 58d097371d8..01a0385dfa4 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -951,8 +951,8 @@ Target Report Mask(ISA_RTM) Var(ix86_isa_flags) Save Support RTM built-in functions and code generation. mmpx -Target Report Mask(ISA_MPX) Var(ix86_isa_flags2) Save -Support MPX code generation. +Target Report +Deprecated in GCC 9. This switch has no effect. mmwaitx Target Report Mask(ISA_MWAITX) Var(ix86_isa_flags2) Save diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h index d877387021b..3eeb66c1618 100644 --- a/gcc/config/i386/linux-common.h +++ b/gcc/config/i386/linux-common.h @@ -54,31 +54,6 @@ along with GCC; see the file COPYING3. If not see GNU_USER_TARGET_MATHFILE_SPEC " " \ ANDROID_ENDFILE_SPEC) -#ifndef LIBMPX_LIBS -#define LIBMPX_LIBS "\ - %:include(libmpx.spec)%(link_libmpx)" -#endif - -#ifndef LINK_MPX -#if defined (HAVE_LD_BNDPLT_SUPPORT) -#define LINK_MPX "-z bndplt " -#else -#define LINK_MPX \ - "%nGCC was configured with a linker with no '-z bndplt' support. " \ - "It significantly reduces MPX coverage for dynamic codes. " \ - "It is strongly recommended to use GCC properly configured for MPX." -#endif -#endif - -#ifndef MPX_SPEC -#ifdef SPEC_64 -#define MPX_SPEC "\ - %{mmpx:%{fcheck-pointer-bounds:%{!static:%{" SPEC_64 ":" LINK_MPX "}}}}" -#else -#define MPX_SPEC "" -#endif -#endif - #ifdef HAVE_LD_PUSHPOPSTATE_SUPPORT #define MPX_LD_AS_NEEDED_GUARD_PUSH "--push-state --no-as-needed" #define MPX_LD_AS_NEEDED_GUARD_POP "--pop-state" @@ -87,41 +62,6 @@ along with GCC; see the file COPYING3. If not see #define MPX_LD_AS_NEEDED_GUARD_POP "" #endif -#ifndef LIBMPX_SPEC -#if defined(HAVE_LD_STATIC_DYNAMIC) -#define LIBMPX_SPEC "\ -%{mmpx:%{fcheck-pointer-bounds:\ - %{static:--whole-archive -lmpx --no-whole-archive" LIBMPX_LIBS "}\ - %{!static:%{static-libmpx:" LD_STATIC_OPTION " --whole-archive}\ - %{!static-libmpx:" MPX_LD_AS_NEEDED_GUARD_PUSH "} -lmpx \ - %{!static-libmpx:" MPX_LD_AS_NEEDED_GUARD_POP "} \ - %{static-libmpx:--no-whole-archive " LD_DYNAMIC_OPTION \ - LIBMPX_LIBS "}}}}" -#else -#define LIBMPX_SPEC "\ -%{mmpx:%{fcheck-pointer-bounds:-lmpx" LIBMPX_LIBS "}}" -#endif -#endif - -#ifndef LIBMPXWRAPPERS_SPEC -#if defined(HAVE_LD_STATIC_DYNAMIC) -#define LIBMPXWRAPPERS_SPEC "\ -%{mmpx:%{fcheck-pointer-bounds:%{!fno-chkp-use-wrappers:\ - %{static:-lmpxwrappers}\ - %{!static:%{static-libmpxwrappers:" LD_STATIC_OPTION "}\ - -lmpxwrappers %{static-libmpxwrappers: "\ - LD_DYNAMIC_OPTION "}}}}}" -#else -#define LIBMPXWRAPPERS_SPEC "\ -%{mmpx:%{fcheck-pointer-bounds:{!fno-chkp-use-wrappers:-lmpxwrappers}}}" -#endif -#endif - -#ifndef CHKP_SPEC -#define CHKP_SPEC "\ -%{!nostdlib:%{!nodefaultlibs:" LIBMPX_SPEC LIBMPXWRAPPERS_SPEC "}}" MPX_SPEC -#endif - extern void file_end_indicate_exec_stack_and_cet (void); #undef TARGET_ASM_FILE_END diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index f6cdc86fc5f..babaf1d9433 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -1132,68 +1132,6 @@ return true; }) -;; Return true if op is valid MPX address operand without base -(define_predicate "address_mpx_no_base_operand" - (match_test "address_operand (op, VOIDmode)") -{ - struct ix86_address parts; - int ok; - - ok = ix86_decompose_address (op, &parts); - gcc_assert (ok); - - if (parts.index && parts.base) - return false; - - if (parts.seg != ADDR_SPACE_GENERIC) - return false; - - /* Do not support (%rip). */ - if (parts.disp && flag_pic && TARGET_64BIT - && SYMBOLIC_CONST (parts.disp)) - { - if (GET_CODE (parts.disp) != CONST - || GET_CODE (XEXP (parts.disp, 0)) != PLUS - || GET_CODE (XEXP (XEXP (parts.disp, 0), 0)) != UNSPEC - || !CONST_INT_P (XEXP (XEXP (parts.disp, 0), 1)) - || (XINT (XEXP (XEXP (parts.disp, 0), 0), 1) != UNSPEC_DTPOFF - && XINT (XEXP (XEXP (parts.disp, 0), 0), 1) != UNSPEC_NTPOFF)) - return false; - } - - return true; -}) - -;; Return true if op is valid MPX address operand without index -(define_predicate "address_mpx_no_index_operand" - (match_test "address_operand (op, VOIDmode)") -{ - struct ix86_address parts; - int ok; - - ok = ix86_decompose_address (op, &parts); - gcc_assert (ok); - - if (parts.index) - return false; - - if (parts.seg != ADDR_SPACE_GENERIC) - return false; - - /* Do not support (%rip). */ - if (parts.disp && flag_pic && TARGET_64BIT - && SYMBOLIC_CONST (parts.disp) - && (GET_CODE (parts.disp) != CONST - || GET_CODE (XEXP (parts.disp, 0)) != PLUS - || GET_CODE (XEXP (XEXP (parts.disp, 0), 0)) != UNSPEC - || !CONST_INT_P (XEXP (XEXP (parts.disp, 0), 1)) - || (XINT (XEXP (XEXP (parts.disp, 0), 0), 1) != UNSPEC_DTPOFF - && XINT (XEXP (XEXP (parts.disp, 0), 0), 1) != UNSPEC_NTPOFF))) - return false; - - return true; -}) - (define_predicate "vsib_mem_operator" (match_code "mem")) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 81575369224..459b7c2806f 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2379,10 +2379,6 @@ dbxout_type (tree type, int full) dbxout_type (TREE_TYPE (type), 0); break; - case POINTER_BOUNDS_TYPE: - /* No debug info for pointer bounds type supported yet. */ - break; - default: /* A C++ function with deduced return type can have a TEMPLATE_TYPE_PARM named 'auto' in its type. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 3e6c98a554a..e0a84b8b3c5 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -84,7 +84,6 @@ extensions, accepted by GCC in C90 mode and in C++. * x86 specific memory model extensions for transactional memory:: x86 memory models. * Object Size Checking:: Built-in functions for limited buffer overflow checking. -* Pointer Bounds Checker builtins:: Built-in functions for Pointer Bounds Checker. * Other Builtins:: Other built-in functions. * Target Builtins:: Built-in functions specific to particular targets. * Target Format Checks:: Format checks specific to particular targets. @@ -2465,19 +2464,6 @@ declares that @code{my_alloc1} returns 16-byte aligned pointer and that @code{my_alloc2} returns a pointer whose value modulo 32 is equal to 8. -@item bnd_instrument -@cindex @code{bnd_instrument} function attribute -The @code{bnd_instrument} attribute on functions is used to inform the -compiler that the function should be instrumented when compiled -with the @option{-fchkp-instrument-marked-only} option. - -@item bnd_legacy -@cindex @code{bnd_legacy} function attribute -@cindex Pointer Bounds Checker attributes -The @code{bnd_legacy} attribute on functions is used to inform the -compiler that the function should not be instrumented when compiled -with the @option{-fcheck-pointer-bounds} option. - @item cold @cindex @code{cold} function attribute The @code{cold} attribute on functions is used to inform the compiler that @@ -5589,7 +5575,7 @@ caller-saved registers. That is, all registers are callee-saved. For example, this attribute can be used for a function called from an interrupt handler. The compiler generates proper function entry and exit sequences to save and restore any modified registers, except for -the EFLAGS register. Since GCC doesn't preserve MPX, SSE, MMX nor x87 +the EFLAGS register. Since GCC doesn't preserve SSE, MMX nor x87 states, the GCC option @option{-mgeneral-regs-only} should be used to compile functions with @code{no_caller_saved_registers} attribute. @@ -5603,7 +5589,7 @@ this attribute is present. The @code{IRET} instruction, instead of the @code{RET} instruction, is used to return from interrupt handlers. All registers, except for the EFLAGS register which is restored by the @code{IRET} instruction, are preserved by the compiler. Since GCC -doesn't preserve MPX, SSE, MMX nor x87 states, the GCC option +doesn't preserve SSE, MMX nor x87 states, the GCC option @option{-mgeneral-regs-only} should be used to compile interrupt and exception handlers. @@ -7004,38 +6990,6 @@ struct foo This warning can be disabled by @option{-Wno-if-not-aligned}. -@item bnd_variable_size -@cindex @code{bnd_variable_size} type attribute -@cindex Pointer Bounds Checker attributes -When applied to a structure field, this attribute tells Pointer -Bounds Checker that the size of this field should not be computed -using static type information. It may be used to mark variably-sized -static array fields placed at the end of a structure. - -@smallexample -struct S -@{ - int size; - char data[1]; -@} -S *p = (S *)malloc (sizeof(S) + 100); -p->data[10] = 0; //Bounds violation -@end smallexample - -@noindent -By using an attribute for the field we may avoid unwanted bound -violation checks: - -@smallexample -struct S -@{ - int size; - char data[1] __attribute__((bnd_variable_size)); -@} -S *p = (S *)malloc (sizeof(S) + 100); -p->data[10] = 0; //OK -@end smallexample - @item deprecated @itemx deprecated (@var{msg}) @cindex @code{deprecated} type attribute @@ -10924,182 +10878,6 @@ format string @var{fmt}. If the compiler is able to optimize them to @code{fputc} etc.@: functions, it does, otherwise the checking function is called and the @var{flag} argument passed to it. -@node Pointer Bounds Checker builtins -@section Pointer Bounds Checker Built-in Functions -@cindex Pointer Bounds Checker builtins -@findex __builtin___bnd_set_ptr_bounds -@findex __builtin___bnd_narrow_ptr_bounds -@findex __builtin___bnd_copy_ptr_bounds -@findex __builtin___bnd_init_ptr_bounds -@findex __builtin___bnd_null_ptr_bounds -@findex __builtin___bnd_store_ptr_bounds -@findex __builtin___bnd_chk_ptr_lbounds -@findex __builtin___bnd_chk_ptr_ubounds -@findex __builtin___bnd_chk_ptr_bounds -@findex __builtin___bnd_get_ptr_lbound -@findex __builtin___bnd_get_ptr_ubound - -GCC provides a set of built-in functions to control Pointer Bounds Checker -instrumentation. Note that all Pointer Bounds Checker builtins can be used -even if you compile with Pointer Bounds Checker off -(@option{-fno-check-pointer-bounds}). -The behavior may differ in such case as documented below. - -@deftypefn {Built-in Function} {void *} __builtin___bnd_set_ptr_bounds (const void *@var{q}, size_t @var{size}) - -This built-in function returns a new pointer with the value of @var{q}, and -associate it with the bounds [@var{q}, @var{q}+@var{size}-1]. With Pointer -Bounds Checker off, the built-in function just returns the first argument. - -@smallexample -extern void *__wrap_malloc (size_t n) -@{ - void *p = (void *)__real_malloc (n); - if (!p) return __builtin___bnd_null_ptr_bounds (p); - return __builtin___bnd_set_ptr_bounds (p, n); -@} -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} {void *} __builtin___bnd_narrow_ptr_bounds (const void *@var{p}, const void *@var{q}, size_t @var{size}) - -This built-in function returns a new pointer with the value of @var{p} -and associates it with the narrowed bounds formed by the intersection -of bounds associated with @var{q} and the bounds -[@var{p}, @var{p} + @var{size} - 1]. -With Pointer Bounds Checker off, the built-in function just returns the first -argument. - -@smallexample -void init_objects (object *objs, size_t size) -@{ - size_t i; - /* Initialize objects one-by-one passing pointers with bounds of - an object, not the full array of objects. */ - for (i = 0; i < size; i++) - init_object (__builtin___bnd_narrow_ptr_bounds (objs + i, objs, - sizeof(object))); -@} -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} {void *} __builtin___bnd_copy_ptr_bounds (const void *@var{q}, const void *@var{r}) - -This built-in function returns a new pointer with the value of @var{q}, -and associates it with the bounds already associated with pointer @var{r}. -With Pointer Bounds Checker off, the built-in function just returns the first -argument. - -@smallexample -/* Here is a way to get pointer to object's field but - still with the full object's bounds. */ -int *field_ptr = __builtin___bnd_copy_ptr_bounds (&objptr->int_field, - objptr); -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} {void *} __builtin___bnd_init_ptr_bounds (const void *@var{q}) - -This built-in function returns a new pointer with the value of @var{q}, and -associates it with INIT (allowing full memory access) bounds. With Pointer -Bounds Checker off, the built-in function just returns the first argument. - -@end deftypefn - -@deftypefn {Built-in Function} {void *} __builtin___bnd_null_ptr_bounds (const void *@var{q}) - -This built-in function returns a new pointer with the value of @var{q}, and -associates it with NULL (allowing no memory access) bounds. With Pointer -Bounds Checker off, the built-in function just returns the first argument. - -@end deftypefn - -@deftypefn {Built-in Function} void __builtin___bnd_store_ptr_bounds (const void **@var{ptr_addr}, const void *@var{ptr_val}) - -This built-in function stores the bounds associated with pointer @var{ptr_val} -and location @var{ptr_addr} into Bounds Table. This can be useful to propagate -bounds from legacy code without touching the associated pointer's memory when -pointers are copied as integers. With Pointer Bounds Checker off, the built-in -function call is ignored. - -@end deftypefn - -@deftypefn {Built-in Function} void __builtin___bnd_chk_ptr_lbounds (const void *@var{q}) - -This built-in function checks if the pointer @var{q} is within the lower -bound of its associated bounds. With Pointer Bounds Checker off, the built-in -function call is ignored. - -@smallexample -extern void *__wrap_memset (void *dst, int c, size_t len) -@{ - if (len > 0) - @{ - __builtin___bnd_chk_ptr_lbounds (dst); - __builtin___bnd_chk_ptr_ubounds ((char *)dst + len - 1); - __real_memset (dst, c, len); - @} - return dst; -@} -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} void __builtin___bnd_chk_ptr_ubounds (const void *@var{q}) - -This built-in function checks if the pointer @var{q} is within the upper -bound of its associated bounds. With Pointer Bounds Checker off, the built-in -function call is ignored. - -@end deftypefn - -@deftypefn {Built-in Function} void __builtin___bnd_chk_ptr_bounds (const void *@var{q}, size_t @var{size}) - -This built-in function checks if [@var{q}, @var{q} + @var{size} - 1] is within -the lower and upper bounds associated with @var{q}. With Pointer Bounds Checker -off, the built-in function call is ignored. - -@smallexample -extern void *__wrap_memcpy (void *dst, const void *src, size_t n) -@{ - if (n > 0) - @{ - __bnd_chk_ptr_bounds (dst, n); - __bnd_chk_ptr_bounds (src, n); - __real_memcpy (dst, src, n); - @} - return dst; -@} -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} {const void *} __builtin___bnd_get_ptr_lbound (const void *@var{q}) - -This built-in function returns the lower bound associated -with the pointer @var{q}, as a pointer value. -This is useful for debugging using @code{printf}. -With Pointer Bounds Checker off, the built-in function returns 0. - -@smallexample -void *lb = __builtin___bnd_get_ptr_lbound (q); -void *ub = __builtin___bnd_get_ptr_ubound (q); -printf ("q = %p lb(q) = %p ub(q) = %p", q, lb, ub); -@end smallexample - -@end deftypefn - -@deftypefn {Built-in Function} {const void *} __builtin___bnd_get_ptr_ubound (const void *@var{q}) - -This built-in function returns the upper bound (which is a pointer) associated -with the pointer @var{q}. With Pointer Bounds Checker off, -the built-in function returns -1. - -@end deftypefn - @node Other Builtins @section Other Built-in Functions Provided by GCC @cindex built-in functions diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 74cb9027dc2..79c47f4bb51 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -269,7 +269,7 @@ Objective-C and Objective-C++ Dialects}. -Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol -Wc++-compat -Wc++11-compat -Wc++14-compat @gol -Wcast-align -Wcast-align=strict -Wcast-function-type -Wcast-qual @gol --Wchar-subscripts -Wchkp -Wcatch-value -Wcatch-value=@var{n} @gol +-Wchar-subscripts -Wcatch-value -Wcatch-value=@var{n} @gol -Wclobbered -Wcomment -Wconditionally-supported @gol -Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol -Wdelete-incomplete @gol @@ -459,15 +459,6 @@ Objective-C and Objective-C++ Dialects}. -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol -fsanitize-undefined-trap-on-error -fbounds-check @gol --fcheck-pointer-bounds -fchkp-check-incomplete-type @gol --fchkp-first-field-has-own-bounds -fchkp-narrow-bounds @gol --fchkp-narrow-to-innermost-array -fchkp-optimize @gol --fchkp-use-fast-string-functions -fchkp-use-nochk-string-functions @gol --fchkp-use-static-bounds -fchkp-use-static-const-bounds @gol --fchkp-treat-zero-dynamic-size-as-infinite -fchkp-check-read @gol --fchkp-check-read -fchkp-check-write -fchkp-store-bounds @gol --fchkp-instrument-calls -fchkp-instrument-marked-only @gol --fchkp-use-wrappers -fchkp-flexible-struct-trailing-arrays@gol -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} @gol -fstack-protector -fstack-protector-all -fstack-protector-strong @gol -fstack-protector-explicit -fstack-check @gol @@ -508,7 +499,6 @@ Objective-C and Objective-C++ Dialects}. -nostartfiles -nodefaultlibs -nostdlib -pie -pthread -rdynamic @gol -s -static -static-pie -static-libgcc -static-libstdc++ @gol -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol --static-libmpx -static-libmpxwrappers @gol -shared -shared-libgcc -symbolic @gol -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol -u @var{symbol} -z @var{keyword}} @@ -1258,7 +1248,7 @@ See RS/6000 and PowerPC Options. -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma -mpconfig -mwbnoinvd @gol -mprefetchwt1 -mclflushopt -mxsavec -mxsaves @gol -msse4a -m3dnow -m3dnowa -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop @gol --mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp -mmpx @gol +-mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp @gol -mmwaitx -mclzero -mpku -mthreads -mgfni -mvaes -mwaitpkg @gol -mshstk -mforce-indirect-call -mavx512vbmi2 @gol -mvpclmulqdq -mavx512bitalg -mmovdiri -mmovdir64b -mavx512vpopcntdq @@ -4061,11 +4051,6 @@ of error, as programmers often forget that this type is signed on some machines. This warning is enabled by @option{-Wall}. -@item -Wchkp -@opindex Wchkp -Warn about an invalid memory access that is found by Pointer Bounds Checker -(@option{-fcheck-pointer-bounds}). - @item -Wno-coverage-mismatch @opindex Wno-coverage-mismatch Warn if feedback profiles do not match when using the @@ -11135,12 +11120,6 @@ If the size of a local variable in bytes is smaller or equal to this number, directly poison (or unpoison) shadow memory instead of using run-time callbacks. The default value is 256. -@item chkp-max-ctor-size -Static constructors generated by Pointer Bounds Checker may become very -large and significantly increase compile time at optimization level -@option{-O1} and higher. This parameter is a maximum number of statements -in a single generated constructor. Default value is 5000. - @item max-fsm-thread-path-insns Maximum number of instructions to copy when duplicating blocks on a finite state automaton jump thread path. The default is 100. @@ -11403,22 +11382,19 @@ more details. The run-time behavior can be influenced using the the available options are shown at startup of the instrumented program. See @url{https://github.com/google/sanitizers/wiki/AddressSanitizerFlags#run-time-flags} for a list of supported options. -The option cannot be combined with @option{-fsanitize=thread} -and/or @option{-fcheck-pointer-bounds}. +The option cannot be combined with @option{-fsanitize=thread}. @item -fsanitize=kernel-address @opindex fsanitize=kernel-address Enable AddressSanitizer for Linux kernel. See @uref{https://github.com/google/kasan/wiki} for more details. -The option cannot be combined with @option{-fcheck-pointer-bounds}. @item -fsanitize=pointer-compare @opindex fsanitize=pointer-compare Instrument comparison operation (<, <=, >, >=) with pointer operands. The option must be combined with either @option{-fsanitize=kernel-address} or @option{-fsanitize=address} -The option cannot be combined with @option{-fsanitize=thread} -and/or @option{-fcheck-pointer-bounds}. +The option cannot be combined with @option{-fsanitize=thread}. Note: By default the check is disabled at run time. To enable it, add @code{detect_invalid_pointer_pairs=2} to the environment variable @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects @@ -11429,8 +11405,7 @@ invalid operation only when both pointers are non-null. Instrument subtraction with pointer operands. The option must be combined with either @option{-fsanitize=kernel-address} or @option{-fsanitize=address} -The option cannot be combined with @option{-fsanitize=thread} -and/or @option{-fcheck-pointer-bounds}. +The option cannot be combined with @option{-fsanitize=thread}. Note: By default the check is disabled at run time. To enable it, add @code{detect_invalid_pointer_pairs=2} to the environment variable @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects @@ -11446,7 +11421,7 @@ environment variable; see @url{https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags} for a list of supported options. The option cannot be combined with @option{-fsanitize=address}, -@option{-fsanitize=leak} and/or @option{-fcheck-pointer-bounds}. +@option{-fsanitize=leak}. Note that sanitized atomic builtins cannot throw exceptions when operating on invalid memory addresses with non-call exceptions @@ -11539,15 +11514,13 @@ a++; This option enables instrumentation of array bounds. Various out of bounds accesses are detected. Flexible array members, flexible array member-like arrays, and initializers of variables with static storage are not instrumented. -The option cannot be combined with @option{-fcheck-pointer-bounds}. @item -fsanitize=bounds-strict @opindex fsanitize=bounds-strict This option enables strict instrumentation of array bounds. Most out of bounds accesses are detected, including flexible array members and flexible array member-like arrays. Initializers of variables with static storage are not -instrumented. The option cannot be combined -with @option{-fcheck-pointer-bounds}. +instrumented. @item -fsanitize=alignment @opindex fsanitize=alignment @@ -11721,171 +11694,6 @@ operand constant, @code{__sanitizer_cov_trace_cmpf} or @code{__sanitizer_cov_trace_cmpd} for float or double comparisons and @code{__sanitizer_cov_trace_switch} for switch statements. -@item -fbounds-check -@opindex fbounds-check -For front ends that support it, generate additional code to check that -indices used to access arrays are within the declared range. This is -currently only supported by the Fortran front end, where this option -defaults to false. - -@item -fcheck-pointer-bounds -@opindex fcheck-pointer-bounds -@opindex fno-check-pointer-bounds -@cindex Pointer Bounds Checker options -Enable Pointer Bounds Checker instrumentation. Each memory reference -is instrumented with checks of the pointer used for memory access against -bounds associated with that pointer. - -Currently there -is only an implementation for Intel MPX available, thus x86 GNU/Linux target -and @option{-mmpx} are required to enable this feature. -MPX-based instrumentation requires -a runtime library to enable MPX in hardware and handle bounds -violation signals. By default when @option{-fcheck-pointer-bounds} -and @option{-mmpx} options are used to link a program, the GCC driver -links against the @file{libmpx} and @file{libmpxwrappers} libraries. -Bounds checking on calls to dynamic libraries requires a linker -with @option{-z bndplt} support; if GCC was configured with a linker -without support for this option (including the Gold linker and older -versions of ld), a warning is given if you link with @option{-mmpx} -without also specifying @option{-static}, since the overall effectiveness -of the bounds checking protection is reduced. -See also @option{-static-libmpxwrappers}. - -MPX-based instrumentation -may be used for debugging and also may be included in production code -to increase program security. Depending on usage, you may -have different requirements for the runtime library. The current version -of the MPX runtime library is more oriented for use as a debugging -tool. MPX runtime library usage implies @option{-lpthread}. See -also @option{-static-libmpx}. The runtime library behavior can be -influenced using various @env{CHKP_RT_*} environment variables. See -@uref{https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler} -for more details. - -Generated instrumentation may be controlled by various -@option{-fchkp-*} options and by the @code{bnd_variable_size} -structure field attribute (@pxref{Type Attributes}) and -@code{bnd_legacy}, and @code{bnd_instrument} function attributes -(@pxref{Function Attributes}). GCC also provides a number of built-in -functions for controlling the Pointer Bounds Checker. @xref{Pointer -Bounds Checker builtins}, for more information. - -@item -fchkp-check-incomplete-type -@opindex fchkp-check-incomplete-type -@opindex fno-chkp-check-incomplete-type -Generate pointer bounds checks for variables with incomplete type. -Enabled by default. - -@item -fchkp-narrow-bounds -@opindex fchkp-narrow-bounds -@opindex fno-chkp-narrow-bounds -Controls bounds used by Pointer Bounds Checker for pointers to object -fields. If narrowing is enabled then field bounds are used. Otherwise -object bounds are used. See also @option{-fchkp-narrow-to-innermost-array} -and @option{-fchkp-first-field-has-own-bounds}. Enabled by default. - -@item -fchkp-first-field-has-own-bounds -@opindex fchkp-first-field-has-own-bounds -@opindex fno-chkp-first-field-has-own-bounds -Forces Pointer Bounds Checker to use narrowed bounds for the address of the -first field in the structure. By default a pointer to the first field has -the same bounds as a pointer to the whole structure. - -@item -fchkp-flexible-struct-trailing-arrays -@opindex fchkp-flexible-struct-trailing-arrays -@opindex fno-chkp-flexible-struct-trailing-arrays -Forces Pointer Bounds Checker to treat all trailing arrays in structures as -possibly flexible. By default only array fields with zero length or that are -marked with attribute bnd_variable_size are treated as flexible. - -@item -fchkp-narrow-to-innermost-array -@opindex fchkp-narrow-to-innermost-array -@opindex fno-chkp-narrow-to-innermost-array -Forces Pointer Bounds Checker to use bounds of the innermost arrays in -case of nested static array access. By default this option is disabled and -bounds of the outermost array are used. - -@item -fchkp-optimize -@opindex fchkp-optimize -@opindex fno-chkp-optimize -Enables Pointer Bounds Checker optimizations. Enabled by default at -optimization levels @option{-O}, @option{-O2}, @option{-O3}. - -@item -fchkp-use-fast-string-functions -@opindex fchkp-use-fast-string-functions -@opindex fno-chkp-use-fast-string-functions -Enables use of @code{*_nobnd} versions of string functions (not copying bounds) -by Pointer Bounds Checker. Disabled by default. - -@item -fchkp-use-nochk-string-functions -@opindex fchkp-use-nochk-string-functions -@opindex fno-chkp-use-nochk-string-functions -Enables use of @code{*_nochk} versions of string functions (not checking bounds) -by Pointer Bounds Checker. Disabled by default. - -@item -fchkp-use-static-bounds -@opindex fchkp-use-static-bounds -@opindex fno-chkp-use-static-bounds -Allow Pointer Bounds Checker to generate static bounds holding -bounds of static variables. Enabled by default. - -@item -fchkp-use-static-const-bounds -@opindex fchkp-use-static-const-bounds -@opindex fno-chkp-use-static-const-bounds -Use statically-initialized bounds for constant bounds instead of -generating them each time they are required. By default enabled when -@option{-fchkp-use-static-bounds} is enabled. - -@item -fchkp-treat-zero-dynamic-size-as-infinite -@opindex fchkp-treat-zero-dynamic-size-as-infinite -@opindex fno-chkp-treat-zero-dynamic-size-as-infinite -With this option, objects with incomplete type whose -dynamically-obtained size is zero are treated as having infinite size -instead by Pointer Bounds -Checker. This option may be helpful if a program is linked with a library -missing size information for some symbols. Disabled by default. - -@item -fchkp-check-read -@opindex fchkp-check-read -@opindex fno-chkp-check-read -Instructs Pointer Bounds Checker to generate checks for all read -accesses to memory. Enabled by default. - -@item -fchkp-check-write -@opindex fchkp-check-write -@opindex fno-chkp-check-write -Instructs Pointer Bounds Checker to generate checks for all write -accesses to memory. Enabled by default. - -@item -fchkp-store-bounds -@opindex fchkp-store-bounds -@opindex fno-chkp-store-bounds -Instructs Pointer Bounds Checker to generate bounds stores for -pointer writes. Enabled by default. - -@item -fchkp-instrument-calls -@opindex fchkp-instrument-calls -@opindex fno-chkp-instrument-calls -Instructs Pointer Bounds Checker to pass pointer bounds to calls. -Enabled by default. - -@item -fchkp-instrument-marked-only -@opindex fchkp-instrument-marked-only -@opindex fno-chkp-instrument-marked-only -Instructs Pointer Bounds Checker to instrument only functions -marked with the @code{bnd_instrument} attribute -(@pxref{Function Attributes}). Disabled by default. - -@item -fchkp-use-wrappers -@opindex fchkp-use-wrappers -@opindex fno-chkp-use-wrappers -Allows Pointer Bounds Checker to replace calls to built-in functions -with calls to wrapper functions. When @option{-fchkp-use-wrappers} -is used to link a program, the GCC driver automatically links -against @file{libmpxwrappers}. See also @option{-static-libmpxwrappers}. -Enabled by default. - @item -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} @opindex fcf-protection Enable code instrumentation of control-flow transfers to increase @@ -12590,27 +12398,6 @@ option is not used, then this links against the shared version of driver to link @file{libubsan} statically, without necessarily linking other libraries statically. -@item -static-libmpx -@opindex static-libmpx -When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are -used to link a program, the GCC driver automatically links against -@file{libmpx}. If @file{libmpx} is available as a shared library, -and the @option{-static} option is not used, then this links against -the shared version of @file{libmpx}. The @option{-static-libmpx} -option directs the GCC driver to link @file{libmpx} statically, -without necessarily linking other libraries statically. - -@item -static-libmpxwrappers -@opindex static-libmpxwrappers -When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are used -to link a program without also using @option{-fno-chkp-use-wrappers}, the -GCC driver automatically links against @file{libmpxwrappers}. If -@file{libmpxwrappers} is available as a shared library, and the -@option{-static} option is not used, then this links against the shared -version of @file{libmpxwrappers}. The @option{-static-libmpxwrappers} -option directs the GCC driver to link @file{libmpxwrappers} statically, -without necessarily linking other libraries statically. - @item -static-libstdc++ @opindex static-libstdc++ When the @command{g++} program is used to link a C++ program, it @@ -27387,9 +27174,6 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}. @itemx -mtbm @opindex mtbm @need 200 -@itemx -mmpx -@opindex mmpx -@need 200 @itemx -mmwaitx @opindex mmwaitx @need 200 @@ -27432,7 +27216,7 @@ These switches enable the use of instructions in the MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, AVX, AVX2, AVX512F, AVX512PF, AVX512ER, AVX512CD, SHA, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, SSE4A, FMA4, XOP, LWP, ABM, AVX512VL, AVX512BW, AVX512DQ, AVX512IFMA, AVX512VBMI, BMI, BMI2, VAES, WAITPKG, -FXSR, XSAVE, XSAVEOPT, LZCNT, RTM, MPX, MWAITX, PKU, IBT, SHSTK, AVX512VBMI2, +FXSR, XSAVE, XSAVEOPT, LZCNT, RTM, MWAITX, PKU, IBT, SHSTK, AVX512VBMI2, GFNI, VPCLMULQDQ, AVX512BITALG, MOVDIRI, MOVDIR64B, AVX512VPOPCNTDQ, CLDEMOTE, 3DNow!@: or enhanced 3DNow!@: extended instruction sets. Each has a corresponding @option{-mno-} option to disable use of these @@ -28018,9 +27802,8 @@ Note that @option{-mcmodel=large} is incompatible with not be reachable in the large code model. Note that @option{-mindirect-branch=thunk-extern} is incompatible with -@option{-fcf-protection=branch} and @option{-fcheck-pointer-bounds} -since the external thunk can not be modified to disable control-flow -check. +@option{-fcf-protection=branch} since the external thunk can not be modified +to disable control-flow check. @item -mfunction-return=@var{choice} @opindex -mfunction-return diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index be37619f340..a3ecb711eca 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -4189,12 +4189,6 @@ VSIB address operand. @item Ts Address operand without segment register. -@item Ti -MPX address operand without index. - -@item Tb -MPX address operand without base. - @end table @item Xstormy16---@file{config/stormy16/stormy16.h} diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 9d92ed1c3d3..1c5a80920f1 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5252,12 +5252,6 @@ This hook is used by expand pass to emit insn to store @var{bounds} returned by function call into @var{slot}. @end deftypefn -@deftypefn {Target Hook} rtx TARGET_CHKP_FUNCTION_VALUE_BOUNDS (const_tree @var{ret_type}, const_tree @var{fn_decl_or_type}, bool @var{outgoing}) -Define this to return an RTX representing the place where a function -returns bounds for returned pointers. Arguments meaning is similar to -@code{TARGET_FUNCTION_VALUE}. -@end deftypefn - @deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARG_BOUNDS (cumulative_args_t @var{args_so_far}, machine_mode @var{mode}, tree @var{type}, int *@var{pretend_args_size}, int @var{second_time}) Use it to store bounds for anonymous register arguments stored into the stack. Arguments meaning is similar to @@ -11417,93 +11411,6 @@ ignored. This function should return the result of the call to the built-in function. @end deftypefn -@deftypefn {Target Hook} tree TARGET_BUILTIN_CHKP_FUNCTION (unsigned @var{fcode}) -This hook allows target to redefine built-in functions used by -Pointer Bounds Checker for code instrumentation. Hook should return -fndecl of function implementing generic builtin whose code is -passed in @var{fcode}. Currently following built-in functions are -obtained using this hook: -@deftypefn {Built-in Function} __bounds_type __chkp_bndmk (const void *@var{lb}, size_t @var{size}) -Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used -by Pointer Bounds Checker to create bound values. @var{lb} holds low -bound of the resulting bounds. @var{size} holds size of created bounds. -@end deftypefn - -@deftypefn {Built-in Function} void __chkp_bndstx (const void *@var{ptr}, __bounds_type @var{b}, const void **@var{loc}) -Function code - @code{BUILT_IN_CHKP_BNDSTX}. This built-in function is used -by Pointer Bounds Checker to store bounds @var{b} for pointer @var{ptr} -when @var{ptr} is stored by address @var{loc}. -@end deftypefn - -@deftypefn {Built-in Function} __bounds_type __chkp_bndldx (const void **@var{loc}, const void *@var{ptr}) -Function code - @code{BUILT_IN_CHKP_BNDLDX}. This built-in function is used -by Pointer Bounds Checker to get bounds of pointer @var{ptr} loaded by -address @var{loc}. -@end deftypefn - -@deftypefn {Built-in Function} void __chkp_bndcl (const void *@var{ptr}, __bounds_type @var{b}) -Function code - @code{BUILT_IN_CHKP_BNDCL}. This built-in function is used -by Pointer Bounds Checker to perform check for pointer @var{ptr} against -lower bound of bounds @var{b}. -@end deftypefn - -@deftypefn {Built-in Function} void __chkp_bndcu (const void *@var{ptr}, __bounds_type @var{b}) -Function code - @code{BUILT_IN_CHKP_BNDCU}. This built-in function is used -by Pointer Bounds Checker to perform check for pointer @var{ptr} against -upper bound of bounds @var{b}. -@end deftypefn - -@deftypefn {Built-in Function} __bounds_type __chkp_bndret (void *@var{ptr}) -Function code - @code{BUILT_IN_CHKP_BNDRET}. This built-in function is used -by Pointer Bounds Checker to obtain bounds returned by a call statement. -@var{ptr} passed to built-in is @code{SSA_NAME} returned by the call. -@end deftypefn - -@deftypefn {Built-in Function} __bounds_type __chkp_intersect (__bounds_type @var{b1}, __bounds_type @var{b2}) -Function code - @code{BUILT_IN_CHKP_INTERSECT}. This built-in function -returns intersection of bounds @var{b1} and @var{b2}. -@end deftypefn - -@deftypefn {Built-in Function} __bounds_type __chkp_narrow (const void *@var{ptr}, __bounds_type @var{b}, size_t @var{s}) -Function code - @code{BUILT_IN_CHKP_NARROW}. This built-in function -returns intersection of bounds @var{b} and -[@var{ptr}, @var{ptr} + @var{s} - @code{1}]. -@end deftypefn - -@deftypefn {Built-in Function} size_t __chkp_sizeof (const void *@var{ptr}) -Function code - @code{BUILT_IN_CHKP_SIZEOF}. This built-in function -returns size of object referenced by @var{ptr}. @var{ptr} is always -@code{ADDR_EXPR} of @code{VAR_DECL}. This built-in is used by -Pointer Bounds Checker when bounds of object cannot be computed statically -(e.g. object has incomplete type). -@end deftypefn - -@deftypefn {Built-in Function} const void *__chkp_extract_lower (__bounds_type @var{b}) -Function code - @code{BUILT_IN_CHKP_EXTRACT_LOWER}. This built-in function -returns lower bound of bounds @var{b}. -@end deftypefn - -@deftypefn {Built-in Function} const void *__chkp_extract_upper (__bounds_type @var{b}) -Function code - @code{BUILT_IN_CHKP_EXTRACT_UPPER}. This built-in function -returns upper bound of bounds @var{b}. -@end deftypefn -@end deftypefn -@deftypefn {Target Hook} tree TARGET_CHKP_BOUND_TYPE (void) -Return type to be used for bounds -@end deftypefn -@deftypefn {Target Hook} machine_mode TARGET_CHKP_BOUND_MODE (void) -Return mode to be used for bounds. -@end deftypefn -@deftypefn {Target Hook} tree TARGET_CHKP_MAKE_BOUNDS_CONSTANT (HOST_WIDE_INT @var{lb}, HOST_WIDE_INT @var{ub}) -Return constant used to statically initialize constant bounds -with specified lower bound @var{lb} and upper bounds @var{ub}. -@end deftypefn -@deftypefn {Target Hook} int TARGET_CHKP_INITIALIZE_BOUNDS (tree @var{var}, tree @var{lb}, tree @var{ub}, tree *@var{stmts}) -Generate a list of statements @var{stmts} to initialize pointer -bounds variable @var{var} with bounds @var{lb} and @var{ub}. Return -the number of generated statements. -@end deftypefn - @deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist}) Select a replacement for a machine specific built-in function that was set up by @samp{TARGET_INIT_BUILTINS}. This is done diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 5732a2a4515..bf2c64e15db 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -3761,8 +3761,6 @@ These machine description macros help implement varargs: @hook TARGET_STORE_RETURNED_BOUNDS -@hook TARGET_CHKP_FUNCTION_VALUE_BOUNDS - @hook TARGET_SETUP_INCOMING_VARARG_BOUNDS @node Trampolines @@ -7866,12 +7864,6 @@ to by @var{ce_info}. @hook TARGET_EXPAND_BUILTIN -@hook TARGET_BUILTIN_CHKP_FUNCTION -@hook TARGET_CHKP_BOUND_TYPE -@hook TARGET_CHKP_BOUND_MODE -@hook TARGET_CHKP_MAKE_BOUNDS_CONSTANT -@hook TARGET_CHKP_INITIALIZE_BOUNDS - @hook TARGET_RESOLVE_OVERLOADED_BUILTIN @hook TARGET_FOLD_BUILTIN diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e3d24e86c15..a6b20b4912d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12918,7 +12918,6 @@ is_base_type (tree type) case FIXED_POINT_TYPE: case COMPLEX_TYPE: case BOOLEAN_TYPE: - case POINTER_BOUNDS_TYPE: return 1; case VOID_TYPE: @@ -22295,21 +22294,18 @@ gen_formal_types_die (tree function_or_method_type, dw_die_ref context_die) break; /* Output a (nameless) DIE to represent the formal parameter itself. */ - if (!POINTER_BOUNDS_TYPE_P (formal_type)) + parm_die = gen_formal_parameter_die (formal_type, NULL, + true /* Emit name attribute. */, + context_die); + if (TREE_CODE (function_or_method_type) == METHOD_TYPE + && link == first_parm_type) { - parm_die = gen_formal_parameter_die (formal_type, NULL, - true /* Emit name attribute. */, - context_die); - if (TREE_CODE (function_or_method_type) == METHOD_TYPE - && link == first_parm_type) - { - add_AT_flag (parm_die, DW_AT_artificial, 1); - if (dwarf_version >= 3 || !dwarf_strict) - add_AT_die_ref (context_die, DW_AT_object_pointer, parm_die); - } - else if (arg && DECL_ARTIFICIAL (arg)) - add_AT_flag (parm_die, DW_AT_artificial, 1); + add_AT_flag (parm_die, DW_AT_artificial, 1); + if (dwarf_version >= 3 || !dwarf_strict) + add_AT_die_ref (context_die, DW_AT_object_pointer, parm_die); } + else if (arg && DECL_ARTIFICIAL (arg)) + add_AT_flag (parm_die, DW_AT_artificial, 1); link = TREE_CHAIN (link); if (arg) @@ -23176,7 +23172,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) gen_formal_parameter_pack_die (generic_decl_parm, parm, subr_die, &parm); - else if (parm && !POINTER_BOUNDS_P (parm)) + else if (parm) { dw_die_ref parm_die = gen_decl_die (parm, NULL, NULL, subr_die); @@ -25561,7 +25557,6 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, case FIXED_POINT_TYPE: case COMPLEX_TYPE: case BOOLEAN_TYPE: - case POINTER_BOUNDS_TYPE: /* No DIEs needed for fundamental types. */ break; @@ -26141,12 +26136,6 @@ gen_decl_die (tree decl, tree origin, struct vlr_context *ctx, if (DECL_P (decl_or_origin) && DECL_IGNORED_P (decl_or_origin)) return NULL; - /* Ignore pointer bounds decls. */ - if (DECL_P (decl_or_origin) - && TREE_TYPE (decl_or_origin) - && POINTER_BOUNDS_P (decl_or_origin)) - return NULL; - switch (TREE_CODE (decl_or_origin)) { case ERROR_MARK: @@ -26480,7 +26469,7 @@ dwarf2out_late_global_decl (tree decl) { /* Fill-in any location information we were unable to determine on the first pass. */ - if (VAR_P (decl) && !POINTER_BOUNDS_P (decl)) + if (VAR_P (decl)) { dw_die_ref die = lookup_decl_die (decl); diff --git a/gcc/expr.c b/gcc/expr.c index f15037adfb6..89430246d12 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -58,8 +58,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-outof-ssa.h" #include "tree-ssa-address.h" #include "builtins.h" -#include "tree-chkp.h" -#include "rtl-chkp.h" #include "ccmp.h" #include "rtx-vector-builder.h" @@ -5283,14 +5281,10 @@ expand_assignment (tree to, tree from, bool nontemporal) || TREE_CODE (to) == SSA_NAME)) { rtx value; - rtx bounds; push_temp_slots (); value = expand_normal (from); - /* Split value and bounds to store them separately. */ - chkp_split_slot (value, &value, &bounds); - if (to_rtx == 0) to_rtx = expand_expr (to, NULL_RTX, VOIDmode, EXPAND_WRITE); @@ -5325,14 +5319,6 @@ expand_assignment (tree to, tree from, bool nontemporal) emit_move_insn (to_rtx, value); } - /* Store bounds if required. */ - if (bounds - && (BOUNDED_P (to) || chkp_type_has_pointer (TREE_TYPE (to)))) - { - gcc_assert (MEM_P (to_rtx)); - chkp_emit_bounds_store (bounds, value, to_rtx); - } - preserve_temp_slots (to_rtx); pop_temp_slots (); return; @@ -5403,7 +5389,7 @@ expand_assignment (tree to, tree from, bool nontemporal) /* Compute FROM and store the value in the rtx we got. */ push_temp_slots (); - result = store_expr_with_bounds (from, to_rtx, 0, nontemporal, false, to); + result = store_expr (from, to_rtx, 0, nontemporal, false); preserve_temp_slots (result); pop_temp_slots (); return; @@ -5442,14 +5428,11 @@ emit_storent_insn (rtx to, rtx from) If NONTEMPORAL is true, try using a nontemporal store instruction. - If REVERSE is true, the store is to be done in reverse order. - - If BTARGET is not NULL then computed bounds of EXP are - associated with BTARGET. */ + If REVERSE is true, the store is to be done in reverse order. */ rtx -store_expr_with_bounds (tree exp, rtx target, int call_param_p, - bool nontemporal, bool reverse, tree btarget) +store_expr (tree exp, rtx target, int call_param_p, + bool nontemporal, bool reverse) { rtx temp; rtx alt_rtl = NULL_RTX; @@ -5470,9 +5453,8 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, part. */ expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode, call_param_p ? EXPAND_STACK_PARM : EXPAND_NORMAL); - return store_expr_with_bounds (TREE_OPERAND (exp, 1), target, - call_param_p, nontemporal, reverse, - btarget); + return store_expr (TREE_OPERAND (exp, 1), target, + call_param_p, nontemporal, reverse); } else if (TREE_CODE (exp) == COND_EXPR && GET_MODE (target) == BLKmode) { @@ -5487,13 +5469,13 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, NO_DEFER_POP; jumpifnot (TREE_OPERAND (exp, 0), lab1, profile_probability::uninitialized ()); - store_expr_with_bounds (TREE_OPERAND (exp, 1), target, call_param_p, - nontemporal, reverse, btarget); + store_expr (TREE_OPERAND (exp, 1), target, call_param_p, + nontemporal, reverse); emit_jump_insn (targetm.gen_jump (lab2)); emit_barrier (); emit_label (lab1); - store_expr_with_bounds (TREE_OPERAND (exp, 2), target, call_param_p, - nontemporal, reverse, btarget); + store_expr (TREE_OPERAND (exp, 2), target, call_param_p, + nontemporal, reverse); emit_label (lab2); OK_DEFER_POP; @@ -5546,18 +5528,6 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, temp = expand_expr (exp, inner_target, VOIDmode, call_param_p ? EXPAND_STACK_PARM : EXPAND_NORMAL); - /* Handle bounds returned by call. */ - if (TREE_CODE (exp) == CALL_EXPR) - { - rtx bounds; - chkp_split_slot (temp, &temp, &bounds); - if (bounds && btarget) - { - gcc_assert (TREE_CODE (btarget) == SSA_NAME); - rtx tmp = targetm.calls.load_returned_bounds (bounds); - chkp_set_rtl_bounds (btarget, tmp); - } - } /* If TEMP is a VOIDmode constant, use convert_modes to make sure that we properly convert it. */ @@ -5639,19 +5609,6 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, (call_param_p ? EXPAND_STACK_PARM : EXPAND_NORMAL), &alt_rtl, false); - - /* Handle bounds returned by call. */ - if (TREE_CODE (exp) == CALL_EXPR) - { - rtx bounds; - chkp_split_slot (temp, &temp, &bounds); - if (bounds && btarget) - { - gcc_assert (TREE_CODE (btarget) == SSA_NAME); - rtx tmp = targetm.calls.load_returned_bounds (bounds); - chkp_set_rtl_bounds (btarget, tmp); - } - } } /* If TEMP is a VOIDmode constant and the mode of the type of EXP is not @@ -5831,15 +5788,6 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, return NULL_RTX; } - -/* Same as store_expr_with_bounds but ignoring bounds of EXP. */ -rtx -store_expr (tree exp, rtx target, int call_param_p, bool nontemporal, - bool reverse) -{ - return store_expr_with_bounds (exp, target, call_param_p, nontemporal, - reverse, NULL); -} /* Return true if field F of structure TYPE is a flexible array. */ @@ -10954,11 +10902,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, if (fndecl && DECL_BUILT_IN (fndecl)) { gcc_assert (DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_FRONTEND); - if (CALL_WITH_BOUNDS_P (exp)) - return expand_builtin_with_bounds (exp, target, subtarget, - tmode, ignore); - else - return expand_builtin (exp, target, subtarget, tmode, ignore); + return expand_builtin (exp, target, subtarget, tmode, ignore); } } return expand_call (exp, target, ignore); diff --git a/gcc/expr.h b/gcc/expr.h index 52a26e7c2a3..cf047d49e2e 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -254,7 +254,6 @@ extern void expand_assignment (tree, tree, bool); and storing the value into TARGET. If SUGGEST_REG is nonzero, copy the value through a register and return that register, if that is possible. */ -extern rtx store_expr_with_bounds (tree, rtx, int, bool, bool, tree); extern rtx store_expr (tree, rtx, int, bool, bool); /* Given an rtx that may include add and multiply operations, diff --git a/gcc/function.c b/gcc/function.c index 6b9fd597d41..47232a27611 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -73,8 +73,6 @@ along with GCC; see the file COPYING3. If not see #include "shrink-wrap.h" #include "toplev.h" #include "rtl-iter.h" -#include "tree-chkp.h" -#include "rtl-chkp.h" #include "tree-dfa.h" #include "tree-ssa.h" #include "stringpool.h" @@ -2201,14 +2199,6 @@ use_register_for_decl (const_tree decl) return false; } - /* Decl is implicitly addressible by bound stores and loads - if it is an aggregate holding bounds. */ - if (chkp_function_instrumented_p (current_function_decl) - && TREE_TYPE (decl) - && !BOUNDED_P (decl) - && chkp_type_has_pointer (TREE_TYPE (decl))) - return false; - /* Only register-like things go in registers. */ if (DECL_MODE (decl) == BLKmode) return false; @@ -2280,15 +2270,6 @@ struct assign_parm_data_one BOOL_BITFIELD loaded_in_reg : 1; }; -struct bounds_parm_data -{ - assign_parm_data_one parm_data; - tree bounds_parm; - tree ptr_parm; - rtx ptr_entry; - int bound_no; -}; - /* A subroutine of assign_parms. Initialize ALL. */ static void @@ -2403,23 +2384,6 @@ assign_parms_augmented_arg_list (struct assign_parm_data_all *all) fnargs.safe_insert (0, decl); all->function_result_decl = decl; - - /* If function is instrumented then bounds of the - passed structure address is the second argument. */ - if (chkp_function_instrumented_p (fndecl)) - { - decl = build_decl (DECL_SOURCE_LOCATION (fndecl), - PARM_DECL, get_identifier (".result_bnd"), - pointer_bounds_type_node); - DECL_ARG_TYPE (decl) = pointer_bounds_type_node; - DECL_ARTIFICIAL (decl) = 1; - DECL_NAMELESS (decl) = 1; - TREE_CONSTANT (decl) = 1; - - DECL_CHAIN (decl) = DECL_CHAIN (all->orig_fnargs); - DECL_CHAIN (all->orig_fnargs) = decl; - fnargs.safe_insert (1, decl); - } } /* If the target wants to split complex arguments into scalars, do so. */ @@ -2563,7 +2527,7 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, it came in a register so that REG_PARM_STACK_SPACE isn't skipped. In this case, we call FUNCTION_ARG with NAMED set to 1 instead of 0 as it was the previous time. */ - in_regs = (entry_parm != 0) || POINTER_BOUNDS_TYPE_P (data->passed_type); + in_regs = (entry_parm != 0); #ifdef STACK_PARMS_IN_REG_PARM_AREA in_regs = true; #endif @@ -2652,12 +2616,8 @@ static bool assign_parm_is_stack_parm (struct assign_parm_data_all *all, struct assign_parm_data_one *data) { - /* Bounds are never passed on the stack to keep compatibility - with not instrumented code. */ - if (POINTER_BOUNDS_TYPE_P (data->passed_type)) - return false; /* Trivially true if we've no incoming register. */ - else if (data->entry_parm == NULL) + if (data->entry_parm == NULL) ; /* Also true if we're partially in registers and partially not, since we've arranged to drop the entire argument on the stack. */ @@ -3572,121 +3532,6 @@ assign_parms_unsplit_complex (struct assign_parm_data_all *all, } } -/* Load bounds of PARM from bounds table. */ -static void -assign_parm_load_bounds (struct assign_parm_data_one *data, - tree parm, - rtx entry, - unsigned bound_no) -{ - bitmap_iterator bi; - unsigned i, offs = 0; - int bnd_no = -1; - rtx slot = NULL, ptr = NULL; - - if (parm) - { - bitmap slots; - bitmap_obstack_initialize (NULL); - slots = BITMAP_ALLOC (NULL); - chkp_find_bound_slots (TREE_TYPE (parm), slots); - EXECUTE_IF_SET_IN_BITMAP (slots, 0, i, bi) - { - if (bound_no) - bound_no--; - else - { - bnd_no = i; - break; - } - } - BITMAP_FREE (slots); - bitmap_obstack_release (NULL); - } - - /* We may have bounds not associated with any pointer. */ - if (bnd_no != -1) - offs = bnd_no * POINTER_SIZE / BITS_PER_UNIT; - - /* Find associated pointer. */ - if (bnd_no == -1) - { - /* If bounds are not associated with any bounds, - then it is passed in a register or special slot. */ - gcc_assert (data->entry_parm); - ptr = const0_rtx; - } - else if (MEM_P (entry)) - slot = adjust_address (entry, Pmode, offs); - else if (REG_P (entry)) - ptr = gen_rtx_REG (Pmode, REGNO (entry) + bnd_no); - else if (GET_CODE (entry) == PARALLEL) - ptr = chkp_get_value_with_offs (entry, GEN_INT (offs)); - else - gcc_unreachable (); - data->entry_parm = targetm.calls.load_bounds_for_arg (slot, ptr, - data->entry_parm); -} - -/* Assign RTL expressions to the function's bounds parameters BNDARGS. */ - -static void -assign_bounds (vec &bndargs, - struct assign_parm_data_all &all, - bool assign_regs, bool assign_special, - bool assign_bt) -{ - unsigned i, pass; - bounds_parm_data *pbdata; - - if (!bndargs.exists ()) - return; - - /* We make few passes to store input bounds. Firstly handle bounds - passed in registers. After that we load bounds passed in special - slots. Finally we load bounds from Bounds Table. */ - for (pass = 0; pass < 3; pass++) - FOR_EACH_VEC_ELT (bndargs, i, pbdata) - { - /* Pass 0 => regs only. */ - if (pass == 0 - && (!assign_regs - ||(!pbdata->parm_data.entry_parm - || GET_CODE (pbdata->parm_data.entry_parm) != REG))) - continue; - /* Pass 1 => slots only. */ - else if (pass == 1 - && (!assign_special - || (!pbdata->parm_data.entry_parm - || GET_CODE (pbdata->parm_data.entry_parm) == REG))) - continue; - /* Pass 2 => BT only. */ - else if (pass == 2 - && (!assign_bt - || pbdata->parm_data.entry_parm)) - continue; - - if (!pbdata->parm_data.entry_parm - || GET_CODE (pbdata->parm_data.entry_parm) != REG) - assign_parm_load_bounds (&pbdata->parm_data, pbdata->ptr_parm, - pbdata->ptr_entry, pbdata->bound_no); - - set_decl_incoming_rtl (pbdata->bounds_parm, - pbdata->parm_data.entry_parm, false); - - if (assign_parm_setup_block_p (&pbdata->parm_data)) - assign_parm_setup_block (&all, pbdata->bounds_parm, - &pbdata->parm_data); - else if (pbdata->parm_data.passed_pointer - || use_register_for_decl (pbdata->bounds_parm)) - assign_parm_setup_reg (&all, pbdata->bounds_parm, - &pbdata->parm_data); - else - assign_parm_setup_stack (&all, pbdata->bounds_parm, - &pbdata->parm_data); - } -} - /* Assign RTL expressions to the function's parameters. This may involve copying them into registers and using those registers as the DECL_RTL. */ @@ -3696,11 +3541,7 @@ assign_parms (tree fndecl) struct assign_parm_data_all all; tree parm; vec fnargs; - unsigned i, bound_no = 0; - tree last_arg = NULL; - rtx last_arg_entry = NULL; - vec bndargs = vNULL; - bounds_parm_data bdata; + unsigned i; crtl->args.internal_arg_pointer = targetm.calls.internal_arg_pointer (); @@ -3751,15 +3592,6 @@ assign_parms (tree fndecl) assign_parm_find_stack_rtl (parm, &data); assign_parm_adjust_entry_rtl (&data); } - if (!POINTER_BOUNDS_TYPE_P (data.passed_type)) - { - /* Remember where last non bounds arg was passed in case - we have to load associated bounds for it from Bounds - Table. */ - last_arg = parm; - last_arg_entry = data.entry_parm; - bound_no = 0; - } /* Record permanently how this parm was passed. */ if (data.passed_pointer) { @@ -3773,64 +3605,21 @@ assign_parms (tree fndecl) assign_parm_adjust_stack_rtl (&data); - /* Bounds should be loaded in the particular order to - have registers allocated correctly. Collect info about - input bounds and load them later. */ - if (POINTER_BOUNDS_TYPE_P (data.passed_type)) - { - /* Expect bounds in instrumented functions only. */ - gcc_assert (chkp_function_instrumented_p (fndecl)); - - bdata.parm_data = data; - bdata.bounds_parm = parm; - bdata.ptr_parm = last_arg; - bdata.ptr_entry = last_arg_entry; - bdata.bound_no = bound_no; - bndargs.safe_push (bdata); - } + if (assign_parm_setup_block_p (&data)) + assign_parm_setup_block (&all, parm, &data); + else if (data.passed_pointer || use_register_for_decl (parm)) + assign_parm_setup_reg (&all, parm, &data); else - { - if (assign_parm_setup_block_p (&data)) - assign_parm_setup_block (&all, parm, &data); - else if (data.passed_pointer || use_register_for_decl (parm)) - assign_parm_setup_reg (&all, parm, &data); - else - assign_parm_setup_stack (&all, parm, &data); - } + assign_parm_setup_stack (&all, parm, &data); if (cfun->stdarg && !DECL_CHAIN (parm)) - { - int pretend_bytes = 0; - - assign_parms_setup_varargs (&all, &data, false); - - if (chkp_function_instrumented_p (fndecl)) - { - /* We expect this is the last parm. Otherwise it is wrong - to assign bounds right now. */ - gcc_assert (i == (fnargs.length () - 1)); - assign_bounds (bndargs, all, true, false, false); - targetm.calls.setup_incoming_vararg_bounds (all.args_so_far, - data.promoted_mode, - data.passed_type, - &pretend_bytes, - false); - assign_bounds (bndargs, all, false, true, true); - bndargs.release (); - } - } + assign_parms_setup_varargs (&all, &data, false); /* Update info on where next arg arrives in registers. */ targetm.calls.function_arg_advance (all.args_so_far, data.promoted_mode, data.passed_type, data.named_arg); - - if (POINTER_BOUNDS_TYPE_P (data.passed_type)) - bound_no++; } - assign_bounds (bndargs, all, true, true, true); - bndargs.release (); - if (targetm.calls.split_complex_arg) assign_parms_unsplit_complex (&all, fnargs); @@ -3953,10 +3742,6 @@ assign_parms (tree fndecl) real_decl_rtl = targetm.calls.function_value (TREE_TYPE (decl_result), fndecl, true); - if (chkp_function_instrumented_p (fndecl)) - crtl->return_bnd - = targetm.calls.chkp_function_value_bounds (TREE_TYPE (decl_result), - fndecl, true); REG_FUNCTION_VALUE_P (real_decl_rtl) = 1; /* The delay slot scheduler assumes that crtl->return_rtx holds the hard register containing the return value, not a @@ -5238,14 +5023,6 @@ expand_function_start (tree subr) /* Set DECL_REGISTER flag so that expand_function_end will copy the result to the real return register(s). */ DECL_REGISTER (res) = 1; - - if (chkp_function_instrumented_p (current_function_decl)) - { - tree return_type = TREE_TYPE (res); - rtx bounds = targetm.calls.chkp_function_value_bounds (return_type, - subr, 1); - SET_DECL_BOUNDS_RTL (res, bounds); - } } /* Initialize rtx for parameters and local variables. diff --git a/gcc/gcc.c b/gcc/gcc.c index 2c597ec086a..a631caafd3f 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1012,10 +1012,6 @@ proper position among the other output files. */ #endif #endif -#ifndef CHKP_SPEC -#define CHKP_SPEC "" -#endif - /* -u* was put back because both BSD and SysV seem to support it. */ /* %{static|no-pie|static-pie:} simply prevents an error message: 1. If the target machine doesn't handle -static. @@ -1039,7 +1035,7 @@ proper position among the other output files. */ "%X %{o*} %{e*} %{N} %{n} %{r}\ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ %:include(libgomp.spec)%(link_gomp)}\ %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index f6d758a6828..c1d84420c6e 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see #include "gomp-constants.h" #include "optabs-query.h" #include "omp-general.h" -#include "ipa-chkp.h" #include "tree-cfg.h" #include "fold-const-call.h" #include "stringpool.h" @@ -728,18 +727,6 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi, unsigned int src_align, dest_align; tree off0; - /* Inlining of memcpy/memmove may cause bounds lost (if we copy - pointers as wide integer) and also may result in huge function - size because of inlined bounds copy. Thus don't inline for - functions we want to instrument. */ - if (flag_check_pointer_bounds - && chkp_instrumentable_p (cfun->decl) - /* Even if data may contain pointers we can inline if copy - less than a pointer size. */ - && (!tree_fits_uhwi_p (len) - || compare_tree_int (len, POINTER_SIZE_UNITS) >= 0)) - return false; - /* Build accesses at offset zero with a ref-all character type. */ off0 = build_int_cst (build_pointer_type_for_mode (char_type_node, ptr_mode, true), 0); diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index 637ed3cc290..cc50fba21d7 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -589,20 +589,14 @@ builtin_access::builtin_access (gcall *call, builtin_memref &dst, /* The size argument number (depends on the built-in). */ unsigned sizeargno = 2; - if (gimple_call_with_bounds_p (call)) - sizeargno += 2; tree func = gimple_call_fndecl (call); switch (DECL_FUNCTION_CODE (func)) { case BUILT_IN_MEMCPY: case BUILT_IN_MEMCPY_CHK: - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: case BUILT_IN_MEMPCPY: case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMPCPY_CHKP: - case BUILT_IN_MEMPCPY_CHK_CHKP: ostype = 0; depends_p = false; detect_overlap = &builtin_access::generic_overlap; @@ -610,8 +604,6 @@ builtin_access::builtin_access (gcall *call, builtin_memref &dst, case BUILT_IN_MEMMOVE: case BUILT_IN_MEMMOVE_CHK: - case BUILT_IN_MEMMOVE_CHKP: - case BUILT_IN_MEMMOVE_CHK_CHKP: /* For memmove there is never any overlap to check for. */ ostype = 0; depends_p = false; @@ -628,19 +620,13 @@ builtin_access::builtin_access (gcall *call, builtin_memref &dst, case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: detect_overlap = &builtin_access::strcpy_overlap; break; case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHKP: - case BUILT_IN_STRCAT_CHK_CHKP: detect_overlap = &builtin_access::strcat_overlap; break; @@ -654,8 +640,7 @@ builtin_access::builtin_access (gcall *call, builtin_memref &dst, default: /* Handle other string functions here whose access may need to be validated for in-bounds offsets and non-overlapping - copies. (Not all _chkp functions have BUILT_IN_XXX_CHKP - macros so they need to be handled here.) */ + copies. */ return; } @@ -1738,8 +1723,6 @@ wrestrict_dom_walker::check_call (gcall *call) if (!func || DECL_BUILT_IN_CLASS (func) != BUILT_IN_NORMAL) return; - bool with_bounds = gimple_call_with_bounds_p (call); - /* Argument number to extract from the call (depends on the built-in and its kind). */ unsigned dst_idx = -1; @@ -1754,16 +1737,10 @@ wrestrict_dom_walker::check_call (gcall *call) { case BUILT_IN_MEMCPY: case BUILT_IN_MEMCPY_CHK: - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: case BUILT_IN_MEMPCPY: case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMPCPY_CHKP: - case BUILT_IN_MEMPCPY_CHK_CHKP: case BUILT_IN_MEMMOVE: case BUILT_IN_MEMMOVE_CHK: - case BUILT_IN_MEMMOVE_CHKP: - case BUILT_IN_MEMMOVE_CHK_CHKP: strfun = false; /* Fall through. */ @@ -1774,31 +1751,24 @@ wrestrict_dom_walker::check_call (gcall *call) case BUILT_IN_STRNCPY: case BUILT_IN_STRNCPY_CHK: dst_idx = 0; - src_idx = 1 + with_bounds; - bnd_idx = 2 + 2 * with_bounds; + src_idx = 1; + bnd_idx = 2; break; case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHKP: - case BUILT_IN_STRCAT_CHK_CHKP: dst_idx = 0; - src_idx = 1 + with_bounds; + src_idx = 1; break; default: /* Handle other string functions here whose access may need to be validated for in-bounds offsets and non-overlapping - copies. (Not all _chkp functions have BUILT_IN_XXX_CHKP - macros so they need to be handled here.) */ + copies. */ return; } diff --git a/gcc/gimple.c b/gcc/gimple.c index 4b91151873c..abd28079b2d 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -385,7 +385,6 @@ gimple_build_call_from_tree (tree t, tree fnptrtype) gimple_call_set_nothrow (call, TREE_NOTHROW (t)); gimple_call_set_by_descriptor (call, CALL_EXPR_BY_DESCRIPTOR (t)); gimple_set_no_warning (call, TREE_NO_WARNING (t)); - gimple_call_set_with_bounds (call, CALL_WITH_BOUNDS_P (t)); if (fnptrtype) { diff --git a/gcc/gimple.h b/gcc/gimple.h index 265e3e24398..00a9f207bdf 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -145,7 +145,6 @@ enum gf_mask { GF_CALL_ALLOCA_FOR_VAR = 1 << 5, GF_CALL_INTERNAL = 1 << 6, GF_CALL_CTRL_ALTERING = 1 << 7, - GF_CALL_WITH_BOUNDS = 1 << 8, GF_CALL_MUST_TAIL_CALL = 1 << 9, GF_CALL_BY_DESCRIPTOR = 1 << 10, GF_CALL_NOCF_CHECK = 1 << 11, @@ -2856,44 +2855,6 @@ gimple_call_internal_p (const gimple *gs) return gimple_call_internal_p (gc); } - -/* Return true if call GS is marked as instrumented by - Pointer Bounds Checker. */ - -static inline bool -gimple_call_with_bounds_p (const gcall *gs) -{ - return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0; -} - -static inline bool -gimple_call_with_bounds_p (const gimple *gs) -{ - const gcall *gc = GIMPLE_CHECK2 (gs); - return gimple_call_with_bounds_p (gc); -} - - -/* If INSTRUMENTED_P is true, marm statement GS as instrumented by - Pointer Bounds Checker. */ - -static inline void -gimple_call_set_with_bounds (gcall *gs, bool with_bounds) -{ - if (with_bounds) - gs->subcode |= GF_CALL_WITH_BOUNDS; - else - gs->subcode &= ~GF_CALL_WITH_BOUNDS; -} - -static inline void -gimple_call_set_with_bounds (gimple *gs, bool with_bounds) -{ - gcall *gc = GIMPLE_CHECK2 (gs); - gimple_call_set_with_bounds (gc, with_bounds); -} - - /* Return true if call GS is marked as nocf_check. */ static inline bool diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 44cb784620a..32d7ad63ac9 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4859,19 +4859,11 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, individual element initialization. Also don't do this for small all-zero initializers (which aren't big enough to merit clearing), and don't try to make bitwise copies of - TREE_ADDRESSABLE types. + TREE_ADDRESSABLE types. */ - We cannot apply such transformation when compiling chkp static - initializer because creation of initializer image in the memory - will require static initialization of bounds for it. It should - result in another gimplification of similar initializer and we - may fall into infinite loop. */ if (valid_const_initializer && !(cleared || num_nonzero_elements == 0) - && !TREE_ADDRESSABLE (type) - && (!current_function_decl - || !lookup_attribute ("chkp ctor", - DECL_ATTRIBUTES (current_function_decl)))) + && !TREE_ADDRESSABLE (type)) { HOST_WIDE_INT size = int_size_in_bytes (type); unsigned int align; diff --git a/gcc/ipa-chkp.c b/gcc/ipa-chkp.c deleted file mode 100644 index b38b542ccb0..00000000000 --- a/gcc/ipa-chkp.c +++ /dev/null @@ -1,876 +0,0 @@ -/* Pointer Bounds Checker IPA passes. - Copyright (C) 2014-2018 Free Software Foundation, Inc. - Contributed by Ilya Enkovich (ilya.enkovich@intel.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#define INCLUDE_STRING -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "tree.h" -#include "gimple.h" -#include "tree-pass.h" -#include "stringpool.h" -#include "lto-streamer.h" -#include "stor-layout.h" -#include "calls.h" -#include "cgraph.h" -#include "tree-chkp.h" -#include "tree-inline.h" -#include "ipa-chkp.h" -#include "stringpool.h" -#include "attribs.h" - -/* Pointer Bounds Checker has two IPA passes to support code instrumentation. - - In instrumented code each pointer is provided with bounds. For input - pointer parameters it means we also have bounds passed. For calls it - means we have additional bounds arguments for pointer arguments. - - To have all IPA optimizations working correctly we have to express - dataflow between passed and received bounds explicitly via additional - entries in function declaration arguments list and in function type. - Since we may have both instrumented and not instrumented code at the - same time, we cannot replace all original functions with their - instrumented variants. Therefore we create clones (versions) instead. - - Instrumentation clones creation is a separate IPA pass which is a part - of early local passes. Clones are created after SSA is built (because - instrumentation pass works on SSA) and before any transformations - which may change pointer flow and therefore lead to incorrect code - instrumentation (possibly causing false bounds check failures). - - Instrumentation clones have pointer bounds arguments added right after - pointer arguments. Clones have assembler name of the original - function with suffix added. New assembler name is in transparent - alias chain with the original name. Thus we expect all calls to the - original and instrumented functions look similar in assembler. - - During instrumentation versioning pass we create instrumented versions - of all function with body and also for all their aliases and thunks. - Clones for functions with no body are created on demand (usually - during call instrumentation). - - Original and instrumented function nodes are connected with IPA - reference IPA_REF_CHKP. It is mostly done to have reachability - analysis working correctly. We may have no references to the - instrumented function in the code but it still should be counted - as reachable if the original function is reachable. - - When original function bodies are not needed anymore we release - them and transform functions into a special kind of thunks. Each - thunk has a call edge to the instrumented version. These thunks - help to keep externally visible instrumented functions visible - when linker resolution files are used. Linker has no info about - connection between original and instrumented function and - therefore we may wrongly decide (due to difference in assembler - names) that instrumented function version is local and can be - removed. */ - -#define CHKP_BOUNDS_OF_SYMBOL_PREFIX "__chkp_bounds_of_" -#define CHKP_WRAPPER_SYMBOL_PREFIX "__mpx_wrapper_" - -/* Return 1 calls to FNDECL should be replaced with - a call to wrapper function. */ -bool -chkp_wrap_function (tree fndecl) -{ - if (!flag_chkp_use_wrappers) - return false; - - if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) - { - switch (DECL_FUNCTION_CODE (fndecl)) - { - case BUILT_IN_STRLEN: - case BUILT_IN_STRCPY: - case BUILT_IN_STRNCPY: - case BUILT_IN_STPCPY: - case BUILT_IN_STPNCPY: - case BUILT_IN_STRCAT: - case BUILT_IN_STRNCAT: - case BUILT_IN_MEMCPY: - case BUILT_IN_MEMPCPY: - case BUILT_IN_MEMSET: - case BUILT_IN_MEMMOVE: - case BUILT_IN_BZERO: - case BUILT_IN_MALLOC: - case BUILT_IN_CALLOC: - case BUILT_IN_REALLOC: - return 1; - - default: - return 0; - } - } - - return false; -} - -static const char * -chkp_wrap_function_name (tree fndecl) -{ - gcc_assert (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL); - - switch (DECL_FUNCTION_CODE (fndecl)) - { - case BUILT_IN_STRLEN: - return CHKP_WRAPPER_SYMBOL_PREFIX "strlen"; - case BUILT_IN_STRCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "strcpy"; - case BUILT_IN_STRNCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "strncpy"; - case BUILT_IN_STPCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "stpcpy"; - case BUILT_IN_STPNCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "stpncpy"; - case BUILT_IN_STRCAT: - return CHKP_WRAPPER_SYMBOL_PREFIX "strcat"; - case BUILT_IN_STRNCAT: - return CHKP_WRAPPER_SYMBOL_PREFIX "strncat"; - case BUILT_IN_MEMCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "memcpy"; - case BUILT_IN_MEMPCPY: - return CHKP_WRAPPER_SYMBOL_PREFIX "mempcpy"; - case BUILT_IN_MEMSET: - return CHKP_WRAPPER_SYMBOL_PREFIX "memset"; - case BUILT_IN_MEMMOVE: - return CHKP_WRAPPER_SYMBOL_PREFIX "memmove"; - case BUILT_IN_BZERO: - return CHKP_WRAPPER_SYMBOL_PREFIX "bzero"; - case BUILT_IN_MALLOC: - return CHKP_WRAPPER_SYMBOL_PREFIX "malloc"; - case BUILT_IN_CALLOC: - return CHKP_WRAPPER_SYMBOL_PREFIX "calloc"; - case BUILT_IN_REALLOC: - return CHKP_WRAPPER_SYMBOL_PREFIX "realloc"; - - default: - gcc_unreachable (); - } - - return ""; -} - -/* Build a clone of FNDECL with a modified name. */ - -static tree -chkp_build_instrumented_fndecl (tree fndecl) -{ - tree new_decl = copy_node (fndecl); - tree new_name; - std::string s; - - /* called_as_built_in checks DECL_NAME to identify calls to - builtins. We want instrumented calls to builtins to be - recognized by called_as_built_in. Therefore use original - DECL_NAME for cloning with no prefixes. */ - s = IDENTIFIER_POINTER (DECL_NAME (fndecl)); - s += ".chkp"; - DECL_NAME (new_decl) = get_identifier (s.c_str ()); - - /* References to the original and to the instrumented version - should look the same in the output assembly. And we cannot - use the same assembler name for the instrumented version - because it conflicts with decl merging algorithms in LTO. - Achieve the result by using transparent alias name for the - instrumented version. */ - if (chkp_wrap_function(fndecl)) - { - new_name = get_identifier (chkp_wrap_function_name (fndecl)); - DECL_VISIBILITY (new_decl) = VISIBILITY_DEFAULT; - } - else - { - s = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)); - s += ".chkp"; - new_name = get_identifier (s.c_str ()); - IDENTIFIER_TRANSPARENT_ALIAS (new_name) = 1; - TREE_CHAIN (new_name) = DECL_ASSEMBLER_NAME (fndecl); - } - SET_DECL_ASSEMBLER_NAME (new_decl, new_name); - - /* For functions with body versioning will make a copy of arguments. - For functions with no body we need to do it here. */ - if (!gimple_has_body_p (fndecl)) - { - tree arg; - - DECL_ARGUMENTS (new_decl) = copy_list (DECL_ARGUMENTS (fndecl)); - for (arg = DECL_ARGUMENTS (new_decl); arg; arg = DECL_CHAIN (arg)) - DECL_CONTEXT (arg) = new_decl; - } - - /* We are going to modify attributes list and therefore should - make own copy. */ - DECL_ATTRIBUTES (new_decl) = copy_list (DECL_ATTRIBUTES (fndecl)); - - /* Change builtin function code. */ - if (DECL_BUILT_IN (new_decl)) - { - gcc_assert (DECL_BUILT_IN_CLASS (new_decl) == BUILT_IN_NORMAL); - gcc_assert (DECL_FUNCTION_CODE (new_decl) < BEGIN_CHKP_BUILTINS); - DECL_FUNCTION_CODE (new_decl) - = (enum built_in_function)(DECL_FUNCTION_CODE (new_decl) - + BEGIN_CHKP_BUILTINS + 1); - } - - return new_decl; -} - - -/* Fix operands of attribute from ATTRS list named ATTR_NAME. - Integer operands are replaced with values according to - INDEXES map having LEN elements. For operands out of len - we just add DELTA. */ - -static void -chkp_map_attr_arg_indexes (tree attrs, const char *attr_name, - unsigned *indexes, int len, int delta) -{ - tree attr = lookup_attribute (attr_name, attrs); - tree op; - - if (!attr) - return; - - TREE_VALUE (attr) = copy_list (TREE_VALUE (attr)); - for (op = TREE_VALUE (attr); op; op = TREE_CHAIN (op)) - { - int idx; - - if (TREE_CODE (TREE_VALUE (op)) != INTEGER_CST) - continue; - - idx = TREE_INT_CST_LOW (TREE_VALUE (op)); - - /* If idx exceeds indexes length then we just - keep it at the same distance from the last - known arg. */ - if (idx > len) - idx += delta; - else - idx = indexes[idx - 1] + 1; - TREE_VALUE (op) = build_int_cst (TREE_TYPE (TREE_VALUE (op)), idx); - } -} - -/* Make a copy of function type ORIG_TYPE adding pointer - bounds as additional arguments. */ - -tree -chkp_copy_function_type_adding_bounds (tree orig_type) -{ - tree type; - tree arg_type, attrs; - unsigned len = list_length (TYPE_ARG_TYPES (orig_type)); - unsigned *indexes = XALLOCAVEC (unsigned, len); - unsigned idx = 0, new_idx = 0; - - for (arg_type = TYPE_ARG_TYPES (orig_type); - arg_type; - arg_type = TREE_CHAIN (arg_type)) - if (TREE_VALUE (arg_type) == void_type_node) - continue; - else if (BOUNDED_TYPE_P (TREE_VALUE (arg_type)) - || pass_by_reference (NULL, TYPE_MODE (TREE_VALUE (arg_type)), - TREE_VALUE (arg_type), true) - || chkp_type_has_pointer (TREE_VALUE (arg_type))) - break; - - /* We may use original type if there are no bounds passed. */ - if (!arg_type) - return orig_type; - - type = build_distinct_type_copy (orig_type); - TYPE_ARG_TYPES (type) = copy_list (TYPE_ARG_TYPES (type)); - - for (arg_type = TYPE_ARG_TYPES (type); - arg_type; - arg_type = TREE_CHAIN (arg_type)) - { - indexes[idx++] = new_idx++; - - /* pass_by_reference returns 1 for void type, - so check for it first. */ - if (TREE_VALUE (arg_type) == void_type_node) - continue; - else if (BOUNDED_TYPE_P (TREE_VALUE (arg_type)) - || pass_by_reference (NULL, TYPE_MODE (TREE_VALUE (arg_type)), - TREE_VALUE (arg_type), true)) - { - tree new_type = build_tree_list (NULL_TREE, - pointer_bounds_type_node); - TREE_CHAIN (new_type) = TREE_CHAIN (arg_type); - TREE_CHAIN (arg_type) = new_type; - - arg_type = TREE_CHAIN (arg_type); - new_idx++; - } - else if (chkp_type_has_pointer (TREE_VALUE (arg_type))) - { - bitmap slots = BITMAP_ALLOC (NULL); - bitmap_iterator bi; - unsigned bnd_no; - - chkp_find_bound_slots (TREE_VALUE (arg_type), slots); - - EXECUTE_IF_SET_IN_BITMAP (slots, 0, bnd_no, bi) - { - tree new_type = build_tree_list (NULL_TREE, - pointer_bounds_type_node); - TREE_CHAIN (new_type) = TREE_CHAIN (arg_type); - TREE_CHAIN (arg_type) = new_type; - - arg_type = TREE_CHAIN (arg_type); - new_idx++; - } - BITMAP_FREE (slots); - } - } - - /* If function type has attribute with arg indexes then - we have to copy it fixing attribute ops. Map for - fixing is in indexes array. */ - attrs = TYPE_ATTRIBUTES (type); - if (lookup_attribute ("nonnull", attrs) - || lookup_attribute ("format", attrs) - || lookup_attribute ("format_arg", attrs)) - { - int delta = new_idx - len; - attrs = copy_list (TYPE_ATTRIBUTES (type)); - chkp_map_attr_arg_indexes (attrs, "nonnull", indexes, len, delta); - chkp_map_attr_arg_indexes (attrs, "format", indexes, len, delta); - chkp_map_attr_arg_indexes (attrs, "format_arg", indexes, len, delta); - TYPE_ATTRIBUTES (type) = attrs; - } - - return type; -} - -/* For given function FNDECL add bounds arguments to arguments - list. */ - -static void -chkp_add_bounds_params_to_function (tree fndecl) -{ - tree arg; - - for (arg = DECL_ARGUMENTS (fndecl); arg; arg = DECL_CHAIN (arg)) - if (BOUNDED_P (arg)) - { - std::string new_name = CHKP_BOUNDS_OF_SYMBOL_PREFIX; - tree new_arg; - - if (DECL_NAME (arg)) - new_name += IDENTIFIER_POINTER (DECL_NAME (arg)); - else - { - char uid[25]; - snprintf (uid, 25, "D.%u", DECL_UID (arg)); - new_name += uid; - } - - new_arg = build_decl (DECL_SOURCE_LOCATION (arg), PARM_DECL, - get_identifier (new_name.c_str ()), - pointer_bounds_type_node); - DECL_ARG_TYPE (new_arg) = pointer_bounds_type_node; - DECL_CONTEXT (new_arg) = DECL_CONTEXT (arg); - DECL_ARTIFICIAL (new_arg) = 1; - DECL_CHAIN (new_arg) = DECL_CHAIN (arg); - DECL_CHAIN (arg) = new_arg; - - arg = DECL_CHAIN (arg); - - } - else if (chkp_type_has_pointer (TREE_TYPE (arg))) - { - tree orig_arg = arg; - bitmap slots = BITMAP_ALLOC (NULL); - bitmap_iterator bi; - unsigned bnd_no; - - chkp_find_bound_slots (TREE_TYPE (arg), slots); - - EXECUTE_IF_SET_IN_BITMAP (slots, 0, bnd_no, bi) - { - std::string new_name = CHKP_BOUNDS_OF_SYMBOL_PREFIX; - tree new_arg; - char offs[25]; - - if (DECL_NAME (orig_arg)) - new_name += IDENTIFIER_POINTER (DECL_NAME (orig_arg)); - else - { - snprintf (offs, 25, "D.%u", DECL_UID (arg)); - new_name += offs; - } - snprintf (offs, 25, "__%u", bnd_no * POINTER_SIZE / BITS_PER_UNIT); - - new_arg = build_decl (DECL_SOURCE_LOCATION (orig_arg), - PARM_DECL, - get_identifier (new_name.c_str ()), - pointer_bounds_type_node); - DECL_ARG_TYPE (new_arg) = pointer_bounds_type_node; - DECL_CONTEXT (new_arg) = DECL_CONTEXT (orig_arg); - DECL_ARTIFICIAL (new_arg) = 1; - DECL_CHAIN (new_arg) = DECL_CHAIN (arg); - DECL_CHAIN (arg) = new_arg; - - arg = DECL_CHAIN (arg); - } - BITMAP_FREE (slots); - } - - TREE_TYPE (fndecl) = - chkp_copy_function_type_adding_bounds (TREE_TYPE (fndecl)); -} - -/* Return an instrumentation clone for builtin function - FNDECL. Create one if needed. */ - -tree -chkp_maybe_clone_builtin_fndecl (tree fndecl) -{ - tree clone; - enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl); - - gcc_assert (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && fcode < BEGIN_CHKP_BUILTINS); - - fcode = (enum built_in_function) (fcode + BEGIN_CHKP_BUILTINS + 1); - clone = builtin_decl_explicit (fcode); - if (clone) - return clone; - - clone = chkp_build_instrumented_fndecl (fndecl); - chkp_add_bounds_params_to_function (clone); - - gcc_assert (DECL_FUNCTION_CODE (clone) == fcode); - - set_builtin_decl (fcode, clone, false); - - return clone; -} - -/* Return 1 if function FNDECL should be instrumented. */ - -bool -chkp_instrumentable_p (tree fndecl) -{ - struct function *fn = DECL_STRUCT_FUNCTION (fndecl); - return (!lookup_attribute ("bnd_legacy", DECL_ATTRIBUTES (fndecl)) - && (!flag_chkp_instrument_marked_only - || lookup_attribute ("bnd_instrument", DECL_ATTRIBUTES (fndecl))) - && (!fn || !copy_forbidden (fn))); -} - -/* Return clone created for instrumentation of NODE or NULL. */ - -cgraph_node * -chkp_maybe_create_clone (tree fndecl) -{ - cgraph_node *node = cgraph_node::get_create (fndecl); - cgraph_node *clone = node->instrumented_version; - - gcc_assert (!node->instrumentation_clone); - - if (DECL_BUILT_IN (fndecl) - && (DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL - || DECL_FUNCTION_CODE (fndecl) >= BEGIN_CHKP_BUILTINS)) - return NULL; - - clone = node->instrumented_version; - - /* Some instrumented builtin function calls may be optimized and - cgraph nodes may be removed as unreachable. Later optimizations - may generate new calls to removed functions and in this case - we have to recreate cgraph node. FUNCTION_DECL for instrumented - builtin still exists and should be reused in such case. */ - if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && fndecl == builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl)) - && !clone) - { - enum built_in_function fncode = DECL_FUNCTION_CODE (fndecl); - tree new_decl; - - fncode = (enum built_in_function) (fncode + BEGIN_CHKP_BUILTINS + 1); - new_decl = builtin_decl_explicit (fncode); - - /* We've actually already created an instrumented clone once. - Restore it. */ - if (new_decl) - { - clone = cgraph_node::get (new_decl); - - if (!clone) - { - gcc_assert (!gimple_has_body_p (fndecl)); - clone = cgraph_node::get_create (new_decl); - clone->externally_visible = node->externally_visible; - clone->local = node->local; - clone->address_taken = node->address_taken; - clone->thunk = node->thunk; - clone->alias = node->alias; - clone->weakref = node->weakref; - clone->cpp_implicit_alias = node->cpp_implicit_alias; - clone->orig_decl = fndecl; - clone->instrumentation_clone = true; - } - - clone->instrumented_version = node; - node->instrumented_version = clone; - } - } - - if (!clone) - { - tree new_decl = chkp_build_instrumented_fndecl (fndecl); - struct cgraph_edge *e; - struct ipa_ref *ref; - int i; - - clone = node->create_version_clone (new_decl, vNULL, NULL); - clone->externally_visible = node->externally_visible; - clone->local = node->local; - clone->address_taken = node->address_taken; - clone->thunk = node->thunk; - clone->alias = node->alias; - clone->weakref = node->weakref; - clone->cpp_implicit_alias = node->cpp_implicit_alias; - clone->instrumented_version = node; - clone->orig_decl = fndecl; - clone->instrumentation_clone = true; - node->instrumented_version = clone; - - if (gimple_has_body_p (fndecl)) - { - gcc_assert (chkp_instrumentable_p (fndecl)); - tree_function_versioning (fndecl, new_decl, NULL, false, - NULL, false, NULL, NULL); - clone->lowered = true; - } - - /* New params are inserted after versioning because it - actually copies args list from the original decl. */ - chkp_add_bounds_params_to_function (new_decl); - - /* Remember builtin fndecl. */ - if (DECL_BUILT_IN_CLASS (clone->decl) == BUILT_IN_NORMAL - && fndecl == builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl))) - { - gcc_assert (!builtin_decl_explicit (DECL_FUNCTION_CODE (clone->decl))); - set_builtin_decl (DECL_FUNCTION_CODE (clone->decl), - clone->decl, false); - } - - /* Clones have the same comdat group as originals. */ - if (node->same_comdat_group - || (DECL_ONE_ONLY (node->decl) - && !DECL_EXTERNAL (node->decl))) - clone->add_to_same_comdat_group (node); - - if (gimple_has_body_p (fndecl)) - symtab->call_cgraph_insertion_hooks (clone); - - /* Clone all aliases. */ - for (i = 0; node->iterate_direct_aliases (i, ref); i++) - chkp_maybe_create_clone (ref->referring->decl); - - /* Clone all thunks. */ - for (e = node->callers; e; e = e->next_caller) - if (e->caller->thunk.thunk_p - && !e->caller->thunk.add_pointer_bounds_args - && !e->caller->instrumentation_clone) - { - struct cgraph_node *thunk - = chkp_maybe_create_clone (e->caller->decl); - /* Redirect thunk clone edge to the node clone. */ - thunk->callees->redirect_callee (clone); - } - - /* For aliases and thunks we should make sure target is cloned - to have proper references and edges. */ - if (node->thunk.thunk_p) - chkp_maybe_create_clone (node->callees->callee->decl); - else if (node->alias) - { - struct cgraph_node *target; - - ref = node->ref_list.first_reference (); - if (ref) - { - target = chkp_maybe_create_clone (ref->referred->decl); - clone->create_reference (target, IPA_REF_ALIAS); - } - - if (node->alias_target) - { - if (TREE_CODE (node->alias_target) == FUNCTION_DECL) - { - target = chkp_maybe_create_clone (node->alias_target); - clone->alias_target = target->decl; - } - else - clone->alias_target = node->alias_target; - } - } - - /* Add IPA reference. It's main role is to keep instrumented - version reachable while original node is reachable. */ - ref = node->create_reference (clone, IPA_REF_CHKP, NULL); - } - - return clone; -} - -/* Create clone for all functions to be instrumented. */ - -static unsigned int -chkp_versioning (void) -{ - struct cgraph_node *node; - const char *reason; - - bitmap_obstack_initialize (NULL); - - FOR_EACH_DEFINED_FUNCTION (node) - { - tree decl = node->decl; - if (!node->instrumentation_clone - && !node->instrumented_version - && !node->alias - && !node->thunk.thunk_p - && (!DECL_BUILT_IN (decl) - || (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (decl) < BEGIN_CHKP_BUILTINS))) - { - if (chkp_instrumentable_p (decl)) - chkp_maybe_create_clone (decl); - else if ((reason = copy_forbidden (DECL_STRUCT_FUNCTION (decl)))) - { - if (warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wchkp, - "function cannot be instrumented")) - inform (DECL_SOURCE_LOCATION (decl), reason, decl); - } - } - } - - /* Mark all aliases and thunks of functions with no instrumented - version as legacy function. */ - FOR_EACH_DEFINED_FUNCTION (node) - { - if (!node->instrumentation_clone - && !node->instrumented_version - && (node->alias || node->thunk.thunk_p) - && !lookup_attribute ("bnd_legacy", DECL_ATTRIBUTES (node->decl))) - DECL_ATTRIBUTES (node->decl) - = tree_cons (get_identifier ("bnd_legacy"), NULL, - DECL_ATTRIBUTES (node->decl)); - } - - bitmap_obstack_release (NULL); - - return 0; -} - -/* In this pass we remove bodies of functions having - instrumented version. Functions with removed bodies - become a special kind of thunks to provide a connection - between calls to the original version and instrumented - function. */ - -static unsigned int -chkp_produce_thunks (bool early) -{ - struct cgraph_node *node; - - FOR_EACH_DEFINED_FUNCTION (node) - { - if (!node->instrumentation_clone - && node->instrumented_version - && gimple_has_body_p (node->decl) - && gimple_has_body_p (node->instrumented_version->decl) - && (!lookup_attribute ("always_inline", DECL_ATTRIBUTES (node->decl)) - || !early)) - { - node->release_body (); - node->remove_callees (); - node->remove_all_references (); - - node->thunk.thunk_p = true; - node->thunk.add_pointer_bounds_args = true; - node->create_edge (node->instrumented_version, NULL, - node->count); - node->create_reference (node->instrumented_version, - IPA_REF_CHKP, NULL); - /* Thunk shouldn't be a cdtor. */ - DECL_STATIC_CONSTRUCTOR (node->decl) = 0; - DECL_STATIC_DESTRUCTOR (node->decl) = 0; - } - } - - /* Mark instrumentation clones created for aliases and thunks - as insttrumented so they could be removed as unreachable - now. */ - if (!early) - { - FOR_EACH_DEFINED_FUNCTION (node) - { - if (node->instrumentation_clone - && (node->alias || node->thunk.thunk_p) - && !chkp_function_instrumented_p (node->decl)) - chkp_function_mark_instrumented (node->decl); - } - } - - return TODO_remove_functions; -} - -const pass_data pass_data_ipa_chkp_versioning = -{ - SIMPLE_IPA_PASS, /* type */ - "chkp_versioning", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ -}; - -const pass_data pass_data_ipa_chkp_early_produce_thunks = -{ - SIMPLE_IPA_PASS, /* type */ - "chkp_ecleanup", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ -}; - -const pass_data pass_data_ipa_chkp_produce_thunks = -{ - SIMPLE_IPA_PASS, /* type */ - "chkp_cleanup", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ -}; - -class pass_ipa_chkp_versioning : public simple_ipa_opt_pass -{ -public: - pass_ipa_chkp_versioning (gcc::context *ctxt) - : simple_ipa_opt_pass (pass_data_ipa_chkp_versioning, ctxt) - {} - - /* opt_pass methods: */ - virtual opt_pass * clone () - { - return new pass_ipa_chkp_versioning (m_ctxt); - } - - virtual bool gate (function *) - { - return flag_check_pointer_bounds; - } - - virtual unsigned int execute (function *) - { - return chkp_versioning (); - } - -}; // class pass_ipa_chkp_versioning - -class pass_ipa_chkp_early_produce_thunks : public simple_ipa_opt_pass -{ -public: - pass_ipa_chkp_early_produce_thunks (gcc::context *ctxt) - : simple_ipa_opt_pass (pass_data_ipa_chkp_early_produce_thunks, ctxt) - {} - - /* opt_pass methods: */ - virtual opt_pass * clone () - { - return new pass_ipa_chkp_early_produce_thunks (m_ctxt); - } - - virtual bool gate (function *) - { - return flag_check_pointer_bounds; - } - - virtual unsigned int execute (function *) - { - return chkp_produce_thunks (true); - } - -}; // class pass_chkp_produce_thunks - -class pass_ipa_chkp_produce_thunks : public simple_ipa_opt_pass -{ -public: - pass_ipa_chkp_produce_thunks (gcc::context *ctxt) - : simple_ipa_opt_pass (pass_data_ipa_chkp_produce_thunks, ctxt) - {} - - /* opt_pass methods: */ - virtual opt_pass * clone () - { - return new pass_ipa_chkp_produce_thunks (m_ctxt); - } - - virtual bool gate (function *) - { - return flag_check_pointer_bounds; - } - - virtual unsigned int execute (function *) - { - return chkp_produce_thunks (false); - } - -}; // class pass_chkp_produce_thunks - -simple_ipa_opt_pass * -make_pass_ipa_chkp_versioning (gcc::context *ctxt) -{ - return new pass_ipa_chkp_versioning (ctxt); -} - -simple_ipa_opt_pass * -make_pass_ipa_chkp_early_produce_thunks (gcc::context *ctxt) -{ - return new pass_ipa_chkp_early_produce_thunks (ctxt); -} - -simple_ipa_opt_pass * -make_pass_ipa_chkp_produce_thunks (gcc::context *ctxt) -{ - return new pass_ipa_chkp_produce_thunks (ctxt); -} diff --git a/gcc/ipa-chkp.h b/gcc/ipa-chkp.h deleted file mode 100644 index 5693cba5f82..00000000000 --- a/gcc/ipa-chkp.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Declaration of interface functions of Pointer Bounds Checker. - Copyright (C) 2014-2018 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 -. */ - -#ifndef GCC_IPA_CHKP_H -#define GCC_IPA_CHKP_H - -extern tree chkp_copy_function_type_adding_bounds (tree orig_type); -extern tree chkp_maybe_clone_builtin_fndecl (tree fndecl); -extern cgraph_node *chkp_maybe_create_clone (tree fndecl); -extern bool chkp_instrumentable_p (tree fndecl); -extern bool chkp_wrap_function (tree fndecl); - -#endif /* GCC_IPA_CHKP_H */ diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index e868b9c2623..06611d3b5d7 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1177,7 +1177,7 @@ initialize_node_lattices (struct cgraph_node *node) int i; gcc_checking_assert (node->has_gimple_body_p ()); - if (cgraph_local_p (node)) + if (node->local.local) { int caller_count = 0; node->call_for_symbol_thunks_and_aliases (count_callers, &caller_count, @@ -2271,24 +2271,6 @@ propagate_constants_across_call (struct cgraph_edge *cs) if (parms_count == 0) return false; - /* No propagation through instrumentation thunks is available yet. - It should be possible with proper mapping of call args and - instrumented callee params in the propagation loop below. But - this case mostly occurs when legacy code calls instrumented code - and it is not a primary target for optimizations. - We detect instrumentation thunks in aliases and thunks chain by - checking instrumentation_clone flag for chain source and target. - Going through instrumentation thunks we always have it changed - from 0 to 1 and all other nodes do not change it. */ - if (!cs->callee->instrumentation_clone - && callee->instrumentation_clone) - { - for (i = 0; i < parms_count; i++) - ret |= set_all_contains_variable (ipa_get_parm_lattices (callee_info, - i)); - return ret; - } - /* If this call goes through a thunk we must not propagate to the first (0th) parameter. However, we might need to uncover a thunk from below a series of aliases first. */ @@ -3967,9 +3949,7 @@ find_more_scalar_values_for_callers_subset (struct cgraph_node *node, if (i >= ipa_get_cs_argument_count (IPA_EDGE_REF (cs)) || (i == 0 - && call_passes_through_thunk_p (cs)) - || (!cs->callee->instrumentation_clone - && cs->callee->function_symbol ()->instrumentation_clone)) + && call_passes_through_thunk_p (cs))) { newval = NULL_TREE; break; diff --git a/gcc/ipa-hsa.c b/gcc/ipa-hsa.c index 1df273c7f28..b1b897aeb3a 100644 --- a/gcc/ipa-hsa.c +++ b/gcc/ipa-hsa.c @@ -113,7 +113,7 @@ process_hsa_functions (void) TREE_PUBLIC (clone->decl) = TREE_PUBLIC (node->decl); clone->externally_visible = node->externally_visible; - if (!cgraph_local_p (node)) + if (!node->local.local) clone->force_output = true; hsa_summaries->link_functions (clone, node, HSA_FUNCTION, false); diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index 6a5d1e96941..ba39ea36574 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -754,8 +754,7 @@ func_checker::compare_gimple_call (gcall *s1, gcall *s2) || gimple_call_return_slot_opt_p (s1) != gimple_call_return_slot_opt_p (s2) || gimple_call_from_thunk_p (s1) != gimple_call_from_thunk_p (s2) || gimple_call_va_arg_pack_p (s1) != gimple_call_va_arg_pack_p (s2) - || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2) - || gimple_call_with_bounds_p (s1) != gimple_call_with_bounds_p (s2)) + || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2)) return false; if (gimple_call_internal_p (s1) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 5a1e13560d6..8958421993a 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1220,8 +1220,7 @@ sem_function::merge (sem_item *alias_item) are not interposable. */ redirect_callers = alias->get_availability () > AVAIL_INTERPOSABLE - && original->get_availability () > AVAIL_INTERPOSABLE - && !alias->instrumented_version; + && original->get_availability () > AVAIL_INTERPOSABLE; /* TODO: We can redirect, but we need to produce alias of ORIGINAL with proper properties. */ if (!sem_item::compare_referenced_symbol_properties (NULL, original, alias, diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index b7f213f2eb7..1d524a9cd4f 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2712,13 +2712,6 @@ early_inliner (function *fun) node->verify (); node->remove_all_references (); - /* Rebuild this reference because it dosn't depend on - function's body and it's required to pass cgraph_node - verification. */ - if (node->instrumented_version - && !node->instrumentation_clone) - node->create_reference (node->instrumented_version, IPA_REF_CHKP, NULL); - /* Even when not optimizing or not inlining inline always-inline functions. */ inlined = inline_always_inline_functions (node); diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 528ea6695ac..1e0bcae6264 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -259,10 +259,6 @@ warn_function_noreturn (tree decl) { tree original_decl = decl; - cgraph_node *node = cgraph_node::get (decl); - if (node->instrumentation_clone) - decl = node->instrumented_version->decl; - static hash_set *warned_about; if (!lang_hooks.missing_noreturn_ok_p (decl) && targetm.warn_func_return (decl)) @@ -276,10 +272,6 @@ warn_function_cold (tree decl) { tree original_decl = decl; - cgraph_node *node = cgraph_node::get (decl); - if (node->instrumentation_clone) - decl = node->instrumented_version->decl; - static hash_set *warned_about; warned_about = suggest_attribute (OPT_Wsuggest_attribute_cold, original_decl, @@ -1619,7 +1611,6 @@ propagate_pure_const (void) fprintf (dump_file, " global var write\n"); break; case IPA_REF_ADDR: - case IPA_REF_CHKP: break; default: gcc_unreachable (); diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h index ba788c2eef7..4e22d85ac03 100644 --- a/gcc/ipa-ref.h +++ b/gcc/ipa-ref.h @@ -32,8 +32,7 @@ enum GTY(()) ipa_ref_use IPA_REF_LOAD, IPA_REF_STORE, IPA_REF_ADDR, - IPA_REF_ALIAS, - IPA_REF_CHKP + IPA_REF_ALIAS }; /* Record of reference in callgraph or varpool. */ diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index b03ae02924a..23d1df99bea 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -104,7 +104,6 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "ipa-fnsummary.h" #include "cfgloop.h" -#include "tree-chkp.h" /* Per basic block info. */ @@ -151,7 +150,6 @@ struct split_point best_split_point; static bitmap forbidden_dominators; static tree find_retval (basic_block return_bb); -static tree find_retbnd (basic_block return_bb); /* Callback for walk_stmt_load_store_addr_ops. If T is non-SSA automatic variable, check it if it is present in bitmap passed via DATA. */ @@ -433,7 +431,6 @@ consider_split (struct split_point *current, bitmap non_ssa_vars, gphi_iterator bsi; unsigned int i; tree retval; - tree retbnd; bool back_edge = false; if (dump_file && (dump_flags & TDF_DETAILS)) @@ -678,29 +675,6 @@ consider_split (struct split_point *current, bitmap non_ssa_vars, else current->split_part_set_retval = true; - /* See if retbnd used by return bb is computed by header or split part. */ - retbnd = find_retbnd (return_bb); - if (retbnd) - { - bool split_part_set_retbnd - = split_part_set_ssa_name_p (retbnd, current, return_bb); - - /* If we have both return value and bounds then keep their definitions - in a single function. We use SSA names to link returned bounds and - value and therefore do not handle cases when result is passed by - reference (which should not be our case anyway since bounds are - returned for pointers only). */ - if ((DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)) - && current->split_part_set_retval) - || split_part_set_retbnd != current->split_part_set_retval) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, - " Refused: split point splits return value and bounds\n"); - return; - } - } - /* split_function fixes up at most one PHI non-virtual PHI node in return_bb, for the return value. If there are other PHIs, give up. */ if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun)) @@ -830,18 +804,6 @@ find_retval (basic_block return_bb) return NULL; } -/* Given return basic block RETURN_BB, see where return bounds are really - stored. */ -static tree -find_retbnd (basic_block return_bb) -{ - gimple_stmt_iterator bsi; - for (bsi = gsi_last_bb (return_bb); !gsi_end_p (bsi); gsi_prev (&bsi)) - if (gimple_code (gsi_stmt (bsi)) == GIMPLE_RETURN) - return gimple_return_retbnd (gsi_stmt (bsi)); - return NULL; -} - /* Callback for walk_stmt_load_store_addr_ops. If T is non-SSA automatic variable, mark it as used in bitmap passed via DATA. Return true when access to T prevents splitting the function. */ @@ -1228,8 +1190,7 @@ split_function (basic_block return_bb, struct split_point *split_point, gcall *call, *tsan_func_exit_call = NULL; edge e; edge_iterator ei; - tree retval = NULL, real_retval = NULL, retbnd = NULL; - bool with_bounds = chkp_function_instrumented_p (current_function_decl); + tree retval = NULL, real_retval = NULL; gimple *last_stmt = NULL; unsigned int i; tree arg, ddef; @@ -1311,14 +1272,10 @@ split_function (basic_block return_bb, struct split_point *split_point, e = make_single_succ_edge (new_return_bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0); add_bb_to_loop (new_return_bb, current_loops->tree_root); bitmap_set_bit (split_point->split_bbs, new_return_bb->index); - retbnd = find_retbnd (return_bb); } /* When we pass around the value, use existing return block. */ else - { - bitmap_set_bit (split_point->split_bbs, return_bb->index); - retbnd = find_retbnd (return_bb); - } + bitmap_set_bit (split_point->split_bbs, return_bb->index); /* If RETURN_BB has virtual operand PHIs, they must be removed and the virtual operand marked for renaming as we change the CFG in a way that @@ -1434,11 +1391,6 @@ split_function (basic_block return_bb, struct split_point *split_point, } } - /* If the original function is instrumented then it's - part is also instrumented. */ - if (with_bounds) - chkp_function_mark_instrumented (node->decl); - /* If the original function is declared inline, there is no point in issuing a warning for the non-inlinable part. */ DECL_NO_INLINE_WARNING_P (node->decl) = 1; @@ -1474,7 +1426,6 @@ split_function (basic_block return_bb, struct split_point *split_point, args_to_pass[i] = arg; } call = gimple_build_call_vec (node->decl, args_to_pass); - gimple_call_set_with_bounds (call, with_bounds); gimple_set_block (call, DECL_INITIAL (current_function_decl)); args_to_pass.release (); @@ -1618,21 +1569,6 @@ split_function (basic_block return_bb, struct split_point *split_point, } } } - - /* Replace retbnd with new one. */ - if (retbnd) - { - gimple_stmt_iterator bsi; - for (bsi = gsi_last_bb (return_bb); !gsi_end_p (bsi); - gsi_prev (&bsi)) - if (gimple_code (gsi_stmt (bsi)) == GIMPLE_RETURN) - { - retbnd = copy_ssa_name (retbnd, call); - gimple_return_set_retbnd (gsi_stmt (bsi), retbnd); - update_stmt (gsi_stmt (bsi)); - break; - } - } } if (DECL_BY_REFERENCE (DECL_RESULT (current_function_decl))) { @@ -1653,9 +1589,6 @@ split_function (basic_block return_bb, struct split_point *split_point, gsi_insert_after (&gsi, cpy, GSI_NEW_STMT); retval = tem; } - /* Build bndret call to obtain returned bounds. */ - if (retbnd) - chkp_insert_retbnd_call (retbnd, retval, &gsi); gimple_call_set_lhs (call, retval); update_stmt (call); } @@ -1676,10 +1609,6 @@ split_function (basic_block return_bb, struct split_point *split_point, { retval = DECL_RESULT (current_function_decl); - if (chkp_function_instrumented_p (current_function_decl) - && BOUNDED_P (retval)) - retbnd = create_tmp_reg (pointer_bounds_type_node); - /* We use temporary register to hold value when aggregate_value_p is false. Similarly for DECL_BY_REFERENCE we must avoid extra copy. */ @@ -1717,9 +1646,6 @@ split_function (basic_block return_bb, struct split_point *split_point, gsi_insert_after (&gsi, g, GSI_NEW_STMT); } } - /* Build bndret call to obtain returned bounds. */ - if (retbnd) - chkp_insert_retbnd_call (retbnd, retval, &gsi); if (tsan_func_exit_call) gsi_insert_after (&gsi, tsan_func_exit_call, GSI_NEW_STMT); ret = gimple_build_return (retval); diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c index a82852b3ce4..907dc9d0e2b 100644 --- a/gcc/ipa-visibility.c +++ b/gcc/ipa-visibility.c @@ -245,10 +245,6 @@ cgraph_externally_visible_p (struct cgraph_node *node, if (MAIN_NAME_P (DECL_NAME (node->decl))) return true; - if (node->instrumentation_clone - && MAIN_NAME_P (DECL_NAME (node->orig_decl))) - return true; - return false; } diff --git a/gcc/ipa.c b/gcc/ipa.c index 634c69c2b5c..82fc334ec0b 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -240,13 +240,7 @@ walk_polymorphic_call_targets (hash_set *reachable_call_targets, if (ipa_fn_summaries) ipa_update_overall_fn_summary (node); else if (edge->call_stmt) - { - edge->redirect_call_stmt_to_callee (); - - /* Call to __builtin_unreachable shouldn't be instrumented. */ - if (!targets.length ()) - gimple_call_set_with_bounds (edge->call_stmt, false); - } + edge->redirect_call_stmt_to_callee (); } } } @@ -462,20 +456,6 @@ symbol_table::remove_unreachable_nodes (FILE *file) if (cnode->global.inlined_to) body_needed_for_clonning.add (cnode->decl); - /* For instrumentation clones we always need original - function node for proper LTO privatization. */ - if (cnode->instrumentation_clone - && cnode->definition) - { - gcc_assert (cnode->instrumented_version || in_lto_p); - if (cnode->instrumented_version) - { - enqueue_node (cnode->instrumented_version, &first, - &reachable); - reachable.add (cnode->instrumented_version); - } - } - /* For non-inline clones, force their origins to the boundary and ensure that body is not removed. */ while (cnode->clone_of) @@ -643,8 +623,7 @@ symbol_table::remove_unreachable_nodes (FILE *file) } /* Keep body if it may be useful for constant folding. */ if ((flag_wpa || flag_incremental_link == INCREMENTAL_LINK_LTO) - || ((init = ctor_for_folding (vnode->decl)) == error_mark_node - && !POINTER_BOUNDS_P (vnode->decl))) + || ((init = ctor_for_folding (vnode->decl)) == error_mark_node)) vnode->remove_initializer (); else DECL_INITIAL (vnode->decl) = init; @@ -669,10 +648,7 @@ symbol_table::remove_unreachable_nodes (FILE *file) && !node->used_from_other_partition) { if (!node->call_for_symbol_and_aliases - (has_addr_references_p, NULL, true) - && (!node->instrumentation_clone - || !node->instrumented_version - || !node->instrumented_version->address_taken)) + (has_addr_references_p, NULL, true)) { if (file) fprintf (file, " %s", node->name ()); @@ -740,8 +716,6 @@ process_references (varpool_node *vnode, process_references (dyn_cast (ref->referring), written, address_taken, read, explicit_refs); break; - case IPA_REF_CHKP: - gcc_unreachable (); } } @@ -847,9 +821,8 @@ ipa_discover_readonly_nonaddressable_vars (void) } /* Generate and emit a static constructor or destructor. WHICH must - be one of 'I' (for a constructor), 'D' (for a destructor), 'P' - (for chp static vars constructor) or 'B' (for chkp static bounds - constructor). BODY is a STATEMENT_LIST containing GENERIC + be one of 'I' (for a constructor), 'D' (for a destructor). + BODY is a STATEMENT_LIST containing GENERIC statements. PRIORITY is the initialization priority for this constructor or destructor. @@ -912,20 +885,6 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final) DECL_STATIC_CONSTRUCTOR (decl) = 1; decl_init_priority_insert (decl, priority); break; - case 'P': - DECL_STATIC_CONSTRUCTOR (decl) = 1; - DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("chkp ctor"), - NULL, - NULL_TREE); - decl_init_priority_insert (decl, priority); - break; - case 'B': - DECL_STATIC_CONSTRUCTOR (decl) = 1; - DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("bnd_legacy"), - NULL, - NULL_TREE); - decl_init_priority_insert (decl, priority); - break; case 'D': DECL_STATIC_DESTRUCTOR (decl) = 1; decl_fini_priority_insert (decl, priority); @@ -943,9 +902,8 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final) } /* Generate and emit a static constructor or destructor. WHICH must - be one of 'I' (for a constructor), 'D' (for a destructor), 'P' - (for chkp static vars constructor) or 'B' (for chkp static bounds - constructor). BODY is a STATEMENT_LIST containing GENERIC + be one of 'I' (for a constructor) or 'D' (for a destructor). + BODY is a STATEMENT_LIST containing GENERIC statements. PRIORITY is the initialization priority for this constructor or destructor. */ diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 8439babc4fe..a57bda9437d 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. If not see #include "pass_manager.h" #include "ipa-utils.h" #include "omp-offload.h" -#include "ipa-chkp.h" #include "stringpool.h" #include "attribs.h" @@ -544,7 +543,6 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, /* When doing incremental link, we will get new resolution info next time we process the file. */ flag_incremental_link ? LDPR_UNKNOWN : node->resolution); - bp_pack_value (&bp, node->instrumentation_clone, 1); bp_pack_value (&bp, node->split_part, 1); streamer_write_bitpack (&bp); streamer_write_data_stream (ob->main_stream, section, strlen (section) + 1); @@ -564,9 +562,6 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, streamer_write_hwi_stream (ob->main_stream, node->get_init_priority ()); if (DECL_STATIC_DESTRUCTOR (node->decl)) streamer_write_hwi_stream (ob->main_stream, node->get_fini_priority ()); - - if (node->instrumentation_clone) - lto_output_fn_decl_index (ob->decl_state, ob->main_stream, node->orig_decl); } /* Output the varpool NODE to OB. @@ -775,33 +770,11 @@ output_refs (lto_symtab_encoder_t encoder) { symtab_node *node = lto_symtab_encoder_deref (encoder, i); - /* IPA_REF_ALIAS and IPA_REF_CHKP references are always preserved + /* IPA_REF_ALIAS references are always preserved in the boundary. Alias node can't have other references and can be always handled as if it's not in the boundary. */ if (!node->alias && !lto_symtab_encoder_in_partition_p (encoder, node)) - { - cgraph_node *cnode = dyn_cast (node); - /* Output IPA_REF_CHKP reference. */ - if (cnode - && cnode->instrumented_version - && !cnode->instrumentation_clone) - { - for (int i = 0; node->iterate_reference (i, ref); i++) - if (ref->use == IPA_REF_CHKP) - { - if (lto_symtab_encoder_lookup (encoder, ref->referred) - != LCC_NOT_FOUND) - { - int nref = lto_symtab_encoder_lookup (encoder, node); - streamer_write_gcov_count_stream (ob->main_stream, 1); - streamer_write_uhwi_stream (ob->main_stream, nref); - lto_output_ref (ob, ref, encoder); - } - break; - } - } - continue; - } + continue; count = node->ref_list.nreferences (); if (count) @@ -913,8 +886,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder) && (((vnode->ctor_useable_for_folding_p () && (!DECL_VIRTUAL_P (vnode->decl) || !flag_wpa - || flag_ltrans_devirtualize)) - || POINTER_BOUNDS_P (vnode->decl)))) + || flag_ltrans_devirtualize))))) { lto_set_symtab_encoder_encode_initializer (encoder, vnode); create_references (encoder, vnode); @@ -1204,7 +1176,6 @@ input_overwrite_node (struct lto_file_decl_data *file_data, node->parallelized_function = bp_unpack_value (bp, 1); node->resolution = bp_unpack_enum (bp, ld_plugin_symbol_resolution, LDPR_NUM_KNOWN); - node->instrumentation_clone = bp_unpack_value (bp, 1); node->split_part = bp_unpack_value (bp, 1); gcc_assert (flag_ltrans || (!node->in_other_partition @@ -1340,13 +1311,6 @@ input_node (struct lto_file_decl_data *file_data, if (DECL_STATIC_DESTRUCTOR (node->decl)) node->set_fini_priority (streamer_read_hwi (ib)); - if (node->instrumentation_clone) - { - decl_index = streamer_read_uhwi (ib); - fn_decl = lto_file_decl_data_get_fn_decl (file_data, decl_index); - node->orig_decl = fn_decl; - } - return node; } @@ -1588,35 +1552,6 @@ input_cgraph_1 (struct lto_file_decl_data *file_data, = dyn_cast (nodes[ref]); else cnode->global.inlined_to = NULL; - - /* Compute instrumented_version. */ - if (cnode->instrumentation_clone) - { - gcc_assert (cnode->orig_decl); - - cnode->instrumented_version = cgraph_node::get (cnode->orig_decl); - if (cnode->instrumented_version) - { - /* We may have multiple nodes for a single function which - will be merged later. To have a proper merge we need - to keep instrumentation_version reference between nodes - consistent: each instrumented_version reference should - have proper reverse reference. Thus don't break existing - instrumented_version reference if it already exists. */ - if (cnode->instrumented_version->instrumented_version) - cnode->instrumented_version = NULL; - else - cnode->instrumented_version->instrumented_version = cnode; - } - - /* Restore decl names reference except for wrapper functions. */ - if (!chkp_wrap_function (cnode->orig_decl)) - { - tree name = DECL_ASSEMBLER_NAME (cnode->decl); - IDENTIFIER_TRANSPARENT_ALIAS (name) = 1; - TREE_CHAIN (name) = DECL_ASSEMBLER_NAME (cnode->orig_decl); - } - } } ref = (int) (intptr_t) node->same_comdat_group; diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index f77634aae6a..5cf1dce33c6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,11 @@ +2018-06-08 Martin Liska + + * lto-partition.c (add_references_to_partition): Remove support + for MPX (macros, related functions, fields in cgraph_node, ...). + (add_symbol_to_partition_1): Likewise. + (privatize_symbol_name): Likewise. + * lto-symtab.c (lto_cgraph_replace_node): Likewise. + 2018-06-05 Richard Biener * lto.c (cmp_type_location): Expand locations only once. diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index fd796e12a2d..e8207fb7230 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -115,8 +115,7 @@ add_references_to_partition (ltrans_partition part, symtab_node *node) references, too. */ else if (is_a (ref->referred) && (dyn_cast (ref->referred) - ->ctor_useable_for_folding_p () - || POINTER_BOUNDS_P (ref->referred->decl)) + ->ctor_useable_for_folding_p ()) && !lto_symtab_encoder_in_partition_p (part->encoder, ref->referred)) { if (!part->initializers_visited) @@ -185,11 +184,6 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node) for (e = cnode->callers; e; e = e->next_caller) if (e->caller->thunk.thunk_p && !e->caller->global.inlined_to) add_symbol_to_partition_1 (part, e->caller); - - /* Instrumented version is actually the same function. - Therefore put it into the same partition. */ - if (cnode->instrumented_version) - add_symbol_to_partition_1 (part, cnode->instrumented_version); } add_references_to_partition (part, node); @@ -1003,30 +997,6 @@ privatize_symbol_name (symtab_node *node) if (!privatize_symbol_name_1 (node, node->decl)) return false; - /* We could change name which is a target of transparent alias - chain of instrumented function name. Fix alias chain if so .*/ - if (cgraph_node *cnode = dyn_cast (node)) - { - tree iname = NULL_TREE; - if (cnode->instrumentation_clone) - { - /* If we want to privatize instrumentation clone - then we also need to privatize original function. */ - if (cnode->instrumented_version) - privatize_symbol_name (cnode->instrumented_version); - else - privatize_symbol_name_1 (cnode, cnode->orig_decl); - iname = DECL_ASSEMBLER_NAME (cnode->decl); - TREE_CHAIN (iname) = DECL_ASSEMBLER_NAME (cnode->orig_decl); - } - else if (cnode->instrumented_version - && cnode->instrumented_version->orig_decl == cnode->decl) - { - iname = DECL_ASSEMBLER_NAME (cnode->instrumented_version->decl); - TREE_CHAIN (iname) = DECL_ASSEMBLER_NAME (cnode->decl); - } - } - return true; } diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 3663ab7a9b2..b1df9bb77d1 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -89,21 +89,6 @@ lto_cgraph_replace_node (struct cgraph_node *node, } /* Redirect incomming references. */ prevailing_node->clone_referring (node); - - /* Fix instrumentation references. */ - if (node->instrumented_version) - { - gcc_assert (node->instrumentation_clone - == prevailing_node->instrumentation_clone); - node->instrumented_version->instrumented_version = prevailing_node; - if (!prevailing_node->instrumented_version) - prevailing_node->instrumented_version = node->instrumented_version; - /* Need to reset node->instrumented_version to NULL, - otherwise node removal code would reset - node->instrumented_version->instrumented_version. */ - node->instrumented_version = NULL; - } - lto_free_function_in_decl_state_for_node (node); if (node->decl != prevailing_node->decl) diff --git a/gcc/params.def b/gcc/params.def index 6b955a5deec..a3906c26881 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -1238,12 +1238,6 @@ DEFPARAM (PARAM_UNINIT_CONTROL_DEP_ATTEMPTS, "during uninitialized variable analysis.", 1000, 1, 0) -DEFPARAM (PARAM_CHKP_MAX_CTOR_SIZE, - "chkp-max-ctor-size", - "Maximum number of statements to be included into a single static " - "constructor generated by Pointer Bounds Checker.", - 5000, 100, 0) - DEFPARAM (PARAM_FSM_SCALE_PATH_STMTS, "fsm-scale-path-stmts", "Scale factor to apply to the number of statements in a threading path when comparing to the number of (scaled) blocks.", diff --git a/gcc/passes.c b/gcc/passes.c index 2c711f0c0b0..ee42009b620 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -117,8 +117,6 @@ void pass_manager::execute_early_local_passes () { execute_pass_list (cfun, pass_build_ssa_passes_1->sub); - if (flag_check_pointer_bounds) - execute_pass_list (cfun, pass_chkp_instrumentation_passes_1->sub); execute_pass_list (cfun, pass_local_optimization_passes_1->sub); } @@ -432,36 +430,6 @@ public: }; // class pass_build_ssa_passes -const pass_data pass_data_chkp_instrumentation_passes = -{ - SIMPLE_IPA_PASS, /* type */ - "chkp_passes", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0, /* todo_flags_finish */ -}; - -class pass_chkp_instrumentation_passes : public simple_ipa_opt_pass -{ -public: - pass_chkp_instrumentation_passes (gcc::context *ctxt) - : simple_ipa_opt_pass (pass_data_chkp_instrumentation_passes, ctxt) - {} - - /* opt_pass methods: */ - virtual bool gate (function *) - { - /* Don't bother doing anything if the program has errors. */ - return (flag_check_pointer_bounds - && !seen_error () && !in_lto_p); - } - -}; // class pass_chkp_instrumentation_passes - const pass_data pass_data_local_optimization_passes = { SIMPLE_IPA_PASS, /* type */ @@ -499,12 +467,6 @@ make_pass_build_ssa_passes (gcc::context *ctxt) return new pass_build_ssa_passes (ctxt); } -simple_ipa_opt_pass * -make_pass_chkp_instrumentation_passes (gcc::context *ctxt) -{ - return new pass_chkp_instrumentation_passes (ctxt); -} - simple_ipa_opt_pass * make_pass_local_optimization_passes (gcc::context *ctxt) { diff --git a/gcc/passes.def b/gcc/passes.def index 055d354f959..2a8fbc2efbe 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -51,8 +51,6 @@ along with GCC; see the file COPYING3. If not see INSERT_PASSES_AFTER (all_small_ipa_passes) NEXT_PASS (pass_ipa_free_lang_data); NEXT_PASS (pass_ipa_function_and_variable_visibility); - NEXT_PASS (pass_ipa_chkp_versioning); - NEXT_PASS (pass_ipa_chkp_early_produce_thunks); NEXT_PASS (pass_build_ssa_passes); PUSH_INSERT_PASSES_WITHIN (pass_build_ssa_passes) NEXT_PASS (pass_fixup_cfg); @@ -64,13 +62,6 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_rebuild_cgraph_edges); POP_INSERT_PASSES () - NEXT_PASS (pass_chkp_instrumentation_passes); - PUSH_INSERT_PASSES_WITHIN (pass_chkp_instrumentation_passes) - NEXT_PASS (pass_fixup_cfg); - NEXT_PASS (pass_chkp); - NEXT_PASS (pass_rebuild_cgraph_edges); - POP_INSERT_PASSES () - NEXT_PASS (pass_local_optimization_passes); PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes) NEXT_PASS (pass_fixup_cfg); @@ -138,7 +129,6 @@ along with GCC; see the file COPYING3. If not see POP_INSERT_PASSES () NEXT_PASS (pass_target_clone); - NEXT_PASS (pass_ipa_chkp_produce_thunks); NEXT_PASS (pass_ipa_auto_profile); NEXT_PASS (pass_ipa_tree_profile); PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile) @@ -211,7 +201,6 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_thread_jumps); NEXT_PASS (pass_vrp, true /* warn_array_bounds_p */); - NEXT_PASS (pass_chkp_opt); NEXT_PASS (pass_dce); NEXT_PASS (pass_stdarg); NEXT_PASS (pass_call_cdce); diff --git a/gcc/rtl-chkp.c b/gcc/rtl-chkp.c deleted file mode 100644 index 0149349ce08..00000000000 --- a/gcc/rtl-chkp.c +++ /dev/null @@ -1,302 +0,0 @@ -/* RTL manipulation functions exported by Pointer Bounds Checker. - Copyright (C) 2014-2018 Free Software Foundation, Inc. - Contributed by Ilya Enkovich (ilya.enkovich@intel.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "target.h" -#include "rtl.h" -#include "tree.h" -#include "memmodel.h" -#include "emit-rtl.h" -#include "expr.h" -#include "rtl-chkp.h" -#include "tree-chkp.h" - -static hash_map *chkp_rtx_bounds_map; - -/* Get bounds rtx associated with NODE via - chkp_set_rtl_bounds call. */ -rtx -chkp_get_rtl_bounds (tree node) -{ - rtx *slot; - - if (!chkp_rtx_bounds_map) - return NULL_RTX; - - slot = chkp_rtx_bounds_map->get (node); - return slot ? *slot : NULL_RTX; -} - -/* Associate bounds rtx VAL with NODE. */ -void -chkp_set_rtl_bounds (tree node, rtx val) -{ - if (!chkp_rtx_bounds_map) - chkp_rtx_bounds_map = new hash_map; - - chkp_rtx_bounds_map->put (node, val); -} - -/* Reset all bounds stored via chkp_set_rtl_bounds. */ -void -chkp_reset_rtl_bounds () -{ - if (!chkp_rtx_bounds_map) - return; - - delete chkp_rtx_bounds_map; - chkp_rtx_bounds_map = NULL; -} - -/* Split SLOT identifying slot for function value or - argument into two parts SLOT_VAL and SLOT_BND. - First is the slot for regular value and the other one is - for bounds. */ -void -chkp_split_slot (rtx slot, rtx *slot_val, rtx *slot_bnd) -{ - int i; - int val_num = 0; - int bnd_num = 0; - rtx *val_tmps; - rtx *bnd_tmps; - - *slot_bnd = 0; - - if (!slot - || GET_CODE (slot) != PARALLEL) - { - *slot_val = slot; - return; - } - - val_tmps = XALLOCAVEC (rtx, XVECLEN (slot, 0)); - bnd_tmps = XALLOCAVEC (rtx, XVECLEN (slot, 0)); - - for (i = 0; i < XVECLEN (slot, 0); i++) - { - rtx elem = XVECEXP (slot, 0, i); - rtx reg = GET_CODE (elem) == EXPR_LIST ? XEXP (elem, 0) : elem; - - if (!reg) - continue; - - if (POINTER_BOUNDS_MODE_P (GET_MODE (reg)) || CONST_INT_P (reg)) - bnd_tmps[bnd_num++] = elem; - else - val_tmps[val_num++] = elem; - } - - gcc_assert (val_num); - - if (!bnd_num) - { - *slot_val = slot; - return; - } - - if ((GET_CODE (val_tmps[0]) == EXPR_LIST) || (val_num > 1)) - *slot_val = gen_rtx_PARALLEL (GET_MODE (slot), - gen_rtvec_v (val_num, val_tmps)); - else - *slot_val = val_tmps[0]; - - if ((GET_CODE (bnd_tmps[0]) == EXPR_LIST) || (bnd_num > 1)) - *slot_bnd = gen_rtx_PARALLEL (VOIDmode, - gen_rtvec_v (bnd_num, bnd_tmps)); - else - *slot_bnd = bnd_tmps[0]; -} - -/* Join previously splitted to VAL and BND rtx for function - value or argument and return it. */ -rtx -chkp_join_splitted_slot (rtx val, rtx bnd) -{ - rtx res; - int i, n = 0; - - if (!bnd) - return val; - - if (GET_CODE (val) == PARALLEL) - n += XVECLEN (val, 0); - else - n++; - - if (GET_CODE (bnd) == PARALLEL) - n += XVECLEN (bnd, 0); - else - n++; - - res = gen_rtx_PARALLEL (GET_MODE (val), rtvec_alloc (n)); - - n = 0; - - if (GET_CODE (val) == PARALLEL) - for (i = 0; i < XVECLEN (val, 0); i++) - XVECEXP (res, 0, n++) = XVECEXP (val, 0, i); - else - XVECEXP (res, 0, n++) = val; - - if (GET_CODE (bnd) == PARALLEL) - for (i = 0; i < XVECLEN (bnd, 0); i++) - XVECEXP (res, 0, n++) = XVECEXP (bnd, 0, i); - else - XVECEXP (res, 0, n++) = bnd; - - return res; -} - -/* If PAR is PARALLEL holding registers then transform - it into PARALLEL holding EXPR_LISTs of those regs - and zero constant (similar to how function value - on multiple registers looks like). */ -void -chkp_put_regs_to_expr_list (rtx par) -{ - int n; - - if (GET_CODE (par) != PARALLEL - || GET_CODE (XVECEXP (par, 0, 0)) == EXPR_LIST) - return; - - for (n = 0; n < XVECLEN (par, 0); n++) - XVECEXP (par, 0, n) = gen_rtx_EXPR_LIST (VOIDmode, - XVECEXP (par, 0, n), - const0_rtx); -} - -/* Search rtx PAR describing function return value for an - item related to value at offset OFFS and return it. - Return NULL if item was not found. */ -rtx -chkp_get_value_with_offs (rtx par, rtx offs) -{ - int n; - - gcc_assert (GET_CODE (par) == PARALLEL); - - for (n = 0; n < XVECLEN (par, 0); n++) - { - rtx par_offs = XEXP (XVECEXP (par, 0, n), 1); - if (INTVAL (offs) == INTVAL (par_offs)) - return XEXP (XVECEXP (par, 0, n), 0); - } - - return NULL; -} - -/* Emit instructions to store BOUNDS for pointer VALUE - stored in MEM. - Function is used by expand to pass bounds for args - passed on stack. */ -void -chkp_emit_bounds_store (rtx bounds, rtx value, rtx mem) -{ - gcc_assert (MEM_P (mem)); - - if (REG_P (bounds) || CONST_INT_P (bounds)) - { - rtx ptr; - - if (REG_P (value)) - ptr = value; - else - { - rtx slot = adjust_address (value, Pmode, 0); - ptr = gen_reg_rtx (Pmode); - emit_move_insn (ptr, slot); - } - - if (CONST_INT_P (bounds)) - bounds = targetm.calls.load_bounds_for_arg (value, ptr, bounds); - - targetm.calls.store_bounds_for_arg (ptr, mem, - bounds, NULL); - } - else - { - int i; - - gcc_assert (GET_CODE (bounds) == PARALLEL); - gcc_assert (GET_CODE (value) == PARALLEL || MEM_P (value) || REG_P (value)); - - for (i = 0; i < XVECLEN (bounds, 0); i++) - { - rtx reg = XEXP (XVECEXP (bounds, 0, i), 0); - rtx offs = XEXP (XVECEXP (bounds, 0, i), 1); - rtx slot = adjust_address (mem, Pmode, INTVAL (offs)); - rtx ptr; - - if (GET_CODE (value) == PARALLEL) - ptr = chkp_get_value_with_offs (value, offs); - else if (MEM_P (value)) - { - rtx tmp = adjust_address (value, Pmode, INTVAL (offs)); - ptr = gen_reg_rtx (Pmode); - emit_move_insn (ptr, tmp); - } - else - ptr = gen_rtx_SUBREG (Pmode, value, INTVAL (offs)); - - targetm.calls.store_bounds_for_arg (ptr, slot, reg, NULL); - } - } -} - -/* Emit code to copy bounds for structure VALUE of type TYPE - copied to SLOT. */ -void -chkp_copy_bounds_for_stack_parm (rtx slot, rtx value, tree type) -{ - bitmap have_bound; - bitmap_iterator bi; - unsigned i; - rtx tmp = NULL, bnd; - - gcc_assert (TYPE_SIZE (type)); - gcc_assert (MEM_P (value)); - gcc_assert (MEM_P (slot)); - gcc_assert (RECORD_OR_UNION_TYPE_P (type)); - - bitmap_obstack_initialize (NULL); - have_bound = BITMAP_ALLOC (NULL); - chkp_find_bound_slots (type, have_bound); - - EXECUTE_IF_SET_IN_BITMAP (have_bound, 0, i, bi) - { - rtx ptr = adjust_address (value, Pmode, i * POINTER_SIZE / 8); - rtx to = adjust_address (slot, Pmode, i * POINTER_SIZE / 8); - - if (!tmp) - tmp = gen_reg_rtx (Pmode); - - emit_move_insn (tmp, ptr); - bnd = targetm.calls.load_bounds_for_arg (ptr, tmp, NULL); - targetm.calls.store_bounds_for_arg (tmp, to, bnd, NULL); - } - - BITMAP_FREE (have_bound); - bitmap_obstack_release (NULL); -} diff --git a/gcc/rtl-chkp.h b/gcc/rtl-chkp.h deleted file mode 100644 index ac4f5cf1678..00000000000 --- a/gcc/rtl-chkp.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Declaration of interface functions of Pointer Bounds Checker. - Copyright (C) 2014-2018 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 -. */ - -#ifndef GCC_RTL_CHKP_H -#define GCC_RTL_CHKP_H - -#define DECL_BOUNDS_RTL(NODE) (chkp_get_rtl_bounds (DECL_WRTL_CHECK (NODE))) - -#define SET_DECL_BOUNDS_RTL(NODE, VAL) \ - (chkp_set_rtl_bounds (DECL_WRTL_CHECK (NODE), VAL)) - -extern rtx chkp_get_rtl_bounds (tree node); -extern void chkp_set_rtl_bounds (tree node, rtx val); -extern void chkp_reset_rtl_bounds (); -extern void chkp_split_slot (rtx slot, rtx *slot_val, rtx *slot_bnd); -extern rtx chkp_join_splitted_slot (rtx val, rtx bnd); -extern rtx chkp_get_value_with_offs (rtx par, rtx offs); -extern void chkp_copy_bounds_for_stack_parm (rtx slot, rtx value, tree type); -extern void chkp_emit_bounds_store (rtx bounds, rtx value, rtx mem); -extern void chkp_put_regs_to_expr_list (rtx par); - -#endif /* GCC_RTL_CHKP_H */ diff --git a/gcc/rtl.h b/gcc/rtl.h index 0341ba01614..bd610e28f43 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -321,7 +321,6 @@ struct GTY((desc("0"), tag("0"), 1 in a VALUE is SP_BASED_VALUE_P in cselib.c. 1 in a SUBREG generated by LRA for reload insns. 1 in a REG if this is a static chain register. - 1 in a CALL for calls instrumented by Pointer Bounds Checker. Dumped as "/j" in RTL dumps. */ unsigned int jump : 1; /* In a CODE_LABEL, part of the two-bit alternate entry field. @@ -2515,10 +2514,6 @@ do { \ #define LRA_SUBREG_P(RTX) \ (RTL_FLAG_CHECK1 ("LRA_SUBREG_P", (RTX), SUBREG)->jump) -/* True if call is instrumented by Pointer Bounds Checker. */ -#define CALL_EXPR_WITH_BOUNDS_P(RTX) \ - (RTL_FLAG_CHECK1 ("CALL_EXPR_WITH_BOUNDS_P", (RTX), CALL)->jump) - /* Access various components of an ASM_OPERANDS rtx. */ #define ASM_OPERANDS_TEMPLATE(RTX) XCSTR (RTX, 0, ASM_OPERANDS) diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index dd08165e606..ad970019e01 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -2389,11 +2389,6 @@ layout_type (tree type) SET_TYPE_MODE (type, VOIDmode); break; - case POINTER_BOUNDS_TYPE: - TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type))); - TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type))); - break; - case OFFSET_TYPE: TYPE_SIZE (type) = bitsize_int (POINTER_SIZE); TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE_UNITS); diff --git a/gcc/symtab.c b/gcc/symtab.c index 67e14d76b11..c5464cbe6d7 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -39,7 +39,7 @@ along with GCC; see the file COPYING3. If not see #include "attribs.h" #include "builtins.h" -static const char *ipa_ref_use_name[] = {"read","write","addr","alias","chkp"}; +static const char *ipa_ref_use_name[] = {"read","write","addr","alias"}; const char * const ld_plugin_symbol_resolution_names[]= { diff --git a/gcc/target.def b/gcc/target.def index 2f7bca99ec2..472a593c346 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2369,107 +2369,6 @@ built-in function.", (tree exp, rtx target, rtx subtarget, machine_mode mode, int ignore), default_expand_builtin) -DEFHOOK -(builtin_chkp_function, - "This hook allows target to redefine built-in functions used by\n\ -Pointer Bounds Checker for code instrumentation. Hook should return\n\ -fndecl of function implementing generic builtin whose code is\n\ -passed in @var{fcode}. Currently following built-in functions are\n\ -obtained using this hook:\n\ -@deftypefn {Built-in Function} __bounds_type __chkp_bndmk (const void *@var{lb}, size_t @var{size})\n\ -Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used\n\ -by Pointer Bounds Checker to create bound values. @var{lb} holds low\n\ -bound of the resulting bounds. @var{size} holds size of created bounds.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndstx (const void *@var{ptr}, __bounds_type @var{b}, const void **@var{loc})\n\ -Function code - @code{BUILT_IN_CHKP_BNDSTX}. This built-in function is used\n\ -by Pointer Bounds Checker to store bounds @var{b} for pointer @var{ptr}\n\ -when @var{ptr} is stored by address @var{loc}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} __bounds_type __chkp_bndldx (const void **@var{loc}, const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDLDX}. This built-in function is used\n\ -by Pointer Bounds Checker to get bounds of pointer @var{ptr} loaded by\n\ -address @var{loc}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndcl (const void *@var{ptr}, __bounds_type @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_BNDCL}. This built-in function is used\n\ -by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ -lower bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndcu (const void *@var{ptr}, __bounds_type @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_BNDCU}. This built-in function is used\n\ -by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ -upper bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} __bounds_type __chkp_bndret (void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDRET}. This built-in function is used\n\ -by Pointer Bounds Checker to obtain bounds returned by a call statement.\n\ -@var{ptr} passed to built-in is @code{SSA_NAME} returned by the call.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} __bounds_type __chkp_intersect (__bounds_type @var{b1}, __bounds_type @var{b2})\n\ -Function code - @code{BUILT_IN_CHKP_INTERSECT}. This built-in function\n\ -returns intersection of bounds @var{b1} and @var{b2}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} __bounds_type __chkp_narrow (const void *@var{ptr}, __bounds_type @var{b}, size_t @var{s})\n\ -Function code - @code{BUILT_IN_CHKP_NARROW}. This built-in function\n\ -returns intersection of bounds @var{b} and\n\ -[@var{ptr}, @var{ptr} + @var{s} - @code{1}].\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} size_t __chkp_sizeof (const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_SIZEOF}. This built-in function\n\ -returns size of object referenced by @var{ptr}. @var{ptr} is always\n\ -@code{ADDR_EXPR} of @code{VAR_DECL}. This built-in is used by\n\ -Pointer Bounds Checker when bounds of object cannot be computed statically\n\ -(e.g. object has incomplete type).\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} const void *__chkp_extract_lower (__bounds_type @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_EXTRACT_LOWER}. This built-in function\n\ -returns lower bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} const void *__chkp_extract_upper (__bounds_type @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_EXTRACT_UPPER}. This built-in function\n\ -returns upper bound of bounds @var{b}.\n\ -@end deftypefn", - tree, (unsigned fcode), - default_builtin_chkp_function) - -DEFHOOK -(chkp_bound_type, - "Return type to be used for bounds", - tree, (void), - default_chkp_bound_type) - -DEFHOOK -(chkp_bound_mode, - "Return mode to be used for bounds.", - machine_mode, (void), - default_chkp_bound_mode) - -DEFHOOK -(chkp_make_bounds_constant, - "Return constant used to statically initialize constant bounds\n\ -with specified lower bound @var{lb} and upper bounds @var{ub}.", - tree, (HOST_WIDE_INT lb, HOST_WIDE_INT ub), - default_chkp_make_bounds_constant) - -DEFHOOK -(chkp_initialize_bounds, - "Generate a list of statements @var{stmts} to initialize pointer\n\ -bounds variable @var{var} with bounds @var{lb} and @var{ub}. Return\n\ -the number of generated statements.", - int, (tree var, tree lb, tree ub, tree *stmts), - default_chkp_initialize_bounds) - /* Select a replacement for a target-specific builtin. This is done *before* regular type checking, and so allows the target to implement a crude form of function overloading. The result is a @@ -4920,15 +4819,6 @@ aggregate data types, because these are returned in another way. See\n\ rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing), default_function_value) -/* Return the rtx for bounds of returned pointer. */ -DEFHOOK -(chkp_function_value_bounds, - "Define this to return an RTX representing the place where a function\n\ -returns bounds for returned pointers. Arguments meaning is similar to\n\ -@code{TARGET_FUNCTION_VALUE}.", - rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing), - default_chkp_function_value_bounds) - /* Return the rtx for the result of a libcall of mode MODE, calling the function FN_NAME. */ DEFHOOK diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 749e24ae178..51b0dcac111 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -2222,53 +2222,6 @@ std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, return build_va_arg_indirect_ref (addr); } -tree -default_chkp_bound_type (void) -{ - tree res = make_node (POINTER_BOUNDS_TYPE); - TYPE_PRECISION (res) = TYPE_PRECISION (size_type_node) * 2; - TYPE_NAME (res) = get_identifier ("__bounds_type"); - SET_TYPE_MODE (res, targetm.chkp_bound_mode ()); - layout_type (res); - return res; -} - -machine_mode -default_chkp_bound_mode (void) -{ - return VOIDmode; -} - -tree -default_builtin_chkp_function (unsigned int fcode ATTRIBUTE_UNUSED) -{ - return NULL_TREE; -} - -rtx -default_chkp_function_value_bounds (const_tree ret_type ATTRIBUTE_UNUSED, - const_tree fn_decl_or_type ATTRIBUTE_UNUSED, - bool outgoing ATTRIBUTE_UNUSED) -{ - gcc_unreachable (); -} - -tree -default_chkp_make_bounds_constant (HOST_WIDE_INT lb ATTRIBUTE_UNUSED, - HOST_WIDE_INT ub ATTRIBUTE_UNUSED) -{ - return NULL_TREE; -} - -int -default_chkp_initialize_bounds (tree var ATTRIBUTE_UNUSED, - tree lb ATTRIBUTE_UNUSED, - tree ub ATTRIBUTE_UNUSED, - tree *stmts ATTRIBUTE_UNUSED) -{ - return 0; -} - void default_setup_incoming_vararg_bounds (cumulative_args_t ca ATTRIBUTE_UNUSED, machine_mode mode ATTRIBUTE_UNUSED, diff --git a/gcc/targhooks.h b/gcc/targhooks.h index 56951556525..b6a8fa544f7 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -266,13 +266,6 @@ extern rtx default_load_bounds_for_arg (rtx, rtx, rtx); extern void default_store_bounds_for_arg (rtx, rtx, rtx, rtx); extern rtx default_load_returned_bounds (rtx); extern void default_store_returned_bounds (rtx,rtx); -extern tree default_chkp_bound_type (void); -extern machine_mode default_chkp_bound_mode (void); -extern tree default_builtin_chkp_function (unsigned int); -extern rtx default_chkp_function_value_bounds (const_tree, const_tree, bool); -extern tree default_chkp_make_bounds_constant (HOST_WIDE_INT lb, HOST_WIDE_INT ub); -extern int default_chkp_initialize_bounds (tree var, tree lb, tree ub, - tree *stmts); extern void default_setup_incoming_vararg_bounds (cumulative_args_t ca ATTRIBUTE_UNUSED, machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ebd9880ac01..c5510f140f6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,394 @@ +2018-06-08 Martin Liska + + * g++.dg/dg.exp: Do not use mpx.exp. + * g++.dg/lto/lto.exp: Likewise. + * g++.dg/lto/pr69729_0.C: Remove. + * g++.dg/opt/pr71529.C: Remove. + * g++.dg/pr63995-1.C: Remove. + * g++.dg/pr68270.C: Remove. + * g++.dg/pr71624.C: Remove. + * g++.dg/pr71633.C: Remove. + * g++.dg/pr79761.C: Remove. + * g++.dg/pr79764.C: Remove. + * g++.dg/pr79769.C: Remove. + * gcc.dg/lto/chkp-privatize-1_0.c: Remove. + * gcc.dg/lto/chkp-privatize-2_0.c: Remove. + * gcc.dg/lto/chkp-privatize_0.c: Remove. + * gcc.dg/lto/chkp-removed-alias_0.c: Remove. + * gcc.dg/lto/chkp-static-bounds_0.c: Remove. + * gcc.dg/lto/chkp-wrap-asm-name_0.c: Remove. + * gcc.dg/lto/lto.exp: Do not use mpx.exp. + * gcc.dg/lto/pr66221_0.c: Remove. + * gcc.target/i386/chkp-always_inline.c: Remove. + * gcc.target/i386/chkp-bndret.c: Remove. + * gcc.target/i386/chkp-builtins-1.c: Remove. + * gcc.target/i386/chkp-builtins-2.c: Remove. + * gcc.target/i386/chkp-builtins-3.c: Remove. + * gcc.target/i386/chkp-builtins-4.c: Remove. + * gcc.target/i386/chkp-const-check-1.c: Remove. + * gcc.target/i386/chkp-const-check-2.c: Remove. + * gcc.target/i386/chkp-hidden-def.c: Remove. + * gcc.target/i386/chkp-label-address.c: Remove. + * gcc.target/i386/chkp-lifetime-1.c: Remove. + * gcc.target/i386/chkp-narrow-bounds.c: Remove. + * gcc.target/i386/chkp-pr69044.c: Remove. + * gcc.target/i386/chkp-remove-bndint-1.c: Remove. + * gcc.target/i386/chkp-remove-bndint-2.c: Remove. + * gcc.target/i386/chkp-strchr.c: Remove. + * gcc.target/i386/chkp-strlen-1.c: Remove. + * gcc.target/i386/chkp-strlen-2.c: Remove. + * gcc.target/i386/chkp-strlen-3.c: Remove. + * gcc.target/i386/chkp-strlen-4.c: Remove. + * gcc.target/i386/chkp-strlen-5.c: Remove. + * gcc.target/i386/chkp-stropt-1.c: Remove. + * gcc.target/i386/chkp-stropt-10.c: Remove. + * gcc.target/i386/chkp-stropt-11.c: Remove. + * gcc.target/i386/chkp-stropt-12.c: Remove. + * gcc.target/i386/chkp-stropt-13.c: Remove. + * gcc.target/i386/chkp-stropt-14.c: Remove. + * gcc.target/i386/chkp-stropt-15.c: Remove. + * gcc.target/i386/chkp-stropt-16.c: Remove. + * gcc.target/i386/chkp-stropt-17.c: Remove. + * gcc.target/i386/chkp-stropt-2.c: Remove. + * gcc.target/i386/chkp-stropt-3.c: Remove. + * gcc.target/i386/chkp-stropt-4.c: Remove. + * gcc.target/i386/chkp-stropt-5.c: Remove. + * gcc.target/i386/chkp-stropt-6.c: Remove. + * gcc.target/i386/chkp-stropt-7.c: Remove. + * gcc.target/i386/chkp-stropt-8.c: Remove. + * gcc.target/i386/chkp-stropt-9.c: Remove. + * gcc.target/i386/i386.exp: Do not use mpx.exp. + * gcc.target/i386/indirect-thunk-11.c: Remove. + * gcc.target/i386/indirect-thunk-12.c: Remove. + * gcc.target/i386/indirect-thunk-attr-12.c: Remove. + * gcc.target/i386/indirect-thunk-attr-13.c: Remove. + * gcc.target/i386/indirect-thunk-bnd-1.c: Remove. + * gcc.target/i386/indirect-thunk-bnd-2.c: Remove. + * gcc.target/i386/indirect-thunk-bnd-3.c: Remove. + * gcc.target/i386/indirect-thunk-bnd-4.c: Remove. + * gcc.target/i386/interrupt-bnd-err-1.c: Remove. + * gcc.target/i386/interrupt-bnd-err-2.c: Remove. + * gcc.target/i386/mpx/alloca-1-lbv.c: Remove. + * gcc.target/i386/mpx/alloca-1-nov.c: Remove. + * gcc.target/i386/mpx/alloca-1-ubv.c: Remove. + * gcc.target/i386/mpx/arg-addr-1-lbv.c: Remove. + * gcc.target/i386/mpx/arg-addr-1-nov.c: Remove. + * gcc.target/i386/mpx/arg-addr-1-ubv.c: Remove. + * gcc.target/i386/mpx/bitfields-1-lbv.c: Remove. + * gcc.target/i386/mpx/bitfields-1-nov.c: Remove. + * gcc.target/i386/mpx/bitfields-1-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c: Remove. + * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c: Remove. + * gcc.target/i386/mpx/calloc-1-lbv.c: Remove. + * gcc.target/i386/mpx/calloc-1-nov.c: Remove. + * gcc.target/i386/mpx/calloc-1-ubv.c: Remove. + * gcc.target/i386/mpx/chkp-fix-calls-1.c: Remove. + * gcc.target/i386/mpx/chkp-fix-calls-2.c: Remove. + * gcc.target/i386/mpx/chkp-fix-calls-3.c: Remove. + * gcc.target/i386/mpx/chkp-fix-calls-4.c: Remove. + * gcc.target/i386/mpx/chkp-thunk-comdat-1.cc: Remove. + * gcc.target/i386/mpx/chkp-thunk-comdat-2.cc: Remove. + * gcc.target/i386/mpx/chkp-thunk-comdat-3.c: Remove. + * gcc.target/i386/mpx/fastcall-1-lbv.c: Remove. + * gcc.target/i386/mpx/fastcall-1-nov.c: Remove. + * gcc.target/i386/mpx/fastcall-1-ubv.c: Remove. + * gcc.target/i386/mpx/fastcall-2-lbv.c: Remove. + * gcc.target/i386/mpx/fastcall-2-nov.c: Remove. + * gcc.target/i386/mpx/fastcall-2-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-1-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-1-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-1-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-10-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-10-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-10-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-2-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-2-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-2-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-3-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-3-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-3-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-4-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-4-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-4-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-5-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-5-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-5-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-6-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-6-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-6-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-7-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-7-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-7-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-8-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-8-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-8-ubv.c: Remove. + * gcc.target/i386/mpx/field-addr-9-lbv.c: Remove. + * gcc.target/i386/mpx/field-addr-9-nov.c: Remove. + * gcc.target/i386/mpx/field-addr-9-ubv.c: Remove. + * gcc.target/i386/mpx/frame-address-1-nov.c: Remove. + * gcc.target/i386/mpx/hard-reg-1-nov.c: Remove. + * gcc.target/i386/mpx/hard-reg-2-lbv.c: Remove. + * gcc.target/i386/mpx/hard-reg-2-nov.c: Remove. + * gcc.target/i386/mpx/hard-reg-2-ubv.c: Remove. + * gcc.target/i386/mpx/if-stmt-1-lbv.c: Remove. + * gcc.target/i386/mpx/if-stmt-1-nov.c: Remove. + * gcc.target/i386/mpx/if-stmt-1-ubv.c: Remove. + * gcc.target/i386/mpx/if-stmt-2-lbv.c: Remove. + * gcc.target/i386/mpx/if-stmt-2-nov.c: Remove. + * gcc.target/i386/mpx/if-stmt-2-ubv.c: Remove. + * gcc.target/i386/mpx/label-address-1.c: Remove. + * gcc.target/i386/mpx/legacy-1-nov.c: Remove. + * gcc.target/i386/mpx/macro.c: Remove. + * gcc.target/i386/mpx/malloc-1-lbv.c: Remove. + * gcc.target/i386/mpx/malloc-1-nov.c: Remove. + * gcc.target/i386/mpx/malloc-1-ubv.c: Remove. + * gcc.target/i386/mpx/memcpy-1.c: Remove. + * gcc.target/i386/mpx/memmove-1.c: Remove. + * gcc.target/i386/mpx/memmove-2.c: Remove. + * gcc.target/i386/mpx/memmove-zero-length.c: Remove. + * gcc.target/i386/mpx/mpx-check.h: Remove. + * gcc.target/i386/mpx/mpx-os-support.h: Remove. + * gcc.target/i386/mpx/mpx.exp: Remove. + * gcc.target/i386/mpx/nested-function-1-lbv.c: Remove. + * gcc.target/i386/mpx/nested-function-1-nov.c: Remove. + * gcc.target/i386/mpx/nested-function-1-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-1-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-1-nov.c: Remove. + * gcc.target/i386/mpx/pointer-arg-1-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-2-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-2-nov.c: Remove. + * gcc.target/i386/mpx/pointer-arg-2-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-3-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-3-nov.c: Remove. + * gcc.target/i386/mpx/pointer-arg-3-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-4-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-4-nov.c: Remove. + * gcc.target/i386/mpx/pointer-arg-4-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-5-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-arg-5-nov.c: Remove. + * gcc.target/i386/mpx/pointer-arg-5-ubv.c: Remove. + * gcc.target/i386/mpx/pointer-diff-1.c: Remove. + * gcc.target/i386/mpx/pointer-store-1-lbv.c: Remove. + * gcc.target/i386/mpx/pointer-store-1-nov.c: Remove. + * gcc.target/i386/mpx/pointer-store-1-ubv.c: Remove. + * gcc.target/i386/mpx/pr65508.c: Remove. + * gcc.target/i386/mpx/pr65531.cc: Remove. + * gcc.target/i386/mpx/pr66048.cc: Remove. + * gcc.target/i386/mpx/pr66134.c: Remove. + * gcc.target/i386/mpx/pr66566.c: Remove. + * gcc.target/i386/mpx/pr66567.c: Remove. + * gcc.target/i386/mpx/pr66568.c: Remove. + * gcc.target/i386/mpx/pr66569.c: Remove. + * gcc.target/i386/mpx/pr66581.c: Remove. + * gcc.target/i386/mpx/pr68337-1.c: Remove. + * gcc.target/i386/mpx/pr68337-2.c: Remove. + * gcc.target/i386/mpx/pr68416.c: Remove. + * gcc.target/i386/mpx/pr78339.c: Remove. + * gcc.target/i386/mpx/pr79631.c: Remove. + * gcc.target/i386/mpx/pr79633.c: Remove. + * gcc.target/i386/mpx/pr79753.c: Remove. + * gcc.target/i386/mpx/pr79770.c: Remove. + * gcc.target/i386/mpx/pr79987.c: Remove. + * gcc.target/i386/mpx/pr79988.c: Remove. + * gcc.target/i386/mpx/realloc-1-lbv.c: Remove. + * gcc.target/i386/mpx/realloc-1-nov.c: Remove. + * gcc.target/i386/mpx/realloc-1-ubv.c: Remove. + * gcc.target/i386/mpx/realloc-2-lbv.c: Remove. + * gcc.target/i386/mpx/realloc-2-nov.c: Remove. + * gcc.target/i386/mpx/realloc-2-ubv.c: Remove. + * gcc.target/i386/mpx/reference-1-lbv.cpp: Remove. + * gcc.target/i386/mpx/reference-1-nov.cpp: Remove. + * gcc.target/i386/mpx/reference-1-ubv.cpp: Remove. + * gcc.target/i386/mpx/reference-2-lbv.cpp: Remove. + * gcc.target/i386/mpx/reference-2-nov.cpp: Remove. + * gcc.target/i386/mpx/reference-2-ubv.cpp: Remove. + * gcc.target/i386/mpx/reference-3-lbv.cpp: Remove. + * gcc.target/i386/mpx/reference-3-nov.cpp: Remove. + * gcc.target/i386/mpx/reference-3-ubv.cpp: Remove. + * gcc.target/i386/mpx/reference-4-lbv.cpp: Remove. + * gcc.target/i386/mpx/reference-4-nov.cpp: Remove. + * gcc.target/i386/mpx/reference-4-ubv.cpp: Remove. + * gcc.target/i386/mpx/return-pointer-1-lbv.c: Remove. + * gcc.target/i386/mpx/return-pointer-1-nov.c: Remove. + * gcc.target/i386/mpx/return-pointer-1-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-1-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-1-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-1-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-2-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-2-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-2-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-3-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-3-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-3-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-4-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-4-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-4-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-5-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-5-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-5-ubv.c: Remove. + * gcc.target/i386/mpx/return-struct-6-lbv.c: Remove. + * gcc.target/i386/mpx/return-struct-6-nov.c: Remove. + * gcc.target/i386/mpx/return-struct-6-ubv.c: Remove. + * gcc.target/i386/mpx/sincos-1-nov.c: Remove. + * gcc.target/i386/mpx/static-array-1-lbv.c: Remove. + * gcc.target/i386/mpx/static-array-1-nov.c: Remove. + * gcc.target/i386/mpx/static-array-1-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-1-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-1-nov.c: Remove. + * gcc.target/i386/mpx/static-init-1-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-2-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-2-nov.c: Remove. + * gcc.target/i386/mpx/static-init-2-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-3-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-3-nov.c: Remove. + * gcc.target/i386/mpx/static-init-3-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-4-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-4-nov.c: Remove. + * gcc.target/i386/mpx/static-init-4-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-5-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-5-nov.c: Remove. + * gcc.target/i386/mpx/static-init-5-ubv.c: Remove. + * gcc.target/i386/mpx/static-init-6-lbv.c: Remove. + * gcc.target/i386/mpx/static-init-6-nov.c: Remove. + * gcc.target/i386/mpx/static-init-6-ubv.c: Remove. + * gcc.target/i386/mpx/static-string-1-lbv.c: Remove. + * gcc.target/i386/mpx/static-string-1-nov.c: Remove. + * gcc.target/i386/mpx/static-string-1-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-1-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-1-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-1-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-10-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-10-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-10-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-2-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-2-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-2-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-3-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-3-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-3-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-4-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-4-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-4-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-5-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-5-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-5-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-6-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-6-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-6-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-7-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-7-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-7-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-8-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-8-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-8-ubv.c: Remove. + * gcc.target/i386/mpx/struct-arg-9-lbv.c: Remove. + * gcc.target/i386/mpx/struct-arg-9-nov.c: Remove. + * gcc.target/i386/mpx/struct-arg-9-ubv.c: Remove. + * gcc.target/i386/mpx/struct-copy-1-lbv.c: Remove. + * gcc.target/i386/mpx/struct-copy-1-nov.c: Remove. + * gcc.target/i386/mpx/struct-copy-1-ubv.c: Remove. + * gcc.target/i386/mpx/struct-copy-2-lbv.c: Remove. + * gcc.target/i386/mpx/struct-copy-2-nov.c: Remove. + * gcc.target/i386/mpx/struct-copy-2-ubv.c: Remove. + * gcc.target/i386/mpx/thread-local-var-1-lbv.c: Remove. + * gcc.target/i386/mpx/thread-local-var-1-nov.c: Remove. + * gcc.target/i386/mpx/thread-local-var-1-ubv.c: Remove. + * gcc.target/i386/mpx/union-arg-1-lbv.c: Remove. + * gcc.target/i386/mpx/union-arg-1-nov.c: Remove. + * gcc.target/i386/mpx/union-arg-1-ubv.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-1-lbv.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-1-nov.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-1-ubv.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-2-lbv.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-2-nov.c: Remove. + * gcc.target/i386/mpx/va-arg-pack-2-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-1-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-1-nov.c: Remove. + * gcc.target/i386/mpx/vararg-1-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-2-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-2-nov.c: Remove. + * gcc.target/i386/mpx/vararg-2-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-3-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-3-nov.c: Remove. + * gcc.target/i386/mpx/vararg-3-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-4-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-4-nov.c: Remove. + * gcc.target/i386/mpx/vararg-4-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-5-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-5-nov.c: Remove. + * gcc.target/i386/mpx/vararg-5-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-6-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-6-nov.c: Remove. + * gcc.target/i386/mpx/vararg-6-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-7-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-7-nov.c: Remove. + * gcc.target/i386/mpx/vararg-7-ubv.c: Remove. + * gcc.target/i386/mpx/vararg-8-lbv.c: Remove. + * gcc.target/i386/mpx/vararg-8-nov.c: Remove. + * gcc.target/i386/mpx/vararg-8-ubv.c: Remove. + * gcc.target/i386/mpx/vla-1-lbv.c: Remove. + * gcc.target/i386/mpx/vla-1-nov.c: Remove. + * gcc.target/i386/mpx/vla-1-ubv.c: Remove. + * gcc.target/i386/mpx/vla-2-lbv.c: Remove. + * gcc.target/i386/mpx/vla-2-nov.c: Remove. + * gcc.target/i386/mpx/vla-2-ubv.c: Remove. + * gcc.target/i386/mpx/vla-trailing-1-lbv.c: Remove. + * gcc.target/i386/mpx/vla-trailing-1-nov.c: Remove. + * gcc.target/i386/mpx/vla-trailing-1-ubv.c: Remove. + * gcc.target/i386/pr63995-2.c: Remove. + * gcc.target/i386/pr64805.c: Remove. + * gcc.target/i386/pr65044.c: Remove. + * gcc.target/i386/pr65167.c: Remove. + * gcc.target/i386/pr65183.c: Remove. + * gcc.target/i386/pr65184.c: Remove. + * gcc.target/i386/pr65523.c: Remove. + * gcc.target/i386/pr70876.c: Remove. + * gcc.target/i386/pr70877.c: Remove. + * gcc.target/i386/pr71458.c: Remove. + * gcc.target/i386/pr80880.c: Remove. + * gcc.target/i386/ret-thunk-25.c: Remove. + * gcc.target/i386/thunk-retbnd.c: Remove. + * lib/mpx-dg.exp: Remove. + * gcc.target/i386/funcspec-56.inc: Adjust test case. + 2018-06-07 Carl Love * gcc.target/powerpc/builtins-3-p9-runnable.c: Add debug print diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp index 7a6096ca522..fce96a63fba 100644 --- a/gcc/testsuite/g++.dg/dg.exp +++ b/gcc/testsuite/g++.dg/dg.exp @@ -18,7 +18,6 @@ # Load support procs. load_lib g++-dg.exp -load_lib mpx-dg.exp # If a testcase doesn't have special options, use these. global DEFAULT_CXXFLAGS diff --git a/gcc/testsuite/g++.dg/lto/lto.exp b/gcc/testsuite/g++.dg/lto/lto.exp index d399c075d56..eeb5e432d09 100644 --- a/gcc/testsuite/g++.dg/lto/lto.exp +++ b/gcc/testsuite/g++.dg/lto/lto.exp @@ -31,7 +31,6 @@ if $tracelevel then { load_lib standard.exp load_lib g++.exp load_lib target-libpath.exp -load_lib mpx-dg.exp # Load the language-independent compabibility support procedures. load_lib lto.exp @@ -43,7 +42,6 @@ if { ![check_effective_target_lto] } { g++_init lto_init no-mathlib -mpx_init # Define an identifier for use with this suite to avoid name conflicts # with other lto tests running at the same time. @@ -59,5 +57,4 @@ foreach src [lsort [find $srcdir/$subdir *_0.\[cC\]]] { lto-execute $src $sid } -mpx_finish lto_finish diff --git a/gcc/testsuite/g++.dg/lto/pr69729_0.C b/gcc/testsuite/g++.dg/lto/pr69729_0.C deleted file mode 100644 index b736406e0cb..00000000000 --- a/gcc/testsuite/g++.dg/lto/pr69729_0.C +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options {{-fcheck-pointer-bounds -mmpx -flto -flto-partition=max}} } */ - -class cl1 -{ - public: - virtual ~cl1 () { }; -}; - -class cl2 -{ - public: - virtual ~cl2 () { }; -}; - -class cl3 : cl1, cl2 -{ -}; - -class cl4 : cl3 -{ - public: - ~cl4 (); -}; - -cl4::~cl4 () -{ -} - -int main (int argc, char **argv) -{ - cl4 c; - return 0; -} diff --git a/gcc/testsuite/g++.dg/opt/pr71529.C b/gcc/testsuite/g++.dg/opt/pr71529.C deleted file mode 100644 index 148527f00c4..00000000000 --- a/gcc/testsuite/g++.dg/opt/pr71529.C +++ /dev/null @@ -1,22 +0,0 @@ -// PR middle-end/71529 -// { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } -// { dg-options "-fcheck-pointer-bounds -mmpx -O2" } - -class c1 -{ - public: - virtual ~c1 (); -}; - -class c2 -{ - public: - virtual ~c2 (); -}; - -class c3 : c1, c2 { }; - -int main (int, char **) -{ - c3 obj; -} diff --git a/gcc/testsuite/g++.dg/pr63995-1.C b/gcc/testsuite/g++.dg/pr63995-1.C deleted file mode 100644 index 41a1c01153b..00000000000 --- a/gcc/testsuite/g++.dg/pr63995-1.C +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx" } */ - -int test1 (int i) -{ - extern const int arr[10]; - return arr[i]; -} - -extern const int arr[10]; - -int test2 (int i) -{ - return arr[i]; -} diff --git a/gcc/testsuite/g++.dg/pr68270.C b/gcc/testsuite/g++.dg/pr68270.C deleted file mode 100644 index 441fca3e85f..00000000000 --- a/gcc/testsuite/g++.dg/pr68270.C +++ /dev/null @@ -1,16 +0,0 @@ -/* PR71633 */ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-Werror=chkp -mmpx -fcheck-pointer-bounds -O1 -fchkp-flexible-struct-trailing-arrays" } */ - -struct a -{ - struct - { - int e[1]; - } f; -}; - -int g(a *ptr) -{ - return ptr->f.e[1]; -} diff --git a/gcc/testsuite/g++.dg/pr71624.C b/gcc/testsuite/g++.dg/pr71624.C deleted file mode 100644 index 951534ce875..00000000000 --- a/gcc/testsuite/g++.dg/pr71624.C +++ /dev/null @@ -1,35 +0,0 @@ -/* PR71624 */ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -class c1 -{ -public: - virtual int fn1 () const; - int fn2 (const int *) const; -}; - -class c2 -{ - int fn1 (); - c1 obj; -}; - -int -c1::fn1 () const -{ - return 0; -} - -int -c1::fn2 (const int *) const -{ - return this->fn1 (); -} - -int -c2::fn1 () -{ - return obj.fn2 (0); -} - diff --git a/gcc/testsuite/g++.dg/pr71633.C b/gcc/testsuite/g++.dg/pr71633.C deleted file mode 100644 index 8852695b910..00000000000 --- a/gcc/testsuite/g++.dg/pr71633.C +++ /dev/null @@ -1,29 +0,0 @@ -/* PR71633 */ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -class c1 -{ - virtual void fn1 (); -}; - -class c2 -{ - virtual int *fn2 () const; -}; - -class c3 : c1, c2 -{ - int *fn2 () const; - int *fn3 (int) const; -}; - -int *c3::fn2 () const -{ - return 0; -} - -int *c3::fn3 (int p) const -{ - return fn3 (p); -} diff --git a/gcc/testsuite/g++.dg/pr79761.C b/gcc/testsuite/g++.dg/pr79761.C deleted file mode 100644 index a97325a1fc4..00000000000 --- a/gcc/testsuite/g++.dg/pr79761.C +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms" } */ - -struct Foo -{ - Foo() : a(1), b(1), c('a') {} - int a; - int b; - char c; -}; - -static Foo copy_foo(Foo) __attribute__((noinline, noclone)); - -static Foo copy_foo(Foo A) -{ - return A; -} - -struct Bar : Foo -{ - Bar(Foo t) : Foo(copy_foo(t)) {} -}; - -Foo F; - -int main (void) -{ - Bar B (F); - - if (B.a != 1 || B.b != 1 || B.c != 'a') - __builtin_abort (); - - return 0; -} diff --git a/gcc/testsuite/g++.dg/pr79764.C b/gcc/testsuite/g++.dg/pr79764.C deleted file mode 100644 index 293aa337693..00000000000 --- a/gcc/testsuite/g++.dg/pr79764.C +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -typedef float __m256 __attribute__ (( __vector_size__(32), __may_alias__ )); -struct A { - __m256 ymm; - const float &f() const; -}; - -const float &A::f() const { - return ymm[1]; -} diff --git a/gcc/testsuite/g++.dg/pr79769.C b/gcc/testsuite/g++.dg/pr79769.C deleted file mode 100644 index c3186877f60..00000000000 --- a/gcc/testsuite/g++.dg/pr79769.C +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms" } */ - -void a (_Complex) { a (3); } diff --git a/gcc/testsuite/gcc.dg/lto/chkp-privatize-1_0.c b/gcc/testsuite/gcc.dg/lto/chkp-privatize-1_0.c deleted file mode 100644 index 2054aa15ba0..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-privatize-1_0.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -Ofast -flto -fcheck-pointer-bounds -mmpx } } } */ - -extern int __attribute__((noinline)) f1 (int i); - -static int __attribute__((noinline)) -f2 (int i) -{ - return i + 6; -} - -int -main (int argc, char **argv) -{ - return f1 (argc) + f2 (argc); -} diff --git a/gcc/testsuite/gcc.dg/lto/chkp-privatize-2_0.c b/gcc/testsuite/gcc.dg/lto/chkp-privatize-2_0.c deleted file mode 100644 index be7f601e399..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-privatize-2_0.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -Ofast -flto -fcheck-pointer-bounds -mmpx } } } */ - -static int -__attribute__ ((noinline)) -func1 (int i) -{ - return i + 2; -} - -extern int func2 (int i); - -int -main (int argc, char **argv) -{ - return func1 (argc) + func2 (argc) + 1; -} diff --git a/gcc/testsuite/gcc.dg/lto/chkp-privatize_0.c b/gcc/testsuite/gcc.dg/lto/chkp-privatize_0.c deleted file mode 100644 index ad9fdaaee88..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-privatize_0.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx } } } */ - -static int -__attribute__ ((noinline)) -func1 (int i) -{ - return i + 2; -} - -extern int func2 (int i); - -int -main (int argc, char **argv) -{ - return func1 (argc) + func2 (argc) + 1; -} diff --git a/gcc/testsuite/gcc.dg/lto/chkp-removed-alias_0.c b/gcc/testsuite/gcc.dg/lto/chkp-removed-alias_0.c deleted file mode 100644 index 96d728d5122..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-removed-alias_0.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -O2 -flto -flto-partition=max -fcheck-pointer-bounds -mmpx } } } */ - -int test1 (const char *c) -{ - return c[0] * 2; -} - -int test2 (const char *c) -{ - return c[1] * 3; -} - -int test1_alias (const char *c) __attribute__ ((alias ("test1"))); -int test2_alias (const char *c) __attribute__ ((alias ("test2"))); - -struct S -{ - int (*fnptr[2]) (const char *); -} S; - -struct S s = {test1_alias, test2_alias}; - -int main (int argc, const char **argv) -{ - return s.fnptr[argc] (argv[0]); -} diff --git a/gcc/testsuite/gcc.dg/lto/chkp-static-bounds_0.c b/gcc/testsuite/gcc.dg/lto/chkp-static-bounds_0.c deleted file mode 100644 index 596e5510664..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-static-bounds_0.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -flto -flto-partition=max -fcheck-pointer-bounds -mmpx } } } */ - -const char *cc; - -int test1 (const char *c) -{ - c = __builtin___bnd_init_ptr_bounds (c); - cc = c; - return c[0] * 2; -} - -struct S -{ - int (*fnptr) (const char *); -} S; - -struct S s1 = {test1}; -struct S s2 = {test1}; -struct S s3 = {test1}; - -int main (int argc, const char **argv) -{ - return s1.fnptr (argv[0]) + s2.fnptr (argv[1]); -} diff --git a/gcc/testsuite/gcc.dg/lto/chkp-wrap-asm-name_0.c b/gcc/testsuite/gcc.dg/lto/chkp-wrap-asm-name_0.c deleted file mode 100644 index 6611bdb825c..00000000000 --- a/gcc/testsuite/gcc.dg/lto/chkp-wrap-asm-name_0.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx } } } */ - -typedef long unsigned int size_t; - -extern size_t strlen (const char *); -extern __typeof (strlen) strlen __asm__ ("" "__hidden_strlen") __attribute__ ((visibility ("hidden"))); - -size_t -test1 (const char *p) { return strlen (p); } - -size_t -test2 (const char *p) { return __builtin_strlen (p); } - -int -main (int argc, const char **argv) -{ - return test1 (argv[0]) - test2 (argv[0]); -} diff --git a/gcc/testsuite/gcc.dg/lto/lto.exp b/gcc/testsuite/gcc.dg/lto/lto.exp index 033ed7672ad..cb35341d5ef 100644 --- a/gcc/testsuite/gcc.dg/lto/lto.exp +++ b/gcc/testsuite/gcc.dg/lto/lto.exp @@ -30,7 +30,6 @@ if $tracelevel then { # Load procedures from common libraries. load_lib standard.exp load_lib gcc.exp -load_lib mpx-dg.exp # Load the language-independent compabibility support procedures. load_lib lto.exp @@ -42,7 +41,6 @@ if { ![check_effective_target_lto] } { gcc_init lto_init no-mathlib -mpx_init # Define an identifier for use with this suite to avoid name conflicts # with other lto tests running at the same time. diff --git a/gcc/testsuite/gcc.dg/lto/pr66221_0.c b/gcc/testsuite/gcc.dg/lto/pr66221_0.c deleted file mode 100644 index dbb92829be6..00000000000 --- a/gcc/testsuite/gcc.dg/lto/pr66221_0.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-lto-do link } */ -/* { dg-require-effective-target mpx } */ -/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx } } } */ - -int test1 (const char *); - -int main (int argc, const char **argv) -{ - return test1 (argv[0]); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c deleted file mode 100644 index c10d1310e0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wno-attributes" } */ - -static __attribute__((always_inline)) int f1 (int *p) -{ - return *p; -} - -__attribute__((bnd_legacy)) int f2 (int *p) -{ - return f1 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-bndret.c b/gcc/testsuite/gcc.target/i386/chkp-bndret.c deleted file mode 100644 index d84ea70dcda..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-bndret.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bndret" "chkp" } } */ - -#include "string.h" - -extern int *test1 (int *p) __attribute__((bnd_legacy)); - -int * -test2 (int *p) -{ - return test1 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c deleted file mode 100644 index 99cfa82681c..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_init_ptr_bounds (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c deleted file mode 100644 index 6da8d0a83ff..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p, void *q) -{ - return __builtin___bnd_copy_ptr_bounds (p, q); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c deleted file mode 100644 index ae30534c6da..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_set_ptr_bounds (p, 10); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c deleted file mode 100644 index d408a490b13..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_null_ptr_bounds (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c deleted file mode 100644 index 6e6d067fb50..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */ -/* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */ -/* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */ - -int test (int *p) -{ - p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int)); - return *p; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c deleted file mode 100644 index 839cf788e7c..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ - -int test (int *p) -{ - p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int)); - return *(p + 1); /* { dg-warning "memory access check always fail" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c deleted file mode 100644 index 68f70ff258d..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-alias "" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ -/* { dg-final { scan-assembler-not "test.chkp" } } */ - -int test (int *p); -extern __typeof (test) test __asm__ ("" "__test") __attribute__ ((visibility ("hidden"))); - -int test (int *p) -{ - return *p; -} - -extern __typeof (test) __test1 __asm__("" "test"); -extern __typeof (test) __test1 __attribute__((alias ("" "__test"))); diff --git a/gcc/testsuite/gcc.target/i386/chkp-label-address.c b/gcc/testsuite/gcc.target/i386/chkp-label-address.c deleted file mode 100644 index 23a2f7cd052..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-label-address.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ - -#include - -static int f1 () /* { dg-warning "function cannot be instrumented" } */ -{ - static int array = &&label_B - &&label_A; - - label_A: - - printf ("%d\n", array); - - label_B: - - return 0; -} - -int f2 (int i) -{ - printf ("%d\n", i); - return f1 (); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c deleted file mode 100644 index 70b8b38dc28..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */ -/* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */ - -extern int arr[]; - -int test (int i) -{ - int res; - if (i >= 0) - res = arr[i]; - else - res = -i; - return res; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c deleted file mode 100644 index ab1b122479a..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump "bndcl" "chkp" } } */ -/* { dg-final { scan-tree-dump "bndcu" "chkp" } } */ - -int -test (int *p) -{ - int *p1 = __bnd_narrow_ptr_bounds (p - 10, p, sizeof (int) * 20); - return p1[10]; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c b/gcc/testsuite/gcc.target/i386/chkp-pr69044.c deleted file mode 100644 index 16751f51766..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -int i; -int strncasecmp (char *p1, char *p2, long p3) { return 0; } -int special_command () -{ - if (strncasecmp (0, 0, 0)) - i++; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c deleted file mode 100644 index 7c0f13f8ccf..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ - -struct S -{ - int a; - int b; - int c; -}; - -int test (struct S *ps) -{ - int *pi = &ps->b; - return *pi; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c deleted file mode 100644 index eea0b0afa10..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ -/* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ - -struct S -{ - int a; - int b; - int c; -}; - -int test (struct S *ps) -{ - int *pi = &ps->b; - return *(pi + 1); /* { dg-warning "memory access check always fail" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strchr.c b/gcc/testsuite/gcc.target/i386/chkp-strchr.c deleted file mode 100644 index 01ee619dfd9..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strchr.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -#include "string.h" - -static char * -test1 (char *str) -{ - return strrchr (str, '_'); -} - -char * -test2 () -{ - return test1 ("test_string"); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c deleted file mode 100644 index 38d53900627..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -char *test (char *str1, char *str2) -{ - size_t len = strlen (str2); - strcpy (str1, str2); - return str1 + len; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c deleted file mode 100644 index 789ebc1f2d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target stpcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -char *test (char *str1, char *str2) -{ - char *p = stpcpy (str1, str2); - size_t len = strlen (str1); - return p + len; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c deleted file mode 100644 index 276f4127975..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -size_t test (char *str1, char *str2) -{ - size_t len = strlen (str2); - memcpy (str1, str2, len + 1); - return len + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c deleted file mode 100644 index 51ff96028be..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -char * test (char *str1, char *str2) -{ - size_t len = strlen (str2); - char *p = (char *)mempcpy (str1, str2, len + 1); - return p + len + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c deleted file mode 100644 index bbafecc3063..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */ -/* { dg-final { scan-tree-dump "memcpy" "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -size_t test (char *str1, char *str2) -{ - size_t len1 = strlen (str1); - size_t len2 = strlen (str2); - strcat (str1, str2); - return len1 + len2 + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c deleted file mode 100644 index d6148a87fd1..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c deleted file mode 100644 index 18cff739b01..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c deleted file mode 100644 index c53db6a17e4..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c deleted file mode 100644 index a076d17cd9a..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "mempcpy_nobnd" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c deleted file mode 100644 index 279cae3e5bf..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c deleted file mode 100644 index b810c682569..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c deleted file mode 100644 index a9a79c1e330..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c deleted file mode 100644 index 6ce170c9d68..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nobnd_nochk" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c deleted file mode 100644 index faf304c3303..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c +++ /dev/null @@ -1,68 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } - { dg-require-effective-target mempcpy } - { dg-options "-O2 -Wrestrict -fcheck-pointer-bounds -mmpx" } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -/* There is no BUILT_IN_ST{P,R}NCPY_CHKP or BUILT_IN_STRNCAT_CHKP - so the test for them below are XFAIL. */ -char *stpncpy (char *__restrict, const char *__restrict, size_t); -char *strncpy (char *__restrict, const char *__restrict, size_t); -char *strncat (char *__restrict, const char *__restrict, size_t); - - -char a[8]; - -void test_memcpy (void) -{ - memcpy (a, a + 1, 3); /* { dg-warning ".memcpy\.chkp. accessing 3 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1" } */ -} - -void test_memmove (void) -{ - memmove (a, a + 1, 3); -} - -void* test_mempcpy (void) -{ - return mempcpy (a, a + 1, 3); /* { dg-warning ".mempcpy\.chkp. accessing 3 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1" } */ -} - -char* test_stpcpy (void) -{ - strcpy (a, "0123456"); - return stpcpy (a, a + 2); /* { dg-warning ".stpcpy\.chkp. accessing 6 bytes at offsets 0 and 2 overlaps 4 bytes at offset 2" } */ -} - -char* test_stpncpy (void) -{ - strcpy (a, "0123456"); - - /* There is no BUILT_IN_STPNCPY_CHKP so this isn't handled. */ - return stpncpy (a, a + 2, sizeof a); /* { dg-warning ".stpcpy\.chkp. accessing 7 bytes at offsets 0 and 2 overlaps 4 bytes at offset 2" "bug 82652" { xfail *-*-* } } */ -} - -void test_strcpy (void) -{ - strcpy (a, "0123456"); - strcpy (a, a + 1); /* { dg-warning ".strcpy\.chkp. accessing 7 bytes at offsets 0 and 1 overlaps 6 bytes at offset 1" } */ -} - -void test_strcat (int n) -{ - strcat (a, a + 3); /* { dg-warning ".strcat\.chkp. accessing 4 or more bytes at offsets 0 and 3 may overlap 1 byte at offset 3" } */ -} - -void test_strncat (int n) -{ - strncat (a, a + 3, sizeof a); /* { dg-warning ".strncat\.chkp. accessing 0 or more bytes at offsets 0 and 3 may overlap 1 byte" "bug 82652" { xfail *-*-* } } */ -} - -void test_strncpy (int n) -{ - strcpy (a, "0123456"); - - /* There is no BUILT_IN_STRNCPY_CHKP so this isn't handled. */ - strncpy (a, a + 2, sizeof a); /* { dg-warning ".strncpy\.chkp. accessing 7 bytes at offsets 0 and 2 overlaps 5 bytes at offset 2" "bug 82652" { xfail *-*-* } } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c deleted file mode 100644 index 6a0c24ee887..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c deleted file mode 100644 index 310dec77456..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c deleted file mode 100644 index 7a30d17b8e6..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nochk" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c deleted file mode 100644 index 39850d62be8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c deleted file mode 100644 index 06dcbfb9a25..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c deleted file mode 100644 index 40ded068f8e..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c deleted file mode 100644 index 7e575bb40bb..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nobnd" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c deleted file mode 100644 index bf26874e5a8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc index 9c9c347e8cd..437b12fc67d 100644 --- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc +++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc @@ -62,7 +62,6 @@ extern void test_pku (void) __attribute__((__target__("pku"))); extern void test_lwp (void) __attribute__((__target__("lwp"))); extern void test_hle (void) __attribute__((__target__("hle"))); extern void test_fxsr (void) __attribute__((__target__("fxsr"))); -extern void test_mpx (void) __attribute__((__target__("mpx"))); extern void test_clwb (void) __attribute__((__target__("clwb"))); extern void test_cld (void) __attribute__((__target__("cld"))); @@ -130,7 +129,6 @@ extern void test_no_pku (void) __attribute__((__target__("no-pku"))); extern void test_no_lwp (void) __attribute__((__target__("no-lwp"))); extern void test_no_hle (void) __attribute__((__target__("no-hle"))); extern void test_no_fxsr (void) __attribute__((__target__("no-fxsr"))); -extern void test_no_mpx (void) __attribute__((__target__("no-mpx"))); extern void test_no_clwb (void) __attribute__((__target__("no-clwb"))); extern void test_no_cld (void) __attribute__((__target__("no-cld"))); diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 6b30de3022f..91fa2a61af2 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -24,7 +24,6 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then { # Load support procs. load_lib gcc-dg.exp load_lib clearcap.exp -load_lib mpx-dg.exp # Return 1 if attribute ms_hook_prologue is supported. proc check_effective_target_ms_hook_prologue { } { diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c deleted file mode 100644 index b6bd51be63a..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=thunk-extern -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -void -bar (void) -{ /* { dg-error "'-mindirect-branch=thunk-extern', '-fcf-protection=branch' and '-fcheck-pointer-bounds' are not compatible" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c deleted file mode 100644 index 2c3848e1fb0..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=thunk -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -void -bar (void) -{ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c deleted file mode 100644 index 5da515690d4..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=keep -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -__attribute__ ((indirect_branch("thunk-extern"))) -void -bar (void) -{ /* { dg-error "'-mindirect-branch=thunk-extern', '-fcf-protection=branch' and '-fcheck-pointer-bounds' are not compatible" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c deleted file mode 100644 index a671e460098..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=keep -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -__attribute__ ((indirect_branch("thunk-inline"))) -void -bar (void) -{ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c deleted file mode 100644 index 73d16baddc7..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -void (*dispatch) (char *); -char buf[10]; - -void -foo (void) -{ - dispatch (buf); -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */ -/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c deleted file mode 100644 index 856751ac224..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -void (*dispatch) (char *); -char buf[10]; - -int -foo (void) -{ - dispatch (buf); - return 0; -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c deleted file mode 100644 index 42312f65588..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */ - -void bar (char *); -char buf[10]; - -void -foo (void) -{ - bar (buf); -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */ -/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c deleted file mode 100644 index 8850f2ffca4..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */ - -void bar (char *); -char buf[10]; - -int -foo (void) -{ - bar (buf); - return 0; -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */ -/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c deleted file mode 100644 index e07688e7ee2..00000000000 --- a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -mmpx" } */ - -typedef unsigned int uword_t __attribute__ ((mode (__word__))); - -void -__attribute__((interrupt)) -fn1 (void *frame) -{ /* { dg-message "MPX instructions aren't allowed in interrupt service routine" } */ -} - -void -__attribute__((interrupt)) -fn2 (void *frame, uword_t error) -{ /* { dg-message "MPX instructions aren't allowed in exception service routine" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c b/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c deleted file mode 100644 index 641ca637f8c..00000000000 --- a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -mmpx" } */ - -void -__attribute__((no_caller_saved_registers)) -fn (void *frame) -{ /* { dg-message "MPX instructions aren't allowed in function with no_caller_saved_registers attribute" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c deleted file mode 100644 index 1c77c192c17..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c deleted file mode 100644 index 835015fc432..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c deleted file mode 100644 index c57c6c4811f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c deleted file mode 100644 index 1fd2036cf06..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c deleted file mode 100644 index 4e338c76f7c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c deleted file mode 100644 index 65cb46bcd3f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c deleted file mode 100644 index deca6fd6a97..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf - 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c deleted file mode 100644 index 0a7913a256d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf); - foo (buf + 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c deleted file mode 100644 index a20a7897fce..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf + 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c deleted file mode 100644 index 140848e0158..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf - 1, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c deleted file mode 100644 index 055b61d649c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf, sizeof (int) * 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c deleted file mode 100644 index f811694b9ee..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf + 100, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c deleted file mode 100644 index 47e62e7834d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf - 1, sizeof (int)); - __bnd_chk_ptr_bounds (buf + 100, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c deleted file mode 100644 index 085166fc142..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf - 1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c deleted file mode 100644 index 3a666d8e300..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c deleted file mode 100644 index 87b80e0b62c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf - 1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c deleted file mode 100644 index 8a73fe367d1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 99); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c deleted file mode 100644 index eb22dd1936a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c deleted file mode 100644 index 503bd53a60b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c deleted file mode 100644 index 0949f6acd87..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_copy_ptr_bounds (buf + 10, buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c deleted file mode 100644 index a7317e71785..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c deleted file mode 100644 index 6b6423e3c6d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[10] = argc; - p1[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c deleted file mode 100644 index 2893d9be1f9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c deleted file mode 100644 index 4d0137579eb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_copy_ptr_bounds (buf + 10, buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c deleted file mode 100644 index 2a7f46ff2d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf == __bnd_get_ptr_lbound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c deleted file mode 100644 index 70b49e312b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert ((void *)0 == __bnd_get_ptr_lbound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c deleted file mode 100644 index a9111f35d7d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 99 == __bnd_get_ptr_ubound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c deleted file mode 100644 index cf0aca14a6b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert ((void *)-1 == __bnd_get_ptr_ubound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c deleted file mode 100644 index ee259cc9fb6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_init_ptr_bounds (buf + 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c deleted file mode 100644 index da44e7a9642..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = __bnd_init_ptr_bounds (p); - p[-1] = argc; - p[10] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c deleted file mode 100644 index 8c1527025f6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_init_ptr_bounds (buf + 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c deleted file mode 100644 index 4ac49abd70a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_narrow_ptr_bounds (buf + 10, buf, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c deleted file mode 100644 index 21a8f927f47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c deleted file mode 100644 index 8182d029e07..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[10] = argc; - p[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c deleted file mode 100644 index 6ff90cee593..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c deleted file mode 100644 index 69b4a51b490..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[-1] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c deleted file mode 100644 index 0c13b123d8f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[0] = argc; - p[89] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c deleted file mode 100644 index 445e3375834..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[90] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c deleted file mode 100644 index 144855cfabd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf - 10 == __bnd_narrow_ptr_bounds (buf - 10, buf, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c deleted file mode 100644 index 5497ef1d2da..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_null_ptr_bounds (buf + 10); - p[0] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c deleted file mode 100644 index 8abb2576654..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_set_ptr_bounds (buf + 10, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c deleted file mode 100644 index bbc578abd2c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[-1] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c deleted file mode 100644 index 39df101ad50..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[0] = argc; - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c deleted file mode 100644 index c2d27e71065..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[10] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c deleted file mode 100644 index 811cdb4e116..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c deleted file mode 100644 index af6c8dbe59c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c deleted file mode 100644 index 9e9ea305ae8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[10] = argc; - p[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c deleted file mode 100644 index 62aca8c131b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c deleted file mode 100644 index a2ca7900915..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c deleted file mode 100644 index 0ba5d73229d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c deleted file mode 100644 index cb755e57391..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c deleted file mode 100644 index a932a8c7b47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, 100); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c deleted file mode 100644 index cb4d22984b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -#include "math.h" - -double -test1 (double x, double y, double (*fn)(double, double)) -{ - return fn (x, y); -} - -double -test2 (double x, double y) -{ - return test1 (x, y, copysign); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c deleted file mode 100644 index 951e7dece19..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fcheck-pointer-bounds -mmpx -fno-inline" } */ - -#include "math.h" - -double -test1 (double x, double y, double (*fn)(double, double)) -{ - return fn (x, y); -} - -double -test2 (double x, double y) -{ - return test1 (x, y, copysign); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c deleted file mode 100644 index 439f631a3b9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fexceptions -fcheck-pointer-bounds -mmpx" } */ - -extern int f2 (const char*, int, ...); -extern long int f3 (int *); -extern void err (void) __attribute__((__error__("error"))); - -extern __inline __attribute__ ((__always_inline__)) int -f1 (int i, ...) -{ - if (__builtin_constant_p (i)) - { - if (i) - err (); - return f2 ("", i); - } - - return f2 ("", i); -} - -int -test () -{ - int i; - - if (f1 (0)) - if (f3 (&i)) - i = 0; - - return i; -} - - diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c deleted file mode 100644 index 1b7d7032ecb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Os -fcheck-pointer-bounds -mmpx" } */ - -typedef void (func) (int *); - -static inline void -bar (func f) -{ - int i; - f (&i); -} - -void -foo () -{ - bar (0); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc deleted file mode 100644 index 26d3c48a621..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -namespace -{ - template - int __attribute__((noinline)) - f1 () - { - return dim; - } -} - -int -test () -{ - return f1<3> (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc deleted file mode 100644 index 2b1abe9b67d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -class c1 -{ -public: - virtual int test1 (const char *); -}; - -class c2 -{ -public: - int test2 (const char *); -}; - -int -c1::test1 (const char *) -{ - return 0; -} - -int -c2::test2 (const char *) -{ - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c deleted file mode 100644 index dd0057e2981..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O -fvisibility=hidden" } */ - -int val; - -static int __attribute__((noinline)) -test1 () -{ - return val; -} - -static int __attribute__((bnd_legacy,noinline)) -test2 () -{ - return test1 (); -} - -int -test3 (void) -{ - return test2 (); -} - diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c deleted file mode 100644 index 6f9ba88fed5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c deleted file mode 100644 index 6a2896e0125..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, 0); - rd (buf1, buf, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c deleted file mode 100644 index b5edc438f27..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c deleted file mode 100644 index cbe7343e018..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c deleted file mode 100644 index 83773d0d90c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, 0); - rd (buf, buf1, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c deleted file mode 100644 index 1a614fa3610..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c deleted file mode 100644 index 46a58123bf4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c deleted file mode 100644 index b8500ff333d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 0); - foo(&s.a, 101); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c deleted file mode 100644 index 990adee3bb2..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 102); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c deleted file mode 100644 index cd8d59afd22..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c deleted file mode 100644 index 90f79a0eaed..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], 0); - rd (&sa[argc].arr[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c deleted file mode 100644 index b6a9ad07071..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c deleted file mode 100644 index fdf39672315..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c deleted file mode 100644 index 2a685036ca0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c deleted file mode 100644 index b07b09ff808..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c deleted file mode 100644 index ea919d80fbc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c deleted file mode 100644 index 12f42c4d289..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], 0); - foo (&s.b[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c deleted file mode 100644 index 55a8af3a0ce..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c deleted file mode 100644 index 23cf71ed6df..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[0].a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c deleted file mode 100644 index 791753244f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[9].c, 0); - foo (&s1.a[0].a, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c deleted file mode 100644 index 0d4ac020cf3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[9].c, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c deleted file mode 100644 index c00d42f3213..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c deleted file mode 100644 index b69895e1d20..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], 0); - foo (&s1.b.b[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c deleted file mode 100644 index d00f41eb86e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c deleted file mode 100644 index 91b64bf462d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c deleted file mode 100644 index f837f57a421..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), 0); - foo (&(s2->a[9].a), 101); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c deleted file mode 100644 index 97ef911406e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[9].a), 102); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c deleted file mode 100644 index 176971168e5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[-1].a), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c deleted file mode 100644 index 19c09b8271e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), 0); - foo (&(s2->a[9].c), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c deleted file mode 100644 index c9e8ae2442c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[10].a), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c deleted file mode 100644 index cac6784175b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[-1].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c deleted file mode 100644 index e7243a989f9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[0].a[0]), 0); - foo (&(s1.a[argc].b[0].a[0]), 9); - foo (&(s1.a[argc].b[9].a[0]), 0); - foo (&(s1.a[argc].b[9].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c deleted file mode 100644 index d2792e1bba4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[10].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c deleted file mode 100644 index 127d0966330..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c +++ /dev/null @@ -1,44 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c deleted file mode 100644 index 7f98b0188a3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), 0); - foo (&(s2->a[argc].b[5].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c deleted file mode 100644 index a65b8f0d17f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c +++ /dev/null @@ -1,44 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c deleted file mode 100644 index 87cc2dd1cfc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - void **fa = (void **)__builtin_frame_address (0); - printf ("%p\n", *fa); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c deleted file mode 100644 index 8cf72e55543..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ -#ifdef __x86_64__ - register int *frame __asm__("rsp"); -#else - register int *frame __asm__("esp"); -#endif - rd (frame, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c deleted file mode 100644 index 38fe59f8be9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo(int i) { - register v16 u asm("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (-1)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c deleted file mode 100644 index 1db83f5b547..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo (int i) { - register v16 u asm ("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (3)); - printf ("%d\n", foo (0)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c deleted file mode 100644 index 66607805ca4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo (int i) { - register v16 u asm ("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (5)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c deleted file mode 100644 index 29fa443697f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c deleted file mode 100644 index 576ea8487e3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 0); - rd (buf, p, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c deleted file mode 100644 index 021a3aed267..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c deleted file mode 100644 index 5d7fe6299a5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c deleted file mode 100644 index 327c108f789..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 0); - rd (buf, p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c deleted file mode 100644 index 3047f7b5104..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c b/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c deleted file mode 100644 index f4cd360b1d4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -void *p; -int mpx_test (int argc, const char **argv) -{ - p = &&label; - - label: - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c deleted file mode 100644 index b51ac7f0271..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -__attribute__((bnd_legacy)) -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 10); - - rd (p, -1); - rd (p, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/macro.c b/gcc/testsuite/gcc.target/i386/mpx/macro.c deleted file mode 100644 index 00d467bd19d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/macro.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -#ifndef __MPX__ -#error -mmpx is required -#endif - -#ifndef __CHKP__ -#error -fcheck-pointer-bounds is required -#endif - -int mpx_test (int argc, const char **argv) -{ - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c deleted file mode 100644 index aa2aed983cf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c deleted file mode 100644 index 56f26e964d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c deleted file mode 100644 index 6f48ec26923..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, 100); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c b/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c deleted file mode 100644 index 6ecbdc1a322..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* Fix for PR78631 */ - -#define SHOULDFAIL - -#include -#include -#include "mpx-check.h" - -char s[10]; -char d[10]; -__attribute__((noinline)) - -char* foo(char* dst, char* src, size_t size) { - return memcpy(dst, src, size); -} -int mpx_test(int argc, const char **argv) { - char* r = foo(d, s, 11); - printf("r = %p\n", r); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c deleted file mode 100644 index 0efd0303075..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c +++ /dev/null @@ -1,117 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include -#include -#include "mpx-check.h" - -#ifdef __i386__ -/* i386 directory size is 4MB. */ -#define MPX_NUM_L2_BITS 10 -#define MPX_NUM_IGN_BITS 2 -#else /* __i386__ */ -/* x86_64 directory size is 2GB. */ -#define MPX_NUM_L2_BITS 17 -#define MPX_NUM_IGN_BITS 3 -#endif /* !__i386__ */ - - -/* bt_num_of_elems is the number of elements in bounds table. */ -unsigned long bt_num_of_elems = (1UL << MPX_NUM_L2_BITS); -/* Function to test MPX wrapper of memmove function. - src_bigger_dst determines which address is bigger, can be 0 or 1. - src_bt_index and dst_bt index are bt_indexes - from the beginning of the page. - bd_index_end is the bd index of the last element of src if we define - bd index of the first element as 0. - src_bt index_end is bt index of the last element of src. - pointers inside determines if array being copied includes pointers - src_align and dst_align are alignments of src and dst. - Arrays may contain unaligned pointers. */ -int -test (int src_bigger_dst, int src_bt_index, int dst_bt_index, - int bd_index_end, int src_bt_index_end, int pointers_inside, - int src_align, int dst_align) -{ - const int n = - src_bt_index_end - src_bt_index + bd_index_end * bt_num_of_elems; - if (n < 0) - { - return 0; - } - const int num_of_pointers = (bd_index_end + 2) * bt_num_of_elems; - void **arr = 0; - posix_memalign ((void **) (&arr), - 1UL << (MPX_NUM_L2_BITS + MPX_NUM_IGN_BITS), - num_of_pointers * sizeof (void *)); - void **src = arr, **dst = arr; - if ((src_bigger_dst) && (src_bt_index < dst_bt_index)) - src_bt_index += bt_num_of_elems; - if (!(src_bigger_dst) && (src_bt_index > dst_bt_index)) - dst_bt_index += bt_num_of_elems; - src += src_bt_index; - dst += dst_bt_index; - char *realign = (char *) src; - realign += src_align; - src = (void **) realign; - realign = (char *) dst; - realign += src_align; - dst = (void **) realign; - if (pointers_inside) - { - for (int i = 0; i < n; i++) - src[i] = __bnd_set_ptr_bounds (arr + i, i * sizeof (void *) + 1); - } - memmove (dst, src, n * sizeof (void *)); - if (pointers_inside) - { - for (int i = 0; i < n; i++) - { - if (dst[i] != arr + i) - abort (); - if (__bnd_get_ptr_lbound (dst[i]) != arr + i) - abort (); - if (__bnd_get_ptr_ubound (dst[i]) != arr + 2 * i) - abort (); - } - } - free (arr); - return 0; -} - -/* Call testall to test common cases of memmove for MPX. */ -void -testall () -{ - int align[3]; - align[0] = 0; - align[1] = 1; - align[2] = 7; - for (int pointers_inside = 0; pointers_inside < 2; pointers_inside++) - for (int src_bigger_dst = 0; src_bigger_dst < 2; src_bigger_dst++) - for (int src_align = 0; src_align < 3; src_align ++) - for (int dst_align = 0; dst_align < 3; dst_align ++) - for (int pages = 0; pages < 4; pages++) - { - test (src_bigger_dst, 1, 2, pages, 1, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 1, 2, pages, 2, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 1, pages, 12, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 1, pages, 1, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 3, pages, 12, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 1, bt_num_of_elems - 2, pages, 2, - pointers_inside, align[src_align], align[dst_align]); - } -}; - -int -mpx_test (int argc, const char **argv) -{ - testall (); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c deleted file mode 100644 index e1d78fa47c6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include -#include -#include "mpx-check.h" - -#ifdef __i386__ -/* i386 directory size is 4MB. */ -#define MPX_NUM_L2_BITS 10 -#define MPX_NUM_IGN_BITS 2 -#else /* __i386__ */ -/* x86_64 directory size is 2GB. */ -#define MPX_NUM_L2_BITS 17 -#define MPX_NUM_IGN_BITS 3 -#endif /* !__i386__ */ - - -/* bt_num_of_elems is the number of elements in bounds table. */ -unsigned long bt_num_of_elems = (1UL << MPX_NUM_L2_BITS); - -/* Function to test MPX wrapper of memmove function. - Check case with no BT allocated for data. */ - -int -mpx_test (int argc, const char **argv) -{ - void **arr = 0; - posix_memalign ((void **) (&arr), - 1UL << (MPX_NUM_L2_BITS + MPX_NUM_IGN_BITS), - 2 * bt_num_of_elems * sizeof (void *)); - void **src = arr, **dst = arr, **ptr = arr; - src += 10; - dst += 1; - ptr += bt_num_of_elems + 100; - ptr[0] = __bnd_set_ptr_bounds (arr + 1, sizeof (void *) + 1); - memmove (dst, src, 5 * sizeof (void *)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c deleted file mode 100644 index 78bfdebff03..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "string.h" - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - memmove (buf, NULL, 0); - memmove (NULL, buf, 0); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h b/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h deleted file mode 100644 index e622934fe32..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include -#include "cpuid.h" -#include "mpx-os-support.h" - -static int -__attribute__ ((noinline)) -mpx_test (int, const char **); - -#ifdef SHOULDFAIL -#define NORUNRES 1 -#else -#define NORUNRES 0 -#endif - -#define DEBUG - -static int -check_osxsave (void) -{ - unsigned int eax, ebx, ecx, edx; - - __cpuid (1, eax, ebx, ecx, edx); - return (ecx & bit_OSXSAVE) != 0; -} - -int -main (int argc, const char **argv) -{ - unsigned int eax, ebx, ecx, edx; - - if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx)) - return NORUNRES; - - /* Run MPX test only if host has MPX support. */ - if (check_osxsave () && (ebx & bit_MPX) && mpx_os_support ()) - mpx_test (argc, argv); - else - { -#ifdef DEBUG - printf ("SKIPPED\n"); -#endif - return NORUNRES; - } - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h b/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h deleted file mode 100644 index 8c9294d33a5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Check if the OS supports executing MPX instructions. */ - -#define XCR_XFEATURE_ENABLED_MASK 0x0 - -#define XSTATE_BNDREGS 0x8 - -static int -mpx_os_support (void) -{ - unsigned int eax, edx; - unsigned int ecx = XCR_XFEATURE_ENABLED_MASK; - - __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (ecx)); - - return (eax & XSTATE_BNDREGS) != 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx.exp b/gcc/testsuite/gcc.target/i386/mpx/mpx.exp deleted file mode 100644 index 62d44697eab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx.exp +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2014-2018 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 -# . - -# Exit immediately if this isn't a x86 target. -if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then { - return -} - -# Load support procs. -load_lib gcc-dg.exp -load_lib mpx-dg.exp - -# Initialize. -dg-init -mpx_init - -if [check_effective_target_mpx] { - # Run all tests. - gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c*]] "" "" -} - -# All done. -mpx_finish -dg-finish diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c deleted file mode 100644 index 0e9d657fcbd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (-1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c deleted file mode 100644 index dd985466328..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (0); - rd (99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c deleted file mode 100644 index b5cf6cc29b3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c deleted file mode 100644 index 58692efb0e3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c deleted file mode 100644 index 01279be8d3b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c deleted file mode 100644 index c377c57eb6b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c deleted file mode 100644 index ebe76cb8263..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c deleted file mode 100644 index 8b9fce2e297..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, 0); - rd (0, 0, 0, 0, 0, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c deleted file mode 100644 index 525140e2d79..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c deleted file mode 100644 index d6571be44b5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c deleted file mode 100644 index e42ecba4e2a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, 0); - rd (0, 0, 0, 0, 0, 0, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c deleted file mode 100644 index 8da6252a03a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c deleted file mode 100644 index 5a6842512db..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c deleted file mode 100644 index bb2bc46a6f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, 0); - rd (buf1, buf1, buf1, buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c deleted file mode 100644 index cf3a5c48f1b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c deleted file mode 100644 index 7c3bd867204..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c deleted file mode 100644 index 27e4a7130b0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, 0); - rd (buf1, buf1, buf1, buf1, buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c deleted file mode 100644 index 68e2654b91a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c deleted file mode 100644 index 657991979f6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -mmpx -fcheck-pointer-bounds" } */ - -char * -foo (char *p, char *q) -{ - return (char *) (p - q); /* { dg-bogus "pointer bounds were lost due to unexpected expression" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c deleted file mode 100644 index bde8c76e4b7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c deleted file mode 100644 index 269e3af17f0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, 0); - rd(10, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c deleted file mode 100644 index 4c8d45e003f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr65508.c b/gcc/testsuite/gcc.target/i386/mpx/pr65508.c deleted file mode 100644 index 9060287cac5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr65508.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -void -bar (int N) -{ - int a[N]; - void foo (int a[N]) - { - } - foo (a); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc b/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc deleted file mode 100644 index 049569c50b1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -#pragma interface - -struct S -{ - ~S () - { - } -}; - -S s; diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc b/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc deleted file mode 100644 index b29cd03ed0f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -march=corei7-avx" } */ - -struct c1 -{ - c1 (const c1 &other) : p (other.p) { }; - int *p; -}; - -struct c2 : public c1 { }; - -c1 -test (c2 a) -{ - return a; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66134.c b/gcc/testsuite/gcc.target/i386/mpx/pr66134.c deleted file mode 100644 index 3889674ed5f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66134.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fno-tree-ccp" } */ - -extern int vfork (void) __attribute__ ((__nothrow__ , __leaf__)); -void test1 (void); -void test2 (void); -void test3 (int *); - -void test (int *p) -{ - test1 (); - p++; - test2 (); - p++; - vfork (); - test3 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66566.c b/gcc/testsuite/gcc.target/i386/mpx/pr66566.c deleted file mode 100644 index a405c20ac0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66566.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -union jsval_layout -{ - void *asPtr; -}; -union jsval_layout a; -union jsval_layout b; -union jsval_layout __inline__ fn1() { return b; } - -void fn2() { a = fn1(); } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66567.c b/gcc/testsuite/gcc.target/i386/mpx/pr66567.c deleted file mode 100644 index 5a7e2f29e80..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66567.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void (*b) (); - -void fn1 (const int *p1) -{ - static void *a = &&conv_1234_123C; - conv_1234_123C: - ; -} - -void fn2 () -{ - b = fn1; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66568.c b/gcc/testsuite/gcc.target/i386/mpx/pr66568.c deleted file mode 100644 index 2653ebc0fa0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66568.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target fpic } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -O2 -fPIC" } */ - -extern void exit (int); -int a, b, c; -void *set_test () { - if (b) - a ? exit (0) : exit (1); - b = c; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66569.c b/gcc/testsuite/gcc.target/i386/mpx/pr66569.c deleted file mode 100644 index ba2023c6846..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66569.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -struct s1 { - int *p; - int i; -}; - -struct s2 { - struct s1 s; - int i; -}; - -int test (struct s2 s, ...) { } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66581.c b/gcc/testsuite/gcc.target/i386/mpx/pr66581.c deleted file mode 100644 index 015faaeae50..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66581.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void *a; -int b; - -void -fn1 (void) -{ - void *c = &&l_nop; -l_nop: - for (; b;) - ; - int *d = c; - c = fn1; - *d = 1; - goto *a; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c b/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c deleted file mode 100644 index 3f8d79d4282..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -#include "mpx-check.h" - -#define N 2 - -extern void abort (); - -static int -mpx_test (int argc, const char **argv) -{ - char ** src = (char **)malloc (sizeof (char *) * N); - char ** dst = (char **)malloc (sizeof (char *) * N); - int i; - - for (i = 0; i < N; i++) - src[i] = __bnd_set_ptr_bounds (argv[0] + i, i + 1); - - __builtin_memcpy(dst, src, sizeof (char *) * N); - - for (i = 0; i < N; i++) - { - char *p = dst[i]; - if (p != argv[0] + i - || __bnd_get_ptr_lbound (p) != p - || __bnd_get_ptr_ubound (p) != p + i) - abort (); - } - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c b/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c deleted file mode 100644 index 8845cca79be..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ -/* { dg-final { scan-assembler-not "memcpy" } } */ - -void -test (void *dst, void *src) -{ - __builtin_memcpy (dst, src, sizeof (char *) / 2); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c b/gcc/testsuite/gcc.target/i386/mpx/pr68416.c deleted file mode 100644 index 10587edf251..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -mmpx -fcheck-pointer-bounds" } */ -/* { dg-final { scan-assembler-not "bndmov" } } */ - -int -foo(int **arr, int i) -{ - return (*arr)[i]; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr78339.c b/gcc/testsuite/gcc.target/i386/mpx/pr78339.c deleted file mode 100644 index 3dd04240e8c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr78339.c +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -Wsuggest-attribute=noreturn" } */ - -extern _Noreturn void exit (int); -int main (void) { exit (1); } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79631.c b/gcc/testsuite/gcc.target/i386/mpx/pr79631.c deleted file mode 100644 index 075d46b835f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79631.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -typedef struct { int _mp_size; } mpz_t[1]; -int a, b; -void fn1() -{ - mpz_t c[1][b]; - for (;;) { - int d = 0 >= 0 ? 0 == 0 ? c[0][0]->_mp_size ? -1 : 0 : 0 : 0, - e = 0 >= 0 ? 0 == 0 ? c[1][1]->_mp_size ? -1 : 0 : 0 : 0; - if (d != e) - a++; - } -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79633.c b/gcc/testsuite/gcc.target/i386/mpx/pr79633.c deleted file mode 100644 index 2a60ee82971..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79633.c +++ /dev/null @@ -1,11 +0,0 @@ -/* PR target/79633 */ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -w -O2" } */ - -extern void *memcpy (); - -void -foo () -{ - memcpy (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79753.c b/gcc/testsuite/gcc.target/i386/mpx/pr79753.c deleted file mode 100644 index 9b7bc52e1ed..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79753.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -int -foo (void) -{ - return 0; -} - -void -bar (int **p) -{ - *p = (int *) (__UINTPTR_TYPE__) foo (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79770.c b/gcc/testsuite/gcc.target/i386/mpx/pr79770.c deleted file mode 100644 index 0890fcc7bf1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79770.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target lp64 } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms -Wno-psabi" } */ - -typedef unsigned U __attribute__ ((vector_size (64))); -typedef unsigned __int128 V __attribute__ ((vector_size (64))); - -static inline V -bar (U u, U x, V v) -{ - v = (V)(U) { 0, ~0 }; - v[x[0]] <<= u[-63]; - return v; -} - -V -foo (U u) -{ - return bar (u, (U) {}, (V) {}); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79987.c b/gcc/testsuite/gcc.target/i386/mpx/pr79987.c deleted file mode 100644 index b3ebda95694..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79987.c +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -extern void foo; -void *bar = &foo; /* { dg-warning "taking address of expression of type .void." } */ diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79988.c b/gcc/testsuite/gcc.target/i386/mpx/pr79988.c deleted file mode 100644 index a6e43eba562..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79988.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void foo(unsigned char * __seg_gs *pointer_gs) { - pointer_gs[5] = 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c deleted file mode 100644 index 961196f71c0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c deleted file mode 100644 index f4b3dd86081..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, 0); - rd (buf, 199); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c deleted file mode 100644 index 8a14baa7a94..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, 200); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c deleted file mode 100644 index 919f62a490e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c deleted file mode 100644 index 569cd241cc9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, 0); - rd (buf, 9); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c deleted file mode 100644 index 36eb90c1abf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, 10); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp deleted file mode 100644 index ec5f546c081..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp deleted file mode 100644 index 98f1622349a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 0); - rd (p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp deleted file mode 100644 index d2135e7270f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp deleted file mode 100644 index 907cb06616c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp deleted file mode 100644 index cdd927c891e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 0); - rd (p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp deleted file mode 100644 index 2f75375d251..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp deleted file mode 100644 index 1330359797d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp deleted file mode 100644 index 9a5519318a4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp deleted file mode 100644 index 0a874fabb09..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp deleted file mode 100644 index 2442c6a4a9a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp deleted file mode 100644 index 9646cc0645d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), 0); - rd (get_buf (), 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp deleted file mode 100644 index da3382357ab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c deleted file mode 100644 index 9a209b8d304..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, -1, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c deleted file mode 100644 index 62d05013909..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, 0, buf1); - rd(10, 99, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c deleted file mode 100644 index 4658aef1714..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, 100, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c deleted file mode 100644 index ef29427fff3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c deleted file mode 100644 index 12e1edd6c4c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c deleted file mode 100644 index dda908b2203..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c deleted file mode 100644 index bf370669d1c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c deleted file mode 100644 index 577e3ab5dc1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c deleted file mode 100644 index c5a7ad002af..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c deleted file mode 100644 index 1802ca837cf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c deleted file mode 100644 index 2e5214a8278..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c deleted file mode 100644 index 83b81da8390..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c deleted file mode 100644 index 7937514d67c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c deleted file mode 100644 index 352b5723266..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c deleted file mode 100644 index 14ba0bddb26..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c deleted file mode 100644 index 2bd871a8562..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c deleted file mode 100644 index 978b4930675..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c deleted file mode 100644 index 633e15dbe67..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c deleted file mode 100644 index 9e2cf2cc26a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c deleted file mode 100644 index f2d60f470f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c deleted file mode 100644 index 637051238b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c deleted file mode 100644 index da5f301a19a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ -/* { dg-additional-options "-lm" } */ - - -#include "mpx-check.h" -#include "math.h" - -int mpx_test (int argc, const char **argv) -{ - double d1, d2; - d1 = sin(argc); - d2 = cos(argc); - - printf ("%f %f\n", d1, d2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c deleted file mode 100644 index cc1cf8ddd83..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[-1]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c deleted file mode 100644 index 13d30c55ae5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[0]); - printf("%d\n", buf[99]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c deleted file mode 100644 index e3cac3cfa5d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[100]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c deleted file mode 100644 index 7c0367e01e7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c deleted file mode 100644 index 0c91615239a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0]); - printf ("%d\n", p[99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c deleted file mode 100644 index a19d92708d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c deleted file mode 100644 index 1ad3be8ff63..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c deleted file mode 100644 index 6ef755f8971..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[0]); - printf ("%d\n", s1.p[99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c deleted file mode 100644 index 3681ebe03ea..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c deleted file mode 100644 index 3aa21ca3619..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (-1)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c deleted file mode 100644 index 7bdc5af0911..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (0)); - printf ("%d\n", foo (99)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c deleted file mode 100644 index fb8411aa4cb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (100)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c deleted file mode 100644 index 896838ec0ab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c deleted file mode 100644 index 3bdb5ec5162..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][0]); - printf ("%d\n", p[0][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c deleted file mode 100644 index 47bca2fc07f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c deleted file mode 100644 index bd47a4a73aa..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c deleted file mode 100644 index 87fe35d4742..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][0]); - printf ("%d\n", s.b[0].p[0][99]); - printf ("%d\n", s.b[0].p[1][0]); - printf ("%d\n", s.b[0].p[1][199]); - printf ("%d\n", s.b[1].p[0][0]); - printf ("%d\n", s.b[1].p[0][199]); - printf ("%d\n", s.b[1].p[1][0]); - printf ("%d\n", s.b[1].p[1][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c deleted file mode 100644 index 7f136253b0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c deleted file mode 100644 index 9b90cee6a14..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c deleted file mode 100644 index a125024ecc3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][0]); - printf ("%d\n", s.b[0].p[0][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c deleted file mode 100644 index a60c4e0befc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c deleted file mode 100644 index e2443804f74..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[-1]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c deleted file mode 100644 index d513638688f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[0] + tmp[4]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c deleted file mode 100644 index e0f3634c324..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[5]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c deleted file mode 100644 index a9e1890b18e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c deleted file mode 100644 index b1cfeacafbb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (s); - - s.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c deleted file mode 100644 index c4ca68d682a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c deleted file mode 100644 index 8375aa1b820..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c deleted file mode 100644 index b246448346d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 0); - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c deleted file mode 100644 index b3b13f86672..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c deleted file mode 100644 index d796ced340d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c deleted file mode 100644 index 6a1a087b23f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (s); - - s.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c deleted file mode 100644 index b285cbc8320..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c deleted file mode 100644 index 34d4ab18581..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c deleted file mode 100644 index 8e238ef657e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c deleted file mode 100644 index bd947e5859d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c deleted file mode 100644 index c0666d389a1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c deleted file mode 100644 index 17366c55ca7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c deleted file mode 100644 index f2f8281dc36..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c deleted file mode 100644 index 357bb6ac746..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c deleted file mode 100644 index a4acd38939e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c deleted file mode 100644 index c94ae1c24aa..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c deleted file mode 100644 index ceee8d0c69d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c deleted file mode 100644 index 913f5a28dc2..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c deleted file mode 100644 index f92476a7854..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c deleted file mode 100644 index b0ecc176cd5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c deleted file mode 100644 index ec63dc7ef47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c deleted file mode 100644 index c9e682252c1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c deleted file mode 100644 index 58d03e783d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c deleted file mode 100644 index d9072ec49c9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c deleted file mode 100644 index fdcfc9ffb39..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c deleted file mode 100644 index acce18334ad..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c deleted file mode 100644 index 03ce6687f62..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c deleted file mode 100644 index 449b2c5dd58..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c deleted file mode 100644 index 3f1ac74d9a7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf ("%d\n", ss.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c deleted file mode 100644 index 5a709bc8546..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf("%d\n", ss.b[0].p[0][0]); - printf("%d\n", ss.b[0].p[0][99]); - printf("%d\n", ss.b[0].p[1][0]); - printf("%d\n", ss.b[0].p[1][199]); - printf("%d\n", ss.b[1].p[0][0]); - printf("%d\n", ss.b[1].p[0][199]); - printf("%d\n", ss.b[1].p[1][0]); - printf("%d\n", ss.b[1].p[1][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c deleted file mode 100644 index b0fe8f46143..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf ("%d\n", ss.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c deleted file mode 100644 index 0cb6440a1d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c deleted file mode 100644 index 01f5b679faf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, 0); - foo (&s.a, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c deleted file mode 100644 index c500bb4b77b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c deleted file mode 100644 index 3275fe03db8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, -1); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c deleted file mode 100644 index 2e0483b1c29..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, 0); - rd (buf, 99); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c deleted file mode 100644 index 86116e87e4d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, 100); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c deleted file mode 100644 index c2559829bfd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c deleted file mode 100644 index f96689f479a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = -50; - - rd (s); - - s.v.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c deleted file mode 100644 index 6d65e5a73fe..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = 50; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c deleted file mode 100644 index bbbb256ae30..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, -11); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c deleted file mode 100644 index 4beda02b951..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, 89); - foo1 (buf, -9); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c deleted file mode 100644 index 4b763842755..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, 90); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c deleted file mode 100644 index dab1dc86792..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, -11); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c deleted file mode 100644 index 6bf4721f75a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, 89); - foo1 (buf, buf1, -9); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c deleted file mode 100644 index 4af59758fb0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, 90); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c deleted file mode 100644 index 89faa9281e8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, -1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c deleted file mode 100644 index e1e12a6d70b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, 0); - rd (buf1, 0, buf, 99); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c deleted file mode 100644 index 14206a0f5a9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c deleted file mode 100644 index 8af925f45a3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c deleted file mode 100644 index 5c2f422dc3f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, 0, buf1); - rd (buf1, 1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c deleted file mode 100644 index b4463712e2b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c deleted file mode 100644 index b1f9f240622..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c deleted file mode 100644 index 93f9eb810b4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, 0, buf1); - rd (buf1, 2, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c deleted file mode 100644 index dddf3563599..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c deleted file mode 100644 index 274ccc2469e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c deleted file mode 100644 index 5412d113223..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, 3, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c deleted file mode 100644 index e8f06e36a3a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c deleted file mode 100644 index 1dae013f0ec..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c deleted file mode 100644 index bd15e0fde6f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c deleted file mode 100644 index de3721dfdd5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c deleted file mode 100644 index 822d32a7b7b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c deleted file mode 100644 index c5c4b125725..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, buf1, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c deleted file mode 100644 index 635a48fc16d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c deleted file mode 100644 index 1121577f912..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c deleted file mode 100644 index 525a93d9d87..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, 0, buf1); - rd (buf1, 2, 10.0d, 10.0d, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c deleted file mode 100644 index 0e8d21e9940..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c deleted file mode 100644 index bb58ac594b9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c deleted file mode 100644 index 59596f27166..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, 0); - foo (buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c deleted file mode 100644 index c03bcef08ec..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c deleted file mode 100644 index 1994df9d0a1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, -2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c deleted file mode 100644 index 1a828495833..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 0); - rd (s->p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c deleted file mode 100644 index b0f6d456e35..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c deleted file mode 100644 index 128f13980af..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c deleted file mode 100644 index 2469b7da2b1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, 0); - rd (foo->buf, 19); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c deleted file mode 100644 index 63a6b279215..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, 20); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c deleted file mode 100644 index 9739920c705..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, -2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c deleted file mode 100644 index f5c8f95cda5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 0); - rd (s->p, 99); - s->p[0]; - s->p[99]; - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c deleted file mode 100644 index 8385a5a631b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 110); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr63995-2.c b/gcc/testsuite/gcc.target/i386/pr63995-2.c deleted file mode 100644 index 89b429e7f55..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr63995-2.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */ - -struct ts -{ - int field; -}; - -extern void test1 (); -extern void test2 (struct ts *); - -static void -init (struct ts *c) -{ - c->field = -1; -} - -struct ts -test3 (const struct ts *other) -{ - struct ts r; - if (other->field != 0) - test1 (); - init (&r); - test2 (&r); - return r; -} diff --git a/gcc/testsuite/gcc.target/i386/pr64805.c b/gcc/testsuite/gcc.target/i386/pr64805.c deleted file mode 100644 index 3c8d6668dfa..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr64805.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -#include - -static inline void __attribute ((always_inline)) functionA(void) -{ - return; -} - -static inline void __attribute ((always_inline)) functionB(void) -{ - functionA(); -} - -int test(void) -{ - functionB(); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c deleted file mode 100644 index d5cfecd15a9..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65044.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */ -/* { dg-error ".-fcheck-pointer-bounds. is not supported with Address Sanitizer" "" { target *-*-* } 0 } */ - -extern int x[]; - -void -foo () -{ - x[0] = 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65167.c b/gcc/testsuite/gcc.target/i386/pr65167.c deleted file mode 100644 index 64cc7aef520..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65167.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fschedule-insns -fcheck-pointer-bounds -mmpx" } */ - -void bar(int *a, int *b, int *c, int *d, int *e, int *f); - -int foo (int *a, int *b, int *c, int *d, int *e, int *f) -{ - bar (a, b, c, d, e, f); - return *f; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65183.c b/gcc/testsuite/gcc.target/i386/pr65183.c deleted file mode 100644 index 4d62267fc0d..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65183.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx" } */ - -extern void bar(void *); -extern void baz(void); - -static int lc[32]; - -void foobar(void *c) -{ - bar(&c); - __builtin_memcpy (lc, c, lc[0]); -} - -void foo () -{ - baz (); - foobar(0); -} diff --git a/gcc/testsuite/gcc.target/i386/pr65184.c b/gcc/testsuite/gcc.target/i386/pr65184.c deleted file mode 100644 index e12b8a922f1..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65184.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mabi=ms -fcheck-pointer-bounds -mmpx" } */ - -void -foo (int *a) -{ - if (a[0] != a[1] * 2333) - __builtin_abort (); -} - -void -bar (int *a) -{ - if (a[0] != a[1] * 2333) - __builtin_abort (); -} diff --git a/gcc/testsuite/gcc.target/i386/pr65523.c b/gcc/testsuite/gcc.target/i386/pr65523.c deleted file mode 100644 index 20e715237fc..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65523.c +++ /dev/null @@ -1,11 +0,0 @@ -/* PR target/65523 */ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void *memmove (); - -void * -bar () -{ - return memmove (); -} diff --git a/gcc/testsuite/gcc.target/i386/pr70876.c b/gcc/testsuite/gcc.target/i386/pr70876.c deleted file mode 100644 index c9bab690b33..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr70876.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -Wno-implicit-function-declaration" } */ - -void f (char *s1, char *s2) -{ - int z = 5; - - struct { char a[z]; } x; - - s1[0] = s2[0]; - - foo (x, x); -} diff --git a/gcc/testsuite/gcc.target/i386/pr70877.c b/gcc/testsuite/gcc.target/i386/pr70877.c deleted file mode 100644 index 4269e84daff..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr70877.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -int foo(int); - -typedef struct { - double d; - int a; -} str_t; - -void bar(double d, int i, str_t s) -{ - d = ((double (*) (int)) foo) (i); /* { dg-warning "function called through a non-compatible type" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/pr71458.c b/gcc/testsuite/gcc.target/i386/pr71458.c deleted file mode 100644 index d36b61cbe02..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr71458.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=bounds" } */ -/* { dg-error "'-fcheck-pointer-bounds' is not supported with '-fsanitize=bounds'" "" { target *-*-* } 0 } */ - -enum {} a[0]; -void fn1(int); -void fn2() { fn1(a[-1]); } diff --git a/gcc/testsuite/gcc.target/i386/pr80880.c b/gcc/testsuite/gcc.target/i386/pr80880.c deleted file mode 100644 index 674a587dd26..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr80880.c +++ /dev/null @@ -1,10 +0,0 @@ -/* PR target/65523 */ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fcheck-pointer-bounds -mmpx" } */ - -int *fn1() -{ - int *r = fn1(); - if (r == (void *)0) - return r; -} diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c deleted file mode 100644 index f73553c9a9f..00000000000 --- a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c +++ /dev/null @@ -1,15 +0,0 @@ -/* PR target/r84530 */ -/* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -struct s { _Complex unsigned short x; }; -struct s gs = { 100 + 200i }; -struct s __attribute__((noinline)) foo (void) { return gs; } - -/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */ -/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c deleted file mode 100644 index dcce6baf104..00000000000 --- a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-times "return &glob," 2 "optimized" } } */ - -int glob; - -int * -test1 (void) -{ - return &glob; -} - -int * -test2 (void) -{ - return test1 (); -} diff --git a/gcc/testsuite/lib/mpx-dg.exp b/gcc/testsuite/lib/mpx-dg.exp deleted file mode 100644 index 2fda79540cf..00000000000 --- a/gcc/testsuite/lib/mpx-dg.exp +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright (C) 2014-2018 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# . - -# Return 1 if compilation with "-fcheck-pointer-bounds -mmpx" is -# error-free for trivial code, 0 otherwise. - -proc check_effective_target_mpx {} { - return [check_no_compiler_messages mpx executable { - int *foo (int *arg) { return arg; } - int main (void) - { - int *p = (int *)__builtin_malloc (sizeof (int)); - int res = foo (p) == 0; - __builtin_free (p); - return res; - } - } "-fcheck-pointer-bounds -mmpx"] -} - -# -# mpx_link_flags -- compute library path and flags to find libmpx. -# - -proc mpx_link_flags { paths } { - global srcdir - global ld_library_path - global shlib_ext - global mpx_saved_library_path - - set gccpath ${paths} - set flags "" - - set shlib_ext [get_shlib_extension] - set mpx_saved_library_path $ld_library_path - - if { $gccpath != "" } { - if { [file exists "${gccpath}/libmpx/mpxrt/.libs/libmpx.a"] - || [file exists "${gccpath}/libmpx/mpxrt/.libs/libmpx.${shlib_ext}"] } { - append flags " -B${gccpath}/libmpx/ " - append flags " -B${gccpath}/libmpx/mpxrt " - append flags " -L${gccpath}/libmpx/mpxrt/.libs " - append ld_library_path ":${gccpath}/libmpx/mpxrt/.libs" - } - - if { [file exists "${gccpath}/libmpx/mpxwrap/.libs/libmpxwrappers.a"] - || [file exists "${gccpath}/libmpx/mpxwrap/.libs/libmpxwrappers.${shlib_ext}"] } { - append flags " -B${gccpath}/libmpx/ " - append flags " -B${gccpath}/libmpx/mpxwrap " - append flags " -L${gccpath}/libmpx/mpxwrap/.libs " - append ld_library_path ":${gccpath}/libmpx/mpxwrap/.libs" - } - } else { - global tool_root_dir - - set libmpx [lookfor_file ${tool_root_dir} libmpx] - if { $libmpx != "" } { - append flags "-L${libmpx} " - append ld_library_path ":${libmpx}" - } - - set libmpxwrappers [lookfor_file ${tool_root_dir} libmpxwrappers] - if { $libmpxwrappers != "" } { - append flags "-L${libmpxwrappers} " - append ld_library_path ":${libmpxwrappers}" - } - } - - set_ld_library_path_env_vars - - return "$flags" -} - -# -# mpx_init -- called at the start of each subdir of tests -# - -proc mpx_init { args } { - global TEST_ALWAYS_FLAGS - global ALWAYS_CXXFLAGS - global TOOL_OPTIONS - global mpx_saved_TEST_ALWAYS_FLAGS - global mpx_saved_ALWAYS_CXXFLAGS - - setenv CHKP_RT_MODE "stop" - - set link_flags "" - if ![is_remote host] { - if [info exists TOOL_OPTIONS] { - set link_flags "[mpx_link_flags [get_multilibs ${TOOL_OPTIONS}]]" - } else { - set link_flags "[mpx_link_flags [get_multilibs]]" - } - } - - if [info exists TEST_ALWAYS_FLAGS] { - set mpx_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS - } - if [info exists ALWAYS_CXXFLAGS] { - set mpx_saved_ALWAYS_CXXFLAGS $ALWAYS_CXXFLAGS - set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS] - } else { - if [info exists TEST_ALWAYS_FLAGS] { - set TEST_ALWAYS_FLAGS "$link_flags $TEST_ALWAYS_FLAGS" - } else { - set TEST_ALWAYS_FLAGS "$link_flags" - } - } -} - -# -# mpx_finish -- called at the end of each subdir of tests -# - -proc mpx_finish { args } { - global TEST_ALWAYS_FLAGS - global mpx_saved_TEST_ALWAYS_FLAGS - global mpx_saved_ALWAYS_CXXFLAGS - global mpx_saved_library_path - global ld_library_path - - if [info exists mpx_saved_ALWAYS_CXXFLAGS ] { - set ALWAYS_CXXFLAGS $mpx_saved_ALWAYS_CXXFLAGS - } else { - if [info exists mpx_saved_TEST_ALWAYS_FLAGS] { - set TEST_ALWAYS_FLAGS $mpx_saved_TEST_ALWAYS_FLAGS - } else { - unset TEST_ALWAYS_FLAGS - } - } - set ld_library_path $mpx_saved_library_path - set_ld_library_path_env_vars - clear_effective_target_cache -} diff --git a/gcc/toplev.c b/gcc/toplev.c index 8f812c2a475..d1080968833 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -77,7 +77,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-vrp.h" #include "ipa-prop.h" #include "gcse.h" -#include "tree-chkp.h" #include "omp-offload.h" #include "hsa-common.h" #include "edit-context.h" @@ -505,9 +504,6 @@ compile_file (void) if (flag_sanitize & SANITIZE_THREAD) tsan_finish_file (); - if (flag_check_pointer_bounds) - chkp_finish_file (); - omp_finish_file (); hsa_output_brig (); @@ -1315,49 +1311,6 @@ process_options (void) } } - if (flag_check_pointer_bounds) - { - if (targetm.chkp_bound_mode () == VOIDmode) - { - error_at (UNKNOWN_LOCATION, - "%<-fcheck-pointer-bounds%> is not supported for this " - "target"); - flag_check_pointer_bounds = 0; - } - - if (flag_sanitize & SANITIZE_BOUNDS_STRICT) - { - error_at (UNKNOWN_LOCATION, - "%<-fcheck-pointer-bounds%> is not supported with " - "%<-fsanitize=bounds-strict%>"); - flag_check_pointer_bounds = 0; - } - else if (flag_sanitize & SANITIZE_BOUNDS) - { - error_at (UNKNOWN_LOCATION, - "%<-fcheck-pointer-bounds%> is not supported with " - "%<-fsanitize=bounds%>"); - flag_check_pointer_bounds = 0; - } - - if (flag_sanitize & SANITIZE_ADDRESS) - { - error_at (UNKNOWN_LOCATION, - "%<-fcheck-pointer-bounds%> is not supported with " - "Address Sanitizer"); - flag_check_pointer_bounds = 0; - } - - if (flag_sanitize & SANITIZE_THREAD) - { - error_at (UNKNOWN_LOCATION, - "%<-fcheck-pointer-bounds%> is not supported with " - "Thread Sanitizer"); - - flag_check_pointer_bounds = 0; - } - } - /* One region RA really helps to decrease the code size. */ if (flag_ira_region == IRA_REGION_AUTODETECT) flag_ira_region diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c deleted file mode 100644 index 5a005a6a7b6..00000000000 --- a/gcc/tree-chkp-opt.c +++ /dev/null @@ -1,1355 +0,0 @@ -/* Pointer Bounds Checker optimization pass. - Copyright (C) 2014-2018 Free Software Foundation, Inc. - Contributed by Ilya Enkovich (ilya.enkovich@intel.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "target.h" -#include "rtl.h" -#include "tree.h" -#include "gimple.h" -#include "tree-pass.h" -#include "ssa.h" -#include "gimple-pretty-print.h" -#include "diagnostic.h" -#include "fold-const.h" -#include "tree-cfg.h" -#include "tree-ssa-loop-niter.h" -#include "gimple-iterator.h" -#include "tree-chkp.h" -#include "ipa-chkp.h" - -enum check_type -{ - CHECK_LOWER_BOUND, - CHECK_UPPER_BOUND -}; - -struct pol_item -{ - tree cst; - tree var; -}; - -struct address_t -{ - vec pol; -}; - -/* Structure to hold check informtation. */ -struct check_info -{ - /* Type of the check. */ - check_type type; - /* Address used for the check. */ - address_t addr; - /* Bounds used for the check. */ - tree bounds; - /* Check statement. Can be NULL for removed checks. */ - gimple *stmt; -}; - -/* Structure to hold checks information for BB. */ -struct bb_checks -{ - vec checks; -}; - -static void chkp_collect_value (tree ssa_name, address_t &res); - -#define chkp_bndmk_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDMK)) -#define chkp_intersect_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_INTERSECT)) -#define chkp_checkl_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCL)) -#define chkp_checku_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCU)) - -static vec check_infos; - -/* Comparator for pol_item structures I1 and I2 to be used - to find items with equal var. Also used for polynomial - sorting. */ -static int -chkp_pol_item_compare (const void *i1, const void *i2) -{ - const struct pol_item *p1 = (const struct pol_item *)i1; - const struct pol_item *p2 = (const struct pol_item *)i2; - - if (p1->var == p2->var) - return 0; - else if (p1->var > p2->var) - return 1; - else - return -1; -} - -/* Find polynomial item in ADDR with var equal to VAR - and return its index. Return -1 if item was not - found. */ -static int -chkp_pol_find (address_t &addr, tree var) -{ - int left = 0; - int right = addr.pol.length () - 1; - int n; - - while (right >= left) - { - n = (left + right) / 2; - - if (addr.pol[n].var == var - || (var && addr.pol[n].var - && TREE_CODE (var) == ADDR_EXPR - && TREE_CODE (addr.pol[n].var) == ADDR_EXPR - && TREE_OPERAND (var, 0) == TREE_OPERAND (addr.pol[n].var, 0))) - return n; - else if (addr.pol[n].var > var) - right = n - 1; - else - left = n + 1; - } - - return -1; -} - -/* Return constant CST extended to size type. */ -static tree -chkp_extend_const (tree cst) -{ - if (TYPE_PRECISION (TREE_TYPE (cst)) < TYPE_PRECISION (size_type_node)) - return build_int_cst_type (size_type_node, tree_to_shwi (cst)); - - return cst; -} - -/* Add polynomial item CST * VAR to ADDR. */ -static void -chkp_add_addr_item (address_t &addr, tree cst, tree var) -{ - int n = chkp_pol_find (addr, var); - - cst = chkp_extend_const (cst); - - if (n < 0) - { - struct pol_item item; - item.cst = cst; - item.var = var; - - addr.pol.safe_push (item); - addr.pol.qsort (&chkp_pol_item_compare); - } - else - { - addr.pol[n].cst = fold_build2 (PLUS_EXPR, TREE_TYPE (addr.pol[n].cst), - addr.pol[n].cst, cst); - if (TREE_CODE (addr.pol[n].cst) == INTEGER_CST - && integer_zerop (addr.pol[n].cst)) - addr.pol.ordered_remove (n); - } -} - -/* Subtract polynomial item CST * VAR from ADDR. */ -static void -chkp_sub_addr_item (address_t &addr, tree cst, tree var) -{ - int n = chkp_pol_find (addr, var); - - cst = chkp_extend_const (cst); - - if (n < 0) - { - struct pol_item item; - item.cst = fold_build2 (MINUS_EXPR, TREE_TYPE (cst), - integer_zero_node, cst); - item.var = var; - - addr.pol.safe_push (item); - addr.pol.qsort (&chkp_pol_item_compare); - } - else - { - addr.pol[n].cst = fold_build2 (MINUS_EXPR, TREE_TYPE (addr.pol[n].cst), - addr.pol[n].cst, cst); - if (TREE_CODE (addr.pol[n].cst) == INTEGER_CST - && integer_zerop (addr.pol[n].cst)) - addr.pol.ordered_remove (n); - } -} - -/* Add address DELTA to ADDR. */ -static void -chkp_add_addr_addr (address_t &addr, address_t &delta) -{ - unsigned int i; - for (i = 0; i < delta.pol.length (); i++) - chkp_add_addr_item (addr, delta.pol[i].cst, delta.pol[i].var); -} - -/* Subtract address DELTA from ADDR. */ -static void -chkp_sub_addr_addr (address_t &addr, address_t &delta) -{ - unsigned int i; - for (i = 0; i < delta.pol.length (); i++) - chkp_sub_addr_item (addr, delta.pol[i].cst, delta.pol[i].var); -} - -/* Mutiply address ADDR by integer constant MULT. */ -static void -chkp_mult_addr (address_t &addr, tree mult) -{ - unsigned int i; - for (i = 0; i < addr.pol.length (); i++) - addr.pol[i].cst = fold_build2 (MULT_EXPR, TREE_TYPE (addr.pol[i].cst), - addr.pol[i].cst, mult); -} - -/* Return 1 if we may prove ADDR has a constant value with - determined sign, which is put into *SIGN. Otherwise - return 0. */ -static bool -chkp_is_constant_addr (const address_t &addr, int *sign) -{ - *sign = 0; - - if (addr.pol.length () == 0) - return true; - else if (addr.pol.length () > 1) - return false; - else if (addr.pol[0].var) - return false; - else if (TREE_CODE (addr.pol[0].cst) != INTEGER_CST) - return false; - else if (integer_zerop (addr.pol[0].cst)) - *sign = 0; - else if (tree_int_cst_sign_bit (addr.pol[0].cst)) - *sign = -1; - else - *sign = 1; - - return true; -} - -/* Dump ADDR into dump_file. */ -static void -chkp_print_addr (const address_t &addr) -{ - unsigned int n = 0; - for (n = 0; n < addr.pol.length (); n++) - { - if (n > 0) - fprintf (dump_file, " + "); - - if (addr.pol[n].var == NULL_TREE) - print_generic_expr (dump_file, addr.pol[n].cst); - else - { - if (TREE_CODE (addr.pol[n].cst) != INTEGER_CST - || !integer_onep (addr.pol[n].cst)) - { - print_generic_expr (dump_file, addr.pol[n].cst); - fprintf (dump_file, " * "); - } - print_generic_expr (dump_file, addr.pol[n].var); - } - } -} - -/* Compute value of PTR and put it into address RES. - PTR has to be ADDR_EXPR. */ -static void -chkp_collect_addr_value (tree ptr, address_t &res) -{ - tree obj = TREE_OPERAND (ptr, 0); - address_t addr; - - switch (TREE_CODE (obj)) - { - case INDIRECT_REF: - chkp_collect_value (TREE_OPERAND (obj, 0), res); - break; - - case MEM_REF: - chkp_collect_value (TREE_OPERAND (obj, 0), res); - addr.pol.create (0); - chkp_collect_value (TREE_OPERAND (obj, 1), addr); - chkp_add_addr_addr (res, addr); - addr.pol.release (); - break; - - case ARRAY_REF: - chkp_collect_value (build_fold_addr_expr (TREE_OPERAND (obj, 0)), res); - addr.pol.create (0); - chkp_collect_value (TREE_OPERAND (obj, 1), addr); - chkp_mult_addr (addr, array_ref_element_size (obj)); - chkp_add_addr_addr (res, addr); - addr.pol.release (); - break; - - case COMPONENT_REF: - { - tree str = TREE_OPERAND (obj, 0); - tree field = TREE_OPERAND (obj, 1); - chkp_collect_value (build_fold_addr_expr (str), res); - addr.pol.create (0); - chkp_collect_value (component_ref_field_offset (obj), addr); - chkp_add_addr_addr (res, addr); - addr.pol.release (); - if (DECL_FIELD_BIT_OFFSET (field)) - { - addr.pol.create (0); - chkp_collect_value (fold_build2 (TRUNC_DIV_EXPR, size_type_node, - DECL_FIELD_BIT_OFFSET (field), - size_int (BITS_PER_UNIT)), - addr); - chkp_add_addr_addr (res, addr); - addr.pol.release (); - } - } - break; - - default: - chkp_add_addr_item (res, integer_one_node, ptr); - break; - } -} - -/* Compute value of PTR and put it into address RES. */ -static void -chkp_collect_value (tree ptr, address_t &res) -{ - gimple *def_stmt; - enum gimple_code code; - enum tree_code rhs_code; - address_t addr; - tree rhs1; - - if (TREE_CODE (ptr) == INTEGER_CST) - { - chkp_add_addr_item (res, ptr, NULL); - return; - } - else if (TREE_CODE (ptr) == ADDR_EXPR) - { - chkp_collect_addr_value (ptr, res); - return; - } - else if (TREE_CODE (ptr) != SSA_NAME) - { - chkp_add_addr_item (res, integer_one_node, ptr); - return; - } - - /* Now we handle the case when polynomial is computed - for SSA NAME. */ - def_stmt = SSA_NAME_DEF_STMT (ptr); - code = gimple_code (def_stmt); - - /* Currently we do not walk through statements other - than assignment. */ - if (code != GIMPLE_ASSIGN) - { - chkp_add_addr_item (res, integer_one_node, ptr); - return; - } - - rhs_code = gimple_assign_rhs_code (def_stmt); - rhs1 = gimple_assign_rhs1 (def_stmt); - - switch (rhs_code) - { - case SSA_NAME: - case INTEGER_CST: - case ADDR_EXPR: - chkp_collect_value (rhs1, res); - break; - - case PLUS_EXPR: - case POINTER_PLUS_EXPR: - chkp_collect_value (rhs1, res); - addr.pol.create (0); - chkp_collect_value (gimple_assign_rhs2 (def_stmt), addr); - chkp_add_addr_addr (res, addr); - addr.pol.release (); - break; - - case MINUS_EXPR: - chkp_collect_value (rhs1, res); - addr.pol.create (0); - chkp_collect_value (gimple_assign_rhs2 (def_stmt), addr); - chkp_sub_addr_addr (res, addr); - addr.pol.release (); - break; - - case MULT_EXPR: - if (TREE_CODE (rhs1) == SSA_NAME - && TREE_CODE (gimple_assign_rhs2 (def_stmt)) == INTEGER_CST) - { - chkp_collect_value (rhs1, res); - chkp_mult_addr (res, gimple_assign_rhs2 (def_stmt)); - } - else if (TREE_CODE (gimple_assign_rhs2 (def_stmt)) == SSA_NAME - && TREE_CODE (rhs1) == INTEGER_CST) - { - chkp_collect_value (gimple_assign_rhs2 (def_stmt), res); - chkp_mult_addr (res, rhs1); - } - else - chkp_add_addr_item (res, integer_one_node, ptr); - break; - - default: - chkp_add_addr_item (res, integer_one_node, ptr); - break; - } -} - -/* Fill check_info structure *CI with information about - check STMT. */ -static void -chkp_fill_check_info (gimple *stmt, struct check_info *ci) -{ - ci->addr.pol.create (0); - ci->bounds = gimple_call_arg (stmt, 1); - chkp_collect_value (gimple_call_arg (stmt, 0), ci->addr); - ci->type = (gimple_call_fndecl (stmt) == chkp_checkl_fndecl - ? CHECK_LOWER_BOUND - : CHECK_UPPER_BOUND); - ci->stmt = stmt; -} - -/* Release structures holding check information - for current function. */ -static void -chkp_release_check_info (void) -{ - unsigned int n, m; - - if (check_infos.exists ()) - { - for (n = 0; n < check_infos.length (); n++) - { - for (m = 0; m < check_infos[n].checks.length (); m++) - if (check_infos[n].checks[m].addr.pol.exists ()) - check_infos[n].checks[m].addr.pol.release (); - check_infos[n].checks.release (); - } - check_infos.release (); - } -} - -/* Create structures to hold check information - for current function. */ -static void -chkp_init_check_info (void) -{ - struct bb_checks empty_bbc; - int n; - - empty_bbc.checks = vNULL; - - chkp_release_check_info (); - - check_infos.create (last_basic_block_for_fn (cfun)); - for (n = 0; n < last_basic_block_for_fn (cfun); n++) - { - check_infos.safe_push (empty_bbc); - check_infos.last ().checks.create (0); - } -} - -/* Find all checks in current function and store info about them - in check_infos. */ -static void -chkp_gather_checks_info (void) -{ - basic_block bb; - gimple_stmt_iterator i; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Gathering information about checks...\n"); - - chkp_init_check_info (); - - FOR_EACH_BB_FN (bb, cfun) - { - struct bb_checks *bbc = &check_infos[bb->index]; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Searching checks in BB%d...\n", bb->index); - - for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) - { - gimple *stmt = gsi_stmt (i); - - if (gimple_code (stmt) != GIMPLE_CALL) - continue; - - if (gimple_call_fndecl (stmt) == chkp_checkl_fndecl - || gimple_call_fndecl (stmt) == chkp_checku_fndecl) - { - struct check_info ci; - - chkp_fill_check_info (stmt, &ci); - bbc->checks.safe_push (ci); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Adding check information:\n"); - fprintf (dump_file, " bounds: "); - print_generic_expr (dump_file, ci.bounds); - fprintf (dump_file, "\n address: "); - chkp_print_addr (ci.addr); - fprintf (dump_file, "\n check: "); - print_gimple_stmt (dump_file, stmt, 0); - } - } - } - } -} - -/* Return 1 if check CI against BOUNDS always pass, - -1 if check CI against BOUNDS always fails and - 0 if we cannot compute check result. */ -static int -chkp_get_check_result (struct check_info *ci, tree bounds) -{ - gimple *bnd_def; - address_t bound_val; - int sign, res = 0; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Trying to compute result of the check\n"); - fprintf (dump_file, " check: "); - print_gimple_stmt (dump_file, ci->stmt, 0); - fprintf (dump_file, " address: "); - chkp_print_addr (ci->addr); - fprintf (dump_file, "\n bounds: "); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, "\n"); - } - - if (TREE_CODE (bounds) != SSA_NAME) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: bounds tree code is not ssa_name\n"); - return 0; - } - - bnd_def = SSA_NAME_DEF_STMT (bounds); - /* Currently we handle cases when bounds are result of bndmk - or loaded static bounds var. */ - if (gimple_code (bnd_def) == GIMPLE_CALL - && gimple_call_fndecl (bnd_def) == chkp_bndmk_fndecl) - { - bound_val.pol.create (0); - chkp_collect_value (gimple_call_arg (bnd_def, 0), bound_val); - if (ci->type == CHECK_UPPER_BOUND) - { - address_t size_val; - size_val.pol.create (0); - chkp_collect_value (gimple_call_arg (bnd_def, 1), size_val); - chkp_add_addr_addr (bound_val, size_val); - size_val.pol.release (); - chkp_add_addr_item (bound_val, integer_minus_one_node, NULL); - } - } - else if (gimple_code (bnd_def) == GIMPLE_ASSIGN - && gimple_assign_rhs1 (bnd_def) == chkp_get_zero_bounds_var ()) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: always pass with zero bounds\n"); - return 1; - } - else if (gimple_code (bnd_def) == GIMPLE_ASSIGN - && gimple_assign_rhs1 (bnd_def) == chkp_get_none_bounds_var ()) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: always fails with none bounds\n"); - return -1; - } - else if (gimple_code (bnd_def) == GIMPLE_ASSIGN - && TREE_CODE (gimple_assign_rhs1 (bnd_def)) == VAR_DECL) - { - tree bnd_var = gimple_assign_rhs1 (bnd_def); - tree var; - tree size; - - if (!DECL_INITIAL (bnd_var) - || DECL_INITIAL (bnd_var) == error_mark_node) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: cannot compute bounds\n"); - return 0; - } - - gcc_assert (TREE_CODE (DECL_INITIAL (bnd_var)) == ADDR_EXPR); - var = TREE_OPERAND (DECL_INITIAL (bnd_var), 0); - - bound_val.pol.create (0); - chkp_collect_value (DECL_INITIAL (bnd_var), bound_val); - if (ci->type == CHECK_UPPER_BOUND) - { - if (VAR_P (var)) - { - if (DECL_SIZE (var) - && !chkp_variable_size_type (TREE_TYPE (var))) - size = DECL_SIZE_UNIT (var); - else - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: cannot compute bounds\n"); - return 0; - } - } - else - { - gcc_assert (TREE_CODE (var) == STRING_CST); - size = build_int_cst (size_type_node, - TREE_STRING_LENGTH (var)); - } - - address_t size_val; - size_val.pol.create (0); - chkp_collect_value (size, size_val); - chkp_add_addr_addr (bound_val, size_val); - size_val.pol.release (); - chkp_add_addr_item (bound_val, integer_minus_one_node, NULL); - } - } - else - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: cannot compute bounds\n"); - return 0; - } - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, " bound value: "); - chkp_print_addr (bound_val); - fprintf (dump_file, "\n"); - } - - chkp_sub_addr_addr (bound_val, ci->addr); - - if (!chkp_is_constant_addr (bound_val, &sign)) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: cannot compute result\n"); - - res = 0; - } - else if (sign == 0 - || (ci->type == CHECK_UPPER_BOUND && sign > 0) - || (ci->type == CHECK_LOWER_BOUND && sign < 0)) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: always pass\n"); - - res = 1; - } - else - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " result: always fail\n"); - - res = -1; - } - - bound_val.pol.release (); - - return res; -} - -/* Try to compare bounds value and address value - used in the check CI. If we can prove that check - always pass then remove it. */ -static void -chkp_remove_check_if_pass (struct check_info *ci) -{ - int result = 0; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Trying to remove check: "); - print_gimple_stmt (dump_file, ci->stmt, 0); - } - - result = chkp_get_check_result (ci, ci->bounds); - - if (result == 1) - { - gimple_stmt_iterator i = gsi_for_stmt (ci->stmt); - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " action: delete check (always pass)\n"); - - gsi_remove (&i, true); - unlink_stmt_vdef (ci->stmt); - release_defs (ci->stmt); - ci->stmt = NULL; - } - else if (result == -1) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " action: keep check (always fail)\n"); - warning_at (gimple_location (ci->stmt), OPT_Wchkp, - "memory access check always fail"); - } - else if (result == 0) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " action: keep check (cannot compute result)\n"); - } -} - -/* For bounds used in CI check if bounds are produced by - intersection and we may use outer bounds instead. If - transformation is possible then fix check statement and - recompute its info. */ -static void -chkp_use_outer_bounds_if_possible (struct check_info *ci) -{ - gimple *bnd_def; - tree bnd1, bnd2, bnd_res = NULL; - int check_res1, check_res2; - - if (TREE_CODE (ci->bounds) != SSA_NAME) - return; - - bnd_def = SSA_NAME_DEF_STMT (ci->bounds); - if (gimple_code (bnd_def) != GIMPLE_CALL - || gimple_call_fndecl (bnd_def) != chkp_intersect_fndecl) - return; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Check if bounds intersection is redundant: \n"); - fprintf (dump_file, " check: "); - print_gimple_stmt (dump_file, ci->stmt, 0); - fprintf (dump_file, " intersection: "); - print_gimple_stmt (dump_file, bnd_def, 0); - fprintf (dump_file, "\n"); - } - - bnd1 = gimple_call_arg (bnd_def, 0); - bnd2 = gimple_call_arg (bnd_def, 1); - - check_res1 = chkp_get_check_result (ci, bnd1); - check_res2 = chkp_get_check_result (ci, bnd2); - if (check_res1 == 1) - bnd_res = bnd2; - else if (check_res1 == -1) - bnd_res = bnd1; - else if (check_res2 == 1) - bnd_res = bnd1; - else if (check_res2 == -1) - bnd_res = bnd2; - - if (bnd_res) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, " action: use "); - print_generic_expr (dump_file, bnd2); - fprintf (dump_file, " instead of "); - print_generic_expr (dump_file, ci->bounds); - fprintf (dump_file, "\n"); - } - - ci->bounds = bnd_res; - gimple_call_set_arg (ci->stmt, 1, bnd_res); - update_stmt (ci->stmt); - chkp_fill_check_info (ci->stmt, ci); - } -} - -/* Try to find checks whose bounds were produced by intersection - which does not affect check result. In such check outer bounds - are used instead. It allows to remove excess intersections - and helps to compare checks. */ -static void -chkp_remove_excess_intersections (void) -{ - basic_block bb; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Searching for redundant bounds intersections...\n"); - - FOR_EACH_BB_FN (bb, cfun) - { - struct bb_checks *bbc = &check_infos[bb->index]; - unsigned int no; - - /* Iterate through all found checks in BB. */ - for (no = 0; no < bbc->checks.length (); no++) - if (bbc->checks[no].stmt) - chkp_use_outer_bounds_if_possible (&bbc->checks[no]); - } -} - -/* Try to remove all checks which are known to alwyas pass. */ -static void -chkp_remove_constant_checks (void) -{ - basic_block bb; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Searching for redundant checks...\n"); - - FOR_EACH_BB_FN (bb, cfun) - { - struct bb_checks *bbc = &check_infos[bb->index]; - unsigned int no; - - /* Iterate through all found checks in BB. */ - for (no = 0; no < bbc->checks.length (); no++) - if (bbc->checks[no].stmt) - chkp_remove_check_if_pass (&bbc->checks[no]); - } -} - -/* Return fast version of string function FNCODE. */ -static tree -chkp_get_nobnd_fndecl (enum built_in_function fncode) -{ - /* Check if we are allowed to use fast string functions. */ - if (!flag_chkp_use_fast_string_functions) - return NULL_TREE; - - tree fndecl = NULL_TREE; - - switch (fncode) - { - case BUILT_IN_MEMCPY_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMCPY_NOBND); - break; - - case BUILT_IN_MEMPCPY_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMPCPY_NOBND); - break; - - case BUILT_IN_MEMMOVE_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMMOVE_NOBND); - break; - - case BUILT_IN_MEMSET_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMSET_NOBND); - break; - - case BUILT_IN_CHKP_MEMCPY_NOCHK_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMPCPY_NOCHK_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMPCPY_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMMOVE_NOCHK_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMMOVE_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMSET_NOCHK_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMSET_NOBND_NOCHK); - break; - - default: - break; - } - - if (fndecl) - fndecl = chkp_maybe_clone_builtin_fndecl (fndecl); - - return fndecl; -} - - -/* Return no-check version of string function FNCODE. */ -static tree -chkp_get_nochk_fndecl (enum built_in_function fncode) -{ - /* Check if we are allowed to use fast string functions. */ - if (!flag_chkp_use_nochk_string_functions) - return NULL_TREE; - - tree fndecl = NULL_TREE; - - switch (fncode) - { - case BUILT_IN_MEMCPY_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMCPY_NOCHK); - break; - - case BUILT_IN_MEMPCPY_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMPCPY_NOCHK); - break; - - case BUILT_IN_MEMMOVE_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMMOVE_NOCHK); - break; - - case BUILT_IN_MEMSET_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMSET_NOCHK); - break; - - case BUILT_IN_CHKP_MEMCPY_NOBND_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMPCPY_NOBND_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMPCPY_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMMOVE_NOBND_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMMOVE_NOBND_NOCHK); - break; - - case BUILT_IN_CHKP_MEMSET_NOBND_CHKP: - fndecl = builtin_decl_implicit (BUILT_IN_CHKP_MEMSET_NOBND_NOCHK); - break; - - default: - break; - } - - if (fndecl) - fndecl = chkp_maybe_clone_builtin_fndecl (fndecl); - - return fndecl; -} - -/* Find memcpy, mempcpy, memmove and memset calls, perform - checks before call and then call no_chk version of - functions. We do it on O2 to enable inlining of these - functions during expand. - - Also try to find memcpy, mempcpy, memmove and memset calls - which are known to not write pointers to memory and use - faster function versions for them. */ -static void -chkp_optimize_string_function_calls (void) -{ - basic_block bb; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Searching for replaceable string function calls...\n"); - - FOR_EACH_BB_FN (bb, cfun) - { - gimple_stmt_iterator i; - - for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) - { - gimple *stmt = gsi_stmt (i); - tree fndecl; - - if (!is_gimple_call (stmt) - || !gimple_call_with_bounds_p (stmt) - || !gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) - continue; - - fndecl = gimple_call_fndecl (stmt); - if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMCPY_CHKP - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMPCPY_CHKP - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMMOVE_CHKP - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMSET_CHKP) - { - tree dst = gimple_call_arg (stmt, 0); - tree dst_bnd = gimple_call_arg (stmt, 1); - bool is_memset = DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMSET_CHKP; - tree size = gimple_call_arg (stmt, is_memset ? 3 : 4); - tree fndecl_nochk; - gimple_stmt_iterator j; - basic_block check_bb; - address_t size_val; - int sign; - bool known; - - /* We may replace call with corresponding __chkp_*_nobnd - call in case destination pointer base type is not - void or pointer. */ - if (POINTER_TYPE_P (TREE_TYPE (dst)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (dst))) - && !chkp_type_has_pointer (TREE_TYPE (TREE_TYPE (dst)))) - { - tree fndecl_nobnd - = chkp_get_nobnd_fndecl (DECL_FUNCTION_CODE (fndecl)); - - if (fndecl_nobnd) - fndecl = fndecl_nobnd; - } - - fndecl_nochk = chkp_get_nochk_fndecl (DECL_FUNCTION_CODE (fndecl)); - - if (fndecl_nochk) - fndecl = fndecl_nochk; - - if (fndecl != gimple_call_fndecl (stmt)) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Replacing call: "); - print_gimple_stmt (dump_file, stmt, 0, - TDF_VOPS|TDF_MEMSYMS); - } - - gimple_call_set_fndecl (stmt, fndecl); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "With a new call: "); - print_gimple_stmt (dump_file, stmt, 0, - TDF_VOPS|TDF_MEMSYMS); - } - } - - /* If there is no nochk version of function then - do nothing. Otherwise insert checks before - the call. */ - if (!fndecl_nochk) - continue; - - /* If size passed to call is known and > 0 - then we may insert checks unconditionally. */ - size_val.pol.create (0); - chkp_collect_value (size, size_val); - known = chkp_is_constant_addr (size_val, &sign); - size_val.pol.release (); - - /* If we are not sure size is not zero then we have - to perform runtime check for size and perform - checks only when size is not zero. */ - if (!known) - { - gimple *check = gimple_build_cond (NE_EXPR, - size, - size_zero_node, - NULL_TREE, - NULL_TREE); - - /* Split block before string function call. */ - gsi_prev (&i); - check_bb = insert_cond_bb (bb, gsi_stmt (i), check, - profile_probability::likely ()); - - /* Set position for checks. */ - j = gsi_last_bb (check_bb); - - /* The block was splitted and therefore we - need to set iterator to its end. */ - i = gsi_last_bb (bb); - } - /* If size is known to be zero then no checks - should be performed. */ - else if (!sign) - continue; - else - j = i; - - size = size_binop (MINUS_EXPR, size, size_one_node); - if (!is_memset) - { - tree src = gimple_call_arg (stmt, 2); - tree src_bnd = gimple_call_arg (stmt, 3); - - chkp_check_mem_access (src, fold_build_pointer_plus (src, size), - src_bnd, j, gimple_location (stmt), - integer_zero_node); - } - - chkp_check_mem_access (dst, fold_build_pointer_plus (dst, size), - dst_bnd, j, gimple_location (stmt), - integer_one_node); - - } - } - } -} - -/* Intrumentation pass inserts most of bounds creation code - in the header of the function. We want to move bounds - creation closer to bounds usage to reduce bounds lifetime. - We also try to avoid bounds creation code on paths where - bounds are not used. */ -static void -chkp_reduce_bounds_lifetime (void) -{ - basic_block bb = FALLTHRU_EDGE (ENTRY_BLOCK_PTR_FOR_FN (cfun))->dest; - gimple_stmt_iterator i; - - for (i = gsi_start_bb (bb); !gsi_end_p (i); ) - { - gimple *dom_use, *use_stmt, *stmt = gsi_stmt (i); - basic_block dom_bb; - ssa_op_iter iter; - imm_use_iterator use_iter; - use_operand_p use_p; - tree op; - bool want_move = false; - bool deps = false; - - if (gimple_code (stmt) == GIMPLE_CALL - && gimple_call_fndecl (stmt) == chkp_bndmk_fndecl) - want_move = true; - - if (gimple_code (stmt) == GIMPLE_ASSIGN - && POINTER_BOUNDS_P (gimple_assign_lhs (stmt)) - && gimple_assign_rhs_code (stmt) == VAR_DECL) - want_move = true; - - if (!want_move) - { - gsi_next (&i); - continue; - } - - /* Check we do not increase other values lifetime. */ - FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE) - { - op = USE_FROM_PTR (use_p); - - if (TREE_CODE (op) == SSA_NAME - && gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_NOP) - { - deps = true; - break; - } - } - - if (deps) - { - gsi_next (&i); - continue; - } - - /* Check all usages of bounds. */ - if (gimple_code (stmt) == GIMPLE_CALL) - op = gimple_call_lhs (stmt); - else - { - gcc_assert (gimple_code (stmt) == GIMPLE_ASSIGN); - op = gimple_assign_lhs (stmt); - } - - dom_use = NULL; - dom_bb = NULL; - - FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, op) - { - if (is_gimple_debug (use_stmt)) - continue; - - if (dom_bb && - dominated_by_p (CDI_DOMINATORS, - dom_bb, gimple_bb (use_stmt))) - { - dom_use = use_stmt; - dom_bb = NULL; - } - else if (dom_bb) - dom_bb = nearest_common_dominator (CDI_DOMINATORS, dom_bb, - gimple_bb (use_stmt)); - else if (!dom_use) - dom_use = use_stmt; - else if (stmt_dominates_stmt_p (use_stmt, dom_use)) - dom_use = use_stmt; - else if (!stmt_dominates_stmt_p (dom_use, use_stmt) - /* If dom_use and use_stmt are PHI nodes in one BB - then it is OK to keep any of them as dom_use. - stmt_dominates_stmt_p returns 0 for such - combination, so check it here manually. */ - && (gimple_code (dom_use) != GIMPLE_PHI - || gimple_code (use_stmt) != GIMPLE_PHI - || gimple_bb (use_stmt) != gimple_bb (dom_use)) - ) - { - dom_bb = nearest_common_dominator (CDI_DOMINATORS, - gimple_bb (use_stmt), - gimple_bb (dom_use)); - dom_use = NULL; - } - } - - /* In case there is a single use, just move bounds - creation to the use. */ - if (dom_use || dom_bb) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Moving creation of "); - print_generic_expr (dump_file, op); - fprintf (dump_file, " down to its use.\n"); - } - - if (dom_use && gimple_code (dom_use) == GIMPLE_PHI) - { - dom_bb = get_immediate_dominator (CDI_DOMINATORS, - gimple_bb (dom_use)); - dom_use = NULL; - } - - if (dom_bb == bb - || (dom_use && gimple_bb (dom_use) == bb)) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Cannot move statement bacause there is no " - "suitable dominator block other than entry block.\n"); - - gsi_next (&i); - } - else - { - if (dom_bb) - { - gimple_stmt_iterator last = gsi_last_bb (dom_bb); - if (!gsi_end_p (last) && stmt_ends_bb_p (gsi_stmt (last))) - gsi_move_before (&i, &last); - else - gsi_move_after (&i, &last); - } - else - { - gimple_stmt_iterator gsi = gsi_for_stmt (dom_use); - gsi_move_before (&i, &gsi); - } - - gimple_set_vdef (stmt, NULL_TREE); - gimple_set_vuse (stmt, NULL_TREE); - update_stmt (stmt); - } - } - else - gsi_next (&i); - } -} - -/* Initilize checker optimization pass. */ -static void -chkp_opt_init (void) -{ - check_infos.create (0); - - calculate_dominance_info (CDI_DOMINATORS); - calculate_dominance_info (CDI_POST_DOMINATORS); - - /* With LTO constant bounds vars may be not initialized by now. - Get constant bounds vars to handle their assignments during - optimizations. */ - chkp_get_zero_bounds_var (); - chkp_get_none_bounds_var (); -} - -/* Finalise checker optimization pass. */ -static void -chkp_opt_fini (void) -{ - chkp_fix_cfg (); - - free_dominance_info (CDI_POST_DOMINATORS); -} - -/* Checker optimization pass function. */ -static unsigned int -chkp_opt_execute (void) -{ - chkp_opt_init(); - - /* This optimization may introduce new checks - and thus we put it before checks search. */ - chkp_optimize_string_function_calls (); - - chkp_gather_checks_info (); - - chkp_remove_excess_intersections (); - - chkp_remove_constant_checks (); - - chkp_reduce_bounds_lifetime (); - - chkp_release_check_info (); - - chkp_opt_fini (); - - return 0; -} - -/* Pass gate. */ -static bool -chkp_opt_gate (void) -{ - return chkp_function_instrumented_p (cfun->decl) - && (flag_chkp_optimize > 0 - || (flag_chkp_optimize == -1 && optimize > 0)); -} - -namespace { - -const pass_data pass_data_chkp_opt = -{ - GIMPLE_PASS, /* type */ - "chkpopt", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - PROP_ssa | PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_verify_il - | TODO_update_ssa /* todo_flags_finish */ -}; - -class pass_chkp_opt : public gimple_opt_pass -{ -public: - pass_chkp_opt (gcc::context *ctxt) - : gimple_opt_pass (pass_data_chkp_opt, ctxt) - {} - - /* opt_pass methods: */ - virtual opt_pass * clone () - { - return new pass_chkp_opt (m_ctxt); - } - - virtual bool gate (function *) - { - return chkp_opt_gate (); - } - - virtual unsigned int execute (function *) - { - return chkp_opt_execute (); - } - -}; // class pass_chkp_opt - -} // anon namespace - -gimple_opt_pass * -make_pass_chkp_opt (gcc::context *ctxt) -{ - return new pass_chkp_opt (ctxt); -} diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c deleted file mode 100644 index d10e6c40423..00000000000 --- a/gcc/tree-chkp.c +++ /dev/null @@ -1,4678 +0,0 @@ -/* Pointer Bounds Checker insrumentation pass. - Copyright (C) 2014-2018 Free Software Foundation, Inc. - Contributed by Ilya Enkovich (ilya.enkovich@intel.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "target.h" -#include "rtl.h" -#include "tree.h" -#include "gimple.h" -#include "cfghooks.h" -#include "tree-pass.h" -#include "ssa.h" -#include "cgraph.h" -#include "diagnostic.h" -#include "fold-const.h" -#include "stor-layout.h" -#include "varasm.h" -#include "tree-iterator.h" -#include "tree-cfg.h" -#include "langhooks.h" -#include "tree-ssa-address.h" -#include "tree-ssa-loop-niter.h" -#include "gimple-pretty-print.h" -#include "gimple-iterator.h" -#include "gimplify.h" -#include "gimplify-me.h" -#include "print-tree.h" -#include "calls.h" -#include "expr.h" -#include "tree-ssa-propagate.h" -#include "tree-chkp.h" -#include "gimple-walk.h" -#include "tree-dfa.h" -#include "ipa-chkp.h" -#include "params.h" -#include "stringpool.h" -#include "attribs.h" - -/* Pointer Bounds Checker instruments code with memory checks to find - out-of-bounds memory accesses. Checks are performed by computing - bounds for each pointer and then comparing address of accessed - memory before pointer dereferencing. - - 1. Function clones. - - See ipa-chkp.c. - - 2. Instrumentation. - - There are few things to instrument: - - a) Memory accesses - add checker calls to check address of accessed memory - against bounds of dereferenced pointer. Obviously safe memory - accesses like static variable access does not have to be instrumented - with checks. - - Example: - - val_2 = *p_1; - - with 4 bytes access is transformed into: - - __builtin___chkp_bndcl (__bound_tmp.1_3, p_1); - D.1_4 = p_1 + 3; - __builtin___chkp_bndcu (__bound_tmp.1_3, D.1_4); - val_2 = *p_1; - - where __bound_tmp.1_3 are bounds computed for pointer p_1, - __builtin___chkp_bndcl is a lower bound check and - __builtin___chkp_bndcu is an upper bound check. - - b) Pointer stores. - - When pointer is stored in memory we need to store its bounds. To - achieve compatibility of instrumented code with regular codes - we have to keep data layout and store bounds in special bound tables - via special checker call. Implementation of bounds table may vary for - different platforms. It has to associate pointer value and its - location (it is required because we may have two equal pointers - with different bounds stored in different places) with bounds. - Another checker builtin allows to get bounds for specified pointer - loaded from specified location. - - Example: - - buf1[i_1] = &buf2; - - is transformed into: - - buf1[i_1] = &buf2; - D.1_2 = &buf1[i_1]; - __builtin___chkp_bndstx (D.1_2, &buf2, __bound_tmp.1_2); - - where __bound_tmp.1_2 are bounds of &buf2. - - c) Static initialization. - - The special case of pointer store is static pointer initialization. - Bounds initialization is performed in a few steps: - - register all static initializations in front-end using - chkp_register_var_initializer - - when file compilation finishes we create functions with special - attribute 'chkp ctor' and put explicit initialization code - (assignments) for all statically initialized pointers. - - when checker constructor is compiled checker pass adds required - bounds initialization for all statically initialized pointers - - since we do not actually need excess pointers initialization - in checker constructor we remove such assignments from them - - d) Calls. - - For each call in the code we add additional arguments to pass - bounds for pointer arguments. We determine type of call arguments - using arguments list from function declaration; if function - declaration is not available we use function type; otherwise - (e.g. for unnamed arguments) we use type of passed value. Function - declaration/type is replaced with the instrumented one. - - Example: - - val_1 = foo (&buf1, &buf2, &buf1, 0); - - is translated into: - - val_1 = foo.chkp (&buf1, __bound_tmp.1_2, &buf2, __bound_tmp.1_3, - &buf1, __bound_tmp.1_2, 0); - - e) Returns. - - If function returns a pointer value we have to return bounds also. - A new operand was added for return statement to hold returned bounds. - - Example: - - return &_buf1; - - is transformed into - - return &_buf1, __bound_tmp.1_1; - - 3. Bounds computation. - - Compiler is fully responsible for computing bounds to be used for each - memory access. The first step for bounds computation is to find the - origin of pointer dereferenced for memory access. Basing on pointer - origin we define a way to compute its bounds. There are just few - possible cases: - - a) Pointer is returned by call. - - In this case we use corresponding checker builtin method to obtain returned - bounds. - - Example: - - buf_1 = malloc (size_2); - foo (buf_1); - - is translated into: - - buf_1 = malloc (size_2); - __bound_tmp.1_3 = __builtin___chkp_bndret (buf_1); - foo (buf_1, __bound_tmp.1_3); - - b) Pointer is an address of an object. - - In this case compiler tries to compute objects size and create corresponding - bounds. If object has incomplete type then special checker builtin is used to - obtain its size at runtime. - - Example: - - foo () - { - __bound_tmp.3; - static int buf[100]; - - : - __bound_tmp.3_2 = __builtin___chkp_bndmk (&buf, 400); - - : - return &buf, __bound_tmp.3_2; - } - - Example: - - Address of an object 'extern int buf[]' with incomplete type is - returned. - - foo () - { - __bound_tmp.4; - long unsigned int __size_tmp.3; - - : - __size_tmp.3_4 = __builtin_ia32_sizeof (buf); - __bound_tmp.4_3 = __builtin_ia32_bndmk (&buf, __size_tmp.3_4); - - : - return &buf, __bound_tmp.4_3; - } - - c) Pointer is the result of object narrowing. - - It happens when we use pointer to an object to compute pointer to a part - of an object. E.g. we take pointer to a field of a structure. In this - case we perform bounds intersection using bounds of original object and - bounds of object's part (which are computed basing on its type). - - There may be some debatable questions about when narrowing should occur - and when it should not. To avoid false bound violations in correct - programs we do not perform narrowing when address of an array element is - obtained (it has address of the whole array) and when address of the first - structure field is obtained (because it is guaranteed to be equal to - address of the whole structure and it is legal to cast it back to structure). - - Default narrowing behavior may be changed using compiler flags. - - Example: - - In this example address of the second structure field is returned. - - foo (struct A * p, __bounds_type __bounds_of_p) - { - __bound_tmp.3; - int * _2; - int * _5; - - : - _5 = &p_1(D)->second_field; - __bound_tmp.3_6 = __builtin___chkp_bndmk (_5, 4); - __bound_tmp.3_8 = __builtin___chkp_intersect (__bound_tmp.3_6, - __bounds_of_p_3(D)); - _2 = &p_1(D)->second_field; - return _2, __bound_tmp.3_8; - } - - Example: - - In this example address of the first field of array element is returned. - - foo (struct A * p, __bounds_type __bounds_of_p, int i) - { - long unsigned int _3; - long unsigned int _4; - struct A * _6; - int * _7; - - : - _3 = (long unsigned int) i_1(D); - _4 = _3 * 8; - _6 = p_5(D) + _4; - _7 = &_6->first_field; - return _7, __bounds_of_p_2(D); - } - - - d) Pointer is the result of pointer arithmetic or type cast. - - In this case bounds of the base pointer are used. In case of binary - operation producing a pointer we are analyzing data flow further - looking for operand's bounds. One operand is considered as a base - if it has some valid bounds. If we fall into a case when none of - operands (or both of them) has valid bounds, a default bounds value - is used. - - Trying to find out bounds for binary operations we may fall into - cyclic dependencies for pointers. To avoid infinite recursion all - walked phi nodes instantly obtain corresponding bounds but created - bounds are marked as incomplete. It helps us to stop DF walk during - bounds search. - - When we reach pointer source, some args of incomplete bounds phi obtain - valid bounds and those values are propagated further through phi nodes. - If no valid bounds were found for phi node then we mark its result as - invalid bounds. Process stops when all incomplete bounds become either - valid or invalid and we are able to choose a pointer base. - - e) Pointer is loaded from the memory. - - In this case we just need to load bounds from the bounds table. - - Example: - - foo () - { - __bound_tmp.3; - static int * buf; - int * _2; - - : - _2 = buf; - __bound_tmp.3_4 = __builtin___chkp_bndldx (&buf, _2); - return _2, __bound_tmp.3_4; - } - -*/ - -typedef void (*assign_handler)(tree, tree, void *); - -static tree chkp_get_zero_bounds (); -static tree chkp_find_bounds (tree ptr, gimple_stmt_iterator *iter); -static tree chkp_find_bounds_loaded (tree ptr, tree ptr_src, - gimple_stmt_iterator *iter); -static void chkp_parse_array_and_component_ref (tree node, tree *ptr, - tree *elt, bool *safe, - bool *bitfield, - tree *bounds, - gimple_stmt_iterator *iter, - bool innermost_bounds); -static void chkp_parse_bit_field_ref (tree node, location_t loc, - tree *offset, tree *size); -static tree -chkp_make_addressed_object_bounds (tree obj, gimple_stmt_iterator *iter); - -#define chkp_bndldx_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDLDX)) -#define chkp_bndstx_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDSTX)) -#define chkp_checkl_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCL)) -#define chkp_checku_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCU)) -#define chkp_bndmk_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDMK)) -#define chkp_ret_bnd_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDRET)) -#define chkp_intersect_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_INTERSECT)) -#define chkp_narrow_bounds_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_NARROW)) -#define chkp_sizeof_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_SIZEOF)) -#define chkp_extract_lower_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_EXTRACT_LOWER)) -#define chkp_extract_upper_fndecl \ - (targetm.builtin_chkp_function (BUILT_IN_CHKP_EXTRACT_UPPER)) - -static GTY (()) tree chkp_uintptr_type; - -static GTY (()) tree chkp_zero_bounds_var; -static GTY (()) tree chkp_none_bounds_var; - -static GTY (()) basic_block entry_block; -static GTY (()) tree zero_bounds; -static GTY (()) tree none_bounds; -static GTY (()) tree incomplete_bounds; -static GTY (()) tree tmp_var; -static GTY (()) tree size_tmp_var; -static GTY (()) bitmap chkp_abnormal_copies; - -struct hash_set *chkp_invalid_bounds; -struct hash_set *chkp_completed_bounds_set; -struct hash_map *chkp_reg_bounds; -struct hash_map *chkp_bound_vars; -struct hash_map *chkp_reg_addr_bounds; -struct hash_map *chkp_incomplete_bounds_map; -struct hash_map *chkp_bounds_map; -struct hash_map *chkp_static_var_bounds; - -static bool in_chkp_pass; - -#define CHKP_BOUND_TMP_NAME "__bound_tmp" -#define CHKP_SIZE_TMP_NAME "__size_tmp" -#define CHKP_BOUNDS_OF_SYMBOL_PREFIX "__chkp_bounds_of_" -#define CHKP_STRING_BOUNDS_PREFIX "__chkp_string_bounds_" -#define CHKP_VAR_BOUNDS_PREFIX "__chkp_var_bounds_" -#define CHKP_ZERO_BOUNDS_VAR_NAME "__chkp_zero_bounds" -#define CHKP_NONE_BOUNDS_VAR_NAME "__chkp_none_bounds" - -/* Static checker constructors may become very large and their - compilation with optimization may take too much time. - Therefore we put a limit to number of statements in one - constructor. Tests with 100 000 statically initialized - pointers showed following compilation times on Sandy Bridge - server (used -O2): - limit 100 => ~18 sec. - limit 300 => ~22 sec. - limit 1000 => ~30 sec. - limit 3000 => ~49 sec. - limit 5000 => ~55 sec. - limit 10000 => ~76 sec. - limit 100000 => ~532 sec. */ -#define MAX_STMTS_IN_STATIC_CHKP_CTOR (PARAM_VALUE (PARAM_CHKP_MAX_CTOR_SIZE)) - -struct chkp_ctor_stmt_list -{ - tree stmts; - int avail; -}; - -/* Return 1 if function FNDECL is instrumented by Pointer - Bounds Checker. */ -bool -chkp_function_instrumented_p (tree fndecl) -{ - return fndecl - && lookup_attribute ("chkp instrumented", DECL_ATTRIBUTES (fndecl)); -} - -/* Mark function FNDECL as instrumented. */ -void -chkp_function_mark_instrumented (tree fndecl) -{ - if (chkp_function_instrumented_p (fndecl)) - return; - - DECL_ATTRIBUTES (fndecl) - = tree_cons (get_identifier ("chkp instrumented"), NULL, - DECL_ATTRIBUTES (fndecl)); -} - -/* Return true when STMT is builtin call to instrumentation function - corresponding to CODE. */ - -bool -chkp_gimple_call_builtin_p (gimple *call, - enum built_in_function code) -{ - tree fndecl; - /* We are skipping the check for address-spaces, that's - why we don't use gimple_call_builtin_p directly here. */ - if (is_gimple_call (call) - && (fndecl = gimple_call_fndecl (call)) != NULL - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD - && (fndecl = targetm.builtin_chkp_function (code)) - && (DECL_FUNCTION_CODE (gimple_call_fndecl (call)) - == DECL_FUNCTION_CODE (fndecl))) - return true; - return false; -} - -/* Emit code to build zero bounds and return RTL holding - the result. */ -rtx -chkp_expand_zero_bounds () -{ - tree zero_bnd; - - if (flag_chkp_use_static_const_bounds) - zero_bnd = chkp_get_zero_bounds_var (); - else - zero_bnd = chkp_build_make_bounds_call (integer_zero_node, - integer_zero_node); - return expand_normal (zero_bnd); -} - -/* Emit code to store zero bounds for PTR located at MEM. */ -void -chkp_expand_bounds_reset_for_mem (tree mem, tree ptr) -{ - tree zero_bnd, bnd, addr, bndstx; - - if (flag_chkp_use_static_const_bounds) - zero_bnd = chkp_get_zero_bounds_var (); - else - zero_bnd = chkp_build_make_bounds_call (integer_zero_node, - integer_zero_node); - bnd = make_tree (pointer_bounds_type_node, - assign_temp (pointer_bounds_type_node, 0, 1)); - addr = build1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (mem)), mem); - bndstx = chkp_build_bndstx_call (addr, ptr, bnd); - - expand_assignment (bnd, zero_bnd, false); - expand_normal (bndstx); -} - -/* Build retbnd call for returned value RETVAL. - - If BNDVAL is not NULL then result is stored - in it. Otherwise a temporary is created to - hold returned value. - - GSI points to a position for a retbnd call - and is set to created stmt. - - Cgraph edge is created for a new call if - UPDATE_EDGE is 1. - - Obtained bounds are returned. */ -tree -chkp_insert_retbnd_call (tree bndval, tree retval, - gimple_stmt_iterator *gsi) -{ - gimple *call; - - if (!bndval) - bndval = create_tmp_reg (pointer_bounds_type_node, "retbnd"); - - call = gimple_build_call (chkp_ret_bnd_fndecl, 1, retval); - gimple_call_set_lhs (call, bndval); - gsi_insert_after (gsi, call, GSI_CONTINUE_LINKING); - - return bndval; -} - -/* Build a GIMPLE_CALL identical to CALL but skipping bounds - arguments. */ - -gcall * -chkp_copy_call_skip_bounds (gcall *call) -{ - bitmap bounds; - unsigned i; - - bitmap_obstack_initialize (NULL); - bounds = BITMAP_ALLOC (NULL); - - for (i = 0; i < gimple_call_num_args (call); i++) - if (POINTER_BOUNDS_P (gimple_call_arg (call, i))) - bitmap_set_bit (bounds, i); - - if (!bitmap_empty_p (bounds)) - call = gimple_call_copy_skip_args (call, bounds); - gimple_call_set_with_bounds (call, false); - - BITMAP_FREE (bounds); - bitmap_obstack_release (NULL); - - return call; -} - -/* Redirect edge E to the correct node according to call_stmt. - Return 1 if bounds removal from call_stmt should be done - instead of redirection. */ - -bool -chkp_redirect_edge (cgraph_edge *e) -{ - bool instrumented = false; - tree decl = e->callee->decl; - - if (e->callee->instrumentation_clone - || chkp_function_instrumented_p (decl)) - instrumented = true; - - if (instrumented - && !gimple_call_with_bounds_p (e->call_stmt)) - e->redirect_callee (cgraph_node::get_create (e->callee->orig_decl)); - else if (!instrumented - && gimple_call_with_bounds_p (e->call_stmt) - && !chkp_gimple_call_builtin_p (e->call_stmt, BUILT_IN_CHKP_BNDCL) - && !chkp_gimple_call_builtin_p (e->call_stmt, BUILT_IN_CHKP_BNDCU) - && !chkp_gimple_call_builtin_p (e->call_stmt, BUILT_IN_CHKP_BNDSTX)) - { - if (e->callee->instrumented_version) - e->redirect_callee (e->callee->instrumented_version); - else - { - tree args = TYPE_ARG_TYPES (TREE_TYPE (decl)); - /* Avoid bounds removal if all args will be removed. */ - if (!args || TREE_VALUE (args) != void_type_node) - return true; - else - gimple_call_set_with_bounds (e->call_stmt, false); - } - } - - return false; -} - -/* Mark statement S to not be instrumented. */ -static void -chkp_mark_stmt (gimple *s) -{ - gimple_set_plf (s, GF_PLF_1, true); -} - -/* Mark statement S to be instrumented. */ -static void -chkp_unmark_stmt (gimple *s) -{ - gimple_set_plf (s, GF_PLF_1, false); -} - -/* Return 1 if statement S should not be instrumented. */ -static bool -chkp_marked_stmt_p (gimple *s) -{ - return gimple_plf (s, GF_PLF_1); -} - -/* Get var to be used for bound temps. */ -static tree -chkp_get_tmp_var (void) -{ - if (!tmp_var) - tmp_var = create_tmp_reg (pointer_bounds_type_node, CHKP_BOUND_TMP_NAME); - - return tmp_var; -} - -/* Get SSA_NAME to be used as temp. */ -static tree -chkp_get_tmp_reg (gimple *stmt) -{ - if (in_chkp_pass) - return make_ssa_name (chkp_get_tmp_var (), stmt); - - return make_temp_ssa_name (pointer_bounds_type_node, stmt, - CHKP_BOUND_TMP_NAME); -} - -/* Get var to be used for size temps. */ -static tree -chkp_get_size_tmp_var (void) -{ - if (!size_tmp_var) - size_tmp_var = create_tmp_reg (chkp_uintptr_type, CHKP_SIZE_TMP_NAME); - - return size_tmp_var; -} - -/* Register bounds BND for address of OBJ. */ -static void -chkp_register_addr_bounds (tree obj, tree bnd) -{ - if (bnd == incomplete_bounds) - return; - - chkp_reg_addr_bounds->put (obj, bnd); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Regsitered bound "); - print_generic_expr (dump_file, bnd); - fprintf (dump_file, " for address of "); - print_generic_expr (dump_file, obj); - fprintf (dump_file, "\n"); - } -} - -/* Return bounds registered for address of OBJ. */ -static tree -chkp_get_registered_addr_bounds (tree obj) -{ - tree *slot = chkp_reg_addr_bounds->get (obj); - return slot ? *slot : NULL_TREE; -} - -/* Mark BOUNDS as completed. */ -static void -chkp_mark_completed_bounds (tree bounds) -{ - chkp_completed_bounds_set->add (bounds); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Marked bounds "); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, " as completed\n"); - } -} - -/* Return 1 if BOUNDS were marked as completed and 0 otherwise. */ -static bool -chkp_completed_bounds (tree bounds) -{ - return chkp_completed_bounds_set->contains (bounds); -} - -/* Clear comleted bound marks. */ -static void -chkp_erase_completed_bounds (void) -{ - delete chkp_completed_bounds_set; - chkp_completed_bounds_set = new hash_set; -} - -/* This function is used to provide a base address for - chkp_get_hard_register_fake_addr_expr. */ -static tree -chkp_get_hard_register_var_fake_base_address () -{ - int prec = TYPE_PRECISION (ptr_type_node); - return wide_int_to_tree (ptr_type_node, wi::min_value (prec, SIGNED)); -} - -/* If we check bounds for a hard register variable, we cannot - use its address - it is illegal, so instead of that we use - this fake value. */ -static tree -chkp_get_hard_register_fake_addr_expr (tree obj) -{ - tree addr = chkp_get_hard_register_var_fake_base_address (); - tree outer = obj; - while (TREE_CODE (outer) == COMPONENT_REF || TREE_CODE (outer) == ARRAY_REF) - { - if (TREE_CODE (outer) == COMPONENT_REF) - { - addr = fold_build_pointer_plus (addr, - component_ref_field_offset (outer)); - outer = TREE_OPERAND (outer, 0); - } - else if (TREE_CODE (outer) == ARRAY_REF) - { - tree indx = fold_convert(size_type_node, TREE_OPERAND(outer, 1)); - tree offset = size_binop (MULT_EXPR, - array_ref_element_size (outer), indx); - addr = fold_build_pointer_plus (addr, offset); - outer = TREE_OPERAND (outer, 0); - } - } - - return addr; -} - -/* Mark BOUNDS associated with PTR as incomplete. */ -static void -chkp_register_incomplete_bounds (tree bounds, tree ptr) -{ - chkp_incomplete_bounds_map->put (bounds, ptr); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Regsitered incomplete bounds "); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, " for "); - print_generic_expr (dump_file, ptr); - fprintf (dump_file, "\n"); - } -} - -/* Return 1 if BOUNDS are incomplete and 0 otherwise. */ -static bool -chkp_incomplete_bounds (tree bounds) -{ - if (bounds == incomplete_bounds) - return true; - - if (chkp_completed_bounds (bounds)) - return false; - - return chkp_incomplete_bounds_map->get (bounds) != NULL; -} - -/* Clear incomleted bound marks. */ -static void -chkp_erase_incomplete_bounds (void) -{ - delete chkp_incomplete_bounds_map; - chkp_incomplete_bounds_map = new hash_map; -} - -/* Build and return bndmk call which creates bounds for structure - pointed by PTR. Structure should have complete type. */ -tree -chkp_make_bounds_for_struct_addr (tree ptr) -{ - tree type = TREE_TYPE (ptr); - tree size; - - gcc_assert (POINTER_TYPE_P (type)); - - size = TYPE_SIZE (TREE_TYPE (type)); - - gcc_assert (size); - - return build_call_nary (pointer_bounds_type_node, - build_fold_addr_expr (chkp_bndmk_fndecl), - 2, ptr, size); -} - -/* Traversal function for chkp_may_finish_incomplete_bounds. - Set RES to 0 if at least one argument of phi statement - defining bounds (passed in KEY arg) is unknown. - Traversal stops when first unknown phi argument is found. */ -bool -chkp_may_complete_phi_bounds (tree const &bounds, tree *slot ATTRIBUTE_UNUSED, - bool *res) -{ - gimple *phi; - unsigned i; - - gcc_assert (TREE_CODE (bounds) == SSA_NAME); - - phi = SSA_NAME_DEF_STMT (bounds); - - gcc_assert (phi && gimple_code (phi) == GIMPLE_PHI); - - for (i = 0; i < gimple_phi_num_args (phi); i++) - { - tree phi_arg = gimple_phi_arg_def (phi, i); - if (!phi_arg) - { - *res = false; - /* Do not need to traverse further. */ - return false; - } - } - - return true; -} - -/* Return 1 if all phi nodes created for bounds have their - arguments computed. */ -static bool -chkp_may_finish_incomplete_bounds (void) -{ - bool res = true; - - chkp_incomplete_bounds_map - ->traverse (&res); - - return res; -} - -/* Helper function for chkp_finish_incomplete_bounds. - Recompute args for bounds phi node. */ -bool -chkp_recompute_phi_bounds (tree const &bounds, tree *slot, - void *res ATTRIBUTE_UNUSED) -{ - tree ptr = *slot; - gphi *bounds_phi; - gphi *ptr_phi; - unsigned i; - - gcc_assert (TREE_CODE (bounds) == SSA_NAME); - gcc_assert (TREE_CODE (ptr) == SSA_NAME); - - bounds_phi = as_a (SSA_NAME_DEF_STMT (bounds)); - ptr_phi = as_a (SSA_NAME_DEF_STMT (ptr)); - - for (i = 0; i < gimple_phi_num_args (bounds_phi); i++) - { - tree ptr_arg = gimple_phi_arg_def (ptr_phi, i); - tree bound_arg = chkp_find_bounds (ptr_arg, NULL); - - add_phi_arg (bounds_phi, bound_arg, - gimple_phi_arg_edge (ptr_phi, i), - UNKNOWN_LOCATION); - } - - return true; -} - -/* Mark BOUNDS as invalid. */ -static void -chkp_mark_invalid_bounds (tree bounds) -{ - chkp_invalid_bounds->add (bounds); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Marked bounds "); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, " as invalid\n"); - } -} - -/* Return 1 if BOUNDS were marked as invalid and 0 otherwise. */ -static bool -chkp_valid_bounds (tree bounds) -{ - if (bounds == zero_bounds || bounds == none_bounds) - return false; - - return !chkp_invalid_bounds->contains (bounds); -} - -/* Helper function for chkp_finish_incomplete_bounds. - Check all arguments of phi nodes trying to find - valid completed bounds. If there is at least one - such arg then bounds produced by phi node are marked - as valid completed bounds and all phi args are - recomputed. */ -bool -chkp_find_valid_phi_bounds (tree const &bounds, tree *slot, bool *res) -{ - gimple *phi; - unsigned i; - - gcc_assert (TREE_CODE (bounds) == SSA_NAME); - - if (chkp_completed_bounds (bounds)) - return true; - - phi = SSA_NAME_DEF_STMT (bounds); - - gcc_assert (phi && gimple_code (phi) == GIMPLE_PHI); - - for (i = 0; i < gimple_phi_num_args (phi); i++) - { - tree phi_arg = gimple_phi_arg_def (phi, i); - - gcc_assert (phi_arg); - - if (chkp_valid_bounds (phi_arg) && !chkp_incomplete_bounds (phi_arg)) - { - *res = true; - chkp_mark_completed_bounds (bounds); - chkp_recompute_phi_bounds (bounds, slot, NULL); - return true; - } - } - - return true; -} - -/* Helper function for chkp_finish_incomplete_bounds. - Marks all incompleted bounds as invalid. */ -bool -chkp_mark_invalid_bounds_walker (tree const &bounds, - tree *slot ATTRIBUTE_UNUSED, - void *res ATTRIBUTE_UNUSED) -{ - if (!chkp_completed_bounds (bounds)) - { - chkp_mark_invalid_bounds (bounds); - chkp_mark_completed_bounds (bounds); - } - return true; -} - -/* When all bound phi nodes have all their args computed - we have enough info to find valid bounds. We iterate - through all incompleted bounds searching for valid - bounds. Found valid bounds are marked as completed - and all remaining incompleted bounds are recomputed. - Process continues until no new valid bounds may be - found. All remained incompleted bounds are marked as - invalid (i.e. have no valid source of bounds). */ -static void -chkp_finish_incomplete_bounds (void) -{ - bool found_valid = true; - - while (found_valid) - { - found_valid = false; - - chkp_incomplete_bounds_map-> - traverse (&found_valid); - - if (found_valid) - chkp_incomplete_bounds_map-> - traverse (NULL); - } - - chkp_incomplete_bounds_map-> - traverse (NULL); - chkp_incomplete_bounds_map-> - traverse (NULL); - - chkp_erase_completed_bounds (); - chkp_erase_incomplete_bounds (); -} - -/* Return 1 if type TYPE is a pointer type or a - structure having a pointer type as one of its fields. - Otherwise return 0. */ -bool -chkp_type_has_pointer (const_tree type) -{ - bool res = false; - - if (BOUNDED_TYPE_P (type)) - res = true; - else if (RECORD_OR_UNION_TYPE_P (type)) - { - tree field; - - for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL) - res = res || chkp_type_has_pointer (TREE_TYPE (field)); - } - else if (TREE_CODE (type) == ARRAY_TYPE) - res = chkp_type_has_pointer (TREE_TYPE (type)); - - return res; -} - -unsigned -chkp_type_bounds_count (const_tree type) -{ - unsigned res = 0; - - if (!type) - res = 0; - else if (BOUNDED_TYPE_P (type)) - res = 1; - else if (RECORD_OR_UNION_TYPE_P (type)) - { - bitmap have_bound; - - bitmap_obstack_initialize (NULL); - have_bound = BITMAP_ALLOC (NULL); - chkp_find_bound_slots (type, have_bound); - res = bitmap_count_bits (have_bound); - BITMAP_FREE (have_bound); - bitmap_obstack_release (NULL); - } - - return res; -} - -/* Get bounds associated with NODE via - chkp_set_bounds call. */ -tree -chkp_get_bounds (tree node) -{ - tree *slot; - - if (!chkp_bounds_map) - return NULL_TREE; - - slot = chkp_bounds_map->get (node); - return slot ? *slot : NULL_TREE; -} - -/* Associate bounds VAL with NODE. */ -void -chkp_set_bounds (tree node, tree val) -{ - if (!chkp_bounds_map) - chkp_bounds_map = new hash_map; - - chkp_bounds_map->put (node, val); -} - -/* Check if statically initialized variable VAR require - static bounds initialization. If VAR is added into - bounds initlization list then 1 is returned. Otherwise - return 0. */ -extern bool -chkp_register_var_initializer (tree var) -{ - if (!flag_check_pointer_bounds - || DECL_INITIAL (var) == error_mark_node) - return false; - - gcc_assert (VAR_P (var)); - gcc_assert (DECL_INITIAL (var)); - - if (TREE_STATIC (var) - && chkp_type_has_pointer (TREE_TYPE (var))) - { - varpool_node::get_create (var)->need_bounds_init = 1; - return true; - } - - return false; -} - -/* Helper function for chkp_finish_file. - - Add new modification statement (RHS is assigned to LHS) - into list of static initializer statementes (passed in ARG). - If statements list becomes too big, emit checker constructor - and start the new one. */ -static void -chkp_add_modification_to_stmt_list (tree lhs, - tree rhs, - void *arg) -{ - struct chkp_ctor_stmt_list *stmts = (struct chkp_ctor_stmt_list *)arg; - tree modify; - - if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) - rhs = build1 (CONVERT_EXPR, TREE_TYPE (lhs), rhs); - - modify = build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, rhs); - append_to_statement_list (modify, &stmts->stmts); - - stmts->avail--; -} - -/* Build and return ADDR_EXPR for specified object OBJ. */ -static tree -chkp_build_addr_expr (tree obj) -{ - /* We first check whether it is a "hard reg case". */ - tree base = get_base_address (obj); - if (VAR_P (base) && DECL_HARD_REGISTER (base)) - return chkp_get_hard_register_fake_addr_expr (obj); - - /* If not - return regular ADDR_EXPR. */ - return TREE_CODE (obj) == TARGET_MEM_REF - ? tree_mem_ref_addr (ptr_type_node, obj) - : build_fold_addr_expr (obj); -} - -/* Helper function for chkp_finish_file. - Initialize bound variable BND_VAR with bounds of variable - VAR to statements list STMTS. If statements list becomes - too big, emit checker constructor and start the new one. */ -static void -chkp_output_static_bounds (tree bnd_var, tree var, - struct chkp_ctor_stmt_list *stmts) -{ - tree lb, ub, size; - - if (TREE_CODE (var) == STRING_CST) - { - lb = build1 (CONVERT_EXPR, size_type_node, chkp_build_addr_expr (var)); - size = build_int_cst (size_type_node, TREE_STRING_LENGTH (var) - 1); - } - else if (DECL_SIZE (var) - && !chkp_variable_size_type (TREE_TYPE (var))) - { - /* Compute bounds using statically known size. */ - lb = build1 (CONVERT_EXPR, size_type_node, chkp_build_addr_expr (var)); - size = size_binop (MINUS_EXPR, DECL_SIZE_UNIT (var), size_one_node); - } - else - { - /* Compute bounds using dynamic size. */ - tree call; - - lb = build1 (CONVERT_EXPR, size_type_node, chkp_build_addr_expr (var)); - call = build1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (chkp_sizeof_fndecl)), - chkp_sizeof_fndecl); - size = build_call_nary (TREE_TYPE (TREE_TYPE (chkp_sizeof_fndecl)), - call, 1, var); - - if (flag_chkp_zero_dynamic_size_as_infinite) - { - tree max_size, cond; - - max_size = build2 (MINUS_EXPR, size_type_node, size_zero_node, lb); - cond = build2 (NE_EXPR, boolean_type_node, size, size_zero_node); - size = build3 (COND_EXPR, size_type_node, cond, size, max_size); - } - - size = size_binop (MINUS_EXPR, size, size_one_node); - } - - ub = size_binop (PLUS_EXPR, lb, size); - stmts->avail -= targetm.chkp_initialize_bounds (bnd_var, lb, ub, - &stmts->stmts); - if (stmts->avail <= 0) - { - cgraph_build_static_cdtor ('B', stmts->stmts, - MAX_RESERVED_INIT_PRIORITY + 2); - stmts->avail = MAX_STMTS_IN_STATIC_CHKP_CTOR; - stmts->stmts = NULL; - } -} - -/* Return entry block to be used for checker initilization code. - Create new block if required. */ -static basic_block -chkp_get_entry_block (void) -{ - if (!entry_block) - entry_block - = split_block_after_labels (ENTRY_BLOCK_PTR_FOR_FN (cfun))->dest; - - return entry_block; -} - -/* Return a bounds var to be used for pointer var PTR_VAR. */ -static tree -chkp_get_bounds_var (tree ptr_var) -{ - tree bnd_var; - tree *slot; - - slot = chkp_bound_vars->get (ptr_var); - if (slot) - bnd_var = *slot; - else - { - bnd_var = create_tmp_reg (pointer_bounds_type_node, - CHKP_BOUND_TMP_NAME); - chkp_bound_vars->put (ptr_var, bnd_var); - } - - return bnd_var; -} - -/* If BND is an abnormal bounds copy, return a copied value. - Otherwise return BND. */ -static tree -chkp_get_orginal_bounds_for_abnormal_copy (tree bnd) -{ - if (bitmap_bit_p (chkp_abnormal_copies, SSA_NAME_VERSION (bnd))) - { - gimple *bnd_def = SSA_NAME_DEF_STMT (bnd); - gcc_checking_assert (gimple_code (bnd_def) == GIMPLE_ASSIGN); - bnd = gimple_assign_rhs1 (bnd_def); - } - - return bnd; -} - -/* Register bounds BND for object PTR in global bounds table. - A copy of bounds may be created for abnormal ssa names. - Returns bounds to use for PTR. */ -static tree -chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd) -{ - bool abnormal_ptr; - - if (!chkp_reg_bounds) - return bnd; - - /* Do nothing if bounds are incomplete_bounds - because it means bounds will be recomputed. */ - if (bnd == incomplete_bounds) - return bnd; - - abnormal_ptr = (TREE_CODE (ptr) == SSA_NAME - && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ptr) - && gimple_code (SSA_NAME_DEF_STMT (ptr)) != GIMPLE_PHI); - - /* A single bounds value may be reused multiple times for - different pointer values. It may cause coalescing issues - for abnormal SSA names. To avoid it we create a bounds - copy in case it is computed for abnormal SSA name. - - We also cannot reuse such created copies for other pointers */ - if (abnormal_ptr - || bitmap_bit_p (chkp_abnormal_copies, SSA_NAME_VERSION (bnd))) - { - tree bnd_var = NULL_TREE; - - if (abnormal_ptr) - { - if (SSA_NAME_VAR (ptr)) - bnd_var = chkp_get_bounds_var (SSA_NAME_VAR (ptr)); - } - else - bnd_var = chkp_get_tmp_var (); - - /* For abnormal copies we may just find original - bounds and use them. */ - if (!abnormal_ptr && !SSA_NAME_IS_DEFAULT_DEF (bnd)) - bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd); - /* For undefined values we usually use none bounds - value but in case of abnormal edge it may cause - coalescing failures. Use default definition of - bounds variable instead to avoid it. */ - else if (SSA_NAME_IS_DEFAULT_DEF (ptr) - && TREE_CODE (SSA_NAME_VAR (ptr)) != PARM_DECL) - { - bnd = get_or_create_ssa_default_def (cfun, bnd_var); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Using default def bounds "); - print_generic_expr (dump_file, bnd); - fprintf (dump_file, " for abnormal default def SSA name "); - print_generic_expr (dump_file, ptr); - fprintf (dump_file, "\n"); - } - } - else - { - tree copy; - gimple *def = SSA_NAME_DEF_STMT (ptr); - gimple *assign; - gimple_stmt_iterator gsi; - - if (bnd_var) - copy = make_ssa_name (bnd_var); - else - copy = make_temp_ssa_name (pointer_bounds_type_node, - NULL, - CHKP_BOUND_TMP_NAME); - bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd); - assign = gimple_build_assign (copy, bnd); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Creating a copy of bounds "); - print_generic_expr (dump_file, bnd); - fprintf (dump_file, " for abnormal SSA name "); - print_generic_expr (dump_file, ptr); - fprintf (dump_file, "\n"); - } - - if (gimple_code (def) == GIMPLE_NOP) - { - gsi = gsi_last_bb (chkp_get_entry_block ()); - if (!gsi_end_p (gsi) && is_ctrl_stmt (gsi_stmt (gsi))) - gsi_insert_before (&gsi, assign, GSI_CONTINUE_LINKING); - else - gsi_insert_after (&gsi, assign, GSI_CONTINUE_LINKING); - } - else - { - gimple *bnd_def = SSA_NAME_DEF_STMT (bnd); - /* Sometimes (e.g. when we load a pointer from a - memory) bounds are produced later than a pointer. - We need to insert bounds copy appropriately. */ - if (gimple_code (bnd_def) != GIMPLE_NOP - && stmt_dominates_stmt_p (def, bnd_def)) - gsi = gsi_for_stmt (bnd_def); - else - gsi = gsi_for_stmt (def); - gsi_insert_after (&gsi, assign, GSI_CONTINUE_LINKING); - } - - bnd = copy; - } - - if (abnormal_ptr) - bitmap_set_bit (chkp_abnormal_copies, SSA_NAME_VERSION (bnd)); - } - - chkp_reg_bounds->put (ptr, bnd); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Regsitered bound "); - print_generic_expr (dump_file, bnd); - fprintf (dump_file, " for pointer "); - print_generic_expr (dump_file, ptr); - fprintf (dump_file, "\n"); - } - - return bnd; -} - -/* Get bounds registered for object PTR in global bounds table. */ -static tree -chkp_get_registered_bounds (tree ptr) -{ - tree *slot; - - if (!chkp_reg_bounds) - return NULL_TREE; - - slot = chkp_reg_bounds->get (ptr); - return slot ? *slot : NULL_TREE; -} - -/* Add bound retvals to return statement pointed by GSI. */ - -static void -chkp_add_bounds_to_ret_stmt (gimple_stmt_iterator *gsi) -{ - greturn *ret = as_a (gsi_stmt (*gsi)); - tree retval = gimple_return_retval (ret); - tree ret_decl = DECL_RESULT (cfun->decl); - tree bounds; - - if (!retval) - return; - - if (BOUNDED_P (ret_decl)) - { - bounds = chkp_find_bounds (retval, gsi); - bounds = chkp_maybe_copy_and_register_bounds (ret_decl, bounds); - gimple_return_set_retbnd (ret, bounds); - } - - update_stmt (ret); -} - -/* Force OP to be suitable for using as an argument for call. - New statements (if any) go to SEQ. */ -static tree -chkp_force_gimple_call_op (tree op, gimple_seq *seq) -{ - gimple_seq stmts; - gimple_stmt_iterator si; - - op = force_gimple_operand (unshare_expr (op), &stmts, true, NULL_TREE); - - for (si = gsi_start (stmts); !gsi_end_p (si); gsi_next (&si)) - chkp_mark_stmt (gsi_stmt (si)); - - gimple_seq_add_seq (seq, stmts); - - return op; -} - -/* Generate lower bound check for memory access by ADDR. - Check is inserted before the position pointed by ITER. - DIRFLAG indicates whether memory access is load or store. */ -static void -chkp_check_lower (tree addr, tree bounds, - gimple_stmt_iterator iter, - location_t location, - tree dirflag) -{ - gimple_seq seq; - gimple *check; - tree node; - - if (!chkp_function_instrumented_p (current_function_decl) - && bounds == chkp_get_zero_bounds ()) - return; - - if (dirflag == integer_zero_node - && !flag_chkp_check_read) - return; - - if (dirflag == integer_one_node - && !flag_chkp_check_write) - return; - - seq = NULL; - - node = chkp_force_gimple_call_op (addr, &seq); - - check = gimple_build_call (chkp_checkl_fndecl, 2, node, bounds); - chkp_mark_stmt (check); - gimple_call_set_with_bounds (check, true); - gimple_set_location (check, location); - gimple_seq_add_stmt (&seq, check); - - gsi_insert_seq_before (&iter, seq, GSI_SAME_STMT); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - gimple *before = gsi_stmt (iter); - fprintf (dump_file, "Generated lower bound check for statement "); - print_gimple_stmt (dump_file, before, 0, TDF_VOPS|TDF_MEMSYMS); - fprintf (dump_file, " "); - print_gimple_stmt (dump_file, check, 0, TDF_VOPS|TDF_MEMSYMS); - } -} - -/* Generate upper bound check for memory access by ADDR. - Check is inserted before the position pointed by ITER. - DIRFLAG indicates whether memory access is load or store. */ -static void -chkp_check_upper (tree addr, tree bounds, - gimple_stmt_iterator iter, - location_t location, - tree dirflag) -{ - gimple_seq seq; - gimple *check; - tree node; - - if (!chkp_function_instrumented_p (current_function_decl) - && bounds == chkp_get_zero_bounds ()) - return; - - if (dirflag == integer_zero_node - && !flag_chkp_check_read) - return; - - if (dirflag == integer_one_node - && !flag_chkp_check_write) - return; - - seq = NULL; - - node = chkp_force_gimple_call_op (addr, &seq); - - check = gimple_build_call (chkp_checku_fndecl, 2, node, bounds); - chkp_mark_stmt (check); - gimple_call_set_with_bounds (check, true); - gimple_set_location (check, location); - gimple_seq_add_stmt (&seq, check); - - gsi_insert_seq_before (&iter, seq, GSI_SAME_STMT); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - gimple *before = gsi_stmt (iter); - fprintf (dump_file, "Generated upper bound check for statement "); - print_gimple_stmt (dump_file, before, 0, TDF_VOPS|TDF_MEMSYMS); - fprintf (dump_file, " "); - print_gimple_stmt (dump_file, check, 0, TDF_VOPS|TDF_MEMSYMS); - } -} - -/* Generate lower and upper bound checks for memory access - to memory slot [FIRST, LAST] againsr BOUNDS. Checks - are inserted before the position pointed by ITER. - DIRFLAG indicates whether memory access is load or store. */ -void -chkp_check_mem_access (tree first, tree last, tree bounds, - gimple_stmt_iterator iter, - location_t location, - tree dirflag) -{ - chkp_check_lower (first, bounds, iter, location, dirflag); - chkp_check_upper (last, bounds, iter, location, dirflag); -} - -/* Replace call to _bnd_chk_* pointed by GSI with - bndcu and bndcl calls. DIRFLAG determines whether - check is for read or write. */ - -void -chkp_replace_address_check_builtin (gimple_stmt_iterator *gsi, - tree dirflag) -{ - gimple_stmt_iterator call_iter = *gsi; - gimple *call = gsi_stmt (*gsi); - tree fndecl = gimple_call_fndecl (call); - tree addr = gimple_call_arg (call, 0); - tree bounds = chkp_find_bounds (addr, gsi); - - if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_LBOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_BOUNDS) - chkp_check_lower (addr, bounds, *gsi, gimple_location (call), dirflag); - - if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_UBOUNDS) - chkp_check_upper (addr, bounds, *gsi, gimple_location (call), dirflag); - - if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_BOUNDS) - { - tree size = gimple_call_arg (call, 1); - addr = fold_build_pointer_plus (addr, size); - addr = fold_build_pointer_plus_hwi (addr, -1); - chkp_check_upper (addr, bounds, *gsi, gimple_location (call), dirflag); - } - - gsi_remove (&call_iter, true); -} - -/* Replace call to _bnd_get_ptr_* pointed by GSI with - corresponding bounds extract call. */ - -void -chkp_replace_extract_builtin (gimple_stmt_iterator *gsi) -{ - gimple *call = gsi_stmt (*gsi); - tree fndecl = gimple_call_fndecl (call); - tree addr = gimple_call_arg (call, 0); - tree bounds = chkp_find_bounds (addr, gsi); - gimple *extract; - - if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_GET_PTR_LBOUND) - fndecl = chkp_extract_lower_fndecl; - else if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_GET_PTR_UBOUND) - fndecl = chkp_extract_upper_fndecl; - else - gcc_unreachable (); - - extract = gimple_build_call (fndecl, 1, bounds); - gimple_call_set_lhs (extract, gimple_call_lhs (call)); - chkp_mark_stmt (extract); - - gsi_replace (gsi, extract, false); -} - -/* Return COMPONENT_REF accessing FIELD in OBJ. */ -static tree -chkp_build_component_ref (tree obj, tree field) -{ - tree res; - - /* If object is TMR then we do not use component_ref but - add offset instead. We need it to be able to get addr - of the reasult later. */ - if (TREE_CODE (obj) == TARGET_MEM_REF) - { - tree offs = TMR_OFFSET (obj); - offs = fold_binary_to_constant (PLUS_EXPR, TREE_TYPE (offs), - offs, DECL_FIELD_OFFSET (field)); - - gcc_assert (offs); - - res = copy_node (obj); - TREE_TYPE (res) = TREE_TYPE (field); - TMR_OFFSET (res) = offs; - } - else - res = build3 (COMPONENT_REF, TREE_TYPE (field), obj, field, NULL_TREE); - - return res; -} - -/* Return ARRAY_REF for array ARR and index IDX with - specified element type ETYPE and element size ESIZE. */ -static tree -chkp_build_array_ref (tree arr, tree etype, tree esize, - unsigned HOST_WIDE_INT idx) -{ - tree index = build_int_cst (size_type_node, idx); - tree res; - - /* If object is TMR then we do not use array_ref but - add offset instead. We need it to be able to get addr - of the reasult later. */ - if (TREE_CODE (arr) == TARGET_MEM_REF) - { - tree offs = TMR_OFFSET (arr); - - esize = fold_binary_to_constant (MULT_EXPR, TREE_TYPE (esize), - esize, index); - gcc_assert(esize); - - offs = fold_binary_to_constant (PLUS_EXPR, TREE_TYPE (offs), - offs, esize); - gcc_assert (offs); - - res = copy_node (arr); - TREE_TYPE (res) = etype; - TMR_OFFSET (res) = offs; - } - else - res = build4 (ARRAY_REF, etype, arr, index, NULL_TREE, NULL_TREE); - - return res; -} - -/* Helper function for chkp_add_bounds_to_call_stmt. - Fill ALL_BOUNDS output array with created bounds. - - OFFS is used for recursive calls and holds basic - offset of TYPE in outer structure in bits. - - ITER points a position where bounds are searched. - - ALL_BOUNDS[i] is filled with elem bounds if there - is a field in TYPE which has pointer type and offset - equal to i * POINTER_SIZE in bits. */ -static void -chkp_find_bounds_for_elem (tree elem, tree *all_bounds, - HOST_WIDE_INT offs, - gimple_stmt_iterator *iter) -{ - tree type = TREE_TYPE (elem); - - if (BOUNDED_TYPE_P (type)) - { - if (!all_bounds[offs / POINTER_SIZE]) - { - tree temp = make_temp_ssa_name (type, NULL, ""); - gimple *assign = gimple_build_assign (temp, elem); - gimple_stmt_iterator gsi; - - gsi_insert_before (iter, assign, GSI_SAME_STMT); - gsi = gsi_for_stmt (assign); - - all_bounds[offs / POINTER_SIZE] = chkp_find_bounds (temp, &gsi); - } - } - else if (RECORD_OR_UNION_TYPE_P (type)) - { - tree field; - - for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL) - { - tree base = unshare_expr (elem); - tree field_ref = chkp_build_component_ref (base, field); - HOST_WIDE_INT field_offs - = TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field)); - if (DECL_FIELD_OFFSET (field)) - field_offs += TREE_INT_CST_LOW (DECL_FIELD_OFFSET (field)) * 8; - - chkp_find_bounds_for_elem (field_ref, all_bounds, - offs + field_offs, iter); - } - } - else if (TREE_CODE (type) == ARRAY_TYPE) - { - tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (type)); - tree etype = TREE_TYPE (type); - HOST_WIDE_INT esize = TREE_INT_CST_LOW (TYPE_SIZE (etype)); - unsigned HOST_WIDE_INT cur; - - if (!maxval || integer_minus_onep (maxval)) - return; - - for (cur = 0; cur <= TREE_INT_CST_LOW (maxval); cur++) - { - tree base = unshare_expr (elem); - tree arr_elem = chkp_build_array_ref (base, etype, - TYPE_SIZE (etype), - cur); - chkp_find_bounds_for_elem (arr_elem, all_bounds, offs + cur * esize, - iter); - } - } -} - -/* Maximum number of elements to check in an array. */ - -#define CHKP_ARRAY_MAX_CHECK_STEPS 4096 - -/* Fill HAVE_BOUND output bitmap with information about - bounds requred for object of type TYPE. - - OFFS is used for recursive calls and holds basic - offset of TYPE in outer structure in bits. - - HAVE_BOUND[i] is set to 1 if there is a field - in TYPE which has pointer type and offset - equal to i * POINTER_SIZE - OFFS in bits. */ -void -chkp_find_bound_slots_1 (const_tree type, bitmap have_bound, - HOST_WIDE_INT offs) -{ - if (BOUNDED_TYPE_P (type)) - bitmap_set_bit (have_bound, offs / POINTER_SIZE); - else if (RECORD_OR_UNION_TYPE_P (type)) - { - tree field; - - for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL) - { - HOST_WIDE_INT field_offs = 0; - if (DECL_FIELD_BIT_OFFSET (field)) - field_offs += TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field)); - if (DECL_FIELD_OFFSET (field)) - field_offs += TREE_INT_CST_LOW (DECL_FIELD_OFFSET (field)) * 8; - chkp_find_bound_slots_1 (TREE_TYPE (field), have_bound, - offs + field_offs); - } - } - else if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type)) - { - /* The object type is an array of complete type, i.e., other - than a flexible array. */ - tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (type)); - tree etype = TREE_TYPE (type); - HOST_WIDE_INT esize = TREE_INT_CST_LOW (TYPE_SIZE (etype)); - unsigned HOST_WIDE_INT cur; - - if (!maxval - || TREE_CODE (maxval) != INTEGER_CST - || integer_minus_onep (maxval)) - return; - - for (cur = 0; - cur <= MIN (CHKP_ARRAY_MAX_CHECK_STEPS, TREE_INT_CST_LOW (maxval)); - cur++) - chkp_find_bound_slots_1 (etype, have_bound, offs + cur * esize); - } -} - -/* Fill bitmap RES with information about bounds for - type TYPE. See chkp_find_bound_slots_1 for more - details. */ -void -chkp_find_bound_slots (const_tree type, bitmap res) -{ - bitmap_clear (res); - chkp_find_bound_slots_1 (type, res, 0); -} - -/* Return 1 if call to FNDECL should be instrumented - and 0 otherwise. */ - -static bool -chkp_instrument_normal_builtin (tree fndecl) -{ - switch (DECL_FUNCTION_CODE (fndecl)) - { - case BUILT_IN_STRLEN: - case BUILT_IN_STRCPY: - case BUILT_IN_STRNCPY: - case BUILT_IN_STPCPY: - case BUILT_IN_STPNCPY: - case BUILT_IN_STRCAT: - case BUILT_IN_STRNCAT: - case BUILT_IN_MEMCPY: - case BUILT_IN_MEMPCPY: - case BUILT_IN_MEMSET: - case BUILT_IN_MEMMOVE: - case BUILT_IN_BZERO: - case BUILT_IN_STRCMP: - case BUILT_IN_STRNCMP: - case BUILT_IN_BCMP: - case BUILT_IN_MEMCMP: - case BUILT_IN_MEMCPY_CHK: - case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMMOVE_CHK: - case BUILT_IN_MEMSET_CHK: - case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRNCPY_CHK: - case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPNCPY_CHK: - case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRNCAT_CHK: - case BUILT_IN_MALLOC: - case BUILT_IN_CALLOC: - case BUILT_IN_REALLOC: - return 1; - - default: - return 0; - } -} - -/* Add bound arguments to call statement pointed by GSI. - Also performs a replacement of user checker builtins calls - with internal ones. */ - -static void -chkp_add_bounds_to_call_stmt (gimple_stmt_iterator *gsi) -{ - gcall *call = as_a (gsi_stmt (*gsi)); - unsigned arg_no = 0; - tree fndecl = gimple_call_fndecl (call); - tree fntype; - tree first_formal_arg; - tree arg; - bool use_fntype = false; - tree op; - ssa_op_iter iter; - gcall *new_call; - - /* Do nothing for internal functions. */ - if (gimple_call_internal_p (call)) - return; - - fntype = TREE_TYPE (TREE_TYPE (gimple_call_fn (call))); - - /* Do nothing if back-end builtin is called. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD) - return; - - /* Do nothing for some middle-end builtins. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_OBJECT_SIZE) - return; - - /* Do nothing for calls to not instrumentable functions. */ - if (fndecl && !chkp_instrumentable_p (fndecl)) - return; - - /* Ignore CHKP_INIT_PTR_BOUNDS, CHKP_NULL_PTR_BOUNDS - and CHKP_COPY_PTR_BOUNDS. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_INIT_PTR_BOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_NULL_PTR_BOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_COPY_PTR_BOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_SET_PTR_BOUNDS)) - return; - - /* Check user builtins are replaced with checks. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_LBOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_UBOUNDS - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_CHECK_PTR_BOUNDS)) - { - chkp_replace_address_check_builtin (gsi, integer_minus_one_node); - return; - } - - /* Check user builtins are replaced with bound extract. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_GET_PTR_LBOUND - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_GET_PTR_UBOUND)) - { - chkp_replace_extract_builtin (gsi); - return; - } - - /* BUILT_IN_CHKP_NARROW_PTR_BOUNDS call is replaced with - target narrow bounds call. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_NARROW_PTR_BOUNDS) - { - tree arg = gimple_call_arg (call, 1); - tree bounds = chkp_find_bounds (arg, gsi); - - gimple_call_set_fndecl (call, chkp_narrow_bounds_fndecl); - gimple_call_set_arg (call, 1, bounds); - update_stmt (call); - - return; - } - - /* BUILT_IN_CHKP_STORE_PTR_BOUNDS call is replaced with - bndstx call. */ - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_STORE_PTR_BOUNDS) - { - tree addr = gimple_call_arg (call, 0); - tree ptr = gimple_call_arg (call, 1); - tree bounds = chkp_find_bounds (ptr, gsi); - gimple_stmt_iterator iter = gsi_for_stmt (call); - - chkp_build_bndstx (addr, ptr, bounds, gsi); - gsi_remove (&iter, true); - - return; - } - - if (!flag_chkp_instrument_calls) - return; - - /* We instrument only some subset of builtins. We also instrument - builtin calls to be inlined. */ - if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && !chkp_instrument_normal_builtin (fndecl)) - { - if (!lookup_attribute ("always_inline", DECL_ATTRIBUTES (fndecl))) - return; - - struct cgraph_node *clone = chkp_maybe_create_clone (fndecl); - if (!clone - || !gimple_has_body_p (clone->decl)) - return; - } - - /* If function decl is available then use it for - formal arguments list. Otherwise use function type. */ - if (fndecl - && DECL_ARGUMENTS (fndecl) - && gimple_call_fntype (call) == TREE_TYPE (fndecl)) - first_formal_arg = DECL_ARGUMENTS (fndecl); - else - { - first_formal_arg = TYPE_ARG_TYPES (fntype); - use_fntype = true; - } - - /* Fill vector of new call args. */ - vec new_args = vNULL; - new_args.create (gimple_call_num_args (call)); - arg = first_formal_arg; - for (arg_no = 0; arg_no < gimple_call_num_args (call); arg_no++) - { - tree call_arg = gimple_call_arg (call, arg_no); - tree type; - - /* Get arg type using formal argument description - or actual argument type. */ - if (arg) - if (use_fntype) - if (TREE_VALUE (arg) != void_type_node) - { - type = TREE_VALUE (arg); - arg = TREE_CHAIN (arg); - } - else - type = TREE_TYPE (call_arg); - else - { - type = TREE_TYPE (arg); - arg = TREE_CHAIN (arg); - } - else - type = TREE_TYPE (call_arg); - - new_args.safe_push (call_arg); - - if (BOUNDED_TYPE_P (type) - || pass_by_reference (NULL, TYPE_MODE (type), type, true)) - new_args.safe_push (chkp_find_bounds (call_arg, gsi)); - else if (chkp_type_has_pointer (type)) - { - HOST_WIDE_INT max_bounds - = TREE_INT_CST_LOW (TYPE_SIZE (type)) / POINTER_SIZE; - tree *all_bounds = (tree *)xmalloc (sizeof (tree) * max_bounds); - HOST_WIDE_INT bnd_no; - - memset (all_bounds, 0, sizeof (tree) * max_bounds); - - chkp_find_bounds_for_elem (call_arg, all_bounds, 0, gsi); - - for (bnd_no = 0; bnd_no < max_bounds; bnd_no++) - if (all_bounds[bnd_no]) - new_args.safe_push (all_bounds[bnd_no]); - - free (all_bounds); - } - } - - if (new_args.length () == gimple_call_num_args (call)) - new_call = call; - else - { - new_call = gimple_build_call_vec (gimple_op (call, 1), new_args); - gimple_call_set_lhs (new_call, gimple_call_lhs (call)); - gimple_call_copy_flags (new_call, call); - gimple_call_set_chain (new_call, gimple_call_chain (call)); - } - new_args.release (); - - /* For direct calls fndecl is replaced with instrumented version. */ - if (fndecl) - { - tree new_decl = chkp_maybe_create_clone (fndecl)->decl; - gimple_call_set_fndecl (new_call, new_decl); - /* In case of a type cast we should modify used function - type instead of using type of new fndecl. */ - if (gimple_call_fntype (call) != TREE_TYPE (fndecl)) - { - tree type = gimple_call_fntype (call); - type = chkp_copy_function_type_adding_bounds (type); - gimple_call_set_fntype (new_call, type); - } - else - gimple_call_set_fntype (new_call, TREE_TYPE (new_decl)); - } - /* For indirect call we should fix function pointer type if - pass some bounds. */ - else if (new_call != call) - { - tree type = gimple_call_fntype (call); - type = chkp_copy_function_type_adding_bounds (type); - gimple_call_set_fntype (new_call, type); - } - - /* replace old call statement with the new one. */ - if (call != new_call) - { - FOR_EACH_SSA_TREE_OPERAND (op, call, iter, SSA_OP_ALL_DEFS) - { - SSA_NAME_DEF_STMT (op) = new_call; - } - gsi_replace (gsi, new_call, true); - } - else - update_stmt (new_call); - - gimple_call_set_with_bounds (new_call, true); -} - -/* Return constant static bounds var with specified bounds LB and UB. - If such var does not exists then new var is created with specified NAME. */ -static tree -chkp_make_static_const_bounds (HOST_WIDE_INT lb, - HOST_WIDE_INT ub, - const char *name) -{ - tree id = get_identifier (name); - tree var; - varpool_node *node; - symtab_node *snode; - - var = build_decl (UNKNOWN_LOCATION, VAR_DECL, id, - pointer_bounds_type_node); - TREE_STATIC (var) = 1; - TREE_PUBLIC (var) = 1; - - /* With LTO we may have constant bounds already in varpool. - Try to find it. */ - if ((snode = symtab_node::get_for_asmname (DECL_ASSEMBLER_NAME (var)))) - { - /* We don't allow this symbol usage for non bounds. */ - if (snode->type != SYMTAB_VARIABLE - || !POINTER_BOUNDS_P (snode->decl)) - sorry ("-fcheck-pointer-bounds requires %qs " - "name for internal usage", - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (var))); - - return snode->decl; - } - - TREE_USED (var) = 1; - TREE_READONLY (var) = 1; - TREE_ADDRESSABLE (var) = 0; - DECL_ARTIFICIAL (var) = 1; - DECL_READ_P (var) = 1; - DECL_INITIAL (var) = targetm.chkp_make_bounds_constant (lb, ub); - make_decl_one_only (var, DECL_ASSEMBLER_NAME (var)); - /* We may use this symbol during ctors generation in chkp_finish_file - when all symbols are emitted. Force output to avoid undefined - symbols in ctors. */ - node = varpool_node::get_create (var); - node->force_output = 1; - - varpool_node::finalize_decl (var); - - return var; -} - -/* Generate code to make bounds with specified lower bound LB and SIZE. - if AFTER is 1 then code is inserted after position pointed by ITER - otherwise code is inserted before position pointed by ITER. - If ITER is NULL then code is added to entry block. */ -static tree -chkp_make_bounds (tree lb, tree size, gimple_stmt_iterator *iter, bool after) -{ - gimple_seq seq; - gimple_stmt_iterator gsi; - gimple *stmt; - tree bounds; - - if (iter) - gsi = *iter; - else - gsi = gsi_start_bb (chkp_get_entry_block ()); - - seq = NULL; - - lb = chkp_force_gimple_call_op (lb, &seq); - size = chkp_force_gimple_call_op (size, &seq); - - stmt = gimple_build_call (chkp_bndmk_fndecl, 2, lb, size); - chkp_mark_stmt (stmt); - - bounds = chkp_get_tmp_reg (stmt); - gimple_call_set_lhs (stmt, bounds); - - gimple_seq_add_stmt (&seq, stmt); - - if (iter && after) - gsi_insert_seq_after (&gsi, seq, GSI_SAME_STMT); - else - gsi_insert_seq_before (&gsi, seq, GSI_SAME_STMT); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Made bounds: "); - print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS); - if (iter) - { - fprintf (dump_file, " inserted before statement: "); - print_gimple_stmt (dump_file, gsi_stmt (*iter), 0, TDF_VOPS|TDF_MEMSYMS); - } - else - fprintf (dump_file, " at function entry\n"); - } - - /* update_stmt (stmt); */ - - return bounds; -} - -/* Return var holding zero bounds. */ -tree -chkp_get_zero_bounds_var (void) -{ - if (!chkp_zero_bounds_var) - chkp_zero_bounds_var - = chkp_make_static_const_bounds (0, -1, - CHKP_ZERO_BOUNDS_VAR_NAME); - return chkp_zero_bounds_var; -} - -/* Return var holding none bounds. */ -tree -chkp_get_none_bounds_var (void) -{ - if (!chkp_none_bounds_var) - chkp_none_bounds_var - = chkp_make_static_const_bounds (-1, 0, - CHKP_NONE_BOUNDS_VAR_NAME); - return chkp_none_bounds_var; -} - -/* Return SSA_NAME used to represent zero bounds. */ -static tree -chkp_get_zero_bounds (void) -{ - if (zero_bounds) - return zero_bounds; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Creating zero bounds..."); - - if ((flag_chkp_use_static_bounds && flag_chkp_use_static_const_bounds) - || flag_chkp_use_static_const_bounds > 0) - { - gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); - gimple *stmt; - - zero_bounds = chkp_get_tmp_reg (NULL); - stmt = gimple_build_assign (zero_bounds, chkp_get_zero_bounds_var ()); - gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); - } - else - zero_bounds = chkp_make_bounds (integer_zero_node, - integer_zero_node, - NULL, - false); - - return zero_bounds; -} - -/* Return SSA_NAME used to represent none bounds. */ -static tree -chkp_get_none_bounds (void) -{ - if (none_bounds) - return none_bounds; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Creating none bounds..."); - - - if ((flag_chkp_use_static_bounds && flag_chkp_use_static_const_bounds) - || flag_chkp_use_static_const_bounds > 0) - { - gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); - gimple *stmt; - - none_bounds = chkp_get_tmp_reg (NULL); - stmt = gimple_build_assign (none_bounds, chkp_get_none_bounds_var ()); - gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); - } - else - none_bounds = chkp_make_bounds (integer_minus_one_node, - build_int_cst (size_type_node, 2), - NULL, - false); - - return none_bounds; -} - -/* Return bounds to be used as a result of operation which - should not create poiunter (e.g. MULT_EXPR). */ -static tree -chkp_get_invalid_op_bounds (void) -{ - return chkp_get_zero_bounds (); -} - -/* Return bounds to be used for loads of non-pointer values. */ -static tree -chkp_get_nonpointer_load_bounds (void) -{ - return chkp_get_zero_bounds (); -} - -/* Return 1 if may use bndret call to get bounds for pointer - returned by CALL. */ -static bool -chkp_call_returns_bounds_p (gcall *call) -{ - if (gimple_call_internal_p (call)) - { - if (gimple_call_internal_fn (call) == IFN_VA_ARG) - return true; - return false; - } - - if (gimple_call_builtin_p (call, BUILT_IN_CHKP_NARROW_PTR_BOUNDS) - || chkp_gimple_call_builtin_p (call, BUILT_IN_CHKP_NARROW)) - return true; - - if (gimple_call_with_bounds_p (call)) - return true; - - tree fndecl = gimple_call_fndecl (call); - - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD) - return false; - - if (fndecl && !chkp_instrumentable_p (fndecl)) - return false; - - if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) - { - if (chkp_instrument_normal_builtin (fndecl)) - return true; - - if (!lookup_attribute ("always_inline", DECL_ATTRIBUTES (fndecl))) - return false; - - struct cgraph_node *clone = chkp_maybe_create_clone (fndecl); - return (clone && gimple_has_body_p (clone->decl)); - } - - return true; -} - -/* Build bounds returned by CALL. */ -static tree -chkp_build_returned_bound (gcall *call) -{ - gimple_stmt_iterator gsi; - tree bounds; - gimple *stmt; - tree fndecl = gimple_call_fndecl (call); - unsigned int retflags; - tree lhs = gimple_call_lhs (call); - - /* To avoid fixing alloca expands in targets we handle - it separately. */ - if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && ALLOCA_FUNCTION_CODE_P (DECL_FUNCTION_CODE (fndecl))) - { - tree size = gimple_call_arg (call, 0); - gimple_stmt_iterator iter = gsi_for_stmt (call); - bounds = chkp_make_bounds (lhs, size, &iter, true); - } - /* We know bounds returned by set_bounds builtin call. */ - else if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_SET_PTR_BOUNDS) - { - tree lb = gimple_call_arg (call, 0); - tree size = gimple_call_arg (call, 1); - gimple_stmt_iterator iter = gsi_for_stmt (call); - bounds = chkp_make_bounds (lb, size, &iter, true); - } - /* Detect bounds initialization calls. */ - else if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_INIT_PTR_BOUNDS) - bounds = chkp_get_zero_bounds (); - /* Detect bounds nullification calls. */ - else if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_NULL_PTR_BOUNDS) - bounds = chkp_get_none_bounds (); - /* Detect bounds copy calls. */ - else if (fndecl - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CHKP_COPY_PTR_BOUNDS) - { - gimple_stmt_iterator iter = gsi_for_stmt (call); - bounds = chkp_find_bounds (gimple_call_arg (call, 1), &iter); - } - /* Do not use retbnd when returned bounds are equal to some - of passed bounds. */ - else if (((retflags = gimple_call_return_flags (call)) & ERF_RETURNS_ARG) - && (retflags & ERF_RETURN_ARG_MASK) < gimple_call_num_args (call)) - { - gimple_stmt_iterator iter = gsi_for_stmt (call); - unsigned int retarg = retflags & ERF_RETURN_ARG_MASK, argno; - if (gimple_call_with_bounds_p (call)) - { - for (argno = 0; argno < gimple_call_num_args (call); argno++) - if (!POINTER_BOUNDS_P (gimple_call_arg (call, argno))) - { - if (retarg) - retarg--; - else - break; - } - } - else - argno = retarg; - - bounds = chkp_find_bounds (gimple_call_arg (call, argno), &iter); - } - else if (chkp_call_returns_bounds_p (call) - && BOUNDED_P (lhs)) - { - gcc_assert (TREE_CODE (lhs) == SSA_NAME); - - /* In general case build checker builtin call to - obtain returned bounds. */ - stmt = gimple_build_call (chkp_ret_bnd_fndecl, 1, - gimple_call_lhs (call)); - chkp_mark_stmt (stmt); - - gsi = gsi_for_stmt (call); - gsi_insert_after (&gsi, stmt, GSI_SAME_STMT); - - bounds = chkp_get_tmp_reg (stmt); - gimple_call_set_lhs (stmt, bounds); - - update_stmt (stmt); - } - else - bounds = chkp_get_zero_bounds (); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Built returned bounds ("); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, ") for call: "); - print_gimple_stmt (dump_file, call, 0, TDF_VOPS | TDF_MEMSYMS); - } - - bounds = chkp_maybe_copy_and_register_bounds (lhs, bounds); - - return bounds; -} - -/* Return bounds used as returned by call - which produced SSA name VAL. */ -gcall * -chkp_retbnd_call_by_val (tree val) -{ - if (TREE_CODE (val) != SSA_NAME) - return NULL; - - gcc_assert (gimple_code (SSA_NAME_DEF_STMT (val)) == GIMPLE_CALL); - - imm_use_iterator use_iter; - use_operand_p use_p; - FOR_EACH_IMM_USE_FAST (use_p, use_iter, val) - if (chkp_gimple_call_builtin_p (USE_STMT (use_p), BUILT_IN_CHKP_BNDRET)) - return as_a (USE_STMT (use_p)); - - return NULL; -} - -/* Check the next parameter for the given PARM is bounds - and return it's default SSA_NAME (create if required). */ -static tree -chkp_get_next_bounds_parm (tree parm) -{ - tree bounds = TREE_CHAIN (parm); - gcc_assert (POINTER_BOUNDS_P (bounds)); - bounds = ssa_default_def (cfun, bounds); - if (!bounds) - { - bounds = make_ssa_name (TREE_CHAIN (parm), gimple_build_nop ()); - set_ssa_default_def (cfun, TREE_CHAIN (parm), bounds); - } - return bounds; -} - -/* Return bounds to be used for input argument PARM. */ -static tree -chkp_get_bound_for_parm (tree parm) -{ - tree decl = SSA_NAME_VAR (parm); - tree bounds; - - gcc_assert (TREE_CODE (decl) == PARM_DECL); - - bounds = chkp_get_registered_bounds (parm); - - if (!bounds) - bounds = chkp_get_registered_bounds (decl); - - if (!bounds) - { - tree orig_decl = cgraph_node::get (cfun->decl)->orig_decl; - - /* For static chain param we return zero bounds - because currently we do not check dereferences - of this pointer. */ - if (cfun->static_chain_decl == decl) - bounds = chkp_get_zero_bounds (); - /* If non instrumented runtime is used then it may be useful - to use zero bounds for input arguments of main - function. */ - else if (flag_chkp_zero_input_bounds_for_main - && id_equal (DECL_ASSEMBLER_NAME (orig_decl), "main")) - bounds = chkp_get_zero_bounds (); - else if (BOUNDED_P (parm)) - { - bounds = chkp_get_next_bounds_parm (decl); - bounds = chkp_maybe_copy_and_register_bounds (decl, bounds); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Built arg bounds ("); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, ") for arg: "); - print_node (dump_file, "", decl, 0); - } - } - else - bounds = chkp_get_zero_bounds (); - } - - if (!chkp_get_registered_bounds (parm)) - bounds = chkp_maybe_copy_and_register_bounds (parm, bounds); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Using bounds "); - print_generic_expr (dump_file, bounds); - fprintf (dump_file, " for parm "); - print_generic_expr (dump_file, parm); - fprintf (dump_file, " of type "); - print_generic_expr (dump_file, TREE_TYPE (parm)); - fprintf (dump_file, ".\n"); - } - - return bounds; -} - -/* Build and return CALL_EXPR for bndstx builtin with specified - arguments. */ -tree -chkp_build_bndldx_call (tree addr, tree ptr) -{ - tree fn = build1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (chkp_bndldx_fndecl)), - chkp_bndldx_fndecl); - tree call = build_call_nary (TREE_TYPE (TREE_TYPE (chkp_bndldx_fndecl)), - fn, 2, addr, ptr); - CALL_WITH_BOUNDS_P (call) = true; - return call; -} - -/* Insert code to load bounds for PTR located by ADDR. - Code is inserted after position pointed by GSI. - Loaded bounds are returned. */ -static tree -chkp_build_bndldx (tree addr, tree ptr, gimple_stmt_iterator *gsi) -{ - gimple_seq seq; - gimple *stmt; - tree bounds; - - seq = NULL; - - addr = chkp_force_gimple_call_op (addr, &seq); - ptr = chkp_force_gimple_call_op (ptr, &seq); - - stmt = gimple_build_call (chkp_bndldx_fndecl, 2, addr, ptr); - chkp_mark_stmt (stmt); - bounds = chkp_get_tmp_reg (stmt); - gimple_call_set_lhs (stmt, bounds); - - gimple_seq_add_stmt (&seq, stmt); - - gsi_insert_seq_after (gsi, seq, GSI_CONTINUE_LINKING); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Generated bndldx for pointer "); - print_generic_expr (dump_file, ptr); - fprintf (dump_file, ": "); - print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS | TDF_MEMSYMS); - } - - return bounds; -} - -/* Build and return CALL_EXPR for bndstx builtin with specified - arguments. */ -tree -chkp_build_bndstx_call (tree addr, tree ptr, tree bounds) -{ - tree fn = build1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (chkp_bndstx_fndecl)), - chkp_bndstx_fndecl); - tree call = build_call_nary (TREE_TYPE (TREE_TYPE (chkp_bndstx_fndecl)), - fn, 3, ptr, bounds, addr); - CALL_WITH_BOUNDS_P (call) = true; - return call; -} - -/* Insert code to store BOUNDS for PTR stored by ADDR. - New statements are inserted after position pointed - by GSI. */ -void -chkp_build_bndstx (tree addr, tree ptr, tree bounds, - gimple_stmt_iterator *gsi) -{ - gimple_seq seq; - gimple *stmt; - - seq = NULL; - - addr = chkp_force_gimple_call_op (addr, &seq); - ptr = chkp_force_gimple_call_op (ptr, &seq); - - stmt = gimple_build_call (chkp_bndstx_fndecl, 3, ptr, bounds, addr); - chkp_mark_stmt (stmt); - gimple_call_set_with_bounds (stmt, true); - - gimple_seq_add_stmt (&seq, stmt); - - gsi_insert_seq_after (gsi, seq, GSI_CONTINUE_LINKING); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Generated bndstx for pointer store "); - print_gimple_stmt (dump_file, gsi_stmt (*gsi), 0, TDF_VOPS|TDF_MEMSYMS); - print_gimple_stmt (dump_file, stmt, 2, TDF_VOPS|TDF_MEMSYMS); - } -} - -/* This function is called when call statement - is inlined and therefore we can't use bndret - for its LHS anymore. Function fixes bndret - call using new RHS value if possible. */ -void -chkp_fixup_inlined_call (tree lhs, tree rhs) -{ - tree addr, bounds; - gcall *retbnd, *bndldx; - - if (!BOUNDED_P (lhs)) - return; - - /* Search for retbnd call. */ - retbnd = chkp_retbnd_call_by_val (lhs); - if (!retbnd) - return; - - /* Currently only handle cases when call is replaced - with a memory access. In this case bndret call - may be replaced with bndldx call. Otherwise we - have to search for bounds which may cause wrong - result due to various optimizations applied. */ - switch (TREE_CODE (rhs)) - { - case VAR_DECL: - if (DECL_REGISTER (rhs)) - return; - break; - - case MEM_REF: - break; - - case ARRAY_REF: - case COMPONENT_REF: - addr = get_base_address (rhs); - if (!DECL_P (addr) - && TREE_CODE (addr) != MEM_REF) - return; - if (DECL_P (addr) && DECL_REGISTER (addr)) - return; - break; - - default: - return; - } - - /* Create a new statements sequence with bndldx call. */ - gimple_stmt_iterator gsi = gsi_for_stmt (retbnd); - addr = build_fold_addr_expr (rhs); - chkp_build_bndldx (addr, lhs, &gsi); - bndldx = as_a (gsi_stmt (gsi)); - - /* Remove bndret call. */ - bounds = gimple_call_lhs (retbnd); - gsi = gsi_for_stmt (retbnd); - gsi_remove (&gsi, true); - - /* Link new bndldx call. */ - gimple_call_set_lhs (bndldx, bounds); - update_stmt (bndldx); -} - -/* Compute bounds for pointer NODE which was assigned in - assignment statement ASSIGN. Return computed bounds. */ -static tree -chkp_compute_bounds_for_assignment (tree node, gimple *assign) -{ - enum tree_code rhs_code = gimple_assign_rhs_code (assign); - tree rhs1 = gimple_assign_rhs1 (assign); - tree bounds = NULL_TREE; - gimple_stmt_iterator iter = gsi_for_stmt (assign); - tree base = NULL; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Computing bounds for assignment: "); - print_gimple_stmt (dump_file, assign, 0, TDF_VOPS|TDF_MEMSYMS); - } - - switch (rhs_code) - { - case MEM_REF: - case TARGET_MEM_REF: - case COMPONENT_REF: - case ARRAY_REF: - /* We need to load bounds from the bounds table. */ - bounds = chkp_find_bounds_loaded (node, rhs1, &iter); - break; - - case VAR_DECL: - case SSA_NAME: - case ADDR_EXPR: - case POINTER_PLUS_EXPR: - case NOP_EXPR: - case CONVERT_EXPR: - case INTEGER_CST: - /* Bounds are just propagated from RHS. */ - bounds = chkp_find_bounds (rhs1, &iter); - base = rhs1; - break; - - case VIEW_CONVERT_EXPR: - /* Bounds are just propagated from RHS. */ - bounds = chkp_find_bounds (TREE_OPERAND (rhs1, 0), &iter); - break; - - case PARM_DECL: - if (BOUNDED_P (rhs1)) - { - /* We need to load bounds from the bounds table. */ - bounds = chkp_build_bndldx (chkp_build_addr_expr (rhs1), - node, &iter); - TREE_ADDRESSABLE (rhs1) = 1; - } - else - bounds = chkp_get_nonpointer_load_bounds (); - break; - - case MINUS_EXPR: - case PLUS_EXPR: - case BIT_AND_EXPR: - case BIT_IOR_EXPR: - case BIT_XOR_EXPR: - { - tree rhs2 = gimple_assign_rhs2 (assign); - tree bnd1 = chkp_find_bounds (rhs1, &iter); - tree bnd2 = chkp_find_bounds (rhs2, &iter); - - /* First we try to check types of operands. If it - does not help then look at bound values. - - If some bounds are incomplete and other are - not proven to be valid (i.e. also incomplete - or invalid because value is not pointer) then - resulting value is incomplete and will be - recomputed later in chkp_finish_incomplete_bounds. */ - if (BOUNDED_P (rhs1) - && !BOUNDED_P (rhs2)) - bounds = bnd1; - else if (BOUNDED_P (rhs2) - && !BOUNDED_P (rhs1) - && rhs_code != MINUS_EXPR) - bounds = bnd2; - else if (chkp_incomplete_bounds (bnd1)) - if (chkp_valid_bounds (bnd2) && rhs_code != MINUS_EXPR - && !chkp_incomplete_bounds (bnd2)) - bounds = bnd2; - else - bounds = incomplete_bounds; - else if (chkp_incomplete_bounds (bnd2)) - if (chkp_valid_bounds (bnd1) - && !chkp_incomplete_bounds (bnd1)) - bounds = bnd1; - else - bounds = incomplete_bounds; - else if (!chkp_valid_bounds (bnd1)) - if (chkp_valid_bounds (bnd2) && rhs_code != MINUS_EXPR) - bounds = bnd2; - else if (bnd2 == chkp_get_zero_bounds ()) - bounds = bnd2; - else - bounds = bnd1; - else if (!chkp_valid_bounds (bnd2)) - bounds = bnd1; - else - /* Seems both operands may have valid bounds - (e.g. pointer minus pointer). In such case - use default invalid op bounds. */ - bounds = chkp_get_invalid_op_bounds (); - - base = (bounds == bnd1) ? rhs1 : (bounds == bnd2) ? rhs2 : NULL; - } - break; - - case BIT_NOT_EXPR: - case NEGATE_EXPR: - case LSHIFT_EXPR: - case RSHIFT_EXPR: - case LROTATE_EXPR: - case RROTATE_EXPR: - case EQ_EXPR: - case NE_EXPR: - case LT_EXPR: - case LE_EXPR: - case GT_EXPR: - case GE_EXPR: - case MULT_EXPR: - case RDIV_EXPR: - case TRUNC_DIV_EXPR: - case FLOOR_DIV_EXPR: - case CEIL_DIV_EXPR: - case ROUND_DIV_EXPR: - case TRUNC_MOD_EXPR: - case FLOOR_MOD_EXPR: - case CEIL_MOD_EXPR: - case ROUND_MOD_EXPR: - case EXACT_DIV_EXPR: - case FIX_TRUNC_EXPR: - case FLOAT_EXPR: - case REALPART_EXPR: - case IMAGPART_EXPR: - case POINTER_DIFF_EXPR: - /* No valid bounds may be produced by these exprs. */ - bounds = chkp_get_invalid_op_bounds (); - break; - - case COND_EXPR: - { - tree val1 = gimple_assign_rhs2 (assign); - tree val2 = gimple_assign_rhs3 (assign); - tree bnd1 = chkp_find_bounds (val1, &iter); - tree bnd2 = chkp_find_bounds (val2, &iter); - gimple *stmt; - - if (chkp_incomplete_bounds (bnd1) || chkp_incomplete_bounds (bnd2)) - bounds = incomplete_bounds; - else if (bnd1 == bnd2) - bounds = bnd1; - else - { - rhs1 = unshare_expr (rhs1); - - bounds = chkp_get_tmp_reg (assign); - stmt = gimple_build_assign (bounds, COND_EXPR, rhs1, bnd1, bnd2); - gsi_insert_after (&iter, stmt, GSI_SAME_STMT); - - if (!chkp_valid_bounds (bnd1) && !chkp_valid_bounds (bnd2)) - chkp_mark_invalid_bounds (bounds); - } - } - break; - - case MAX_EXPR: - case MIN_EXPR: - { - tree rhs2 = gimple_assign_rhs2 (assign); - tree bnd1 = chkp_find_bounds (rhs1, &iter); - tree bnd2 = chkp_find_bounds (rhs2, &iter); - - if (chkp_incomplete_bounds (bnd1) || chkp_incomplete_bounds (bnd2)) - bounds = incomplete_bounds; - else if (bnd1 == bnd2) - bounds = bnd1; - else - { - gimple *stmt; - tree cond = build2 (rhs_code == MAX_EXPR ? GT_EXPR : LT_EXPR, - boolean_type_node, rhs1, rhs2); - bounds = chkp_get_tmp_reg (assign); - stmt = gimple_build_assign (bounds, COND_EXPR, cond, bnd1, bnd2); - - gsi_insert_after (&iter, stmt, GSI_SAME_STMT); - - if (!chkp_valid_bounds (bnd1) && !chkp_valid_bounds (bnd2)) - chkp_mark_invalid_bounds (bounds); - } - } - break; - - default: - bounds = chkp_get_zero_bounds (); - warning (0, "pointer bounds were lost due to unexpected expression %s", - get_tree_code_name (rhs_code)); - } - - gcc_assert (bounds); - - /* We may reuse bounds of other pointer we copy/modify. But it is not - allowed for abnormal ssa names. If we produced a pointer using - abnormal ssa name, we better make a bounds copy to avoid coalescing - issues. */ - if (base - && TREE_CODE (base) == SSA_NAME - && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (base)) - { - gimple *stmt = gimple_build_assign (chkp_get_tmp_reg (NULL), bounds); - gsi_insert_after (&iter, stmt, GSI_SAME_STMT); - bounds = gimple_assign_lhs (stmt); - } - - if (node) - bounds = chkp_maybe_copy_and_register_bounds (node, bounds); - - return bounds; -} - -/* Compute bounds for ssa name NODE defined by DEF_STMT pointed by ITER. - - There are just few statement codes allowed: NOP (for default ssa names), - ASSIGN, CALL, PHI, ASM. - - Return computed bounds. */ -static tree -chkp_get_bounds_by_definition (tree node, gimple *def_stmt, - gphi_iterator *iter) -{ - tree var, bounds; - enum gimple_code code = gimple_code (def_stmt); - gphi *stmt; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Searching for bounds for node: "); - print_generic_expr (dump_file, node); - - fprintf (dump_file, " using its definition: "); - print_gimple_stmt (dump_file, def_stmt, 0, TDF_VOPS | TDF_MEMSYMS); - } - - switch (code) - { - case GIMPLE_NOP: - var = SSA_NAME_VAR (node); - switch (TREE_CODE (var)) - { - case PARM_DECL: - bounds = chkp_get_bound_for_parm (node); - break; - - case VAR_DECL: - /* For uninitialized pointers use none bounds. */ - bounds = chkp_get_none_bounds (); - bounds = chkp_maybe_copy_and_register_bounds (node, bounds); - break; - - case RESULT_DECL: - { - tree base_type; - - gcc_assert (TREE_CODE (TREE_TYPE (node)) == REFERENCE_TYPE); - - base_type = TREE_TYPE (TREE_TYPE (node)); - - gcc_assert (TYPE_SIZE (base_type) - && TREE_CODE (TYPE_SIZE (base_type)) == INTEGER_CST - && tree_to_uhwi (TYPE_SIZE (base_type)) != 0); - - bounds = chkp_make_bounds (node, TYPE_SIZE_UNIT (base_type), - NULL, false); - bounds = chkp_maybe_copy_and_register_bounds (node, bounds); - } - break; - - default: - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Unexpected var with no definition\n"); - print_generic_expr (dump_file, var); - } - internal_error ("chkp_get_bounds_by_definition: Unexpected var of type %s", - get_tree_code_name (TREE_CODE (var))); - } - break; - - case GIMPLE_ASSIGN: - bounds = chkp_compute_bounds_for_assignment (node, def_stmt); - break; - - case GIMPLE_CALL: - bounds = chkp_build_returned_bound (as_a (def_stmt)); - break; - - case GIMPLE_PHI: - if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (node)) - if (SSA_NAME_VAR (node)) - var = chkp_get_bounds_var (SSA_NAME_VAR (node)); - else - var = make_temp_ssa_name (pointer_bounds_type_node, - NULL, - CHKP_BOUND_TMP_NAME); - else - var = chkp_get_tmp_var (); - stmt = create_phi_node (var, gimple_bb (def_stmt)); - bounds = gimple_phi_result (stmt); - *iter = gsi_for_phi (stmt); - - bounds = chkp_maybe_copy_and_register_bounds (node, bounds); - - /* Created bounds do not have all phi args computed and - therefore we do not know if there is a valid source - of bounds for that node. Therefore we mark bounds - as incomplete and then recompute them when all phi - args are computed. */ - chkp_register_incomplete_bounds (bounds, node); - break; - - case GIMPLE_ASM: - bounds = chkp_get_zero_bounds (); - bounds = chkp_maybe_copy_and_register_bounds (node, bounds); - break; - - default: - internal_error ("chkp_get_bounds_by_definition: Unexpected GIMPLE code %s", - gimple_code_name[code]); - } - - return bounds; -} - -/* Return CALL_EXPR for bndmk with specified LOWER_BOUND and SIZE. */ -tree -chkp_build_make_bounds_call (tree lower_bound, tree size) -{ - tree call = build1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (chkp_bndmk_fndecl)), - chkp_bndmk_fndecl); - return build_call_nary (TREE_TYPE (TREE_TYPE (chkp_bndmk_fndecl)), - call, 2, lower_bound, size); -} - -/* Create static bounds var of specfified OBJ which is - is either VAR_DECL or string constant. */ -static tree -chkp_make_static_bounds (tree obj) -{ - static int string_id = 1; - static int var_id = 1; - tree *slot; - const char *var_name; - char *bnd_var_name; - tree bnd_var; - - /* First check if we already have required var. */ - if (chkp_static_var_bounds) - { - /* For vars we use assembler name as a key in - chkp_static_var_bounds map. It allows to - avoid duplicating bound vars for decls - sharing assembler name. */ - if (VAR_P (obj)) - { - tree name = DECL_ASSEMBLER_NAME (obj); - slot = chkp_static_var_bounds->get (name); - if (slot) - return *slot; - } - else - { - slot = chkp_static_var_bounds->get (obj); - if (slot) - return *slot; - } - } - - /* Build decl for bounds var. */ - if (VAR_P (obj)) - { - if (DECL_IGNORED_P (obj)) - { - bnd_var_name = (char *) xmalloc (strlen (CHKP_VAR_BOUNDS_PREFIX) + 10); - sprintf (bnd_var_name, "%s%d", CHKP_VAR_BOUNDS_PREFIX, var_id++); - } - else - { - var_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj)); - - /* For hidden symbols we want to skip first '*' char. */ - if (*var_name == '*') - var_name++; - - bnd_var_name = (char *) xmalloc (strlen (var_name) - + strlen (CHKP_BOUNDS_OF_SYMBOL_PREFIX) + 1); - strcpy (bnd_var_name, CHKP_BOUNDS_OF_SYMBOL_PREFIX); - strcat (bnd_var_name, var_name); - } - - bnd_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, - get_identifier (bnd_var_name), - pointer_bounds_type_node); - - /* Address of the obj will be used as lower bound. */ - TREE_ADDRESSABLE (obj) = 1; - } - else - { - bnd_var_name = (char *) xmalloc (strlen (CHKP_STRING_BOUNDS_PREFIX) + 10); - sprintf (bnd_var_name, "%s%d", CHKP_STRING_BOUNDS_PREFIX, string_id++); - - bnd_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, - get_identifier (bnd_var_name), - pointer_bounds_type_node); - } - - free (bnd_var_name); - - TREE_PUBLIC (bnd_var) = 0; - TREE_USED (bnd_var) = 1; - TREE_READONLY (bnd_var) = 0; - TREE_STATIC (bnd_var) = 1; - TREE_ADDRESSABLE (bnd_var) = 0; - DECL_ARTIFICIAL (bnd_var) = 1; - DECL_COMMON (bnd_var) = 1; - DECL_COMDAT (bnd_var) = 1; - DECL_READ_P (bnd_var) = 1; - DECL_INITIAL (bnd_var) = chkp_build_addr_expr (obj); - /* Force output similar to constant bounds. - See chkp_make_static_const_bounds. */ - varpool_node::get_create (bnd_var)->force_output = 1; - /* Mark symbol as requiring bounds initialization. */ - varpool_node::get_create (bnd_var)->need_bounds_init = 1; - varpool_node::finalize_decl (bnd_var); - - /* Add created var to the map to use it for other references - to obj. */ - if (!chkp_static_var_bounds) - chkp_static_var_bounds = new hash_map; - - if (VAR_P (obj)) - { - tree name = DECL_ASSEMBLER_NAME (obj); - chkp_static_var_bounds->put (name, bnd_var); - } - else - chkp_static_var_bounds->put (obj, bnd_var); - - return bnd_var; -} - -/* When var has incomplete type we cannot get size to - compute its bounds. In such cases we use checker - builtin call which determines object size at runtime. */ -static tree -chkp_generate_extern_var_bounds (tree var) -{ - tree bounds, size_reloc, lb, size, max_size, cond; - gimple_stmt_iterator gsi; - gimple_seq seq = NULL; - gimple *stmt; - - /* If instrumentation is not enabled for vars having - incomplete type then just return zero bounds to avoid - checks for this var. */ - if (!flag_chkp_incomplete_type) - return chkp_get_zero_bounds (); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Generating bounds for extern symbol '"); - print_generic_expr (dump_file, var); - fprintf (dump_file, "'\n"); - } - - stmt = gimple_build_call (chkp_sizeof_fndecl, 1, var); - - size_reloc = create_tmp_reg (chkp_uintptr_type, CHKP_SIZE_TMP_NAME); - gimple_call_set_lhs (stmt, size_reloc); - - gimple_seq_add_stmt (&seq, stmt); - - lb = chkp_build_addr_expr (var); - size = make_ssa_name (chkp_get_size_tmp_var ()); - - if (flag_chkp_zero_dynamic_size_as_infinite) - { - /* We should check that size relocation was resolved. - If it was not then use maximum possible size for the var. */ - max_size = build2 (MINUS_EXPR, chkp_uintptr_type, integer_zero_node, - fold_convert (chkp_uintptr_type, lb)); - max_size = chkp_force_gimple_call_op (max_size, &seq); - - cond = build2 (NE_EXPR, boolean_type_node, - size_reloc, integer_zero_node); - stmt = gimple_build_assign (size, COND_EXPR, cond, size_reloc, max_size); - gimple_seq_add_stmt (&seq, stmt); - } - else - { - stmt = gimple_build_assign (size, size_reloc); - gimple_seq_add_stmt (&seq, stmt); - } - - gsi = gsi_start_bb (chkp_get_entry_block ()); - gsi_insert_seq_after (&gsi, seq, GSI_CONTINUE_LINKING); - - bounds = chkp_make_bounds (lb, size, &gsi, true); - - return bounds; -} - -/* Return 1 if TYPE has fields with zero size or fields - marked with chkp_variable_size attribute. */ -bool -chkp_variable_size_type (tree type) -{ - bool res = false; - tree field; - - if (RECORD_OR_UNION_TYPE_P (type)) - for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) - { - if (TREE_CODE (field) == FIELD_DECL) - res = res - || lookup_attribute ("bnd_variable_size", DECL_ATTRIBUTES (field)) - || chkp_variable_size_type (TREE_TYPE (field)); - } - else - res = !TYPE_SIZE (type) - || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST - || tree_to_uhwi (TYPE_SIZE (type)) == 0; - - return res; -} - -/* Compute and return bounds for address of DECL which is - one of VAR_DECL, PARM_DECL, RESULT_DECL. */ -static tree -chkp_get_bounds_for_decl_addr (tree decl) -{ - tree bounds; - - gcc_assert (VAR_P (decl) - || TREE_CODE (decl) == PARM_DECL - || TREE_CODE (decl) == RESULT_DECL); - - bounds = chkp_get_registered_addr_bounds (decl); - - if (bounds) - return bounds; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Building bounds for address of decl "); - print_generic_expr (dump_file, decl); - fprintf (dump_file, "\n"); - } - - /* Use zero bounds if size is unknown and checks for - unknown sizes are restricted. */ - if ((!DECL_SIZE (decl) - || (chkp_variable_size_type (TREE_TYPE (decl)) - && (TREE_STATIC (decl) - || DECL_EXTERNAL (decl) - || TREE_PUBLIC (decl)))) - && !flag_chkp_incomplete_type) - return chkp_get_zero_bounds (); - - if (VOID_TYPE_P (TREE_TYPE (decl))) - return chkp_get_zero_bounds (); - - if (flag_chkp_use_static_bounds - && VAR_P (decl) - && (TREE_STATIC (decl) - || DECL_EXTERNAL (decl) - || TREE_PUBLIC (decl)) - && !DECL_THREAD_LOCAL_P (decl)) - { - tree bnd_var = chkp_make_static_bounds (decl); - gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); - gimple *stmt; - - bounds = chkp_get_tmp_reg (NULL); - stmt = gimple_build_assign (bounds, bnd_var); - gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); - } - else if (!DECL_SIZE (decl) - || (chkp_variable_size_type (TREE_TYPE (decl)) - && (TREE_STATIC (decl) - || DECL_EXTERNAL (decl) - || TREE_PUBLIC (decl)))) - { - gcc_assert (VAR_P (decl)); - bounds = chkp_generate_extern_var_bounds (decl); - } - else - { - tree lb = chkp_build_addr_expr (decl); - bounds = chkp_make_bounds (lb, DECL_SIZE_UNIT (decl), NULL, false); - } - - return bounds; -} - -/* Compute and return bounds for constant string. */ -static tree -chkp_get_bounds_for_string_cst (tree cst) -{ - tree bounds; - tree lb; - tree size; - - gcc_assert (TREE_CODE (cst) == STRING_CST); - - bounds = chkp_get_registered_bounds (cst); - - if (bounds) - return bounds; - - if ((flag_chkp_use_static_bounds && flag_chkp_use_static_const_bounds) - || flag_chkp_use_static_const_bounds > 0) - { - tree bnd_var = chkp_make_static_bounds (cst); - gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); - gimple *stmt; - - bounds = chkp_get_tmp_reg (NULL); - stmt = gimple_build_assign (bounds, bnd_var); - gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); - } - else - { - lb = chkp_build_addr_expr (cst); - size = build_int_cst (chkp_uintptr_type, TREE_STRING_LENGTH (cst)); - bounds = chkp_make_bounds (lb, size, NULL, false); - } - - bounds = chkp_maybe_copy_and_register_bounds (cst, bounds); - - return bounds; -} - -/* Generate code to instersect bounds BOUNDS1 and BOUNDS2 and - return the result. if ITER is not NULL then Code is inserted - before position pointed by ITER. Otherwise code is added to - entry block. */ -static tree -chkp_intersect_bounds (tree bounds1, tree bounds2, gimple_stmt_iterator *iter) -{ - if (!bounds1 || bounds1 == chkp_get_zero_bounds ()) - return bounds2 ? bounds2 : bounds1; - else if (!bounds2 || bounds2 == chkp_get_zero_bounds ()) - return bounds1; - else - { - gimple_seq seq; - gimple *stmt; - tree bounds; - - seq = NULL; - - stmt = gimple_build_call (chkp_intersect_fndecl, 2, bounds1, bounds2); - chkp_mark_stmt (stmt); - - bounds = chkp_get_tmp_reg (stmt); - gimple_call_set_lhs (stmt, bounds); - - gimple_seq_add_stmt (&seq, stmt); - - /* We are probably doing narrowing for constant expression. - In such case iter may be undefined. */ - if (!iter) - { - gimple_stmt_iterator gsi = gsi_last_bb (chkp_get_entry_block ()); - iter = &gsi; - gsi_insert_seq_after (iter, seq, GSI_SAME_STMT); - } - else - gsi_insert_seq_before (iter, seq, GSI_SAME_STMT); - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Bounds intersection: "); - print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS); - fprintf (dump_file, " inserted before statement: "); - print_gimple_stmt (dump_file, gsi_stmt (*iter), 0, - TDF_VOPS|TDF_MEMSYMS); - } - - return bounds; - } -} - -/* Return 1 if we are allowed to narrow bounds for addressed FIELD - and 0 othersize. REF is reference to the field. */ - -static bool -chkp_may_narrow_to_field (tree ref, tree field) -{ - return DECL_SIZE (field) && TREE_CODE (DECL_SIZE (field)) == INTEGER_CST - && tree_to_uhwi (DECL_SIZE (field)) != 0 - && !(flag_chkp_flexible_struct_trailing_arrays - && array_at_struct_end_p (ref)) - && (!DECL_FIELD_OFFSET (field) - || TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST) - && (!DECL_FIELD_BIT_OFFSET (field) - || TREE_CODE (DECL_FIELD_BIT_OFFSET (field)) == INTEGER_CST) - && !lookup_attribute ("bnd_variable_size", DECL_ATTRIBUTES (field)) - && !chkp_variable_size_type (TREE_TYPE (field)); -} - -/* Return 1 if bounds for FIELD should be narrowed to - field's own size. REF is reference to the field. */ - -static bool -chkp_narrow_bounds_for_field (tree ref, tree field) -{ - HOST_WIDE_INT offs; - HOST_WIDE_INT bit_offs; - - if (!chkp_may_narrow_to_field (ref, field)) - return false; - - /* Access to compiler generated fields should not cause - bounds narrowing. */ - if (DECL_ARTIFICIAL (field)) - return false; - - offs = tree_to_uhwi (DECL_FIELD_OFFSET (field)); - bit_offs = tree_to_uhwi (DECL_FIELD_BIT_OFFSET (field)); - - return (flag_chkp_narrow_bounds - && (flag_chkp_first_field_has_own_bounds - || offs - || bit_offs)); -} - -/* Perform narrowing for BOUNDS of an INNER reference. Shift boundary - by OFFSET bytes and limit to SIZE bytes. Newly created statements are - added to ITER. */ - -static tree -chkp_narrow_size_and_offset (tree bounds, tree inner, tree offset, - tree size, gimple_stmt_iterator *iter) -{ - tree addr = chkp_build_addr_expr (unshare_expr (inner)); - tree t = TREE_TYPE (addr); - - gimple *stmt = gimple_build_assign (NULL_TREE, addr); - addr = make_temp_ssa_name (t, stmt, CHKP_BOUND_TMP_NAME); - gimple_assign_set_lhs (stmt, addr); - gsi_insert_seq_before (iter, stmt, GSI_SAME_STMT); - - stmt = gimple_build_assign (NULL_TREE, POINTER_PLUS_EXPR, addr, offset); - tree shifted = make_temp_ssa_name (t, stmt, CHKP_BOUND_TMP_NAME); - gimple_assign_set_lhs (stmt, shifted); - gsi_insert_seq_before (iter, stmt, GSI_SAME_STMT); - - tree bounds2 = chkp_make_bounds (shifted, size, iter, false); - - return chkp_intersect_bounds (bounds, bounds2, iter); -} - -/* Perform narrowing for BOUNDS using bounds computed for field - access COMPONENT. ITER meaning is the same as for - chkp_intersect_bounds. */ - -static tree -chkp_narrow_bounds_to_field (tree bounds, tree component, - gimple_stmt_iterator *iter) -{ - tree field = TREE_OPERAND (component, 1); - tree size = DECL_SIZE_UNIT (field); - tree field_ptr = chkp_build_addr_expr (component); - tree field_bounds; - - field_bounds = chkp_make_bounds (field_ptr, size, iter, false); - - return chkp_intersect_bounds (field_bounds, bounds, iter); -} - -/* Parse field or array access NODE. - - PTR ouput parameter holds a pointer to the outermost - object. - - BITFIELD output parameter is set to 1 if bitfield is - accessed and to 0 otherwise. If it is 1 then ELT holds - outer component for accessed bit field. - - SAFE outer parameter is set to 1 if access is safe and - checks are not required. - - BOUNDS outer parameter holds bounds to be used to check - access (may be NULL). - - If INNERMOST_BOUNDS is 1 then try to narrow bounds to the - innermost accessed component. */ -static void -chkp_parse_array_and_component_ref (tree node, tree *ptr, - tree *elt, bool *safe, - bool *bitfield, - tree *bounds, - gimple_stmt_iterator *iter, - bool innermost_bounds) -{ - tree comp_to_narrow = NULL_TREE; - tree last_comp = NULL_TREE; - bool array_ref_found = false; - tree *nodes; - tree var; - int len; - int i; - - /* Compute tree height for expression. */ - var = node; - len = 1; - while (TREE_CODE (var) == COMPONENT_REF - || TREE_CODE (var) == ARRAY_REF - || TREE_CODE (var) == VIEW_CONVERT_EXPR - || TREE_CODE (var) == BIT_FIELD_REF) - { - var = TREE_OPERAND (var, 0); - len++; - } - - gcc_assert (len > 1); - - /* It is more convenient for us to scan left-to-right, - so walk tree again and put all node to nodes vector - in reversed order. */ - nodes = XALLOCAVEC (tree, len); - nodes[len - 1] = node; - for (i = len - 2; i >= 0; i--) - nodes[i] = TREE_OPERAND (nodes[i + 1], 0); - - if (bounds) - *bounds = NULL; - *safe = true; - *bitfield = ((TREE_CODE (node) == COMPONENT_REF - && DECL_BIT_FIELD_TYPE (TREE_OPERAND (node, 1))) - || TREE_CODE (node) == BIT_FIELD_REF); - /* To get bitfield address we will need outer element. */ - if (*bitfield) - *elt = nodes[len - 2]; - else - *elt = NULL_TREE; - - /* If we have indirection in expression then compute - outermost structure bounds. Computed bounds may be - narrowed later. */ - if (TREE_CODE (nodes[0]) == MEM_REF || INDIRECT_REF_P (nodes[0])) - { - *safe = false; - *ptr = TREE_OPERAND (nodes[0], 0); - if (bounds) - *bounds = chkp_find_bounds (*ptr, iter); - } - else - { - gcc_assert (VAR_P (var) - || TREE_CODE (var) == PARM_DECL - || TREE_CODE (var) == RESULT_DECL - || TREE_CODE (var) == STRING_CST - || TREE_CODE (var) == SSA_NAME); - - *ptr = chkp_build_addr_expr (var); - - /* For hard register cases chkp_build_addr_expr returns INTEGER_CST - and later on chkp_find_bounds will fail to find proper bounds. - In order to avoid that, we find/create bounds right aways using - the var itself. */ - if (VAR_P (var) && DECL_HARD_REGISTER (var)) - *bounds = chkp_make_addressed_object_bounds (var, iter); - } - - /* In this loop we are trying to find a field access - requiring narrowing. There are two simple rules - for search: - 1. Leftmost array_ref is chosen if any. - 2. Rightmost suitable component_ref is chosen if innermost - bounds are required and no array_ref exists. */ - for (i = 1; i < len; i++) - { - var = nodes[i]; - - if (TREE_CODE (var) == ARRAY_REF) - { - *safe = false; - array_ref_found = true; - if (flag_chkp_narrow_bounds - && !flag_chkp_narrow_to_innermost_arrray - && (!last_comp - || chkp_may_narrow_to_field (var, - TREE_OPERAND (last_comp, 1)))) - { - comp_to_narrow = last_comp; - break; - } - } - else if (TREE_CODE (var) == COMPONENT_REF) - { - tree field = TREE_OPERAND (var, 1); - - if (innermost_bounds - && !array_ref_found - && chkp_narrow_bounds_for_field (var, field)) - comp_to_narrow = var; - last_comp = var; - - if (flag_chkp_narrow_bounds - && flag_chkp_narrow_to_innermost_arrray - && TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE) - { - if (bounds) - *bounds = chkp_narrow_bounds_to_field (*bounds, var, iter); - comp_to_narrow = NULL; - } - } - else if (TREE_CODE (var) == BIT_FIELD_REF) - { - if (flag_chkp_narrow_bounds && bounds) - { - tree offset, size; - chkp_parse_bit_field_ref (var, UNKNOWN_LOCATION, &offset, &size); - *bounds - = chkp_narrow_size_and_offset (*bounds, TREE_OPERAND (var, 0), - offset, size, iter); - } - } - else if (TREE_CODE (var) == VIEW_CONVERT_EXPR) - /* Nothing to do for it. */ - ; - else - gcc_unreachable (); - } - - if (comp_to_narrow && DECL_SIZE (TREE_OPERAND (comp_to_narrow, 1)) && bounds) - *bounds = chkp_narrow_bounds_to_field (*bounds, comp_to_narrow, iter); - - if (innermost_bounds && bounds && !*bounds) - *bounds = chkp_find_bounds (*ptr, iter); -} - -/* Parse BIT_FIELD_REF to a NODE for a given location LOC. Return OFFSET - and SIZE in bytes. */ - -static -void chkp_parse_bit_field_ref (tree node, location_t loc, tree *offset, - tree *size) -{ - tree bpu = fold_convert (size_type_node, bitsize_int (BITS_PER_UNIT)); - tree offs = fold_convert (size_type_node, TREE_OPERAND (node, 2)); - tree rem = size_binop_loc (loc, TRUNC_MOD_EXPR, offs, bpu); - offs = size_binop_loc (loc, TRUNC_DIV_EXPR, offs, bpu); - - tree s = fold_convert (size_type_node, TREE_OPERAND (node, 1)); - s = size_binop_loc (loc, PLUS_EXPR, s, rem); - s = size_binop_loc (loc, CEIL_DIV_EXPR, s, bpu); - s = fold_convert (size_type_node, s); - - *offset = offs; - *size = s; -} - -/* Compute and return bounds for address of OBJ. */ -static tree -chkp_make_addressed_object_bounds (tree obj, gimple_stmt_iterator *iter) -{ - tree bounds = chkp_get_registered_addr_bounds (obj); - - if (bounds) - return bounds; - - switch (TREE_CODE (obj)) - { - case VAR_DECL: - case PARM_DECL: - case RESULT_DECL: - bounds = chkp_get_bounds_for_decl_addr (obj); - break; - - case STRING_CST: - bounds = chkp_get_bounds_for_string_cst (obj); - break; - - case ARRAY_REF: - case COMPONENT_REF: - case BIT_FIELD_REF: - { - tree elt; - tree ptr; - bool safe; - bool bitfield; - - chkp_parse_array_and_component_ref (obj, &ptr, &elt, &safe, - &bitfield, &bounds, iter, true); - - gcc_assert (bounds); - } - break; - - case FUNCTION_DECL: - case LABEL_DECL: - bounds = chkp_get_zero_bounds (); - break; - - case MEM_REF: - bounds = chkp_find_bounds (TREE_OPERAND (obj, 0), iter); - break; - - case REALPART_EXPR: - case IMAGPART_EXPR: - bounds = chkp_make_addressed_object_bounds (TREE_OPERAND (obj, 0), iter); - break; - - default: - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "chkp_make_addressed_object_bounds: " - "unexpected object of type %s\n", - get_tree_code_name (TREE_CODE (obj))); - print_node (dump_file, "", obj, 0); - } - internal_error ("chkp_make_addressed_object_bounds: " - "Unexpected tree code %s", - get_tree_code_name (TREE_CODE (obj))); - } - - chkp_register_addr_bounds (obj, bounds); - - return bounds; -} - -/* Compute bounds for pointer PTR loaded from PTR_SRC. Generate statements - to compute bounds if required. Computed bounds should be available at - position pointed by ITER. - - If PTR_SRC is NULL_TREE then pointer definition is identified. - - If PTR_SRC is not NULL_TREE then ITER points to statements which loads - PTR. If PTR is a any memory reference then ITER points to a statement - after which bndldx will be inserterd. In both cases ITER will be updated - to point to the inserted bndldx statement. */ - -static tree -chkp_find_bounds_1 (tree ptr, tree ptr_src, gimple_stmt_iterator *iter) -{ - tree addr = NULL_TREE; - tree bounds = NULL_TREE; - - if (!ptr_src) - ptr_src = ptr; - - bounds = chkp_get_registered_bounds (ptr_src); - - if (bounds) - return bounds; - - switch (TREE_CODE (ptr_src)) - { - case MEM_REF: - case VAR_DECL: - if (BOUNDED_P (ptr_src)) - if (VAR_P (ptr) && DECL_REGISTER (ptr)) - bounds = chkp_get_zero_bounds (); - else - { - addr = chkp_build_addr_expr (ptr_src); - bounds = chkp_build_bndldx (addr, ptr, iter); - } - else - bounds = chkp_get_nonpointer_load_bounds (); - break; - - case ARRAY_REF: - case COMPONENT_REF: - addr = get_base_address (ptr_src); - if (VAR_P (addr) && DECL_HARD_REGISTER (addr)) - { - bounds = chkp_get_zero_bounds (); - break; - } - if (DECL_P (addr) - || TREE_CODE (addr) == MEM_REF - || TREE_CODE (addr) == TARGET_MEM_REF) - { - if (BOUNDED_P (ptr_src)) - if (VAR_P (ptr) && DECL_REGISTER (ptr)) - bounds = chkp_get_zero_bounds (); - else - { - addr = chkp_build_addr_expr (ptr_src); - bounds = chkp_build_bndldx (addr, ptr, iter); - } - else - bounds = chkp_get_nonpointer_load_bounds (); - } - else - { - gcc_assert (TREE_CODE (addr) == SSA_NAME); - bounds = chkp_find_bounds (addr, iter); - } - break; - - case PARM_DECL: - /* Handled above but failed. */ - bounds = chkp_get_invalid_op_bounds (); - break; - - case TARGET_MEM_REF: - addr = chkp_build_addr_expr (ptr_src); - bounds = chkp_build_bndldx (addr, ptr, iter); - break; - - case SSA_NAME: - bounds = chkp_get_registered_bounds (ptr_src); - if (!bounds) - { - gimple *def_stmt = SSA_NAME_DEF_STMT (ptr_src); - gphi_iterator phi_iter; - - bounds = chkp_get_bounds_by_definition (ptr_src, def_stmt, &phi_iter); - - gcc_assert (bounds); - - if (gphi *def_phi = dyn_cast (def_stmt)) - { - unsigned i; - - for (i = 0; i < gimple_phi_num_args (def_phi); i++) - { - tree arg = gimple_phi_arg_def (def_phi, i); - tree arg_bnd; - gphi *phi_bnd; - - arg_bnd = chkp_find_bounds (arg, NULL); - - /* chkp_get_bounds_by_definition created new phi - statement and phi_iter points to it. - - Previous call to chkp_find_bounds could create - new basic block and therefore change phi statement - phi_iter points to. */ - phi_bnd = phi_iter.phi (); - - add_phi_arg (phi_bnd, arg_bnd, - gimple_phi_arg_edge (def_phi, i), - UNKNOWN_LOCATION); - } - - /* If all bound phi nodes have their arg computed - then we may finish its computation. See - chkp_finish_incomplete_bounds for more details. */ - if (chkp_may_finish_incomplete_bounds ()) - chkp_finish_incomplete_bounds (); - } - - gcc_assert (bounds == chkp_get_registered_bounds (ptr_src) - || chkp_incomplete_bounds (bounds)); - } - break; - - case ADDR_EXPR: - case WITH_SIZE_EXPR: - bounds = chkp_make_addressed_object_bounds (TREE_OPERAND (ptr_src, 0), iter); - break; - - case INTEGER_CST: - case COMPLEX_CST: - case VECTOR_CST: - if (integer_zerop (ptr_src)) - bounds = chkp_get_none_bounds (); - else - bounds = chkp_get_invalid_op_bounds (); - break; - - default: - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "chkp_find_bounds: unexpected ptr of type %s\n", - get_tree_code_name (TREE_CODE (ptr_src))); - print_node (dump_file, "", ptr_src, 0); - } - internal_error ("chkp_find_bounds: Unexpected tree code %s", - get_tree_code_name (TREE_CODE (ptr_src))); - } - - if (!bounds) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (stderr, "chkp_find_bounds: cannot find bounds for pointer\n"); - print_node (dump_file, "", ptr_src, 0); - } - internal_error ("chkp_find_bounds: Cannot find bounds for pointer"); - } - - return bounds; -} - -/* Normal case for bounds search without forced narrowing. */ -static tree -chkp_find_bounds (tree ptr, gimple_stmt_iterator *iter) -{ - return chkp_find_bounds_1 (ptr, NULL_TREE, iter); -} - -/* Search bounds for pointer PTR loaded from PTR_SRC - by statement *ITER points to. */ -static tree -chkp_find_bounds_loaded (tree ptr, tree ptr_src, gimple_stmt_iterator *iter) -{ - return chkp_find_bounds_1 (ptr, ptr_src, iter); -} - -/* Helper function which checks type of RHS and finds all pointers in - it. For each found pointer we build it's accesses in LHS and RHS - objects and then call HANDLER for them. Function is used to copy - or initilize bounds for copied object. */ -static void -chkp_walk_pointer_assignments (tree lhs, tree rhs, void *arg, - assign_handler handler) -{ - tree type = TREE_TYPE (lhs); - - /* We have nothing to do with clobbers. */ - if (TREE_CLOBBER_P (rhs)) - return; - - if (BOUNDED_TYPE_P (type)) - handler (lhs, rhs, arg); - else if (RECORD_OR_UNION_TYPE_P (type)) - { - tree field; - - if (TREE_CODE (rhs) == CONSTRUCTOR) - { - unsigned HOST_WIDE_INT cnt; - tree val; - - FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (rhs), cnt, field, val) - { - if (field && chkp_type_has_pointer (TREE_TYPE (field))) - { - tree lhs_field = chkp_build_component_ref (lhs, field); - chkp_walk_pointer_assignments (lhs_field, val, arg, handler); - } - } - } - else - for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL - && chkp_type_has_pointer (TREE_TYPE (field))) - { - tree rhs_field = chkp_build_component_ref (rhs, field); - tree lhs_field = chkp_build_component_ref (lhs, field); - chkp_walk_pointer_assignments (lhs_field, rhs_field, arg, handler); - } - } - else if (TREE_CODE (type) == ARRAY_TYPE) - { - unsigned HOST_WIDE_INT cur = 0; - tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (type)); - tree etype = TREE_TYPE (type); - tree esize = TYPE_SIZE (etype); - - if (TREE_CODE (rhs) == CONSTRUCTOR) - { - unsigned HOST_WIDE_INT cnt; - tree purp, val, lhs_elem; - - FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (rhs), cnt, purp, val) - { - if (purp && TREE_CODE (purp) == RANGE_EXPR) - { - tree lo_index = TREE_OPERAND (purp, 0); - tree hi_index = TREE_OPERAND (purp, 1); - - for (cur = (unsigned)tree_to_uhwi (lo_index); - cur <= (unsigned)tree_to_uhwi (hi_index); - cur++) - { - lhs_elem = chkp_build_array_ref (lhs, etype, esize, cur); - chkp_walk_pointer_assignments (lhs_elem, val, arg, handler); - } - } - else - { - if (purp) - { - gcc_assert (TREE_CODE (purp) == INTEGER_CST); - cur = tree_to_uhwi (purp); - } - - lhs_elem = chkp_build_array_ref (lhs, etype, esize, cur++); - - chkp_walk_pointer_assignments (lhs_elem, val, arg, handler); - } - } - } - /* Copy array only when size is known. */ - else if (maxval && !integer_minus_onep (maxval)) - for (cur = 0; cur <= TREE_INT_CST_LOW (maxval); cur++) - { - tree lhs_elem = chkp_build_array_ref (lhs, etype, esize, cur); - tree rhs_elem = chkp_build_array_ref (rhs, etype, esize, cur); - chkp_walk_pointer_assignments (lhs_elem, rhs_elem, arg, handler); - } - } - else - internal_error("chkp_walk_pointer_assignments: unexpected RHS type: %s", - get_tree_code_name (TREE_CODE (type))); -} - -/* Add code to copy bounds for assignment of RHS to LHS. - ARG is an iterator pointing ne code position. */ -static void -chkp_copy_bounds_for_elem (tree lhs, tree rhs, void *arg) -{ - gimple_stmt_iterator *iter = (gimple_stmt_iterator *)arg; - tree bounds = chkp_find_bounds (rhs, iter); - tree addr = chkp_build_addr_expr(lhs); - - chkp_build_bndstx (addr, rhs, bounds, iter); -} - -/* Emit static bound initilizers and size vars. */ -void -chkp_finish_file (void) -{ - struct varpool_node *node; - struct chkp_ctor_stmt_list stmts; - - if (seen_error ()) - return; - - /* Iterate through varpool and generate bounds initialization - constructors for all statically initialized pointers. */ - stmts.avail = MAX_STMTS_IN_STATIC_CHKP_CTOR; - stmts.stmts = NULL; - FOR_EACH_VARIABLE (node) - /* Check that var is actually emitted and we need and may initialize - its bounds. */ - if (node->need_bounds_init - && !POINTER_BOUNDS_P (node->decl) - && DECL_RTL (node->decl) - && MEM_P (DECL_RTL (node->decl)) - && TREE_ASM_WRITTEN (node->decl)) - { - chkp_walk_pointer_assignments (node->decl, - DECL_INITIAL (node->decl), - &stmts, - chkp_add_modification_to_stmt_list); - - if (stmts.avail <= 0) - { - cgraph_build_static_cdtor ('P', stmts.stmts, - MAX_RESERVED_INIT_PRIORITY + 3); - stmts.avail = MAX_STMTS_IN_STATIC_CHKP_CTOR; - stmts.stmts = NULL; - } - } - - if (stmts.stmts) - cgraph_build_static_cdtor ('P', stmts.stmts, - MAX_RESERVED_INIT_PRIORITY + 3); - - /* Iterate through varpool and generate bounds initialization - constructors for all static bounds vars. */ - stmts.avail = MAX_STMTS_IN_STATIC_CHKP_CTOR; - stmts.stmts = NULL; - FOR_EACH_VARIABLE (node) - if (node->need_bounds_init - && POINTER_BOUNDS_P (node->decl) - && TREE_ASM_WRITTEN (node->decl)) - { - tree bnd = node->decl; - tree var; - - gcc_assert (DECL_INITIAL (bnd) - && TREE_CODE (DECL_INITIAL (bnd)) == ADDR_EXPR); - - var = TREE_OPERAND (DECL_INITIAL (bnd), 0); - chkp_output_static_bounds (bnd, var, &stmts); - } - - if (stmts.stmts) - cgraph_build_static_cdtor ('B', stmts.stmts, - MAX_RESERVED_INIT_PRIORITY + 2); - - delete chkp_static_var_bounds; - delete chkp_bounds_map; -} - -/* An instrumentation function which is called for each statement - having memory access we want to instrument. It inserts check - code and bounds copy code. - - ITER points to statement to instrument. - - NODE holds memory access in statement to check. - - LOC holds the location information for statement. - - DIRFLAGS determines whether access is read or write. - - ACCESS_OFFS should be added to address used in NODE - before check. - - ACCESS_SIZE holds size of checked access. - - SAFE indicates if NODE access is safe and should not be - checked. */ -static void -chkp_process_stmt (gimple_stmt_iterator *iter, tree node, - location_t loc, tree dirflag, - tree access_offs, tree access_size, - bool safe) -{ - tree node_type = TREE_TYPE (node); - tree size = access_size ? access_size : TYPE_SIZE_UNIT (node_type); - tree addr_first = NULL_TREE; /* address of the first accessed byte */ - tree addr_last = NULL_TREE; /* address of the last accessed byte */ - tree ptr = NULL_TREE; /* a pointer used for dereference */ - tree bounds = NULL_TREE; - bool reg_store = false; - - /* We do not need instrumentation for clobbers. */ - if (dirflag == integer_one_node - && gimple_code (gsi_stmt (*iter)) == GIMPLE_ASSIGN - && TREE_CLOBBER_P (gimple_assign_rhs1 (gsi_stmt (*iter)))) - return; - - switch (TREE_CODE (node)) - { - case ARRAY_REF: - case COMPONENT_REF: - { - bool bitfield; - tree elt; - - if (safe) - { - /* We are not going to generate any checks, so do not - generate bounds as well. */ - addr_first = chkp_build_addr_expr (node); - break; - } - - chkp_parse_array_and_component_ref (node, &ptr, &elt, &safe, - &bitfield, &bounds, iter, false); - - /* Break if there is no dereference and operation is safe. */ - - if (bitfield) - { - tree field = TREE_OPERAND (node, 1); - - if (TREE_CODE (DECL_SIZE_UNIT (field)) == INTEGER_CST) - size = DECL_SIZE_UNIT (field); - - if (elt) - elt = chkp_build_addr_expr (elt); - addr_first = fold_convert_loc (loc, ptr_type_node, elt ? elt : ptr); - addr_first = fold_build_pointer_plus_loc (loc, - addr_first, - byte_position (field)); - } - else - addr_first = chkp_build_addr_expr (node); - } - break; - - case INDIRECT_REF: - ptr = TREE_OPERAND (node, 0); - addr_first = ptr; - break; - - case MEM_REF: - ptr = TREE_OPERAND (node, 0); - addr_first = chkp_build_addr_expr (node); - break; - - case TARGET_MEM_REF: - ptr = TMR_BASE (node); - addr_first = chkp_build_addr_expr (node); - break; - - case ARRAY_RANGE_REF: - printf("ARRAY_RANGE_REF\n"); - debug_gimple_stmt(gsi_stmt(*iter)); - debug_tree(node); - gcc_unreachable (); - break; - - case BIT_FIELD_REF: - { - tree offset, size; - - gcc_assert (!access_offs); - gcc_assert (!access_size); - - chkp_parse_bit_field_ref (node, loc, &offset, &size); - - chkp_process_stmt (iter, TREE_OPERAND (node, 0), loc, - dirflag, offset, size, safe); - return; - } - break; - - case VAR_DECL: - case RESULT_DECL: - case PARM_DECL: - if (dirflag != integer_one_node - || DECL_REGISTER (node)) - return; - - safe = true; - addr_first = chkp_build_addr_expr (node); - break; - - default: - return; - } - - /* If addr_last was not computed then use (addr_first + size - 1) - expression to compute it. */ - if (!addr_last) - { - addr_last = fold_build_pointer_plus_loc (loc, addr_first, size); - addr_last = fold_build_pointer_plus_hwi_loc (loc, addr_last, -1); - } - - /* Shift both first_addr and last_addr by access_offs if specified. */ - if (access_offs) - { - addr_first = fold_build_pointer_plus_loc (loc, addr_first, access_offs); - addr_last = fold_build_pointer_plus_loc (loc, addr_last, access_offs); - } - - if (dirflag == integer_one_node) - { - tree base = get_base_address (node); - if (VAR_P (base) && DECL_HARD_REGISTER (base)) - reg_store = true; - } - - /* Generate bndcl/bndcu checks if memory access is not safe. */ - if (!safe) - { - gimple_stmt_iterator stmt_iter = *iter; - - if (!bounds) - bounds = chkp_find_bounds (ptr, iter); - - chkp_check_mem_access (addr_first, addr_last, bounds, - stmt_iter, loc, dirflag); - } - - /* We need to store bounds in case pointer is stored. */ - if (dirflag == integer_one_node - && !reg_store - && chkp_type_has_pointer (node_type) - && flag_chkp_store_bounds) - { - gimple *stmt = gsi_stmt (*iter); - tree rhs1 = gimple_assign_rhs1 (stmt); - enum tree_code rhs_code = gimple_assign_rhs_code (stmt); - - if (get_gimple_rhs_class (rhs_code) == GIMPLE_SINGLE_RHS) - chkp_walk_pointer_assignments (node, rhs1, iter, - chkp_copy_bounds_for_elem); - else - { - bounds = chkp_compute_bounds_for_assignment (NULL_TREE, stmt); - chkp_build_bndstx (addr_first, rhs1, bounds, iter); - } - } -} - -/* Add code to copy bounds for all pointers copied - in ASSIGN created during inline of EDGE. */ -void -chkp_copy_bounds_for_assign (gimple *assign, struct cgraph_edge *edge) -{ - tree lhs = gimple_assign_lhs (assign); - tree rhs = gimple_assign_rhs1 (assign); - gimple_stmt_iterator iter = gsi_for_stmt (assign); - - if (!flag_chkp_store_bounds) - return; - - chkp_walk_pointer_assignments (lhs, rhs, &iter, chkp_copy_bounds_for_elem); - - /* We should create edges for all created calls to bndldx and bndstx. */ - while (gsi_stmt (iter) != assign) - { - gimple *stmt = gsi_stmt (iter); - if (gimple_code (stmt) == GIMPLE_CALL) - { - tree fndecl = gimple_call_fndecl (stmt); - struct cgraph_node *callee = cgraph_node::get_create (fndecl); - - gcc_assert (chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDSTX) - || chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDLDX) - || chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDRET)); - - edge->caller->create_edge (callee, as_a (stmt), edge->count); - } - gsi_prev (&iter); - } -} - -/* Some code transformation made during instrumentation pass - may put code into inconsistent state. Here we find and fix - such flaws. */ -void -chkp_fix_cfg () -{ - basic_block bb; - gimple_stmt_iterator i; - - /* We could insert some code right after stmt which ends bb. - We wanted to put this code on fallthru edge but did not - add new edges from the beginning because it may cause new - phi node creation which may be incorrect due to incomplete - bound phi nodes. */ - FOR_ALL_BB_FN (bb, cfun) - for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) - { - gimple *stmt = gsi_stmt (i); - gimple_stmt_iterator next = i; - - gsi_next (&next); - - if (stmt_ends_bb_p (stmt) - && !gsi_end_p (next)) - { - edge fall = find_fallthru_edge (bb->succs); - basic_block dest = NULL; - int flags = 0; - - gcc_assert (fall); - - /* We cannot split abnormal edge. Therefore we - store its params, make it regular and then - rebuild abnormal edge after split. */ - if (fall->flags & EDGE_ABNORMAL) - { - flags = fall->flags & ~EDGE_FALLTHRU; - dest = fall->dest; - - fall->flags &= ~EDGE_COMPLEX; - } - - while (!gsi_end_p (next)) - { - gimple *next_stmt = gsi_stmt (next); - gsi_remove (&next, false); - gsi_insert_on_edge (fall, next_stmt); - } - - gsi_commit_edge_inserts (); - - /* Re-create abnormal edge. */ - if (dest) - make_edge (bb, dest, flags); - } - } -} - -/* Walker callback for chkp_replace_function_pointers. Replaces - function pointer in the specified operand with pointer to the - instrumented function version. */ -static tree -chkp_replace_function_pointer (tree *op, int *walk_subtrees, - void *data ATTRIBUTE_UNUSED) -{ - if (TREE_CODE (*op) == FUNCTION_DECL - && chkp_instrumentable_p (*op) - && (DECL_BUILT_IN_CLASS (*op) == NOT_BUILT_IN - /* For builtins we replace pointers only for selected - function and functions having definitions. */ - || (DECL_BUILT_IN_CLASS (*op) == BUILT_IN_NORMAL - && (chkp_instrument_normal_builtin (*op) - || gimple_has_body_p (*op))))) - { - struct cgraph_node *node = cgraph_node::get_create (*op); - struct cgraph_node *clone = NULL; - - if (!node->instrumentation_clone) - clone = chkp_maybe_create_clone (*op); - - if (clone) - *op = clone->decl; - *walk_subtrees = 0; - } - - return NULL; -} - -/* This function searches for function pointers in statement - pointed by GSI and replaces them with pointers to instrumented - function versions. */ -static void -chkp_replace_function_pointers (gimple_stmt_iterator *gsi) -{ - gimple *stmt = gsi_stmt (*gsi); - /* For calls we want to walk call args only. */ - if (gimple_code (stmt) == GIMPLE_CALL) - { - unsigned i; - for (i = 0; i < gimple_call_num_args (stmt); i++) - walk_tree (gimple_call_arg_ptr (stmt, i), - chkp_replace_function_pointer, NULL, NULL); - } - else - walk_gimple_stmt (gsi, NULL, chkp_replace_function_pointer, NULL); -} - -/* This function instruments all statements working with memory, - calls and rets. - - It also removes excess statements from static initializers. */ -static void -chkp_instrument_function (void) -{ - basic_block bb, next; - gimple_stmt_iterator i; - enum gimple_rhs_class grhs_class; - bool safe = lookup_attribute ("chkp ctor", DECL_ATTRIBUTES (cfun->decl)); - - bb = ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb; - do - { - next = bb->next_bb; - for (i = gsi_start_bb (bb); !gsi_end_p (i); ) - { - gimple *s = gsi_stmt (i); - - /* Skip statement marked to not be instrumented. */ - if (chkp_marked_stmt_p (s)) - { - gsi_next (&i); - continue; - } - - chkp_replace_function_pointers (&i); - - switch (gimple_code (s)) - { - case GIMPLE_ASSIGN: - chkp_process_stmt (&i, gimple_assign_lhs (s), - gimple_location (s), integer_one_node, - NULL_TREE, NULL_TREE, safe); - chkp_process_stmt (&i, gimple_assign_rhs1 (s), - gimple_location (s), integer_zero_node, - NULL_TREE, NULL_TREE, safe); - grhs_class = get_gimple_rhs_class (gimple_assign_rhs_code (s)); - if (grhs_class == GIMPLE_BINARY_RHS) - chkp_process_stmt (&i, gimple_assign_rhs2 (s), - gimple_location (s), integer_zero_node, - NULL_TREE, NULL_TREE, safe); - break; - - case GIMPLE_RETURN: - { - greturn *r = as_a (s); - if (gimple_return_retval (r) != NULL_TREE) - { - chkp_process_stmt (&i, gimple_return_retval (r), - gimple_location (r), - integer_zero_node, - NULL_TREE, NULL_TREE, safe); - - /* Additionally we need to add bounds - to return statement. */ - chkp_add_bounds_to_ret_stmt (&i); - } - } - break; - - case GIMPLE_CALL: - chkp_add_bounds_to_call_stmt (&i); - break; - - default: - ; - } - - gsi_next (&i); - - /* We do not need any actual pointer stores in checker - static initializer. */ - if (lookup_attribute ("chkp ctor", DECL_ATTRIBUTES (cfun->decl)) - && gimple_code (s) == GIMPLE_ASSIGN - && gimple_store_p (s)) - { - gimple_stmt_iterator del_iter = gsi_for_stmt (s); - gsi_remove (&del_iter, true); - unlink_stmt_vdef (s); - release_defs(s); - } - } - bb = next; - } - while (bb); - - /* Some input params may have bounds and be address taken. In this case - we should store incoming bounds into bounds table. */ - tree arg; - if (flag_chkp_store_bounds) - for (arg = DECL_ARGUMENTS (cfun->decl); arg; arg = DECL_CHAIN (arg)) - if (TREE_ADDRESSABLE (arg)) - { - if (BOUNDED_P (arg)) - { - tree bounds = chkp_get_next_bounds_parm (arg); - tree def_ptr = ssa_default_def (cfun, arg); - gimple_stmt_iterator iter - = gsi_start_bb (chkp_get_entry_block ()); - chkp_build_bndstx (chkp_build_addr_expr (arg), - def_ptr ? def_ptr : arg, - bounds, &iter); - - /* Skip bounds arg. */ - arg = TREE_CHAIN (arg); - } - else if (chkp_type_has_pointer (TREE_TYPE (arg))) - { - tree orig_arg = arg; - bitmap slots = BITMAP_ALLOC (NULL); - gimple_stmt_iterator iter - = gsi_start_bb (chkp_get_entry_block ()); - bitmap_iterator bi; - unsigned bnd_no; - - chkp_find_bound_slots (TREE_TYPE (arg), slots); - - EXECUTE_IF_SET_IN_BITMAP (slots, 0, bnd_no, bi) - { - tree bounds = chkp_get_next_bounds_parm (arg); - HOST_WIDE_INT offs = bnd_no * POINTER_SIZE / BITS_PER_UNIT; - tree addr = chkp_build_addr_expr (orig_arg); - tree ptr = build2 (MEM_REF, ptr_type_node, addr, - build_int_cst (ptr_type_node, offs)); - chkp_build_bndstx (chkp_build_addr_expr (ptr), ptr, - bounds, &iter); - - arg = DECL_CHAIN (arg); - } - BITMAP_FREE (slots); - } - } -} - -/* Find init/null/copy_ptr_bounds calls and replace them - with assignments. It should allow better code - optimization. */ - -static void -chkp_remove_useless_builtins () -{ - basic_block bb; - gimple_stmt_iterator gsi; - - FOR_EACH_BB_FN (bb, cfun) - { - for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) - { - gimple *stmt = gsi_stmt (gsi); - tree fndecl; - enum built_in_function fcode; - - /* Find builtins returning first arg and replace - them with assignments. */ - if (gimple_code (stmt) == GIMPLE_CALL - && (fndecl = gimple_call_fndecl (stmt)) - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL - && (fcode = DECL_FUNCTION_CODE (fndecl)) - && (fcode == BUILT_IN_CHKP_INIT_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_NULL_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_COPY_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_SET_PTR_BOUNDS)) - { - tree res = gimple_call_arg (stmt, 0); - update_call_from_tree (&gsi, res); - stmt = gsi_stmt (gsi); - update_stmt (stmt); - } - } - } -} - -/* Initialize pass. */ -static void -chkp_init (void) -{ - basic_block bb; - gimple_stmt_iterator i; - - in_chkp_pass = true; - - for (bb = ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb; bb; bb = bb->next_bb) - for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) - chkp_unmark_stmt (gsi_stmt (i)); - - chkp_invalid_bounds = new hash_set; - chkp_completed_bounds_set = new hash_set; - delete chkp_reg_bounds; - chkp_reg_bounds = new hash_map; - delete chkp_bound_vars; - chkp_bound_vars = new hash_map; - chkp_reg_addr_bounds = new hash_map; - chkp_incomplete_bounds_map = new hash_map; - delete chkp_bounds_map; - chkp_bounds_map = new hash_map; - chkp_abnormal_copies = BITMAP_GGC_ALLOC (); - - entry_block = NULL; - zero_bounds = NULL_TREE; - none_bounds = NULL_TREE; - incomplete_bounds = integer_zero_node; - tmp_var = NULL_TREE; - size_tmp_var = NULL_TREE; - - chkp_uintptr_type = lang_hooks.types.type_for_mode (ptr_mode, true); - - /* We create these constant bounds once for each object file. - These symbols go to comdat section and result in single copy - of each one in the final binary. */ - chkp_get_zero_bounds_var (); - chkp_get_none_bounds_var (); - - calculate_dominance_info (CDI_DOMINATORS); - calculate_dominance_info (CDI_POST_DOMINATORS); - - bitmap_obstack_initialize (NULL); -} - -/* Finalize instrumentation pass. */ -static void -chkp_fini (void) -{ - in_chkp_pass = false; - - delete chkp_invalid_bounds; - delete chkp_completed_bounds_set; - delete chkp_reg_addr_bounds; - delete chkp_incomplete_bounds_map; - - free_dominance_info (CDI_DOMINATORS); - free_dominance_info (CDI_POST_DOMINATORS); - - bitmap_obstack_release (NULL); - - entry_block = NULL; - zero_bounds = NULL_TREE; - none_bounds = NULL_TREE; -} - -/* Main instrumentation pass function. */ -static unsigned int -chkp_execute (void) -{ - chkp_init (); - - chkp_instrument_function (); - - chkp_remove_useless_builtins (); - - chkp_function_mark_instrumented (cfun->decl); - - chkp_fix_cfg (); - - chkp_fini (); - - return 0; -} - -/* Instrumentation pass gate. */ -static bool -chkp_gate (void) -{ - cgraph_node *node = cgraph_node::get (cfun->decl); - return ((node != NULL - && node->instrumentation_clone) - || lookup_attribute ("chkp ctor", DECL_ATTRIBUTES (cfun->decl))); -} - -namespace { - -const pass_data pass_data_chkp = -{ - GIMPLE_PASS, /* type */ - "chkp", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_NONE, /* tv_id */ - PROP_ssa | PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_verify_il - | TODO_update_ssa /* todo_flags_finish */ -}; - -class pass_chkp : public gimple_opt_pass -{ -public: - pass_chkp (gcc::context *ctxt) - : gimple_opt_pass (pass_data_chkp, ctxt) - {} - - /* opt_pass methods: */ - virtual opt_pass * clone () - { - return new pass_chkp (m_ctxt); - } - - virtual bool gate (function *) - { - return chkp_gate (); - } - - virtual unsigned int execute (function *) - { - return chkp_execute (); - } - -}; // class pass_chkp - -} // anon namespace - -gimple_opt_pass * -make_pass_chkp (gcc::context *ctxt) -{ - return new pass_chkp (ctxt); -} - -#include "gt-tree-chkp.h" diff --git a/gcc/tree-chkp.h b/gcc/tree-chkp.h deleted file mode 100644 index 5cfae3d82ce..00000000000 --- a/gcc/tree-chkp.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Declaration of interface functions of Pointer Bounds Checker. - Copyright (C) 2014-2018 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 -. */ - -#ifndef GCC_TREE_CHKP_H -#define GCC_TREE_CHKP_H - -#define DECL_BOUNDS(NODE) (chkp_get_bounds (DECL_WRTL_CHECK (NODE))) - -#define SET_DECL_BOUNDS(NODE, VAL) \ - (chkp_set_bounds (DECL_WRTL_CHECK (NODE), VAL)) - -extern tree chkp_get_bounds (tree node); -extern void chkp_set_bounds (tree node, tree val); -extern bool chkp_register_var_initializer (tree var); -extern void chkp_finish_file (void); -extern bool chkp_type_has_pointer (const_tree type); -extern unsigned chkp_type_bounds_count (const_tree type); -extern tree chkp_make_bounds_for_struct_addr (tree ptr); -extern tree chkp_get_zero_bounds_var (void); -extern tree chkp_get_none_bounds_var (void); -extern void chkp_check_mem_access (tree first, tree last, tree bounds, - gimple_stmt_iterator iter, - location_t location, - tree dirflag); -extern void chkp_fix_cfg (void); -extern bool chkp_variable_size_type (tree type); -extern tree chkp_build_make_bounds_call (tree lb, tree size); -extern tree chkp_build_bndldx_call (tree addr, tree ptr); -extern tree chkp_build_bndstx_call (tree addr, tree ptr, tree bounds); -extern void chkp_find_bound_slots (const_tree type, bitmap res); -extern void chkp_build_bndstx (tree addr, tree ptr, tree bounds, - gimple_stmt_iterator *gsi); -extern gcall *chkp_retbnd_call_by_val (tree val); -extern bool chkp_function_instrumented_p (tree fndecl); -extern void chkp_function_mark_instrumented (tree fndecl); -extern void chkp_copy_bounds_for_assign (gimple *assign, - struct cgraph_edge *edge); -extern bool chkp_gimple_call_builtin_p (gimple *call, - enum built_in_function code); -extern rtx chkp_expand_zero_bounds (void); -extern void chkp_expand_bounds_reset_for_mem (tree mem, tree ptr); -extern tree chkp_insert_retbnd_call (tree bndval, tree retval, - gimple_stmt_iterator *gsi); -extern gcall *chkp_copy_call_skip_bounds (gcall *call); -extern bool chkp_redirect_edge (cgraph_edge *e); -extern void chkp_fixup_inlined_call (tree lhs, tree rhs); - -#endif /* GCC_TREE_CHKP_H */ diff --git a/gcc/tree-core.h b/gcc/tree-core.h index f7be51f0e44..2bebb22a7e9 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -165,16 +165,6 @@ enum built_in_class { #define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM, enum built_in_function { #include "builtins.def" - - BEGIN_CHKP_BUILTINS, - -#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) -#define DEF_BUILTIN_CHKP(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) \ - ENUM##_CHKP = ENUM + BEGIN_CHKP_BUILTINS + 1, -#include "builtins.def" - - END_CHKP_BUILTINS = BEGIN_CHKP_BUILTINS * 2 + 1, - /* Complex division routines in libgcc. These are done via builtins because emit_library_call_value can't handle complex values. */ BUILT_IN_COMPLEX_MUL_MIN, @@ -210,10 +200,6 @@ enum combined_fn { CFN_##ENUM = int (ENUM), #include "builtins.def" -#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) -#define DEF_BUILTIN_CHKP(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) \ - CFN_##ENUM##_CHKP = int (ENUM##_CHKP), -#include "builtins.def" #define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) \ CFN_##CODE = int (END_BUILTINS) + int (IFN_##CODE), diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ae36cc710fd..ca4dc321d20 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -57,7 +57,6 @@ along with GCC; see the file COPYING3. If not see #include "value-prof.h" #include "cfgloop.h" #include "builtins.h" -#include "tree-chkp.h" #include "stringpool.h" #include "attribs.h" #include "sreal.h" @@ -122,7 +121,7 @@ eni_weights eni_time_weights; /* Prototypes. */ -static tree declare_return_variable (copy_body_data *, tree, tree, tree, +static tree declare_return_variable (copy_body_data *, tree, tree, basic_block); static void remap_block (tree *, copy_body_data *); static void copy_bind_expr (tree *, int *, copy_body_data *); @@ -1403,15 +1402,6 @@ remap_gimple_stmt (gimple *stmt, copy_body_data *id) retval); /* id->retvar is already substituted. Skip it on later remapping. */ skip_first = true; - - /* We need to copy bounds if return structure with pointers into - instrumented function. */ - if (chkp_function_instrumented_p (id->dst_fn) - && !bndslot - && !BOUNDED_P (id->retvar) - && chkp_type_has_pointer (TREE_TYPE (id->retvar))) - id->assign_stmts.safe_push (copy); - } else return stmts; @@ -1889,29 +1879,13 @@ copy_bb (copy_body_data *id, basic_block bb, gcall *new_call; vec argarray; size_t nargs = gimple_call_num_args (id->call_stmt); - size_t n, i, nargs_to_copy; - bool remove_bounds = false; + size_t n; for (p = DECL_ARGUMENTS (id->src_fn); p; p = DECL_CHAIN (p)) nargs--; - /* Bounds should be removed from arg pack in case - we handle not instrumented call in instrumented - function. */ - nargs_to_copy = nargs; - if (gimple_call_with_bounds_p (id->call_stmt) - && !gimple_call_with_bounds_p (stmt)) - { - for (i = gimple_call_num_args (id->call_stmt) - nargs; - i < gimple_call_num_args (id->call_stmt); - i++) - if (POINTER_BOUNDS_P (gimple_call_arg (id->call_stmt, i))) - nargs_to_copy--; - remove_bounds = true; - } - /* Create the new array of arguments. */ - n = nargs_to_copy + gimple_call_num_args (call_stmt); + n = nargs + gimple_call_num_args (call_stmt); argarray.create (n); argarray.safe_grow_cleared (n); @@ -1920,26 +1894,11 @@ copy_bb (copy_body_data *id, basic_block bb, gimple_call_arg_ptr (call_stmt, 0), gimple_call_num_args (call_stmt) * sizeof (tree)); - if (remove_bounds) - { - /* Append the rest of arguments removing bounds. */ - unsigned cur = gimple_call_num_args (call_stmt); - i = gimple_call_num_args (id->call_stmt) - nargs; - for (i = gimple_call_num_args (id->call_stmt) - nargs; - i < gimple_call_num_args (id->call_stmt); - i++) - if (!POINTER_BOUNDS_P (gimple_call_arg (id->call_stmt, i))) - argarray[cur++] = gimple_call_arg (id->call_stmt, i); - gcc_assert (cur == n); - } - else - { - /* Append the arguments passed in '...' */ - memcpy (argarray.address () + gimple_call_num_args (call_stmt), - gimple_call_arg_ptr (id->call_stmt, 0) - + (gimple_call_num_args (id->call_stmt) - nargs), - nargs * sizeof (tree)); - } + /* Append the arguments passed in '...' */ + memcpy (argarray.address () + gimple_call_num_args (call_stmt), + gimple_call_arg_ptr (id->call_stmt, 0) + + (gimple_call_num_args (id->call_stmt) - nargs), + nargs * sizeof (tree)); new_call = gimple_build_call_vec (gimple_call_fn (call_stmt), argarray); @@ -1966,20 +1925,13 @@ copy_bb (copy_body_data *id, basic_block bb, { /* __builtin_va_arg_pack_len () should be replaced by the number of anonymous arguments. */ - size_t nargs = gimple_call_num_args (id->call_stmt), i; + size_t nargs = gimple_call_num_args (id->call_stmt); tree count, p; gimple *new_stmt; for (p = DECL_ARGUMENTS (id->src_fn); p; p = DECL_CHAIN (p)) nargs--; - /* For instrumented calls we should ignore bounds. */ - for (i = gimple_call_num_args (id->call_stmt) - nargs; - i < gimple_call_num_args (id->call_stmt); - i++) - if (POINTER_BOUNDS_P (gimple_call_arg (id->call_stmt, i))) - nargs--; - count = build_int_cst (integer_type_node, nargs); new_stmt = gimple_build_assign (gimple_call_lhs (stmt), count); gsi_replace (©_gsi, new_stmt, false); @@ -3308,14 +3260,12 @@ initialize_inlined_parameters (copy_body_data *id, gimple *stmt, is set only for CALL_EXPR_RETURN_SLOT_OPT. MODIFY_DEST, if non-null, was the LHS of the MODIFY_EXPR to which this call is the RHS. - RETURN_BOUNDS holds a destination for returned bounds. - The return value is a (possibly null) value that holds the result as seen by the caller. */ static tree declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest, - tree return_bounds, basic_block entry_bb) + basic_block entry_bb) { tree callee = id->src_fn; tree result = DECL_RESULT (callee); @@ -3494,20 +3444,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest, /* Remember this so we can ignore it in remap_decls. */ id->retvar = var; - - /* If returned bounds are used, then make var for them. */ - if (return_bounds) - { - tree bndtemp = create_tmp_var (pointer_bounds_type_node, "retbnd"); - DECL_SEEN_IN_BIND_EXPR_P (bndtemp) = 1; - TREE_NO_WARNING (bndtemp) = 1; - declare_inline_vars (id->block, bndtemp); - - id->retbnd = bndtemp; - insert_init_stmt (id, entry_bb, - gimple_build_assign (bndtemp, chkp_get_zero_bounds_var ())); - } - return use; } @@ -4368,7 +4304,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) hash_map *st = NULL; tree return_slot; tree modify_dest; - tree return_bounds = NULL; struct cgraph_edge *cg_edge; cgraph_inline_failed_t reason; basic_block return_block; @@ -4377,7 +4312,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) bool successfully_inlined = false; bool purge_dead_abnormal_edges; gcall *call_stmt; - unsigned int i; unsigned int prop_mask, src_properties; struct function *dst_cfun; tree simduid; @@ -4658,24 +4592,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) { modify_dest = gimple_call_lhs (stmt); - /* Remember where to copy returned bounds. */ - if (gimple_call_with_bounds_p (stmt) - && TREE_CODE (modify_dest) == SSA_NAME) - { - gcall *retbnd = chkp_retbnd_call_by_val (modify_dest); - if (retbnd) - { - return_bounds = gimple_call_lhs (retbnd); - /* If returned bounds are not used then just - remove unused call. */ - if (!return_bounds) - { - gimple_stmt_iterator iter = gsi_for_stmt (retbnd); - gsi_remove (&iter, true); - } - } - } - /* The function which we are inlining might not return a value, in which case we should issue a warning that the function does not return a value. In that case the optimizers will @@ -4706,8 +4622,7 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) } /* Declare the return variable for the function. */ - use_retvar = declare_return_variable (id, return_slot, modify_dest, - return_bounds, bb); + use_retvar = declare_return_variable (id, return_slot, modify_dest, bb); /* Add local vars in this inlined callee to caller. */ add_local_variables (id->src_cfun, cfun, id); @@ -4814,12 +4729,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) gimple_set_location (clobber_stmt, gimple_location (old_stmt)); gsi_insert_after (&stmt_gsi, clobber_stmt, GSI_SAME_STMT); } - - /* Copy bounds if we copy structure with bounds. */ - if (chkp_function_instrumented_p (id->dst_fn) - && !BOUNDED_P (use_retvar) - && chkp_type_has_pointer (TREE_TYPE (use_retvar))) - id->assign_stmts.safe_push (stmt); } else { @@ -4873,20 +4782,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) gsi_remove (&stmt_gsi, true); } - /* Put returned bounds into the correct place if required. */ - if (return_bounds) - { - gimple *old_stmt = SSA_NAME_DEF_STMT (return_bounds); - gimple *new_stmt = gimple_build_assign (return_bounds, id->retbnd); - gimple_stmt_iterator bnd_gsi = gsi_for_stmt (old_stmt); - unlink_stmt_vdef (old_stmt); - gsi_replace (&bnd_gsi, new_stmt, false); - maybe_clean_or_replace_eh_stmt (old_stmt, new_stmt); - cgraph_update_edges_for_call_stmt (old_stmt, - gimple_call_fndecl (old_stmt), - new_stmt); - } - if (purge_dead_abnormal_edges) { gimple_purge_dead_eh_edges (return_block); @@ -4903,9 +4798,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) TREE_USED (gimple_assign_rhs1 (stmt)) = 1; } - /* Copy bounds for all generated assigns that need it. */ - for (i = 0; i < id->assign_stmts.length (); i++) - chkp_copy_bounds_for_assign (id->assign_stmts[i], cg_edge); id->assign_stmts.release (); /* Output the inlining info for this abstract function, since it has been diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 7625d1963ff..8ec32ccbcc1 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -339,11 +339,6 @@ extern void register_pass (register_pass_info *); extern void register_pass (opt_pass* pass, pass_positioning_ops pos, const char* ref_pass_name, int ref_pass_inst_number); -extern simple_ipa_opt_pass *make_pass_ipa_chkp_versioning (gcc::context *ctxt); -extern simple_ipa_opt_pass *make_pass_ipa_chkp_early_produce_thunks (gcc::context *ctxt); -extern simple_ipa_opt_pass *make_pass_ipa_chkp_produce_thunks (gcc::context *ctxt); -extern gimple_opt_pass *make_pass_chkp (gcc::context *ctxt); -extern gimple_opt_pass *make_pass_chkp_opt (gcc::context *ctxt); extern gimple_opt_pass *make_pass_asan (gcc::context *ctxt); extern gimple_opt_pass *make_pass_asan_O0 (gcc::context *ctxt); extern gimple_opt_pass *make_pass_tsan (gcc::context *ctxt); @@ -492,7 +487,6 @@ extern simple_ipa_opt_pass *make_pass_ipa_tree_profile (gcc::context *ctxt); extern simple_ipa_opt_pass *make_pass_ipa_auto_profile (gcc::context *ctxt); extern simple_ipa_opt_pass *make_pass_build_ssa_passes (gcc::context *ctxt); -extern simple_ipa_opt_pass *make_pass_chkp_instrumentation_passes (gcc::context *ctxt); extern simple_ipa_opt_pass *make_pass_local_optimization_passes (gcc::context *ctxt); extern ipa_opt_pass_d *make_pass_ipa_whole_program_visibility (gcc::context diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 125507ee348..c5fc04150d8 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1285,7 +1285,6 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags, break; case VOID_TYPE: - case POINTER_BOUNDS_TYPE: case INTEGER_TYPE: case REAL_TYPE: case FIXED_POINT_TYPE: diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 5591097d018..2f0e54294ad 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -138,7 +138,6 @@ along with GCC; see the file COPYING3. If not see #include "dbgcnt.h" #include "params.h" #include "builtins.h" -#include "tree-chkp.h" #include "cfgloop.h" #include "stor-layout.h" #include "optabs-query.h" @@ -2080,8 +2079,6 @@ insert_clobber_before_stack_restore (tree saved_val, tree var, else if (gimple_assign_ssa_name_copy_p (stmt)) insert_clobber_before_stack_restore (gimple_assign_lhs (stmt), var, visited); - else if (chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDRET)) - continue; else gcc_assert (is_gimple_debug (stmt)); } diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 7ec3cc15854..d23148675c9 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -65,7 +65,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-dfa.h" #include "cfgloop.h" #include "tree-scalar-evolution.h" -#include "tree-chkp.h" #include "tree-ssa-propagate.h" #include "gimple-fold.h" @@ -778,21 +777,7 @@ propagate_necessity (bool aggressive) && (DECL_FUNCTION_CODE (def_callee) == BUILT_IN_ALIGNED_ALLOC || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_MALLOC || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_CALLOC)) - { - gimple *bounds_def_stmt; - tree bounds; - - /* For instrumented calls we should also check used - bounds are returned by the same allocation call. */ - if (!gimple_call_with_bounds_p (stmt) - || ((bounds = gimple_call_arg (stmt, 1)) - && TREE_CODE (bounds) == SSA_NAME - && (bounds_def_stmt = SSA_NAME_DEF_STMT (bounds)) - && chkp_gimple_call_builtin_p (bounds_def_stmt, - BUILT_IN_CHKP_BNDRET) - && gimple_call_arg (bounds_def_stmt, 0) == ptr)) - continue; - } + continue; } FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE) @@ -1276,23 +1261,6 @@ eliminate_unnecessary_stmts (void) && !gimple_plf (def_stmt, STMT_NECESSARY)) gimple_set_plf (stmt, STMT_NECESSARY, false); } - /* We did not propagate necessity for free calls fed - by allocation function to allow unnecessary - alloc-free sequence elimination. For instrumented - calls it also means we did not mark bounds producer - as necessary and it is time to do it in case free - call is not removed. */ - if (gimple_call_with_bounds_p (stmt)) - { - gimple *bounds_def_stmt; - tree bounds = gimple_call_arg (stmt, 1); - gcc_assert (TREE_CODE (bounds) == SSA_NAME); - bounds_def_stmt = SSA_NAME_DEF_STMT (bounds); - if (bounds_def_stmt - && !gimple_plf (bounds_def_stmt, STMT_NECESSARY)) - gimple_set_plf (bounds_def_stmt, STMT_NECESSARY, - gimple_plf (stmt, STMT_NECESSARY)); - } } /* If GSI is not necessary then remove it. */ @@ -1341,9 +1309,7 @@ eliminate_unnecessary_stmts (void) && DECL_FUNCTION_CODE (call) != BUILT_IN_MALLOC && DECL_FUNCTION_CODE (call) != BUILT_IN_CALLOC && !ALLOCA_FUNCTION_CODE_P - (DECL_FUNCTION_CODE (call)))) - /* Avoid doing so for bndret calls for the same reason. */ - && !chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDRET)) + (DECL_FUNCTION_CODE (call))))) { something_changed = true; if (dump_file && (dump_flags & TDF_DETAILS)) diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 11b1938216e..144902d15dc 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2781,7 +2781,6 @@ create_expression_by_pieces (basic_block block, pre_expr expr, args.quick_push (arg); } gcall *call = gimple_build_call_vec (fn, args); - gimple_call_set_with_bounds (call, currop->with_bounds); if (sc) gimple_call_set_chain (call, sc); tree forcedname = make_ssa_name (currop->type); diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 4aec41e96c1..b6cc8846435 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1133,8 +1133,6 @@ copy_reference_ops_from_call (gcall *call, if (stmt_could_throw_p (call) && (lr = lookup_stmt_eh_lp (call)) > 0) temp.op2 = size_int (lr); temp.off = -1; - if (gimple_call_with_bounds_p (call)) - temp.with_bounds = 1; result->safe_push (temp); /* Copy the call arguments. As they can be references as well, diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h index 9356520cbe5..5857cfc1c8a 100644 --- a/gcc/tree-ssa-sccvn.h +++ b/gcc/tree-ssa-sccvn.h @@ -87,8 +87,6 @@ typedef struct vn_reference_op_struct /* Dependence info, used for [TARGET_]MEM_REF only. */ unsigned short clique; unsigned short base; - /* 1 for instrumented calls. */ - unsigned with_bounds : 1; unsigned reverse : 1; /* For storing TYPE_ALIGN for array ref element size computation. */ unsigned align : 6; diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index 7a89174d6aa..804905d09a2 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-propagate.h" #include "tree-ssa-strlen.h" #include "params.h" -#include "ipa-chkp.h" #include "tree-hash-traits.h" #include "tree-object-size.h" #include "builtins.h" @@ -576,7 +575,6 @@ get_string_length (strinfo *si) if (si->stmt) { gimple *stmt = si->stmt, *lenstmt; - bool with_bounds = gimple_call_with_bounds_p (stmt); tree callee, lhs, fn, tem; location_t loc; gimple_stmt_iterator gsi; @@ -595,20 +593,11 @@ get_string_length (strinfo *si) { case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHKP: - case BUILT_IN_STRCAT_CHK_CHKP: gsi = gsi_for_stmt (stmt); fn = builtin_decl_implicit (BUILT_IN_STRLEN); gcc_assert (lhs == NULL_TREE); tem = unshare_expr (gimple_call_arg (stmt, 0)); - if (with_bounds) - { - lenstmt = gimple_build_call (chkp_maybe_create_clone (fn)->decl, - 2, tem, gimple_call_arg (stmt, 1)); - gimple_call_set_with_bounds (lenstmt, true); - } - else - lenstmt = gimple_build_call (fn, 1, tem); + lenstmt = gimple_build_call (fn, 1, tem); lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (fn)), lenstmt); gimple_call_set_lhs (lenstmt, lhs); gimple_set_vuse (lenstmt, gimple_vuse (stmt)); @@ -628,16 +617,8 @@ get_string_length (strinfo *si) lhs = NULL_TREE; /* FALLTHRU */ case BUILT_IN_STRCPY: - case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: gcc_assert (builtin_decl_implicit_p (BUILT_IN_STPCPY)); - if (gimple_call_num_args (stmt) == (with_bounds ? 4 : 2)) - fn = builtin_decl_implicit (BUILT_IN_STPCPY); - else - fn = builtin_decl_explicit (BUILT_IN_STPCPY_CHK); - if (with_bounds) - fn = chkp_maybe_create_clone (fn)->decl; + fn = builtin_decl_implicit (BUILT_IN_STPCPY); gcc_assert (lhs == NULL_TREE); if (dump_file && (dump_flags & TDF_DETAILS) != 0) { @@ -656,8 +637,6 @@ get_string_length (strinfo *si) /* FALLTHRU */ case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: gcc_assert (lhs != NULL_TREE); loc = gimple_location (stmt); set_endptr_and_length (loc, si, lhs); @@ -1002,9 +981,7 @@ valid_builtin_call (gimple *stmt) case BUILT_IN_MEMCMP: case BUILT_IN_MEMCMP_EQ: case BUILT_IN_STRCHR: - case BUILT_IN_STRCHR_CHKP: case BUILT_IN_STRLEN: - case BUILT_IN_STRLEN_CHKP: /* The above functions should be pure. Punt if they aren't. */ if (gimple_vdef (stmt) || gimple_vuse (stmt) == NULL_TREE) return false; @@ -1014,25 +991,15 @@ valid_builtin_call (gimple *stmt) case BUILT_IN_MALLOC: case BUILT_IN_MEMCPY: case BUILT_IN_MEMCPY_CHK: - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: case BUILT_IN_MEMPCPY: case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMPCPY_CHKP: - case BUILT_IN_MEMPCPY_CHK_CHKP: case BUILT_IN_MEMSET: case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHKP: - case BUILT_IN_STRCAT_CHK_CHKP: case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: /* The above functions should be neither const nor pure. Punt if they aren't. */ if (gimple_vdef (stmt) == NULL_TREE || gimple_vuse (stmt) == NULL_TREE) @@ -1121,10 +1088,6 @@ adjust_last_stmt (strinfo *si, gimple *stmt, bool is_strcat) case BUILT_IN_MEMCPY: case BUILT_IN_MEMCPY_CHK: break; - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: - len_arg_no = 4; - break; default: return; } @@ -1328,12 +1291,11 @@ handle_builtin_strchr (gimple_stmt_iterator *gsi) tree src; gimple *stmt = gsi_stmt (*gsi); tree lhs = gimple_call_lhs (stmt); - bool with_bounds = gimple_call_with_bounds_p (stmt); if (lhs == NULL_TREE) return; - if (!integer_zerop (gimple_call_arg (stmt, with_bounds ? 2 : 1))) + if (!integer_zerop (gimple_call_arg (stmt, 1))) return; src = gimple_call_arg (stmt, 0); @@ -1440,9 +1402,8 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) gimple *stmt = gsi_stmt (*gsi); strinfo *si, *dsi, *olddsi, *zsi; location_t loc; - bool with_bounds = gimple_call_with_bounds_p (stmt); - src = gimple_call_arg (stmt, with_bounds ? 2 : 1); + src = gimple_call_arg (stmt, 1); dst = gimple_call_arg (stmt, 0); lhs = gimple_call_lhs (stmt); idx = get_stridx (src); @@ -1473,15 +1434,11 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) { case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: if (lhs != NULL_TREE || !builtin_decl_implicit_p (BUILT_IN_STPCPY)) return; break; case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: if (lhs == NULL_TREE) return; else @@ -1599,19 +1556,16 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) switch (bcode) { case BUILT_IN_STRCPY: - case BUILT_IN_STRCPY_CHKP: fn = builtin_decl_implicit (BUILT_IN_MEMCPY); if (lhs) ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = didx; break; case BUILT_IN_STRCPY_CHK: - case BUILT_IN_STRCPY_CHK_CHKP: fn = builtin_decl_explicit (BUILT_IN_MEMCPY_CHK); if (lhs) ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = didx; break; case BUILT_IN_STPCPY: - case BUILT_IN_STPCPY_CHKP: /* This would need adjustment of the lhs (subtract one), or detection that the trailing '\0' doesn't need to be written, if it will be immediately overwritten. @@ -1623,7 +1577,6 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) } break; case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STPCPY_CHK_CHKP: /* This would need adjustment of the lhs (subtract one), or detection that the trailing '\0' doesn't need to be written, if it will be immediately overwritten. @@ -1673,33 +1626,14 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) fprintf (dump_file, "Optimizing: "); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); } - if (with_bounds) - { - fn = chkp_maybe_create_clone (fn)->decl; - if (gimple_call_num_args (stmt) == 4) - success = update_gimple_call (gsi, fn, 5, dst, - gimple_call_arg (stmt, 1), - src, - gimple_call_arg (stmt, 3), - len); - else - success = update_gimple_call (gsi, fn, 6, dst, - gimple_call_arg (stmt, 1), - src, - gimple_call_arg (stmt, 3), - len, - gimple_call_arg (stmt, 4)); - } + if (gimple_call_num_args (stmt) == 2) + success = update_gimple_call (gsi, fn, 3, dst, src, len); else - if (gimple_call_num_args (stmt) == 2) - success = update_gimple_call (gsi, fn, 3, dst, src, len); - else - success = update_gimple_call (gsi, fn, 4, dst, src, len, - gimple_call_arg (stmt, 2)); + success = update_gimple_call (gsi, fn, 4, dst, src, len, + gimple_call_arg (stmt, 2)); if (success) { stmt = gsi_stmt (*gsi); - gimple_call_set_with_bounds (stmt, with_bounds); update_stmt (stmt); if (dump_file && (dump_flags & TDF_DETAILS) != 0) { @@ -2068,11 +2002,9 @@ handle_builtin_stxncpy (built_in_function, gimple_stmt_iterator *gsi) gimple *stmt = gsi_stmt (*gsi); - bool with_bounds = gimple_call_with_bounds_p (stmt); - - tree dst = gimple_call_arg (stmt, with_bounds ? 1 : 0); - tree src = gimple_call_arg (stmt, with_bounds ? 2 : 1); - tree len = gimple_call_arg (stmt, with_bounds ? 3 : 2); + tree dst = gimple_call_arg (stmt, 0); + tree src = gimple_call_arg (stmt, 1); + tree len = gimple_call_arg (stmt, 2); tree dstsize = NULL_TREE, srcsize = NULL_TREE; int didx = get_stridx (dst); @@ -2177,10 +2109,9 @@ handle_builtin_memcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) tree src, dst, len, lhs, oldlen, newlen; gimple *stmt = gsi_stmt (*gsi); strinfo *si, *dsi, *olddsi; - bool with_bounds = gimple_call_with_bounds_p (stmt); - len = gimple_call_arg (stmt, with_bounds ? 4 : 2); - src = gimple_call_arg (stmt, with_bounds ? 2 : 1); + len = gimple_call_arg (stmt, 2); + src = gimple_call_arg (stmt, 1); dst = gimple_call_arg (stmt, 0); idx = get_stridx (src); if (idx == 0) @@ -2315,8 +2246,6 @@ handle_builtin_memcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) { case BUILT_IN_MEMCPY: case BUILT_IN_MEMCPY_CHK: - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: /* Allow adjust_last_stmt to decrease this memcpy's size. */ laststmt.stmt = stmt; laststmt.len = dsi->nonzero_chars; @@ -2326,8 +2255,6 @@ handle_builtin_memcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) break; case BUILT_IN_MEMPCPY: case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMPCPY_CHKP: - case BUILT_IN_MEMPCPY_CHK_CHKP: break; default: gcc_unreachable (); @@ -2350,9 +2277,8 @@ handle_builtin_strcat (enum built_in_function bcode, gimple_stmt_iterator *gsi) gimple *stmt = gsi_stmt (*gsi); strinfo *si, *dsi; location_t loc = gimple_location (stmt); - bool with_bounds = gimple_call_with_bounds_p (stmt); - tree src = gimple_call_arg (stmt, with_bounds ? 2 : 1); + tree src = gimple_call_arg (stmt, 1); tree dst = gimple_call_arg (stmt, 0); /* Bail if the source is the same as destination. It will be diagnosed @@ -2483,19 +2409,17 @@ handle_builtin_strcat (enum built_in_function bcode, gimple_stmt_iterator *gsi) switch (bcode) { case BUILT_IN_STRCAT: - case BUILT_IN_STRCAT_CHKP: if (srclen != NULL_TREE) fn = builtin_decl_implicit (BUILT_IN_MEMCPY); else fn = builtin_decl_implicit (BUILT_IN_STRCPY); break; case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHK_CHKP: if (srclen != NULL_TREE) fn = builtin_decl_explicit (BUILT_IN_MEMCPY_CHK); else fn = builtin_decl_explicit (BUILT_IN_STRCPY_CHK); - objsz = gimple_call_arg (stmt, with_bounds ? 4 : 2); + objsz = gimple_call_arg (stmt, 2); break; default: gcc_unreachable (); @@ -2548,35 +2472,15 @@ handle_builtin_strcat (enum built_in_function bcode, gimple_stmt_iterator *gsi) fprintf (dump_file, "Optimizing: "); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); } - if (with_bounds) - { - fn = chkp_maybe_create_clone (fn)->decl; - if (srclen != NULL_TREE) - success = update_gimple_call (gsi, fn, 5 + (objsz != NULL_TREE), - dst, - gimple_call_arg (stmt, 1), - src, - gimple_call_arg (stmt, 3), - len, objsz); - else - success = update_gimple_call (gsi, fn, 4 + (objsz != NULL_TREE), - dst, - gimple_call_arg (stmt, 1), - src, - gimple_call_arg (stmt, 3), - objsz); - } + if (srclen != NULL_TREE) + success = update_gimple_call (gsi, fn, 3 + (objsz != NULL_TREE), + dst, src, len, objsz); else - if (srclen != NULL_TREE) - success = update_gimple_call (gsi, fn, 3 + (objsz != NULL_TREE), - dst, src, len, objsz); - else - success = update_gimple_call (gsi, fn, 2 + (objsz != NULL_TREE), - dst, src, objsz); + success = update_gimple_call (gsi, fn, 2 + (objsz != NULL_TREE), + dst, src, objsz); if (success) { stmt = gsi_stmt (*gsi); - gimple_call_set_with_bounds (stmt, with_bounds); update_stmt (stmt); if (dump_file && (dump_flags & TDF_DETAILS) != 0) { @@ -3423,21 +3327,15 @@ strlen_check_and_optimize_stmt (gimple_stmt_iterator *gsi, bool *cleanup_eh) switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_STRLEN: - case BUILT_IN_STRLEN_CHKP: handle_builtin_strlen (gsi); break; case BUILT_IN_STRCHR: - case BUILT_IN_STRCHR_CHKP: handle_builtin_strchr (gsi); break; case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: - case BUILT_IN_STRCPY_CHKP: - case BUILT_IN_STRCPY_CHK_CHKP: - case BUILT_IN_STPCPY_CHKP: - case BUILT_IN_STPCPY_CHK_CHKP: handle_builtin_strcpy (DECL_FUNCTION_CODE (callee), gsi); break; @@ -3457,16 +3355,10 @@ strlen_check_and_optimize_stmt (gimple_stmt_iterator *gsi, bool *cleanup_eh) case BUILT_IN_MEMCPY_CHK: case BUILT_IN_MEMPCPY: case BUILT_IN_MEMPCPY_CHK: - case BUILT_IN_MEMCPY_CHKP: - case BUILT_IN_MEMCPY_CHK_CHKP: - case BUILT_IN_MEMPCPY_CHKP: - case BUILT_IN_MEMPCPY_CHK_CHKP: handle_builtin_memcpy (DECL_FUNCTION_CODE (callee), gsi); break; case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: - case BUILT_IN_STRCAT_CHKP: - case BUILT_IN_STRCAT_CHK_CHKP: handle_builtin_strcat (DECL_FUNCTION_CODE (callee), gsi); break; case BUILT_IN_MALLOC: diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 26c1d4205ee..c8594851957 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-into-ssa.h" #include "tree-cfg.h" #include "tree-stdarg.h" -#include "tree-chkp.h" /* A simple pass that attempts to optimize stdarg functions on architectures that need to save register arguments to stack on entry to stdarg functions. @@ -1038,11 +1037,6 @@ expand_ifn_va_arg_1 (function *fun) unsigned int nargs = gimple_call_num_args (stmt); gcc_assert (useless_type_conversion_p (TREE_TYPE (lhs), type)); - /* We replace call with a new expr. This may require - corresponding bndret call fixup. */ - if (chkp_function_instrumented_p (fun->decl)) - chkp_fixup_inlined_call (lhs, expr); - if (nargs == 4) { /* We've transported the size of with WITH_SIZE_EXPR here as diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 912fa5f0f02..02267406595 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-streamer.h" #include "cgraph.h" #include "builtins.h" -#include "ipa-chkp.h" #include "gomp-constants.h" #include "stringpool.h" #include "attribs.h" diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c index e4689615310..63fc45284e0 100644 --- a/gcc/tree-streamer.c +++ b/gcc/tree-streamer.c @@ -312,7 +312,6 @@ record_common_node (struct streamer_tree_cache_d *cache, tree node) case IDENTIFIER_NODE: case INTEGER_CST: case INTEGER_TYPE: - case POINTER_BOUNDS_TYPE: case REAL_TYPE: case TREE_LIST: case VOID_CST: diff --git a/gcc/tree.c b/gcc/tree.c index 2c75953542b..b0c3a798470 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -827,7 +827,6 @@ tree_code_size (enum tree_code code) case UNION_TYPE: case QUAL_UNION_TYPE: case VOID_TYPE: - case POINTER_BOUNDS_TYPE: case FUNCTION_TYPE: case METHOD_TYPE: case LANG_TYPE: return sizeof (tree_type_non_common); @@ -1508,7 +1507,6 @@ wide_int_to_tree_1 (tree type, const wide_int_ref &pcst) case POINTER_TYPE: case REFERENCE_TYPE: - case POINTER_BOUNDS_TYPE: /* Cache NULL pointer and zero bounds. */ if (hwi == 0) { @@ -3783,7 +3781,6 @@ type_contains_placeholder_1 (const_tree type) switch (TREE_CODE (type)) { case VOID_TYPE: - case POINTER_BOUNDS_TYPE: case COMPLEX_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: @@ -9910,8 +9907,6 @@ build_common_tree_nodes (bool signed_char) void_type_node = make_node (VOID_TYPE); layout_type (void_type_node); - pointer_bounds_type_node = targetm.chkp_bound_type (); - /* We are not going to have real types in C with less than byte alignment, so we might as well not have any types that claim to have it. */ SET_TYPE_ALIGN (void_type_node, BITS_PER_UNIT); diff --git a/gcc/tree.def b/gcc/tree.def index 9696fee6813..cee41c2a9c9 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -31,11 +31,7 @@ along with GCC; see the file COPYING3. If not see These tree codes have been sorted so that the macros in tree.h that check for various tree codes are optimized into range checks. This gives a measurable performance improvement. When adding a new - code, consider its placement in relation to the other codes. - - When adding a new tree code which might appear as GIMPLE_ASSIGN RHS - code, proper handler in chkp_compute_bounds_for_assignment may - be required. */ + code, consider its placement in relation to the other codes. */ /* Any erroneous construct is parsed into a node of this type. This type of node is accepted without complaint in all contexts @@ -237,11 +233,6 @@ DEFTREECODE (QUAL_UNION_TYPE, "qual_union_type", tcc_type, 0) /* The void type in C */ DEFTREECODE (VOID_TYPE, "void_type", tcc_type, 0) -/* Type to hold bounds for a pointer. - Has TYPE_PRECISION component to specify number of bits used - by this type. */ -DEFTREECODE (POINTER_BOUNDS_TYPE, "pointer_bounds_type", tcc_type, 0) - /* Type of functions. Special fields: TREE_TYPE type of value returned. TYPE_ARG_TYPES list of types of arguments expected. diff --git a/gcc/tree.h b/gcc/tree.h index ef8bff405fe..79b675025d9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -595,21 +595,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, /* Nonzero if this type is a complete type. */ #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE) -/* Nonzero if this type is a pointer bounds type. */ -#define POINTER_BOUNDS_TYPE_P(NODE) \ - (TREE_CODE (NODE) == POINTER_BOUNDS_TYPE) - -/* Nonzero if this node has a pointer bounds type. */ -#define POINTER_BOUNDS_P(NODE) \ - (POINTER_BOUNDS_TYPE_P (TREE_TYPE (NODE))) - -/* Nonzero if this type supposes bounds existence. */ -#define BOUNDED_TYPE_P(type) (POINTER_TYPE_P (type)) - -/* Nonzero for objects with bounded type. */ -#define BOUNDED_P(node) \ - BOUNDED_TYPE_P (TREE_TYPE (node)) - /* Nonzero if this type is the (possibly qualified) void type. */ #define VOID_TYPE_P(NODE) (TREE_CODE (NODE) == VOID_TYPE) @@ -918,9 +903,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define CALL_ALLOCA_FOR_VAR_P(NODE) \ (CALL_EXPR_CHECK (NODE)->base.protected_flag) -/* In a CALL_EXPR, means call was instrumented by Pointer Bounds Checker. */ -#define CALL_WITH_BOUNDS_P(NODE) (CALL_EXPR_CHECK (NODE)->base.deprecated_flag) - /* Used in classes in C++. */ #define TREE_PRIVATE(NODE) ((NODE)->base.private_flag) /* Used in classes in C++. */ @@ -3856,8 +3838,6 @@ tree_strip_any_location_wrapper (tree exp) #define COMPLEX_FLOATN_NX_TYPE_NODE(IDX) global_trees[TI_COMPLEX_FLOATN_NX_TYPE_FIRST + (IDX)] -#define pointer_bounds_type_node global_trees[TI_POINTER_BOUNDS_TYPE] - #define void_type_node global_trees[TI_VOID_TYPE] /* The C type `void *'. */ #define ptr_type_node global_trees[TI_PTR_TYPE] diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 16cdbd64f46..d50a179b27d 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. If not see #include "dumpfile.h" #include "builtins.h" #include "params.h" -#include "tree-chkp.h" /* In this file value profile based optimizations are placed. Currently the following optimizations are implemented (for more detailed descriptions @@ -1299,7 +1298,6 @@ gimple_ic (gcall *icall_stmt, struct cgraph_node *direct_call, gcall *dcall_stmt; gassign *load_stmt; gcond *cond_stmt; - gcall *iretbnd_stmt = NULL; tree tmp0, tmp1, tmp; basic_block cond_bb, dcall_bb, icall_bb, join_bb = NULL; tree optype = build_pointer_type (void_type_node); @@ -1308,14 +1306,10 @@ gimple_ic (gcall *icall_stmt, struct cgraph_node *direct_call, int lp_nr, dflags; edge e_eh, e; edge_iterator ei; - gimple_stmt_iterator psi; cond_bb = gimple_bb (icall_stmt); gsi = gsi_for_stmt (icall_stmt); - if (gimple_call_with_bounds_p (icall_stmt) && gimple_call_lhs (icall_stmt)) - iretbnd_stmt = chkp_retbnd_call_by_val (gimple_call_lhs (icall_stmt)); - tmp0 = make_temp_ssa_name (optype, NULL, "PROF"); tmp1 = make_temp_ssa_name (optype, NULL, "PROF"); tmp = unshare_expr (gimple_call_fn (icall_stmt)); @@ -1405,55 +1399,6 @@ gimple_ic (gcall *icall_stmt, struct cgraph_node *direct_call, gimple_call_set_lhs (dcall_stmt, duplicate_ssa_name (result, dcall_stmt)); add_phi_arg (phi, gimple_call_lhs (dcall_stmt), e_dj, UNKNOWN_LOCATION); - - /* If indirect call has following BUILT_IN_CHKP_BNDRET - call then we need to make it's copy for the direct - call. */ - if (iretbnd_stmt) - { - if (gimple_call_lhs (iretbnd_stmt)) - { - gimple *copy; - - if (TREE_CODE (gimple_vdef (iretbnd_stmt)) == SSA_NAME) - { - unlink_stmt_vdef (iretbnd_stmt); - release_ssa_name (gimple_vdef (iretbnd_stmt)); - } - gimple_set_vdef (iretbnd_stmt, NULL_TREE); - gimple_set_vuse (iretbnd_stmt, NULL_TREE); - update_stmt (iretbnd_stmt); - - result = gimple_call_lhs (iretbnd_stmt); - phi = create_phi_node (result, join_bb); - - copy = gimple_copy (iretbnd_stmt); - gimple_call_set_arg (copy, 0, - gimple_call_lhs (dcall_stmt)); - gimple_call_set_lhs (copy, duplicate_ssa_name (result, copy)); - gsi_insert_on_edge (e_dj, copy); - add_phi_arg (phi, gimple_call_lhs (copy), - e_dj, UNKNOWN_LOCATION); - - gimple_call_set_arg (iretbnd_stmt, 0, - gimple_call_lhs (icall_stmt)); - gimple_call_set_lhs (iretbnd_stmt, - duplicate_ssa_name (result, iretbnd_stmt)); - psi = gsi_for_stmt (iretbnd_stmt); - gsi_remove (&psi, false); - gsi_insert_on_edge (e_ij, iretbnd_stmt); - add_phi_arg (phi, gimple_call_lhs (iretbnd_stmt), - e_ij, UNKNOWN_LOCATION); - - gsi_commit_one_edge_insert (e_dj, NULL); - gsi_commit_one_edge_insert (e_ij, NULL); - } - else - { - psi = gsi_for_stmt (iretbnd_stmt); - gsi_remove (&psi, true); - } - } } /* Build an EH edge for the direct call if necessary. */ diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 16e1ea8f997..acd93e58edf 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -9898,8 +9898,7 @@ vt_add_function_parameters (void) for (parm = DECL_ARGUMENTS (current_function_decl); parm; parm = DECL_CHAIN (parm)) - if (!POINTER_BOUNDS_P (parm)) - vt_add_function_parameter (parm); + vt_add_function_parameter (parm); if (DECL_HAS_VALUE_EXPR_P (DECL_RESULT (current_function_decl))) { diff --git a/gcc/varasm.c b/gcc/varasm.c index 4d332f50270..5769bc6d63e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1377,10 +1377,6 @@ make_decl_rtl (tree decl) } id = DECL_ASSEMBLER_NAME (decl); - if (TREE_CODE (decl) == FUNCTION_DECL - && cgraph_node::get (decl) - && cgraph_node::get (decl)->instrumentation_clone) - ultimate_transparent_alias_target (&id); name = IDENTIFIER_POINTER (id); if (name[0] != '*' && TREE_CODE (decl) != FUNCTION_DECL @@ -1832,10 +1828,7 @@ assemble_start_function (tree decl, const char *fnname) /* Make function name accessible from other files, if appropriate. */ - if (TREE_PUBLIC (decl) - || (cgraph_node::get (decl)->instrumentation_clone - && cgraph_node::get (decl)->instrumented_version - && TREE_PUBLIC (cgraph_node::get (decl)->instrumented_version->decl))) + if (TREE_PUBLIC (decl)) { notice_global_symbol (decl); @@ -4912,7 +4905,6 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align, case REFERENCE_TYPE: case OFFSET_TYPE: case FIXED_POINT_TYPE: - case POINTER_BOUNDS_TYPE: case NULLPTR_TYPE: cst = expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_INITIALIZER); if (reverse) @@ -5821,11 +5813,6 @@ do_assemble_alias (tree decl, tree target) #ifdef ASM_OUTPUT_DEF tree orig_decl = decl; - if (TREE_CODE (decl) == FUNCTION_DECL - && cgraph_node::get (decl)->instrumentation_clone - && cgraph_node::get (decl)->instrumented_version) - orig_decl = cgraph_node::get (decl)->instrumented_version->decl; - /* Make name accessible from other files, if appropriate. */ if (TREE_PUBLIC (decl) || TREE_PUBLIC (orig_decl)) @@ -6150,13 +6137,6 @@ int maybe_assemble_visibility (tree decl) { enum symbol_visibility vis = DECL_VISIBILITY (decl); - - if (TREE_CODE (decl) == FUNCTION_DECL - && cgraph_node::get (decl) - && cgraph_node::get (decl)->instrumentation_clone - && cgraph_node::get (decl)->instrumented_version) - vis = DECL_VISIBILITY (cgraph_node::get (decl)->instrumented_version->decl); - if (vis != VISIBILITY_DEFAULT) { targetm.asm_out.assemble_visibility (decl, vis); diff --git a/gcc/varpool.c b/gcc/varpool.c index 418753cca2a..afba2deca14 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -400,12 +400,6 @@ ctor_for_folding (tree decl) if (!VAR_P (decl) && TREE_CODE (decl) != CONST_DECL) return error_mark_node; - /* Static constant bounds are created to be - used instead of constants and therefore - do not let folding it. */ - if (POINTER_BOUNDS_P (decl)) - return error_mark_node; - if (TREE_CODE (decl) == CONST_DECL || DECL_IN_CONSTANT_POOL (decl)) return DECL_INITIAL (decl); diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog deleted file mode 100644 index 4eab590b86c..00000000000 --- a/libmpx/ChangeLog +++ /dev/null @@ -1,199 +0,0 @@ -2018-04-24 H.J. Lu - - * configure: Regenerated. - -2018-04-19 Jakub Jelinek - - * configure: Regenerated. - -2018-04-18 David Malcolm - - PR jit/85384 - * configure: Regenerate. - -2018-02-14 Igor Tsimbalist - - PR target/84148 - * configure: Regenerate. - -2017-11-17 Igor Tsimbalist - - * Makefile.in: Regenerate. - * acinclude.m4: Add enable.m4 and cet.m4. - * configure: Regenerate. - * configure.ac: Set CET_FLAGS. Update XCFLAGS. - * mpxrt/Makefile.am: Update libmpx_la_CFLAGS. - * mpxrt/Makefile.in: Regenerate. - * mpxwrap/Makefile.am: Add AM_CFLAGS. Update - libmpxwrappers_la_CFLAGS. - * mpxwrap/Makefile.in: Regenerate. - -2017-01-30 Jakub Jelinek - - * mpxrt/mpxrt-utils.h (__mpxrt_stop): New prototype. - -2017-01-21 Jakub Jelinek - - PR other/79046 - * mpxrt/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead - of cat to get version from BASE-VER file. - * mpxwrap/Makefile.am (gcc_version): Likewise. - * mpxrt/Makefile.in: Regenerated. - * mpxwrap/Makefile.in: Regenerated. - -2017-01-19 Jakub Jelinek - - PR other/79046 - * aclocal.m4: Regenerated. - * configure: Regenerated. - * Makefile.in: Regenerated. - * mpxrt/Makefile.in: Regenerated. - * mpxwrap/Makefile.in: Regenerated. - -2017-01-17 Jakub Jelinek - - PR other/79046 - * configure.ac: Add GCC_BASE_VER. - * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to - get version from BASE-VER file. - * configure: Regenerated. - * Makefile.in: Regenerated. - -2016-12-27 H.J. Lu - Alexander Ivchenko - - * mpxwrap/libtool-version: New version. - * mpxwrap/mpx_wrappers.c (__mpx_wrapper_realloc): Make it - static with external alias. - (__mpx_wrapper_bzero): Ditto. - (mpx_wrapper_memcpy): Ditto. - (__mpx_wrapper_mempcpy): Ditto. - -2016-12-26 Alexander Ivchenko - - * mpxrt/libtool-version: New version. - * mpxrt/mpxrt-utils.c (set_mpx_rt_stop_handler): New function. - (print_help): Add help for CHKP_RT_STOP_HANDLER environment - variable. - (__mpxrt_init_env_vars): Add initialization of stop_handler. - (__mpxrt_stop_handler): New function. - (__mpxrt_stop): Ditto. - * mpxrt/mpxrt-utils.h (mpx_rt_stop_mode_handler_t): New enum. - * mpxrt/mpxrt.c (handler): Replace exit(255) with __mpxrt_stop - function call. - -2016-11-15 Matthias Klose - - * configure: Regenerate. - -2016-06-10 Ilya Enkovich - - * mpxwrap/mpx_wrappers.c (move_bounds): Fix overflow bug. - -2016-01-20 Matthias Klose - - * libtool-version: Remove. - -2016-01-20 Ilya Enkovich - - * mpxrt/mpxrt.c (handler): Fix verbosity for error message. - -2016-01-18 Jakub Jelinek - - * mpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Avoid - -Wdiscarded-qualifiers warning. Fix up formatting. - -2015-12-29 Tsvetkova Alexandra - - * libmpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Special - handling of one pointer copy. - -2015-12-11 Tsvetkova Alexandra - - * mpxrt/Makefile.am (libmpx_la_LDFLAGS): Add -version-info - option. - * libmpxwrap/Makefile.am (libmpx_la_LDFLAGS): Likewise and - fix include path. - * libmpx/Makefile.in: Regenerate. - * mpxrt/Makefile.in: Regenerate. - * libmpxwrap/Makefile.in: Regenerate. - * mpxrt/libtool-version: New version. - * libmpxwrap/libtool-version: Likewise. - * mpxrt/libmpx.map: Add new version and a new symbol. - * mpxrt/mpxrt.h: New file. - * mpxrt/mpxrt.c (NUM_L1_BITS): Moved to mpxrt.h. - (REG_IP_IDX): Moved to mpxrt.h. - (REX_PREFIX): Moved to mpxrt.h. - (XSAVE_OFFSET_IN_FPMEM): Moved to mpxrt.h. - (MPX_L1_SIZE): Moved to mpxrt.h. - * libmpxwrap/mpx_wrappers.c (mpx_pointer): New type. - (mpx_bt_entry): New type. - (alloc_bt): New function. - (get_bt): New function. - (copy_if_possible): New function. - (copy_if_possible_from_end): New function. - (move_bounds): New function. - (__mpx_wrapper_memmove): Use move_bounds to copy bounds. - -2015-10-15 Ilya Enkovich - - PR other/66887 - * mpxrt/mpxrt.c (read_mpx_status_sig): Remove useless code. - -2015-07-16 Ilya Enkovich - - * configure.ac: Remove link_mpx. - * libmpx.spec.in: Likewise. - * configure: Regenerate. - -2015-05-13 Michael Haubenwallner - - * Makefile.in: Regenerated with automake-1.11.6. - * aclocal.m4: Likewise. - * configure: Likewise. - * mpxrt/Makefile.in: Likewise. - * mpxwrap/Makefile.in: Likewise. - -2015-04-27 Steven Noonan - - * configure.ac: Drop AC_PROG_CXX and friends, since libmpx has no C++ - sources. - * configure: Regenerate. - -2015-04-09 Ilya Enkovich - - * mpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Add - zero length check. - -2015-04-02 Ilya Enkovich - - PR driver/65444 - * configure.ac: Add check for '-z bndplt' support - by linker. Add link_mpx output variable. - * libmpx.spec.in (link_mpx): New. - * configure: Regenerate. - -2015-03-12 Ilya Enkovich - - PR other/65384 - * configure.ac: Fix x32 test. - * configure: Regenerate. - -2015-03-10 Ilya Enkovich - - * Makefile.am (SUBDIRS): Add mpxwrap when used - AS supports MPX. - (MAKEOVERRIDES): New. - * Makefile.in: Regenerate. - * configure.ac: Check AS supports MPX. Add - mpxintr/Makefile to config files. - * configure: Regenerate. - * mpxwrap/Makefile.am: New. - * mpxwrap/Makefile.in: New. - * mpxwrap/libtool-version: New. - * mpxwrap/mpx_wrappers.cc: New. - * mpxwrap/libmpxwrappers.map: New. - -2015-03-10 Ilya Enkovich - - Initial commit. diff --git a/libmpx/Makefile.am b/libmpx/Makefile.am deleted file mode 100644 index 9ec6ec7db61..00000000000 --- a/libmpx/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -ACLOCAL_AMFLAGS = -I .. -I ../config - -if LIBMPX_SUPPORTED -SUBDIRS = mpxrt -if MPX_AS_SUPPORTED -SUBDIRS += mpxwrap -endif -nodist_toolexeclib_HEADERS = libmpx.spec -endif - -## May be used by toolexeclibdir. -gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = diff --git a/libmpx/Makefile.in b/libmpx/Makefile.in deleted file mode 100644 index 358956c917b..00000000000 --- a/libmpx/Makefile.in +++ /dev/null @@ -1,672 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@LIBMPX_SUPPORTED_TRUE@@MPX_AS_SUPPORTED_TRUE@am__append_1 = mpxwrap -subdir = . -DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \ - $(srcdir)/libmpx.spec.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ - $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/multi.m4 \ - $(top_srcdir)/../config/override.m4 \ - $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ - $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \ - $(top_srcdir)/../config/enable.m4 \ - $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libmpx.spec -CONFIG_CLEAN_VPATH_FILES = -depcomp = -am__depfiles_maybe = -SOURCES = -MULTISRCTOP = -MULTIBUILDTOP = -MULTIDIRS = -MULTISUBDIR = -MULTIDO = true -MULTICLEAN = true -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(toolexeclibdir)" -HEADERS = $(nodist_toolexeclib_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = mpxrt mpxwrap -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XCFLAGS = @XCFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -get_gcc_base_ver = @get_gcc_base_ver@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -link_libmpx = @link_libmpx@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -multi_basedir = @multi_basedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -toolexecdir = @toolexecdir@ -toolexeclibdir = @toolexeclibdir@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -ACLOCAL_AMFLAGS = -I .. -I ../config -@LIBMPX_SUPPORTED_TRUE@SUBDIRS = mpxrt $(am__append_1) -@LIBMPX_SUPPORTED_TRUE@nodist_toolexeclib_HEADERS = libmpx.spec -gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign --ignore-deps Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -libmpx.spec: $(top_builddir)/config.status $(srcdir)/libmpx.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# GNU Make needs to see an explicit $(MAKE) variable in the command it -# runs to enable its job server during parallel builds. Hence the -# comments below. -all-multi: - $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE) -install-multi: - $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE) - -mostlyclean-multi: - $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE) -clean-multi: - $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE) -distclean-multi: - $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE) -maintainer-clean-multi: - $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE) -install-nodist_toolexeclibHEADERS: $(nodist_toolexeclib_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(toolexeclibdir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(toolexeclibdir)" || exit $$?; \ - done - -uninstall-nodist_toolexeclibHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(toolexeclibdir)'; $(am__uninstall_files_from_dir) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: all-am -check: check-recursive -all-am: Makefile all-multi $(HEADERS) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-multi clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-multi distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-multi install-nodist_toolexeclibHEADERS - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-multi maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-multi mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-nodist_toolexeclibHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all all-multi \ - clean-multi ctags-recursive distclean-multi install-am \ - install-multi install-strip maintainer-clean-multi \ - mostlyclean-multi tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-multi am--refresh check check-am clean \ - clean-generic clean-libtool clean-multi ctags ctags-recursive \ - distclean distclean-generic distclean-hdr distclean-libtool \ - distclean-multi distclean-tags dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-multi install-nodist_toolexeclibHEADERS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-multi mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-multi pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am \ - uninstall-nodist_toolexeclibHEADERS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libmpx/acinclude.m4 b/libmpx/acinclude.m4 deleted file mode 100644 index c432ae660a1..00000000000 --- a/libmpx/acinclude.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl ---------------------------------------------------------------------- -dnl This whole bit snagged from libgfortran. - -sinclude(../libtool.m4) -sinclude(../config/enable.m4) -sinclude(../config/cet.m4) -dnl The lines below arrange for aclocal not to bring an installed -dnl libtool.m4 into aclocal.m4, while still arranging for automake to -dnl add a definition of LIBTOOL to Makefile.in. -ifelse(,,,[AC_SUBST(LIBTOOL) -AC_DEFUN([AM_PROG_LIBTOOL]) -AC_DEFUN([AC_LIBTOOL_DLOPEN]) -AC_DEFUN([AC_PROG_LD]) -]) diff --git a/libmpx/aclocal.m4 b/libmpx/aclocal.m4 deleted file mode 100644 index 886b71f9a17..00000000000 --- a/libmpx/aclocal.m4 +++ /dev/null @@ -1,716 +0,0 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([../config/acx.m4]) -m4_include([../config/lead-dot.m4]) -m4_include([../config/multi.m4]) -m4_include([../config/override.m4]) -m4_include([../ltoptions.m4]) -m4_include([../ltsugar.m4]) -m4_include([../ltversion.m4]) -m4_include([../lt~obsolete.m4]) -m4_include([acinclude.m4]) diff --git a/libmpx/config.h.in b/libmpx/config.h.in deleted file mode 100644 index a318e020338..00000000000 --- a/libmpx/config.h.in +++ /dev/null @@ -1,100 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `secure_getenv' function. */ -#undef HAVE_SECURE_GETENV - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE diff --git a/libmpx/configure b/libmpx/configure deleted file mode 100644 index 70856596425..00000000000 --- a/libmpx/configure +++ /dev/null @@ -1,13979 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for package-unused version-unused. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and libmpx about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='package-unused' -PACKAGE_TARNAME='package-unused' -PACKAGE_VERSION='version-unused' -PACKAGE_STRING='package-unused version-unused' -PACKAGE_BUGREPORT='libmpx' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -get_gcc_base_ver -XCFLAGS -enable_static -enable_shared -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -MPX_AS_SUPPORTED_FALSE -MPX_AS_SUPPORTED_TRUE -RANLIB -AR -AS -CCASFLAGS -CCAS -toolexeclibdir -toolexecdir -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -multi_basedir -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -link_libmpx -LIBMPX_SUPPORTED_FALSE -LIBMPX_SUPPORTED_TRUE -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_version_specific_runtime_libs -enable_multilib -enable_maintainer_mode -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -enable_cet -with_gcc_major_version_only -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures package-unused version-unused to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/package-unused] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of package-unused version-unused:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory - --enable-multilib build many library versions (default) - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-cet enable Intel CET in target libraries [default=no] - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gcc-major-version-only - use only GCC major number in filesystem paths - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -package-unused configure version-unused -generated by GNU Autoconf 2.64 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## --------------------- ## -## Report this to libmpx ## -## --------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by package-unused $as_me version-unused, which was -generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - -# ------- -# Options -# ------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5 -$as_echo_n "checking for --enable-version-specific-runtime-libs... " >&6; } -# Check whether --enable-version-specific-runtime-libs was given. -if test "${enable_version_specific_runtime_libs+set}" = set; then : - enableval=$enable_version_specific_runtime_libs; case "$enableval" in - yes) version_specific_libs=yes ;; - no) version_specific_libs=no ;; - *) as_fn_error "Unknown argument to enable/disable version-specific libs" "$LINENO" 5;; - esac -else - version_specific_libs=no -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5 -$as_echo "$version_specific_libs" >&6; } - -# Do not delete or change the following two lines. For why, see -# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -target_alias=${target_alias-$host_alias} - - -# See if supported. -unset LIBMPX_SUPPORTED -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target support for Intel MPX runtime library" >&5 -$as_echo_n "checking for target support for Intel MPX runtime library... " >&6; } -echo "int i[sizeof (void *) == 4 ? 1 : -1] = { __x86_64__ };" > conftest.c -if { ac_try='${CC} ${CFLAGS} -c -o conftest.o conftest.c 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then - LIBMPX_SUPPORTED=no -else - LIBMPX_SUPPORTED=yes -fi -rm -f conftest.o conftest.c -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPX_SUPPORTED" >&5 -$as_echo "$LIBMPX_SUPPORTED" >&6; } - if test "x$LIBMPX_SUPPORTED" = "xyes"; then - LIBMPX_SUPPORTED_TRUE= - LIBMPX_SUPPORTED_FALSE='#' -else - LIBMPX_SUPPORTED_TRUE='#' - LIBMPX_SUPPORTED_FALSE= -fi - - -link_libmpx="-lpthread" - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='package-unused' - VERSION='version-unused' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - -# Default to --enable-multilib -# Check whether --enable-multilib was given. -if test "${enable_multilib+set}" = set; then : - enableval=$enable_multilib; case "$enableval" in - yes) multilib=yes ;; - no) multilib=no ;; - *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; - esac -else - multilib=yes -fi - - -# We may get other options which we leave undocumented: -# --with-target-subdir, --with-multisrctop, --with-multisubdir -# See config-ml.in if you want the gory details. - -if test "$srcdir" = "."; then - if test "$with_target_subdir" != "."; then - multi_basedir="$srcdir/$with_multisrctop../.." - else - multi_basedir="$srcdir/$with_multisrctop.." - fi -else - multi_basedir="$srcdir/.." -fi - - -# Even if the default multilib is not a cross compilation, -# it may be that some of the other multilibs are. -if test $cross_compiling = no && test $multilib = yes \ - && test "x${with_multisubdir}" != x ; then - cross_compiling=maybe -fi - -ac_config_commands="$ac_config_commands default-1" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -fi -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - -for ac_func in secure_getenv -do : - ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv" -if test "x$ac_cv_func_secure_getenv" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SECURE_GETENV 1 -_ACEOF - -fi -done - - -# Calculate toolexeclibdir -# Also toolexecdir, though it's only used in toolexeclibdir -case ${version_specific_libs} in - yes) - # Need the gcc compiler version to know where to install libraries - # and header files if --enable-version-specific-runtime-libs option - # is selected. - toolexecdir='$(libdir)/gcc/$(target_alias)' - toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' - ;; - no) - if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - # Install a library built with a cross compiler in tooldir, not libdir. - toolexecdir='$(exec_prefix)/$(target_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi - multi_os_directory=`$CC -print-multi-os-directory` - case $multi_os_directory in - .) ;; # Avoid trailing /. - *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; - esac - ;; -esac - - - -# Check for programs. - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - - - - -# Newer automakes demand CCAS and CCASFLAGS. -: ${CCAS='$(CC)'} -: ${CCASFLAGS='$(CFLAGS)'} - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -# Check we may build wrappers library -echo "test: bndmov %bnd0, %bnd1" > conftest.s -if { ac_try='$AS -o conftest.o conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then - mpx_as=yes -else - mpx_as=no - echo "configure: no MPX support fo as" >&5 -fi -rm -f conftest.o conftest.s - if test "x$mpx_as" = "xyes"; then - MPX_AS_SUPPORTED_TRUE= - MPX_AS_SUPPORTED_FALSE='#' -else - MPX_AS_SUPPORTED_TRUE='#' - MPX_AS_SUPPORTED_FALSE= -fi - - -# Configure libtool -enable_dlopen=yes - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.7a' -macro_revision='1.3134' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11239 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11345 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - -XCFLAGS="-Wall -Wextra" -# Add CET specific flags if CET is enabled - # Check whether --enable-cet was given. -if test "${enable_cet+set}" = set; then : - enableval=$enable_cet; - case "$enableval" in - yes|no|auto) ;; - *) as_fn_error "Unknown argument to enable/disable cet" "$LINENO" 5 ;; - esac - -else - enable_cet=no -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 -$as_echo_n "checking for CET support... " >&6; } - -case "$host" in - i[34567]86-*-linux* | x86_64-*-linux*) - case "$enable_cet" in - auto) - # Check if target supports multi-byte NOPs - # and if assembler supports CET insn. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !defined(__SSE2__) -#error target does not support multi-byte NOPs -#else -asm ("setssbsy"); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - enable_cet=yes -else - enable_cet=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; - yes) - # Check if assembler supports CET. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -asm ("setssbsy"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - as_fn_error "assembler with CET support is required for --enable-cet" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; - esac - ;; - *) - enable_cet=no - ;; -esac -if test x$enable_cet = xyes; then - CET_FLAGS="-fcf-protection -mshstk" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -XCFLAGS="$XCFLAGS $CET_FLAGS" - - - -if test "${multilib}" = "yes"; then - multilib_arg="--enable-multilib" -else - multilib_arg= -fi - -# Determine what GCC version number to use in filesystem paths. - - get_gcc_base_ver="cat" - -# Check whether --with-gcc-major-version-only was given. -if test "${with_gcc_major_version_only+set}" = set; then : - withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then - get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'" - fi - -fi - - - - -ac_config_files="$ac_config_files Makefile libmpx.spec" - -ac_config_headers="$ac_config_headers config.h" - -ac_config_files="$ac_config_files mpxrt/Makefile mpxwrap/Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${LIBMPX_SUPPORTED_TRUE}" && test -z "${LIBMPX_SUPPORTED_FALSE}"; then - as_fn_error "conditional \"LIBMPX_SUPPORTED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MPX_AS_SUPPORTED_TRUE}" && test -z "${MPX_AS_SUPPORTED_FALSE}"; then - as_fn_error "conditional \"MPX_AS_SUPPORTED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by package-unused $as_me version-unused, which was -generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -package-unused config.status version-unused -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# - -srcdir="$srcdir" -host="$host" -target="$target" -with_multisubdir="$with_multisubdir" -with_multisrctop="$with_multisrctop" -with_target_subdir="$with_target_subdir" -ac_configure_args="${multilib_arg} ${ac_configure_args}" -multi_basedir="$multi_basedir" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -CC="$CC" -CXX="$CXX" -GFORTRAN="$GFORTRAN" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libmpx.spec") CONFIG_FILES="$CONFIG_FILES libmpx.spec" ;; - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "mpxrt/Makefile") CONFIG_FILES="$CONFIG_FILES mpxrt/Makefile" ;; - "mpxwrap/Makefile") CONFIG_FILES="$CONFIG_FILES mpxwrap/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "default-1":C) -# Only add multilib support code if we just rebuilt the top-level -# Makefile. -case " $CONFIG_FILES " in - *" Makefile "*) - ac_file=Makefile . ${multi_basedir}/config-ml.in - ;; -esac ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "mpxrt/Makefile":F) cat > vpsed$$ << \_EOF -s!`test -f '$<' || echo '$(srcdir)/'`!! -_EOF - sed -f vpsed$$ $ac_file > tmp$$ - mv tmp$$ $ac_file - rm vpsed$$ - echo 'MULTISUBDIR =' >> $ac_file - ml_norecursion=yes - . ${multi_basedir}/config-ml.in - { ml_norecursion=; unset ml_norecursion;} - ;; - "mpxwrap/Makefile":F) cat > vpsed$$ << \_EOF -s!`test -f '$<' || echo '$(srcdir)/'`!! -_EOF - sed -f vpsed$$ $ac_file > tmp$$ - mv tmp$$ $ac_file - rm vpsed$$ - echo 'MULTISUBDIR =' >> $ac_file - ml_norecursion=yes - . ${multi_basedir}/config-ml.in - { ml_norecursion=; unset ml_norecursion;} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/libmpx/configure.ac b/libmpx/configure.ac deleted file mode 100644 index dc0c2a83809..00000000000 --- a/libmpx/configure.ac +++ /dev/null @@ -1,150 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.64]) -AC_INIT(package-unused, version-unused, libmpx) - -# ------- -# Options -# ------- -AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) -AC_ARG_ENABLE(version-specific-runtime-libs, -[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], -[case "$enableval" in - yes) version_specific_libs=yes ;; - no) version_specific_libs=no ;; - *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; - esac], -[version_specific_libs=no]) -AC_MSG_RESULT($version_specific_libs) - -# Do not delete or change the following two lines. For why, see -# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html -AC_CANONICAL_SYSTEM -target_alias=${target_alias-$host_alias} -AC_SUBST(target_alias) - -# See if supported. -unset LIBMPX_SUPPORTED -AC_MSG_CHECKING([for target support for Intel MPX runtime library]) -echo "int i[[sizeof (void *) == 4 ? 1 : -1]] = { __x86_64__ };" > conftest.c -if AC_TRY_COMMAND([${CC} ${CFLAGS} -c -o conftest.o conftest.c 1>&AS_MESSAGE_LOG_FD]) -then - LIBMPX_SUPPORTED=no -else - LIBMPX_SUPPORTED=yes -fi -rm -f conftest.o conftest.c -AC_MSG_RESULT($LIBMPX_SUPPORTED) -AM_CONDITIONAL(LIBMPX_SUPPORTED, [test "x$LIBMPX_SUPPORTED" = "xyes"]) - -link_libmpx="-lpthread" -AC_SUBST(link_libmpx) - -AM_INIT_AUTOMAKE(foreign no-dist no-dependencies) -AM_ENABLE_MULTILIB(, ..) -AM_MAINTAINER_MODE - -AC_GNU_SOURCE -AC_CHECK_FUNCS([secure_getenv]) - -# Calculate toolexeclibdir -# Also toolexecdir, though it's only used in toolexeclibdir -case ${version_specific_libs} in - yes) - # Need the gcc compiler version to know where to install libraries - # and header files if --enable-version-specific-runtime-libs option - # is selected. - toolexecdir='$(libdir)/gcc/$(target_alias)' - toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' - ;; - no) - if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - # Install a library built with a cross compiler in tooldir, not libdir. - toolexecdir='$(exec_prefix)/$(target_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi - multi_os_directory=`$CC -print-multi-os-directory` - case $multi_os_directory in - .) ;; # Avoid trailing /. - *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; - esac - ;; -esac -AC_SUBST(toolexecdir) -AC_SUBST(toolexeclibdir) - -# Check for programs. -m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS]) -m4_define([_AC_ARG_VAR_PRECIOUS],[]) -AC_PROG_CC -m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) - -AM_PROG_CC_C_O - -AC_SUBST(CFLAGS) - -# Newer automakes demand CCAS and CCASFLAGS. -: ${CCAS='$(CC)'} -: ${CCASFLAGS='$(CFLAGS)'} -AC_SUBST(CCAS) -AC_SUBST(CCASFLAGS) - -AC_CHECK_TOOL(AS, as) -AC_CHECK_TOOL(AR, ar) -AC_CHECK_TOOL(RANLIB, ranlib, :) - -# Check we may build wrappers library -echo "test: bndmov %bnd0, %bnd1" > conftest.s -if AC_TRY_COMMAND([$AS -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD]) -then - mpx_as=yes -else - mpx_as=no - echo "configure: no MPX support fo as" >&AS_MESSAGE_LOG_FD -fi -rm -f conftest.o conftest.s -AM_CONDITIONAL(MPX_AS_SUPPORTED, [test "x$mpx_as" = "xyes"]) - -# Configure libtool -AC_LIBTOOL_DLOPEN -AM_PROG_LIBTOOL -AC_SUBST(enable_shared) -AC_SUBST(enable_static) - -XCFLAGS="-Wall -Wextra" -# Add CET specific flags if CET is enabled -GCC_CET_FLAGS(CET_FLAGS) -XCFLAGS="$XCFLAGS $CET_FLAGS" - -AC_SUBST(XCFLAGS) - -if test "${multilib}" = "yes"; then - multilib_arg="--enable-multilib" -else - multilib_arg= -fi - -# Determine what GCC version number to use in filesystem paths. -GCC_BASE_VER - -AC_CONFIG_FILES([Makefile libmpx.spec]) -AC_CONFIG_HEADERS(config.h) -AC_CONFIG_FILES(AC_FOREACH([DIR], [mpxrt mpxwrap], [DIR/Makefile ]), - [cat > vpsed$$ << \_EOF -s!`test -f '$<' || echo '$(srcdir)/'`!! -_EOF - sed -f vpsed$$ $ac_file > tmp$$ - mv tmp$$ $ac_file - rm vpsed$$ - echo 'MULTISUBDIR =' >> $ac_file - ml_norecursion=yes - . ${multi_basedir}/config-ml.in - AS_UNSET([ml_norecursion]) -]) - -AC_OUTPUT diff --git a/libmpx/configure.tgt b/libmpx/configure.tgt deleted file mode 100644 index 5060b7e8122..00000000000 --- a/libmpx/configure.tgt +++ /dev/null @@ -1,29 +0,0 @@ -# -*- shell-script -*- -# Copyright (C) 2014 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not see . - -# This is the target specific configuration file. This is invoked by the -# autoconf generated configure script. Putting it in a separate shell file -# lets us skip running autoconf when modifying target specific information. - -# Filter out unsupported systems. -LIBMPX_SUPPORTED=no -case "${target}" in - x86_64-*-linux* | i?86-*-linux*) - LIBMPX_SUPPORTED=yes - ;; - *) - ;; -esac diff --git a/libmpx/libmpx.spec.in b/libmpx/libmpx.spec.in deleted file mode 100644 index a80bba71123..00000000000 --- a/libmpx/libmpx.spec.in +++ /dev/null @@ -1,3 +0,0 @@ -# This spec file is read by gcc when linking. It is used to specify the -# standard libraries we need in order to link with libmpx. -*link_libmpx: @link_libmpx@ diff --git a/libmpx/mpxrt/Makefile.am b/libmpx/mpxrt/Makefile.am deleted file mode 100644 index 0dd0bed4e23..00000000000 --- a/libmpx/mpxrt/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config - -if LIBMPX_SUPPORTED -# May be used by toolexeclibdir. -gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) - -AM_CPPFLAGS = -I$(top_srcdir)/.. -AM_CFLAGS = $(XCFLAGS) - -toolexeclib_LTLIBRARIES = libmpx.la - -libmpx_la_SOURCES = mpxrt.c mpxrt-utils.c - -libmpx_la_CFLAGS = -fPIC $(XCFLAGS) -libmpx_la_DEPENDENCIES = libmpx.map -libmpx_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmpx.map $(link_libmpx) \ - -version-info `grep -v '^\#' $(srcdir)/libtool-version` - -mpxrt.lo: mpxrt-utils.h -mpxrt-utils.lo: mpxrt-utils.h -endif - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES= diff --git a/libmpx/mpxrt/Makefile.in b/libmpx/mpxrt/Makefile.in deleted file mode 100644 index 17e0ac52b04..00000000000 --- a/libmpx/mpxrt/Makefile.in +++ /dev/null @@ -1,580 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = mpxrt -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ - $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/multi.m4 \ - $(top_srcdir)/../config/override.m4 \ - $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ - $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \ - $(top_srcdir)/../config/enable.m4 \ - $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(toolexeclibdir)" -LTLIBRARIES = $(toolexeclib_LTLIBRARIES) -libmpx_la_LIBADD = -@LIBMPX_SUPPORTED_TRUE@am_libmpx_la_OBJECTS = libmpx_la-mpxrt.lo \ -@LIBMPX_SUPPORTED_TRUE@ libmpx_la-mpxrt-utils.lo -libmpx_la_OBJECTS = $(am_libmpx_la_OBJECTS) -libmpx_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmpx_la_CFLAGS) \ - $(CFLAGS) $(libmpx_la_LDFLAGS) $(LDFLAGS) -o $@ -@LIBMPX_SUPPORTED_TRUE@am_libmpx_la_rpath = -rpath $(toolexeclibdir) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libmpx_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XCFLAGS = @XCFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -get_gcc_base_ver = @get_gcc_base_ver@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -link_libmpx = @link_libmpx@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -multi_basedir = @multi_basedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -toolexecdir = @toolexecdir@ -toolexeclibdir = @toolexeclibdir@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config - -# May be used by toolexeclibdir. -@LIBMPX_SUPPORTED_TRUE@gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) -@LIBMPX_SUPPORTED_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/.. -@LIBMPX_SUPPORTED_TRUE@AM_CFLAGS = $(XCFLAGS) -@LIBMPX_SUPPORTED_TRUE@toolexeclib_LTLIBRARIES = libmpx.la -@LIBMPX_SUPPORTED_TRUE@libmpx_la_SOURCES = mpxrt.c mpxrt-utils.c -@LIBMPX_SUPPORTED_TRUE@libmpx_la_CFLAGS = -fPIC $(XCFLAGS) -@LIBMPX_SUPPORTED_TRUE@libmpx_la_DEPENDENCIES = libmpx.map -@LIBMPX_SUPPORTED_TRUE@libmpx_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmpx.map $(link_libmpx) \ -@LIBMPX_SUPPORTED_TRUE@ -version-info `grep -v '^\#' $(srcdir)/libtool-version` - - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps mpxrt/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign --ignore-deps mpxrt/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ - } - -uninstall-toolexeclibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$f"; \ - done - -clean-toolexeclibLTLIBRARIES: - -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES) - @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libmpx.la: $(libmpx_la_OBJECTS) $(libmpx_la_DEPENDENCIES) $(EXTRA_libmpx_la_DEPENDENCIES) - $(libmpx_la_LINK) $(am_libmpx_la_rpath) $(libmpx_la_OBJECTS) $(libmpx_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -libmpx_la-mpxrt.lo: mpxrt.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpx_la_CFLAGS) $(CFLAGS) -c -o libmpx_la-mpxrt.lo `test -f 'mpxrt.c' || echo '$(srcdir)/'`mpxrt.c - -libmpx_la-mpxrt-utils.lo: mpxrt-utils.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpx_la_CFLAGS) $(CFLAGS) -c -o libmpx_la-mpxrt-utils.lo `test -f 'mpxrt-utils.c' || echo '$(srcdir)/'`mpxrt-utils.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-toolexeclibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-toolexeclibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-toolexeclibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-toolexeclibLTLIBRARIES installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-toolexeclibLTLIBRARIES - - -@LIBMPX_SUPPORTED_TRUE@mpxrt.lo: mpxrt-utils.h -@LIBMPX_SUPPORTED_TRUE@mpxrt-utils.lo: mpxrt-utils.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libmpx/mpxrt/libmpx.map b/libmpx/mpxrt/libmpx.map deleted file mode 100644 index 1f0fc2c4ce7..00000000000 --- a/libmpx/mpxrt/libmpx.map +++ /dev/null @@ -1,10 +0,0 @@ -LIBMPX_1.0 -{ - local: - *; -}; -LIBMPX_2.0 -{ - global: - get_bd; -} LIBMPX_1.0; diff --git a/libmpx/mpxrt/libtool-version b/libmpx/mpxrt/libtool-version deleted file mode 100644 index 736d763e605..00000000000 --- a/libmpx/mpxrt/libtool-version +++ /dev/null @@ -1,6 +0,0 @@ -# This file is used to maintain libtool version info for libmpx. See -# the libtool manual to understand the meaning of the fields. This is -# a separate file so that version updates don't involve re-running -# automake. -# CURRENT:REVISION:AGE -2:1:0 diff --git a/libmpx/mpxrt/mpxrt-utils.c b/libmpx/mpxrt/mpxrt-utils.c deleted file mode 100644 index 63ee7c6ae63..00000000000 --- a/libmpx/mpxrt/mpxrt-utils.c +++ /dev/null @@ -1,551 +0,0 @@ -/* mpxrt-utils.c -*-C++-*- - * - ************************************************************************* - * - * @copyright - * Copyright (C) 2014, Intel Corporation - * All rights reserved. - * - * @copyright - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * @copyright - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY - * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -#define __STDC_FORMAT_MACROS -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "mpxrt-utils.h" - -#ifndef HAVE_SECURE_GETENV -#define secure_getenv __secure_getenv -#endif - -#define MPX_RT_OUT "CHKP_RT_OUT_FILE" -#define MPX_RT_ERR "CHKP_RT_ERR_FILE" -#define MPX_RT_VERBOSE "CHKP_RT_VERBOSE" -#define MPX_RT_VERBOSE_DEFAULT VERB_BR -#define MPX_RT_MODE "CHKP_RT_MODE" -#define MPX_RT_MODE_DEFAULT MPX_RT_COUNT -#define MPX_RT_MODE_DEFAULT_STR "count" -#define MPX_RT_STOP_HANDLER "CHKP_RT_STOP_HANDLER" -#define MPX_RT_STOP_HANDLER_DEFAULT MPX_RT_STOP_HANDLER_ABORT -#define MPX_RT_STOP_HANDLER_DEFAULT_STR "abort" -#define MPX_RT_HELP "CHKP_RT_HELP" -#define MPX_RT_ADDPID "CHKP_RT_ADDPID" -#define MPX_RT_BNDPRESERVE "CHKP_RT_BNDPRESERVE" -#define MPX_RT_BNDPRESERVE_DEFAULT 0 -#define MPX_RT_PRINT_SUMMARY "CHKP_RT_PRINT_SUMMARY" - -#define MAX_FILE_NAME PATH_MAX - -typedef struct env_var_s { - char *env_name; - char *env_val; - struct env_var_s *next; -} env_var_t; - -typedef struct { - env_var_t *first; - env_var_t *last; -} env_var_list_t; - -/* Following vars are initialized at process startup only - and thus are considered to be thread safe. */ -static int summary; -static int add_pid; -static mpx_rt_mode_t mode; -static mpx_rt_stop_mode_handler_t stop_handler; -static env_var_list_t env_var_list; -static verbose_type verbose_val; -static FILE *out; -static FILE *err; -static char out_name[MAX_FILE_NAME]; -static char err_name[MAX_FILE_NAME]; - -/* Following vars are read at process finalization only. - All write accesses use the same value and thus are - considered to be thread safe. */ -static int out_file_dirty; -static int err_file_dirty; -static int files_overwritten; - -/* Mutex used to sync output. */ -static pthread_mutex_t lock; - -static void * -malloc_check (size_t size) -{ - void *res = malloc (size); - if (!res) - __mpxrt_print (VERB_ERROR, "Couldn't allocate %zu bytes.", size); - else - memset (res, 0, size); - return res; -} - -static void -env_var_list_add (const char* env, const char* val) -{ - env_var_t* n; - - if (val == 0) - return; - - n = (env_var_t *)malloc_check (sizeof (env_var_t)); - if (!n) - return; - - if (env_var_list.first == 0) - env_var_list.first = n; - - if (env_var_list.last) - env_var_list.last->next = n; - - env_var_list.last = n; - - n->env_name = (char *)malloc_check (strlen (env) + 1); - n->env_val = (char *)malloc_check (strlen (val) + 1); - - if (!n->env_name || !n->env_val) - return; - - strcpy (n->env_name, env); - strcpy (n->env_val, val); -} - -static void -set_file_stream (FILE** file, char* file_name, - const char* env, FILE* deflt) -{ - int pid; - if (env != 0) - { - if (add_pid) - { - pid = getpid (); - snprintf (file_name, MAX_FILE_NAME, "%s.%d", env, pid); - } - else - snprintf (file_name, MAX_FILE_NAME, "%s", env); - - *file = fopen (file_name, "we"); - if (*file != 0) - return; - } - *file = deflt; -} - -/* - * this function will be called after fork in the child - * open new files with pid of the process - */ -static void -open_child_files () -{ - char *out_env; - char *err_env; - - out_env = secure_getenv (MPX_RT_OUT); - err_env = secure_getenv (MPX_RT_ERR); - - if (add_pid == 0 && (out_env != 0 || err_env != 0)) - { - __mpxrt_print (VERB_ERROR, "MPX RUNTIME WARNING: out/err files are " - "overwritten in new processes since %s was not set.\n", - MPX_RT_ADDPID); - files_overwritten = 1; - } - - set_file_stream (&out, out_name, out_env, stdout); - if (out_env == 0 || err_env == 0 || (strcmp (out_env, err_env) != 0)) - set_file_stream (&err, err_name, err_env, stderr); - else - /* in case we get the same file name for err and out */ - err = out; -} - -/* - * this function is called after fork in the parent - */ -static void -at_fork_check (void) -{ - char *out_env; - char *err_env; - - out_env = secure_getenv (MPX_RT_OUT); - err_env = secure_getenv (MPX_RT_ERR); - - if (add_pid == 0 && (out_env != 0 || err_env != 0)) - files_overwritten = 1; -} - -static mpx_rt_mode_t -set_mpx_rt_mode (const char *env) -{ - if (env == 0) - return MPX_RT_MODE_DEFAULT; - else if (strcmp (env, "stop") == 0) - return MPX_RT_STOP; - else if (strcmp (env,"count") == 0) - return MPX_RT_COUNT; - { - __mpxrt_print (VERB_ERROR, "Illegal value '%s' for %s. Legal values are" - "[stop | count]\nUsing default value %s\n", - env, MPX_RT_MODE, MPX_RT_MODE_DEFAULT_STR); - return MPX_RT_MODE_DEFAULT; - } -} - -static mpx_rt_stop_mode_handler_t -set_mpx_rt_stop_handler (const char *env) -{ - if (env == 0) - return MPX_RT_STOP_HANDLER_DEFAULT; - else if (strcmp (env, "abort") == 0) - return MPX_RT_STOP_HANDLER_ABORT; - else if (strcmp (env, "exit") == 0) - return MPX_RT_STOP_HANDLER_EXIT; - { - __mpxrt_print (VERB_ERROR, "Illegal value '%s' for %s. Legal values are" - "[abort | exit]\nUsing default value %s\n", - env, MPX_RT_STOP_HANDLER, MPX_RT_STOP_HANDLER_DEFAULT); - return MPX_RT_STOP_HANDLER_DEFAULT; - } -} - -static void -print_help (void) -{ - fprintf (out, "MPX Runtime environment variables help.\n"); - - fprintf (out, "%s \t set output file for info & debug [default: stdout]\n", - MPX_RT_OUT); - fprintf (out, "%s \t set output file for error [default: stderr]\n", - MPX_RT_ERR); - fprintf (out, "%s \t set verbosity type [default: %d]\n" - "\t\t\t 0 - print only internal run time errors\n" - "\t\t\t 1 - just print summary\n" - "\t\t\t 2 - print summary and bound violation information\n " - "\t\t\t 3 - print debug information\n", - MPX_RT_VERBOSE, MPX_RT_VERBOSE_DEFAULT); - fprintf (out, "%s \t\t set MPX runtime behavior on #BR exception." - " [stop | count]\n" - "\t\t\t [default: %s]\n", MPX_RT_MODE, MPX_RT_MODE_DEFAULT_STR); - fprintf (out, "%s \t set the handler function MPX runtime will call\n" - "\t\t\t on #BR exception when %s is set to \'stop\'." - " [abort | exit]\n" - "\t\t\t [default: %s]\n", MPX_RT_STOP_HANDLER, MPX_RT_MODE, - MPX_RT_STOP_HANDLER_DEFAULT_STR); - fprintf (out, "%s \t\t generate out,err file for each process.\n" - "\t\t\t generated file will be MPX_RT_{OUT,ERR}_FILE.pid\n" - "\t\t\t [default: no]\n", MPX_RT_ADDPID); - fprintf (out, "%s \t set value for BNDPRESERVE bit.\n" - "\t\t\t BNDPRESERVE = 0 flush bounds on unprefixed call/ret/jmp\n" - "\t\t\t BNDPRESERVE = 1 do NOT flush bounds\n" - "\t\t\t [default: %d]\n", MPX_RT_BNDPRESERVE, - MPX_RT_BNDPRESERVE_DEFAULT); - fprintf (out, "%s \t print summary at the end of the run\n" - "\t\t\t [default: no]\n", MPX_RT_PRINT_SUMMARY); - - fprintf (out, "%s \t\t print this help and exit.\n" - "\t\t\t [default: no]\n", MPX_RT_HELP); - - exit (0); -} - -static void -validate_bndpreserve (const char *env, int *bndpreserve) -{ - if (env == 0) - bndpreserve = MPX_RT_BNDPRESERVE_DEFAULT; - else if (strcmp (env, "0") == 0) - *bndpreserve = 0; - else if (strcmp (env, "1") == 0) - *bndpreserve = 1; - else - { - __mpxrt_print (VERB_ERROR, "Illegal value '%s' for %s. Legal values " - "are [0 | 1]\nUsing default value %d\n", - env, MPX_RT_BNDPRESERVE, MPX_RT_BNDPRESERVE_DEFAULT); - *bndpreserve = MPX_RT_BNDPRESERVE_DEFAULT; - } -} - -static verbose_type -init_verbose_val (const char *env) -{ - if (env == 0) - return MPX_RT_VERBOSE_DEFAULT; - else if (strcmp(env, "0") == 0) - return VERB_ERROR; - else if (strcmp(env, "1") == 0) - return VERB_INFO; - else if (strcmp(env, "2") == 0) - return VERB_BR; - else if (strcmp(env, "3") == 0) - return VERB_DEBUG; - - __mpxrt_print (VERB_ERROR, "Illegal value '%s' for %s. Legal values " - "are [0..3]\nUsing default value %d\n", - env, MPX_RT_VERBOSE, (int)MPX_RT_VERBOSE_DEFAULT); - - return MPX_RT_VERBOSE_DEFAULT; -} - -static void -env_var_print_summary (void) -{ - env_var_t* node; - - __mpxrt_print (VERB_DEBUG, "Used environment variables:\n"); - - node = env_var_list.first; - while (node != 0) - { - __mpxrt_print (VERB_DEBUG, " %s = %s\n", node->env_name, node->env_val); - node = node->next; - } -} - -/* Return 1 if passes env var value should enable feature. */ - -static int -check_yes (const char *val) -{ - return val && (!strcmp (val, "yes") || !strcmp (val, "1")); -} - -void -__mpxrt_init_env_vars (int* bndpreserve) -{ - char *out_env; - char *err_env; - char *env; - - pthread_mutex_init (&lock, NULL); - - out_env = secure_getenv (MPX_RT_OUT); - env_var_list_add (MPX_RT_OUT, out_env); - - err_env = secure_getenv (MPX_RT_ERR); - env_var_list_add (MPX_RT_ERR, err_env); - - env = secure_getenv (MPX_RT_ADDPID); - env_var_list_add (MPX_RT_ADDPID, env); - add_pid = check_yes (env); - - set_file_stream (&out, out_name, out_env, stdout); - if (out_env == 0 || err_env == 0 || (strcmp (out_env, err_env) != 0)) - set_file_stream (&err, err_name, err_env, stderr); - else - /* in case we get the same file name for err and out */ - err = out; - - env = secure_getenv (MPX_RT_VERBOSE); - env_var_list_add (MPX_RT_VERBOSE, env); - verbose_val = init_verbose_val (env); - - env = secure_getenv (MPX_RT_MODE); - env_var_list_add (MPX_RT_MODE, env); - mode = set_mpx_rt_mode (env); - - env = secure_getenv (MPX_RT_STOP_HANDLER); - env_var_list_add (MPX_RT_STOP_HANDLER, env); - stop_handler = set_mpx_rt_stop_handler (env); - - env = secure_getenv (MPX_RT_BNDPRESERVE); - env_var_list_add (MPX_RT_BNDPRESERVE, env); - validate_bndpreserve (env, bndpreserve); - - env = secure_getenv (MPX_RT_PRINT_SUMMARY); - env_var_list_add (MPX_RT_PRINT_SUMMARY, env); - summary = check_yes (env); - - env = secure_getenv (MPX_RT_HELP); - if (check_yes (env)) - print_help (); - - /* - * at fork - create new files for output and err according - * to the env vars. - */ - pthread_atfork (NULL, at_fork_check, open_child_files); - - env_var_print_summary (); -} - -void -__mpxrt_utils_free (void) -{ - if (files_overwritten) - __mpxrt_print (VERB_INFO, "\nMPX RUNTIME WARNING: out/err files are" - " overwritten in new processes since %s was not set.\n", - MPX_RT_ADDPID); - - if (out != stdout) - { - fclose (out); - if (out_file_dirty != 1) - remove (out_name); - } - - if (err != stderr) - { - fclose (err); - if (err_file_dirty != 1) - remove (err_name); - } - - pthread_mutex_destroy (&lock); -} - -void -__mpxrt_write_uint (verbose_type vt, uint64_t val, unsigned base) -{ - static const char digits[] = { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - char str[65]; - int pos = 64;; - - str[pos--] = 0; - - if (vt > verbose_val || base <= 1 || base > sizeof (digits)) - return; - - if (val < base) - str[pos--] = digits[val]; - else - while (val) - { - str[pos--] = digits[val % base]; - val = val / base; - } - - __mpxrt_write (vt, str + pos + 1); -} - -void -__mpxrt_write (verbose_type vt, const char* str) -{ - va_list argp; - FILE *print_to; - - if (vt > verbose_val) - return; - - if (vt == VERB_ERROR) - { - print_to = err; - err_file_dirty = 1; - } - else - { - print_to = out; - out_file_dirty = 1; - } - pthread_mutex_lock (&lock); - write (fileno (print_to), str, strlen (str)); - pthread_mutex_unlock (&lock); - va_end (argp); -} - -void -__mpxrt_print (verbose_type vt, const char* frmt, ...) -{ - va_list argp; - FILE *print_to; - - if (vt > verbose_val) - return; - - va_start (argp, frmt); - if (vt == VERB_ERROR) - { - print_to = err; - err_file_dirty = 1; - } - else - { - print_to = out; - out_file_dirty = 1; - } - pthread_mutex_lock (&lock); - vfprintf (print_to, frmt, argp); - fflush (print_to); - pthread_mutex_unlock (&lock); - va_end (argp); -} - -mpx_rt_mode_t -__mpxrt_mode (void) -{ - return mode; -} - -mpx_rt_mode_t -__mpxrt_stop_handler (void) -{ - return stop_handler; -} - -void __attribute__ ((noreturn)) -__mpxrt_stop (void) -{ - if (__mpxrt_stop_handler () == MPX_RT_STOP_HANDLER_ABORT) - abort (); - else if (__mpxrt_stop_handler () == MPX_RT_STOP_HANDLER_EXIT) - exit (255); - __builtin_unreachable (); -} - -void -__mpxrt_print_summary (uint64_t num_brs, uint64_t l1_size) -{ - - if (summary == 0) - return; - - out_file_dirty = 1; - - pthread_mutex_lock (&lock); - fprintf (out, "MPX runtime summary:\n"); - fprintf (out, " Number of bounds violations: %" PRIu64 ".\n", num_brs); - fprintf (out, " Size of allocated L1: %" PRIu64 "B\n", l1_size); - fflush (out); - pthread_mutex_unlock (&lock); -} diff --git a/libmpx/mpxrt/mpxrt-utils.h b/libmpx/mpxrt/mpxrt-utils.h deleted file mode 100644 index a6f4f1b3ca4..00000000000 --- a/libmpx/mpxrt/mpxrt-utils.h +++ /dev/null @@ -1,71 +0,0 @@ -/* mpxrt-utils.h -*-C++-*- - * - ************************************************************************* - * - * @copyright - * Copyright (C) 2014, Intel Corporation - * All rights reserved. - * - * @copyright - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * @copyright - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY - * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -#ifndef MPXRT_UTILS_H -#define MPXRT_UTILS_H - -#include - -typedef enum { - VERB_ERROR, - VERB_INFO, - VERB_BR, - VERB_DEBUG -} verbose_type; - -typedef enum { - MPX_RT_COUNT, - MPX_RT_STOP -} mpx_rt_mode_t; - -typedef enum { - MPX_RT_STOP_HANDLER_ABORT, - MPX_RT_STOP_HANDLER_EXIT -} mpx_rt_stop_mode_handler_t; - -void __mpxrt_init_env_vars (int* bndpreserve); -void __mpxrt_write_uint (verbose_type vt, uint64_t val, unsigned base); -void __mpxrt_write (verbose_type vt, const char* str); -void __mpxrt_print (verbose_type vt, const char* frmt, ...); -mpx_rt_mode_t __mpxrt_mode (void); -void __mpxrt_utils_free (void); -void __mpxrt_print_summary (uint64_t num_brs, uint64_t l1_size); -void __mpxrt_stop (void) __attribute__ ((noreturn)); - -#endif /* MPXRT_UTILS_H */ diff --git a/libmpx/mpxrt/mpxrt.c b/libmpx/mpxrt/mpxrt.c deleted file mode 100644 index 76d11f71fd1..00000000000 --- a/libmpx/mpxrt/mpxrt.c +++ /dev/null @@ -1,494 +0,0 @@ -/* mpxrt.c -*-C++-*- - * - ************************************************************************* - * - * @copyright - * Copyright (C) 2014, Intel Corporation - * All rights reserved. - * - * @copyright - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * @copyright - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY - * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -#define __STDC_FORMAT_MACROS -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "mpxrt-utils.h" -#include "mpxrt.h" - -#define MPX_ENABLE_BIT_NO 0 -#define BNDPRESERVE_BIT_NO 1 - -struct xsave_hdr_struct -{ - uint64_t xstate_bv; - uint64_t reserved1[2]; - uint64_t reserved2[5]; -} __attribute__ ((packed)); - -struct bndregs_struct -{ - uint64_t bndregs[8]; -} __attribute__ ((packed)); - -struct bndcsr_struct { - uint64_t cfg_reg_u; - uint64_t status_reg; -} __attribute__((packed)); - -struct xsave_struct -{ - uint8_t fpu_sse[512]; - struct xsave_hdr_struct xsave_hdr; - uint8_t ymm[256]; - uint8_t lwp[128]; - struct bndregs_struct bndregs; - struct bndcsr_struct bndcsr; -} __attribute__ ((packed)); - -/* Following vars are initialized at process startup only - and thus are considered to be thread safe. */ -static void *l1base = NULL; -static int bndpreserve; -static int enable = 1; - -/* Var holding number of occured BRs. It is modified from - signal handler only and thus it should be thread safe. */ -static uint64_t num_bnd_chk = 0; - -static inline void -xrstor_state (struct xsave_struct *fx, uint64_t mask) -{ - uint32_t lmask = mask; - uint32_t hmask = mask >> 32; - - asm volatile (".byte " REX_PREFIX "0x0f,0xae,0x2f\n\t" - : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) - : "memory"); -} - -static inline void -xsave_state (struct xsave_struct *fx, uint64_t mask) -{ - uint32_t lmask = mask; - uint32_t hmask = mask >> 32; - - asm volatile (".byte " REX_PREFIX "0x0f,0xae,0x27\n\t" - : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) - : "memory"); -} - -static inline uint64_t -xgetbv (uint32_t index) -{ - uint32_t eax, edx; - - asm volatile (".byte 0x0f,0x01,0xd0" /* xgetbv */ - : "=a" (eax), "=d" (edx) - : "c" (index)); - return eax + ((uint64_t)edx << 32); -} - -static uint64_t -read_mpx_status_sig (ucontext_t *uctxt) -{ - uint8_t *regs = (uint8_t *)uctxt->uc_mcontext.fpregs + XSAVE_OFFSET_IN_FPMEM; - struct xsave_struct *xsave_buf = (struct xsave_struct *)regs; - return xsave_buf->bndcsr.status_reg; -} - -static uint8_t * -get_next_inst_ip (uint8_t *addr) -{ - uint8_t *ip = addr; - uint8_t sib; - - /* Determine the prefix. */ - switch (*ip) - { - case 0xf2: - case 0xf3: - case 0x66: - ip++; - break; - } - - /* Look for rex prefix. */ - if ((*ip & 0x40) == 0x40) - ip++; - - /* Make sure we have a MPX instruction. */ - if (*ip++ != 0x0f) - return addr; - - /* Skip the op code byte. */ - ip++; - - /* Get the moderm byte. */ - uint8_t modrm = *ip++; - - /* Break it down into parts. */ - uint8_t rm = modrm & 7; - uint8_t mod = (modrm >> 6); - - /* Init the parts of the address mode. */ - uint8_t base = 8; - - /* Is it a mem mode? */ - if (mod != 3) - { - /* Look for scaled indexed addressing. */ - if (rm == 4) - { - /* SIB addressing. */ - sib = *ip++; - base = sib & 7; - switch (mod) - { - case 0: - if (base == 5) - ip += 4; - break; - - case 1: - ip++; - break; - - case 2: - ip += 4; - break; - } - } - else - { - /* MODRM addressing. */ - switch (mod) - { - case 0: - if (rm == 5) - /* DISP32 addressing, no base. */ - ip += 4; - break; - - case 1: - ip++; - break; - - case 2: - ip += 4; - break; - } - } - } - return ip; -} - -static void -handler (int sig __attribute__ ((unused)), - siginfo_t *info __attribute__ ((unused)), - void *vucontext, - struct xsave_struct *buf __attribute__ ((unused))) -{ - ucontext_t* uctxt; - greg_t trapno; - greg_t ip; - - uctxt = vucontext; - trapno = uctxt->uc_mcontext.gregs[REG_TRAPNO]; - ip = uctxt->uc_mcontext.gregs[REG_IP_IDX]; - - if (trapno == 5) - { - uint64_t status = read_mpx_status_sig (uctxt); - uint64_t br_reason = status & 0x3; - - __mpxrt_write (VERB_BR, "Saw a #BR! status "); - __mpxrt_write_uint (VERB_BR, status, 10); - __mpxrt_write (VERB_BR, " at 0x"); - __mpxrt_write_uint (VERB_BR, ip, 16); - __mpxrt_write (VERB_BR, "\n"); - - switch (br_reason) - { - case 1: /* traditional BR */ - num_bnd_chk++; - uctxt->uc_mcontext.gregs[REG_IP_IDX] = - (greg_t)get_next_inst_ip ((uint8_t *)ip); - if (__mpxrt_mode () == MPX_RT_STOP) - __mpxrt_stop (); - return; - - default: - __mpxrt_write (VERB_BR, "Unexpected status with bound exception: "); - __mpxrt_write_uint (VERB_BR, status, 10); - __mpxrt_write (VERB_BR, "\n"); - break; - } - } - else if (trapno == 14) - { - __mpxrt_write (VERB_ERROR, "In signal handler, trapno = "); - __mpxrt_write_uint (VERB_ERROR, trapno, 10); - __mpxrt_write (VERB_ERROR, ", ip = 0x"); - __mpxrt_write_uint (VERB_ERROR, ip, 16); - __mpxrt_write (VERB_ERROR, "\n"); - __mpxrt_stop (); - } - else - { - __mpxrt_write (VERB_ERROR, "Unexpected trap "); - __mpxrt_write_uint (VERB_ERROR, trapno, 10); - __mpxrt_write (VERB_ERROR, "! at 0x"); - __mpxrt_write_uint (VERB_ERROR, ip, 16); - __mpxrt_write (VERB_ERROR, "\n"); - __mpxrt_stop (); - } -} - -/* Using wrapper to the real handler in order to save the bnd regs - using xsave before any unprefixed call. an unprefixed call to - __i686.get_pc_thunk.bx is added by the linker in 32bit at the - beginning of handler function since there are references to - global variables. */ -static void -handler_wrap (int signum, siginfo_t* si, void* vucontext) -{ - /* Since the OS currently not handling chkptr regs. - We need to store them for later use. They might be - init due to unprefixed call,Jcc,ret. avoiding calling - function since the function will be unprefixed as well. */ - uint8_t __attribute__ ((__aligned__ (64))) buffer[4096]; - struct xsave_struct *xsave_buf = (struct xsave_struct *)buffer; - uint64_t mask = 0x18; - uint32_t lmask = mask; - uint32_t hmask = mask >> 32; - - asm volatile (".byte " REX_PREFIX "0x0f,0xae,0x27\n\t" - : : "D" (xsave_buf), "m" (*xsave_buf), - "a" (lmask), "d" (hmask) - : "memory"); - - handler (signum, si, vucontext, xsave_buf); -} - -static bool -check_mpx_support (void) -{ - unsigned int eax, ebx, ecx, edx; - unsigned int max_level = __get_cpuid_max (0, NULL); - - if (max_level < 13) - { - __mpxrt_print (VERB_DEBUG, "No required CPUID level support.\n"); - return false; - } - - __cpuid_count (0, 0, eax, ebx, ecx, edx); - if (!(ecx & bit_XSAVE)) - { - __mpxrt_print (VERB_DEBUG, "No XSAVE support.\n"); - return false; - } - - if (!(ecx & bit_OSXSAVE)) - { - __mpxrt_print (VERB_DEBUG, "No OSXSAVE support.\n"); - return false; - } - - __cpuid_count (7, 0, eax, ebx, ecx, edx); - if (!(ebx & bit_MPX)) - { - __mpxrt_print (VERB_DEBUG, "No MPX support.\n"); - return false; - } - - __cpuid_count (13, 0, eax, ebx, ecx, edx); - if (!(eax & bit_BNDREGS)) - { - __mpxrt_print (VERB_DEBUG, "No BNDREGS support.\n"); - return false; - } - - if (!(eax & bit_BNDCSR)) - { - __mpxrt_print (VERB_DEBUG, "No BNDCSR support.\n"); - return false; - } - - return true; -} - -static void -enable_mpx (void) -{ - uint8_t __attribute__ ((__aligned__ (64))) buffer[4096]; - struct xsave_struct *xsave_buf = (struct xsave_struct *)buffer; - - memset (buffer, 0, sizeof (buffer)); - xrstor_state (xsave_buf, 0x18); - - __mpxrt_print (VERB_DEBUG, "Initalizing MPX...\n"); - __mpxrt_print (VERB_DEBUG, " Enable bit: %d\n", enable); - __mpxrt_print (VERB_DEBUG, " BNDPRESERVE bit: %d\n", bndpreserve); - - /* Enable MPX. */ - xsave_buf->xsave_hdr.xstate_bv = 0x10; - xsave_buf->bndcsr.cfg_reg_u = (unsigned long)l1base; - xsave_buf->bndcsr.cfg_reg_u |= enable << MPX_ENABLE_BIT_NO; - xsave_buf->bndcsr.cfg_reg_u |= bndpreserve << BNDPRESERVE_BIT_NO; - xsave_buf->bndcsr.status_reg = 0; - - xrstor_state (xsave_buf, 0x10); -} - -static void -disable_mpx (void) -{ - uint8_t __attribute__ ((__aligned__ (64))) buffer[4096]; - struct xsave_struct *xsave_buf = (struct xsave_struct *)buffer; - - memset(buffer, 0, sizeof(buffer)); - xrstor_state(xsave_buf, 0x18); - - /* Disable MPX. */ - xsave_buf->xsave_hdr.xstate_bv = 0x10; - xsave_buf->bndcsr.cfg_reg_u = 0; - xsave_buf->bndcsr.status_reg = 0; - - xrstor_state(xsave_buf, 0x10); -} - -static bool -process_specific_init (void) -{ - if (!check_mpx_support ()) - return false; - - l1base = mmap (NULL, MPX_L1_SIZE, PROT_READ | PROT_WRITE, - MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - if (l1base == MAP_FAILED) - { - perror ("mmap"); - exit (EXIT_FAILURE); - } - - enable_mpx (); - - if (prctl (43, 0, 0, 0, 0)) - { - __mpxrt_print (VERB_ERROR, "No MPX support\n"); - disable_mpx (); - return false; - } - - return true; -} - -static bool -process_specific_finish (void) -{ - if (!check_mpx_support ()) - return false; - - if (prctl (44, 0, 0, 0, 0)) - { - __mpxrt_print (VERB_ERROR, "No MPX support\n"); - return false; - } - - munmap (l1base, MPX_L1_SIZE); - - return true; -} - -static void -setup_handler (void) -{ - int r,rs; - struct sigaction newact; - - /* #BR is mapped to sigsegv */ - int signum = SIGSEGV; - - newact.sa_handler = 0; - newact.sa_sigaction = handler_wrap; - - /* sigset_t - signals to block while in the handler - get the old signal mask. */ - rs = sigprocmask (SIG_SETMASK, 0, &newact.sa_mask); - assert (rs == 0); - - /* Call sa_sigaction, not sa_handler. */ - newact.sa_flags = SA_SIGINFO; - /* In case we call user's handler on SIGSEGV (not bound - violation exception) we want to allow bound checking - inside the user handler -> nested exception. */ - newact.sa_flags |= SA_NODEFER; - - newact.sa_restorer = 0; - r = sigaction (signum, &newact, 0); - assert (r == 0); -} - -/* Set constructor priority to two to make it run after the - constructor in sigaction.c. */ -static void __attribute__ ((constructor (1005))) -mpxrt_prepare (void) -{ - __mpxrt_init_env_vars (&bndpreserve); - setup_handler (); - process_specific_init (); -} - -static void __attribute__ ((destructor)) -mpxrt_cleanup (void) -{ - __mpxrt_print_summary (num_bnd_chk, MPX_L1_SIZE); - __mpxrt_utils_free (); - process_specific_finish (); -} - -/* Get address of bounds directory. */ -void * -get_bd () -{ - return l1base; -} diff --git a/libmpx/mpxrt/mpxrt.h b/libmpx/mpxrt/mpxrt.h deleted file mode 100644 index e825d7d9046..00000000000 --- a/libmpx/mpxrt/mpxrt.h +++ /dev/null @@ -1,75 +0,0 @@ -/* mpxrt.h -*-C++-*- - * - ************************************************************************* - * - * @copyright - * Copyright (C) 2015, Intel Corporation - * All rights reserved. - * - * @copyright - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * @copyright - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY - * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ -#ifdef __i386__ - -/* i386 directory size is 4MB. */ -#define NUM_L1_BITS 20 -#define NUM_L2_BITS 10 -#define NUM_IGN_BITS 2 -#define MPX_L1_ADDR_MASK 0xfffff000UL -#define MPX_L2_ADDR_MASK 0xfffffffcUL -#define MPX_L2_VALID_MASK 0x00000001UL - -#define REG_IP_IDX REG_EIP -#define REX_PREFIX - -#define XSAVE_OFFSET_IN_FPMEM sizeof (struct _libc_fpstate) - -#else /* __i386__ */ - -/* x86_64 directory size is 2GB. */ -#define NUM_L1_BITS 28 -#define NUM_L2_BITS 17 -#define NUM_IGN_BITS 3 -#define MPX_L1_ADDR_MASK 0xfffffffffffff000ULL -#define MPX_L2_ADDR_MASK 0xfffffffffffffff8ULL -#define MPX_L2_VALID_MASK 0x0000000000000001ULL - -#define REG_IP_IDX REG_RIP -#define REX_PREFIX "0x48, " - -#define XSAVE_OFFSET_IN_FPMEM 0 - -#endif /* !__i386__ */ - -#define MPX_L1_SIZE ((1UL << NUM_L1_BITS) * sizeof (void *)) - -/* Get address of bounds directory. */ -void * -get_bd (); diff --git a/libmpx/mpxwrap/Makefile.am b/libmpx/mpxwrap/Makefile.am deleted file mode 100644 index 6dba674fff1..00000000000 --- a/libmpx/mpxwrap/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -ALCLOCAL_AMFLAGS = -I .. -I ../config -AM_CPPFLAGS = -I $(top_srcdir) -AM_CFLAGS = $(XCFLAGS) - -# May be used by toolexeclibdir. -gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) - -libmpxwrappers_la_CFLAGS = -fcheck-pointer-bounds -mmpx -fno-chkp-check-read \ - -fno-chkp-check-write -fno-chkp-use-wrappers \ - -fPIC $(XCFLAGS) -libmpxwrappers_la_DEPENDENCIES = libmpxwrappers.map -libmpxwrappers_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmpxwrappers.map \ - -version-info `grep -v '^\#' $(srcdir)/libtool-version` - -toolexeclib_LTLIBRARIES = libmpxwrappers.la - -libmpxwrappers_la_SOURCES = mpx_wrappers.c - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = - diff --git a/libmpx/mpxwrap/Makefile.in b/libmpx/mpxwrap/Makefile.in deleted file mode 100644 index 6693a09a088..00000000000 --- a/libmpx/mpxwrap/Makefile.in +++ /dev/null @@ -1,576 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = mpxwrap -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ - $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/multi.m4 \ - $(top_srcdir)/../config/override.m4 \ - $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ - $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \ - $(top_srcdir)/../config/enable.m4 \ - $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(toolexeclibdir)" -LTLIBRARIES = $(toolexeclib_LTLIBRARIES) -libmpxwrappers_la_LIBADD = -am_libmpxwrappers_la_OBJECTS = libmpxwrappers_la-mpx_wrappers.lo -libmpxwrappers_la_OBJECTS = $(am_libmpxwrappers_la_OBJECTS) -libmpxwrappers_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libmpxwrappers_la_CFLAGS) $(CFLAGS) \ - $(libmpxwrappers_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libmpxwrappers_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XCFLAGS = @XCFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -get_gcc_base_ver = @get_gcc_base_ver@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -link_libmpx = @link_libmpx@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -multi_basedir = @multi_basedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -toolexecdir = @toolexecdir@ -toolexeclibdir = @toolexeclibdir@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -ALCLOCAL_AMFLAGS = -I .. -I ../config -AM_CPPFLAGS = -I $(top_srcdir) -AM_CFLAGS = $(XCFLAGS) - -# May be used by toolexeclibdir. -gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) -libmpxwrappers_la_CFLAGS = -fcheck-pointer-bounds -mmpx -fno-chkp-check-read \ - -fno-chkp-check-write -fno-chkp-use-wrappers \ - -fPIC $(XCFLAGS) - -libmpxwrappers_la_DEPENDENCIES = libmpxwrappers.map -libmpxwrappers_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmpxwrappers.map \ - -version-info `grep -v '^\#' $(srcdir)/libtool-version` - -toolexeclib_LTLIBRARIES = libmpxwrappers.la -libmpxwrappers_la_SOURCES = mpx_wrappers.c - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "includedir=$(includedir)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "LD=$(LD)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "NM=$(NM)" \ - "PICFLAG=$(PICFLAG)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps mpxwrap/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign --ignore-deps mpxwrap/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ - } - -uninstall-toolexeclibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$f"; \ - done - -clean-toolexeclibLTLIBRARIES: - -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES) - @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libmpxwrappers.la: $(libmpxwrappers_la_OBJECTS) $(libmpxwrappers_la_DEPENDENCIES) $(EXTRA_libmpxwrappers_la_DEPENDENCIES) - $(libmpxwrappers_la_LINK) -rpath $(toolexeclibdir) $(libmpxwrappers_la_OBJECTS) $(libmpxwrappers_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -libmpxwrappers_la-mpx_wrappers.lo: mpx_wrappers.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpxwrappers_la_CFLAGS) $(CFLAGS) -c -o libmpxwrappers_la-mpx_wrappers.lo `test -f 'mpx_wrappers.c' || echo '$(srcdir)/'`mpx_wrappers.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-toolexeclibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-toolexeclibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-toolexeclibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-toolexeclibLTLIBRARIES installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-toolexeclibLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libmpx/mpxwrap/libmpxwrappers.map b/libmpx/mpxwrap/libmpxwrappers.map deleted file mode 100644 index c2912a7e18b..00000000000 --- a/libmpx/mpxwrap/libmpxwrappers.map +++ /dev/null @@ -1,23 +0,0 @@ -LIBMPXWRAPPERS_1.0 -{ - global: - __mpx_wrapper_malloc; - __mpx_wrapper_mmap; - __mpx_wrapper_realloc; - __mpx_wrapper_calloc; - __mpx_wrapper_memset; - __mpx_wrapper_bzero; - __mpx_wrapper_memmove; - __mpx_wrapper_memcpy; - __mpx_wrapper_mempcpy; - __mpx_wrapper_strncat; - __mpx_wrapper_strcat; - __mpx_wrapper_stpcpy; - __mpx_wrapper_stpncpy; - __mpx_wrapper_strcpy; - __mpx_wrapper_strncpy; - __mpx_wrapper_strlen; - - local: - *; -}; diff --git a/libmpx/mpxwrap/libtool-version b/libmpx/mpxwrap/libtool-version deleted file mode 100644 index e241350d23b..00000000000 --- a/libmpx/mpxwrap/libtool-version +++ /dev/null @@ -1,6 +0,0 @@ -# This file is used to maintain libtool version info for libmpxintr. See -# the libtool manual to understand the meaning of the fields. This is -# a separate file so that version updates don't involve re-running -# automake. -# CURRENT:REVISION:AGE -2:1:0 diff --git a/libmpx/mpxwrap/mpx_wrappers.c b/libmpx/mpxwrap/mpx_wrappers.c deleted file mode 100644 index aea0346b933..00000000000 --- a/libmpx/mpxwrap/mpx_wrappers.c +++ /dev/null @@ -1,646 +0,0 @@ -/* MPX Wrappers Library - Copyright (C) 2014 Free Software Foundation, Inc. - Contributed by Ilya Enkovich (ilya.enkovich@intel.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 3, or (at your option) any later - version. - - GCC is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - 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 - . */ - -#include "stdlib.h" -#include "string.h" -#include -#include -#include -#include "mpxrt/mpxrt.h" - -/* Since internal MPX wrapper calls must avoid PLT which will clear bound - registers, we make them static with an external alias. */ -#define EXTERN_ALIAS(f) \ - __typeof (f) __##f __attribute__((alias(#f))); - -static void * -mpx_wrapper_malloc (size_t size) -{ - void *p = (void *)malloc (size); - if (!p) return __bnd_null_ptr_bounds (p); - return __bnd_set_ptr_bounds (p, size); -} - -EXTERN_ALIAS (mpx_wrapper_malloc) - -void * -__mpx_wrapper_mmap (void *addr, size_t length, int prot, int flags, - int fd, off_t offset) -{ - void *p = mmap (addr, length, prot, flags, fd, offset); - if (!p) return __bnd_null_ptr_bounds (p); - return __bnd_set_ptr_bounds (p, length); -} - -void * -__mpx_wrapper_realloc (void *ptr, size_t n) -{ - if (!ptr) - return mpx_wrapper_malloc (n); - - /* We don't kwnow how much data is copied by realloc - and therefore may check only lower bounds. */ - __bnd_chk_ptr_lbounds (ptr); - ptr = realloc (ptr, n); - - if (!ptr) - return __bnd_null_ptr_bounds (ptr); - - return __bnd_set_ptr_bounds (ptr, n); -} - -void * -__mpx_wrapper_calloc (size_t n_elements, size_t element_size) -{ - void *p = calloc (n_elements, element_size); - if (!p) - return __bnd_null_ptr_bounds (p); - return __bnd_set_ptr_bounds (p, n_elements * element_size); -} - -static void * -mpx_wrapper_memset (void *dstpp, int c, size_t len) -{ - if (len > 0) - { - __bnd_chk_ptr_bounds (dstpp, len); - memset (dstpp, c, len); - } - return dstpp; -} - -EXTERN_ALIAS (mpx_wrapper_memset) - -void -__mpx_wrapper_bzero (void *dst, size_t len) -{ - mpx_wrapper_memset (dst, 0, len); -} - -/* The mpx_pointer type is used for getting bits - for bt_index (index in bounds table) and - bd_index (index in bounds directory). */ -typedef union -{ - struct - { - unsigned long ignored:NUM_IGN_BITS; - unsigned long l2entry:NUM_L2_BITS; - unsigned long l1index:NUM_L1_BITS; - }; - void *pointer; -} mpx_pointer; - -/* The mpx_bt_entry struct represents a cell in bounds table. - lb is the lower bound, ub is the upper bound, - p is the stored pointer. */ -struct mpx_bt_entry -{ - void *lb; - void *ub; - void *p; - void *reserved; -}; - -/* A special type for bd is needed because bt addresses can be modified. */ -typedef struct mpx_bt_entry * volatile * bd_type; - -/* Function alloc_bt is used for allocating bounds table - for the destination pointers if we don't have one. - We generate a bounds store for some pointer belonging - to that table and kernel allocates the table for us. */ -static inline void __attribute__ ((bnd_legacy)) -alloc_bt (void *ptr) -{ - __asm__ __volatile__ ("bndstx %%bnd0, (%0,%0)"::"r" (ptr):"%bnd0"); -} - -/* get_bt returns address of bounds table that should - exist at BD[BD_INDEX]. If there is no address or the address is not valid, - we try to allocate a valid table. - If we succeed in getting bt, its address will be returned. - If we can't get a valid bt, NULL will be returned. */ -__attribute__ ((bnd_legacy)) static inline struct mpx_bt_entry * -get_bt (unsigned bd_index, bd_type bd) -{ - struct mpx_bt_entry *bt = (struct mpx_bt_entry *) ((uintptr_t) bd[bd_index] - & MPX_L2_ADDR_MASK); - if (!(bt) || !((uintptr_t) bd[bd_index] & MPX_L2_VALID_MASK)) - { - mpx_pointer ptr; - ptr.l1index = bd_index; - /* If we don't have BT, allocate it. */ - alloc_bt (ptr.pointer); - bt = (struct mpx_bt_entry *) ((uintptr_t) bd[bd_index] - & MPX_L2_ADDR_MASK); - if (!(bt) || !((uintptr_t) bd[bd_index] & MPX_L2_VALID_MASK)) - return NULL; - } - return bt; -} - -/* Function copy_if_possible moves elements from *FROM to *TO. - If ELEMS is less then the ELEMS_TO_COPY (elements we can copy), - it copies ELEMS elements and returns 0. - Otherwise, it copies ELEMS_TO_COPY elements and returns 1. */ -__attribute__ ((bnd_legacy)) static inline int -copy_if_possible (int elems, int elems_to_copy, struct mpx_bt_entry *from, - struct mpx_bt_entry *to) -{ - if (elems < elems_to_copy) - memmove (to, from, elems * sizeof (struct mpx_bt_entry)); - else - { - memmove (to, from, elems_to_copy * sizeof (struct mpx_bt_entry)); - return 1; - } - return 0; -} - -/* Function copy_if_possible_from_end moves elements ending at *SRC_END - to the place where they will end at *DST_END. - If ELEMS is less then the ELEMS_TO_COPY (elements we can copy), - function copies ELEMS elements and returns 0. - Otherwise, it copies ELEMS_TO_COPY elements and returns 1. */ -__attribute__ ((bnd_legacy)) static inline int -copy_if_possible_from_end (int elems, int elems_to_copy, struct mpx_bt_entry - *src_end, struct mpx_bt_entry *dst_end) -{ - if (elems < elems_to_copy) - memmove (dst_end - elems, src_end - elems, - elems * sizeof (struct mpx_bt_entry)); - else - { - memmove (dst_end - elems_to_copy, - src_end - elems_to_copy, - elems_to_copy * sizeof (struct mpx_bt_entry)); - return 1; - } - return 0; -} - -/* move_bounds function copies bounds for N bytes from bt of SRC to bt of DST. - It also copies bounds for all pointers inside. - There are 3 parts of the algorithm: - 1) We copy everything till the end of the first bounds table of SRC - 2) In loop we copy whole bound tables till the second-last one - 3) Data in the last bounds table is copied separately, after the loop. - If one of bound tables in SRC doesn't exist, - we skip it because there are no pointers. - Depending on the arrangement of SRC and DST we copy from the beginning - or from the end. */ -__attribute__ ((bnd_legacy)) static void -move_bounds (void *dst, const void *src, size_t n) -{ - bd_type bd = (bd_type)get_bd (); - if (!(bd)) - return; - - /* We get indexes for all tables and number of elements for BT. */ - unsigned long bt_num_of_elems = (1UL << NUM_L2_BITS); - mpx_pointer addr_src, addr_dst, addr_src_end, addr_dst_end; - addr_src.pointer = (char *) src; - addr_dst.pointer = (char *) dst; - addr_src_end.pointer = (char *) src + n - 1; - addr_dst_end.pointer = (char *) dst + n - 1; - unsigned dst_bd_index = addr_dst.l1index; - unsigned src_bd_index = addr_src.l1index; - unsigned dst_bt_index = addr_dst.l2entry; - unsigned src_bt_index = addr_src.l2entry; - - unsigned dst_bd_index_end = addr_dst_end.l1index; - unsigned src_bd_index_end = addr_src_end.l1index; - unsigned dst_bt_index_end = addr_dst_end.l2entry; - unsigned src_bt_index_end = addr_src_end.l2entry; - - int elems_to_copy = src_bt_index_end - src_bt_index + 1 + (src_bd_index_end - - src_bd_index) * bt_num_of_elems; - struct mpx_bt_entry *bt_src, *bt_dst; - uintptr_t bt_valid; - /* size1 and size2 will be used to find out what portions - can be used to copy data. */ - int size1_elem, size2_elem, size1_bytes, size2_bytes; - - /* Copy from the beginning. */ - if (((char *) src - (char *) dst) > 0) - { - /* Copy everything till the end of the first bounds table (src) */ - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index] & MPX_L2_VALID_MASK; - - /* We can copy the whole preliminary piece of data. */ - if (src_bt_index > dst_bt_index) - { - size1_elem = src_bt_index - dst_bt_index; - size2_elem = bt_num_of_elems - size1_elem; - size1_bytes = size1_elem * sizeof (struct mpx_bt_entry); - size2_bytes = size2_elem * sizeof (struct mpx_bt_entry); - - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - if (copy_if_possible (bt_num_of_elems - src_bt_index, - elems_to_copy, &(bt_src[src_bt_index]), - &(bt_dst[dst_bt_index]))) - return; - } - elems_to_copy -= bt_num_of_elems - src_bt_index; - } - /* We have to copy preliminary data in two parts. */ - else - { - size2_elem = dst_bt_index - src_bt_index; - size1_elem = bt_num_of_elems - size2_elem; - size1_bytes = size1_elem * sizeof (struct mpx_bt_entry); - size2_bytes = size2_elem * sizeof (struct mpx_bt_entry); - - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - - if (copy_if_possible (bt_num_of_elems - dst_bt_index, - elems_to_copy, &(bt_src[src_bt_index]), - &(bt_dst[dst_bt_index]))) - return; - elems_to_copy -= bt_num_of_elems - dst_bt_index; - - dst_bd_index++; - - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - if (copy_if_possible (size2_elem, elems_to_copy, - &(bt_src[size1_elem]), &(bt_dst[0]))) - return; - elems_to_copy -= size2_elem; - } - else - elems_to_copy -= bt_num_of_elems - src_bt_index; - } - src_bd_index++; - - /* For each bounds table check if it's valid and move it. */ - for (; src_bd_index < src_bd_index_end; src_bd_index++) - { - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index] & MPX_L2_VALID_MASK; - - /* Check we have bounds to copy. */ - if (!bt_src || !bt_valid) - dst_bd_index++; - else - { - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[size2_elem]), &(bt_src[0]), size1_bytes); - dst_bd_index++; - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[0]), &(bt_src[size1_elem]), size2_bytes); - } - elems_to_copy -= bt_num_of_elems; - } - - /* Now we have the last page that may be not full - we copy it separately. */ - if (elems_to_copy > 0) - { - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index] & MPX_L2_VALID_MASK; - - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - - if (copy_if_possible (size1_elem, elems_to_copy, &(bt_src[0]), - &(bt_dst[size2_elem]))) - return; - - elems_to_copy -= size1_elem; - dst_bd_index++; - bt_dst = get_bt (dst_bd_index, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[0]), &(bt_src[size1_elem]), - elems_to_copy * sizeof (struct mpx_bt_entry)); - - } - } - } - /* Copy from the end. */ - else - { - /* Copy everything till the end of the first bounds table (src) */ - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index_end] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index_end] & MPX_L2_VALID_MASK; - - if (src_bt_index_end <= dst_bt_index_end) - /* We can copy the whole preliminary piece of data. */ - { - size2_elem = dst_bt_index_end - src_bt_index_end; - size1_elem = bt_num_of_elems - size2_elem; - size1_bytes = size1_elem * sizeof (struct mpx_bt_entry); - size2_bytes = size2_elem * sizeof (struct mpx_bt_entry); - - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - - if (copy_if_possible_from_end (src_bt_index_end + 1, - elems_to_copy, &(bt_src[src_bt_index_end + 1]), - &(bt_dst[dst_bt_index_end + 1]))) - return; - } - elems_to_copy -= src_bt_index_end + 1; - } - /* We have to copy preliminary data in two parts. */ - else - { - size1_elem = src_bt_index_end - dst_bt_index_end; - size2_elem = bt_num_of_elems - size1_elem; - size1_bytes = size1_elem * sizeof (struct mpx_bt_entry); - size2_bytes = size2_elem * sizeof (struct mpx_bt_entry); - - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - if (copy_if_possible_from_end (dst_bt_index_end + 1, - elems_to_copy, &(bt_src[src_bt_index_end + 1]), - &(bt_dst[dst_bt_index_end + 1]))) - return; - elems_to_copy -= dst_bt_index_end + 1; - - dst_bd_index_end--; - - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - if (copy_if_possible_from_end (size1_elem, elems_to_copy, - &(bt_src[size1_elem]), &(bt_dst[bt_num_of_elems]))) - return; - - elems_to_copy -= size1_elem; - } - else - elems_to_copy -= src_bt_index_end + 1; - } - /* Go to previous table but beware of overflow. - We should have copied all required element - in case src_bd_index_end is 0. */ - if (src_bd_index_end) - src_bd_index_end--; - else - { - assert (!elems_to_copy); - return; - } - /* For each bounds table we check if there are valid pointers inside. - If there are some, we copy table in pre-counted portions. */ - for (; src_bd_index_end > src_bd_index; src_bd_index_end--) - { - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index_end] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index_end] & MPX_L2_VALID_MASK; - /* Check we have bounds to copy. */ - if (!bt_src || !bt_valid) - dst_bd_index_end--; - else - { - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[0]), &(bt_src[size1_elem]), size2_bytes); - dst_bd_index_end--; - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[size2_elem]), &(bt_src[0]), size1_bytes); - } - elems_to_copy -= bt_num_of_elems; - } - - /* Now we have the last page that may be not full - we copy it separately. */ - if (elems_to_copy > 0) - { - bt_src = (struct mpx_bt_entry *) ((uintptr_t) bd[src_bd_index_end] - & MPX_L2_ADDR_MASK); - bt_valid = (uintptr_t) bd[src_bd_index_end] & MPX_L2_VALID_MASK; - /* Check we have bounds to copy. */ - if (bt_src && bt_valid) - { - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - if (copy_if_possible_from_end (size2_elem, elems_to_copy, - &(bt_src[bt_num_of_elems]), &(bt_dst[size2_elem]))) - return; - - elems_to_copy -= size2_elem; - dst_bd_index_end--; - bt_dst = get_bt (dst_bd_index_end, bd); - if (!bt_dst) - return; - memmove (&(bt_dst[dst_bt_index]), &(bt_src[src_bt_index]), - elems_to_copy * sizeof (struct mpx_bt_entry)); - } - } - } - return; -} - -static void * -mpx_wrapper_memmove (void *dst, const void *src, size_t n) -{ - if (n == 0) - return dst; - - __bnd_chk_ptr_bounds (dst, n); - __bnd_chk_ptr_bounds (src, n); - - /* When we copy exactly one pointer it is faster to - just use bndldx + bndstx. */ - if (n == sizeof (void *)) - { - void *const *s = (void *const *) src; - void **d = (void **) dst; - *d = *s; - return dst; - } - - memmove (dst, src, n); - - /* Not necessary to copy bounds if size is less then size of pointer - or SRC==DST. */ - if ((n >= sizeof (void *)) && (src != dst)) - move_bounds (dst, src, n); - - return dst; -} - -EXTERN_ALIAS (mpx_wrapper_memmove) - -static void * -mpx_wrapper_memcpy (void *dst, const void *src, size_t n) -{ - return mpx_wrapper_memmove (dst, src, n); -} - -EXTERN_ALIAS (mpx_wrapper_memcpy) - -void * -__mpx_wrapper_mempcpy (void *dst, const void *src, size_t n) -{ - return (char *)mpx_wrapper_memcpy (dst, src, n) + n; -} - -char * -__mpx_wrapper_strncat (char *dst, const char *src, size_t n) -{ - size_t dst_size = strlen (dst); - size_t src_size = strnlen (src, n); - - __bnd_chk_ptr_bounds (dst, dst_size + src_size + 1); - if (src_size < n) - __bnd_chk_ptr_bounds (src, src_size + 1); - else - __bnd_chk_ptr_bounds (src, src_size); - - strncat (dst, src, n); - - return dst; -} - -char * -__mpx_wrapper_strcat (char *dst, const char *src) -{ - size_t dst_size = strlen (dst); - size_t src_size = strlen (src); - - __bnd_chk_ptr_bounds (dst, dst_size + src_size + 1); - __bnd_chk_ptr_bounds (src, src_size + 1); - - strcat (dst, src); - - return dst; -} - -char * -__mpx_wrapper_stpcpy (char *dst, const char *src) -{ - size_t src_size = strlen (src); - - __bnd_chk_ptr_bounds (dst, src_size + 1); - __bnd_chk_ptr_bounds (src, src_size + 1); - - memcpy (dst, src, src_size + 1); - - return dst + src_size; -} - -char * -__mpx_wrapper_stpncpy (char *dst, const char *src, size_t n) -{ - size_t src_size = strnlen (src, n); - char *res; - - __bnd_chk_ptr_bounds (dst, n); - if (src_size < n) - { - __bnd_chk_ptr_bounds (src, src_size + 1); - res = dst + src_size; - } - else - { - __bnd_chk_ptr_bounds (src, src_size); - res = dst + n; - } - - memcpy (dst, src, src_size); - if (n > src_size) - memset (dst + src_size, 0, n - src_size); - - return res; -} - -char * -__mpx_wrapper_strcpy (char *dst, const char *src) -{ - size_t src_size = strlen (src); - - __bnd_chk_ptr_bounds (dst, src_size + 1); - __bnd_chk_ptr_bounds (src, src_size + 1); - - memcpy (dst, src, src_size + 1); - - return dst; -} - -char * -__mpx_wrapper_strncpy (char *dst, const char *src, size_t n) -{ - size_t src_size = strnlen (src, n); - - __bnd_chk_ptr_bounds (dst, n); - if (src_size < n) - __bnd_chk_ptr_bounds (src, src_size + 1); - else - __bnd_chk_ptr_bounds (src, src_size); - - memcpy (dst, src, src_size); - if (n > src_size) - memset (dst + src_size, 0, n - src_size); - - return dst; -} - -size_t -__mpx_wrapper_strlen (const char *s) -{ - size_t length = strlen (s); - __bnd_chk_ptr_bounds (s, length + 1); - return length; -} -- 2.30.2