diff --git a/dkarm-eabi/patches/gcc-4.5.2.patch b/dkarm-eabi/patches/gcc-4.5.2.patch
new file mode 100644
index 0000000..202617e
--- /dev/null
+++ b/dkarm-eabi/patches/gcc-4.5.2.patch
@@ -0,0 +1,4299 @@
+diff -Nbaur gcc-4.5.2/gcc/config/arm/t-arm-elf gcc-4.5.2-arm/gcc/config/arm/t-arm-elf
+--- gcc-4.5.2/gcc/config/arm/t-arm-elf 2009-08-06 15:27:45.000000000 +0100
++++ gcc-4.5.2-arm/gcc/config/arm/t-arm-elf 2010-12-18 14:34:41.000000000 +0000
+@@ -36,30 +36,30 @@
+ MULTILIB_EXCEPTIONS =
+ MULTILIB_MATCHES =
+
+-#MULTILIB_OPTIONS += march=armv7
+-#MULTILIB_DIRNAMES += thumb2
+-#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
+-#MULTILIB_MATCHES += march?armv7=march?armv7-a
+-#MULTILIB_MATCHES += march?armv7=march?armv7-r
+-#MULTILIB_MATCHES += march?armv7=march?armv7-m
+-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
+-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
+-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
++MULTILIB_OPTIONS += march=armv7
++MULTILIB_DIRNAMES += thumb2
++MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
++MULTILIB_MATCHES += march?armv7=march?armv7-a
++MULTILIB_MATCHES += march?armv7=march?armv7-r
++MULTILIB_MATCHES += march?armv7=march?armv7-m
++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
++MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
++MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
+
+ # Not quite true. We can support hard-vfp calling in Thumb2, but how do we
+ # express that here? Also, we really need architecture v5e or later
+ # (mcrr etc).
+-MULTILIB_OPTIONS += mfloat-abi=hard
+-MULTILIB_DIRNAMES += fpu
+-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
++# MULTILIB_OPTIONS += mfloat-abi=hard
++# MULTILIB_DIRNAMES += fpu
++# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
+
+ # MULTILIB_OPTIONS += mcpu=ep9312
+ # MULTILIB_DIRNAMES += ep9312
+ # MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*
+ #
+-# MULTILIB_OPTIONS += mlittle-endian/mbig-endian
+-# MULTILIB_DIRNAMES += le be
+-# MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
++MULTILIB_OPTIONS += mlittle-endian/mbig-endian
++MULTILIB_DIRNAMES += le be
++MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
+ #
+ # MULTILIB_OPTIONS += mhard-float/msoft-float
+ # MULTILIB_DIRNAMES += fpu soft
+diff -Nbaur gcc-4.5.2/gcc/config/arm/unknown-elf.h gcc-4.5.2-arm/gcc/config/arm/unknown-elf.h
+--- gcc-4.5.2/gcc/config/arm/unknown-elf.h 2009-02-20 15:20:38.000000000 +0000
++++ gcc-4.5.2-arm/gcc/config/arm/unknown-elf.h 2010-12-18 14:34:41.000000000 +0000
+@@ -97,4 +97,4 @@
+ udivmoddi4, which will depend on the exception unwind routines,
+ which will depend on abort, which is defined in libc. */
+ #undef LINK_GCC_C_SEQUENCE_SPEC
+-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
++#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
+diff -Nbaur gcc-4.5.2/gcc/gcc.c gcc-4.5.2-arm/gcc/gcc.c
+--- gcc-4.5.2/gcc/gcc.c 2010-04-18 18:46:08.000000000 +0100
++++ gcc-4.5.2-arm/gcc/gcc.c 2010-12-18 14:34:41.000000000 +0000
+@@ -678,6 +678,11 @@
+ #endif
+ #endif
+
++#ifndef LIBGLOSS_SPEC
++# define LIBGLOSS_SPEC "-lsysbase"
++#endif
++
++
+ /* config.h can define STARTFILE_SPEC to override the default crt0 files. */
+ #ifndef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+@@ -834,6 +839,7 @@
+ static const char *mflib_spec = MFLIB_SPEC;
+ static const char *link_gomp_spec = "";
+ static const char *libgcc_spec = LIBGCC_SPEC;
++static const char *libgloss_spec = LIBGLOSS_SPEC;
+ static const char *endfile_spec = ENDFILE_SPEC;
+ static const char *startfile_spec = STARTFILE_SPEC;
+ static const char *switches_need_spaces = SWITCHES_NEED_SPACES;
+@@ -1674,6 +1680,7 @@
+ INIT_STATIC_SPEC ("mflib", &mflib_spec),
+ INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
+ INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
++ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
+ INIT_STATIC_SPEC ("startfile", &startfile_spec),
+ INIT_STATIC_SPEC ("switches_need_spaces", &switches_need_spaces),
+ INIT_STATIC_SPEC ("cross_compile", &cross_compile),
+diff -Nbaur gcc-4.5.2/gcc/sched-deps.c gcc-4.5.2-arm/gcc/sched-deps.c
+--- gcc-4.5.2/gcc/sched-deps.c 2010-12-07 15:25:48.000000000 +0000
++++ gcc-4.5.2-arm/gcc/sched-deps.c 2010-12-18 14:34:41.000000000 +0000
+@@ -2278,6 +2278,12 @@
+ FIRST_STACK_REG + nregs);
+ }
+ #endif
++
++ /* If the stack pointer is being modified, flush out all memory
++ references as they may become invalid if moved across the
++ stack adjustment. */
++ if (dest == stack_pointer_rtx)
++ flush_pending_lists (deps, insn, true, true);
+ }
+ else if (MEM_P (dest))
+ {
+diff -Nbaur gcc-4.5.2/gcc/sched-deps.c.orig gcc-4.5.2-arm/gcc/sched-deps.c.orig
+--- gcc-4.5.2/gcc/sched-deps.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.5.2-arm/gcc/sched-deps.c.orig 2010-12-07 15:25:48.000000000 +0000
+@@ -0,0 +1,4177 @@
++/* Instruction scheduling pass. This file computes dependencies between
++ instructions.
++ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
++ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
++ Free Software Foundation, Inc.
++ Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
++ and currently maintained by, Jim Wilson (wilson@cygnus.com)
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 3, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING3. If not see
++. */
++
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "toplev.h"
++#include "rtl.h"
++#include "tm_p.h"
++#include "hard-reg-set.h"
++#include "regs.h"
++#include "function.h"
++#include "flags.h"
++#include "insn-config.h"
++#include "insn-attr.h"
++#include "except.h"
++#include "toplev.h"
++#include "recog.h"
++#include "sched-int.h"
++#include "params.h"
++#include "cselib.h"
++#include "ira.h"
++#include "target.h"
++
++#ifdef INSN_SCHEDULING
++
++#ifdef ENABLE_CHECKING
++#define CHECK (true)
++#else
++#define CHECK (false)
++#endif
++
++/* In deps->last_pending_memory_flush marks JUMP_INSNs that weren't
++ added to the list because of flush_pending_lists, stands just
++ for itself and not for any other pending memory reads/writes. */
++#define NON_FLUSH_JUMP_KIND REG_DEP_ANTI
++#define NON_FLUSH_JUMP_P(x) (REG_NOTE_KIND (x) == NON_FLUSH_JUMP_KIND)
++
++/* Holds current parameters for the dependency analyzer. */
++struct sched_deps_info_def *sched_deps_info;
++
++/* The data is specific to the Haifa scheduler. */
++VEC(haifa_deps_insn_data_def, heap) *h_d_i_d = NULL;
++
++/* Return the major type present in the DS. */
++enum reg_note
++ds_to_dk (ds_t ds)
++{
++ if (ds & DEP_TRUE)
++ return REG_DEP_TRUE;
++
++ if (ds & DEP_OUTPUT)
++ return REG_DEP_OUTPUT;
++
++ gcc_assert (ds & DEP_ANTI);
++
++ return REG_DEP_ANTI;
++}
++
++/* Return equivalent dep_status. */
++ds_t
++dk_to_ds (enum reg_note dk)
++{
++ switch (dk)
++ {
++ case REG_DEP_TRUE:
++ return DEP_TRUE;
++
++ case REG_DEP_OUTPUT:
++ return DEP_OUTPUT;
++
++ default:
++ gcc_assert (dk == REG_DEP_ANTI);
++ return DEP_ANTI;
++ }
++}
++
++/* Functions to operate with dependence information container - dep_t. */
++
++/* Init DEP with the arguments. */
++void
++init_dep_1 (dep_t dep, rtx pro, rtx con, enum reg_note type, ds_t ds)
++{
++ DEP_PRO (dep) = pro;
++ DEP_CON (dep) = con;
++ DEP_TYPE (dep) = type;
++ DEP_STATUS (dep) = ds;
++}
++
++/* Init DEP with the arguments.
++ While most of the scheduler (including targets) only need the major type
++ of the dependency, it is convenient to hide full dep_status from them. */
++void
++init_dep (dep_t dep, rtx pro, rtx con, enum reg_note kind)
++{
++ ds_t ds;
++
++ if ((current_sched_info->flags & USE_DEPS_LIST))
++ ds = dk_to_ds (kind);
++ else
++ ds = -1;
++
++ init_dep_1 (dep, pro, con, kind, ds);
++}
++
++/* Make a copy of FROM in TO. */
++static void
++copy_dep (dep_t to, dep_t from)
++{
++ memcpy (to, from, sizeof (*to));
++}
++
++static void dump_ds (FILE *, ds_t);
++
++/* Define flags for dump_dep (). */
++
++/* Dump producer of the dependence. */
++#define DUMP_DEP_PRO (2)
++
++/* Dump consumer of the dependence. */
++#define DUMP_DEP_CON (4)
++
++/* Dump type of the dependence. */
++#define DUMP_DEP_TYPE (8)
++
++/* Dump status of the dependence. */
++#define DUMP_DEP_STATUS (16)
++
++/* Dump all information about the dependence. */
++#define DUMP_DEP_ALL (DUMP_DEP_PRO | DUMP_DEP_CON | DUMP_DEP_TYPE \
++ |DUMP_DEP_STATUS)
++
++/* Dump DEP to DUMP.
++ FLAGS is a bit mask specifying what information about DEP needs
++ to be printed.
++ If FLAGS has the very first bit set, then dump all information about DEP
++ and propagate this bit into the callee dump functions. */
++static void
++dump_dep (FILE *dump, dep_t dep, int flags)
++{
++ if (flags & 1)
++ flags |= DUMP_DEP_ALL;
++
++ fprintf (dump, "<");
++
++ if (flags & DUMP_DEP_PRO)
++ fprintf (dump, "%d; ", INSN_UID (DEP_PRO (dep)));
++
++ if (flags & DUMP_DEP_CON)
++ fprintf (dump, "%d; ", INSN_UID (DEP_CON (dep)));
++
++ if (flags & DUMP_DEP_TYPE)
++ {
++ char t;
++ enum reg_note type = DEP_TYPE (dep);
++
++ switch (type)
++ {
++ case REG_DEP_TRUE:
++ t = 't';
++ break;
++
++ case REG_DEP_OUTPUT:
++ t = 'o';
++ break;
++
++ case REG_DEP_ANTI:
++ t = 'a';
++ break;
++
++ default:
++ gcc_unreachable ();
++ break;
++ }
++
++ fprintf (dump, "%c; ", t);
++ }
++
++ if (flags & DUMP_DEP_STATUS)
++ {
++ if (current_sched_info->flags & USE_DEPS_LIST)
++ dump_ds (dump, DEP_STATUS (dep));
++ }
++
++ fprintf (dump, ">");
++}
++
++/* Default flags for dump_dep (). */
++static int dump_dep_flags = (DUMP_DEP_PRO | DUMP_DEP_CON);
++
++/* Dump all fields of DEP to STDERR. */
++void
++sd_debug_dep (dep_t dep)
++{
++ dump_dep (stderr, dep, 1);
++ fprintf (stderr, "\n");
++}
++
++/* Determine whether DEP is a dependency link of a non-debug insn on a
++ debug insn. */
++
++static inline bool
++depl_on_debug_p (dep_link_t dep)
++{
++ return (DEBUG_INSN_P (DEP_LINK_PRO (dep))
++ && !DEBUG_INSN_P (DEP_LINK_CON (dep)));
++}
++
++/* Functions to operate with a single link from the dependencies lists -
++ dep_link_t. */
++
++/* Attach L to appear after link X whose &DEP_LINK_NEXT (X) is given by
++ PREV_NEXT_P. */
++static void
++attach_dep_link (dep_link_t l, dep_link_t *prev_nextp)
++{
++ dep_link_t next = *prev_nextp;
++
++ gcc_assert (DEP_LINK_PREV_NEXTP (l) == NULL
++ && DEP_LINK_NEXT (l) == NULL);
++
++ /* Init node being inserted. */
++ DEP_LINK_PREV_NEXTP (l) = prev_nextp;
++ DEP_LINK_NEXT (l) = next;
++
++ /* Fix next node. */
++ if (next != NULL)
++ {
++ gcc_assert (DEP_LINK_PREV_NEXTP (next) == prev_nextp);
++
++ DEP_LINK_PREV_NEXTP (next) = &DEP_LINK_NEXT (l);
++ }
++
++ /* Fix prev node. */
++ *prev_nextp = l;
++}
++
++/* Add dep_link LINK to deps_list L. */
++static void
++add_to_deps_list (dep_link_t link, deps_list_t l)
++{
++ attach_dep_link (link, &DEPS_LIST_FIRST (l));
++
++ /* Don't count debug deps. */
++ if (!depl_on_debug_p (link))
++ ++DEPS_LIST_N_LINKS (l);
++}
++
++/* Detach dep_link L from the list. */
++static void
++detach_dep_link (dep_link_t l)
++{
++ dep_link_t *prev_nextp = DEP_LINK_PREV_NEXTP (l);
++ dep_link_t next = DEP_LINK_NEXT (l);
++
++ *prev_nextp = next;
++
++ if (next != NULL)
++ DEP_LINK_PREV_NEXTP (next) = prev_nextp;
++
++ DEP_LINK_PREV_NEXTP (l) = NULL;
++ DEP_LINK_NEXT (l) = NULL;
++}
++
++/* Remove link LINK from list LIST. */
++static void
++remove_from_deps_list (dep_link_t link, deps_list_t list)
++{
++ detach_dep_link (link);
++
++ /* Don't count debug deps. */
++ if (!depl_on_debug_p (link))
++ --DEPS_LIST_N_LINKS (list);
++}
++
++/* Move link LINK from list FROM to list TO. */
++static void
++move_dep_link (dep_link_t link, deps_list_t from, deps_list_t to)
++{
++ remove_from_deps_list (link, from);
++ add_to_deps_list (link, to);
++}
++
++/* Return true of LINK is not attached to any list. */
++static bool
++dep_link_is_detached_p (dep_link_t link)
++{
++ return DEP_LINK_PREV_NEXTP (link) == NULL;
++}
++
++/* Pool to hold all dependency nodes (dep_node_t). */
++static alloc_pool dn_pool;
++
++/* Number of dep_nodes out there. */
++static int dn_pool_diff = 0;
++
++/* Create a dep_node. */
++static dep_node_t
++create_dep_node (void)
++{
++ dep_node_t n = (dep_node_t) pool_alloc (dn_pool);
++ dep_link_t back = DEP_NODE_BACK (n);
++ dep_link_t forw = DEP_NODE_FORW (n);
++
++ DEP_LINK_NODE (back) = n;
++ DEP_LINK_NEXT (back) = NULL;
++ DEP_LINK_PREV_NEXTP (back) = NULL;
++
++ DEP_LINK_NODE (forw) = n;
++ DEP_LINK_NEXT (forw) = NULL;
++ DEP_LINK_PREV_NEXTP (forw) = NULL;
++
++ ++dn_pool_diff;
++
++ return n;
++}
++
++/* Delete dep_node N. N must not be connected to any deps_list. */
++static void
++delete_dep_node (dep_node_t n)
++{
++ gcc_assert (dep_link_is_detached_p (DEP_NODE_BACK (n))
++ && dep_link_is_detached_p (DEP_NODE_FORW (n)));
++
++ --dn_pool_diff;
++
++ pool_free (dn_pool, n);
++}
++
++/* Pool to hold dependencies lists (deps_list_t). */
++static alloc_pool dl_pool;
++
++/* Number of deps_lists out there. */
++static int dl_pool_diff = 0;
++
++/* Functions to operate with dependences lists - deps_list_t. */
++
++/* Return true if list L is empty. */
++static bool
++deps_list_empty_p (deps_list_t l)
++{
++ return DEPS_LIST_N_LINKS (l) == 0;
++}
++
++/* Create a new deps_list. */
++static deps_list_t
++create_deps_list (void)
++{
++ deps_list_t l = (deps_list_t) pool_alloc (dl_pool);
++
++ DEPS_LIST_FIRST (l) = NULL;
++ DEPS_LIST_N_LINKS (l) = 0;
++
++ ++dl_pool_diff;
++ return l;
++}
++
++/* Free deps_list L. */
++static void
++free_deps_list (deps_list_t l)
++{
++ gcc_assert (deps_list_empty_p (l));
++
++ --dl_pool_diff;
++
++ pool_free (dl_pool, l);
++}
++
++/* Return true if there is no dep_nodes and deps_lists out there.
++ After the region is scheduled all the dependency nodes and lists
++ should [generally] be returned to pool. */
++bool
++deps_pools_are_empty_p (void)
++{
++ return dn_pool_diff == 0 && dl_pool_diff == 0;
++}
++
++/* Remove all elements from L. */
++static void
++clear_deps_list (deps_list_t l)
++{
++ do
++ {
++ dep_link_t link = DEPS_LIST_FIRST (l);
++
++ if (link == NULL)
++ break;
++
++ remove_from_deps_list (link, l);
++ }
++ while (1);
++}
++
++static regset reg_pending_sets;
++static regset reg_pending_clobbers;
++static regset reg_pending_uses;
++static enum reg_pending_barrier_mode reg_pending_barrier;
++
++/* Hard registers implicitly clobbered or used (or may be implicitly
++ clobbered or used) by the currently analyzed insn. For example,
++ insn in its constraint has one register class. Even if there is
++ currently no hard register in the insn, the particular hard
++ register will be in the insn after reload pass because the
++ constraint requires it. */
++static HARD_REG_SET implicit_reg_pending_clobbers;
++static HARD_REG_SET implicit_reg_pending_uses;
++
++/* To speed up the test for duplicate dependency links we keep a
++ record of dependencies created by add_dependence when the average
++ number of instructions in a basic block is very large.
++
++ Studies have shown that there is typically around 5 instructions between
++ branches for typical C code. So we can make a guess that the average
++ basic block is approximately 5 instructions long; we will choose 100X
++ the average size as a very large basic block.
++
++ Each insn has associated bitmaps for its dependencies. Each bitmap
++ has enough entries to represent a dependency on any other insn in
++ the insn chain. All bitmap for true dependencies cache is
++ allocated then the rest two ones are also allocated. */
++static bitmap_head *true_dependency_cache = NULL;
++static bitmap_head *output_dependency_cache = NULL;
++static bitmap_head *anti_dependency_cache = NULL;
++static bitmap_head *spec_dependency_cache = NULL;
++static int cache_size;
++
++static int deps_may_trap_p (const_rtx);
++static void add_dependence_list (rtx, rtx, int, enum reg_note);
++static void add_dependence_list_and_free (struct deps_desc *, rtx,
++ rtx *, int, enum reg_note);
++static void delete_all_dependences (rtx);
++static void fixup_sched_groups (rtx);
++
++static void flush_pending_lists (struct deps_desc *, rtx, int, int);
++static void sched_analyze_1 (struct deps_desc *, rtx, rtx);
++static void sched_analyze_2 (struct deps_desc *, rtx, rtx);
++static void sched_analyze_insn (struct deps_desc *, rtx, rtx);
++
++static bool sched_has_condition_p (const_rtx);
++static int conditions_mutex_p (const_rtx, const_rtx, bool, bool);
++
++static enum DEPS_ADJUST_RESULT maybe_add_or_update_dep_1 (dep_t, bool,
++ rtx, rtx);
++static enum DEPS_ADJUST_RESULT add_or_update_dep_1 (dep_t, bool, rtx, rtx);
++
++#ifdef ENABLE_CHECKING
++static void check_dep (dep_t, bool);
++#endif
++
++/* Return nonzero if a load of the memory reference MEM can cause a trap. */
++
++static int
++deps_may_trap_p (const_rtx mem)
++{
++ const_rtx addr = XEXP (mem, 0);
++
++ if (REG_P (addr) && REGNO (addr) >= FIRST_PSEUDO_REGISTER)
++ {
++ const_rtx t = get_reg_known_value (REGNO (addr));
++ if (t)
++ addr = t;
++ }
++ return rtx_addr_can_trap_p (addr);
++}
++
++
++/* Find the condition under which INSN is executed. If REV is not NULL,
++ it is set to TRUE when the returned comparison should be reversed
++ to get the actual condition. */
++static rtx
++sched_get_condition_with_rev (const_rtx insn, bool *rev)
++{
++ rtx pat = PATTERN (insn);
++ rtx src;
++
++ if (pat == 0)
++ return 0;
++
++ if (rev)
++ *rev = false;
++
++ if (GET_CODE (pat) == COND_EXEC)
++ return COND_EXEC_TEST (pat);
++
++ if (!any_condjump_p (insn) || !onlyjump_p (insn))
++ return 0;
++
++ src = SET_SRC (pc_set (insn));
++
++ if (XEXP (src, 2) == pc_rtx)
++ return XEXP (src, 0);
++ else if (XEXP (src, 1) == pc_rtx)
++ {
++ rtx cond = XEXP (src, 0);
++ enum rtx_code revcode = reversed_comparison_code (cond, insn);
++
++ if (revcode == UNKNOWN)
++ return 0;
++
++ if (rev)
++ *rev = true;
++ return cond;
++ }
++
++ return 0;
++}
++
++/* True when we can find a condition under which INSN is executed. */
++static bool
++sched_has_condition_p (const_rtx insn)
++{
++ return !! sched_get_condition_with_rev (insn, NULL);
++}
++
++
++
++/* Return nonzero if conditions COND1 and COND2 can never be both true. */
++static int
++conditions_mutex_p (const_rtx cond1, const_rtx cond2, bool rev1, bool rev2)
++{
++ if (COMPARISON_P (cond1)
++ && COMPARISON_P (cond2)
++ && GET_CODE (cond1) ==
++ (rev1==rev2
++ ? reversed_comparison_code (cond2, NULL)
++ : GET_CODE (cond2))
++ && XEXP (cond1, 0) == XEXP (cond2, 0)
++ && XEXP (cond1, 1) == XEXP (cond2, 1))
++ return 1;
++ return 0;
++}
++
++/* Return true if insn1 and insn2 can never depend on one another because
++ the conditions under which they are executed are mutually exclusive. */
++bool
++sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2)
++{
++ rtx cond1, cond2;
++ bool rev1 = false, rev2 = false;
++
++ /* df doesn't handle conditional lifetimes entirely correctly;
++ calls mess up the conditional lifetimes. */
++ if (!CALL_P (insn1) && !CALL_P (insn2))
++ {
++ cond1 = sched_get_condition_with_rev (insn1, &rev1);
++ cond2 = sched_get_condition_with_rev (insn2, &rev2);
++ if (cond1 && cond2
++ && conditions_mutex_p (cond1, cond2, rev1, rev2)
++ /* Make sure first instruction doesn't affect condition of second
++ instruction if switched. */
++ && !modified_in_p (cond1, insn2)
++ /* Make sure second instruction doesn't affect condition of first
++ instruction if switched. */
++ && !modified_in_p (cond2, insn1))
++ return true;
++ }
++ return false;
++}
++
++
++/* Return true if INSN can potentially be speculated with type DS. */
++bool
++sched_insn_is_legitimate_for_speculation_p (const_rtx insn, ds_t ds)
++{
++ if (HAS_INTERNAL_DEP (insn))
++ return false;
++
++ if (!NONJUMP_INSN_P (insn))
++ return false;
++
++ if (SCHED_GROUP_P (insn))
++ return false;
++
++ if (IS_SPECULATION_CHECK_P (CONST_CAST_RTX (insn)))
++ return false;
++
++ if (side_effects_p (PATTERN (insn)))
++ return false;
++
++ if (ds & BE_IN_SPEC)
++ /* The following instructions, which depend on a speculatively scheduled
++ instruction, cannot be speculatively scheduled along. */
++ {
++ if (may_trap_p (PATTERN (insn)))
++ /* If instruction might trap, it cannot be speculatively scheduled.
++ For control speculation it's obvious why and for data speculation
++ it's because the insn might get wrong input if speculation
++ wasn't successful. */
++ return false;
++
++ if ((ds & BE_IN_DATA)
++ && sched_has_condition_p (insn))
++ /* If this is a predicated instruction, then it cannot be
++ speculatively scheduled. See PR35659. */
++ return false;
++ }
++
++ return true;
++}
++
++/* Initialize LIST_PTR to point to one of the lists present in TYPES_PTR,
++ initialize RESOLVED_P_PTR with true if that list consists of resolved deps,
++ and remove the type of returned [through LIST_PTR] list from TYPES_PTR.
++ This function is used to switch sd_iterator to the next list.
++ !!! For internal use only. Might consider moving it to sched-int.h. */
++void
++sd_next_list (const_rtx insn, sd_list_types_def *types_ptr,
++ deps_list_t *list_ptr, bool *resolved_p_ptr)
++{
++ sd_list_types_def types = *types_ptr;
++
++ if (types & SD_LIST_HARD_BACK)
++ {
++ *list_ptr = INSN_HARD_BACK_DEPS (insn);
++ *resolved_p_ptr = false;
++ *types_ptr = types & ~SD_LIST_HARD_BACK;
++ }
++ else if (types & SD_LIST_SPEC_BACK)
++ {
++ *list_ptr = INSN_SPEC_BACK_DEPS (insn);
++ *resolved_p_ptr = false;
++ *types_ptr = types & ~SD_LIST_SPEC_BACK;
++ }
++ else if (types & SD_LIST_FORW)
++ {
++ *list_ptr = INSN_FORW_DEPS (insn);
++ *resolved_p_ptr = false;
++ *types_ptr = types & ~SD_LIST_FORW;
++ }
++ else if (types & SD_LIST_RES_BACK)
++ {
++ *list_ptr = INSN_RESOLVED_BACK_DEPS (insn);
++ *resolved_p_ptr = true;
++ *types_ptr = types & ~SD_LIST_RES_BACK;
++ }
++ else if (types & SD_LIST_RES_FORW)
++ {
++ *list_ptr = INSN_RESOLVED_FORW_DEPS (insn);
++ *resolved_p_ptr = true;
++ *types_ptr = types & ~SD_LIST_RES_FORW;
++ }
++ else
++ {
++ *list_ptr = NULL;
++ *resolved_p_ptr = false;
++ *types_ptr = SD_LIST_NONE;
++ }
++}
++
++/* Return the summary size of INSN's lists defined by LIST_TYPES. */
++int
++sd_lists_size (const_rtx insn, sd_list_types_def list_types)
++{
++ int size = 0;
++
++ while (list_types != SD_LIST_NONE)
++ {
++ deps_list_t list;
++ bool resolved_p;
++
++ sd_next_list (insn, &list_types, &list, &resolved_p);
++ if (list)
++ size += DEPS_LIST_N_LINKS (list);
++ }
++
++ return size;
++}
++
++/* Return true if INSN's lists defined by LIST_TYPES are all empty. */
++
++bool
++sd_lists_empty_p (const_rtx insn, sd_list_types_def list_types)
++{
++ while (list_types != SD_LIST_NONE)
++ {
++ deps_list_t list;
++ bool resolved_p;
++
++ sd_next_list (insn, &list_types, &list, &resolved_p);
++ if (!deps_list_empty_p (list))
++ return false;
++ }
++
++ return true;
++}
++
++/* Initialize data for INSN. */
++void
++sd_init_insn (rtx insn)
++{
++ INSN_HARD_BACK_DEPS (insn) = create_deps_list ();
++ INSN_SPEC_BACK_DEPS (insn) = create_deps_list ();
++ INSN_RESOLVED_BACK_DEPS (insn) = create_deps_list ();
++ INSN_FORW_DEPS (insn) = create_deps_list ();
++ INSN_RESOLVED_FORW_DEPS (insn) = create_deps_list ();
++
++ if (DEBUG_INSN_P (insn))
++ DEBUG_INSN_SCHED_P (insn) = TRUE;
++
++ /* ??? It would be nice to allocate dependency caches here. */
++}
++
++/* Free data for INSN. */
++void
++sd_finish_insn (rtx insn)
++{
++ /* ??? It would be nice to deallocate dependency caches here. */
++
++ if (DEBUG_INSN_P (insn))
++ {
++ gcc_assert (DEBUG_INSN_SCHED_P (insn));
++ DEBUG_INSN_SCHED_P (insn) = FALSE;
++ }
++
++ free_deps_list (INSN_HARD_BACK_DEPS (insn));
++ INSN_HARD_BACK_DEPS (insn) = NULL;
++
++ free_deps_list (INSN_SPEC_BACK_DEPS (insn));
++ INSN_SPEC_BACK_DEPS (insn) = NULL;
++
++ free_deps_list (INSN_RESOLVED_BACK_DEPS (insn));
++ INSN_RESOLVED_BACK_DEPS (insn) = NULL;
++
++ free_deps_list (INSN_FORW_DEPS (insn));
++ INSN_FORW_DEPS (insn) = NULL;
++
++ free_deps_list (INSN_RESOLVED_FORW_DEPS (insn));
++ INSN_RESOLVED_FORW_DEPS (insn) = NULL;
++}
++
++/* Find a dependency between producer PRO and consumer CON.
++ Search through resolved dependency lists if RESOLVED_P is true.
++ If no such dependency is found return NULL,
++ otherwise return the dependency and initialize SD_IT_PTR [if it is nonnull]
++ with an iterator pointing to it. */
++static dep_t
++sd_find_dep_between_no_cache (rtx pro, rtx con, bool resolved_p,
++ sd_iterator_def *sd_it_ptr)
++{
++ sd_list_types_def pro_list_type;
++ sd_list_types_def con_list_type;
++ sd_iterator_def sd_it;
++ dep_t dep;
++ bool found_p = false;
++
++ if (resolved_p)
++ {
++ pro_list_type = SD_LIST_RES_FORW;
++ con_list_type = SD_LIST_RES_BACK;
++ }
++ else
++ {
++ pro_list_type = SD_LIST_FORW;
++ con_list_type = SD_LIST_BACK;
++ }
++
++ /* Walk through either back list of INSN or forw list of ELEM
++ depending on which one is shorter. */
++ if (sd_lists_size (con, con_list_type) < sd_lists_size (pro, pro_list_type))
++ {
++ /* Find the dep_link with producer PRO in consumer's back_deps. */
++ FOR_EACH_DEP (con, con_list_type, sd_it, dep)
++ if (DEP_PRO (dep) == pro)
++ {
++ found_p = true;
++ break;
++ }
++ }
++ else
++ {
++ /* Find the dep_link with consumer CON in producer's forw_deps. */
++ FOR_EACH_DEP (pro, pro_list_type, sd_it, dep)
++ if (DEP_CON (dep) == con)
++ {
++ found_p = true;
++ break;
++ }
++ }
++
++ if (found_p)
++ {
++ if (sd_it_ptr != NULL)
++ *sd_it_ptr = sd_it;
++
++ return dep;
++ }
++
++ return NULL;
++}
++
++/* Find a dependency between producer PRO and consumer CON.
++ Use dependency [if available] to check if dependency is present at all.
++ Search through resolved dependency lists if RESOLVED_P is true.
++ If the dependency or NULL if none found. */
++dep_t
++sd_find_dep_between (rtx pro, rtx con, bool resolved_p)
++{
++ if (true_dependency_cache != NULL)
++ /* Avoiding the list walk below can cut compile times dramatically
++ for some code. */
++ {
++ int elem_luid = INSN_LUID (pro);
++ int insn_luid = INSN_LUID (con);
++
++ gcc_assert (output_dependency_cache != NULL
++ && anti_dependency_cache != NULL);
++
++ if (!bitmap_bit_p (&true_dependency_cache[insn_luid], elem_luid)
++ && !bitmap_bit_p (&output_dependency_cache[insn_luid], elem_luid)
++ && !bitmap_bit_p (&anti_dependency_cache[insn_luid], elem_luid))
++ return NULL;
++ }
++
++ return sd_find_dep_between_no_cache (pro, con, resolved_p, NULL);
++}
++
++/* Add or update a dependence described by DEP.
++ MEM1 and MEM2, if non-null, correspond to memory locations in case of
++ data speculation.
++
++ The function returns a value indicating if an old entry has been changed
++ or a new entry has been added to insn's backward deps.
++
++ This function merely checks if producer and consumer is the same insn
++ and doesn't create a dep in this case. Actual manipulation of
++ dependence data structures is performed in add_or_update_dep_1. */
++static enum DEPS_ADJUST_RESULT
++maybe_add_or_update_dep_1 (dep_t dep, bool resolved_p, rtx mem1, rtx mem2)
++{
++ rtx elem = DEP_PRO (dep);
++ rtx insn = DEP_CON (dep);
++
++ gcc_assert (INSN_P (insn) && INSN_P (elem));
++
++ /* Don't depend an insn on itself. */
++ if (insn == elem)
++ {
++ if (sched_deps_info->generate_spec_deps)
++ /* INSN has an internal dependence, which we can't overcome. */
++ HAS_INTERNAL_DEP (insn) = 1;
++
++ return DEP_NODEP;
++ }
++
++ return add_or_update_dep_1 (dep, resolved_p, mem1, mem2);
++}
++
++/* Ask dependency caches what needs to be done for dependence DEP.
++ Return DEP_CREATED if new dependence should be created and there is no
++ need to try to find one searching the dependencies lists.
++ Return DEP_PRESENT if there already is a dependence described by DEP and
++ hence nothing is to be done.
++ Return DEP_CHANGED if there already is a dependence, but it should be
++ updated to incorporate additional information from DEP. */
++static enum DEPS_ADJUST_RESULT
++ask_dependency_caches (dep_t dep)
++{
++ int elem_luid = INSN_LUID (DEP_PRO (dep));
++ int insn_luid = INSN_LUID (DEP_CON (dep));
++
++ gcc_assert (true_dependency_cache != NULL
++ && output_dependency_cache != NULL
++ && anti_dependency_cache != NULL);
++
++ if (!(current_sched_info->flags & USE_DEPS_LIST))
++ {
++ enum reg_note present_dep_type;
++
++ if (bitmap_bit_p (&true_dependency_cache[insn_luid], elem_luid))
++ present_dep_type = REG_DEP_TRUE;
++ else if (bitmap_bit_p (&output_dependency_cache[insn_luid], elem_luid))
++ present_dep_type = REG_DEP_OUTPUT;
++ else if (bitmap_bit_p (&anti_dependency_cache[insn_luid], elem_luid))
++ present_dep_type = REG_DEP_ANTI;
++ else
++ /* There is no existing dep so it should be created. */
++ return DEP_CREATED;
++
++ if ((int) DEP_TYPE (dep) >= (int) present_dep_type)
++ /* DEP does not add anything to the existing dependence. */
++ return DEP_PRESENT;
++ }
++ else
++ {
++ ds_t present_dep_types = 0;
++
++ if (bitmap_bit_p (&true_dependency_cache[insn_luid], elem_luid))
++ present_dep_types |= DEP_TRUE;
++ if (bitmap_bit_p (&output_dependency_cache[insn_luid], elem_luid))
++ present_dep_types |= DEP_OUTPUT;
++ if (bitmap_bit_p (&anti_dependency_cache[insn_luid], elem_luid))
++ present_dep_types |= DEP_ANTI;
++
++ if (present_dep_types == 0)
++ /* There is no existing dep so it should be created. */
++ return DEP_CREATED;
++
++ if (!(current_sched_info->flags & DO_SPECULATION)
++ || !bitmap_bit_p (&spec_dependency_cache[insn_luid], elem_luid))
++ {
++ if ((present_dep_types | (DEP_STATUS (dep) & DEP_TYPES))
++ == present_dep_types)
++ /* DEP does not add anything to the existing dependence. */
++ return DEP_PRESENT;
++ }
++ else
++ {
++ /* Only true dependencies can be data speculative and
++ only anti dependencies can be control speculative. */
++ gcc_assert ((present_dep_types & (DEP_TRUE | DEP_ANTI))
++ == present_dep_types);
++
++ /* if (DEP is SPECULATIVE) then
++ ..we should update DEP_STATUS
++ else
++ ..we should reset existing dep to non-speculative. */
++ }
++ }
++
++ return DEP_CHANGED;
++}
++
++/* Set dependency caches according to DEP. */
++static void
++set_dependency_caches (dep_t dep)
++{
++ int elem_luid = INSN_LUID (DEP_PRO (dep));
++ int insn_luid = INSN_LUID (DEP_CON (dep));
++
++ if (!(current_sched_info->flags & USE_DEPS_LIST))
++ {
++ switch (DEP_TYPE (dep))
++ {
++ case REG_DEP_TRUE:
++ bitmap_set_bit (&true_dependency_cache[insn_luid], elem_luid);
++ break;
++
++ case REG_DEP_OUTPUT:
++ bitmap_set_bit (&output_dependency_cache[insn_luid], elem_luid);
++ break;
++
++ case REG_DEP_ANTI:
++ bitmap_set_bit (&anti_dependency_cache[insn_luid], elem_luid);
++ break;
++
++ default:
++ gcc_unreachable ();
++ }
++ }
++ else
++ {
++ ds_t ds = DEP_STATUS (dep);
++
++ if (ds & DEP_TRUE)
++ bitmap_set_bit (&true_dependency_cache[insn_luid], elem_luid);
++ if (ds & DEP_OUTPUT)
++ bitmap_set_bit (&output_dependency_cache[insn_luid], elem_luid);
++ if (ds & DEP_ANTI)
++ bitmap_set_bit (&anti_dependency_cache[insn_luid], elem_luid);
++
++ if (ds & SPECULATIVE)
++ {
++ gcc_assert (current_sched_info->flags & DO_SPECULATION);
++ bitmap_set_bit (&spec_dependency_cache[insn_luid], elem_luid);
++ }
++ }
++}
++
++/* Type of dependence DEP have changed from OLD_TYPE. Update dependency
++ caches accordingly. */
++static void
++update_dependency_caches (dep_t dep, enum reg_note old_type)
++{
++ int elem_luid = INSN_LUID (DEP_PRO (dep));
++ int insn_luid = INSN_LUID (DEP_CON (dep));
++
++ /* Clear corresponding cache entry because type of the link
++ may have changed. Keep them if we use_deps_list. */
++ if (!(current_sched_info->flags & USE_DEPS_LIST))
++ {
++ switch (old_type)
++ {
++ case REG_DEP_OUTPUT:
++ bitmap_clear_bit (&output_dependency_cache[insn_luid], elem_luid);
++ break;
++
++ case REG_DEP_ANTI:
++ bitmap_clear_bit (&anti_dependency_cache[insn_luid], elem_luid);
++ break;
++
++ default:
++ gcc_unreachable ();
++ }
++ }
++
++ set_dependency_caches (dep);
++}
++
++/* Convert a dependence pointed to by SD_IT to be non-speculative. */
++static void
++change_spec_dep_to_hard (sd_iterator_def sd_it)
++{
++ dep_node_t node = DEP_LINK_NODE (*sd_it.linkp);
++ dep_link_t link = DEP_NODE_BACK (node);
++ dep_t dep = DEP_NODE_DEP (node);
++ rtx elem = DEP_PRO (dep);
++ rtx insn = DEP_CON (dep);
++
++ move_dep_link (link, INSN_SPEC_BACK_DEPS (insn), INSN_HARD_BACK_DEPS (insn));
++
++ DEP_STATUS (dep) &= ~SPECULATIVE;
++
++ if (true_dependency_cache != NULL)
++ /* Clear the cache entry. */
++ bitmap_clear_bit (&spec_dependency_cache[INSN_LUID (insn)],
++ INSN_LUID (elem));
++}
++
++/* Update DEP to incorporate information from NEW_DEP.
++ SD_IT points to DEP in case it should be moved to another list.
++ MEM1 and MEM2, if nonnull, correspond to memory locations in case if
++ data-speculative dependence should be updated. */
++static enum DEPS_ADJUST_RESULT
++update_dep (dep_t dep, dep_t new_dep,
++ sd_iterator_def sd_it ATTRIBUTE_UNUSED,
++ rtx mem1 ATTRIBUTE_UNUSED,
++ rtx mem2 ATTRIBUTE_UNUSED)
++{
++ enum DEPS_ADJUST_RESULT res = DEP_PRESENT;
++ enum reg_note old_type = DEP_TYPE (dep);
++
++ /* If this is a more restrictive type of dependence than the
++ existing one, then change the existing dependence to this
++ type. */
++ if ((int) DEP_TYPE (new_dep) < (int) old_type)
++ {
++ DEP_TYPE (dep) = DEP_TYPE (new_dep);
++ res = DEP_CHANGED;
++ }
++
++ if (current_sched_info->flags & USE_DEPS_LIST)
++ /* Update DEP_STATUS. */
++ {
++ ds_t dep_status = DEP_STATUS (dep);
++ ds_t ds = DEP_STATUS (new_dep);
++ ds_t new_status = ds | dep_status;
++
++ if (new_status & SPECULATIVE)
++ /* Either existing dep or a dep we're adding or both are
++ speculative. */
++ {
++ if (!(ds & SPECULATIVE)
++ || !(dep_status & SPECULATIVE))
++ /* The new dep can't be speculative. */
++ {
++ new_status &= ~SPECULATIVE;
++
++ if (dep_status & SPECULATIVE)
++ /* The old dep was speculative, but now it
++ isn't. */
++ change_spec_dep_to_hard (sd_it);
++ }
++ else
++ {
++ /* Both are speculative. Merge probabilities. */
++ if (mem1 != NULL)
++ {
++ dw_t dw;
++
++ dw = estimate_dep_weak (mem1, mem2);
++ ds = set_dep_weak (ds, BEGIN_DATA, dw);
++ }
++
++ new_status = ds_merge (dep_status, ds);
++ }
++ }
++
++ ds = new_status;
++
++ if (dep_status != ds)
++ {
++ DEP_STATUS (dep) = ds;
++ res = DEP_CHANGED;
++ }
++ }
++
++ if (true_dependency_cache != NULL
++ && res == DEP_CHANGED)
++ update_dependency_caches (dep, old_type);
++
++ return res;
++}
++
++/* Add or update a dependence described by DEP.
++ MEM1 and MEM2, if non-null, correspond to memory locations in case of
++ data speculation.
++
++ The function returns a value indicating if an old entry has been changed
++ or a new entry has been added to insn's backward deps or nothing has
++ been updated at all. */
++static enum DEPS_ADJUST_RESULT
++add_or_update_dep_1 (dep_t new_dep, bool resolved_p,
++ rtx mem1 ATTRIBUTE_UNUSED, rtx mem2 ATTRIBUTE_UNUSED)
++{
++ bool maybe_present_p = true;
++ bool present_p = false;
++
++ gcc_assert (INSN_P (DEP_PRO (new_dep)) && INSN_P (DEP_CON (new_dep))
++ && DEP_PRO (new_dep) != DEP_CON (new_dep));
++
++#ifdef ENABLE_CHECKING
++ check_dep (new_dep, mem1 != NULL);
++#endif
++
++ if (true_dependency_cache != NULL)
++ {
++ switch (ask_dependency_caches (new_dep))
++ {
++ case DEP_PRESENT:
++ return DEP_PRESENT;
++
++ case DEP_CHANGED:
++ maybe_present_p = true;
++ present_p = true;
++ break;
++
++ case DEP_CREATED:
++ maybe_present_p = false;
++ present_p = false;
++ break;
++
++ default:
++ gcc_unreachable ();
++ break;
++ }
++ }
++
++ /* Check that we don't already have this dependence. */
++ if (maybe_present_p)
++ {
++ dep_t present_dep;
++ sd_iterator_def sd_it;
++
++ gcc_assert (true_dependency_cache == NULL || present_p);
++
++ present_dep = sd_find_dep_between_no_cache (DEP_PRO (new_dep),
++ DEP_CON (new_dep),
++ resolved_p, &sd_it);
++
++ if (present_dep != NULL)
++ /* We found an existing dependency between ELEM and INSN. */
++ return update_dep (present_dep, new_dep, sd_it, mem1, mem2);
++ else
++ /* We didn't find a dep, it shouldn't present in the cache. */
++ gcc_assert (!present_p);
++ }
++
++ /* Might want to check one level of transitivity to save conses.
++ This check should be done in maybe_add_or_update_dep_1.
++ Since we made it to add_or_update_dep_1, we must create
++ (or update) a link. */
++
++ if (mem1 != NULL_RTX)
++ {
++ gcc_assert (sched_deps_info->generate_spec_deps);
++ DEP_STATUS (new_dep) = set_dep_weak (DEP_STATUS (new_dep), BEGIN_DATA,
++ estimate_dep_weak (mem1, mem2));
++ }
++
++ sd_add_dep (new_dep, resolved_p);
++
++ return DEP_CREATED;
++}
++
++/* Initialize BACK_LIST_PTR with consumer's backward list and
++ FORW_LIST_PTR with producer's forward list. If RESOLVED_P is true
++ initialize with lists that hold resolved deps. */
++static void
++get_back_and_forw_lists (dep_t dep, bool resolved_p,
++ deps_list_t *back_list_ptr,
++ deps_list_t *forw_list_ptr)
++{
++ rtx con = DEP_CON (dep);
++
++ if (!resolved_p)
++ {
++ if ((current_sched_info->flags & DO_SPECULATION)
++ && (DEP_STATUS (dep) & SPECULATIVE))
++ *back_list_ptr = INSN_SPEC_BACK_DEPS (con);
++ else
++ *back_list_ptr = INSN_HARD_BACK_DEPS (con);
++
++ *forw_list_ptr = INSN_FORW_DEPS (DEP_PRO (dep));
++ }
++ else
++ {
++ *back_list_ptr = INSN_RESOLVED_BACK_DEPS (con);
++ *forw_list_ptr = INSN_RESOLVED_FORW_DEPS (DEP_PRO (dep));
++ }
++}
++
++/* Add dependence described by DEP.
++ If RESOLVED_P is true treat the dependence as a resolved one. */
++void
++sd_add_dep (dep_t dep, bool resolved_p)
++{
++ dep_node_t n = create_dep_node ();
++ deps_list_t con_back_deps;
++ deps_list_t pro_forw_deps;
++ rtx elem = DEP_PRO (dep);
++ rtx insn = DEP_CON (dep);
++
++ gcc_assert (INSN_P (insn) && INSN_P (elem) && insn != elem);
++
++ if ((current_sched_info->flags & DO_SPECULATION)
++ && !sched_insn_is_legitimate_for_speculation_p (insn, DEP_STATUS (dep)))
++ DEP_STATUS (dep) &= ~SPECULATIVE;
++
++ copy_dep (DEP_NODE_DEP (n), dep);
++
++ get_back_and_forw_lists (dep, resolved_p, &con_back_deps, &pro_forw_deps);
++
++ add_to_deps_list (DEP_NODE_BACK (n), con_back_deps);
++
++#ifdef ENABLE_CHECKING
++ check_dep (dep, false);
++#endif
++
++ add_to_deps_list (DEP_NODE_FORW (n), pro_forw_deps);
++
++ /* If we are adding a dependency to INSN's LOG_LINKs, then note that
++ in the bitmap caches of dependency information. */
++ if (true_dependency_cache != NULL)
++ set_dependency_caches (dep);
++}
++
++/* Add or update backward dependence between INSN and ELEM
++ with given type DEP_TYPE and dep_status DS.
++ This function is a convenience wrapper. */
++enum DEPS_ADJUST_RESULT
++sd_add_or_update_dep (dep_t dep, bool resolved_p)
++{
++ return add_or_update_dep_1 (dep, resolved_p, NULL_RTX, NULL_RTX);
++}
++
++/* Resolved dependence pointed to by SD_IT.
++ SD_IT will advance to the next element. */
++void
++sd_resolve_dep (sd_iterator_def sd_it)
++{
++ dep_node_t node = DEP_LINK_NODE (*sd_it.linkp);
++ dep_t dep = DEP_NODE_DEP (node);
++ rtx pro = DEP_PRO (dep);
++ rtx con = DEP_CON (dep);
++
++ if ((current_sched_info->flags & DO_SPECULATION)
++ && (DEP_STATUS (dep) & SPECULATIVE))
++ move_dep_link (DEP_NODE_BACK (node), INSN_SPEC_BACK_DEPS (con),
++ INSN_RESOLVED_BACK_DEPS (con));
++ else
++ move_dep_link (DEP_NODE_BACK (node), INSN_HARD_BACK_DEPS (con),
++ INSN_RESOLVED_BACK_DEPS (con));
++
++ move_dep_link (DEP_NODE_FORW (node), INSN_FORW_DEPS (pro),
++ INSN_RESOLVED_FORW_DEPS (pro));
++}
++
++/* Make TO depend on all the FROM's producers.
++ If RESOLVED_P is true add dependencies to the resolved lists. */
++void
++sd_copy_back_deps (rtx to, rtx from, bool resolved_p)
++{
++ sd_list_types_def list_type;
++ sd_iterator_def sd_it;
++ dep_t dep;
++
++ list_type = resolved_p ? SD_LIST_RES_BACK : SD_LIST_BACK;
++
++ FOR_EACH_DEP (from, list_type, sd_it, dep)
++ {
++ dep_def _new_dep, *new_dep = &_new_dep;
++
++ copy_dep (new_dep, dep);
++ DEP_CON (new_dep) = to;
++ sd_add_dep (new_dep, resolved_p);
++ }
++}
++
++/* Remove a dependency referred to by SD_IT.
++ SD_IT will point to the next dependence after removal. */
++void
++sd_delete_dep (sd_iterator_def sd_it)
++{
++ dep_node_t n = DEP_LINK_NODE (*sd_it.linkp);
++ dep_t dep = DEP_NODE_DEP (n);
++ rtx pro = DEP_PRO (dep);
++ rtx con = DEP_CON (dep);
++ deps_list_t con_back_deps;
++ deps_list_t pro_forw_deps;
++
++ if (true_dependency_cache != NULL)
++ {
++ int elem_luid = INSN_LUID (pro);
++ int insn_luid = INSN_LUID (con);
++
++ bitmap_clear_bit (&true_dependency_cache[insn_luid], elem_luid);
++ bitmap_clear_bit (&anti_dependency_cache[insn_luid], elem_luid);
++ bitmap_clear_bit (&output_dependency_cache[insn_luid], elem_luid);
++
++ if (current_sched_info->flags & DO_SPECULATION)
++ bitmap_clear_bit (&spec_dependency_cache[insn_luid], elem_luid);
++ }
++
++ get_back_and_forw_lists (dep, sd_it.resolved_p,
++ &con_back_deps, &pro_forw_deps);
++
++ remove_from_deps_list (DEP_NODE_BACK (n), con_back_deps);
++ remove_from_deps_list (DEP_NODE_FORW (n), pro_forw_deps);
++
++ delete_dep_node (n);
++}
++
++/* Dump size of the lists. */
++#define DUMP_LISTS_SIZE (2)
++
++/* Dump dependencies of the lists. */
++#define DUMP_LISTS_DEPS (4)
++
++/* Dump all information about the lists. */
++#define DUMP_LISTS_ALL (DUMP_LISTS_SIZE | DUMP_LISTS_DEPS)
++
++/* Dump deps_lists of INSN specified by TYPES to DUMP.
++ FLAGS is a bit mask specifying what information about the lists needs
++ to be printed.
++ If FLAGS has the very first bit set, then dump all information about
++ the lists and propagate this bit into the callee dump functions. */
++static void
++dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags)
++{
++ sd_iterator_def sd_it;
++ dep_t dep;
++ int all;
++
++ all = (flags & 1);
++
++ if (all)
++ flags |= DUMP_LISTS_ALL;
++
++ fprintf (dump, "[");
++
++ if (flags & DUMP_LISTS_SIZE)
++ fprintf (dump, "%d; ", sd_lists_size (insn, types));
++
++ if (flags & DUMP_LISTS_DEPS)
++ {
++ FOR_EACH_DEP (insn, types, sd_it, dep)
++ {
++ dump_dep (dump, dep, dump_dep_flags | all);
++ fprintf (dump, " ");
++ }
++ }
++}
++
++/* Dump all information about deps_lists of INSN specified by TYPES
++ to STDERR. */
++void
++sd_debug_lists (rtx insn, sd_list_types_def types)
++{
++ dump_lists (stderr, insn, types, 1);
++ fprintf (stderr, "\n");
++}
++
++/* A convenience wrapper to operate on an entire list. */
++
++static void
++add_dependence_list (rtx insn, rtx list, int uncond, enum reg_note dep_type)
++{
++ for (; list; list = XEXP (list, 1))
++ {
++ if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0)))
++ add_dependence (insn, XEXP (list, 0), dep_type);
++ }
++}
++
++/* Similar, but free *LISTP at the same time, when the context
++ is not readonly. */
++
++static void
++add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
++ int uncond, enum reg_note dep_type)
++{
++ rtx list, next;
++
++ if (deps->readonly)
++ {
++ add_dependence_list (insn, *listp, uncond, dep_type);
++ return;
++ }
++
++ for (list = *listp, *listp = NULL; list ; list = next)
++ {
++ next = XEXP (list, 1);
++ if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0)))
++ add_dependence (insn, XEXP (list, 0), dep_type);
++ free_INSN_LIST_node (list);
++ }
++}
++
++/* Remove all occurences of INSN from LIST. Return the number of
++ occurences removed. */
++
++static int
++remove_from_dependence_list (rtx insn, rtx* listp)
++{
++ int removed = 0;
++
++ while (*listp)
++ {
++ if (XEXP (*listp, 0) == insn)
++ {
++ remove_free_INSN_LIST_node (listp);
++ removed++;
++ continue;
++ }
++
++ listp = &XEXP (*listp, 1);
++ }
++
++ return removed;
++}
++
++/* Same as above, but process two lists at once. */
++static int
++remove_from_both_dependence_lists (rtx insn, rtx *listp, rtx *exprp)
++{
++ int removed = 0;
++
++ while (*listp)
++ {
++ if (XEXP (*listp, 0) == insn)
++ {
++ remove_free_INSN_LIST_node (listp);
++ remove_free_EXPR_LIST_node (exprp);
++ removed++;
++ continue;
++ }
++
++ listp = &XEXP (*listp, 1);
++ exprp = &XEXP (*exprp, 1);
++ }
++
++ return removed;
++}
++
++/* Clear all dependencies for an insn. */
++static void
++delete_all_dependences (rtx insn)
++{
++ sd_iterator_def sd_it;
++ dep_t dep;
++
++ /* The below cycle can be optimized to clear the caches and back_deps
++ in one call but that would provoke duplication of code from
++ delete_dep (). */
++
++ for (sd_it = sd_iterator_start (insn, SD_LIST_BACK);
++ sd_iterator_cond (&sd_it, &dep);)
++ sd_delete_dep (sd_it);
++}
++
++/* All insns in a scheduling group except the first should only have
++ dependencies on the previous insn in the group. So we find the
++ first instruction in the scheduling group by walking the dependence
++ chains backwards. Then we add the dependencies for the group to
++ the previous nonnote insn. */
++
++static void
++fixup_sched_groups (rtx insn)
++{
++ sd_iterator_def sd_it;
++ dep_t dep;
++ rtx prev_nonnote;
++
++ FOR_EACH_DEP (insn, SD_LIST_BACK, sd_it, dep)
++ {
++ rtx i = insn;
++ rtx pro = DEP_PRO (dep);
++
++ do
++ {
++ i = prev_nonnote_insn (i);
++
++ if (pro == i)
++ goto next_link;
++ } while (SCHED_GROUP_P (i) || DEBUG_INSN_P (i));
++
++ if (! sched_insns_conditions_mutex_p (i, pro))
++ add_dependence (i, pro, DEP_TYPE (dep));
++ next_link:;
++ }
++
++ delete_all_dependences (insn);
++
++ prev_nonnote = prev_nonnote_nondebug_insn (insn);
++ if (BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (prev_nonnote)
++ && ! sched_insns_conditions_mutex_p (insn, prev_nonnote))
++ add_dependence (insn, prev_nonnote, REG_DEP_ANTI);
++}
++
++/* Process an insn's memory dependencies. There are four kinds of
++ dependencies:
++
++ (0) read dependence: read follows read
++ (1) true dependence: read follows write
++ (2) output dependence: write follows write
++ (3) anti dependence: write follows read
++
++ We are careful to build only dependencies which actually exist, and
++ use transitivity to avoid building too many links. */
++
++/* Add an INSN and MEM reference pair to a pending INSN_LIST and MEM_LIST.
++ The MEM is a memory reference contained within INSN, which we are saving
++ so that we can do memory aliasing on it. */
++
++static void
++add_insn_mem_dependence (struct deps_desc *deps, bool read_p,
++ rtx insn, rtx mem)
++{
++ rtx *insn_list;
++ rtx *mem_list;
++ rtx link;
++
++ gcc_assert (!deps->readonly);
++ if (read_p)
++ {
++ insn_list = &deps->pending_read_insns;
++ mem_list = &deps->pending_read_mems;
++ if (!DEBUG_INSN_P (insn))
++ deps->pending_read_list_length++;
++ }
++ else
++ {
++ insn_list = &deps->pending_write_insns;
++ mem_list = &deps->pending_write_mems;
++ deps->pending_write_list_length++;
++ }
++
++ link = alloc_INSN_LIST (insn, *insn_list);
++ *insn_list = link;
++
++ if (sched_deps_info->use_cselib)
++ {
++ mem = shallow_copy_rtx (mem);
++ XEXP (mem, 0) = cselib_subst_to_values (XEXP (mem, 0));
++ }
++ link = alloc_EXPR_LIST (VOIDmode, canon_rtx (mem), *mem_list);
++ *mem_list = link;
++}
++
++/* Make a dependency between every memory reference on the pending lists
++ and INSN, thus flushing the pending lists. FOR_READ is true if emitting
++ dependencies for a read operation, similarly with FOR_WRITE. */
++
++static void
++flush_pending_lists (struct deps_desc *deps, rtx insn, int for_read,
++ int for_write)
++{
++ if (for_write)
++ {
++ add_dependence_list_and_free (deps, insn, &deps->pending_read_insns,
++ 1, REG_DEP_ANTI);
++ if (!deps->readonly)
++ {
++ free_EXPR_LIST_list (&deps->pending_read_mems);
++ deps->pending_read_list_length = 0;
++ }
++ }
++
++ add_dependence_list_and_free (deps, insn, &deps->pending_write_insns, 1,
++ for_read ? REG_DEP_ANTI : REG_DEP_OUTPUT);
++
++ add_dependence_list_and_free (deps, insn,
++ &deps->last_pending_memory_flush, 1,
++ for_read ? REG_DEP_ANTI : REG_DEP_OUTPUT);
++ if (!deps->readonly)
++ {
++ free_EXPR_LIST_list (&deps->pending_write_mems);
++ deps->pending_write_list_length = 0;
++
++ deps->last_pending_memory_flush = alloc_INSN_LIST (insn, NULL_RTX);
++ deps->pending_flush_length = 1;
++ }
++}
++
++/* Instruction which dependencies we are analyzing. */
++static rtx cur_insn = NULL_RTX;
++
++/* Implement hooks for haifa scheduler. */
++
++static void
++haifa_start_insn (rtx insn)
++{
++ gcc_assert (insn && !cur_insn);
++
++ cur_insn = insn;
++}
++
++static void
++haifa_finish_insn (void)
++{
++ cur_insn = NULL;
++}
++
++void
++haifa_note_reg_set (int regno)
++{
++ SET_REGNO_REG_SET (reg_pending_sets, regno);
++}
++
++void
++haifa_note_reg_clobber (int regno)
++{
++ SET_REGNO_REG_SET (reg_pending_clobbers, regno);
++}
++
++void
++haifa_note_reg_use (int regno)
++{
++ SET_REGNO_REG_SET (reg_pending_uses, regno);
++}
++
++static void
++haifa_note_mem_dep (rtx mem, rtx pending_mem, rtx pending_insn, ds_t ds)
++{
++ if (!(ds & SPECULATIVE))
++ {
++ mem = NULL_RTX;
++ pending_mem = NULL_RTX;
++ }
++ else
++ gcc_assert (ds & BEGIN_DATA);
++
++ {
++ dep_def _dep, *dep = &_dep;
++
++ init_dep_1 (dep, pending_insn, cur_insn, ds_to_dt (ds),
++ current_sched_info->flags & USE_DEPS_LIST ? ds : -1);
++ maybe_add_or_update_dep_1 (dep, false, pending_mem, mem);
++ }
++
++}
++
++static void
++haifa_note_dep (rtx elem, ds_t ds)
++{
++ dep_def _dep;
++ dep_t dep = &_dep;
++
++ init_dep (dep, elem, cur_insn, ds_to_dt (ds));
++ maybe_add_or_update_dep_1 (dep, false, NULL_RTX, NULL_RTX);
++}
++
++static void
++note_reg_use (int r)
++{
++ if (sched_deps_info->note_reg_use)
++ sched_deps_info->note_reg_use (r);
++}
++
++static void
++note_reg_set (int r)
++{
++ if (sched_deps_info->note_reg_set)
++ sched_deps_info->note_reg_set (r);
++}
++
++static void
++note_reg_clobber (int r)
++{
++ if (sched_deps_info->note_reg_clobber)
++ sched_deps_info->note_reg_clobber (r);
++}
++
++static void
++note_mem_dep (rtx m1, rtx m2, rtx e, ds_t ds)
++{
++ if (sched_deps_info->note_mem_dep)
++ sched_deps_info->note_mem_dep (m1, m2, e, ds);
++}
++
++static void
++note_dep (rtx e, ds_t ds)
++{
++ if (sched_deps_info->note_dep)
++ sched_deps_info->note_dep (e, ds);
++}
++
++/* Return corresponding to DS reg_note. */
++enum reg_note
++ds_to_dt (ds_t ds)
++{
++ if (ds & DEP_TRUE)
++ return REG_DEP_TRUE;
++ else if (ds & DEP_OUTPUT)
++ return REG_DEP_OUTPUT;
++ else
++ {
++ gcc_assert (ds & DEP_ANTI);
++ return REG_DEP_ANTI;
++ }
++}
++
++
++
++/* Functions for computation of info needed for register pressure
++ sensitive insn scheduling. */
++
++
++/* Allocate and return reg_use_data structure for REGNO and INSN. */
++static struct reg_use_data *
++create_insn_reg_use (int regno, rtx insn)
++{
++ struct reg_use_data *use;
++
++ use = (struct reg_use_data *) xmalloc (sizeof (struct reg_use_data));
++ use->regno = regno;
++ use->insn = insn;
++ use->next_insn_use = INSN_REG_USE_LIST (insn);
++ INSN_REG_USE_LIST (insn) = use;
++ return use;
++}
++
++/* Allocate and return reg_set_data structure for REGNO and INSN. */
++static struct reg_set_data *
++create_insn_reg_set (int regno, rtx insn)
++{
++ struct reg_set_data *set;
++
++ set = (struct reg_set_data *) xmalloc (sizeof (struct reg_set_data));
++ set->regno = regno;
++ set->insn = insn;
++ set->next_insn_set = INSN_REG_SET_LIST (insn);
++ INSN_REG_SET_LIST (insn) = set;
++ return set;
++}
++
++/* Set up insn register uses for INSN and dependency context DEPS. */
++static void
++setup_insn_reg_uses (struct deps_desc *deps, rtx insn)
++{
++ unsigned i;
++ reg_set_iterator rsi;
++ rtx list;
++ struct reg_use_data *use, *use2, *next;
++ struct deps_reg *reg_last;
++
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i, rsi)
++ {
++ if (i < FIRST_PSEUDO_REGISTER
++ && TEST_HARD_REG_BIT (ira_no_alloc_regs, i))
++ continue;
++
++ if (find_regno_note (insn, REG_DEAD, i) == NULL_RTX
++ && ! REGNO_REG_SET_P (reg_pending_sets, i)
++ && ! REGNO_REG_SET_P (reg_pending_clobbers, i))
++ /* Ignore use which is not dying. */
++ continue;
++
++ use = create_insn_reg_use (i, insn);
++ use->next_regno_use = use;
++ reg_last = &deps->reg_last[i];
++
++ /* Create the cycle list of uses. */
++ for (list = reg_last->uses; list; list = XEXP (list, 1))
++ {
++ use2 = create_insn_reg_use (i, XEXP (list, 0));
++ next = use->next_regno_use;
++ use->next_regno_use = use2;
++ use2->next_regno_use = next;
++ }
++ }
++}
++
++/* Register pressure info for the currently processed insn. */
++static struct reg_pressure_data reg_pressure_info[N_REG_CLASSES];
++
++/* Return TRUE if INSN has the use structure for REGNO. */
++static bool
++insn_use_p (rtx insn, int regno)
++{
++ struct reg_use_data *use;
++
++ for (use = INSN_REG_USE_LIST (insn); use != NULL; use = use->next_insn_use)
++ if (use->regno == regno)
++ return true;
++ return false;
++}
++
++/* Update the register pressure info after birth of pseudo register REGNO
++ in INSN. Arguments CLOBBER_P and UNUSED_P say correspondingly that
++ the register is in clobber or unused after the insn. */
++static void
++mark_insn_pseudo_birth (rtx insn, int regno, bool clobber_p, bool unused_p)
++{
++ int incr, new_incr;
++ enum reg_class cl;
++
++ gcc_assert (regno >= FIRST_PSEUDO_REGISTER);
++ cl = sched_regno_cover_class[regno];
++ if (cl != NO_REGS)
++ {
++ incr = ira_reg_class_nregs[cl][PSEUDO_REGNO_MODE (regno)];
++ if (clobber_p)
++ {
++ new_incr = reg_pressure_info[cl].clobber_increase + incr;
++ reg_pressure_info[cl].clobber_increase = new_incr;
++ }
++ else if (unused_p)
++ {
++ new_incr = reg_pressure_info[cl].unused_set_increase + incr;
++ reg_pressure_info[cl].unused_set_increase = new_incr;
++ }
++ else
++ {
++ new_incr = reg_pressure_info[cl].set_increase + incr;
++ reg_pressure_info[cl].set_increase = new_incr;
++ if (! insn_use_p (insn, regno))
++ reg_pressure_info[cl].change += incr;
++ create_insn_reg_set (regno, insn);
++ }
++ gcc_assert (new_incr < (1 << INCREASE_BITS));
++ }
++}
++
++/* Like mark_insn_pseudo_regno_birth except that NREGS saying how many
++ hard registers involved in the birth. */
++static void
++mark_insn_hard_regno_birth (rtx insn, int regno, int nregs,
++ bool clobber_p, bool unused_p)
++{
++ enum reg_class cl;
++ int new_incr, last = regno + nregs;
++
++ while (regno < last)
++ {
++ gcc_assert (regno < FIRST_PSEUDO_REGISTER);
++ if (! TEST_HARD_REG_BIT (ira_no_alloc_regs, regno))
++ {
++ cl = sched_regno_cover_class[regno];
++ if (cl != NO_REGS)
++ {
++ if (clobber_p)
++ {
++ new_incr = reg_pressure_info[cl].clobber_increase + 1;
++ reg_pressure_info[cl].clobber_increase = new_incr;
++ }
++ else if (unused_p)
++ {
++ new_incr = reg_pressure_info[cl].unused_set_increase + 1;
++ reg_pressure_info[cl].unused_set_increase = new_incr;
++ }
++ else
++ {
++ new_incr = reg_pressure_info[cl].set_increase + 1;
++ reg_pressure_info[cl].set_increase = new_incr;
++ if (! insn_use_p (insn, regno))
++ reg_pressure_info[cl].change += 1;
++ create_insn_reg_set (regno, insn);
++ }
++ gcc_assert (new_incr < (1 << INCREASE_BITS));
++ }
++ }
++ regno++;
++ }
++}
++
++/* Update the register pressure info after birth of pseudo or hard
++ register REG in INSN. Arguments CLOBBER_P and UNUSED_P say
++ correspondingly that the register is in clobber or unused after the
++ insn. */
++static void
++mark_insn_reg_birth (rtx insn, rtx reg, bool clobber_p, bool unused_p)
++{
++ int regno;
++
++ if (GET_CODE (reg) == SUBREG)
++ reg = SUBREG_REG (reg);
++
++ if (! REG_P (reg))
++ return;
++
++ regno = REGNO (reg);
++ if (regno < FIRST_PSEUDO_REGISTER)
++ mark_insn_hard_regno_birth (insn, regno,
++ hard_regno_nregs[regno][GET_MODE (reg)],
++ clobber_p, unused_p);
++ else
++ mark_insn_pseudo_birth (insn, regno, clobber_p, unused_p);
++}
++
++/* Update the register pressure info after death of pseudo register
++ REGNO. */
++static void
++mark_pseudo_death (int regno)
++{
++ int incr;
++ enum reg_class cl;
++
++ gcc_assert (regno >= FIRST_PSEUDO_REGISTER);
++ cl = sched_regno_cover_class[regno];
++ if (cl != NO_REGS)
++ {
++ incr = ira_reg_class_nregs[cl][PSEUDO_REGNO_MODE (regno)];
++ reg_pressure_info[cl].change -= incr;
++ }
++}
++
++/* Like mark_pseudo_death except that NREGS saying how many hard
++ registers involved in the death. */
++static void
++mark_hard_regno_death (int regno, int nregs)
++{
++ enum reg_class cl;
++ int last = regno + nregs;
++
++ while (regno < last)
++ {
++ gcc_assert (regno < FIRST_PSEUDO_REGISTER);
++ if (! TEST_HARD_REG_BIT (ira_no_alloc_regs, regno))
++ {
++ cl = sched_regno_cover_class[regno];
++ if (cl != NO_REGS)
++ reg_pressure_info[cl].change -= 1;
++ }
++ regno++;
++ }
++}
++
++/* Update the register pressure info after death of pseudo or hard
++ register REG. */
++static void
++mark_reg_death (rtx reg)
++{
++ int regno;
++
++ if (GET_CODE (reg) == SUBREG)
++ reg = SUBREG_REG (reg);
++
++ if (! REG_P (reg))
++ return;
++
++ regno = REGNO (reg);
++ if (regno < FIRST_PSEUDO_REGISTER)
++ mark_hard_regno_death (regno, hard_regno_nregs[regno][GET_MODE (reg)]);
++ else
++ mark_pseudo_death (regno);
++}
++
++/* Process SETTER of REG. DATA is an insn containing the setter. */
++static void
++mark_insn_reg_store (rtx reg, const_rtx setter, void *data)
++{
++ if (setter != NULL_RTX && GET_CODE (setter) != SET)
++ return;
++ mark_insn_reg_birth
++ ((rtx) data, reg, false,
++ find_reg_note ((const_rtx) data, REG_UNUSED, reg) != NULL_RTX);
++}
++
++/* Like mark_insn_reg_store except notice just CLOBBERs; ignore SETs. */
++static void
++mark_insn_reg_clobber (rtx reg, const_rtx setter, void *data)
++{
++ if (GET_CODE (setter) == CLOBBER)
++ mark_insn_reg_birth ((rtx) data, reg, true, false);
++}
++
++/* Set up reg pressure info related to INSN. */
++static void
++setup_insn_reg_pressure_info (rtx insn)
++{
++ int i, len;
++ enum reg_class cl;
++ static struct reg_pressure_data *pressure_info;
++ rtx link;
++
++ gcc_assert (sched_pressure_p);
++
++ if (! INSN_P (insn))
++ return;
++
++ for (i = 0; i < ira_reg_class_cover_size; i++)
++ {
++ cl = ira_reg_class_cover[i];
++ reg_pressure_info[cl].clobber_increase = 0;
++ reg_pressure_info[cl].set_increase = 0;
++ reg_pressure_info[cl].unused_set_increase = 0;
++ reg_pressure_info[cl].change = 0;
++ }
++
++ note_stores (PATTERN (insn), mark_insn_reg_clobber, insn);
++
++ note_stores (PATTERN (insn), mark_insn_reg_store, insn);
++
++#ifdef AUTO_INC_DEC
++ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
++ if (REG_NOTE_KIND (link) == REG_INC)
++ mark_insn_reg_store (XEXP (link, 0), NULL_RTX, insn);
++#endif
++
++ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
++ if (REG_NOTE_KIND (link) == REG_DEAD)
++ mark_reg_death (XEXP (link, 0));
++
++ len = sizeof (struct reg_pressure_data) * ira_reg_class_cover_size;
++ pressure_info
++ = INSN_REG_PRESSURE (insn) = (struct reg_pressure_data *) xmalloc (len);
++ INSN_MAX_REG_PRESSURE (insn) = (int *) xcalloc (ira_reg_class_cover_size
++ * sizeof (int), 1);
++ for (i = 0; i < ira_reg_class_cover_size; i++)
++ {
++ cl = ira_reg_class_cover[i];
++ pressure_info[i].clobber_increase
++ = reg_pressure_info[cl].clobber_increase;
++ pressure_info[i].set_increase = reg_pressure_info[cl].set_increase;
++ pressure_info[i].unused_set_increase
++ = reg_pressure_info[cl].unused_set_increase;
++ pressure_info[i].change = reg_pressure_info[cl].change;
++ }
++}
++
++
++
++
++/* Internal variable for sched_analyze_[12] () functions.
++ If it is nonzero, this means that sched_analyze_[12] looks
++ at the most toplevel SET. */
++static bool can_start_lhs_rhs_p;
++
++/* Extend reg info for the deps context DEPS given that
++ we have just generated a register numbered REGNO. */
++static void
++extend_deps_reg_info (struct deps_desc *deps, int regno)
++{
++ int max_regno = regno + 1;
++
++ gcc_assert (!reload_completed);
++
++ /* In a readonly context, it would not hurt to extend info,
++ but it should not be needed. */
++ if (reload_completed && deps->readonly)
++ {
++ deps->max_reg = max_regno;
++ return;
++ }
++
++ if (max_regno > deps->max_reg)
++ {
++ deps->reg_last = XRESIZEVEC (struct deps_reg, deps->reg_last,
++ max_regno);
++ memset (&deps->reg_last[deps->max_reg],
++ 0, (max_regno - deps->max_reg)
++ * sizeof (struct deps_reg));
++ deps->max_reg = max_regno;
++ }
++}
++
++/* Extends REG_INFO_P if needed. */
++void
++maybe_extend_reg_info_p (void)
++{
++ /* Extend REG_INFO_P, if needed. */
++ if ((unsigned int)max_regno - 1 >= reg_info_p_size)
++ {
++ size_t new_reg_info_p_size = max_regno + 128;
++
++ gcc_assert (!reload_completed && sel_sched_p ());
++
++ reg_info_p = (struct reg_info_t *) xrecalloc (reg_info_p,
++ new_reg_info_p_size,
++ reg_info_p_size,
++ sizeof (*reg_info_p));
++ reg_info_p_size = new_reg_info_p_size;
++ }
++}
++
++/* Analyze a single reference to register (reg:MODE REGNO) in INSN.
++ The type of the reference is specified by REF and can be SET,
++ CLOBBER, PRE_DEC, POST_DEC, PRE_INC, POST_INC or USE. */
++
++static void
++sched_analyze_reg (struct deps_desc *deps, int regno, enum machine_mode mode,
++ enum rtx_code ref, rtx insn)
++{
++ /* We could emit new pseudos in renaming. Extend the reg structures. */
++ if (!reload_completed && sel_sched_p ()
++ && (regno >= max_reg_num () - 1 || regno >= deps->max_reg))
++ extend_deps_reg_info (deps, regno);
++
++ maybe_extend_reg_info_p ();
++
++ /* A hard reg in a wide mode may really be multiple registers.
++ If so, mark all of them just like the first. */
++ if (regno < FIRST_PSEUDO_REGISTER)
++ {
++ int i = hard_regno_nregs[regno][mode];
++ if (ref == SET)
++ {
++ while (--i >= 0)
++ note_reg_set (regno + i);
++ }
++ else if (ref == USE)
++ {
++ while (--i >= 0)
++ note_reg_use (regno + i);
++ }
++ else
++ {
++ while (--i >= 0)
++ note_reg_clobber (regno + i);
++ }
++ }
++
++ /* ??? Reload sometimes emits USEs and CLOBBERs of pseudos that
++ it does not reload. Ignore these as they have served their
++ purpose already. */
++ else if (regno >= deps->max_reg)
++ {
++ enum rtx_code code = GET_CODE (PATTERN (insn));
++ gcc_assert (code == USE || code == CLOBBER);
++ }
++
++ else
++ {
++ if (ref == SET)
++ note_reg_set (regno);
++ else if (ref == USE)
++ note_reg_use (regno);
++ else
++ note_reg_clobber (regno);
++
++ /* Pseudos that are REG_EQUIV to something may be replaced
++ by that during reloading. We need only add dependencies for
++ the address in the REG_EQUIV note. */
++ if (!reload_completed && get_reg_known_equiv_p (regno))
++ {
++ rtx t = get_reg_known_value (regno);
++ if (MEM_P (t))
++ sched_analyze_2 (deps, XEXP (t, 0), insn);
++ }
++
++ /* Don't let it cross a call after scheduling if it doesn't
++ already cross one. */
++ if (REG_N_CALLS_CROSSED (regno) == 0)
++ {
++ if (!deps->readonly && ref == USE && !DEBUG_INSN_P (insn))
++ deps->sched_before_next_call
++ = alloc_INSN_LIST (insn, deps->sched_before_next_call);
++ else
++ add_dependence_list (insn, deps->last_function_call, 1,
++ REG_DEP_ANTI);
++ }
++ }
++}
++
++/* Analyze a single SET, CLOBBER, PRE_DEC, POST_DEC, PRE_INC or POST_INC
++ rtx, X, creating all dependencies generated by the write to the
++ destination of X, and reads of everything mentioned. */
++
++static void
++sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn)
++{
++ rtx dest = XEXP (x, 0);
++ enum rtx_code code = GET_CODE (x);
++ bool cslr_p = can_start_lhs_rhs_p;
++
++ can_start_lhs_rhs_p = false;
++
++ gcc_assert (dest);
++ if (dest == 0)
++ return;
++
++ if (cslr_p && sched_deps_info->start_lhs)
++ sched_deps_info->start_lhs (dest);
++
++ if (GET_CODE (dest) == PARALLEL)
++ {
++ int i;
++
++ for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
++ if (XEXP (XVECEXP (dest, 0, i), 0) != 0)
++ sched_analyze_1 (deps,
++ gen_rtx_CLOBBER (VOIDmode,
++ XEXP (XVECEXP (dest, 0, i), 0)),
++ insn);
++
++ if (cslr_p && sched_deps_info->finish_lhs)
++ sched_deps_info->finish_lhs ();
++
++ if (code == SET)
++ {
++ can_start_lhs_rhs_p = cslr_p;
++
++ sched_analyze_2 (deps, SET_SRC (x), insn);
++
++ can_start_lhs_rhs_p = false;
++ }
++
++ return;
++ }
++
++ while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SUBREG
++ || GET_CODE (dest) == ZERO_EXTRACT)
++ {
++ if (GET_CODE (dest) == STRICT_LOW_PART
++ || GET_CODE (dest) == ZERO_EXTRACT
++ || df_read_modify_subreg_p (dest))
++ {
++ /* These both read and modify the result. We must handle
++ them as writes to get proper dependencies for following
++ instructions. We must handle them as reads to get proper
++ dependencies from this to previous instructions.
++ Thus we need to call sched_analyze_2. */
++
++ sched_analyze_2 (deps, XEXP (dest, 0), insn);
++ }
++ if (GET_CODE (dest) == ZERO_EXTRACT)
++ {
++ /* The second and third arguments are values read by this insn. */
++ sched_analyze_2 (deps, XEXP (dest, 1), insn);
++ sched_analyze_2 (deps, XEXP (dest, 2), insn);
++ }
++ dest = XEXP (dest, 0);
++ }
++
++ if (REG_P (dest))
++ {
++ int regno = REGNO (dest);
++ enum machine_mode mode = GET_MODE (dest);
++
++ sched_analyze_reg (deps, regno, mode, code, insn);
++
++#ifdef STACK_REGS
++ /* Treat all writes to a stack register as modifying the TOS. */
++ if (regno >= FIRST_STACK_REG && regno <= LAST_STACK_REG)
++ {
++ int nregs;
++
++ /* Avoid analyzing the same register twice. */
++ if (regno != FIRST_STACK_REG)
++ sched_analyze_reg (deps, FIRST_STACK_REG, mode, code, insn);
++
++ nregs = hard_regno_nregs[FIRST_STACK_REG][mode];
++ while (--nregs >= 0)
++ SET_HARD_REG_BIT (implicit_reg_pending_uses,
++ FIRST_STACK_REG + nregs);
++ }
++#endif
++ }
++ else if (MEM_P (dest))
++ {
++ /* Writing memory. */
++ rtx t = dest;
++
++ if (sched_deps_info->use_cselib)
++ {
++ enum machine_mode address_mode
++ = targetm.addr_space.address_mode (MEM_ADDR_SPACE (dest));
++
++ t = shallow_copy_rtx (dest);
++ cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, insn);
++ XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0));
++ }
++ t = canon_rtx (t);
++
++ /* Pending lists can't get larger with a readonly context. */
++ if (!deps->readonly
++ && ((deps->pending_read_list_length + deps->pending_write_list_length)
++ > MAX_PENDING_LIST_LENGTH))
++ {
++ /* Flush all pending reads and writes to prevent the pending lists
++ from getting any larger. Insn scheduling runs too slowly when
++ these lists get long. When compiling GCC with itself,
++ this flush occurs 8 times for sparc, and 10 times for m88k using
++ the default value of 32. */
++ flush_pending_lists (deps, insn, false, true);
++ }
++ else
++ {
++ rtx pending, pending_mem;
++
++ pending = deps->pending_read_insns;
++ pending_mem = deps->pending_read_mems;
++ while (pending)
++ {
++ if (anti_dependence (XEXP (pending_mem, 0), t)
++ && ! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0)))
++ note_mem_dep (t, XEXP (pending_mem, 0), XEXP (pending, 0),
++ DEP_ANTI);
++
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ pending = deps->pending_write_insns;
++ pending_mem = deps->pending_write_mems;
++ while (pending)
++ {
++ if (output_dependence (XEXP (pending_mem, 0), t)
++ && ! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0)))
++ note_mem_dep (t, XEXP (pending_mem, 0), XEXP (pending, 0),
++ DEP_OUTPUT);
++
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ add_dependence_list (insn, deps->last_pending_memory_flush, 1,
++ REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ add_insn_mem_dependence (deps, false, insn, dest);
++ }
++ sched_analyze_2 (deps, XEXP (dest, 0), insn);
++ }
++
++ if (cslr_p && sched_deps_info->finish_lhs)
++ sched_deps_info->finish_lhs ();
++
++ /* Analyze reads. */
++ if (GET_CODE (x) == SET)
++ {
++ can_start_lhs_rhs_p = cslr_p;
++
++ sched_analyze_2 (deps, SET_SRC (x), insn);
++
++ can_start_lhs_rhs_p = false;
++ }
++}
++
++/* Analyze the uses of memory and registers in rtx X in INSN. */
++static void
++sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
++{
++ int i;
++ int j;
++ enum rtx_code code;
++ const char *fmt;
++ bool cslr_p = can_start_lhs_rhs_p;
++
++ can_start_lhs_rhs_p = false;
++
++ gcc_assert (x);
++ if (x == 0)
++ return;
++
++ if (cslr_p && sched_deps_info->start_rhs)
++ sched_deps_info->start_rhs (x);
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST_FIXED:
++ case CONST_VECTOR:
++ case SYMBOL_REF:
++ case CONST:
++ case LABEL_REF:
++ /* Ignore constants. */
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++
++#ifdef HAVE_cc0
++ case CC0:
++ /* User of CC0 depends on immediately preceding insn. */
++ SCHED_GROUP_P (insn) = 1;
++ /* Don't move CC0 setter to another block (it can set up the
++ same flag for previous CC0 users which is safe). */
++ CANT_MOVE (prev_nonnote_insn (insn)) = 1;
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++#endif
++
++ case REG:
++ {
++ int regno = REGNO (x);
++ enum machine_mode mode = GET_MODE (x);
++
++ sched_analyze_reg (deps, regno, mode, USE, insn);
++
++#ifdef STACK_REGS
++ /* Treat all reads of a stack register as modifying the TOS. */
++ if (regno >= FIRST_STACK_REG && regno <= LAST_STACK_REG)
++ {
++ /* Avoid analyzing the same register twice. */
++ if (regno != FIRST_STACK_REG)
++ sched_analyze_reg (deps, FIRST_STACK_REG, mode, USE, insn);
++ sched_analyze_reg (deps, FIRST_STACK_REG, mode, SET, insn);
++ }
++#endif
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++ }
++
++ case MEM:
++ {
++ /* Reading memory. */
++ rtx u;
++ rtx pending, pending_mem;
++ rtx t = x;
++
++ if (sched_deps_info->use_cselib)
++ {
++ enum machine_mode address_mode
++ = targetm.addr_space.address_mode (MEM_ADDR_SPACE (t));
++
++ t = shallow_copy_rtx (t);
++ cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, insn);
++ XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0));
++ }
++
++ if (!DEBUG_INSN_P (insn))
++ {
++ t = canon_rtx (t);
++ pending = deps->pending_read_insns;
++ pending_mem = deps->pending_read_mems;
++ while (pending)
++ {
++ if (read_dependence (XEXP (pending_mem, 0), t)
++ && ! sched_insns_conditions_mutex_p (insn,
++ XEXP (pending, 0)))
++ note_mem_dep (t, XEXP (pending_mem, 0), XEXP (pending, 0),
++ DEP_ANTI);
++
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ pending = deps->pending_write_insns;
++ pending_mem = deps->pending_write_mems;
++ while (pending)
++ {
++ if (true_dependence (XEXP (pending_mem, 0), VOIDmode,
++ t, rtx_varies_p)
++ && ! sched_insns_conditions_mutex_p (insn,
++ XEXP (pending, 0)))
++ note_mem_dep (t, XEXP (pending_mem, 0), XEXP (pending, 0),
++ sched_deps_info->generate_spec_deps
++ ? BEGIN_DATA | DEP_TRUE : DEP_TRUE);
++
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1))
++ {
++ if (! NON_FLUSH_JUMP_P (u))
++ add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
++ else if (deps_may_trap_p (x))
++ {
++ if ((sched_deps_info->generate_spec_deps)
++ && sel_sched_p () && (spec_info->mask & BEGIN_CONTROL))
++ {
++ ds_t ds = set_dep_weak (DEP_ANTI, BEGIN_CONTROL,
++ MAX_DEP_WEAK);
++
++ note_dep (XEXP (u, 0), ds);
++ }
++ else
++ add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
++ }
++ }
++ }
++
++ /* Always add these dependencies to pending_reads, since
++ this insn may be followed by a write. */
++ if (!deps->readonly)
++ add_insn_mem_dependence (deps, true, insn, x);
++
++ sched_analyze_2 (deps, XEXP (x, 0), insn);
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++ }
++
++ /* Force pending stores to memory in case a trap handler needs them. */
++ case TRAP_IF:
++ flush_pending_lists (deps, insn, true, false);
++ break;
++
++ case PREFETCH:
++ if (PREFETCH_SCHEDULE_BARRIER_P (x))
++ reg_pending_barrier = TRUE_BARRIER;
++ break;
++
++ case UNSPEC_VOLATILE:
++ flush_pending_lists (deps, insn, true, true);
++ /* FALLTHRU */
++
++ case ASM_OPERANDS:
++ case ASM_INPUT:
++ {
++ /* Traditional and volatile asm instructions must be considered to use
++ and clobber all hard registers, all pseudo-registers and all of
++ memory. So must TRAP_IF and UNSPEC_VOLATILE operations.
++
++ Consider for instance a volatile asm that changes the fpu rounding
++ mode. An insn should not be moved across this even if it only uses
++ pseudo-regs because it might give an incorrectly rounded result. */
++ if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ reg_pending_barrier = TRUE_BARRIER;
++
++ /* For all ASM_OPERANDS, we must traverse the vector of input operands.
++ We can not just fall through here since then we would be confused
++ by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate
++ traditional asms unlike their normal usage. */
++
++ if (code == ASM_OPERANDS)
++ {
++ for (j = 0; j < ASM_OPERANDS_INPUT_LENGTH (x); j++)
++ sched_analyze_2 (deps, ASM_OPERANDS_INPUT (x, j), insn);
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++ }
++ break;
++ }
++
++ case PRE_DEC:
++ case POST_DEC:
++ case PRE_INC:
++ case POST_INC:
++ /* These both read and modify the result. We must handle them as writes
++ to get proper dependencies for following instructions. We must handle
++ them as reads to get proper dependencies from this to previous
++ instructions. Thus we need to pass them to both sched_analyze_1
++ and sched_analyze_2. We must call sched_analyze_2 first in order
++ to get the proper antecedent for the read. */
++ sched_analyze_2 (deps, XEXP (x, 0), insn);
++ sched_analyze_1 (deps, x, insn);
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++
++ case POST_MODIFY:
++ case PRE_MODIFY:
++ /* op0 = op0 + op1 */
++ sched_analyze_2 (deps, XEXP (x, 0), insn);
++ sched_analyze_2 (deps, XEXP (x, 1), insn);
++ sched_analyze_1 (deps, x, insn);
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++
++ return;
++
++ default:
++ break;
++ }
++
++ /* Other cases: walk the insn. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
++ {
++ if (fmt[i] == 'e')
++ sched_analyze_2 (deps, XEXP (x, i), insn);
++ else if (fmt[i] == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ sched_analyze_2 (deps, XVECEXP (x, i, j), insn);
++ }
++
++ if (cslr_p && sched_deps_info->finish_rhs)
++ sched_deps_info->finish_rhs ();
++}
++
++/* Analyze an INSN with pattern X to find all dependencies. */
++static void
++sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn)
++{
++ RTX_CODE code = GET_CODE (x);
++ rtx link;
++ unsigned i;
++ reg_set_iterator rsi;
++
++ if (! reload_completed)
++ {
++ HARD_REG_SET temp;
++
++ extract_insn (insn);
++ preprocess_constraints ();
++ ira_implicitly_set_insn_hard_regs (&temp);
++ AND_COMPL_HARD_REG_SET (temp, ira_no_alloc_regs);
++ IOR_HARD_REG_SET (implicit_reg_pending_clobbers, temp);
++ }
++
++ can_start_lhs_rhs_p = (NONJUMP_INSN_P (insn)
++ && code == SET);
++
++ if (may_trap_p (x))
++ /* Avoid moving trapping instructions accross function calls that might
++ not always return. */
++ add_dependence_list (insn, deps->last_function_call_may_noreturn,
++ 1, REG_DEP_ANTI);
++
++ if (code == COND_EXEC)
++ {
++ sched_analyze_2 (deps, COND_EXEC_TEST (x), insn);
++
++ /* ??? Should be recording conditions so we reduce the number of
++ false dependencies. */
++ x = COND_EXEC_CODE (x);
++ code = GET_CODE (x);
++ }
++ if (code == SET || code == CLOBBER)
++ {
++ sched_analyze_1 (deps, x, insn);
++
++ /* Bare clobber insns are used for letting life analysis, reg-stack
++ and others know that a value is dead. Depend on the last call
++ instruction so that reg-stack won't get confused. */
++ if (code == CLOBBER)
++ add_dependence_list (insn, deps->last_function_call, 1,
++ REG_DEP_OUTPUT);
++ }
++ else if (code == PARALLEL)
++ {
++ for (i = XVECLEN (x, 0); i--;)
++ {
++ rtx sub = XVECEXP (x, 0, i);
++ code = GET_CODE (sub);
++
++ if (code == COND_EXEC)
++ {
++ sched_analyze_2 (deps, COND_EXEC_TEST (sub), insn);
++ sub = COND_EXEC_CODE (sub);
++ code = GET_CODE (sub);
++ }
++ if (code == SET || code == CLOBBER)
++ sched_analyze_1 (deps, sub, insn);
++ else
++ sched_analyze_2 (deps, sub, insn);
++ }
++ }
++ else
++ sched_analyze_2 (deps, x, insn);
++
++ /* Mark registers CLOBBERED or used by called function. */
++ if (CALL_P (insn))
++ {
++ for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
++ {
++ if (GET_CODE (XEXP (link, 0)) == CLOBBER)
++ sched_analyze_1 (deps, XEXP (link, 0), insn);
++ else
++ sched_analyze_2 (deps, XEXP (link, 0), insn);
++ }
++ if (find_reg_note (insn, REG_SETJMP, NULL))
++ reg_pending_barrier = MOVE_BARRIER;
++ }
++
++ if (JUMP_P (insn))
++ {
++ rtx next;
++ next = next_nonnote_nondebug_insn (insn);
++ if (next && BARRIER_P (next))
++ reg_pending_barrier = MOVE_BARRIER;
++ else
++ {
++ rtx pending, pending_mem;
++
++ if (sched_deps_info->compute_jump_reg_dependencies)
++ {
++ regset_head tmp_uses, tmp_sets;
++ INIT_REG_SET (&tmp_uses);
++ INIT_REG_SET (&tmp_sets);
++
++ (*sched_deps_info->compute_jump_reg_dependencies)
++ (insn, &deps->reg_conditional_sets, &tmp_uses, &tmp_sets);
++ /* Make latency of jump equal to 0 by using anti-dependence. */
++ EXECUTE_IF_SET_IN_REG_SET (&tmp_uses, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->implicit_sets,
++ 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0,
++ REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ {
++ reg_last->uses_length++;
++ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
++ }
++ }
++ IOR_REG_SET (reg_pending_sets, &tmp_sets);
++
++ CLEAR_REG_SET (&tmp_uses);
++ CLEAR_REG_SET (&tmp_sets);
++ }
++
++ /* All memory writes and volatile reads must happen before the
++ jump. Non-volatile reads must happen before the jump iff
++ the result is needed by the above register used mask. */
++
++ pending = deps->pending_write_insns;
++ pending_mem = deps->pending_write_mems;
++ while (pending)
++ {
++ if (! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0)))
++ add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT);
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ pending = deps->pending_read_insns;
++ pending_mem = deps->pending_read_mems;
++ while (pending)
++ {
++ if (MEM_VOLATILE_P (XEXP (pending_mem, 0))
++ && ! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0)))
++ add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT);
++ pending = XEXP (pending, 1);
++ pending_mem = XEXP (pending_mem, 1);
++ }
++
++ add_dependence_list (insn, deps->last_pending_memory_flush, 1,
++ REG_DEP_ANTI);
++ }
++ }
++
++ /* If this instruction can throw an exception, then moving it changes
++ where block boundaries fall. This is mighty confusing elsewhere.
++ Therefore, prevent such an instruction from being moved. Same for
++ non-jump instructions that define block boundaries.
++ ??? Unclear whether this is still necessary in EBB mode. If not,
++ add_branch_dependences should be adjusted for RGN mode instead. */
++ if (((CALL_P (insn) || JUMP_P (insn)) && can_throw_internal (insn))
++ || (NONJUMP_INSN_P (insn) && control_flow_insn_p (insn)))
++ reg_pending_barrier = MOVE_BARRIER;
++
++ if (sched_pressure_p)
++ {
++ setup_insn_reg_uses (deps, insn);
++ setup_insn_reg_pressure_info (insn);
++ }
++
++ /* Add register dependencies for insn. */
++ if (DEBUG_INSN_P (insn))
++ {
++ rtx prev = deps->last_debug_insn;
++ rtx u;
++
++ if (!deps->readonly)
++ deps->last_debug_insn = insn;
++
++ if (prev)
++ add_dependence (insn, prev, REG_DEP_ANTI);
++
++ add_dependence_list (insn, deps->last_function_call, 1,
++ REG_DEP_ANTI);
++
++ for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1))
++ if (! NON_FLUSH_JUMP_P (u) || !sel_sched_p ())
++ add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
++
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 1, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 1, REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
++ }
++ CLEAR_REG_SET (reg_pending_uses);
++
++ /* Quite often, a debug insn will refer to stuff in the
++ previous instruction, but the reason we want this
++ dependency here is to make sure the scheduler doesn't
++ gratuitously move a debug insn ahead. This could dirty
++ DF flags and cause additional analysis that wouldn't have
++ occurred in compilation without debug insns, and such
++ additional analysis can modify the generated code. */
++ prev = PREV_INSN (insn);
++
++ if (prev && NONDEBUG_INSN_P (prev))
++ add_dependence (insn, prev, REG_DEP_ANTI);
++ }
++ else
++ {
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_TRUE);
++ add_dependence_list (insn, reg_last->implicit_sets, 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0, REG_DEP_TRUE);
++
++ if (!deps->readonly)
++ {
++ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
++ reg_last->uses_length++;
++ }
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ if (TEST_HARD_REG_BIT (implicit_reg_pending_uses, i))
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_TRUE);
++ add_dependence_list (insn, reg_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0, REG_DEP_TRUE);
++
++ if (!deps->readonly)
++ {
++ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
++ reg_last->uses_length++;
++ }
++ }
++
++ /* If the current insn is conditional, we can't free any
++ of the lists. */
++ if (sched_has_condition_p (insn))
++ {
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_OUTPUT);
++ add_dependence_list (insn, reg_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->uses, 0, REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ {
++ reg_last->clobbers
++ = alloc_INSN_LIST (insn, reg_last->clobbers);
++ reg_last->clobbers_length++;
++ }
++ }
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_sets, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_OUTPUT);
++ add_dependence_list (insn, reg_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0, REG_DEP_OUTPUT);
++ add_dependence_list (insn, reg_last->uses, 0, REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ {
++ reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
++ SET_REGNO_REG_SET (&deps->reg_conditional_sets, i);
++ }
++ }
++ }
++ else
++ {
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ if (reg_last->uses_length > MAX_PENDING_LIST_LENGTH
++ || reg_last->clobbers_length > MAX_PENDING_LIST_LENGTH)
++ {
++ add_dependence_list_and_free (deps, insn, ®_last->sets, 0,
++ REG_DEP_OUTPUT);
++ add_dependence_list_and_free (deps, insn,
++ ®_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list_and_free (deps, insn, ®_last->uses, 0,
++ REG_DEP_ANTI);
++ add_dependence_list_and_free
++ (deps, insn, ®_last->clobbers, 0, REG_DEP_OUTPUT);
++
++ if (!deps->readonly)
++ {
++ reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
++ reg_last->clobbers_length = 0;
++ reg_last->uses_length = 0;
++ }
++ }
++ else
++ {
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_OUTPUT);
++ add_dependence_list (insn, reg_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->uses, 0, REG_DEP_ANTI);
++ }
++
++ if (!deps->readonly)
++ {
++ reg_last->clobbers_length++;
++ reg_last->clobbers
++ = alloc_INSN_LIST (insn, reg_last->clobbers);
++ }
++ }
++ EXECUTE_IF_SET_IN_REG_SET (reg_pending_sets, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++
++ add_dependence_list_and_free (deps, insn, ®_last->sets, 0,
++ REG_DEP_OUTPUT);
++ add_dependence_list_and_free (deps, insn,
++ ®_last->implicit_sets,
++ 0, REG_DEP_ANTI);
++ add_dependence_list_and_free (deps, insn, ®_last->clobbers, 0,
++ REG_DEP_OUTPUT);
++ add_dependence_list_and_free (deps, insn, ®_last->uses, 0,
++ REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ {
++ reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
++ reg_last->uses_length = 0;
++ reg_last->clobbers_length = 0;
++ CLEAR_REGNO_REG_SET (&deps->reg_conditional_sets, i);
++ }
++ }
++ }
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ if (TEST_HARD_REG_BIT (implicit_reg_pending_clobbers, i))
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->sets, 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->uses, 0, REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ reg_last->implicit_sets
++ = alloc_INSN_LIST (insn, reg_last->implicit_sets);
++ }
++
++ if (!deps->readonly)
++ {
++ IOR_REG_SET (&deps->reg_last_in_use, reg_pending_uses);
++ IOR_REG_SET (&deps->reg_last_in_use, reg_pending_clobbers);
++ IOR_REG_SET (&deps->reg_last_in_use, reg_pending_sets);
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ if (TEST_HARD_REG_BIT (implicit_reg_pending_uses, i)
++ || TEST_HARD_REG_BIT (implicit_reg_pending_clobbers, i))
++ SET_REGNO_REG_SET (&deps->reg_last_in_use, i);
++
++ /* Set up the pending barrier found. */
++ deps->last_reg_pending_barrier = reg_pending_barrier;
++ }
++
++ CLEAR_REG_SET (reg_pending_uses);
++ CLEAR_REG_SET (reg_pending_clobbers);
++ CLEAR_REG_SET (reg_pending_sets);
++ CLEAR_HARD_REG_SET (implicit_reg_pending_clobbers);
++ CLEAR_HARD_REG_SET (implicit_reg_pending_uses);
++
++ /* Add dependencies if a scheduling barrier was found. */
++ if (reg_pending_barrier)
++ {
++ /* In the case of barrier the most added dependencies are not
++ real, so we use anti-dependence here. */
++ if (sched_has_condition_p (insn))
++ {
++ EXECUTE_IF_SET_IN_REG_SET (&deps->reg_last_in_use, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list (insn, reg_last->uses, 0, REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->sets, 0,
++ reg_pending_barrier == TRUE_BARRIER
++ ? REG_DEP_TRUE : REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list (insn, reg_last->clobbers, 0,
++ reg_pending_barrier == TRUE_BARRIER
++ ? REG_DEP_TRUE : REG_DEP_ANTI);
++ }
++ }
++ else
++ {
++ EXECUTE_IF_SET_IN_REG_SET (&deps->reg_last_in_use, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ add_dependence_list_and_free (deps, insn, ®_last->uses, 0,
++ REG_DEP_ANTI);
++ add_dependence_list_and_free (deps, insn, ®_last->sets, 0,
++ reg_pending_barrier == TRUE_BARRIER
++ ? REG_DEP_TRUE : REG_DEP_ANTI);
++ add_dependence_list_and_free (deps, insn,
++ ®_last->implicit_sets, 0,
++ REG_DEP_ANTI);
++ add_dependence_list_and_free (deps, insn, ®_last->clobbers, 0,
++ reg_pending_barrier == TRUE_BARRIER
++ ? REG_DEP_TRUE : REG_DEP_ANTI);
++
++ if (!deps->readonly)
++ {
++ reg_last->uses_length = 0;
++ reg_last->clobbers_length = 0;
++ }
++ }
++ }
++
++ if (!deps->readonly)
++ for (i = 0; i < (unsigned)deps->max_reg; i++)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
++ SET_REGNO_REG_SET (&deps->reg_last_in_use, i);
++ }
++
++ /* Flush pending lists on jumps, but not on speculative checks. */
++ if (JUMP_P (insn) && !(sel_sched_p ()
++ && sel_insn_is_speculation_check (insn)))
++ flush_pending_lists (deps, insn, true, true);
++
++ if (!deps->readonly)
++ CLEAR_REG_SET (&deps->reg_conditional_sets);
++ reg_pending_barrier = NOT_A_BARRIER;
++ }
++
++ /* If a post-call group is still open, see if it should remain so.
++ This insn must be a simple move of a hard reg to a pseudo or
++ vice-versa.
++
++ We must avoid moving these insns for correctness on
++ SMALL_REGISTER_CLASS machines, and for special registers like
++ PIC_OFFSET_TABLE_REGNUM. For simplicity, extend this to all
++ hard regs for all targets. */
++
++ if (deps->in_post_call_group_p)
++ {
++ rtx tmp, set = single_set (insn);
++ int src_regno, dest_regno;
++
++ if (set == NULL)
++ {
++ if (DEBUG_INSN_P (insn))
++ /* We don't want to mark debug insns as part of the same
++ sched group. We know they really aren't, but if we use
++ debug insns to tell that a call group is over, we'll
++ get different code if debug insns are not there and
++ instructions that follow seem like they should be part
++ of the call group.
++
++ Also, if we did, fixup_sched_groups() would move the
++ deps of the debug insn to the call insn, modifying
++ non-debug post-dependency counts of the debug insn
++ dependencies and otherwise messing with the scheduling
++ order.
++
++ Instead, let such debug insns be scheduled freely, but
++ keep the call group open in case there are insns that
++ should be part of it afterwards. Since we grant debug
++ insns higher priority than even sched group insns, it
++ will all turn out all right. */
++ goto debug_dont_end_call_group;
++ else
++ goto end_call_group;
++ }
++
++ tmp = SET_DEST (set);
++ if (GET_CODE (tmp) == SUBREG)
++ tmp = SUBREG_REG (tmp);
++ if (REG_P (tmp))
++ dest_regno = REGNO (tmp);
++ else
++ goto end_call_group;
++
++ tmp = SET_SRC (set);
++ if (GET_CODE (tmp) == SUBREG)
++ tmp = SUBREG_REG (tmp);
++ if ((GET_CODE (tmp) == PLUS
++ || GET_CODE (tmp) == MINUS)
++ && REG_P (XEXP (tmp, 0))
++ && REGNO (XEXP (tmp, 0)) == STACK_POINTER_REGNUM
++ && dest_regno == STACK_POINTER_REGNUM)
++ src_regno = STACK_POINTER_REGNUM;
++ else if (REG_P (tmp))
++ src_regno = REGNO (tmp);
++ else
++ goto end_call_group;
++
++ if (src_regno < FIRST_PSEUDO_REGISTER
++ || dest_regno < FIRST_PSEUDO_REGISTER)
++ {
++ if (!deps->readonly
++ && deps->in_post_call_group_p == post_call_initial)
++ deps->in_post_call_group_p = post_call;
++
++ if (!sel_sched_p () || sched_emulate_haifa_p)
++ {
++ SCHED_GROUP_P (insn) = 1;
++ CANT_MOVE (insn) = 1;
++ }
++ }
++ else
++ {
++ end_call_group:
++ if (!deps->readonly)
++ deps->in_post_call_group_p = not_post_call;
++ }
++ }
++
++ debug_dont_end_call_group:
++ if ((current_sched_info->flags & DO_SPECULATION)
++ && !sched_insn_is_legitimate_for_speculation_p (insn, 0))
++ /* INSN has an internal dependency (e.g. r14 = [r14]) and thus cannot
++ be speculated. */
++ {
++ if (sel_sched_p ())
++ sel_mark_hard_insn (insn);
++ else
++ {
++ sd_iterator_def sd_it;
++ dep_t dep;
++
++ for (sd_it = sd_iterator_start (insn, SD_LIST_SPEC_BACK);
++ sd_iterator_cond (&sd_it, &dep);)
++ change_spec_dep_to_hard (sd_it);
++ }
++ }
++}
++
++/* Return TRUE if INSN might not always return normally (e.g. call exit,
++ longjmp, loop forever, ...). */
++static bool
++call_may_noreturn_p (rtx insn)
++{
++ rtx call;
++
++ /* const or pure calls that aren't looping will always return. */
++ if (RTL_CONST_OR_PURE_CALL_P (insn)
++ && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
++ return false;
++
++ call = PATTERN (insn);
++ if (GET_CODE (call) == PARALLEL)
++ call = XVECEXP (call, 0, 0);
++ if (GET_CODE (call) == SET)
++ call = SET_SRC (call);
++ if (GET_CODE (call) == CALL
++ && MEM_P (XEXP (call, 0))
++ && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF)
++ {
++ rtx symbol = XEXP (XEXP (call, 0), 0);
++ if (SYMBOL_REF_DECL (symbol)
++ && TREE_CODE (SYMBOL_REF_DECL (symbol)) == FUNCTION_DECL)
++ {
++ if (DECL_BUILT_IN_CLASS (SYMBOL_REF_DECL (symbol))
++ == BUILT_IN_NORMAL)
++ switch (DECL_FUNCTION_CODE (SYMBOL_REF_DECL (symbol)))
++ {
++ case BUILT_IN_BCMP:
++ case BUILT_IN_BCOPY:
++ case BUILT_IN_BZERO:
++ case BUILT_IN_INDEX:
++ case BUILT_IN_MEMCHR:
++ case BUILT_IN_MEMCMP:
++ case BUILT_IN_MEMCPY:
++ case BUILT_IN_MEMMOVE:
++ case BUILT_IN_MEMPCPY:
++ case BUILT_IN_MEMSET:
++ case BUILT_IN_RINDEX:
++ case BUILT_IN_STPCPY:
++ case BUILT_IN_STPNCPY:
++ case BUILT_IN_STRCAT:
++ case BUILT_IN_STRCHR:
++ case BUILT_IN_STRCMP:
++ case BUILT_IN_STRCPY:
++ case BUILT_IN_STRCSPN:
++ case BUILT_IN_STRLEN:
++ case BUILT_IN_STRNCAT:
++ case BUILT_IN_STRNCMP:
++ case BUILT_IN_STRNCPY:
++ case BUILT_IN_STRPBRK:
++ case BUILT_IN_STRRCHR:
++ case BUILT_IN_STRSPN:
++ case BUILT_IN_STRSTR:
++ /* Assume certain string/memory builtins always return. */
++ return false;
++ default:
++ break;
++ }
++ }
++ }
++
++ /* For all other calls assume that they might not always return. */
++ return true;
++}
++
++/* Analyze INSN with DEPS as a context. */
++void
++deps_analyze_insn (struct deps_desc *deps, rtx insn)
++{
++ if (sched_deps_info->start_insn)
++ sched_deps_info->start_insn (insn);
++
++ if (NONJUMP_INSN_P (insn) || DEBUG_INSN_P (insn) || JUMP_P (insn))
++ {
++ /* Make each JUMP_INSN (but not a speculative check)
++ a scheduling barrier for memory references. */
++ if (!deps->readonly
++ && JUMP_P (insn)
++ && !(sel_sched_p ()
++ && sel_insn_is_speculation_check (insn)))
++ {
++ /* Keep the list a reasonable size. */
++ if (deps->pending_flush_length++ > MAX_PENDING_LIST_LENGTH)
++ flush_pending_lists (deps, insn, true, true);
++ else
++ {
++ deps->last_pending_memory_flush
++ = alloc_INSN_LIST (insn, deps->last_pending_memory_flush);
++ /* Signal to sched_analyze_insn that this jump stands
++ just for its own, not any other pending memory
++ reads/writes flush_pending_lists had to flush. */
++ PUT_REG_NOTE_KIND (deps->last_pending_memory_flush,
++ NON_FLUSH_JUMP_KIND);
++ }
++ }
++
++ sched_analyze_insn (deps, PATTERN (insn), insn);
++ }
++ else if (CALL_P (insn))
++ {
++ int i;
++
++ CANT_MOVE (insn) = 1;
++
++ if (find_reg_note (insn, REG_SETJMP, NULL))
++ {
++ /* This is setjmp. Assume that all registers, not just
++ hard registers, may be clobbered by this call. */
++ reg_pending_barrier = MOVE_BARRIER;
++ }
++ else
++ {
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ /* A call may read and modify global register variables. */
++ if (global_regs[i])
++ {
++ SET_REGNO_REG_SET (reg_pending_sets, i);
++ SET_HARD_REG_BIT (implicit_reg_pending_uses, i);
++ }
++ /* Other call-clobbered hard regs may be clobbered.
++ Since we only have a choice between 'might be clobbered'
++ and 'definitely not clobbered', we must include all
++ partly call-clobbered registers here. */
++ else if (HARD_REGNO_CALL_PART_CLOBBERED (i, reg_raw_mode[i])
++ || TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
++ SET_REGNO_REG_SET (reg_pending_clobbers, i);
++ /* We don't know what set of fixed registers might be used
++ by the function, but it is certain that the stack pointer
++ is among them, but be conservative. */
++ else if (fixed_regs[i])
++ SET_HARD_REG_BIT (implicit_reg_pending_uses, i);
++ /* The frame pointer is normally not used by the function
++ itself, but by the debugger. */
++ /* ??? MIPS o32 is an exception. It uses the frame pointer
++ in the macro expansion of jal but does not represent this
++ fact in the call_insn rtl. */
++ else if (i == FRAME_POINTER_REGNUM
++ || (i == HARD_FRAME_POINTER_REGNUM
++ && (! reload_completed || frame_pointer_needed)))
++ SET_HARD_REG_BIT (implicit_reg_pending_uses, i);
++ }
++
++ /* For each insn which shouldn't cross a call, add a dependence
++ between that insn and this call insn. */
++ add_dependence_list_and_free (deps, insn,
++ &deps->sched_before_next_call, 1,
++ REG_DEP_ANTI);
++
++ sched_analyze_insn (deps, PATTERN (insn), insn);
++
++ /* If CALL would be in a sched group, then this will violate
++ convention that sched group insns have dependencies only on the
++ previous instruction.
++
++ Of course one can say: "Hey! What about head of the sched group?"
++ And I will answer: "Basic principles (one dep per insn) are always
++ the same." */
++ gcc_assert (!SCHED_GROUP_P (insn));
++
++ /* In the absence of interprocedural alias analysis, we must flush
++ all pending reads and writes, and start new dependencies starting
++ from here. But only flush writes for constant calls (which may
++ be passed a pointer to something we haven't written yet). */
++ flush_pending_lists (deps, insn, true, ! RTL_CONST_OR_PURE_CALL_P (insn));
++
++ if (!deps->readonly)
++ {
++ /* Remember the last function call for limiting lifetimes. */
++ free_INSN_LIST_list (&deps->last_function_call);
++ deps->last_function_call = alloc_INSN_LIST (insn, NULL_RTX);
++
++ if (call_may_noreturn_p (insn))
++ {
++ /* Remember the last function call that might not always return
++ normally for limiting moves of trapping insns. */
++ free_INSN_LIST_list (&deps->last_function_call_may_noreturn);
++ deps->last_function_call_may_noreturn
++ = alloc_INSN_LIST (insn, NULL_RTX);
++ }
++
++ /* Before reload, begin a post-call group, so as to keep the
++ lifetimes of hard registers correct. */
++ if (! reload_completed)
++ deps->in_post_call_group_p = post_call;
++ }
++ }
++
++ if (sched_deps_info->use_cselib)
++ cselib_process_insn (insn);
++
++ /* EH_REGION insn notes can not appear until well after we complete
++ scheduling. */
++ if (NOTE_P (insn))
++ gcc_assert (NOTE_KIND (insn) != NOTE_INSN_EH_REGION_BEG
++ && NOTE_KIND (insn) != NOTE_INSN_EH_REGION_END);
++
++ if (sched_deps_info->finish_insn)
++ sched_deps_info->finish_insn ();
++
++ /* Fixup the dependencies in the sched group. */
++ if ((NONJUMP_INSN_P (insn) || JUMP_P (insn))
++ && SCHED_GROUP_P (insn) && !sel_sched_p ())
++ fixup_sched_groups (insn);
++}
++
++/* Initialize DEPS for the new block beginning with HEAD. */
++void
++deps_start_bb (struct deps_desc *deps, rtx head)
++{
++ gcc_assert (!deps->readonly);
++
++ /* Before reload, if the previous block ended in a call, show that
++ we are inside a post-call group, so as to keep the lifetimes of
++ hard registers correct. */
++ if (! reload_completed && !LABEL_P (head))
++ {
++ rtx insn = prev_nonnote_nondebug_insn (head);
++
++ if (insn && CALL_P (insn))
++ deps->in_post_call_group_p = post_call_initial;
++ }
++}
++
++/* Analyze every insn between HEAD and TAIL inclusive, creating backward
++ dependencies for each insn. */
++void
++sched_analyze (struct deps_desc *deps, rtx head, rtx tail)
++{
++ rtx insn;
++
++ if (sched_deps_info->use_cselib)
++ cselib_init (CSELIB_RECORD_MEMORY);
++
++ deps_start_bb (deps, head);
++
++ for (insn = head;; insn = NEXT_INSN (insn))
++ {
++
++ if (INSN_P (insn))
++ {
++ /* And initialize deps_lists. */
++ sd_init_insn (insn);
++ }
++
++ deps_analyze_insn (deps, insn);
++
++ if (insn == tail)
++ {
++ if (sched_deps_info->use_cselib)
++ cselib_finish ();
++ return;
++ }
++ }
++ gcc_unreachable ();
++}
++
++/* Helper for sched_free_deps ().
++ Delete INSN's (RESOLVED_P) backward dependencies. */
++static void
++delete_dep_nodes_in_back_deps (rtx insn, bool resolved_p)
++{
++ sd_iterator_def sd_it;
++ dep_t dep;
++ sd_list_types_def types;
++
++ if (resolved_p)
++ types = SD_LIST_RES_BACK;
++ else
++ types = SD_LIST_BACK;
++
++ for (sd_it = sd_iterator_start (insn, types);
++ sd_iterator_cond (&sd_it, &dep);)
++ {
++ dep_link_t link = *sd_it.linkp;
++ dep_node_t node = DEP_LINK_NODE (link);
++ deps_list_t back_list;
++ deps_list_t forw_list;
++
++ get_back_and_forw_lists (dep, resolved_p, &back_list, &forw_list);
++ remove_from_deps_list (link, back_list);
++ delete_dep_node (node);
++ }
++}
++
++/* Delete (RESOLVED_P) dependencies between HEAD and TAIL together with
++ deps_lists. */
++void
++sched_free_deps (rtx head, rtx tail, bool resolved_p)
++{
++ rtx insn;
++ rtx next_tail = NEXT_INSN (tail);
++
++ for (insn = head; insn != next_tail; insn = NEXT_INSN (insn))
++ if (INSN_P (insn) && INSN_LUID (insn) > 0)
++ {
++ /* Clear resolved back deps together with its dep_nodes. */
++ delete_dep_nodes_in_back_deps (insn, resolved_p);
++
++ /* Clear forward deps and leave the dep_nodes to the
++ corresponding back_deps list. */
++ if (resolved_p)
++ clear_deps_list (INSN_RESOLVED_FORW_DEPS (insn));
++ else
++ clear_deps_list (INSN_FORW_DEPS (insn));
++
++ sd_finish_insn (insn);
++ }
++}
++
++/* Initialize variables for region data dependence analysis.
++ When LAZY_REG_LAST is true, do not allocate reg_last array
++ of struct deps_desc immediately. */
++
++void
++init_deps (struct deps_desc *deps, bool lazy_reg_last)
++{
++ int max_reg = (reload_completed ? FIRST_PSEUDO_REGISTER : max_reg_num ());
++
++ deps->max_reg = max_reg;
++ if (lazy_reg_last)
++ deps->reg_last = NULL;
++ else
++ deps->reg_last = XCNEWVEC (struct deps_reg, max_reg);
++ INIT_REG_SET (&deps->reg_last_in_use);
++ INIT_REG_SET (&deps->reg_conditional_sets);
++
++ deps->pending_read_insns = 0;
++ deps->pending_read_mems = 0;
++ deps->pending_write_insns = 0;
++ deps->pending_write_mems = 0;
++ deps->pending_read_list_length = 0;
++ deps->pending_write_list_length = 0;
++ deps->pending_flush_length = 0;
++ deps->last_pending_memory_flush = 0;
++ deps->last_function_call = 0;
++ deps->last_function_call_may_noreturn = 0;
++ deps->sched_before_next_call = 0;
++ deps->in_post_call_group_p = not_post_call;
++ deps->last_debug_insn = 0;
++ deps->last_reg_pending_barrier = NOT_A_BARRIER;
++ deps->readonly = 0;
++}
++
++/* Init only reg_last field of DEPS, which was not allocated before as
++ we inited DEPS lazily. */
++void
++init_deps_reg_last (struct deps_desc *deps)
++{
++ gcc_assert (deps && deps->max_reg > 0);
++ gcc_assert (deps->reg_last == NULL);
++
++ deps->reg_last = XCNEWVEC (struct deps_reg, deps->max_reg);
++}
++
++
++/* Free insn lists found in DEPS. */
++
++void
++free_deps (struct deps_desc *deps)
++{
++ unsigned i;
++ reg_set_iterator rsi;
++
++ /* We set max_reg to 0 when this context was already freed. */
++ if (deps->max_reg == 0)
++ {
++ gcc_assert (deps->reg_last == NULL);
++ return;
++ }
++ deps->max_reg = 0;
++
++ free_INSN_LIST_list (&deps->pending_read_insns);
++ free_EXPR_LIST_list (&deps->pending_read_mems);
++ free_INSN_LIST_list (&deps->pending_write_insns);
++ free_EXPR_LIST_list (&deps->pending_write_mems);
++ free_INSN_LIST_list (&deps->last_pending_memory_flush);
++
++ /* Without the EXECUTE_IF_SET, this loop is executed max_reg * nr_regions
++ times. For a testcase with 42000 regs and 8000 small basic blocks,
++ this loop accounted for nearly 60% (84 sec) of the total -O2 runtime. */
++ EXECUTE_IF_SET_IN_REG_SET (&deps->reg_last_in_use, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ if (reg_last->uses)
++ free_INSN_LIST_list (®_last->uses);
++ if (reg_last->sets)
++ free_INSN_LIST_list (®_last->sets);
++ if (reg_last->implicit_sets)
++ free_INSN_LIST_list (®_last->implicit_sets);
++ if (reg_last->clobbers)
++ free_INSN_LIST_list (®_last->clobbers);
++ }
++ CLEAR_REG_SET (&deps->reg_last_in_use);
++ CLEAR_REG_SET (&deps->reg_conditional_sets);
++
++ /* As we initialize reg_last lazily, it is possible that we didn't allocate
++ it at all. */
++ if (deps->reg_last)
++ free (deps->reg_last);
++ deps->reg_last = NULL;
++
++ deps = NULL;
++}
++
++/* Remove INSN from dependence contexts DEPS. Caution: reg_conditional_sets
++ is not handled. */
++void
++remove_from_deps (struct deps_desc *deps, rtx insn)
++{
++ int removed;
++ unsigned i;
++ reg_set_iterator rsi;
++
++ removed = remove_from_both_dependence_lists (insn, &deps->pending_read_insns,
++ &deps->pending_read_mems);
++ if (!DEBUG_INSN_P (insn))
++ deps->pending_read_list_length -= removed;
++ removed = remove_from_both_dependence_lists (insn, &deps->pending_write_insns,
++ &deps->pending_write_mems);
++ deps->pending_write_list_length -= removed;
++ removed = remove_from_dependence_list (insn, &deps->last_pending_memory_flush);
++ deps->pending_flush_length -= removed;
++
++ EXECUTE_IF_SET_IN_REG_SET (&deps->reg_last_in_use, 0, i, rsi)
++ {
++ struct deps_reg *reg_last = &deps->reg_last[i];
++ if (reg_last->uses)
++ remove_from_dependence_list (insn, ®_last->uses);
++ if (reg_last->sets)
++ remove_from_dependence_list (insn, ®_last->sets);
++ if (reg_last->implicit_sets)
++ remove_from_dependence_list (insn, ®_last->implicit_sets);
++ if (reg_last->clobbers)
++ remove_from_dependence_list (insn, ®_last->clobbers);
++ if (!reg_last->uses && !reg_last->sets && !reg_last->implicit_sets
++ && !reg_last->clobbers)
++ CLEAR_REGNO_REG_SET (&deps->reg_last_in_use, i);
++ }
++
++ if (CALL_P (insn))
++ {
++ remove_from_dependence_list (insn, &deps->last_function_call);
++ remove_from_dependence_list (insn,
++ &deps->last_function_call_may_noreturn);
++ }
++ remove_from_dependence_list (insn, &deps->sched_before_next_call);
++}
++
++/* Init deps data vector. */
++static void
++init_deps_data_vector (void)
++{
++ int reserve = (sched_max_luid + 1
++ - VEC_length (haifa_deps_insn_data_def, h_d_i_d));
++ if (reserve > 0
++ && ! VEC_space (haifa_deps_insn_data_def, h_d_i_d, reserve))
++ VEC_safe_grow_cleared (haifa_deps_insn_data_def, heap, h_d_i_d,
++ 3 * sched_max_luid / 2);
++}
++
++/* If it is profitable to use them, initialize or extend (depending on
++ GLOBAL_P) dependency data. */
++void
++sched_deps_init (bool global_p)
++{
++ /* Average number of insns in the basic block.
++ '+ 1' is used to make it nonzero. */
++ int insns_in_block = sched_max_luid / n_basic_blocks + 1;
++
++ init_deps_data_vector ();
++
++ /* We use another caching mechanism for selective scheduling, so
++ we don't use this one. */
++ if (!sel_sched_p () && global_p && insns_in_block > 100 * 5)
++ {
++ /* ?!? We could save some memory by computing a per-region luid mapping
++ which could reduce both the number of vectors in the cache and the
++ size of each vector. Instead we just avoid the cache entirely unless
++ the average number of instructions in a basic block is very high. See
++ the comment before the declaration of true_dependency_cache for
++ what we consider "very high". */
++ cache_size = 0;
++ extend_dependency_caches (sched_max_luid, true);
++ }
++
++ if (global_p)
++ {
++ dl_pool = create_alloc_pool ("deps_list", sizeof (struct _deps_list),
++ /* Allocate lists for one block at a time. */
++ insns_in_block);
++ dn_pool = create_alloc_pool ("dep_node", sizeof (struct _dep_node),
++ /* Allocate nodes for one block at a time.
++ We assume that average insn has
++ 5 producers. */
++ 5 * insns_in_block);
++ }
++}
++
++
++/* Create or extend (depending on CREATE_P) dependency caches to
++ size N. */
++void
++extend_dependency_caches (int n, bool create_p)
++{
++ if (create_p || true_dependency_cache)
++ {
++ int i, luid = cache_size + n;
++
++ true_dependency_cache = XRESIZEVEC (bitmap_head, true_dependency_cache,
++ luid);
++ output_dependency_cache = XRESIZEVEC (bitmap_head,
++ output_dependency_cache, luid);
++ anti_dependency_cache = XRESIZEVEC (bitmap_head, anti_dependency_cache,
++ luid);
++
++ if (current_sched_info->flags & DO_SPECULATION)
++ spec_dependency_cache = XRESIZEVEC (bitmap_head, spec_dependency_cache,
++ luid);
++
++ for (i = cache_size; i < luid; i++)
++ {
++ bitmap_initialize (&true_dependency_cache[i], 0);
++ bitmap_initialize (&output_dependency_cache[i], 0);
++ bitmap_initialize (&anti_dependency_cache[i], 0);
++
++ if (current_sched_info->flags & DO_SPECULATION)
++ bitmap_initialize (&spec_dependency_cache[i], 0);
++ }
++ cache_size = luid;
++ }
++}
++
++/* Finalize dependency information for the whole function. */
++void
++sched_deps_finish (void)
++{
++ gcc_assert (deps_pools_are_empty_p ());
++ free_alloc_pool_if_empty (&dn_pool);
++ free_alloc_pool_if_empty (&dl_pool);
++ gcc_assert (dn_pool == NULL && dl_pool == NULL);
++
++ VEC_free (haifa_deps_insn_data_def, heap, h_d_i_d);
++ cache_size = 0;
++
++ if (true_dependency_cache)
++ {
++ int i;
++
++ for (i = 0; i < cache_size; i++)
++ {
++ bitmap_clear (&true_dependency_cache[i]);
++ bitmap_clear (&output_dependency_cache[i]);
++ bitmap_clear (&anti_dependency_cache[i]);
++
++ if (sched_deps_info->generate_spec_deps)
++ bitmap_clear (&spec_dependency_cache[i]);
++ }
++ free (true_dependency_cache);
++ true_dependency_cache = NULL;
++ free (output_dependency_cache);
++ output_dependency_cache = NULL;
++ free (anti_dependency_cache);
++ anti_dependency_cache = NULL;
++
++ if (sched_deps_info->generate_spec_deps)
++ {
++ free (spec_dependency_cache);
++ spec_dependency_cache = NULL;
++ }
++
++ }
++}
++
++/* Initialize some global variables needed by the dependency analysis
++ code. */
++
++void
++init_deps_global (void)
++{
++ CLEAR_HARD_REG_SET (implicit_reg_pending_clobbers);
++ CLEAR_HARD_REG_SET (implicit_reg_pending_uses);
++ reg_pending_sets = ALLOC_REG_SET (®_obstack);
++ reg_pending_clobbers = ALLOC_REG_SET (®_obstack);
++ reg_pending_uses = ALLOC_REG_SET (®_obstack);
++ reg_pending_barrier = NOT_A_BARRIER;
++
++ if (!sel_sched_p () || sched_emulate_haifa_p)
++ {
++ sched_deps_info->start_insn = haifa_start_insn;
++ sched_deps_info->finish_insn = haifa_finish_insn;
++
++ sched_deps_info->note_reg_set = haifa_note_reg_set;
++ sched_deps_info->note_reg_clobber = haifa_note_reg_clobber;
++ sched_deps_info->note_reg_use = haifa_note_reg_use;
++
++ sched_deps_info->note_mem_dep = haifa_note_mem_dep;
++ sched_deps_info->note_dep = haifa_note_dep;
++ }
++}
++
++/* Free everything used by the dependency analysis code. */
++
++void
++finish_deps_global (void)
++{
++ FREE_REG_SET (reg_pending_sets);
++ FREE_REG_SET (reg_pending_clobbers);
++ FREE_REG_SET (reg_pending_uses);
++}
++
++/* Estimate the weakness of dependence between MEM1 and MEM2. */
++dw_t
++estimate_dep_weak (rtx mem1, rtx mem2)
++{
++ rtx r1, r2;
++
++ if (mem1 == mem2)
++ /* MEMs are the same - don't speculate. */
++ return MIN_DEP_WEAK;
++
++ r1 = XEXP (mem1, 0);
++ r2 = XEXP (mem2, 0);
++
++ if (r1 == r2
++ || (REG_P (r1) && REG_P (r2)
++ && REGNO (r1) == REGNO (r2)))
++ /* Again, MEMs are the same. */
++ return MIN_DEP_WEAK;
++ else if ((REG_P (r1) && !REG_P (r2))
++ || (!REG_P (r1) && REG_P (r2)))
++ /* Different addressing modes - reason to be more speculative,
++ than usual. */
++ return NO_DEP_WEAK - (NO_DEP_WEAK - UNCERTAIN_DEP_WEAK) / 2;
++ else
++ /* We can't say anything about the dependence. */
++ return UNCERTAIN_DEP_WEAK;
++}
++
++/* Add or update backward dependence between INSN and ELEM with type DEP_TYPE.
++ This function can handle same INSN and ELEM (INSN == ELEM).
++ It is a convenience wrapper. */
++void
++add_dependence (rtx insn, rtx elem, enum reg_note dep_type)
++{
++ ds_t ds;
++ bool internal;
++
++ if (dep_type == REG_DEP_TRUE)
++ ds = DEP_TRUE;
++ else if (dep_type == REG_DEP_OUTPUT)
++ ds = DEP_OUTPUT;
++ else
++ {
++ gcc_assert (dep_type == REG_DEP_ANTI);
++ ds = DEP_ANTI;
++ }
++
++ /* When add_dependence is called from inside sched-deps.c, we expect
++ cur_insn to be non-null. */
++ internal = cur_insn != NULL;
++ if (internal)
++ gcc_assert (insn == cur_insn);
++ else
++ cur_insn = insn;
++
++ note_dep (elem, ds);
++ if (!internal)
++ cur_insn = NULL;
++}
++
++/* Return weakness of speculative type TYPE in the dep_status DS. */
++dw_t
++get_dep_weak_1 (ds_t ds, ds_t type)
++{
++ ds = ds & type;
++
++ switch (type)
++ {
++ case BEGIN_DATA: ds >>= BEGIN_DATA_BITS_OFFSET; break;
++ case BE_IN_DATA: ds >>= BE_IN_DATA_BITS_OFFSET; break;
++ case BEGIN_CONTROL: ds >>= BEGIN_CONTROL_BITS_OFFSET; break;
++ case BE_IN_CONTROL: ds >>= BE_IN_CONTROL_BITS_OFFSET; break;
++ default: gcc_unreachable ();
++ }
++
++ return (dw_t) ds;
++}
++
++dw_t
++get_dep_weak (ds_t ds, ds_t type)
++{
++ dw_t dw = get_dep_weak_1 (ds, type);
++
++ gcc_assert (MIN_DEP_WEAK <= dw && dw <= MAX_DEP_WEAK);
++ return dw;
++}
++
++/* Return the dep_status, which has the same parameters as DS, except for
++ speculative type TYPE, that will have weakness DW. */
++ds_t
++set_dep_weak (ds_t ds, ds_t type, dw_t dw)
++{
++ gcc_assert (MIN_DEP_WEAK <= dw && dw <= MAX_DEP_WEAK);
++
++ ds &= ~type;
++ switch (type)
++ {
++ case BEGIN_DATA: ds |= ((ds_t) dw) << BEGIN_DATA_BITS_OFFSET; break;
++ case BE_IN_DATA: ds |= ((ds_t) dw) << BE_IN_DATA_BITS_OFFSET; break;
++ case BEGIN_CONTROL: ds |= ((ds_t) dw) << BEGIN_CONTROL_BITS_OFFSET; break;
++ case BE_IN_CONTROL: ds |= ((ds_t) dw) << BE_IN_CONTROL_BITS_OFFSET; break;
++ default: gcc_unreachable ();
++ }
++ return ds;
++}
++
++/* Return the join of two dep_statuses DS1 and DS2.
++ If MAX_P is true then choose the greater probability,
++ otherwise multiply probabilities.
++ This function assumes that both DS1 and DS2 contain speculative bits. */
++static ds_t
++ds_merge_1 (ds_t ds1, ds_t ds2, bool max_p)
++{
++ ds_t ds, t;
++
++ gcc_assert ((ds1 & SPECULATIVE) && (ds2 & SPECULATIVE));
++
++ ds = (ds1 & DEP_TYPES) | (ds2 & DEP_TYPES);
++
++ t = FIRST_SPEC_TYPE;
++ do
++ {
++ if ((ds1 & t) && !(ds2 & t))
++ ds |= ds1 & t;
++ else if (!(ds1 & t) && (ds2 & t))
++ ds |= ds2 & t;
++ else if ((ds1 & t) && (ds2 & t))
++ {
++ dw_t dw1 = get_dep_weak (ds1, t);
++ dw_t dw2 = get_dep_weak (ds2, t);
++ ds_t dw;
++
++ if (!max_p)
++ {
++ dw = ((ds_t) dw1) * ((ds_t) dw2);
++ dw /= MAX_DEP_WEAK;
++ if (dw < MIN_DEP_WEAK)
++ dw = MIN_DEP_WEAK;
++ }
++ else
++ {
++ if (dw1 >= dw2)
++ dw = dw1;
++ else
++ dw = dw2;
++ }
++
++ ds = set_dep_weak (ds, t, (dw_t) dw);
++ }
++
++ if (t == LAST_SPEC_TYPE)
++ break;
++ t <<= SPEC_TYPE_SHIFT;
++ }
++ while (1);
++
++ return ds;
++}
++
++/* Return the join of two dep_statuses DS1 and DS2.
++ This function assumes that both DS1 and DS2 contain speculative bits. */
++ds_t
++ds_merge (ds_t ds1, ds_t ds2)
++{
++ return ds_merge_1 (ds1, ds2, false);
++}
++
++/* Return the join of two dep_statuses DS1 and DS2. */
++ds_t
++ds_full_merge (ds_t ds, ds_t ds2, rtx mem1, rtx mem2)
++{
++ ds_t new_status = ds | ds2;
++
++ if (new_status & SPECULATIVE)
++ {
++ if ((ds && !(ds & SPECULATIVE))
++ || (ds2 && !(ds2 & SPECULATIVE)))
++ /* Then this dep can't be speculative. */
++ new_status &= ~SPECULATIVE;
++ else
++ {
++ /* Both are speculative. Merging probabilities. */
++ if (mem1)
++ {
++ dw_t dw;
++
++ dw = estimate_dep_weak (mem1, mem2);
++ ds = set_dep_weak (ds, BEGIN_DATA, dw);
++ }
++
++ if (!ds)
++ new_status = ds2;
++ else if (!ds2)
++ new_status = ds;
++ else
++ new_status = ds_merge (ds2, ds);
++ }
++ }
++
++ return new_status;
++}
++
++/* Return the join of DS1 and DS2. Use maximum instead of multiplying
++ probabilities. */
++ds_t
++ds_max_merge (ds_t ds1, ds_t ds2)
++{
++ if (ds1 == 0 && ds2 == 0)
++ return 0;
++
++ if (ds1 == 0 && ds2 != 0)
++ return ds2;
++
++ if (ds1 != 0 && ds2 == 0)
++ return ds1;
++
++ return ds_merge_1 (ds1, ds2, true);
++}
++
++/* Return the probability of speculation success for the speculation
++ status DS. */
++dw_t
++ds_weak (ds_t ds)
++{
++ ds_t res = 1, dt;
++ int n = 0;
++
++ dt = FIRST_SPEC_TYPE;
++ do
++ {
++ if (ds & dt)
++ {
++ res *= (ds_t) get_dep_weak (ds, dt);
++ n++;
++ }
++
++ if (dt == LAST_SPEC_TYPE)
++ break;
++ dt <<= SPEC_TYPE_SHIFT;
++ }
++ while (1);
++
++ gcc_assert (n);
++ while (--n)
++ res /= MAX_DEP_WEAK;
++
++ if (res < MIN_DEP_WEAK)
++ res = MIN_DEP_WEAK;
++
++ gcc_assert (res <= MAX_DEP_WEAK);
++
++ return (dw_t) res;
++}
++
++/* Return a dep status that contains all speculation types of DS. */
++ds_t
++ds_get_speculation_types (ds_t ds)
++{
++ if (ds & BEGIN_DATA)
++ ds |= BEGIN_DATA;
++ if (ds & BE_IN_DATA)
++ ds |= BE_IN_DATA;
++ if (ds & BEGIN_CONTROL)
++ ds |= BEGIN_CONTROL;
++ if (ds & BE_IN_CONTROL)
++ ds |= BE_IN_CONTROL;
++
++ return ds & SPECULATIVE;
++}
++
++/* Return a dep status that contains maximal weakness for each speculation
++ type present in DS. */
++ds_t
++ds_get_max_dep_weak (ds_t ds)
++{
++ if (ds & BEGIN_DATA)
++ ds = set_dep_weak (ds, BEGIN_DATA, MAX_DEP_WEAK);
++ if (ds & BE_IN_DATA)
++ ds = set_dep_weak (ds, BE_IN_DATA, MAX_DEP_WEAK);
++ if (ds & BEGIN_CONTROL)
++ ds = set_dep_weak (ds, BEGIN_CONTROL, MAX_DEP_WEAK);
++ if (ds & BE_IN_CONTROL)
++ ds = set_dep_weak (ds, BE_IN_CONTROL, MAX_DEP_WEAK);
++
++ return ds;
++}
++
++/* Dump information about the dependence status S. */
++static void
++dump_ds (FILE *f, ds_t s)
++{
++ fprintf (f, "{");
++
++ if (s & BEGIN_DATA)
++ fprintf (f, "BEGIN_DATA: %d; ", get_dep_weak_1 (s, BEGIN_DATA));
++ if (s & BE_IN_DATA)
++ fprintf (f, "BE_IN_DATA: %d; ", get_dep_weak_1 (s, BE_IN_DATA));
++ if (s & BEGIN_CONTROL)
++ fprintf (f, "BEGIN_CONTROL: %d; ", get_dep_weak_1 (s, BEGIN_CONTROL));
++ if (s & BE_IN_CONTROL)
++ fprintf (f, "BE_IN_CONTROL: %d; ", get_dep_weak_1 (s, BE_IN_CONTROL));
++
++ if (s & HARD_DEP)
++ fprintf (f, "HARD_DEP; ");
++
++ if (s & DEP_TRUE)
++ fprintf (f, "DEP_TRUE; ");
++ if (s & DEP_ANTI)
++ fprintf (f, "DEP_ANTI; ");
++ if (s & DEP_OUTPUT)
++ fprintf (f, "DEP_OUTPUT; ");
++
++ fprintf (f, "}");
++}
++
++void
++debug_ds (ds_t s)
++{
++ dump_ds (stderr, s);
++ fprintf (stderr, "\n");
++}
++
++#ifdef ENABLE_CHECKING
++/* Verify that dependence type and status are consistent.
++ If RELAXED_P is true, then skip dep_weakness checks. */
++static void
++check_dep (dep_t dep, bool relaxed_p)
++{
++ enum reg_note dt = DEP_TYPE (dep);
++ ds_t ds = DEP_STATUS (dep);
++
++ gcc_assert (DEP_PRO (dep) != DEP_CON (dep));
++
++ if (!(current_sched_info->flags & USE_DEPS_LIST))
++ {
++ gcc_assert (ds == -1);
++ return;
++ }
++
++ /* Check that dependence type contains the same bits as the status. */
++ if (dt == REG_DEP_TRUE)
++ gcc_assert (ds & DEP_TRUE);
++ else if (dt == REG_DEP_OUTPUT)
++ gcc_assert ((ds & DEP_OUTPUT)
++ && !(ds & DEP_TRUE));
++ else
++ gcc_assert ((dt == REG_DEP_ANTI)
++ && (ds & DEP_ANTI)
++ && !(ds & (DEP_OUTPUT | DEP_TRUE)));
++
++ /* HARD_DEP can not appear in dep_status of a link. */
++ gcc_assert (!(ds & HARD_DEP));
++
++ /* Check that dependence status is set correctly when speculation is not
++ supported. */
++ if (!sched_deps_info->generate_spec_deps)
++ gcc_assert (!(ds & SPECULATIVE));
++ else if (ds & SPECULATIVE)
++ {
++ if (!relaxed_p)
++ {
++ ds_t type = FIRST_SPEC_TYPE;
++
++ /* Check that dependence weakness is in proper range. */
++ do
++ {
++ if (ds & type)
++ get_dep_weak (ds, type);
++
++ if (type == LAST_SPEC_TYPE)
++ break;
++ type <<= SPEC_TYPE_SHIFT;
++ }
++ while (1);
++ }
++
++ if (ds & BEGIN_SPEC)
++ {
++ /* Only true dependence can be data speculative. */
++ if (ds & BEGIN_DATA)
++ gcc_assert (ds & DEP_TRUE);
++
++ /* Control dependencies in the insn scheduler are represented by
++ anti-dependencies, therefore only anti dependence can be
++ control speculative. */
++ if (ds & BEGIN_CONTROL)
++ gcc_assert (ds & DEP_ANTI);
++ }
++ else
++ {
++ /* Subsequent speculations should resolve true dependencies. */
++ gcc_assert ((ds & DEP_TYPES) == DEP_TRUE);
++ }
++
++ /* Check that true and anti dependencies can't have other speculative
++ statuses. */
++ if (ds & DEP_TRUE)
++ gcc_assert (ds & (BEGIN_DATA | BE_IN_SPEC));
++ /* An output dependence can't be speculative at all. */
++ gcc_assert (!(ds & DEP_OUTPUT));
++ if (ds & DEP_ANTI)
++ gcc_assert (ds & BEGIN_CONTROL);
++ }
++}
++#endif /* ENABLE_CHECKING */
++
++#endif /* INSN_SCHEDULING */
+diff -Nbaur gcc-4.5.2/libcpp/Makefile.in gcc-4.5.2-arm/libcpp/Makefile.in
+--- gcc-4.5.2/libcpp/Makefile.in 2010-12-16 12:49:03.000000000 +0000
++++ gcc-4.5.2-arm/libcpp/Makefile.in 2010-12-18 14:34:41.000000000 +0000
+@@ -212,8 +212,7 @@
+ # Note that we put the dependencies into a .Tpo file, then move them
+ # into place if the compile succeeds. We need this because gcc does
+ # not atomically write the dependency output file.
+-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
+-POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++COMPILE = $(COMPILE.base) -o $@
+ else
+ COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
+ $(depcomp) $(COMPILE.base)
diff --git a/dkarm-eabi/patches/newlib-1.19.0.patch b/dkarm-eabi/patches/newlib-1.19.0.patch
new file mode 100644
index 0000000..213fd47
--- /dev/null
+++ b/dkarm-eabi/patches/newlib-1.19.0.patch
@@ -0,0 +1,7043 @@
+diff -Nbaur newlib-1.19.0/libgloss/arm/crt0.S newlib-1.19.0-arm/libgloss/arm/crt0.S
+--- newlib-1.19.0/libgloss/arm/crt0.S 2008-10-06 21:55:19.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/arm/crt0.S 2010-12-18 14:40:27.000000000 +0000
+@@ -167,7 +167,7 @@
+ ldr r3, .Lhwinit
+ cmp r3, #0
+ beq .LC24
+-#if defined(__thumb__) || defined(__thumb2__)
++#if defined(__thumb2__)
+ blx r3
+ #else
+ mov lr, pc
+@@ -177,7 +177,7 @@
+ ldr r3, .Lswinit
+ cmp r3, #0
+ beq .LC25
+-#if defined(__thumb__) || defined(__thumb2__)
++#if defined(__thumb2__)
+ blx r3
+ #else
+ mov lr, pc
+diff -Nbaur newlib-1.19.0/libgloss/configure newlib-1.19.0-arm/libgloss/configure
+--- newlib-1.19.0/libgloss/configure 2010-12-02 19:35:47.000000000 +0000
++++ newlib-1.19.0-arm/libgloss/configure 2010-12-18 14:40:27.000000000 +0000
+@@ -1822,6 +1822,7 @@
+
+
+
++
+ if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+ fi
+@@ -2584,6 +2585,8 @@
+
+ fi
+
++subdirs="$subdirs libsysbase"
++
+ DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+@@ -3926,7 +3929,8 @@
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+ fi
+-ac_cr='
'
++ac_cr='
++'
+ 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'
+diff -Nbaur newlib-1.19.0/libgloss/configure.in newlib-1.19.0-arm/libgloss/configure.in
+--- newlib-1.19.0/libgloss/configure.in 2010-12-02 19:35:47.000000000 +0000
++++ newlib-1.19.0-arm/libgloss/configure.in 2010-12-18 14:40:27.000000000 +0000
+@@ -2,6 +2,7 @@
+ AC_PREREQ(2.59)
+ AC_INIT([libgloss],[LIBGLOSS_VERSION])
+ AC_CONFIG_SRCDIR([libnosys])
++AC_CONFIG_SRCDIR([libsysbase])
+
+ if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+@@ -150,6 +151,7 @@
+ if test "${config_libnosys}" = "true"; then
+ AC_CONFIG_SUBDIRS([libnosys])
+ fi
++AC_CONFIG_SUBDIRS(libsysbase)
+
+ LIB_AC_PROG_CC
+ AS=${AS-as}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/Makefile.in newlib-1.19.0-arm/libgloss/libsysbase/Makefile.in
+--- newlib-1.19.0/libgloss/libsysbase/Makefile.in 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/Makefile.in 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,148 @@
++# Copyright (c) 1998 Cygnus Support
++#
++# The authors hereby grant permission to use, copy, modify, distribute,
++# and license this software and its documentation for any purpose, provided
++# that existing copyright notices are retained in all copies and that this
++# notice is included verbatim in any distributions. No written agreement,
++# license, or royalty fee is required for any of the authorized uses.
++# Modifications to this software may be copyrighted by their authors
++# and need not follow the licensing terms described here, provided that
++# the new terms are clearly indicated on the first page of each file where
++# they apply.
++
++DESTDIR =
++VPATH = @srcdir@
++srcdir = @srcdir@
++objdir = .
++srcroot = $(srcdir)/../..
++objroot = $(objdir)/../..
++
++prefix = @prefix@
++exec_prefix = @exec_prefix@
++
++host_alias = @host_alias@
++target_alias = @target_alias@
++program_transform_name = @program_transform_name@
++
++bindir = @bindir@
++libdir = @libdir@
++tooldir = $(exec_prefix)/$(target_alias)
++
++# Multilib support variables.
++# TOP is used instead of MULTI{BUILD,SRC}TOP.
++MULTIDIRS =
++MULTISUBDIR =
++MULTIDO = true
++MULTICLEAN = true
++
++INSTALL = @INSTALL@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_DATA = @INSTALL_DATA@
++
++SHELL = /bin/sh
++
++CC = @CC@
++
++#AS = @AS@
++AS = `if [ -f ${objroot}/../gas/as.new ] ; \
++ then echo ${objroot}/../gas/as.new ; \
++ else echo as ; fi`
++
++AR = @AR@
++
++#LD = @LD@
++LD = `if [ -f ${objroot}/../ld/ld.new ] ; \
++ then echo ${objroot}/../ld/ld.new ; \
++ else echo ld ; fi`
++
++RANLIB = @RANLIB@
++
++OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
++ then echo ${objroot}/../binutils/objdump ; \
++ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
++OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
++ then echo ${objroot}/../binutils/objcopy ; \
++ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
++
++# object files needed
++OBJS = abort.o iosupport.o close.o environ.o execve.o fork.o fstat.o getpid.o gettod.o \
++ isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o times.o \
++ unlink.o wait.o write.o _exit.o malloc_vars.o \
++ chdir.o mkdir.o dir.o rename.o build_argv.o statvfs.o \
++ flock.o syscall_support.o handle_manager.o truncate.o ftruncate.o dirent.o fsync.o \
++ fchmod.o chmod.o
++
++# Object files specific to particular targets.
++EVALOBJS = ${OBJS}
++
++GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
++ then echo -L${objroot}/../gcc ; fi`
++
++OUTPUTS = libsysbase.a
++
++NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
++NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
++
++INCLUDES = -I. -I$(srcdir)/..
++# Note that when building the library, ${MULTILIB} is not the way multilib
++# options are passed; they're passed in $(CFLAGS).
++CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
++LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
++AR_FLAGS = qc
++
++.c.o:
++ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
++
++.C.o:
++ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
++.s.o:
++ $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
++
++#
++# GCC knows to run the preprocessor on .S files before it assembles them.
++#
++.S.o:
++ $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
++
++#
++# this is a bogus target that'll produce an assembler from the
++# C source with the right compiler options. this is so we can
++# track down code generation or debug symbol bugs.
++#
++.c.s:
++ $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $<
++
++all: ${OUTPUTS}
++
++#
++# here's where we build the library for each target
++#
++
++libsysbase.a: $(EVALOBJS)
++ ${AR} ${ARFLAGS} $@ $(EVALOBJS)
++ ${RANLIB} $@
++
++doc:
++
++clean mostlyclean:
++ rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x
++
++distclean maintainer-clean realclean: clean
++ rm -f Makefile config.status $(OUTPUTS)
++
++.PHONY: install info install-info clean-info
++install:
++ @for outputs in ${OUTPUTS}; do\
++ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
++ $(INSTALL_PROGRAM) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
++ done
++
++info:
++install-info:
++clean-info:
++
++Makefile: Makefile.in config.status @host_makefile_frag_path@
++ $(SHELL) config.status
++
++config.status: configure
++ $(SHELL) config.status --recheck
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/_exit.c newlib-1.19.0-arm/libgloss/libsysbase/_exit.c
+--- newlib-1.19.0/libgloss/libsysbase/_exit.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/_exit.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,19 @@
++/* Stub version of _exit. */
++
++#include
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++_VOID
++_DEFUN (_exit, (rc),
++ int rc)
++{
++
++ if ( __syscalls.exit ) {
++ __syscalls.exit(rc);
++ }
++
++ while(1);
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/abort.c newlib-1.19.0-arm/libgloss/libsysbase/abort.c
+--- newlib-1.19.0/libgloss/libsysbase/abort.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/abort.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,8 @@
++#include
++#include
++
++void abort(void) {
++ write (2, "Abort called.\n", sizeof("Abort called.\n")-1);
++ _exit (1);
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/acconfig.h newlib-1.19.0-arm/libgloss/libsysbase/acconfig.h
+--- newlib-1.19.0/libgloss/libsysbase/acconfig.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/acconfig.h 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,29 @@
++/* Name of package. */
++#undef PACKAGE
++
++/* Version of package. */
++#undef VERSION
++
++/* Missing syscall names */
++#undef MISSING_SYSCALL_NAMES
++
++/* Reentrant syscalls */
++#undef REENTRANT_SYSCALLS_PROVIDED
++
++/* Using ELF format */
++#undef HAVE_ELF
++
++/* Using GNU LD */
++#undef HAVE_GNU_LD
++
++/* .previous directive allowed */
++#undef HAVE_ASM_PREVIOUS_DIRECTIVE
++
++/* .pushsection/.popsection directives allowed */
++#undef HAVE_ASM_POPSECTION_DIRECTIVE
++
++/* support for section attributes */
++#undef HAVE_SECTION_ATTRIBUTES
++
++/* symbol prefix */
++#undef __SYMBOL_PREFIX
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/aclocal.m4 newlib-1.19.0-arm/libgloss/libsysbase/aclocal.m4
+--- newlib-1.19.0/libgloss/libsysbase/aclocal.m4 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/aclocal.m4 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,344 @@
++# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
++
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005 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.
++
++# AM_CONDITIONAL -*- Autoconf -*-
++
++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
++# 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 7
++
++# 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])
++AC_SUBST([$1_FALSE])
++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])])
++
++
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# 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 8
++
++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
++# written in clear, in which case automake, when reading aclocal.m4,
++# will think it sees a *use*, and therefore will trigger all it's
++# C support machinery. Also note that it means that autoscan, seeing
++# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
++
++
++# _AM_DEPENDENCIES(NAME)
++# ----------------------
++# See how the compiler implements dependency checking.
++# NAME is "CC", "CXX", "GCJ", or "OBJC".
++# We try a few techniques and use that to set a single cache variable.
++#
++# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
++# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
++# dependency, and given that the user is not expected to run this macro,
++# just rely on AC_PROG_CC.
++AC_DEFUN([_AM_DEPENDENCIES],
++[AC_REQUIRE([AM_SET_DEPDIR])dnl
++AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
++AC_REQUIRE([AM_MAKE_INCLUDE])dnl
++AC_REQUIRE([AM_DEP_TRACK])dnl
++
++ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
++ [$1], CXX, [depcc="$CXX" am_compiler_list=],
++ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
++ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
++ [depcc="$$1" am_compiler_list=])
++
++AC_CACHE_CHECK([dependency style of $depcc],
++ [am_cv_$1_dependencies_compiler_type],
++[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++ # We make a subdir and do the tests there. Otherwise we can end up
++ # making bogus files that we don't know about and never remove. For
++ # instance it was reported that on HP-UX the gcc test will end up
++ # making a dummy file named `D' -- because `-MD' means `put the output
++ # in D'.
++ mkdir conftest.dir
++ # Copy depcomp to subdir because otherwise we won't find it if we're
++ # using a relative directory.
++ cp "$am_depcomp" conftest.dir
++ cd conftest.dir
++ # We will build objects and dependencies in a subdirectory because
++ # it helps to detect inapplicable dependency modes. For instance
++ # both Tru64's cc and ICC support -MD to output dependencies as a
++ # side effect of compilation, but ICC will put the dependencies in
++ # the current directory while Tru64 will put them in the object
++ # directory.
++ mkdir sub
++
++ am_cv_$1_dependencies_compiler_type=none
++ if test "$am_compiler_list" = ""; then
++ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
++ fi
++ for depmode in $am_compiler_list; do
++ # Setup a source with many dependencies, because some compilers
++ # like to wrap large dependency lists on column 80 (with \), and
++ # we should not choose a depcomp mode which is confused by this.
++ #
++ # We need to recreate these files for each test, as the compiler may
++ # overwrite some of them when testing with obscure command lines.
++ # This happens at least with the AIX C compiler.
++ : > sub/conftest.c
++ for i in 1 2 3 4 5 6; do
++ echo '#include "conftst'$i'.h"' >> sub/conftest.c
++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
++ # Solaris 8's {/usr,}/bin/sh.
++ touch sub/conftst$i.h
++ done
++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
++
++ case $depmode in
++ nosideeffect)
++ # after this tag, mechanisms are not by side-effect, so they'll
++ # only be used when explicitly requested
++ if test "x$enable_dependency_tracking" = xyes; then
++ continue
++ else
++ break
++ fi
++ ;;
++ none) break ;;
++ esac
++ # We check with `-c' and `-o' for the sake of the "dashmstdout"
++ # mode. It turns out that the SunPro C++ compiler does not properly
++ # handle `-M -o', and we need to detect this.
++ if depmode=$depmode \
++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
++ >/dev/null 2>conftest.err &&
++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++ # icc doesn't choke on unknown options, it will just issue warnings
++ # or remarks (even with -Werror). So we grep stderr for any message
++ # that says an option was ignored or not supported.
++ # When given -MP, icc 7.0 and 7.1 complain thusly:
++ # icc: Command line warning: ignoring option '-M'; no argument required
++ # The diagnosis changed in icc 8.0:
++ # icc: Command line remark: option '-MP' not supported
++ if (grep 'ignoring option' conftest.err ||
++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
++ am_cv_$1_dependencies_compiler_type=$depmode
++ break
++ fi
++ fi
++ done
++
++ cd ..
++ rm -rf conftest.dir
++else
++ am_cv_$1_dependencies_compiler_type=none
++fi
++])
++AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
++AM_CONDITIONAL([am__fastdep$1], [
++ test "x$enable_dependency_tracking" != xno \
++ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
++])
++
++
++# AM_SET_DEPDIR
++# -------------
++# Choose a directory name for dependency files.
++# This macro is AC_REQUIREd in _AM_DEPENDENCIES
++AC_DEFUN([AM_SET_DEPDIR],
++[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
++AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
++])
++
++
++# AM_DEP_TRACK
++# ------------
++AC_DEFUN([AM_DEP_TRACK],
++[AC_ARG_ENABLE(dependency-tracking,
++[ --disable-dependency-tracking speeds up one-time build
++ --enable-dependency-tracking do not reject slow dependency extractors])
++if test "x$enable_dependency_tracking" != xno; then
++ am_depcomp="$ac_aux_dir/depcomp"
++ AMDEPBACKSLASH='\'
++fi
++AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
++AC_SUBST([AMDEPBACKSLASH])
++])
++
++# Generate code to set up dependency tracking. -*- Autoconf -*-
++
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# 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_OUTPUT_DEPENDENCY_COMMANDS
++# ------------------------------
++AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
++[for mf in $CONFIG_FILES; do
++ # Strip MF so we end up with the name of the file.
++ mf=`echo "$mf" | sed -e 's/:.*$//'`
++ # Check whether this is an Automake generated Makefile or not.
++ # We used to match only the files named `Makefile.in', but
++ # some people rename them; so instead we look at the file content.
++ # Grep'ing the first line is not enough: some people post-process
++ # each Makefile.in and add a new line on top of each file to say so.
++ # So let's grep whole file.
++ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
++ dirpart=`AS_DIRNAME("$mf")`
++ else
++ continue
++ fi
++ # Extract the definition of DEPDIR, am__include, and am__quote
++ # from the Makefile without running `make'.
++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
++ test -z "$DEPDIR" && continue
++ am__include=`sed -n 's/^am__include = //p' < "$mf"`
++ test -z "am__include" && continue
++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
++ # When using ansi2knr, U may be empty or an underscore; expand it
++ U=`sed -n 's/^U = //p' < "$mf"`
++ # Find all dependency output files, they are included files with
++ # $(DEPDIR) in their names. We invoke sed twice because it is the
++ # simplest approach to changing $(DEPDIR) to its actual value in the
++ # expansion.
++ for file in `sed -n "
++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++ # Make sure the directory exists.
++ test -f "$dirpart/$file" && continue
++ fdir=`AS_DIRNAME(["$file"])`
++ AS_MKDIR_P([$dirpart/$fdir])
++ # echo "creating $dirpart/$file"
++ echo '# dummy' > "$dirpart/$file"
++ done
++done
++])# _AM_OUTPUT_DEPENDENCY_COMMANDS
++
++
++# AM_OUTPUT_DEPENDENCY_COMMANDS
++# -----------------------------
++# This macro should only be invoked once -- use via AC_REQUIRE.
++#
++# This code is only required when automatic dependency tracking
++# is enabled. FIXME. This creates each `.P' file that we will
++# need in order to bootstrap the dependency handling code.
++AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
++[AC_CONFIG_COMMANDS([depfiles],
++ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
++ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
++])
++
++# Copyright (C) 2003, 2005 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
++
++# Check whether the underlying file-system supports filenames
++# with a leading dot. For instance MS-DOS doesn't.
++AC_DEFUN([AM_SET_LEADING_DOT],
++[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
++AC_SUBST([am__leading_dot])])
++
++# Check to see how 'make' treats includes. -*- Autoconf -*-
++
++# Copyright (C) 2001, 2002, 2003, 2005 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_MAKE_INCLUDE()
++# -----------------
++# Check to see how make treats includes.
++AC_DEFUN([AM_MAKE_INCLUDE],
++[am_make=${MAKE-make}
++cat > confinc << 'END'
++am__doit:
++ @echo done
++.PHONY: am__doit
++END
++# If we don't find an include directive, just comment out the code.
++AC_MSG_CHECKING([for style of include used by $am_make])
++am__include="#"
++am__quote=
++_am_result=none
++# First try GNU make style include.
++echo "include confinc" > confmf
++# We grep out `Entering directory' and `Leaving directory'
++# messages which can occur if `w' ends up in MAKEFLAGS.
++# In particular we don't look at `^make:' because GNU make might
++# be invoked under some other name (usually "gmake"), in which
++# case it prints its new name instead of `make'.
++if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
++ am__include=include
++ am__quote=
++ _am_result=GNU
++fi
++# Now try BSD make style include.
++if test "$am__include" = "#"; then
++ echo '.include "confinc"' > confmf
++ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
++ am__include=.include
++ am__quote="\""
++ _am_result=BSD
++ fi
++fi
++AC_SUBST([am__include])
++AC_SUBST([am__quote])
++AC_MSG_RESULT([$_am_result])
++rm -f confinc confmf
++])
++
++m4_include([../acinclude.m4])
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/build_argv.c newlib-1.19.0-arm/libgloss/libsysbase/build_argv.c
+--- newlib-1.19.0/libgloss/libsysbase/build_argv.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/build_argv.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,31 @@
++struct __argv {
++ int argvMagic;
++ char *commandLine;
++ int length;
++ int argc;
++ char **argv;
++ char **endARGV;
++};
++
++
++void build_argv (struct __argv* argstruct ) {
++
++ char *data = argstruct->commandLine;
++ int len = argstruct->length;
++
++ char** argv = (char**)(((int)data + len + sizeof(char **)) & ~(sizeof(char **)-1));
++ char* end = data + len - 1;
++ int argCount = 0;
++
++ do {
++ argv[argCount++] = data; // Add next arg to argv list
++ while (*(data) && data < end) data++; // Move to next NULL delimiter
++ data++; // Move to one after the NULL delimiter
++ } while (data < end);
++
++ *end = '\0'; // Force NULL terminator for last arg
++
++ argstruct->argv = argv;
++ argstruct->argc = argCount;
++ argstruct->endARGV = &argv[argCount];
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/chdir.c newlib-1.19.0-arm/libgloss/libsysbase/chdir.c
+--- newlib-1.19.0/libgloss/libsysbase/chdir.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/chdir.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,176 @@
++#include
++#include
++#include
++#include
++#include
++
++/* CWD always start with "/" */
++static char _current_working_directory [MAXPATHLEN] = "/";
++
++#define DIRECTORY_SEPARATOR_CHAR '/'
++const char DIRECTORY_SEPARATOR[] = "/";
++const char DIRECTORY_THIS[] = ".";
++const char DIRECTORY_PARENT[] = "..";
++
++int _concatenate_path (struct _reent *r, char *path, const char *extra, int maxLength) {
++ char *pathEnd;
++ int pathLength;
++ const char *extraEnd;
++ int extraSize;
++
++ pathLength = strnlen (path, maxLength);
++
++ /* assumes path ends in a directory separator */
++ if (pathLength >= maxLength) {
++ r->_errno = ENAMETOOLONG;
++ return -1;
++ }
++ pathEnd = path + pathLength;
++ if (pathEnd[-1] != DIRECTORY_SEPARATOR_CHAR) {
++ pathEnd[0] = DIRECTORY_SEPARATOR_CHAR;
++ pathEnd += 1;
++ }
++
++ extraEnd = extra;
++
++ /* If the extra bit starts with a slash, start at root */
++ if (extra[0] == DIRECTORY_SEPARATOR_CHAR) {
++ pathEnd = strchr (path, DIRECTORY_SEPARATOR_CHAR) + 1;
++ pathEnd[0] = '\0';
++ }
++ do {
++ /* Advance past any separators in extra */
++ while (extra[0] == DIRECTORY_SEPARATOR_CHAR) {
++ extra += 1;
++ }
++
++ /* Grab the next directory name from extra */
++ extraEnd = strchr (extra, DIRECTORY_SEPARATOR_CHAR);
++ if (extraEnd == NULL) {
++ extraEnd = strrchr (extra, '\0');
++ } else {
++ extraEnd += 1;
++ }
++
++ extraSize = (extraEnd - extra);
++ if (extraSize == 0) {
++ break;
++ }
++
++ if ((strncmp (extra, DIRECTORY_THIS, sizeof(DIRECTORY_THIS) - 1) == 0)
++ && ((extra[sizeof(DIRECTORY_THIS)-1] == DIRECTORY_SEPARATOR_CHAR)
++ ||(extra[sizeof(DIRECTORY_THIS)-1] == '\0')))
++ {
++ /* Don't copy anything */
++ } else if ((strncmp (extra, DIRECTORY_PARENT, sizeof(DIRECTORY_PARENT) - 1) == 0)
++ && ((extra[sizeof(DIRECTORY_PARENT)-1] == DIRECTORY_SEPARATOR_CHAR)
++ ||(extra[sizeof(DIRECTORY_PARENT)-1] == '\0')))
++ {
++ /* Go up one level of in the path */
++ if (pathEnd[-1] == DIRECTORY_SEPARATOR_CHAR) {
++ // Remove trailing separator
++ pathEnd[-1] = '\0';
++ }
++ pathEnd = strrchr (path, DIRECTORY_SEPARATOR_CHAR);
++ if (pathEnd == NULL) {
++ /* Can't go up any higher, return false */
++ r->_errno = ENOENT;
++ return -1;
++ }
++ pathLength = pathEnd - path;
++ pathEnd += 1;
++ } else {
++ pathLength += extraSize;
++ if (pathLength >= maxLength) {
++ r->_errno = ENAMETOOLONG;
++ return -1;
++ }
++ /* Copy the next part over */
++ strncpy (pathEnd, extra, extraSize);
++ pathEnd += extraSize;
++ }
++ pathEnd[0] = '\0';
++ extra += extraSize;
++ } while (extraSize != 0);
++
++ if (pathEnd[-1] != DIRECTORY_SEPARATOR_CHAR) {
++ pathEnd[0] = DIRECTORY_SEPARATOR_CHAR;
++ pathEnd[1] = 0;
++ pathEnd += 1;
++ }
++
++ return 0;
++}
++
++int chdir (const char *path) {
++ struct _reent *r = _REENT;
++
++ int dev;
++ const char *pathPosition;
++ char temp_cwd [MAXPATHLEN];
++
++ /* Make sure the path is short enough */
++ if (strnlen (path, MAXPATHLEN + 1) >= MAXPATHLEN) {
++ r->_errno = ENAMETOOLONG;
++ return -1;
++ }
++
++ if (strchr (path, ':') != NULL) {
++ strncpy (temp_cwd, path, MAXPATHLEN);
++ /* Move path past device name */
++ path = strchr (path, ':') + 1;
++ } else {
++ strncpy (temp_cwd, _current_working_directory, MAXPATHLEN);
++ }
++
++ pathPosition = strchr (temp_cwd , ':') + 1;
++
++ /* Make sure the path starts in the root directory */
++ if (pathPosition[0] != DIRECTORY_SEPARATOR_CHAR) {
++ r->_errno = ENOENT;
++ return -1;
++ }
++
++ /* Concatenate the path to the CWD */
++ if (_concatenate_path (r, temp_cwd, path, MAXPATHLEN) == -1) {
++ return -1;
++ }
++
++ /* Get device from path name */
++ dev = FindDevice(temp_cwd);
++
++ if ((dev < 0) || (devoptab_list[dev]->chdir_r == NULL)) {
++ r->_errno = ENODEV;
++ return -1;
++ }
++
++ /* Try changing directories on the device */
++ if (devoptab_list[dev]->chdir_r (r, temp_cwd) == -1) {
++ return -1;
++ }
++
++ /* Since it worked, set the new CWD and default device */
++ setDefaultDevice(dev);
++ strncpy (_current_working_directory, temp_cwd, MAXPATHLEN);
++
++ return 0;
++}
++
++char *getcwd(char *buf, size_t size) {
++
++ struct _reent *r = _REENT;
++
++ if (size == 0) {
++ r->_errno = EINVAL;
++ return NULL;
++ }
++
++ if ( size < (strnlen (_current_working_directory, MAXPATHLEN) + 1)) {
++ r->_errno = ERANGE;
++ return NULL;
++ }
++
++ strncpy (buf, _current_working_directory, size);
++
++ return buf;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/chmod.c newlib-1.19.0-arm/libgloss/libsysbase/chmod.c
+--- newlib-1.19.0/libgloss/libsysbase/chmod.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/chmod.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,25 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include
++
++int chmod(const char *path, mode_t mode) {
++ int ret,dev;
++ struct _reent *r = _REENT;
++
++ /* Get device from path name */
++ dev = FindDevice(path);
++
++ if ((dev < 0) || (devoptab_list[dev]->chmod_r == NULL)) {
++ r->_errno = ENODEV;
++ ret = -1;
++ } else {
++ ret = devoptab_list[dev]->chmod_r(r,path,mode);
++ }
++
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/close.c newlib-1.19.0-arm/libgloss/libsysbase/close.c
+--- newlib-1.19.0/libgloss/libsysbase/close.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/close.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,41 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++
++#include "handle_manager.h"
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN(_close_r,(ptr,fileDesc),
++ struct _reent *ptr _AND
++ int fileDesc) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN(_close,(fileDesc),
++ int fileDesc) {
++//---------------------------------------------------------------------------------
++ struct _reent *ptr = _REENT;
++#endif
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ if(fileDesc!=-1) {
++
++ __handle *handle = __get_handle(fileDesc);
++
++ if ( handle != NULL) {
++ dev = handle->device;
++ fd = (unsigned int)handle->fileStruct;
++
++ if(devoptab_list[dev]->close_r)
++ ret = devoptab_list[dev]->close_r(ptr,fd);
++
++ __release_handle(fileDesc);
++ }
++ }
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/config.h.in newlib-1.19.0-arm/libgloss/libsysbase/config.h.in
+--- newlib-1.19.0/libgloss/libsysbase/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/config.h.in 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,25 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
++
++/* Missing syscall names */
++#undef MISSING_SYSCALL_NAMES
++
++/* Reentrant syscalls */
++#undef REENTRANT_SYSCALLS_PROVIDED
++
++/* Using ELF format */
++#undef HAVE_ELF
++
++/* Using GNU LD */
++#undef HAVE_GNU_LD
++
++/* .previous directive allowed */
++#undef HAVE_ASM_PREVIOUS_DIRECTIVE
++
++/* .pushsection/.popsection directives allowed */
++#undef HAVE_ASM_POPSECTION_DIRECTIVE
++
++/* support for section attributes */
++#undef HAVE_SECTION_ATTRIBUTES
++
++/* symbol prefix */
++#undef __SYMBOL_PREFIX
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/configure newlib-1.19.0-arm/libgloss/libsysbase/configure
+--- newlib-1.19.0/libgloss/libsysbase/configure 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/configure 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,3553 @@
++#! /bin/sh
++# Guess values for system-dependent variables and create Makefiles.
++# Generated by GNU Autoconf 2.59.
++#
++# Copyright (C) 2003 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 Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
++ set -o posix
++fi
++DUALCASE=1; export DUALCASE # for MKS sh
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# Work around bugs in pre-3.0 UWIN ksh.
++$as_unset ENV MAIL MAILPATH
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1; 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
++
++
++# Name of the executable.
++as_me=`$as_basename "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)$' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
++ /^X\/\(\/\/\)$/{ s//\1/; q; }
++ /^X\/\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++
++
++# PATH needs CR, and LINENO needs CR and PATH.
++# 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
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ 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
++
++ ;;
++ 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
++ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, and appends trailing '-' during
++ # substitution so that $LINENO is not a special case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\n,,
++ ' >$as_me.lineno &&
++ chmod +x $as_me.lineno ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); 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 sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ # We could just check for DJGPP; but this test a) works b) is more generic
++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
++ if test -f conf$$.exe; then
++ # Don't use ln at all; we don't have any links
++ as_ln_s='cp -p'
++ else
++ as_ln_s='ln -s'
++ fi
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.file
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++as_executable_p="test -f"
++
++# 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'"
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.
++as_nl='
++'
++IFS=" $as_nl"
++
++# CDPATH.
++$as_unset CDPATH
++
++
++# 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`
++
++exec 6>&1
++
++#
++# Initializations.
++#
++ac_default_prefix=/usr/local
++ac_config_libobj_dir=.
++cross_compiling=no
++subdirs=
++MFLAGS=
++MAKEFLAGS=
++SHELL=${CONFIG_SHELL-/bin/sh}
++
++# Maximum number of lines to put in a shell here document.
++# This variable seems obsolete. It should probably be removed, and
++# only ac_max_sed_lines should be used.
++: ${ac_max_here_lines=38}
++
++# Identity of this package.
++PACKAGE_NAME=
++PACKAGE_TARNAME=
++PACKAGE_VERSION=
++PACKAGE_STRING=
++PACKAGE_BUGREPORT=
++
++ac_unique_file="close.c"
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC am__leading_dot DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS AR LD RANLIB ac_ct_RANLIB CCAS CCASFLAGS host_makefile_frag_path LIBOBJS LTLIBOBJS'
++ac_subst_files='host_makefile_frag'
++
++# Initialize some variables set by options.
++ac_init_help=
++ac_init_version=false
++# 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.
++bindir='${exec_prefix}/bin'
++sbindir='${exec_prefix}/sbin'
++libexecdir='${exec_prefix}/libexec'
++datadir='${prefix}/share'
++sysconfdir='${prefix}/etc'
++sharedstatedir='${prefix}/com'
++localstatedir='${prefix}/var'
++libdir='${exec_prefix}/lib'
++includedir='${prefix}/include'
++oldincludedir='/usr/include'
++infodir='${prefix}/info'
++mandir='${prefix}/man'
++
++ac_prev=
++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
++
++ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
++
++ # Accept the important Cygnus configure options, so we can diagnose typos.
++
++ case $ac_option in
++
++ -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 | --data | --dat | --da)
++ ac_prev=datadir ;;
++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
++ | --da=*)
++ datadir=$ac_optarg ;;
++
++ -disable-* | --disable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval "enable_$ac_feature=no" ;;
++
++ -enable-* | --enable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ case $ac_option in
++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
++ *) ac_optarg=yes ;;
++ esac
++ eval "enable_$ac_feature='$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 ;;
++
++ -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 ;;
++
++ -localstatedir | --localstatedir | --localstatedi | --localstated \
++ | --localstate | --localstat | --localsta | --localst \
++ | --locals | --local | --loca | --loc | --lo)
++ ac_prev=localstatedir ;;
++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++ 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 ;;
++
++ -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package| sed 's/-/_/g'`
++ case $ac_option in
++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
++ *) ac_optarg=yes ;;
++ esac
++ eval "with_$ac_package='$ac_optarg'" ;;
++
++ -without-* | --without-*)
++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package | sed 's/-/_/g'`
++ eval "with_$ac_package=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 ;;
++
++ -*) { echo "$as_me: error: unrecognized option: $ac_option
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; }
++ ;;
++
++ *=*)
++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
++ { (exit 1); exit 1; }; }
++ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
++ eval "$ac_envvar='$ac_optarg'"
++ export $ac_envvar ;;
++
++ *)
++ # FIXME: should be removed in autoconf 3.0.
++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
++ 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'`
++ { echo "$as_me: error: missing argument to $ac_option" >&2
++ { (exit 1); exit 1; }; }
++fi
++
++# Be sure to have absolute paths.
++for ac_var in exec_prefix prefix
++do
++ eval ac_val=$`echo $ac_var`
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; };;
++ esac
++done
++
++# Be sure to have absolute paths.
++for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
++ localstatedir libdir includedir oldincludedir infodir mandir
++do
++ eval ac_val=$`echo $ac_var`
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* ) ;;
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; };;
++ esac
++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
++ 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
++
++
++# 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 its parent.
++ ac_confdir=`(dirname "$0") 2>/dev/null ||
++$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$0" : 'X\(//\)[^/]' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$0" |
++ 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
++ if test "$ac_srcdir_defaulted" = yes; then
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
++ { (exit 1); exit 1; }; }
++ else
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
++ { (exit 1); exit 1; }; }
++ fi
++fi
++(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
++ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
++ { (exit 1); exit 1; }; }
++srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
++ac_env_build_alias_set=${build_alias+set}
++ac_env_build_alias_value=$build_alias
++ac_cv_env_build_alias_set=${build_alias+set}
++ac_cv_env_build_alias_value=$build_alias
++ac_env_host_alias_set=${host_alias+set}
++ac_env_host_alias_value=$host_alias
++ac_cv_env_host_alias_set=${host_alias+set}
++ac_cv_env_host_alias_value=$host_alias
++ac_env_target_alias_set=${target_alias+set}
++ac_env_target_alias_value=$target_alias
++ac_cv_env_target_alias_set=${target_alias+set}
++ac_cv_env_target_alias_value=$target_alias
++ac_env_CCAS_set=${CCAS+set}
++ac_env_CCAS_value=$CCAS
++ac_cv_env_CCAS_set=${CCAS+set}
++ac_cv_env_CCAS_value=$CCAS
++ac_env_CCASFLAGS_set=${CCASFLAGS+set}
++ac_env_CCASFLAGS_value=$CCASFLAGS
++ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
++ac_cv_env_CCASFLAGS_value=$CCASFLAGS
++
++#
++# 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 this package 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 \`..']
++
++_ACEOF
++
++ cat <<_ACEOF
++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]
++ --datadir=DIR read-only architecture-independent data [PREFIX/share]
++ --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]
++ --infodir=DIR info documentation [PREFIX/info]
++ --mandir=DIR man documentation [PREFIX/man]
++_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
++
++ cat <<\_ACEOF
++
++Optional Features:
++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --disable-dependency-tracking speeds up one-time build
++ --enable-dependency-tracking do not reject slow dependency extractors
++
++Some influential environment variables:
++ CCAS assembler compiler command (defaults to CC)
++ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
++
++Use these variables to override the choices made by `configure' or to help
++it to find libraries and programs with nonstandard names/locations.
++
++_ACEOF
++fi
++
++if test "$ac_init_help" = "recursive"; then
++ # If there are subdirs, report their specific --help.
++ ac_popdir=`pwd`
++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
++ test -d $ac_dir || continue
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A "../" for each directory in $ac_dir_suffix.
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
++else
++ ac_dir_suffix= ac_top_builddir=
++fi
++
++case $srcdir in
++ .) # No --srcdir option. We are building in place.
++ ac_srcdir=.
++ if test -z "$ac_top_builddir"; then
++ ac_top_srcdir=.
++ else
++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
++ fi ;;
++ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir ;;
++ *) # Relative path.
++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++esac
++
++# Do not use `cd foo && pwd` to compute absolute paths, because
++# the directories may not exist.
++case `pwd` in
++.) ac_abs_builddir="$ac_dir";;
++*)
++ case "$ac_dir" in
++ .) ac_abs_builddir=`pwd`;;
++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
++ *) ac_abs_builddir=`pwd`/"$ac_dir";;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_builddir=${ac_top_builddir}.;;
++*)
++ case ${ac_top_builddir}. in
++ .) ac_abs_top_builddir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_srcdir=$ac_srcdir;;
++*)
++ case $ac_srcdir in
++ .) ac_abs_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_srcdir=$ac_top_srcdir;;
++*)
++ case $ac_top_srcdir in
++ .) ac_abs_top_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
++ esac;;
++esac
++
++ cd $ac_dir
++ # Check for guested configure; otherwise get Cygnus style 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
++ elif test -f $ac_srcdir/configure.ac ||
++ test -f $ac_srcdir/configure.in; then
++ echo
++ $ac_configure --help
++ else
++ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++ fi
++ cd $ac_popdir
++ done
++fi
++
++test -n "$ac_init_help" && exit 0
++if $ac_init_version; then
++ cat <<\_ACEOF
++
++Copyright (C) 2003 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 0
++fi
++exec 5>config.log
++cat >&5 <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++
++It was created by $as_me, which was
++generated by GNU Autoconf 2.59. Invocation command line was
++
++ $ $0 $@
++
++_ACEOF
++{
++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`
++hostinfo = `(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=.
++ echo "PATH: $as_dir"
++done
++
++} >&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_sep=
++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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ esac
++ case $ac_pass in
++ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++ 2)
++ ac_configure_args1="$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
++ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
++ # Get rid of the leading space.
++ ac_sep=" "
++ ;;
++ esac
++ done
++done
++$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
++$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
++# such as our DU 5.0 friend, will then `close' the trap.
++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,
++{
++ (set) 2>&1 |
++ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
++ *ac_space=\ *)
++ sed -n \
++ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
++ ;;
++ *)
++ sed -n \
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ ;;
++ esac;
++}
++ echo
++
++ cat <<\_ASBOX
++## ----------------- ##
++## Output variables. ##
++## ----------------- ##
++_ASBOX
++ echo
++ for ac_var in $ac_subst_vars
++ do
++ eval ac_val=$`echo $ac_var`
++ echo "$ac_var='"'"'$ac_val'"'"'"
++ done | sort
++ echo
++
++ if test -n "$ac_subst_files"; then
++ cat <<\_ASBOX
++## ------------- ##
++## Output files. ##
++## ------------- ##
++_ASBOX
++ echo
++ for ac_var in $ac_subst_files
++ do
++ eval ac_val=$`echo $ac_var`
++ echo "$ac_var='"'"'$ac_val'"'"'"
++ done | sort
++ echo
++ fi
++
++ if test -s confdefs.h; then
++ cat <<\_ASBOX
++## ----------- ##
++## confdefs.h. ##
++## ----------- ##
++_ASBOX
++ echo
++ sed "/^$/d" confdefs.h | sort
++ echo
++ fi
++ test "$ac_signal" != 0 &&
++ echo "$as_me: caught signal $ac_signal"
++ echo "$as_me: exit $exit_status"
++ } >&5
++ rm -f core *.core &&
++ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++ exit $exit_status
++ ' 0
++for ac_signal in 1 2 13 15; do
++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++done
++ac_signal=0
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -rf conftest* confdefs.h
++# AIX cpp loses on an empty file, so make sure it contains at least a newline.
++echo >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
++
++
++# Let the site file select an alternate cache file if it wants to.
++# Prefer explicitly selected file to automatically selected ones.
++if test -z "$CONFIG_SITE"; then
++ if test "x$prefix" != xNONE; then
++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
++ else
++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
++ fi
++fi
++for ac_site_file in $CONFIG_SITE; do
++ if test -r "$ac_site_file"; then
++ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
++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
++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
++echo "$as_me: loading cache $cache_file" >&6;}
++ case $cache_file in
++ [\\/]* | ?:[\\/]* ) . $cache_file;;
++ *) . ./$cache_file;;
++ esac
++ fi
++else
++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
++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 `(set) 2>&1 |
++ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,set)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
++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
++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
++echo "$as_me: former value: $ac_old_val" >&2;}
++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
++echo "$as_me: current value: $ac_new_val" >&2;}
++ ac_cache_corrupted=:
++ fi;;
++ esac
++ # Pass precious variables to config.status.
++ if test "$ac_new_set" = set; then
++ case $ac_new_val in
++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
++ ac_arg=$ac_var=`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.
++ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++ esac
++ fi
++done
++if $ac_cache_corrupted; then
++ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
++echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
++ { (exit 1); exit 1; }; }
++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_config_headers="$ac_config_headers config.h"
++
++
++if test "${enable_shared}" = "yes" ; then
++ echo "Shared libraries not supported for cross compiling, ignored"
++fi
++
++if test "$srcdir" = "." ; then
++ if test "${with_target_subdir}" != "." ; then
++ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
++ else
++ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
++ fi
++else
++ libgloss_topdir="${srcdir}/../.."
++fi
++ac_aux_dir=
++for ac_dir in $libgloss_topdir $srcdir/$libgloss_topdir; do
++ if test -f $ac_dir/install-sh; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install-sh -c"
++ break
++ elif test -f $ac_dir/install.sh; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install.sh -c"
++ break
++ elif test -f $ac_dir/shtool; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/shtool install -c"
++ break
++ fi
++done
++if test -z "$ac_aux_dir"; then
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" >&5
++echo "$as_me: error: cannot find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++ac_config_guess="$SHELL $ac_aux_dir/config.guess"
++ac_config_sub="$SHELL $ac_aux_dir/config.sub"
++ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
++
++
++# Make sure we can run config.sub.
++$ac_config_sub sun4 >/dev/null 2>&1 ||
++ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
++echo "$as_me: error: cannot run $ac_config_sub" >&2;}
++ { (exit 1); exit 1; }; }
++
++echo "$as_me:$LINENO: checking build system type" >&5
++echo $ECHO_N "checking build system type... $ECHO_C" >&6
++if test "${ac_cv_build+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_build_alias=$build_alias
++test -z "$ac_cv_build_alias" &&
++ ac_cv_build_alias=`$ac_config_guess`
++test -z "$ac_cv_build_alias" &&
++ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
++echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
++ { (exit 1); exit 1; }; }
++ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
++ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
++echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_build" >&5
++echo "${ECHO_T}$ac_cv_build" >&6
++build=$ac_cv_build
++build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
++build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
++build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++
++
++echo "$as_me:$LINENO: checking host system type" >&5
++echo $ECHO_N "checking host system type... $ECHO_C" >&6
++if test "${ac_cv_host+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_host_alias=$host_alias
++test -z "$ac_cv_host_alias" &&
++ ac_cv_host_alias=$ac_cv_build_alias
++ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
++ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
++echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_host" >&5
++echo "${ECHO_T}$ac_cv_host" >&6
++host=$ac_cv_host
++host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
++host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
++host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++
++
++echo "$as_me:$LINENO: checking target system type" >&5
++echo $ECHO_N "checking target system type... $ECHO_C" >&6
++if test "${ac_cv_target+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_target_alias=$target_alias
++test "x$ac_cv_target_alias" = "x" &&
++ ac_cv_target_alias=$ac_cv_host_alias
++ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
++ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
++echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_target" >&5
++echo "${ECHO_T}$ac_cv_target" >&6
++target=$ac_cv_target
++target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
++target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
++target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++
++
++# 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}-
++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 $. echo might interpret backslashes.
++# By default was `s,x,x', remove it if useless.
++cat <<\_ACEOF >conftest.sed
++s/[\\$]/&&/g;s/;s,x,x,$//
++_ACEOF
++program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
++rm conftest.sed
++
++
++# 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.
++echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
++if test -z "$INSTALL"; then
++if test "${ac_cv_path_install+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
++ fi
++ done
++ done
++ ;;
++esac
++done
++
++
++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. We don't cache a
++ # path for INSTALL within a source directory, because that will
++ # break other packages using the cache if that directory is
++ # removed, or if the path is relative.
++ INSTALL=$ac_install_sh
++ fi
++fi
++echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$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'
++
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_GNU_LD 1
++_ACEOF
++
++case "${target}" in
++ *-*-cygwin*)
++ ;;
++ a29k-amd-udi)
++ ;;
++ arc-*-*)
++ ;;
++ arm-*-pe)
++ ;;
++ arm-*-*)
++ ;;
++ strongarm-*-*)
++ ;;
++ cris-*-* | crisv32-*-*)
++ ;;
++ d10v*)
++ ;;
++ h8300*-*-*)
++ ;;
++ h8500-*-*)
++ ;;
++ i345686-*-sco*)
++ ;;
++ m32r-*-*)
++ ;;
++ mn10?00-*-*)
++ ;;
++ powerpc-eabi-elf-gekko)
++ cat >>confdefs.h <<\_ACEOF
++#define MISSING_SYSCALL_NAMES 1
++_ACEOF
++
++ cat >>confdefs.h <<\_ACEOF
++#define REENTRANT_SYSCALLS_PROVIDED 1
++_ACEOF
++
++ ;;
++ powerpcle-*-pe)
++ ;;
++ sh*-*-*)
++ ;;
++ sparc-sun-sunos*)
++ ;;
++ sparc64-*-*)
++ ;;
++ thumb-*-pe)
++ ;;
++ thumb-*-*)
++ ;;
++ v850-*-*)
++ ;;
++ v850e-*-*)
++ ;;
++ v850ea-*-*)
++ ;;
++ w65-*-*)
++ ;;
++ xstormy16-*-*)
++ ;;
++ z8k-*-*)
++ ;;
++ *)
++ cat >>confdefs.h <<\_ACEOF
++#define MISSING_SYSCALL_NAMES 1
++_ACEOF
++
++ ;;
++esac
++
++case "${target}" in
++ *-*-elf)
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_ELF 1
++_ACEOF
++
++
++ echo "$as_me:$LINENO: checking for .previous assembler directive" >&5
++echo $ECHO_N "checking for .previous assembler directive... $ECHO_C" >&6
++if test "${libc_cv_asm_previous_directive+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ libc_cv_asm_previous_directive=no
++ cat > conftest.s <&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ libc_cv_asm_previous_directive=yes
++ fi
++ rm -f conftest*
++fi
++echo "$as_me:$LINENO: result: $libc_cv_asm_previous_directive" >&5
++echo "${ECHO_T}$libc_cv_asm_previous_directive" >&6
++
++ if test "x${libc_cv_asm_previous_directive}" = "xyes"; then
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
++_ACEOF
++
++ fi
++
++ echo "$as_me:$LINENO: checking for .popsection assembler directive" >&5
++echo $ECHO_N "checking for .popsection assembler directive... $ECHO_C" >&6
++if test "${libc_cv_asm_popsection_directive+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ libc_cv_asm_popsection_directive=no
++ cat > conftest.s <&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ libc_cv_asm_popsection_directive=yes
++ fi
++ rm -f conftest*
++fi
++echo "$as_me:$LINENO: result: $libc_cv_asm_popsection_directive" >&5
++echo "${ECHO_T}$libc_cv_asm_popsection_directive" >&6
++
++ if test "x${libc_cv_asm_popsection_directive}" = "xyes"; then
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_ASM_POPSECTION_DIRECTIVE 1
++_ACEOF
++
++ fi
++
++ echo "$as_me:$LINENO: checking for section attributes" >&5
++echo $ECHO_N "checking for section attributes... $ECHO_C" >&6
++if test "${libc_cv_section_attributes+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ libc_cv_section_attributes=no
++ cat > conftest.c <&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ libc_cv_section_attributes=yes
++ fi
++ rm -f conftest*
++fi
++echo "$as_me:$LINENO: result: $libc_cv_section_attributes" >&5
++echo "${ECHO_T}$libc_cv_section_attributes" >&6
++ if test "x${libc_cv_section_attributes}" = "xyes"; then
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_SECTION_ATTRIBUTES 1
++_ACEOF
++
++ fi
++ ;;
++esac
++
++echo "$as_me:$LINENO: checking for symbol prefix" >&5
++echo $ECHO_N "checking for symbol prefix... $ECHO_C" >&6
++if test "${libc_symbol_prefix+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat > conftest.c <<\EOF
++foo () { }
++EOF
++libc_symbol_prefix=none
++if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; };
++then
++ libc_symbol_prefix='$'
++else
++ if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; };
++ then
++ libc_symbol_prefix=_
++ fi
++fi
++rm -f conftest*
++fi
++echo "$as_me:$LINENO: result: $libc_symbol_prefix" >&5
++echo "${ECHO_T}$libc_symbol_prefix" >&6
++if test $libc_symbol_prefix != none; then
++ cat >>confdefs.h <<_ACEOF
++#define __SYMBOL_PREFIX "$libc_symbol_prefix"
++_ACEOF
++
++else
++ cat >>confdefs.h <<\_ACEOF
++#define __SYMBOL_PREFIX ""
++_ACEOF
++
++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
++
++DEPDIR="${am__leading_dot}deps"
++
++ ac_config_commands="$ac_config_commands depfiles"
++
++
++am_make=${MAKE-make}
++cat > confinc << 'END'
++am__doit:
++ @echo done
++.PHONY: am__doit
++END
++# If we don't find an include directive, just comment out the code.
++echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
++echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
++am__include="#"
++am__quote=
++_am_result=none
++# First try GNU make style include.
++echo "include confinc" > confmf
++# We grep out `Entering directory' and `Leaving directory'
++# messages which can occur if `w' ends up in MAKEFLAGS.
++# In particular we don't look at `^make:' because GNU make might
++# be invoked under some other name (usually "gmake"), in which
++# case it prints its new name instead of `make'.
++if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
++ am__include=include
++ am__quote=
++ _am_result=GNU
++fi
++# Now try BSD make style include.
++if test "$am__include" = "#"; then
++ echo '.include "confinc"' > confmf
++ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
++ am__include=.include
++ am__quote="\""
++ _am_result=BSD
++ fi
++fi
++
++
++echo "$as_me:$LINENO: result: $_am_result" >&5
++echo "${ECHO_T}$_am_result" >&6
++rm -f confinc confmf
++
++# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
++if test "${enable_dependency_tracking+set}" = set; then
++ enableval="$enable_dependency_tracking"
++
++fi;
++if test "x$enable_dependency_tracking" != xno; then
++ am_depcomp="$ac_aux_dir/depcomp"
++ AMDEPBACKSLASH='\'
++fi
++
++
++if test "x$enable_dependency_tracking" != xno; then
++ AMDEP_TRUE=
++ AMDEP_FALSE='#'
++else
++ AMDEP_TRUE='#'
++ AMDEP_FALSE=
++fi
++
++
++
++# Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_CC="gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++
++depcc="$CC" am_compiler_list=
++
++echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
++if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++ # We make a subdir and do the tests there. Otherwise we can end up
++ # making bogus files that we don't know about and never remove. For
++ # instance it was reported that on HP-UX the gcc test will end up
++ # making a dummy file named `D' -- because `-MD' means `put the output
++ # in D'.
++ mkdir conftest.dir
++ # Copy depcomp to subdir because otherwise we won't find it if we're
++ # using a relative directory.
++ cp "$am_depcomp" conftest.dir
++ cd conftest.dir
++ # We will build objects and dependencies in a subdirectory because
++ # it helps to detect inapplicable dependency modes. For instance
++ # both Tru64's cc and ICC support -MD to output dependencies as a
++ # side effect of compilation, but ICC will put the dependencies in
++ # the current directory while Tru64 will put them in the object
++ # directory.
++ mkdir sub
++
++ am_cv_CC_dependencies_compiler_type=none
++ if test "$am_compiler_list" = ""; then
++ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
++ fi
++ for depmode in $am_compiler_list; do
++ # Setup a source with many dependencies, because some compilers
++ # like to wrap large dependency lists on column 80 (with \), and
++ # we should not choose a depcomp mode which is confused by this.
++ #
++ # We need to recreate these files for each test, as the compiler may
++ # overwrite some of them when testing with obscure command lines.
++ # This happens at least with the AIX C compiler.
++ : > sub/conftest.c
++ for i in 1 2 3 4 5 6; do
++ echo '#include "conftst'$i'.h"' >> sub/conftest.c
++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
++ # Solaris 8's {/usr,}/bin/sh.
++ touch sub/conftst$i.h
++ done
++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
++
++ case $depmode in
++ nosideeffect)
++ # after this tag, mechanisms are not by side-effect, so they'll
++ # only be used when explicitly requested
++ if test "x$enable_dependency_tracking" = xyes; then
++ continue
++ else
++ break
++ fi
++ ;;
++ none) break ;;
++ esac
++ # We check with `-c' and `-o' for the sake of the "dashmstdout"
++ # mode. It turns out that the SunPro C++ compiler does not properly
++ # handle `-M -o', and we need to detect this.
++ if depmode=$depmode \
++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
++ >/dev/null 2>conftest.err &&
++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++ # icc doesn't choke on unknown options, it will just issue warnings
++ # or remarks (even with -Werror). So we grep stderr for any message
++ # that says an option was ignored or not supported.
++ # When given -MP, icc 7.0 and 7.1 complain thusly:
++ # icc: Command line warning: ignoring option '-M'; no argument required
++ # The diagnosis changed in icc 8.0:
++ # icc: Command line remark: option '-MP' not supported
++ if (grep 'ignoring option' conftest.err ||
++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
++ am_cv_CC_dependencies_compiler_type=$depmode
++ break
++ fi
++ fi
++ done
++
++ cd ..
++ rm -rf conftest.dir
++else
++ am_cv_CC_dependencies_compiler_type=none
++fi
++
++fi
++echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
++echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
++CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
++
++
++
++if
++ test "x$enable_dependency_tracking" != xno \
++ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
++ am__fastdepCC_TRUE=
++ am__fastdepCC_FALSE='#'
++else
++ am__fastdepCC_TRUE='#'
++ am__fastdepCC_FALSE=
++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
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++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
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
++echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
++echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
++if test "${ac_cv_c_compiler_gnu+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat > conftest.c <&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
++ ac_cv_c_compiler_gnu=yes
++else
++ ac_cv_c_compiler_gnu=no
++fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
++
++if test $ac_cv_c_compiler_gnu = yes; then
++ GCC=yes
++ ac_test_CFLAGS="${CFLAGS+set}"
++ ac_save_CFLAGS="$CFLAGS"
++ CFLAGS=
++ ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++CFLAGS="-g"
++echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
++if test "${ac_cv_prog_cc_g+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_prog_cc_g=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$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
++ if test "$ac_test_CFLAGS" = set; then
++ CFLAGS="$ac_save_CFLAGS"
++ elif test $ac_cv_prog_cc_g = yes; then
++ CFLAGS="-g -O2"
++ else
++ CFLAGS="-O2"
++ fi
++else
++ GCC=
++ test "${CFLAGS+set}" = set || CFLAGS="-g"
++fi
++
++AS=${AS-as}
++
++AR=${AR-ar}
++
++LD=${LD-ld}
++
++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
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++ echo "$as_me:$LINENO: result: $RANLIB" >&5
++echo "${ECHO_T}$RANLIB" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}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
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_RANLIB="ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
++echo "${ECHO_T}$ac_ct_RANLIB" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ RANLIB=$ac_ct_RANLIB
++else
++ RANLIB="$ac_cv_prog_RANLIB"
++fi
++
++# By default we simply use the C compiler to build assembly code.
++
++test "${CCAS+set}" = set || CCAS=$CC
++test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
++
++
++
++
++host_makefile_frag=${srcdir}/../config/default.mh
++
++host_makefile_frag_path=$host_makefile_frag
++
++
++
++ ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
++# 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.
++{
++ (set) 2>&1 |
++ case `(ac_space=' '; set | grep ac_space) 2>&1` in
++ *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 \
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ ;;
++ esac;
++} |
++ sed '
++ t clear
++ : clear
++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++ t end
++ /^ac_cv_env/!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" && echo "updating cache $cache_file"
++ cat confcache >$cache_file
++ else
++ echo "not updating unwritable cache $cache_file"
++ 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}'
++
++# 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
++
++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_i=`echo "$ac_i" |
++ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
++ # 2. Add them.
++ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++done
++LIBOBJS=$ac_libobjs
++
++LTLIBOBJS=$ac_ltlibobjs
++
++
++if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
++ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++echo "$as_me: error: conditional \"AMDEP\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
++ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++: ${CONFIG_STATUS=./config.status}
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files $CONFIG_STATUS"
++{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
++echo "$as_me: creating $CONFIG_STATUS" >&6;}
++cat >$CONFIG_STATUS <<_ACEOF
++#! $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}
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
++ set -o posix
++fi
++DUALCASE=1; export DUALCASE # for MKS sh
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# Work around bugs in pre-3.0 UWIN ksh.
++$as_unset ENV MAIL MAILPATH
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1; 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
++
++
++# Name of the executable.
++as_me=`$as_basename "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)$' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
++ /^X\/\(\/\/\)$/{ s//\1/; q; }
++ /^X\/\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++
++
++# PATH needs CR, and LINENO needs CR and PATH.
++# 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
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ 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
++
++ ;;
++ 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
++ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
++echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, and appends trailing '-' during
++ # substitution so that $LINENO is not a special case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\n,,
++ ' >$as_me.lineno &&
++ chmod +x $as_me.lineno ||
++ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
++echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
++ { (exit 1); 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 sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ # We could just check for DJGPP; but this test a) works b) is more generic
++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
++ if test -f conf$$.exe; then
++ # Don't use ln at all; we don't have any links
++ as_ln_s='cp -p'
++ else
++ as_ln_s='ln -s'
++ fi
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.file
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++as_executable_p="test -f"
++
++# 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'"
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.
++as_nl='
++'
++IFS=" $as_nl"
++
++# CDPATH.
++$as_unset CDPATH
++
++exec 6>&1
++
++# Open the log real soon, to keep \$[0] and so on meaningful, and to
++# report actual input values of CONFIG_FILES etc. instead of their
++# values after options handling. Logging --version etc. is OK.
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++} >&5
++cat >&5 <<_CSEOF
++
++This file was extended by $as_me, which was
++generated by GNU Autoconf 2.59. Invocation command line was
++
++ CONFIG_FILES = $CONFIG_FILES
++ CONFIG_HEADERS = $CONFIG_HEADERS
++ CONFIG_LINKS = $CONFIG_LINKS
++ CONFIG_COMMANDS = $CONFIG_COMMANDS
++ $ $0 $@
++
++_CSEOF
++echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
++echo >&5
++_ACEOF
++
++# Files that config.status was made for.
++if test -n "$ac_config_files"; then
++ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_headers"; then
++ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_links"; then
++ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_commands"; then
++ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++ac_cs_usage="\
++\`$as_me' instantiates files from templates according to the
++current configuration.
++
++Usage: $0 [OPTIONS] [FILE]...
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet 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_cs_version="\\
++config.status
++configured by $0, generated by GNU Autoconf 2.59,
++ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++
++Copyright (C) 2003 Free Software Foundation, Inc.
++This config.status script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it."
++srcdir=$srcdir
++INSTALL="$INSTALL"
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If no file are specified by the user, then we need to provide default
++# value. By we need to know if files were specified by the user.
++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
++ ;;
++ *) # This is not an option, so the user has probably given explicit
++ # arguments.
++ ac_option=$1
++ ac_need_defaults=false;;
++ esac
++
++ case $ac_option in
++ # Handling of the options.
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++ ac_cs_recheck=: ;;
++ --version | --vers* | -V )
++ echo "$ac_cs_version"; exit 0 ;;
++ --he | --h)
++ # Conflict between --help and --header
++ { { echo "$as_me:$LINENO: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&5
++echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2;}
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit 0 ;;
++ --debug | --d* | -d )
++ debug=: ;;
++ --file | --fil | --fi | --f )
++ $ac_shift
++ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
++ ac_need_defaults=false;;
++ --header | --heade | --head | --hea )
++ $ac_shift
++ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++ ac_need_defaults=false;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil | --si | --s)
++ ac_cs_silent=: ;;
++
++ # This is an error.
++ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&5
++echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2;}
++ { (exit 1); exit 1; }; } ;;
++
++ *) ac_config_targets="$ac_config_targets $1" ;;
++
++ 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
++if \$ac_cs_recheck; then
++ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++fi
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++#
++# INIT-COMMANDS section.
++#
++
++AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
++srcdir=${srcdir}
++target=${target}
++with_multisubdir=${with_multisubdir}
++ac_configure_args="${ac_configure_args} --enable-multilib"
++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++libgloss_topdir=${libgloss_topdir}
++
++
++_ACEOF
++
++
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++for ac_config_target in $ac_config_targets
++do
++ case "$ac_config_target" in
++ # Handling of arguments.
++ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
++ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
++echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
++ { (exit 1); exit 1; }; };;
++ 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 to put it here, and in addition,
++# creating and moving files from /tmp can sometimes cause problems.
++# Create a temporary directory, and hook for its removal unless debugging.
++$debug ||
++{
++ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
++ trap '{ (exit 1); exit 1; }' 1 2 13 15
++}
++
++# Create a (secure) tmp directory for tmp files.
++
++{
++ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
++ test -n "$tmp" && test -d "$tmp"
++} ||
++{
++ tmp=./confstat$$-$RANDOM
++ (umask 077 && mkdir $tmp)
++} ||
++{
++ echo "$me: cannot create a temporary directory in ." >&2
++ { (exit 1); exit 1; }
++}
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++
++#
++# CONFIG_FILES section.
++#
++
++# No need to generate the scripts if there are no CONFIG_FILES.
++# This happens for instance when ./config.status config.h
++if test -n "\$CONFIG_FILES"; then
++ # Protect against being on the right side of a sed subst in config.status.
++ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
++ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
++s,@SHELL@,$SHELL,;t t
++s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
++s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
++s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
++s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
++s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
++s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
++s,@exec_prefix@,$exec_prefix,;t t
++s,@prefix@,$prefix,;t t
++s,@program_transform_name@,$program_transform_name,;t t
++s,@bindir@,$bindir,;t t
++s,@sbindir@,$sbindir,;t t
++s,@libexecdir@,$libexecdir,;t t
++s,@datadir@,$datadir,;t t
++s,@sysconfdir@,$sysconfdir,;t t
++s,@sharedstatedir@,$sharedstatedir,;t t
++s,@localstatedir@,$localstatedir,;t t
++s,@libdir@,$libdir,;t t
++s,@includedir@,$includedir,;t t
++s,@oldincludedir@,$oldincludedir,;t t
++s,@infodir@,$infodir,;t t
++s,@mandir@,$mandir,;t t
++s,@build_alias@,$build_alias,;t t
++s,@host_alias@,$host_alias,;t t
++s,@target_alias@,$target_alias,;t t
++s,@DEFS@,$DEFS,;t t
++s,@ECHO_C@,$ECHO_C,;t t
++s,@ECHO_N@,$ECHO_N,;t t
++s,@ECHO_T@,$ECHO_T,;t t
++s,@LIBS@,$LIBS,;t t
++s,@build@,$build,;t t
++s,@build_cpu@,$build_cpu,;t t
++s,@build_vendor@,$build_vendor,;t t
++s,@build_os@,$build_os,;t t
++s,@host@,$host,;t t
++s,@host_cpu@,$host_cpu,;t t
++s,@host_vendor@,$host_vendor,;t t
++s,@host_os@,$host_os,;t t
++s,@target@,$target,;t t
++s,@target_cpu@,$target_cpu,;t t
++s,@target_vendor@,$target_vendor,;t t
++s,@target_os@,$target_os,;t t
++s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
++s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
++s,@INSTALL_DATA@,$INSTALL_DATA,;t t
++s,@CC@,$CC,;t t
++s,@am__leading_dot@,$am__leading_dot,;t t
++s,@DEPDIR@,$DEPDIR,;t t
++s,@am__include@,$am__include,;t t
++s,@am__quote@,$am__quote,;t t
++s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
++s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
++s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
++s,@CCDEPMODE@,$CCDEPMODE,;t t
++s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
++s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
++s,@AS@,$AS,;t t
++s,@AR@,$AR,;t t
++s,@LD@,$LD,;t t
++s,@RANLIB@,$RANLIB,;t t
++s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
++s,@CCAS@,$CCAS,;t t
++s,@CCASFLAGS@,$CCASFLAGS,;t t
++s,@host_makefile_frag_path@,$host_makefile_frag_path,;t t
++s,@LIBOBJS@,$LIBOBJS,;t t
++s,@LTLIBOBJS@,$LTLIBOBJS,;t t
++/@host_makefile_frag@/r $host_makefile_frag
++s,@host_makefile_frag@,,;t t
++CEOF
++
++_ACEOF
++
++ cat >>$CONFIG_STATUS <<\_ACEOF
++ # Split the substitutions into bite-sized pieces for seds with
++ # small command number limits, like on Digital OSF/1 and HP-UX.
++ ac_max_sed_lines=48
++ ac_sed_frag=1 # Number of current file.
++ ac_beg=1 # First line for current file.
++ ac_end=$ac_max_sed_lines # Line after last line for current file.
++ ac_more_lines=:
++ ac_sed_cmds=
++ while $ac_more_lines; do
++ if test $ac_beg -gt 1; then
++ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
++ else
++ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
++ fi
++ if test ! -s $tmp/subs.frag; then
++ ac_more_lines=false
++ else
++ # The purpose of the label and of the branching condition is to
++ # speed up the sed processing (if there are no `@' at all, there
++ # is no need to browse any of the substitutions).
++ # These are the two extra sed commands mentioned above.
++ (echo ':t
++ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
++ if test -z "$ac_sed_cmds"; then
++ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
++ else
++ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
++ fi
++ ac_sed_frag=`expr $ac_sed_frag + 1`
++ ac_beg=$ac_end
++ ac_end=`expr $ac_end + $ac_max_sed_lines`
++ fi
++ done
++ if test -z "$ac_sed_cmds"; then
++ ac_sed_cmds=cat
++ fi
++fi # test -n "$CONFIG_FILES"
++
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++ case $ac_file in
++ - | *:- | *:-:* ) # input from stdin
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ * ) ac_file_in=$ac_file.in ;;
++ esac
++
++ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p "$ac_dir"
++ else
++ as_dir="$ac_dir"
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ { (exit 1); exit 1; }; }; }
++
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A "../" for each directory in $ac_dir_suffix.
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
++else
++ ac_dir_suffix= ac_top_builddir=
++fi
++
++case $srcdir in
++ .) # No --srcdir option. We are building in place.
++ ac_srcdir=.
++ if test -z "$ac_top_builddir"; then
++ ac_top_srcdir=.
++ else
++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
++ fi ;;
++ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir ;;
++ *) # Relative path.
++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++esac
++
++# Do not use `cd foo && pwd` to compute absolute paths, because
++# the directories may not exist.
++case `pwd` in
++.) ac_abs_builddir="$ac_dir";;
++*)
++ case "$ac_dir" in
++ .) ac_abs_builddir=`pwd`;;
++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
++ *) ac_abs_builddir=`pwd`/"$ac_dir";;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_builddir=${ac_top_builddir}.;;
++*)
++ case ${ac_top_builddir}. in
++ .) ac_abs_top_builddir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_srcdir=$ac_srcdir;;
++*)
++ case $ac_srcdir in
++ .) ac_abs_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_srcdir=$ac_top_srcdir;;
++*)
++ case $ac_top_srcdir in
++ .) ac_abs_top_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
++ esac;;
++esac
++
++
++ case $INSTALL in
++ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
++ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
++ esac
++
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
++ # 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. */
++ if test x"$ac_file" = x-; then
++ configure_input=
++ else
++ configure_input="$ac_file. "
++ fi
++ configure_input=$configure_input"Generated from `echo $ac_file_in |
++ sed 's,.*/,,'` by configure."
++
++ # First look for the input files in the build tree, otherwise in the
++ # src tree.
++ ac_file_inputs=`IFS=:
++ for f in $ac_file_in; do
++ case $f in
++ -) echo $tmp/stdin ;;
++ [\\/$]*)
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ echo "$f";;
++ *) # Relative
++ if test -f "$f"; then
++ # Build tree
++ echo "$f"
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo "$srcdir/$f"
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ fi;;
++ esac
++ done` || { (exit 1); exit 1; }
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ sed "$ac_vpsub
++$extrasub
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++:t
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
++s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
++s,@INSTALL@,$ac_INSTALL,;t t
++" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
++ rm -f $tmp/stdin
++ if test x"$ac_file" != x-; then
++ mv $tmp/out $ac_file
++ else
++ cat $tmp/out
++ rm -f $tmp/out
++ fi
++
++ # Run the commands associated with the file.
++ case $ac_file in
++ Makefile ) ac_file=Makefile . ${libgloss_topdir}/config-ml.in ;;
++ esac
++done
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++#
++# CONFIG_HEADER section.
++#
++
++# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
++# NAME is the cpp macro being defined and VALUE is the value it is being given.
++#
++# ac_d sets the value in "#define NAME VALUE" lines.
++ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
++ac_dB='[ ].*$,\1#\2'
++ac_dC=' '
++ac_dD=',;t'
++# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
++ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
++ac_uB='$,\1#\2define\3'
++ac_uC=' '
++ac_uD=',;t'
++
++for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++ case $ac_file in
++ - | *:- | *:-:* ) # input from stdin
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ * ) ac_file_in=$ac_file.in ;;
++ esac
++
++ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++
++ # First look for the input files in the build tree, otherwise in the
++ # src tree.
++ ac_file_inputs=`IFS=:
++ for f in $ac_file_in; do
++ case $f in
++ -) echo $tmp/stdin ;;
++ [\\/$]*)
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ # Do quote $f, to prevent DOS paths from being IFS'd.
++ echo "$f";;
++ *) # Relative
++ if test -f "$f"; then
++ # Build tree
++ echo "$f"
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo "$srcdir/$f"
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ fi;;
++ esac
++ done` || { (exit 1); exit 1; }
++ # Remove the trailing spaces.
++ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
++
++_ACEOF
++
++# Transform confdefs.h into two sed scripts, `conftest.defines' and
++# `conftest.undefs', that substitutes the proper values into
++# config.h.in to produce config.h. The first handles `#define'
++# templates, and the second `#undef' templates.
++# And first: Protect against being on the right side of a sed subst in
++# config.status. Protect against being in an unquoted here document
++# in config.status.
++rm -f conftest.defines conftest.undefs
++# Using a here document instead of a string reduces the quoting nightmare.
++# Putting comments in sed scripts is not portable.
++#
++# `end' is used to avoid that the second main sed command (meant for
++# 0-ary CPP macros) applies to n-ary macro definitions.
++# See the Autoconf documentation for `clear'.
++cat >confdef2sed.sed <<\_ACEOF
++s/[\\&,]/\\&/g
++s,[\\$`],\\&,g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
++t end
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
++: end
++_ACEOF
++# If some macros were called several times there might be several times
++# the same #defines, which is useless. Nevertheless, we may not want to
++# sort them, since we want the *last* AC-DEFINE to be honored.
++uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
++sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
++rm -f confdef2sed.sed
++
++# This sed command replaces #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.
++cat >>conftest.undefs <<\_ACEOF
++s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
++_ACEOF
++
++# Break up conftest.defines because some shells have a limit on the size
++# of here documents, and old seds have small limits too (100 cmds).
++echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
++echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
++echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
++echo ' :' >>$CONFIG_STATUS
++rm -f conftest.tail
++while grep . conftest.defines >/dev/null
++do
++ # Write a limited-size here document to $tmp/defines.sed.
++ echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS
++ # Speed up: don't consider the non `#define' lines.
++ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
++ # Work around the forget-to-reset-the-flag bug.
++ echo 't clr' >>$CONFIG_STATUS
++ echo ': clr' >>$CONFIG_STATUS
++ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
++ echo 'CEOF
++ sed -f $tmp/defines.sed $tmp/in >$tmp/out
++ rm -f $tmp/in
++ mv $tmp/out $tmp/in
++' >>$CONFIG_STATUS
++ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
++ rm -f conftest.defines
++ mv conftest.tail conftest.defines
++done
++rm -f conftest.defines
++echo ' fi # grep' >>$CONFIG_STATUS
++echo >>$CONFIG_STATUS
++
++# Break up conftest.undefs because some shells have a limit on the size
++# of here documents, and old seds have small limits too (100 cmds).
++echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
++rm -f conftest.tail
++while grep . conftest.undefs >/dev/null
++do
++ # Write a limited-size here document to $tmp/undefs.sed.
++ echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS
++ # Speed up: don't consider the non `#undef'
++ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
++ # Work around the forget-to-reset-the-flag bug.
++ echo 't clr' >>$CONFIG_STATUS
++ echo ': clr' >>$CONFIG_STATUS
++ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
++ echo 'CEOF
++ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
++ rm -f $tmp/in
++ mv $tmp/out $tmp/in
++' >>$CONFIG_STATUS
++ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
++ rm -f conftest.undefs
++ mv conftest.tail conftest.undefs
++done
++rm -f conftest.undefs
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++ # 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. */
++ if test x"$ac_file" = x-; then
++ echo "/* Generated by configure. */" >$tmp/config.h
++ else
++ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
++ fi
++ cat $tmp/in >>$tmp/config.h
++ rm -f $tmp/in
++ if test x"$ac_file" != x-; then
++ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
++echo "$as_me: $ac_file is unchanged" >&6;}
++ else
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p "$ac_dir"
++ else
++ as_dir="$ac_dir"
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ { (exit 1); exit 1; }; }; }
++
++ rm -f $ac_file
++ mv $tmp/config.h $ac_file
++ fi
++ else
++ cat $tmp/config.h
++ rm -f $tmp/config.h
++ fi
++done
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++#
++# CONFIG_COMMANDS section.
++#
++for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
++ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
++ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
++$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_dest" : 'X\(//\)[^/]' \| \
++ X"$ac_dest" : 'X\(//\)$' \| \
++ X"$ac_dest" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$ac_dest" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p "$ac_dir"
++ else
++ as_dir="$ac_dir"
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ { (exit 1); exit 1; }; }; }
++
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A "../" for each directory in $ac_dir_suffix.
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
++else
++ ac_dir_suffix= ac_top_builddir=
++fi
++
++case $srcdir in
++ .) # No --srcdir option. We are building in place.
++ ac_srcdir=.
++ if test -z "$ac_top_builddir"; then
++ ac_top_srcdir=.
++ else
++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
++ fi ;;
++ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir ;;
++ *) # Relative path.
++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++esac
++
++# Do not use `cd foo && pwd` to compute absolute paths, because
++# the directories may not exist.
++case `pwd` in
++.) ac_abs_builddir="$ac_dir";;
++*)
++ case "$ac_dir" in
++ .) ac_abs_builddir=`pwd`;;
++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
++ *) ac_abs_builddir=`pwd`/"$ac_dir";;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_builddir=${ac_top_builddir}.;;
++*)
++ case ${ac_top_builddir}. in
++ .) ac_abs_top_builddir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_srcdir=$ac_srcdir;;
++*)
++ case $ac_srcdir in
++ .) ac_abs_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_srcdir=$ac_top_srcdir;;
++*)
++ case $ac_top_srcdir in
++ .) ac_abs_top_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
++ esac;;
++esac
++
++
++ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
++echo "$as_me: executing $ac_dest commands" >&6;}
++ case $ac_dest in
++ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
++ # Strip MF so we end up with the name of the file.
++ mf=`echo "$mf" | sed -e 's/:.*$//'`
++ # Check whether this is an Automake generated Makefile or not.
++ # We used to match only the files named `Makefile.in', but
++ # some people rename them; so instead we look at the file content.
++ # Grep'ing the first line is not enough: some people post-process
++ # each Makefile.in and add a new line on top of each file to say so.
++ # So let's grep whole file.
++ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
++ dirpart=`(dirname "$mf") 2>/dev/null ||
++$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$mf" : 'X\(//\)[^/]' \| \
++ X"$mf" : 'X\(//\)$' \| \
++ X"$mf" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$mf" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ else
++ continue
++ fi
++ # Extract the definition of DEPDIR, am__include, and am__quote
++ # from the Makefile without running `make'.
++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
++ test -z "$DEPDIR" && continue
++ am__include=`sed -n 's/^am__include = //p' < "$mf"`
++ test -z "am__include" && continue
++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
++ # When using ansi2knr, U may be empty or an underscore; expand it
++ U=`sed -n 's/^U = //p' < "$mf"`
++ # Find all dependency output files, they are included files with
++ # $(DEPDIR) in their names. We invoke sed twice because it is the
++ # simplest approach to changing $(DEPDIR) to its actual value in the
++ # expansion.
++ for file in `sed -n "
++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++ # Make sure the directory exists.
++ test -f "$dirpart/$file" && continue
++ fdir=`(dirname "$file") 2>/dev/null ||
++$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$file" : 'X\(//\)[^/]' \| \
++ X"$file" : 'X\(//\)$' \| \
++ X"$file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p $dirpart/$fdir
++ else
++ as_dir=$dirpart/$fdir
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
++echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
++ { (exit 1); exit 1; }; }; }
++
++ # echo "creating $dirpart/$file"
++ echo '# dummy' > "$dirpart/$file"
++ done
++done
++ ;;
++ esac
++done
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++{ (exit 0); exit 0; }
++_ACEOF
++chmod +x $CONFIG_STATUS
++ac_clean_files=$ac_clean_files_save
++
++
++# 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 || { (exit 1); exit 1; }
++fi
++
++
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/configure.in newlib-1.19.0-arm/libgloss/libsysbase/configure.in
+--- newlib-1.19.0/libgloss/libsysbase/configure.in 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/configure.in 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,208 @@
++# Copyright (c) 1995, 1996 Cygnus Support
++#
++# The authors hereby grant permission to use, copy, modify, distribute,
++# and license this software and its documentation for any purpose, provided
++# that existing copyright notices are retained in all copies and that this
++# notice is included verbatim in any distributions. No written agreement,
++# license, or royalty fee is required for any of the authorized uses.
++# Modifications to this software may be copyrighted by their authors
++# and need not follow the licensing terms described here, provided that
++# the new terms are clearly indicated on the first page of each file where
++# they apply.
++#
++# Process this file with autoconf to produce a configure script.
++#
++AC_PREREQ(2.59)
++AC_INIT(close.c)
++AC_CONFIG_HEADER(config.h)
++
++if test "${enable_shared}" = "yes" ; then
++ echo "Shared libraries not supported for cross compiling, ignored"
++fi
++
++if test "$srcdir" = "." ; then
++ if test "${with_target_subdir}" != "." ; then
++ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
++ else
++ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
++ fi
++else
++ libgloss_topdir="${srcdir}/../.."
++fi
++AC_CONFIG_AUX_DIR($libgloss_topdir)
++
++AC_CANONICAL_SYSTEM
++AC_ARG_PROGRAM
++
++AC_PROG_INSTALL
++
++AC_DEFINE(HAVE_GNU_LD)
++dnl Make sure syscall names match those being used by newlib
++case "${target}" in
++ *-*-cygwin*)
++ ;;
++ a29k-amd-udi)
++ ;;
++ arc-*-*)
++ ;;
++ arm-*-pe)
++ ;;
++ arm-*-*)
++ ;;
++ strongarm-*-*)
++ ;;
++ cris-*-* | crisv32-*-*)
++ ;;
++ d10v*)
++ ;;
++ h8300*-*-*)
++ ;;
++ h8500-*-*)
++ ;;
++ i[3456]86-*-sco*)
++ ;;
++ m32r-*-*)
++ ;;
++ mn10?00-*-*)
++ ;;
++ powerpc-eabi-elf-gekko)
++ AC_DEFINE(MISSING_SYSCALL_NAMES)
++ AC_DEFINE(REENTRANT_SYSCALLS_PROVIDED)
++ ;;
++ powerpcle-*-pe)
++ ;;
++ sh*-*-*)
++ ;;
++ sparc-sun-sunos*)
++ ;;
++ sparc64-*-*)
++ ;;
++ thumb-*-pe)
++ ;;
++ thumb-*-*)
++ ;;
++ v850-*-*)
++ ;;
++ v850e-*-*)
++ ;;
++ v850ea-*-*)
++ ;;
++ w65-*-*)
++ ;;
++ xstormy16-*-*)
++ ;;
++ z8k-*-*)
++ ;;
++ *)
++ AC_DEFINE(MISSING_SYSCALL_NAMES)
++ ;;
++esac
++
++dnl Make sure we know if elf format used
++case "${target}" in
++ *-*-elf)
++ AC_DEFINE(HAVE_ELF)
++
++ AC_CACHE_CHECK([for .previous assembler directive],
++ libc_cv_asm_previous_directive, [dnl
++ libc_cv_asm_previous_directive=no
++ cat > conftest.s <&AC_FD_CC); then
++ libc_cv_asm_previous_directive=yes
++ fi
++ rm -f conftest*])
++
++ if test "x${libc_cv_asm_previous_directive}" = "xyes"; then
++ AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
++ fi
++
++ AC_CACHE_CHECK([for .popsection assembler directive],
++ libc_cv_asm_popsection_directive, [dnl
++ libc_cv_asm_popsection_directive=no
++ cat > conftest.s <&AC_FD_CC); then
++ libc_cv_asm_popsection_directive=yes
++ fi
++ rm -f conftest*])
++
++ if test "x${libc_cv_asm_popsection_directive}" = "xyes"; then
++ AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
++ fi
++
++ AC_CACHE_CHECK([for section attributes],
++ libc_cv_section_attributes, [dnl
++ libc_cv_section_attributes=no
++ cat > conftest.c <&AC_FD_CC); then
++ libc_cv_section_attributes=yes
++ fi
++ rm -f conftest*])
++ if test "x${libc_cv_section_attributes}" = "xyes"; then
++ AC_DEFINE(HAVE_SECTION_ATTRIBUTES)
++ fi
++ ;;
++esac
++
++AC_CACHE_CHECK([for symbol prefix], libc_symbol_prefix, [dnl
++cat > conftest.c <<\EOF
++foo () { }
++EOF
++dnl
++libc_symbol_prefix=none
++if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]);
++then
++ libc_symbol_prefix='$'
++else
++ if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null]);
++ then
++ libc_symbol_prefix=_
++ fi
++fi
++rm -f conftest* ])
++if test $libc_symbol_prefix != none; then
++ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_symbol_prefix")
++else
++ AC_DEFINE(__SYMBOL_PREFIX, "")
++fi
++
++LIB_AC_PROG_CC
++AS=${AS-as}
++AC_SUBST(AS)
++AR=${AR-ar}
++AC_SUBST(AR)
++LD=${LD-ld}
++AC_SUBST(LD)
++AC_PROG_RANLIB
++LIB_AM_PROG_AS
++
++host_makefile_frag=${srcdir}/../config/default.mh
++
++dnl We have to assign the same value to other variables because autoconf
++dnl doesn't provide a mechanism to substitute a replacement keyword with
++dnl arbitrary data or pathnames.
++dnl
++host_makefile_frag_path=$host_makefile_frag
++AC_SUBST(host_makefile_frag_path)
++AC_SUBST_FILE(host_makefile_frag)
++
++AC_CONFIG_FILES(Makefile,
++ac_file=Makefile . ${libgloss_topdir}/config-ml.in,
++srcdir=${srcdir}
++target=${target}
++with_multisubdir=${with_multisubdir}
++ac_configure_args="${ac_configure_args} --enable-multilib"
++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++libgloss_topdir=${libgloss_topdir}
++)
++AC_OUTPUT
++
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/dir.c newlib-1.19.0-arm/libgloss/libsysbase/dir.c
+--- newlib-1.19.0/libgloss/libsysbase/dir.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/dir.c 2010-12-18 15:27:28.000000000 +0000
+@@ -0,0 +1,93 @@
++#include
++#include
++#include
++#include
++#include
++
++
++DIR_ITER * diropen (const char *path) {
++ struct _reent *r = _REENT;
++ DIR_ITER *handle = NULL;
++ DIR_ITER *dir = NULL;
++ int dev;
++
++ dev = FindDevice(path);
++
++ if(dev!=-1 && devoptab_list[dev]->diropen_r) {
++
++ handle = (DIR_ITER *)malloc( sizeof(DIR_ITER) + devoptab_list[dev]->dirStateSize );
++
++ if ( NULL != handle ) {
++ handle->device = dev;
++ handle->dirStruct = ((void *)handle) + sizeof(DIR_ITER);
++
++ dir = devoptab_list[dev]->diropen_r(r, handle, path);
++
++ if ( dir == NULL ) {
++ free (handle);
++ handle = NULL;
++ }
++ } else {
++ r->_errno = ENOSR;
++ handle = NULL;
++ }
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ return handle;
++}
++
++int dirreset (DIR_ITER *dirState) {
++ struct _reent *r = _REENT;
++ int ret = -1;
++ int dev = 0;
++
++ if (dirState != NULL) {
++ dev = dirState->device;
++
++ if(devoptab_list[dev]->dirreset_r) {
++ ret = devoptab_list[dev]->dirreset_r(r, dirState);
++ } else {
++ r->_errno = ENOSYS;
++ }
++ }
++ return ret;
++}
++
++int dirnext (DIR_ITER *dirState, char *filename, struct stat *filestat) {
++ struct _reent *r = _REENT;
++ int ret = -1;
++ int dev = 0;
++
++ if (dirState != NULL) {
++ dev = dirState->device;
++
++ if(devoptab_list[dev]->dirnext_r) {
++ ret = devoptab_list[dev]->dirnext_r(r, dirState, filename, filestat);
++ } else {
++ r->_errno = ENOSYS;
++ }
++ }
++ return ret;
++}
++
++int dirclose (DIR_ITER *dirState) {
++ struct _reent *r = _REENT;
++ int ret = -1;
++ int dev = 0;
++
++ if (dirState != NULL) {
++ dev = dirState->device;
++
++ if (devoptab_list[dev]->dirclose_r) {
++ ret = devoptab_list[dev]->dirclose_r (r, dirState);
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ free (dirState);
++ }
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/dirent.c newlib-1.19.0-arm/libgloss/libsysbase/dirent.c
+--- newlib-1.19.0/libgloss/libsysbase/dirent.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/dirent.c 2010-12-18 15:27:50.000000000 +0000
+@@ -0,0 +1,157 @@
++#include
++#include
++#include
++#include
++#include
++#include
++
++DIR* opendir (const char *dirname) {
++ DIR* dirp = malloc (sizeof(DIR));
++ if (!dirp) {
++ errno = ENOMEM;
++ return NULL;
++ }
++
++ dirp->dirData = diropen (dirname);
++ if (!dirp->dirData) {
++ free (dirp);
++ return NULL;
++ }
++
++ dirp->position = 0; // 0th position means no file name has been returned yet
++ dirp->fileData.d_ino = -1;
++ dirp->fileData.d_name[0] = '\0';
++
++ return dirp;
++}
++
++
++int closedir (DIR *dirp) {
++ int res;
++
++ if (!dirp) {
++ errno = EBADF;
++ return -1;
++ }
++
++ res = dirclose (dirp->dirData);
++ free (dirp);
++ return res;
++}
++
++
++struct dirent* readdir (DIR *dirp) {
++ struct stat st;
++ char filename[MAXPATHLEN];
++ int res;
++ int olderrno = errno;
++
++ if (!dirp) {
++ errno = EBADF;
++ return NULL;
++ }
++
++ res = dirnext (dirp->dirData, filename, &st);
++
++ if (res < 0) {
++ if (errno == ENOENT) {
++ // errno == ENONENT set by dirnext means it's end of directory
++ // But readdir should not touch errno in case of dir end
++ errno = olderrno;
++ }
++ return NULL;
++ }
++
++ // We've moved forward in the directory
++ dirp->position += 1;
++
++ if (strnlen(filename, MAXPATHLEN) >= sizeof(dirp->fileData.d_name)) {
++ errno = EOVERFLOW;
++ return NULL;
++ }
++
++ strncpy (dirp->fileData.d_name, filename, sizeof(dirp->fileData.d_name));
++ dirp->fileData.d_ino = st.st_ino;
++
++ return &(dirp->fileData);
++}
++
++
++int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) {
++ struct stat st;
++ char filename[MAXPATHLEN];
++ int res;
++
++ if (!dirp) {
++ return EBADF;
++ }
++
++ res = dirnext (dirp->dirData, filename, &st);
++
++ if (res < 0) {
++ res = errno;
++ *result = NULL;
++ if (errno == ENOENT) {
++ // errno == ENONENT set by dirnext means it's end of directory
++ // But readdir should not touch errno in case of dir end
++ res = 0;
++ }
++ return res;
++ }
++
++ // We've moved forward in the directory
++ dirp->position += 1;
++
++ if (strnlen(filename, MAXPATHLEN) >= sizeof(entry->d_name)) {
++ errno = EOVERFLOW;
++ return EOVERFLOW;
++ }
++
++ strncpy (entry->d_name, filename, sizeof(entry->d_name));
++ entry->d_ino = st.st_ino;
++
++ *result = entry;
++ return 0;
++}
++
++
++void rewinddir (DIR *dirp) {
++ if (!dirp) {
++ return;
++ }
++
++ dirreset (dirp->dirData);
++ dirp->position = 0;
++}
++
++
++void seekdir(DIR *dirp, long int loc) {
++ char filename[MAXPATHLEN];
++
++ if (!dirp || loc < 0) {
++ return;
++ }
++
++ if (dirp->position > loc) {
++ // The entry we want is before the one we have,
++ // so we have to start again from the begining
++ dirreset (dirp->dirData);
++ dirp->position = 0;
++ }
++
++ // Keep reading entries until we reach the one we want
++ while ((dirp->position < loc) &&
++ (dirnext (dirp->dirData, filename, NULL) >= 0))
++ {
++ dirp->position += 1;
++ }
++}
++
++
++long int telldir(DIR *dirp) {
++ if (!dirp) {
++ return -1;
++ }
++
++ return dirp->position;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/environ.c newlib-1.19.0-arm/libgloss/libsysbase/environ.c
+--- newlib-1.19.0/libgloss/libsysbase/environ.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/environ.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,6 @@
++/*
++ * Version of environ for no OS.
++ */
++
++char *__env[1] = { 0 };
++char **environ = __env;
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/execve.c newlib-1.19.0-arm/libgloss/libsysbase/execve.c
+--- newlib-1.19.0/libgloss/libsysbase/execve.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/execve.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,31 @@
++/*
++ * Stub version of execve.
++ */
++
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++_DEFUN (_execve_r, (r, name, argv, env),
++ struct _reent * r _AND
++ char *name _AND
++ char **argv _AND
++ char **env) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int
++_DEFUN (_execve, (name, argv, env),
++ char *name _AND
++ char **argv _AND
++ char **env) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ r->_errno = ENOSYS;
++ return -1;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/fchmod.c newlib-1.19.0-arm/libgloss/libsysbase/fchmod.c
+--- newlib-1.19.0/libgloss/libsysbase/fchmod.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/fchmod.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,30 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include
++
++#include "handle_manager.h"
++
++int fchmod(int fd, mode_t mode) {
++ int ret = -1, dev;
++ struct _reent *r = _REENT;
++
++ if(fd!=-1) {
++
++ __handle *handle = __get_handle(fd);
++
++ if ( handle != NULL) {
++
++ dev = handle->device;
++ fd = (unsigned int)handle->fileStruct;
++
++ if(devoptab_list[dev]->fchmod_r)
++ ret = devoptab_list[dev]->fchmod_r(r,fd,mode);
++
++ }
++ }
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/flock.c newlib-1.19.0-arm/libgloss/libsysbase/flock.c
+--- newlib-1.19.0/libgloss/libsysbase/flock.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/flock.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,21 @@
++#include
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#ifndef REENTRANT_SYSCALLS_PROVIDED
++#include
++#endif
++#include
++#include
++
++void __flockfile(FILE *fp)
++{
++ __lock_acquire_recursive(*(_LOCK_RECURSIVE_T*)&fp->_lock);
++}
++
++void __funlockfile(FILE *fp)
++{
++ __lock_release_recursive(*(_LOCK_RECURSIVE_T*)&fp->_lock);
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/fork.c newlib-1.19.0-arm/libgloss/libsysbase/fork.c
+--- newlib-1.19.0/libgloss/libsysbase/fork.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/fork.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,25 @@
++/*
++ * Stub version of fork.
++ */
++
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int
++_DEFUN(_fork_r,(r),
++ struct _reent * r) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int
++_DEFUN (_fork, (),
++ _NOARGS) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ r->_errno = ENOSYS;
++ return -1;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/fstat.c newlib-1.19.0-arm/libgloss/libsysbase/fstat.c
+--- newlib-1.19.0/libgloss/libsysbase/fstat.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/fstat.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,48 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN (_fstat_r,(r,fileDesc, st),
++ struct _reent * r _AND
++ int fileDesc _AND
++ struct stat *st) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN (_fstat,(fileDesc, st),
++ int fileDesc _AND
++ struct stat *st) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle = NULL;
++
++ if(fileDesc!=-1) {
++ if ( fileDesc < 3) {
++ dev = fileDesc;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) return ret;
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++ }
++ if(devoptab_list[dev]->fstat_r) {
++ ret = devoptab_list[dev]->fstat_r(r,fd,st);
++ } else {
++ r->_errno = ENOSYS;
++ }
++ }
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/fsync.c newlib-1.19.0-arm/libgloss/libsysbase/fsync.c
+--- newlib-1.19.0/libgloss/libsysbase/fsync.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/fsync.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,36 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++
++#include "handle_manager.h"
++
++int _DEFUN (fsync,(fileDesc),
++ int fileDesc ) {
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle;
++
++ if ( fileDesc < 3) {
++ errno = EINVAL;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) {
++ errno = EINVAL;
++ return ret;
++ }
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++
++ if(devoptab_list[dev]->fsync_r)
++ ret = devoptab_list[dev]->fsync_r( _REENT, fd);
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/ftruncate.c newlib-1.19.0-arm/libgloss/libsysbase/ftruncate.c
+--- newlib-1.19.0/libgloss/libsysbase/ftruncate.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/ftruncate.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,37 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++
++#include "handle_manager.h"
++
++int _DEFUN (ftruncate,(fileDesc, len),
++ int fileDesc _AND
++ off_t len) {
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle;
++
++ if ( fileDesc < 3) {
++ errno = EINVAL;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) {
++ errno = EINVAL;
++ return ret;
++ }
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++
++ if(devoptab_list[dev]->ftruncate_r)
++ ret = devoptab_list[dev]->ftruncate_r( _REENT, fd, len);
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/getpid.c newlib-1.19.0-arm/libgloss/libsysbase/getpid.c
+--- newlib-1.19.0/libgloss/libsysbase/getpid.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/getpid.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,21 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN( _getpid_r,(ptr),
++ struct _reent *ptr) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN (_getpid, (),
++ _NOARGS) {
++//---------------------------------------------------------------------------------
++ struct _reent *ptr = _REENT;
++#endif
++ ptr->_errno = ENOSYS;
++ return -1;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/gettod.c newlib-1.19.0-arm/libgloss/libsysbase/gettod.c
+--- newlib-1.19.0/libgloss/libsysbase/gettod.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/gettod.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,25 @@
++/*
++ * Stub version of gettimeofday.
++ */
++
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include "warning.h"
++
++struct timeval;
++struct timezone;
++
++int
++_DEFUN (_gettimeofday, (ptimeval, ptimezone),
++ struct timeval *ptimeval _AND
++ void *ptimezone)
++{
++ errno = ENOSYS;
++ return -1;
++}
++
++stub_warning(_gettimeofday)
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/handle_manager.c newlib-1.19.0-arm/libgloss/libsysbase/handle_manager.c
+--- newlib-1.19.0/libgloss/libsysbase/handle_manager.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/handle_manager.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,47 @@
++#include
++#include
++
++#include "handle_manager.h"
++
++#define MAX_HANDLES 1024
++
++static __handle* handles[MAX_HANDLES];
++
++
++void __release_handle(int fd) {
++
++ if ( fd < 3 || fd >= MAX_HANDLES + 3 ) return;
++
++ fd -= 3;
++ __handle* handle = handles[fd];
++ if ( NULL != handle ) {
++ free(handle);
++ handles[fd] = NULL;
++ }
++
++}
++
++int __alloc_handle(int size) {
++
++ int i;
++
++ for ( i = 0; i < MAX_HANDLES; i++ ) {
++ if ( handles[i] == NULL ) break;
++ }
++
++ if ( i == MAX_HANDLES ) return -1;
++
++ handles[i] = malloc(size);
++
++ if ( NULL == handles[i] ) return -1;
++
++ return i+3;
++}
++
++__handle *__get_handle(int fd) {
++
++ if ( fd < 3 || fd > MAX_HANDLES + 3 ) return NULL;
++
++ return handles[fd-3];
++
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/handle_manager.h newlib-1.19.0-arm/libgloss/libsysbase/handle_manager.h
+--- newlib-1.19.0/libgloss/libsysbase/handle_manager.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/handle_manager.h 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,10 @@
++#ifndef __HANDLE_MANAGER_H__
++#define __HANDLE_MANAGER_H__
++
++#include
++
++void __release_handle(int fd);
++int __alloc_handle(int size);
++__handle *__get_handle(int fd);
++
++#endif
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/iosupport.c newlib-1.19.0-arm/libgloss/libsysbase/iosupport.c
+--- newlib-1.19.0/libgloss/libsysbase/iosupport.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/iosupport.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,122 @@
++#include
++#include
++#include
++
++static int defaultDevice = -1;
++
++//---------------------------------------------------------------------------------
++void setDefaultDevice( int device ) {
++//---------------------------------------------------------------------------------
++
++ if ( device >2 && device <= STD_MAX)
++ defaultDevice = device;
++}
++
++//---------------------------------------------------------------------------------
++const devoptab_t dotab_stdnull = {
++//---------------------------------------------------------------------------------
++ "stdnull", // device name
++ 0, // size of file structure
++ NULL, // device open
++ NULL, // device close
++ NULL, // device write
++ NULL, // device read
++ NULL, // device seek
++ NULL, // device fstat
++ NULL, // device stat
++ NULL, // device link
++ NULL, // device unlink
++ NULL, // device chdir
++ NULL, // device rename
++ NULL, // device mkdir
++ 0, // dirStateSize
++ NULL, // device diropen_r
++ NULL, // device dirreset_r
++ NULL, // device dirnext_r
++ NULL, // device dirclose_r
++ NULL, // device statvfs_r
++ NULL, // device ftruncate_r
++ NULL, // device fsync_r
++ NULL // deviceData
++};
++
++//---------------------------------------------------------------------------------
++const devoptab_t *devoptab_list[STD_MAX] = {
++//---------------------------------------------------------------------------------
++ &dotab_stdnull, &dotab_stdnull, &dotab_stdnull, &dotab_stdnull,
++ &dotab_stdnull, &dotab_stdnull, &dotab_stdnull, &dotab_stdnull,
++ &dotab_stdnull, &dotab_stdnull, &dotab_stdnull, &dotab_stdnull,
++ &dotab_stdnull, &dotab_stdnull, &dotab_stdnull, &dotab_stdnull
++};
++
++//---------------------------------------------------------------------------------
++int FindDevice(const char* name) {
++//---------------------------------------------------------------------------------
++ int i = 0, namelen, dev = -1;
++
++ if (strchr(name, ':') == NULL) return defaultDevice;
++
++ while(iname);
++ if(strncmp(devoptab_list[i]->name,name,namelen)==0 ) {
++ if ( name[namelen] == ':' || (isdigit(name[namelen]) && name[namelen+1] ==':' )) {
++ dev = i;
++ break;
++ }
++ }
++ }
++ i++;
++ }
++
++ return dev;
++}
++
++//---------------------------------------------------------------------------------
++int RemoveDevice( const char* name) {
++//---------------------------------------------------------------------------------
++ int dev = FindDevice(name);
++
++ if ( -1 != dev ) {
++ devoptab_list[dev] = &dotab_stdnull;
++ return 0;
++ }
++
++ return -1;
++
++}
++
++//---------------------------------------------------------------------------------
++int AddDevice( const devoptab_t* device) {
++//---------------------------------------------------------------------------------
++
++ int devnum;
++
++ for ( devnum = 3;devnum name, device->name) &&
++ strlen(devoptab_list[devnum]->name) == strlen(device->name) ) ||
++ !strcmp(devoptab_list[devnum]->name, "stdnull")
++ )
++ break;
++ }
++
++ if ( devnum == STD_MAX ) {
++ devnum = -1;
++ } else {
++ devoptab_list[devnum] = device;
++ }
++ return devnum;
++}
++
++//---------------------------------------------------------------------------------
++const devoptab_t* GetDeviceOpTab (const char *name) {
++//---------------------------------------------------------------------------------
++ int dev = FindDevice(name);
++ if (dev >= 0 && dev < STD_MAX) {
++ return devoptab_list[dev];
++ } else {
++ return NULL;
++ }
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/isatty.c newlib-1.19.0-arm/libgloss/libsysbase/isatty.c
+--- newlib-1.19.0/libgloss/libsysbase/isatty.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/isatty.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,20 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN(_isatty_r,(ptr,file),
++ struct _reent *ptr _AND
++ int file) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN(_isatty,(file),
++ int file) {
++//---------------------------------------------------------------------------------
++ struct _reent *ptr = _REENT;
++#endif
++ return 0;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/kill.c newlib-1.19.0-arm/libgloss/libsysbase/kill.c
+--- newlib-1.19.0/libgloss/libsysbase/kill.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/kill.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,23 @@
++/*
++ * Stub version of kill.
++ */
++
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++int _DEFUN(_kill_r,(ptr,pid,sig),
++ struct _reent *ptr _AND
++ int pid _AND
++ int sig) {
++#else
++int _DEFUN(_kill,(pid,sig),
++ int pid _AND
++ int sig) {
++ struct _reent *ptr = _REENT;
++#endif
++ ptr->_errno = ENOSYS;
++ return -1;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/link.c newlib-1.19.0-arm/libgloss/libsysbase/link.c
+--- newlib-1.19.0/libgloss/libsysbase/link.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/link.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,37 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++int _DEFUN (_link_r, (r, existing, new),
++ struct _reent *r _AND
++ const char *existing _AND
++ const char *new) {
++#else
++int _DEFUN (_link, (existing, new),
++ const char *existing _AND
++ const char *new) {
++ struct _reent *r = _REENT;
++#endif
++ int ret;
++ int sourceDev = FindDevice(existing);
++ int destDev = FindDevice(new);
++
++ ret = -1;
++
++ if ( sourceDev == destDev) {
++ if (devoptab_list[destDev]->link_r) {
++ ret = devoptab_list[destDev]->link_r( r, existing, new);
++ } else {
++ r->_errno = ENOSYS;
++ }
++ } else {
++ r->_errno = EXDEV;
++ }
++
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/lseek.c newlib-1.19.0-arm/libgloss/libsysbase/lseek.c
+--- newlib-1.19.0/libgloss/libsysbase/lseek.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/lseek.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,55 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++#include
++
++#include "handle_manager.h"
++
++//---------------------------------------------------------------------------------
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++_off_t _DEFUN (_lseek_r, (r, fileDesc, pos, dir),
++ struct _reent * r _AND
++ int fileDesc _AND
++ _off_t pos _AND
++ int dir) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++_off_t _DEFUN (_lseek,(fileDesc, pos, dir),
++ int fileDesc _AND
++ _off_t pos _AND
++ int dir) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++//---------------------------------------------------------------------------------
++#endif
++//---------------------------------------------------------------------------------
++ _off_t ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle;
++
++ if(fileDesc!=-1) {
++
++ if ( fileDesc < 3) {
++ dev = fileDesc;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) return ret;
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++ }
++
++ if(devoptab_list[dev]->seek_r)
++ ret = devoptab_list[dev]->seek_r( r, fd, pos, dir);
++
++ }
++ return ret;
++
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/malloc_vars.c newlib-1.19.0-arm/libgloss/libsysbase/malloc_vars.c
+--- newlib-1.19.0/libgloss/libsysbase/malloc_vars.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/malloc_vars.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,2 @@
++char *fake_heap_end = (char*)0;
++char *fake_heap_start = (char*)0;
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/mkdir.c newlib-1.19.0-arm/libgloss/libsysbase/mkdir.c
+--- newlib-1.19.0/libgloss/libsysbase/mkdir.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/mkdir.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,18 @@
++#include
++#include
++#include
++
++int mkdir (const char *path, mode_t mode) {
++ struct _reent *r = _REENT;
++ int ret;
++ int dev = FindDevice(path);
++ ret = -1;
++
++ if (devoptab_list[dev]->mkdir_r) {
++ ret = devoptab_list[dev]->mkdir_r(r, path, mode);
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/open.c newlib-1.19.0-arm/libgloss/libsysbase/open.c
+--- newlib-1.19.0/libgloss/libsysbase/open.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/open.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,57 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include
++
++#include "handle_manager.h"
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN (_open_r, (r, file, flags, mode),
++ struct _reent * r _AND
++ const char *file _AND
++ int flags _AND
++ int mode) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN (_open, (file, flags, mode),
++ const char *file _AND
++ int flags _AND
++ int mode) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ __handle *handle;
++ int dev, fd, ret;
++
++ dev = FindDevice(file);
++
++ fd = -1;
++ if(dev!=-1 && devoptab_list[dev]->open_r) {
++
++ fd = __alloc_handle(sizeof(__handle) + devoptab_list[dev]->structSize );
++
++ if ( -1 != fd ) {
++ handle = __get_handle(fd);
++ handle->device = dev;
++ handle->fileStruct = ((void *)handle) + sizeof(__handle);
++
++ ret = devoptab_list[dev]->open_r(r, handle->fileStruct, file, flags, mode);
++
++ if ( ret == -1 ) {
++ __release_handle(fd);
++ fd = -1;
++ }
++ } else {
++ r->_errno = ENOSR;
++ }
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ return fd;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/read.c newlib-1.19.0-arm/libgloss/libsysbase/read.c
+--- newlib-1.19.0/libgloss/libsysbase/read.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/read.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,48 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++
++#include "handle_manager.h"
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++_ssize_t _DEFUN(_read_r,(r, fileDesc, ptr, len),
++ struct _reent * r _AND
++ int fileDesc _AND
++ void *ptr _AND
++ size_t len) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++_ssize_t _DEFUN(_read,(fileDesc, ptr, len),
++ int fileDesc _AND
++ char *ptr _AND
++ size_t len) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle = NULL;
++
++ if(fileDesc!=-1) {
++ if ( fileDesc < 3) {
++ dev = fileDesc;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) return ret;
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++ }
++ if(devoptab_list[dev]->read_r)
++ ret = devoptab_list[dev]->read_r(r,fd,ptr,len);
++ }
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/rename.c newlib-1.19.0-arm/libgloss/libsysbase/rename.c
+--- newlib-1.19.0/libgloss/libsysbase/rename.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/rename.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,39 @@
++#include
++#include
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++int
++_DEFUN (_rename_r, (ptr, existing, newName),
++ struct _reent *ptr _AND
++ _CONST char *existing _AND
++ _CONST char *newName)
++{
++#else
++int
++_DEFUN(rename, (existing, newName),
++ _CONST char *existing _AND
++ _CONST char *newName)
++{
++ struct _reent *ptr = _REENT;
++#endif
++ struct _reent *r = _REENT;
++
++ int ret;
++ int sourceDev = FindDevice(existing);
++ int destDev = FindDevice(newName);
++
++ ret = -1;
++
++ if ( sourceDev == destDev) {
++ if (devoptab_list[destDev]->rename_r) {
++ ret = devoptab_list[destDev]->rename_r( r, existing, newName);
++ } else {
++ r->_errno = ENOSYS;
++ }
++ } else {
++ r->_errno = EXDEV;
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/sbrk.c newlib-1.19.0-arm/libgloss/libsysbase/sbrk.c
+--- newlib-1.19.0/libgloss/libsysbase/sbrk.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/sbrk.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,59 @@
++#include <_ansi.h>
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++
++
++extern char *fake_heap_end;
++extern char *fake_heap_start;
++
++/* Register name faking - works in collusion with the linker. */
++register char * stack_ptr asm ("sp");
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++void * _sbrk_r (struct _reent *ptr, ptrdiff_t incr) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++caddr_t _sbrk (int incr) {
++//---------------------------------------------------------------------------------
++ struct _reent *ptr = _REENT;
++#endif
++ extern char end asm ("__end__"); /* Defined by the linker. */
++ static char * heap_start;
++
++ char * prev_heap_start;
++ char * heap_end;
++
++ if (heap_start == NULL) {
++ if (fake_heap_start == NULL) {
++ heap_start = &end;
++ } else {
++ heap_start = fake_heap_start;
++ }
++ }
++
++ prev_heap_start = heap_start;
++
++ if (fake_heap_end == NULL) {
++ heap_end = stack_ptr;
++ } else {
++ heap_end = fake_heap_end;
++ }
++
++ if (heap_start + incr > heap_end) {
++ ptr->_errno = ENOMEM;
++ return (caddr_t) -1;
++ }
++
++ heap_start += incr;
++ return (caddr_t) prev_heap_start;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/stat.c newlib-1.19.0-arm/libgloss/libsysbase/stat.c
+--- newlib-1.19.0/libgloss/libsysbase/stat.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/stat.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,39 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++#include
++
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN (_stat_r,(r,file, st),
++ struct _reent * r _AND
++ const char *file _AND
++ struct stat *st) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int
++_DEFUN (_stat, (file, st),
++ const char *file _AND
++ struct stat *st)
++{
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ int dev,ret;
++
++ dev = FindDevice(file);
++
++ if(dev!=-1 && devoptab_list[dev]->stat_r) {
++ ret = devoptab_list[dev]->stat_r(r,file,st);
++ } else {
++ ret = -1;
++ r->_errno = ENODEV;
++ }
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/statvfs.c newlib-1.19.0-arm/libgloss/libsysbase/statvfs.c
+--- newlib-1.19.0/libgloss/libsysbase/statvfs.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/statvfs.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,23 @@
++#include
++#include
++#include
++
++
++int statvfs(const char *path, struct statvfs *buf) {
++ struct _reent *r = _REENT;
++
++ int ret;
++ int device = FindDevice(path);
++
++ ret = -1;
++
++ if ( device != -1 && devoptab_list[device]->statvfs_r) {
++
++ ret = devoptab_list[device]->statvfs_r(r, path, buf );
++
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/syscall_support.c newlib-1.19.0-arm/libgloss/libsysbase/syscall_support.c
+--- newlib-1.19.0/libgloss/libsysbase/syscall_support.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/syscall_support.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,9 @@
++#include
++
++//---------------------------------------------------------------------------------
++__syscalls_t __syscalls = {
++//---------------------------------------------------------------------------------
++ NULL, // sbrk
++ NULL // exit
++};
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/times.c newlib-1.19.0-arm/libgloss/libsysbase/times.c
+--- newlib-1.19.0/libgloss/libsysbase/times.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/times.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,47 @@
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++
++//---------------------------------------------------------------------------------
++clock_t _DEFUN (_times, (buf),
++ struct tms *buf) {
++//---------------------------------------------------------------------------------
++ errno = ENOSYS;
++ return -1;
++}
++
++#include
++#include
++#include
++#include
++#include <_syslist.h>
++
++time_t *punixTime;
++
++clock_t
++_DEFUN (_times_r, (ptr, ptms),
++ struct _reent *ptr _AND
++ struct tms *ptms)
++{
++ return (clock_t)-1;
++}
++
++
++int
++_DEFUN (_gettimeofday_r, (ptr, ptimeval, ptimezone),
++ struct _reent *ptr _AND
++ struct timeval *ptimeval _AND
++ void *ptimezone)
++{
++
++ time_t ret = -1;
++ if ( ptimeval && punixTime ) {
++ ret = 0;
++ ptimeval->tv_sec = *punixTime;
++ ptimeval->tv_usec = 0;
++ }
++
++ ptr->_errno = ret;
++ return ret;
++}
+\ No newline at end of file
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/truncate.c newlib-1.19.0-arm/libgloss/libsysbase/truncate.c
+--- newlib-1.19.0/libgloss/libsysbase/truncate.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/truncate.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,59 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++
++#include "handle_manager.h"
++
++int _DEFUN (truncate, (file, len),
++ const char *file _AND
++ off_t len)
++{
++
++ __handle *handle;
++ int dev, fd, ret;
++
++ struct _reent * r = _REENT;
++
++ dev = FindDevice(file);
++
++ fd = -1;
++ if(dev!=-1 && devoptab_list[dev]->open_r && devoptab_list[dev]->close_r &&
++ devoptab_list[dev]->ftruncate_r)
++ {
++
++ fd = __alloc_handle(sizeof(__handle) + devoptab_list[dev]->structSize );
++
++ if ( -1 != fd ) {
++ handle = __get_handle(fd);
++ handle->device = dev;
++ handle->fileStruct = ((void *)handle) + sizeof(__handle);
++
++ ret = devoptab_list[dev]->open_r(r, handle->fileStruct, file, O_WRONLY, 0);
++
++ if ( ret < 0 ) {
++ __release_handle(fd);
++ return ret;
++ }
++
++ ret = devoptab_list[dev]->ftruncate_r(r, fd, len);
++
++ devoptab_list[dev]->close_r(r, fd);
++
++ if (ret >= 0) {
++ ret = devoptab_list[dev]->close_r(r, fd);
++ } else {
++ // Close it anyway, we don't want to leak memory
++ devoptab_list[dev]->close_r(r, fd);
++ }
++ } else {
++ r->_errno = ENOSR;
++ }
++ } else {
++ r->_errno = ENOSYS;
++ }
++
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/unlink.c newlib-1.19.0-arm/libgloss/libsysbase/unlink.c
+--- newlib-1.19.0/libgloss/libsysbase/unlink.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/unlink.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,33 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++#include
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++int _DEFUN (_unlink_r, (r, name),
++ struct _reent * r _AND
++ const char *name ) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++int _DEFUN (_unlink, (name),
++ const char *name) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ int dev,ret;
++
++ dev = FindDevice(name);
++ if(dev!=-1 && devoptab_list[dev]->unlink_r) {
++ ret = devoptab_list[dev]->unlink_r(r,name);
++ } else {
++ ret = -1;
++ r->_errno = ENODEV;
++ }
++
++ return ret;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/wait.c newlib-1.19.0-arm/libgloss/libsysbase/wait.c
+--- newlib-1.19.0/libgloss/libsysbase/wait.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/wait.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,28 @@
++/*
++ * Stub version of wait.
++ */
++
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++
++//---------------------------------------------------------------------------------
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++_DEFUN (_wait_r, (r, status),
++ struct _reent *r _AND
++ int *status) {
++
++#else
++//---------------------------------------------------------------------------------
++int
++_DEFUN (_wait, (status),
++ int *status) {
++ struct _reent *r = _REENT;
++#endif
++//---------------------------------------------------------------------------------
++ r->_errno = ENOSYS;
++ return -1;
++}
++
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/warning.h newlib-1.19.0-arm/libgloss/libsysbase/warning.h
+--- newlib-1.19.0/libgloss/libsysbase/warning.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/warning.h 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,43 @@
++#ifndef __WARNING_H__
++#define __WARNING_H__
++
++#ifdef HAVE_GNU_LD
++# ifdef HAVE_ELF
++
++/* We want the .gnu.warning.SYMBOL section to be unallocated. */
++# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
++# define __make_section_unallocated(section_string) \
++ asm(".section " section_string "; .previous");
++# elif defined (HAVE_ASM_POPSECTION_DIRECTIVE)
++# define __make_section_unallocated(section_string) \
++ asm(".pushsection " section_string "; .popsection");
++# else
++# define __make_section_unallocated(section_string)
++# endif
++
++# ifdef HAVE_SECTION_ATTRIBUTES
++# define link_warning(symbol, msg) \
++ __make_section_unallocated (".gnu.warning." #symbol) \
++ static const char __evoke_link_warning_##symbol[] \
++ __attribute__ ((section (".gnu.warning." #symbol))) = msg;
++# else
++# define link_warning(symbol, msg)
++# endif
++
++#else /* !ELF */
++
++# define link_warning(symbol, msg) \
++ asm(".stabs \"" msg "\",30,0,0,0\n" \
++ ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
++# endif
++#else /* !GNULD */
++/* We will never be heard; they will all die horribly. */
++# define link_warning(symbol, msg)
++#endif
++
++/* A canned warning for sysdeps/stub functions. */
++#define stub_warning(name) \
++ link_warning (name, \
++ "warning: " #name " is not implemented and will always fail")
++
++#endif /* __WARNING_H__ */
+diff -Nbaur newlib-1.19.0/libgloss/libsysbase/write.c newlib-1.19.0-arm/libgloss/libsysbase/write.c
+--- newlib-1.19.0/libgloss/libsysbase/write.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/libgloss/libsysbase/write.c 2010-12-18 14:40:27.000000000 +0000
+@@ -0,0 +1,48 @@
++#include "config.h"
++#include <_ansi.h>
++#include <_syslist.h>
++#include
++#include
++
++#include "handle_manager.h"
++
++#ifdef REENTRANT_SYSCALLS_PROVIDED
++//---------------------------------------------------------------------------------
++_ssize_t _DEFUN(_write_r,(r, fileDesc, ptr, len),
++ struct _reent * r _AND
++ int fileDesc _AND
++ const void *ptr _AND
++ size_t len) {
++//---------------------------------------------------------------------------------
++#else
++//---------------------------------------------------------------------------------
++_ssize_t _DEFUN (_write, (fileDesc, ptr, len),
++ int fileDesc _AND
++ const char *ptr _AND
++ int len) {
++//---------------------------------------------------------------------------------
++ struct _reent *r = _REENT;
++#endif
++ int ret = -1;
++ unsigned int dev = 0;
++ unsigned int fd = -1;
++
++ __handle * handle = NULL;
++
++
++ if(fileDesc!=-1) {
++ if ( fileDesc < 3) {
++ dev = fileDesc;
++ } else {
++ handle = __get_handle(fileDesc);
++
++ if ( NULL == handle ) return ret;
++
++ dev = handle->device;
++ fd = (int)handle->fileStruct;
++ }
++ if(devoptab_list[dev]->write_r)
++ ret = devoptab_list[dev]->write_r(r,fd,ptr,len);
++ }
++ return ret;
++}
+diff -Nbaur newlib-1.19.0/newlib/libc/include/pthread.h newlib-1.19.0-arm/newlib/libc/include/pthread.h
+--- newlib-1.19.0/newlib/libc/include/pthread.h 2010-12-08 14:44:06.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/include/pthread.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,359 +0,0 @@
+-/* pthread.h
+- *
+- * Written by Joel Sherrill .
+- *
+- * COPYRIGHT (c) 1989-2010.
+- * On-Line Applications Research Corporation (OAR).
+- *
+- * Permission to use, copy, modify, and distribute this software for any
+- * purpose without fee is hereby granted, provided that this entire notice
+- * is included in all copies of any software which is or includes a copy
+- * or modification of this software.
+- *
+- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+- * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION
+- * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
+- * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+- *
+- * $Id: pthread.h,v 1.9 2010/12/08 14:44:06 corinna Exp $
+- */
+-
+-#ifndef __PTHREAD_h
+-#define __PTHREAD_h
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+-#include
+-
+-#if defined(_POSIX_THREADS)
+-
+-#include
+-#include
+-#include
+-
+-/* Register Fork Handlers */
+-int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void),
+- void (*child)(void)));
+-
+-/* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */
+-
+-int _EXFUN(pthread_mutexattr_init, (pthread_mutexattr_t *__attr));
+-int _EXFUN(pthread_mutexattr_destroy, (pthread_mutexattr_t *__attr));
+-int _EXFUN(pthread_mutexattr_getpshared,
+- (_CONST pthread_mutexattr_t *__attr, int *__pshared));
+-int _EXFUN(pthread_mutexattr_setpshared,
+- (pthread_mutexattr_t *__attr, int __pshared));
+-
+-#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
+-
+-/* Single UNIX Specification 2 Mutex Attributes types */
+-
+-int _EXFUN(pthread_mutexattr_gettype,
+- (_CONST pthread_mutexattr_t *__attr, int *__kind));
+-int _EXFUN(pthread_mutexattr_settype,
+- (pthread_mutexattr_t *__attr, int __kind));
+-
+-#endif
+-
+-/* Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87 */
+-
+-int _EXFUN(pthread_mutex_init,
+- (pthread_mutex_t *__mutex, _CONST pthread_mutexattr_t *__attr));
+-int _EXFUN(pthread_mutex_destroy, (pthread_mutex_t *__mutex));
+-
+-/* This is used to statically initialize a pthread_mutex_t. Example:
+-
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- */
+-
+-#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF)
+-
+-/* Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
+- NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */
+-
+-int _EXFUN(pthread_mutex_lock, (pthread_mutex_t *__mutex));
+-int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex));
+-int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex));
+-
+-#if defined(_POSIX_TIMEOUTS)
+-
+-int _EXFUN(pthread_mutex_timedlock,
+- (pthread_mutex_t *__mutex, _CONST struct timespec *__timeout));
+-
+-#endif /* _POSIX_TIMEOUTS */
+-
+-/* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */
+-
+-int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr));
+-int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr));
+-int _EXFUN(pthread_condattr_getpshared,
+- (_CONST pthread_condattr_t *__attr, int *__pshared));
+-int _EXFUN(pthread_condattr_setpshared,
+- (pthread_condattr_t *__attr, int __pshared));
+-
+-/* Initializing and Destroying a Condition Variable, P1003.1c/Draft 10, p. 87 */
+-
+-int _EXFUN(pthread_cond_init,
+- (pthread_cond_t *__cond, _CONST pthread_condattr_t *__attr));
+-int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex));
+-
+-/* This is used to statically initialize a pthread_cond_t. Example:
+-
+- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+- */
+-
+-#define PTHREAD_COND_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF)
+-
+-/* Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */
+-
+-int _EXFUN(pthread_cond_signal, (pthread_cond_t *__cond));
+-int _EXFUN(pthread_cond_broadcast, (pthread_cond_t *__cond));
+-
+-/* Waiting on a Condition, P1003.1c/Draft 10, p. 105 */
+-
+-int _EXFUN(pthread_cond_wait,
+- (pthread_cond_t *__cond, pthread_mutex_t *__mutex));
+-
+-int _EXFUN(pthread_cond_timedwait,
+- (pthread_cond_t *__cond, pthread_mutex_t *__mutex,
+- _CONST struct timespec *__abstime));
+-
+-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
+-
+-/* Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 */
+-
+-int _EXFUN(pthread_attr_setscope,
+- (pthread_attr_t *__attr, int __contentionscope));
+-int _EXFUN(pthread_attr_getscope,
+- (_CONST pthread_attr_t *__attr, int *__contentionscope));
+-int _EXFUN(pthread_attr_setinheritsched,
+- (pthread_attr_t *__attr, int __inheritsched));
+-int _EXFUN(pthread_attr_getinheritsched,
+- (_CONST pthread_attr_t *__attr, int *__inheritsched));
+-int _EXFUN(pthread_attr_setschedpolicy,
+- (pthread_attr_t *__attr, int __policy));
+-int _EXFUN(pthread_attr_getschedpolicy,
+- (_CONST pthread_attr_t *__attr, int *__policy));
+-
+-#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
+-
+-int _EXFUN(pthread_attr_setschedparam,
+- (pthread_attr_t *__attr, _CONST struct sched_param *__param));
+-int _EXFUN(pthread_attr_getschedparam,
+- (_CONST pthread_attr_t *__attr, struct sched_param *__param));
+-
+-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
+-
+-/* Dynamic Thread Scheduling Parameters Access, P1003.1c/Draft 10, p. 124 */
+-
+-int _EXFUN(pthread_getschedparam,
+- (pthread_t __pthread, int *__policy, struct sched_param *__param));
+-int _EXFUN(pthread_setschedparam,
+- (pthread_t __pthread, int __policy, struct sched_param *__param));
+-
+-#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
+-
+-#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
+-
+-/* Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */
+-
+-int _EXFUN(pthread_mutexattr_setprotocol,
+- (pthread_mutexattr_t *__attr, int __protocol));
+-int _EXFUN(pthread_mutexattr_getprotocol,
+- (_CONST pthread_mutexattr_t *__attr, int *__protocol));
+-int _EXFUN(pthread_mutexattr_setprioceiling,
+- (pthread_mutexattr_t *__attr, int __prioceiling));
+-int _EXFUN(pthread_mutexattr_getprioceiling,
+- (_CONST pthread_mutexattr_t *__attr, int *__prioceiling));
+-
+-#endif /* _POSIX_THREAD_PRIO_INHERIT || _POSIX_THREAD_PRIO_PROTECT */
+-
+-#if defined(_POSIX_THREAD_PRIO_PROTECT)
+-
+-/* Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131 */
+-
+-int _EXFUN(pthread_mutex_setprioceiling,
+- (pthread_mutex_t *__mutex, int __prioceiling, int *__old_ceiling));
+-int _EXFUN(pthread_mutex_getprioceiling,
+- (pthread_mutex_t *__mutex, int *__prioceiling));
+-
+-#endif /* _POSIX_THREAD_PRIO_PROTECT */
+-
+-/* Thread Creation Attributes, P1003.1c/Draft 10, p, 140 */
+-
+-int _EXFUN(pthread_attr_init, (pthread_attr_t *__attr));
+-int _EXFUN(pthread_attr_destroy, (pthread_attr_t *__attr));
+-int _EXFUN(pthread_attr_setstack, (pthread_attr_t *attr,
+- void *__stackaddr, size_t __stacksize));
+-int _EXFUN(pthread_attr_getstack, (_CONST pthread_attr_t *attr,
+- void **__stackaddr, size_t *__stacksize));
+-int _EXFUN(pthread_attr_getstacksize,
+- (_CONST pthread_attr_t *__attr, size_t *__stacksize));
+-int _EXFUN(pthread_attr_setstacksize,
+- (pthread_attr_t *__attr, size_t __stacksize));
+-int _EXFUN(pthread_attr_getstackaddr,
+- (_CONST pthread_attr_t *__attr, void **__stackaddr));
+-int _EXFUN(pthread_attr_setstackaddr,
+- (pthread_attr_t *__attr, void *__stackaddr));
+-int _EXFUN(pthread_attr_getdetachstate,
+- (_CONST pthread_attr_t *__attr, int *__detachstate));
+-int _EXFUN(pthread_attr_setdetachstate,
+- (pthread_attr_t *__attr, int __detachstate));
+-int _EXFUN(pthread_attr_getguardsize,
+- (_CONST pthread_attr_t *__attr, size_t *__guardsize));
+-int _EXFUN(pthread_attr_setguardsize,
+- (pthread_attr_t *__attr, size_t __guardsize));
+-
+-/* Thread Creation, P1003.1c/Draft 10, p. 144 */
+-
+-int _EXFUN(pthread_create,
+- (pthread_t *__pthread, _CONST pthread_attr_t *__attr,
+- void *(*__start_routine)( void * ), void *__arg));
+-
+-/* Wait for Thread Termination, P1003.1c/Draft 10, p. 147 */
+-
+-int _EXFUN(pthread_join, (pthread_t __pthread, void **__value_ptr));
+-
+-/* Detaching a Thread, P1003.1c/Draft 10, p. 149 */
+-
+-int _EXFUN(pthread_detach, (pthread_t __pthread));
+-
+-/* Thread Termination, p1003.1c/Draft 10, p. 150 */
+-
+-void _EXFUN(pthread_exit, (void *__value_ptr));
+-
+-/* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */
+-
+-pthread_t _EXFUN(pthread_self, (void));
+-
+-/* Compare Thread IDs, p1003.1c/Draft 10, p. 153 */
+-
+-int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2));
+-
+-/* Dynamic Package Initialization */
+-
+-/* This is used to statically initialize a pthread_once_t. Example:
+-
+- pthread_once_t once = PTHREAD_ONCE_INIT;
+-
+- NOTE: This is named inconsistently -- it should be INITIALIZER. */
+-
+-#define PTHREAD_ONCE_INIT { 1, 0 } /* is initialized and not run */
+-
+-int _EXFUN(pthread_once,
+- (pthread_once_t *__once_control, void (*__init_routine)(void)));
+-
+-/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
+-
+-int _EXFUN(pthread_key_create,
+- (pthread_key_t *__key, void (*__destructor)( void * )));
+-
+-/* Thread-Specific Data Management, P1003.1c/Draft 10, p. 165 */
+-
+-int _EXFUN(pthread_setspecific,
+- (pthread_key_t __key, _CONST void *__value));
+-void * _EXFUN(pthread_getspecific, (pthread_key_t __key));
+-
+-/* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */
+-
+-int _EXFUN(pthread_key_delete, (pthread_key_t __key));
+-
+-/* Execution of a Thread, P1003.1c/Draft 10, p. 181 */
+-
+-#define PTHREAD_CANCEL_ENABLE 0
+-#define PTHREAD_CANCEL_DISABLE 1
+-
+-#define PTHREAD_CANCEL_DEFERRED 0
+-#define PTHREAD_CANCEL_ASYNCHRONOUS 1
+-
+-#define PTHREAD_CANCELED ((void *) -1)
+-
+-int _EXFUN(pthread_cancel, (pthread_t __pthread));
+-
+-/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
+-
+-int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
+-int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
+-void _EXFUN(pthread_testcancel, (void));
+-
+-/* Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 */
+-
+-void _EXFUN(pthread_cleanup_push,
+- (void (*__routine)( void * ), void *__arg));
+-void _EXFUN(pthread_cleanup_pop, (int __execute));
+-
+-#if defined(_POSIX_THREAD_CPUTIME)
+-
+-/* Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58 */
+-
+-int _EXFUN(pthread_getcpuclockid,
+- (pthread_t __pthread_id, clockid_t *__clock_id));
+-
+-#endif /* defined(_POSIX_THREAD_CPUTIME) */
+-
+-
+-#endif /* defined(_POSIX_THREADS) */
+-
+-#if defined(_POSIX_BARRIERS)
+-
+-int _EXFUN(pthread_barrierattr_init, (pthread_barrierattr_t *__attr));
+-int _EXFUN(pthread_barrierattr_destroy, (pthread_barrierattr_t *__attr));
+-int _EXFUN(pthread_barrierattr_getpshared,
+- (_CONST pthread_barrierattr_t *__attr, int *__pshared));
+-int _EXFUN(pthread_barrierattr_setpshared,
+- (pthread_barrierattr_t *__attr, int __pshared));
+-
+-#define PTHREAD_BARRIER_SERIAL_THREAD -1
+-
+-int _EXFUN(pthread_barrier_init,
+- (pthread_barrier_t *__barrier,
+- _CONST pthread_barrierattr_t *__attr, unsigned __count));
+-int _EXFUN(pthread_barrier_destroy, (pthread_barrier_t *__barrier));
+-int _EXFUN(pthread_barrier_wait,(pthread_barrier_t *__barrier));
+-
+-#endif /* defined(_POSIX_BARRIERS) */
+-
+-#if defined(_POSIX_SPIN_LOCKS)
+-
+-int _EXFUN(pthread_spin_init,
+- (pthread_spinlock_t *__spinlock, int __pshared));
+-int _EXFUN(pthread_spin_destroy, (pthread_spinlock_t *__spinlock));
+-int _EXFUN(pthread_spin_lock, (pthread_spinlock_t *__spinlock));
+-int _EXFUN(pthread_spin_trylock, (pthread_spinlock_t *__spinlock));
+-int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock));
+-
+-#endif /* defined(_POSIX_SPIN_LOCKS) */
+-
+-#if defined(_POSIX_READER_WRITER_LOCKS)
+-
+-int _EXFUN(pthread_rwlockattr_init, (pthread_rwlockattr_t *__attr));
+-int _EXFUN(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *__attr));
+-int _EXFUN(pthread_rwlockattr_getpshared,
+- (_CONST pthread_rwlockattr_t *__attr, int *__pshared));
+-int _EXFUN(pthread_rwlockattr_setpshared,
+- (pthread_rwlockattr_t *__attr, int __pshared));
+-
+-int _EXFUN(pthread_rwlock_init,
+- (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
+-int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_timedrdlock,
+- (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
+-int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
+-int _EXFUN(pthread_rwlock_timedwrlock,
+- (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
+-
+-#endif /* defined(_POSIX_READER_WRITER_LOCKS) */
+-
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-#endif
+-/* end of include file */
+diff -Nbaur newlib-1.19.0/newlib/libc/include/stdint.h newlib-1.19.0-arm/newlib/libc/include/stdint.h
+--- newlib-1.19.0/newlib/libc/include/stdint.h 2009-04-24 22:55:07.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/stdint.h 2010-12-18 14:40:31.000000000 +0000
+@@ -75,14 +75,14 @@
+ #endif
+ #endif
+
+-#if __have_long32
+-typedef signed long int32_t;
+-typedef unsigned long uint32_t;
+-#define __int32_t_defined 1
+-#elif __STDINT_EXP(INT_MAX) == 0x7fffffffL
++#if __STDINT_EXP(INT_MAX) == 0x7fffffffL
+ typedef signed int int32_t;
+ typedef unsigned int uint32_t;
+ #define __int32_t_defined 1
++#elif __have_long32
++typedef signed long int32_t;
++typedef unsigned long uint32_t;
++#define __int32_t_defined 1
+ #elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL
+ typedef signed short int32_t;
+ typedef unsigned short uint32_t;
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/_types.h newlib-1.19.0-arm/newlib/libc/include/sys/_types.h
+--- newlib-1.19.0/newlib/libc/include/sys/_types.h 2007-09-18 21:05:17.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/_types.h 2010-12-18 14:40:31.000000000 +0000
+@@ -21,7 +21,7 @@
+ typedef unsigned long long __dev_t;
+ #else
+ #ifndef __dev_t_defined
+-typedef short __dev_t;
++typedef int __dev_t;
+ #endif
+ #endif
+
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/dirent.h newlib-1.19.0-arm/newlib/libc/include/sys/dirent.h
+--- newlib-1.19.0/newlib/libc/include/sys/dirent.h 2005-10-04 21:47:39.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/dirent.h 2010-12-18 16:49:59.000000000 +0000
+@@ -4,10 +4,39 @@
+ not support , we will get this file which uses #error to force
+ an error. */
+
++#ifndef _dirent_h_
++#define _dirent_h_
++
++#include
++#include
++#include
++
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-#error " not supported"
++
++ struct dirent {
++ ino_t d_ino;
++ char d_name[NAME_MAX+1];
++ };
++
++ typedef struct {
++ long int position;
++ DIR_ITER* dirData;
++ struct dirent fileData;
++ } DIR;
++
++ int closedir(DIR *dirp);
++ DIR *opendir(const char *dirname);
++ struct dirent *readdir(DIR *dirp);
++ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
++ void rewinddir(DIR *dirp);
++ void seekdir(DIR *dirp, long int loc);
++ long int telldir(DIR *dirp);
++
+ #ifdef __cplusplus
+ }
+ #endif
++
++#endif // _dirent_h_
+\ No newline at end of file
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/iosupport.h newlib-1.19.0-arm/newlib/libc/include/sys/iosupport.h
+--- newlib-1.19.0/newlib/libc/include/sys/iosupport.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/iosupport.h 2010-12-18 16:49:59.000000000 +0000
+@@ -0,0 +1,93 @@
++//---------------------------------------------------------------------------------
++#ifndef __iosupp_h__
++#define __iosupp_h__
++//---------------------------------------------------------------------------------
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include
++#include
++#include
++
++enum {
++ STD_IN,
++ STD_OUT,
++ STD_ERR,
++ STD_MAX = 16
++};
++
++
++typedef struct {
++ int device;
++ void *fileStruct;
++} __handle;
++
++/* Directory iterator for mantaining state between dir* calls */
++typedef struct {
++ int device;
++ void *dirStruct;
++} DIR_ITER;
++
++typedef struct {
++ const char *name;
++ int structSize;
++ int (*open_r)(struct _reent *r, void *fileStruct, const char *path, int flags, int mode);
++ int (*close_r)(struct _reent *r, int fd);
++ ssize_t (*write_r)(struct _reent *r, int fd, const char *ptr, size_t len);
++ ssize_t (*read_r)(struct _reent *r, int fd, char *ptr, size_t len);
++ off_t (*seek_r)(struct _reent *r, int fd, off_t pos, int dir);
++ int (*fstat_r)(struct _reent *r, int fd, struct stat *st);
++ int (*stat_r)(struct _reent *r, const char *file, struct stat *st);
++ int (*link_r)(struct _reent *r, const char *existing, const char *newLink);
++ int (*unlink_r)(struct _reent *r, const char *name);
++ int (*chdir_r)(struct _reent *r, const char *name);
++ int (*rename_r) (struct _reent *r, const char *oldName, const char *newName);
++ int (*mkdir_r) (struct _reent *r, const char *path, int mode);
++
++ int dirStateSize;
++
++ DIR_ITER* (*diropen_r)(struct _reent *r, DIR_ITER *dirState, const char *path);
++ int (*dirreset_r)(struct _reent *r, DIR_ITER *dirState);
++ int (*dirnext_r)(struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *filestat);
++ int (*dirclose_r)(struct _reent *r, DIR_ITER *dirState);
++ int (*statvfs_r)(struct _reent *r, const char *path, struct statvfs *buf);
++ int (*ftruncate_r)(struct _reent *r, int fd, off_t len);
++ int (*fsync_r)(struct _reent *r, int fd);
++
++ void *deviceData;
++
++ int (*chmod_r)(struct _reent *r, const char *path, mode_t mode);
++ int (*fchmod_r)(struct _reent *r, int fd, mode_t mode);
++
++} devoptab_t;
++
++extern const devoptab_t *devoptab_list[];
++
++
++typedef struct {
++ void *(*sbrk_r) (struct _reent *ptr, ptrdiff_t incr);
++ void (*exit) ( int rc );
++} __syscalls_t;
++
++extern __syscalls_t __syscalls;
++
++int AddDevice( const devoptab_t* device);
++int FindDevice(const char* name);
++int RemoveDevice(const char* name);
++void setDefaultDevice( int device );
++const devoptab_t* GetDeviceOpTab (const char *name);
++
++DIR_ITER* diropen (const char *path);
++int dirreset (DIR_ITER *dirState);
++int dirnext (DIR_ITER *dirState, char *filename, struct stat *filestat);
++int dirclose (DIR_ITER *dirState);
++
++#ifdef __cplusplus
++}
++#endif
++
++//---------------------------------------------------------------------------------
++#endif // __iosupp_h__
++//---------------------------------------------------------------------------------
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/statvfs.h newlib-1.19.0-arm/newlib/libc/include/sys/statvfs.h
+--- newlib-1.19.0/newlib/libc/include/sys/statvfs.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/statvfs.h 2010-12-18 14:40:35.000000000 +0000
+@@ -0,0 +1,35 @@
++#ifndef _SYS_STATVFS_H
++#define _SYS_STATVFS_H
++
++
++#define ST_RDONLY 0x0001
++#define ST_NOSUID 0x0002
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include
++
++struct statvfs {
++ unsigned long f_bsize;
++ unsigned long f_frsize;
++ fsblkcnt_t f_blocks;
++ fsblkcnt_t f_bfree;
++ fsblkcnt_t f_bavail;
++ fsfilcnt_t f_files;
++ fsfilcnt_t f_ffree;
++ fsfilcnt_t f_favail;
++ unsigned long f_fsid;
++ unsigned long f_flag;
++ unsigned long f_namemax;
++};
++
++int statvfs(const char *path, struct statvfs *buf);
++
++#ifdef __cplusplus
++}
++#endif
++
++
++#endif // _SYS_STATVFS_H
+\ No newline at end of file
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/syslimits.h newlib-1.19.0-arm/newlib/libc/include/sys/syslimits.h
+--- newlib-1.19.0/newlib/libc/include/sys/syslimits.h 2002-08-23 02:56:03.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/syslimits.h 2010-12-18 14:40:35.000000000 +0000
+@@ -44,7 +44,7 @@
+ #define LINK_MAX 32767 /* max file link count */
+ #define MAX_CANON 255 /* max bytes in term canon input line */
+ #define MAX_INPUT 255 /* max bytes in terminal input */
+-#define NAME_MAX 255 /* max bytes in a file name */
++#define NAME_MAX 767 /* max bytes in a file name */
+ #define NGROUPS_MAX 16 /* max supplemental group id's */
+ #ifndef OPEN_MAX
+ #define OPEN_MAX 64 /* max open files per process */
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/types.h newlib-1.19.0-arm/newlib/libc/include/sys/types.h
+--- newlib-1.19.0/newlib/libc/include/sys/types.h 2010-12-08 14:44:06.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/include/sys/types.h 2010-12-18 14:40:35.000000000 +0000
+@@ -130,7 +130,7 @@
+ defined(__sparc__) || defined(__SPU__)
+ typedef unsigned long ino_t;
+ #else
+-typedef unsigned short ino_t;
++typedef unsigned int ino_t;
+ #endif
+ #endif /*__CYGWIN__*/
+
+@@ -262,6 +262,9 @@
+ typedef unsigned long useconds_t;
+ typedef long suseconds_t;
+
++typedef __uint32_t fsblkcnt_t;
++typedef __uint32_t fsfilcnt_t;
++
+ #include
+
+
+diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/unistd.h newlib-1.19.0-arm/newlib/libc/include/sys/unistd.h
+--- newlib-1.19.0/newlib/libc/include/sys/unistd.h 2010-10-08 16:28:49.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/include/sys/unistd.h 2010-12-18 14:40:35.000000000 +0000
+@@ -216,12 +216,10 @@
+ int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
+ #endif
+
+-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__) || defined(__SPU__)
+ #if !defined(__INSIDE_CYGWIN__)
+ int _EXFUN(ftruncate, (int __fd, off_t __length));
+ int _EXFUN(truncate, (const char *, off_t __length));
+ #endif
+-#endif
+
+ #if defined(__CYGWIN__) || defined(__rtems__)
+ int _EXFUN(getdtablesize, (void));
+diff -Nbaur newlib-1.19.0/newlib/libc/locale/locale.c newlib-1.19.0-arm/newlib/libc/locale/locale.c
+--- newlib-1.19.0/newlib/libc/locale/locale.c 2010-11-19 10:02:36.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/locale/locale.c 2010-12-18 14:50:38.000000000 +0000
+@@ -187,7 +187,6 @@
+ #define _LC_LAST 7
+ #define ENCODING_LEN 31
+
+-int __EXPORT __mb_cur_max = 1;
+
+ int __nlocale_changed = 0;
+ int __mlocale_changed = 0;
+@@ -217,6 +216,10 @@
+ "LC_MESSAGES",
+ };
+
++#ifdef __CYGWIN__
++#define __DEFAULT_UTF8__
++#endif
++
+ /*
+ * Default locale per POSIX. Can be overridden on a per-target base.
+ */
+@@ -255,12 +258,14 @@
+
+ #endif /* _MB_CAPABLE */
+
+-#if 0 /*def __CYGWIN__ TODO: temporarily(?) disable C == UTF-8 */
++#ifdef __DEFAULT_UTF8__
+ static char lc_ctype_charset[ENCODING_LEN + 1] = "UTF-8";
+ static char lc_message_charset[ENCODING_LEN + 1] = "UTF-8";
++int __EXPORT __mb_cur_max = 6;
+ #else
+ static char lc_ctype_charset[ENCODING_LEN + 1] = "ASCII";
+ static char lc_message_charset[ENCODING_LEN + 1] = "ASCII";
++int __EXPORT __mb_cur_max = 1;
+ #endif
+ static int lc_ctype_cjk_lang = 0;
+
+@@ -495,7 +500,7 @@
+ if (!strcmp (locale, "POSIX"))
+ strcpy (locale, "C");
+ if (!strcmp (locale, "C")) /* Default "C" locale */
+-#if 0 /*def __CYGWIN__ TODO: temporarily(?) disable C == UTF-8 */
++#ifdef __DEFAULT_UTF8__
+ strcpy (charset, "UTF-8");
+ #else
+ strcpy (charset, "ASCII");
+diff -Nbaur newlib-1.19.0/newlib/libc/misc/init.c newlib-1.19.0-arm/newlib/libc/misc/init.c
+--- newlib-1.19.0/newlib/libc/misc/init.c 2010-06-04 16:30:40.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/misc/init.c 2010-12-18 14:40:35.000000000 +0000
+@@ -40,4 +40,8 @@
+ for (i = 0; i < count; i++)
+ __init_array_start[i] ();
+ }
++#else
++
++#error why am I not defined
++
+ #endif
+diff -Nbaur newlib-1.19.0/newlib/libc/reent/gettimeofdayr.c newlib-1.19.0-arm/newlib/libc/reent/gettimeofdayr.c
+--- newlib-1.19.0/newlib/libc/reent/gettimeofdayr.c 2007-07-06 17:56:30.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/reent/gettimeofdayr.c 2010-12-18 14:40:35.000000000 +0000
+@@ -59,7 +59,7 @@
+ Check libc.a to see if its available on yours.
+ */
+
+-int
++/*int
+ _DEFUN (_gettimeofday_r, (ptr, ptimeval, ptimezone),
+ struct _reent *ptr _AND
+ struct timeval *ptimeval _AND
+@@ -72,5 +72,5 @@
+ ptr->_errno = errno;
+ return ret;
+ }
+-
++*/
+ #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
+diff -Nbaur newlib-1.19.0/newlib/libc/stdio/fopen.c newlib-1.19.0-arm/newlib/libc/stdio/fopen.c
+--- newlib-1.19.0/newlib/libc/stdio/fopen.c 2004-06-11 21:37:10.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/stdio/fopen.c 2010-12-18 14:40:35.000000000 +0000
+@@ -151,6 +151,9 @@
+
+ _flockfile (fp);
+
++ flags &= ~(__SLBF | __SNBF | __SMBF);
++ flags |= __SNBF;
++
+ fp->_file = f;
+ fp->_flags = flags;
+ fp->_cookie = (_PTR) fp;
+diff -Nbaur newlib-1.19.0/newlib/libc/stdio/fvwrite.c newlib-1.19.0-arm/newlib/libc/stdio/fvwrite.c
+--- newlib-1.19.0/newlib/libc/stdio/fvwrite.c 2007-07-13 21:37:53.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/stdio/fvwrite.c 2010-12-18 14:40:35.000000000 +0000
+@@ -98,7 +98,8 @@
+ do
+ {
+ GETIOV (;);
+- w = fp->_write (ptr, fp->_cookie, p, MIN (len, BUFSIZ));
++ //w = fp->_write (ptr, fp->_cookie, p, MIN (len, BUFSIZ));
++ w = fp->_write (ptr, fp->_cookie, p, len);
+ if (w <= 0)
+ goto err;
+ p += w;
+diff -Nbaur newlib-1.19.0/newlib/libc/stdlib/mbtowc_r.c newlib-1.19.0-arm/newlib/libc/stdlib/mbtowc_r.c
+--- newlib-1.19.0/newlib/libc/stdlib/mbtowc_r.c 2010-01-17 09:39:06.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/stdlib/mbtowc_r.c 2010-12-18 15:25:18.000000000 +0000
+@@ -9,7 +9,7 @@
+
+ int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t,
+ const char *, mbstate_t *)
+-#ifdef __CYGWIN__
++#ifdef __DEFAULT_UTF8__
+ /* Cygwin starts up in UTF-8 mode. */
+ = __utf8_mbtowc;
+ #else
+diff -Nbaur newlib-1.19.0/newlib/libc/stdlib/wctomb_r.c newlib-1.19.0-arm/newlib/libc/stdlib/wctomb_r.c
+--- newlib-1.19.0/newlib/libc/stdlib/wctomb_r.c 2010-01-17 09:39:06.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/stdlib/wctomb_r.c 2010-12-18 15:25:33.000000000 +0000
+@@ -8,7 +8,7 @@
+
+ int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset,
+ mbstate_t *)
+-#ifdef __CYGWIN__
++#ifdef __DEFAULT_UTF8__
+ /* Cygwin starts up in UTF-8 mode. */
+ = __utf8_wctomb;
+ #else
+diff -Nbaur newlib-1.19.0/newlib/libc/syscalls/Makefile.am newlib-1.19.0-arm/newlib/libc/syscalls/Makefile.am
+--- newlib-1.19.0/newlib/libc/syscalls/Makefile.am 2008-01-03 22:33:37.000000000 +0000
++++ newlib-1.19.0-arm/newlib/libc/syscalls/Makefile.am 2010-12-18 14:40:35.000000000 +0000
+@@ -20,8 +20,9 @@
+ sysstat.c \
+ systimes.c \
+ sysunlink.c \
+- syswrite.c
+-
++ syswrite.c \
++ sysftruncate.c \
++ systruncate.c
+
+ ## Weed out EL/IX level 3 interfaces if necessary
+ if ELIX_LEVEL_1
+diff -Nbaur newlib-1.19.0/newlib/libc/time/asctime_r.c newlib-1.19.0-arm/newlib/libc/time/asctime_r.c
+--- newlib-1.19.0/newlib/libc/time/asctime_r.c 2000-05-10 18:58:29.000000000 +0100
++++ newlib-1.19.0-arm/newlib/libc/time/asctime_r.c 2010-12-18 14:40:35.000000000 +0000
+@@ -18,7 +18,7 @@
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+
+- sprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
++ siprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
+ day_name[tim_p->tm_wday],
+ mon_name[tim_p->tm_mon],
+ tim_p->tm_mday, tim_p->tm_hour, tim_p->tm_min,