[rtems commit] Remove (Moved to git.rtems.org/data/git/rtems-crossrpms.git) .
Ralf Corsepius
ralf at rtems.org
Fri Feb 17 14:58:06 UTC 2012
Module: rtems
Branch: 4.10
Commit: b0e718521f81e7e130be4dfb4659200126aebb2b
Changeset: http://git.rtems.org/rtems/commit/?id=b0e718521f81e7e130be4dfb4659200126aebb2b
Author: Ralf Corsépius <ralf.corsepius at rtems.org>
Date: Fri Feb 17 15:56:24 2012 +0100
Remove (Moved to git.rtems.org/data/git/rtems-crossrpms.git).
---
contrib/crossrpms/AUTHORS | 9 -
contrib/crossrpms/COPYING | 340 -
contrib/crossrpms/ChangeLog | 138 -
contrib/crossrpms/Makefile.am | 21 -
contrib/crossrpms/NEWS | 19 -
contrib/crossrpms/README | 18 -
contrib/crossrpms/TODO | 22 -
contrib/crossrpms/acinclude.m4 | 20 -
contrib/crossrpms/autotools/Makefile.am | 13 -
contrib/crossrpms/autotools/autoconf-sources.add | 9 -
contrib/crossrpms/autotools/autoconf.add | 106 -
contrib/crossrpms/autotools/autoconf.am | 21 -
contrib/crossrpms/autotools/automake-sources.add | 2 -
contrib/crossrpms/autotools/automake.add | 86 -
contrib/crossrpms/autotools/automake.am | 21 -
.../crossrpms/autotools/rtems-4.10-autoconf.spec | 211 -
.../crossrpms/autotools/rtems-4.10-automake.spec | 183 -
contrib/crossrpms/autotools/target-autoconf.add | 23 -
contrib/crossrpms/autotools/target-automake.add | 27 -
contrib/crossrpms/binutils/base-binutils.add | 52 -
contrib/crossrpms/binutils/binutils.add | 40 -
contrib/crossrpms/binutils/build.add | 29 -
contrib/crossrpms/binutils/install.add | 53 -
contrib/crossrpms/binutils/prep.add | 8 -
contrib/crossrpms/binutils/rpm-install.add | 32 -
contrib/crossrpms/binutils/target-binutils.add | 31 -
contrib/crossrpms/bootstrap | 2 -
contrib/crossrpms/common/clean.add | 3 -
contrib/crossrpms/common/common.add | 49 -
contrib/crossrpms/configure.ac | 170 -
contrib/crossrpms/cpukit/build.add | 16 -
contrib/crossrpms/cpukit/cpukit.add | 24 -
contrib/crossrpms/cpukit/install.add | 11 -
contrib/crossrpms/cpukit/prep.add | 6 -
contrib/crossrpms/cpukit/rpm-install.add | 49 -
contrib/crossrpms/cpukit/target-cpukit.add | 9 -
contrib/crossrpms/gcc/base-gcc.add | 53 -
contrib/crossrpms/gcc/base-gcj.add | 55 -
contrib/crossrpms/gcc/base-gfortran.add | 38 -
contrib/crossrpms/gcc/base-gnat.add | 40 -
contrib/crossrpms/gcc/base-newlib.add | 41 -
contrib/crossrpms/gcc/build.add | 75 -
contrib/crossrpms/gcc/gccnewlib.add | 253 -
contrib/crossrpms/gcc/install.add | 153 -
contrib/crossrpms/gcc/prep.add | 88 -
contrib/crossrpms/gcc/rpm-install.add | 73 -
contrib/crossrpms/gcc/target-c++.add | 65 -
contrib/crossrpms/gcc/target-gcc.add | 84 -
contrib/crossrpms/gcc/target-gcj.add | 57 -
contrib/crossrpms/gcc/target-gfortran.add | 60 -
contrib/crossrpms/gcc/target-gnat.add | 42 -
contrib/crossrpms/gcc/target-newlib.add | 26 -
contrib/crossrpms/gcc/target-objc.add | 49 -
contrib/crossrpms/gdb/base-gdb.add | 43 -
contrib/crossrpms/gdb/build.add | 33 -
contrib/crossrpms/gdb/gdb.add | 90 -
contrib/crossrpms/gdb/install.add | 48 -
contrib/crossrpms/gdb/prep.add | 10 -
contrib/crossrpms/gdb/rpm-install.add | 32 -
contrib/crossrpms/gdb/target-gdb.add | 26 -
contrib/crossrpms/mkspec.am | 17 -
.../binutils-2.20.1-rtems4.10-20100310.diff | 24 -
.../binutils-2.20.1-rtems4.10-20100826.diff | 47 -
.../patches/gcc-core-4.4.6-rtems4.10-20110418.diff | 4570 ------
.../patches/gcc-core-4.4.6-rtems4.10-20110420.diff | 4928 ------
.../patches/gcc-core-4.4.6-rtems4.10-20110829.diff | 4958 ------
.../patches/gcc-g++-4.4.6-rtems4.10-20110829.diff | 104 -
.../patches/gdb-6.5-bfinrtems-20090122.diff |16252 --------------------
.../patches/gdb-7.1-rtems4.10-20100319.diff | 532 -
.../patches/gdb-7.1-rtems4.10-20100812.diff | 622 -
.../patches/gdb-7.2-rtems4.10-20100903.diff | 532 -
.../patches/gdb-7.3.1-rtems4.10-20110919.diff | 586 -
.../patches/newlib-1.18.0-rtems4.10-20110518.diff | 2904 ----
contrib/crossrpms/rtems4.10/Makefile.am | 17 -
contrib/crossrpms/rtems4.10/arm/Makefile.am | 27 -
.../crossrpms/rtems4.10/arm/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/arm/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/arm/gdb-sources.add | 9 -
.../arm/rtems-4.10-arm-rtems4.10-binutils.spec | 268 -
.../arm/rtems-4.10-arm-rtems4.10-gcc.spec | 874 --
.../arm/rtems-4.10-arm-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/avr/Makefile.am | 26 -
.../crossrpms/rtems4.10/avr/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/avr/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/avr/gdb-sources.add | 9 -
.../avr/rtems-4.10-avr-rtems4.10-binutils.spec | 268 -
.../avr/rtems-4.10-avr-rtems4.10-gcc.spec | 802 -
.../avr/rtems-4.10-avr-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/bfin/Makefile.am | 26 -
.../crossrpms/rtems4.10/bfin/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/bfin/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/bfin/gdb-sources.add | 13 -
.../bfin/rtems-4.10-bfin-rtems4.10-binutils.spec | 268 -
.../bfin/rtems-4.10-bfin-rtems4.10-gcc.spec | 874 --
.../bfin/rtems-4.10-bfin-rtems4.10-gdb.spec | 235 -
contrib/crossrpms/rtems4.10/binutils.am | 31 -
contrib/crossrpms/rtems4.10/gcc-prep.add | 2 -
contrib/crossrpms/rtems4.10/gcc.am | 47 -
contrib/crossrpms/rtems4.10/gdb.am | 31 -
contrib/crossrpms/rtems4.10/h8300/Makefile.am | 26 -
.../crossrpms/rtems4.10/h8300/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/h8300/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/h8300/gdb-sources.add | 9 -
.../h8300/rtems-4.10-h8300-rtems4.10-binutils.spec | 268 -
.../h8300/rtems-4.10-h8300-rtems4.10-gcc.spec | 874 --
.../h8300/rtems-4.10-h8300-rtems4.10-gdb.spec | 287 -
contrib/crossrpms/rtems4.10/i386/Makefile.am | 26 -
.../crossrpms/rtems4.10/i386/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/i386/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/i386/gdb-sources.add | 9 -
.../i386/rtems-4.10-i386-rtems4.10-binutils.spec | 268 -
.../i386/rtems-4.10-i386-rtems4.10-gcc.spec | 874 --
.../i386/rtems-4.10-i386-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/lm32/Makefile.am | 26 -
.../crossrpms/rtems4.10/lm32/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/lm32/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/lm32/gdb-sources.add | 9 -
.../lm32/rtems-4.10-lm32-rtems4.10-binutils.spec | 268 -
.../lm32/rtems-4.10-lm32-rtems4.10-gcc.spec | 874 --
.../lm32/rtems-4.10-lm32-rtems4.10-gdb.spec | 287 -
contrib/crossrpms/rtems4.10/m32c/Makefile.am | 26 -
.../crossrpms/rtems4.10/m32c/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/m32c/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/m32c/gdb-sources.add | 9 -
.../m32c/rtems-4.10-m32c-rtems4.10-binutils.spec | 268 -
.../m32c/rtems-4.10-m32c-rtems4.10-gcc.spec | 803 -
.../m32c/rtems-4.10-m32c-rtems4.10-gdb.spec | 287 -
contrib/crossrpms/rtems4.10/m32r/Makefile.am | 26 -
.../crossrpms/rtems4.10/m32r/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/m32r/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/m32r/gdb-sources.add | 9 -
.../m32r/rtems-4.10-m32r-rtems4.10-binutils.spec | 268 -
.../m32r/rtems-4.10-m32r-rtems4.10-gcc.spec | 803 -
.../m32r/rtems-4.10-m32r-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/m68k/Makefile.am | 26 -
.../crossrpms/rtems4.10/m68k/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/m68k/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/m68k/gdb-sources.add | 9 -
.../m68k/rtems-4.10-m68k-rtems4.10-binutils.spec | 268 -
.../m68k/rtems-4.10-m68k-rtems4.10-gcc.spec | 874 --
.../m68k/rtems-4.10-m68k-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/mips/Makefile.am | 26 -
.../crossrpms/rtems4.10/mips/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/mips/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/mips/gdb-sources.add | 9 -
.../mips/rtems-4.10-mips-rtems4.10-binutils.spec | 268 -
.../mips/rtems-4.10-mips-rtems4.10-gcc.spec | 874 --
.../mips/rtems-4.10-mips-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/mipstx39/Makefile.am | 12 -
.../crossrpms/rtems4.10/mipstx39/gdb-sources.add | 9 -
.../rtems-4.10-mipstx39-rtems4.10-gdb.spec | 287 -
contrib/crossrpms/rtems4.10/powerpc/Makefile.am | 26 -
.../rtems4.10/powerpc/binutils-sources.add | 2 -
.../crossrpms/rtems4.10/powerpc/gcc-sources.add | 41 -
.../crossrpms/rtems4.10/powerpc/gdb-sources.add | 9 -
.../rtems-4.10-powerpc-rtems4.10-binutils.spec | 268 -
.../powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec | 874 --
.../powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec | 288 -
contrib/crossrpms/rtems4.10/sh/Makefile.am | 26 -
.../crossrpms/rtems4.10/sh/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/sh/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/sh/gdb-sources.add | 9 -
.../sh/rtems-4.10-sh-rtems4.10-binutils.spec | 268 -
.../rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec | 874 --
.../rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec | 283 -
contrib/crossrpms/rtems4.10/sparc/Makefile.am | 26 -
.../crossrpms/rtems4.10/sparc/binutils-sources.add | 2 -
contrib/crossrpms/rtems4.10/sparc/gcc-sources.add | 41 -
contrib/crossrpms/rtems4.10/sparc/gdb-sources.add | 9 -
.../sparc/rtems-4.10-sparc-rtems4.10-binutils.spec | 268 -
.../sparc/rtems-4.10-sparc-rtems4.10-gcc.spec | 874 --
.../sparc/rtems-4.10-sparc-rtems4.10-gdb.spec | 287 -
contrib/crossrpms/specstrip | 251 -
173 files changed, 0 insertions(+), 59473 deletions(-)
diff --git a/contrib/crossrpms/AUTHORS b/contrib/crossrpms/AUTHORS
deleted file mode 100644
index db8ac59..0000000
--- a/contrib/crossrpms/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-Ralf Corsépius <ralf.corsepius at rtems.org>
-
-Chris Johns <chrisj at rtems.org>
- - Testing.
- - Bugfixes.
- - mingw32.
-
-Joel Sherrill <joel at oarcorp.com>
- - Testing.
diff --git a/contrib/crossrpms/COPYING b/contrib/crossrpms/COPYING
deleted file mode 100644
index 623b625..0000000
--- a/contrib/crossrpms/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/contrib/crossrpms/ChangeLog b/contrib/crossrpms/ChangeLog
deleted file mode 100644
index 05d2b08..0000000
--- a/contrib/crossrpms/ChangeLog
+++ /dev/null
@@ -1,138 +0,0 @@
-2011-02-02 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * configure.ac: Require autoconf-2.68, automake-1.11.1.
-
-2008-09-25 Joel Sherrill <joel.sherrill at oarcorp.com>
-
- * rtems4.10/sparc/Makefile.am: Bump RTEMS CPU Kit version.
- * patches/gcc-ada-4.3.2-rtems4.10-20080910.diff: New file.
- * patches/gcc-ada-4.2.0-rtems4.8-20070705.diff: Removed.
-
-2007-12-17 Chris Johns <chrisj at rtems.org>
-
- * rtems4.8/.cvsignore, rtems4.8/arm/.cvsignore,
- rtems4.8/avr/.cvsignore, rtems4.8/bfin/.cvsignore,
- rtems4.8/h8300/.cvsignore, rtems4.8/i386/.cvsignore,
- rtems4.8/m68k/.cvsignore, rtems4.8/mips/.cvsignore,
- rtems4.8/mipstx39/.cvsignore, rtems4.8/powerpc/.cvsignore,
- rtems4.8/sh/.cvsignore, rtems4.8/sparc/.cvsignore,
- rtems4.8/tic4x/.cvsignore: New.
-
-2006-12-02 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * configure.ac: New BUG-REPORT address.
-
-2006-11-19 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * autotools/Makefile.am, autotools/autoconf.add:
- Upgrade to autoconf-2.61.
-
-2006-11-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * patches/gcc-core-4.2-20061114-rtems4.8-20061115.diff: New.
- * patches/newlib-1.14.0-bfinrtems-20060810a.diff: Remove (Obsolete).
- * patches/gcc-4.1.1-bfinrtems-20060810a.diff: Remove (Obsolete).
- * rtems-4.8/bfin/Makefile.am, rtems-4.8/bin/gcc-sources.add:
- GCC_REL=4. Upgrade to gcc-core-4.2-20061114-rtems4.8-20061115.diff.
-
-2006-10-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * configure.ac, Makefile.am: Remove rtems4.7.
- * rtems4.7: Remove (Development now in rtems-4-7-branch only).
-
-2006-10-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * patches/newlib-1.14.0-rtems4.8-20061027.diff: New.
- * patches/newlib-1.14.0-rtems-20061026.diff: Remove (broken).
-
-2006-10-26 Joel Sherrill <joel at OARcorp.com>
-
- * patches/newlib-1.14.0-rtems-20061026.diff: New file.
-
-2006-10-22 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * Makefile.am, configure.ac: Add rtems-4.8.
-
-2006-10-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * configure.ac: Set RTEMS_API to 4.8.
-
-2006-10-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * autotools/Makefile.am, autotools/automake.add: Update to
- automake-1.10.
-
-2006-08-23 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * rtems4.7/arm/gcc-sources.add, rtems4.7/h8300/gcc-sources.add,
- rtems4.7/i386/gcc-sources.add, rtems4.7/m68k/gcc-sources.add,
- rtems4.7/mips/gcc-sources.add, rtems4.7/powerpc/gcc-sources.add
- rtems4.7/sh/gcc-sources.add, rtems4.7/sparc/gcc-sources.add
- rtems4.7/tic4x/gcc-sources.add: Add gcc-4.0.3.
-
-2006-08-23 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * gcc/build.add: Revert --disable-libssp etc. hacks.
-
-2006-08-22 Chris Johns <chrisj at rtems.org>
-
- * rtems4.7/avr/gcc-sources.add: Add the 4.0.3 patch.
- * patches/gcc-core-4.0.3-rtems-20060822.diff:
- The .exe for the versioned execuable for MinGW.
-
-2006-08-21 Joel Sherrill <joel at OARcorp.com>
-
- * rtems4.7/h8300/binutils-sources.add,
- rtems4.7/m68k/binutils-sources.add: Add h8300 _tinydata patch and
- bump patch for targets needing it.
- * patches/binutils-2.17-rtems-20060815.diff: New file.
-
-2006-08-11 Joel Sherrill <joel at oarcorp.com>
-
- * configure.ac, gcc/build.add, gcc/target-gcc.add: Add bfin target
- prior to merge. Add ability to disable libssp and libstdcxx-pch which
- apparently are required to build the Blackfin port.
- * patches/binutils-2.17-rtems-bfin-20060810.diff,
- patches/gcc-4.1.1-bfinrtems-20060810a.diff,
- patches/gdb-6.5-bfinrtems-20060810a.diff,
- patches/newlib-1.14.0-bfinrtems-20060810a.diff,
- rtems4.7/bfin/.cvsignore, rtems4.7/bfin/Makefile.am,
- rtems4.7/bfin/binutils-sources.add, rtems4.7/bfin/gcc-sources.add,
- rtems4.7/bfin/gdb-sources.add: New files.
-
-2006-08-09 Joel Sherrill <joel at OARcorp.com>
-
- * .cvsignore: Add INSTALL.
-
-2006-07-19 Chris Johns <chrisj at rtems.org>
-
- * patches/gcc-core-4.1.1-rtems-20060720.diff:
- Added patch to fix GCC bug PR28400.
-
-2006-07-13 Joel Sherrill <joel at oarcorp.com>
-
- * configure.ac, rtems4.7/Makefile.am, rtems4.7/arm/Makefile.am,
- rtems4.7/arm/gdb-sources.add, rtems4.7/avr/Makefile.am,
- rtems4.7/avr/gdb-sources.add, rtems4.7/h8300/Makefile.am,
- rtems4.7/h8300/gdb-sources.add, rtems4.7/i386/Makefile.am,
- rtems4.7/i386/gdb-sources.add, rtems4.7/m68k/Makefile.am,
- rtems4.7/m68k/gdb-sources.add, rtems4.7/mips/Makefile.am,
- rtems4.7/mips/gdb-sources.add, rtems4.7/powerpc/Makefile.am,
- rtems4.7/powerpc/gdb-sources.add, rtems4.7/sh/Makefile.am,
- rtems4.7/sh/gdb-sources.add, rtems4.7/sparc/Makefile.am,
- rtems4.7/sparc/gdb-sources.add, rtems4.7/tic4x/gdb-sources.add:
- Updated to gdb 6.5
- * patches/gdb-6.5-rtems-20060713.diff, rtems4.7/mipstx39/.cvsignore,
- rtems4.7/mipstx39/Makefile.am, rtems4.7/mipstx39/gdb-sources.add: New files.
-
-2006-07-12 Joel Sherrill <joel at oarcorp.com>
-
- * rtems4.7/arm/gdb-sources.add, rtems4.7/avr/gdb-sources.add,
- rtems4.7/h8300/gdb-sources.add, rtems4.7/i386/gdb-sources.add,
- rtems4.7/m68k/gdb-sources.add, rtems4.7/mips/gdb-sources.add,
- rtems4.7/powerpc/gdb-sources.add, rtems4.7/sh/gdb-sources.add,
- rtems4.7/sparc/gdb-sources.add, rtems4.7/tic4x/gdb-sources.add:
- Update gdb to use newer patch. This lets sparc build simulator and
- mips build at all.
- * patches/gdb-6.4-rtems-20060712.diff: New file.
-
diff --git a/contrib/crossrpms/Makefile.am b/contrib/crossrpms/Makefile.am
deleted file mode 100644
index 4d4767a..0000000
--- a/contrib/crossrpms/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-##
-## $Id$
-##
-
-EXTRA_DIST =
-
-SUBDIRS = @HOST_SUBDIRS@ @TARGET_SUBDIRS@
-
-DIST_SUBDIRS =
-DIST_SUBDIRS += rtems4.10
-DIST_SUBDIRS += autotools
-
-EXTRA_DIST += specstrip
-EXTRA_DIST += $(srcdir)/patches/*.diff
-
-install-patches:
- @rpmsourcedir=`rpm --eval '%_sourcedir'`; \
- for f in $(srcdir)/patches/*.diff; do \
- echo "$(INSTALL_DATA) $$f $$rpmsourcedir"; \
- $(INSTALL_DATA) $$f $$rpmsourcedir; \
- done
diff --git a/contrib/crossrpms/NEWS b/contrib/crossrpms/NEWS
deleted file mode 100644
index 4ddc981..0000000
--- a/contrib/crossrpms/NEWS
+++ /dev/null
@@ -1,19 +0,0 @@
-2006-07-24 Add provisory/preliminary autotools support.
-
-2006-07-23 Rename "*-base-*" packages into <tool>-common.
- Rename GCC's "*-<lang>" packages into "*-gcc-<lang>".
- Many small directory ownership fixes.
- Build all GCC packages with --enable-threads.
-
-2006-07-10 Completely reworked and restructurized.
-
-2006-03-10 Add preliminary rtems-gdb specs.
- (Immature, incomplete, needs further testing).
-
-2006-03-09 Add fortran and objc to GCC's default languages for freebsd5.2,
- freebsd6.0 and solaris.
-
-2006-03-02 Pass --enable-sysroot to non-rtems binutils (Required by
- GCC-4.1 sys-root'ed toolchains).
-
-2006-02-25 Put this package under the GPL.
diff --git a/contrib/crossrpms/README b/contrib/crossrpms/README
deleted file mode 100644
index 3235b73..0000000
--- a/contrib/crossrpms/README
+++ /dev/null
@@ -1,18 +0,0 @@
-
- Copyright (C) 2006 Ralf Corsépius, Ulm, Germany <ralf.corsepius at rtems.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
diff --git a/contrib/crossrpms/TODO b/contrib/crossrpms/TODO
deleted file mode 100644
index d2748bd..0000000
--- a/contrib/crossrpms/TODO
+++ /dev/null
@@ -1,22 +0,0 @@
-* Improve autotools support:
-- Problem: The autotools packages conflict with OS provided packages
- for --prefix=/usr.
-
-* Improve info files treatment:
-- Problem: Infos are not target canonicalized. Therefore, installing them to
- /usr or /usr/local is likely to conflict with vendor provided infos rsp.
- locally installed packages. Additionally, installing to /usr/local is
- completely out of our control.
-- Current approach: Install infos/provide base packages only for
- $prefix ==/opt/rtems* or if user is forcing them with --enable-infos
-- Consider to canonicalize the infos (How?). Probably better be done by
- upstream.
-
-* Ada:
-- Consider to remove it (Lack of multilibs renders it unusable for rtems
- toolchains).
-- Consider to add support for non-multilib'ed toolchains.
-
-* gcc/build.add: Use --languages=fortran instead of f95 for gcc >= 4.1
- (--languages=f95 is deprecated in gcc >= 4.1)
-
diff --git a/contrib/crossrpms/acinclude.m4 b/contrib/crossrpms/acinclude.m4
deleted file mode 100644
index 28ad8d5..0000000
--- a/contrib/crossrpms/acinclude.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-# RTEMS_CANONICAL_SPLIT(THING)
-# --------------------------
-# Generate the variables THING, THING_{alias cpu vendor os}.
-m4_define([RTEMS_CANONICAL_SPLIT],
-[case $ac_cv_$1 in
-*-*-*) ;;
-*) AC_MSG_ERROR([invalid value of canonical $1]);;
-esac
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_$1
-shift
-$1_cpu=$[1]
-$1_vendor=$[2]
-shift; shift
-[# Remember, the first character of IFS is used to create $]*,
-# except with old shells:
-$1_os=$[*]
-IFS=$ac_save_IFS
-case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
-])# RTEMS_CANONICAL_SPLIT
diff --git a/contrib/crossrpms/autotools/Makefile.am b/contrib/crossrpms/autotools/Makefile.am
deleted file mode 100644
index aae837c..0000000
--- a/contrib/crossrpms/autotools/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-##
-## $Id$
-##
-
-include $(top_srcdir)/mkspec.am
-
-AUTOCONF_VERS = 2.68
-AUTOCONF_RPMREL = 2
-include ./autoconf.am
-
-AUTOMAKE_VERS = 1.11.1
-AUTOMAKE_RPMREL = 2
-include ./automake.am
diff --git a/contrib/crossrpms/autotools/autoconf-sources.add b/contrib/crossrpms/autotools/autoconf-sources.add
deleted file mode 100644
index cf9c28f..0000000
--- a/contrib/crossrpms/autotools/autoconf-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{srcvers}.tar.bz2
-%if "%{srcvers}" == "2.66"
-# Fedora's patch to fix
-# http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
-# http://lists.gnu.org/archive/html/bug-autoconf/2010-07/msg00012.html
-Patch0: autoconf-2.66-611661.diff
-%endif
-
-
diff --git a/contrib/crossrpms/autotools/autoconf.add b/contrib/crossrpms/autotools/autoconf.add
deleted file mode 100644
index 80a97b4..0000000
--- a/contrib/crossrpms/autotools/autoconf.add
+++ /dev/null
@@ -1,106 +0,0 @@
-%define srcvers @AUTOCONF_VERS@
-%define rpmvers %{expand:%(echo "@AUTOCONF_VERS@" | tr - _ )}
-
-%if "%{_prefix}" != "/usr"
-%define name @rpmprefix at autoconf
-%else
-%define name autoconf
-%endif
-
-# --with alltests enable all tests
-%bcond_with alltests
-
-Name: %{name}
-License: GPL
-URL: http://www.gnu.org/software/autoconf
-Group: Development/Tools
-Version: %{rpmvers}
-Release: @AUTOCONF_RPMREL@
-Summary: Tool for automatically generating GNU style Makefile.in's
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires: perl m4 gawk emacs
-%if "%{version}" >= "2.62"
-BuildRequires: m4 >= 1.4.5
-%endif
-Requires: m4 gawk
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
- at SOURCES@
-
-%description
-GNU's Autoconf is a tool for configuring source code and Makefiles.
-Using Autoconf, programmers can create portable and configurable
-packages, since the person building the package is allowed to
-specify various configuration options.
-You should install Autoconf if you are developing software and you'd
-like to use it to create shell scripts which will configure your
-source code packages.
-Note that the Autoconf package is not required for the end user who
-may be configuring software with an Autoconf-generated script;
-Autoconf is only required for the generation of the scripts, not
-their use.
-
-%prep
-%setup -q -n autoconf-%{srcvers}
-%{?PATCH0:%patch0 -p1}
-
-# Work around rpm inserting bogus perl-module deps
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
- sed -e '/^perl(Autom4te/d'
-EOF
-%define __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov
-chmod +x %{__perl_provides}
-
-cat << \EOF > %{name}-requ
-#!/bin/sh
-%{__perl_requires} $* |\
- sed -e '/^perl(Autom4te/d'
-EOF
-%define __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ
-chmod +x %{__perl_requires}
-
-%build
-./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
- --bindir=%{_bindir} --datadir=%{_datadir}
-make
-
-%check
-%if "%{_build}" == "%{_host}"
-%if "%{srcvers}" <= "2.66"
-# test 193 fails sporadically
-# test 199 fails deterministically
-TESTSUITEFLAGS='-192 194-198 200-'
-%endif
-
-%if "%{srcvers}" == "2.67"
-# test 199 fails deterministically
-TESTSUITEFLAGS='-198 200-'
-%endif
-
-%if "%{srcvers}" == "2.68"
-# test 205 fails deterministically
-TESTSUITEFLAGS='-204 206-'
-%endif
-
-make check %{!?with_alltests:TESTSUITEFLAGS="${TESTSUITEFLAGS}"}
-%endif
-
-%install
-rm -rf "${RPM_BUILD_ROOT}"
-make DESTDIR=${RPM_BUILD_ROOT} install
-
-# Create this directory to prevent the corresponding line
-# in %%files below to fail
-mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp
-
-# RTEMS's standards.info comes from binutils
-rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*
-
-rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-touch $RPM_BUILD_ROOT%{_infodir}/dir
-
diff --git a/contrib/crossrpms/autotools/autoconf.am b/contrib/crossrpms/autotools/autoconf.am
deleted file mode 100644
index 8e0d714..0000000
--- a/contrib/crossrpms/autotools/autoconf.am
+++ /dev/null
@@ -1,21 +0,0 @@
-AUTOCONF_SUBPACKAGES = $(top_srcdir)/common/common.add
-AUTOCONF_SUBPACKAGES += $(top_srcdir)/autotools/autoconf.add
-AUTOCONF_SUBPACKAGES += $(top_srcdir)/binutils/rpm-install.add
-AUTOCONF_SUBPACKAGES += $(top_srcdir)/common/clean.add
-AUTOCONF_SUBPACKAGES += $(top_srcdir)/autotools/target-autoconf.add
-
-autoconf.spec.in: $(AUTOCONF_SUBPACKAGES) Makefile.in $(srcdir)/autoconf-sources.add
- cat $(AUTOCONF_SUBPACKAGES) | sed \
- -e "/[@]SOURCES[@]/r $(srcdir)/autoconf-sources.add" \
- -e "/[@]SOURCES[@]/d" \
- -e "s/[@]AUTOCONF_VERS[@]/$(AUTOCONF_VERS)/" \
- -e "s/[@]AUTOCONF_RPMREL[@]/$(AUTOCONF_RPMREL)%{?dist}/" > $@
-CLEANFILES += autoconf.spec.in
-
-
- at rpmprefix@autoconf.spec: autoconf.spec.in
- $(MKSPEC) autoconf.spec.in | $(SPECSTRIP) > $@
-CLEANFILES += @rpmprefix at autoconf.spec
-noinst_DATA += @rpmprefix at autoconf.spec
-
-EXTRA_DIST += $(AUTOCONF_SUBPACKAGES)
diff --git a/contrib/crossrpms/autotools/automake-sources.add b/contrib/crossrpms/autotools/automake-sources.add
deleted file mode 100644
index 6172f70..0000000
--- a/contrib/crossrpms/autotools/automake-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{srcvers}.tar.bz2
-
diff --git a/contrib/crossrpms/autotools/automake.add b/contrib/crossrpms/autotools/automake.add
deleted file mode 100644
index 44c4a2a..0000000
--- a/contrib/crossrpms/autotools/automake.add
+++ /dev/null
@@ -1,86 +0,0 @@
-%define rpmvers @AUTOMAKE_VERS@
-%define srcvers @AUTOMAKE_VERS@
-%define amvers 1.11
-
-%if "%{_prefix}" != "/usr"
-%define name @rpmprefix at automake
-%define requirements @rpmprefix at autoconf >= 2.61
-%else
-%define name automake
-%define requirements autoconf >= 2.61
-%endif
-
-Name: %{name}
-URL: http://sources.redhat.com/automake
-License: GPL
-Group: Development/Tools
-Version: %{rpmvers}
-Release: @AUTOMAKE_RPMREL@
-Summary: Tool for automatically generating GNU style Makefile.in's
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires: %{requirements} perl
-Requires: %{requirements}
-Requires(post): /sbin/install-info
-Requires(preun):/sbin/install-info
-
- at SOURCES@
-
-%description
-Automake is a tool for automatically generating "Makefile.in"s from
-files called "Makefile.am". "Makefile.am" is basically a series of
-"make" macro definitions (with rules being thrown in occasionally).
-The generated "Makefile.in"s are compatible to the GNU Makefile
-standards.
-
-%prep
-%setup -q -n automake-%{srcvers}
-%{?PATCH0:%patch0 -p1}
-
-# Work around rpm inserting bogus perl-module deps
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
- sed -e '/^perl(Automake/d'
-EOF
-%define __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
-chmod +x %{__perl_provides}
-
-cat << \EOF > %{name}-requ
-#!/bin/sh
-%{__perl_requires} $* |\
- sed -e '/^perl(Automake/d'
-EOF
-%define __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
-chmod +x %{__perl_requires}
-
-
-%build
-PATH=%{_bindir}:$PATH
-case %_host in
-*-mingw32)
-# MinGW ships obsolete perl-5.6.1, which doesn't support threads
- echo am_cv_prog_PERL_ithreads=no > config.cache
- ;;
-esac
-
-# Don't use %%configure, it replaces config.sub/config.guess with the
-# outdated versions bundled with rpm.
-./configure -C --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
- --bindir=%{_bindir} --datadir=%{_datadir} \
- --docdir=%{_datadir}/automake-%{amvers}/doc
-make
-
-%install
-rm -rf "$RPM_BUILD_ROOT"
-make DESTDIR=${RPM_BUILD_ROOT} install
-
-%if "%{_prefix}" != "/usr"
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/aclocal
-echo "/usr/share/aclocal" > $RPM_BUILD_ROOT%{_datadir}/aclocal/dirlist
-%endif
-
-rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-touch $RPM_BUILD_ROOT%{_infodir}/dir
-
diff --git a/contrib/crossrpms/autotools/automake.am b/contrib/crossrpms/autotools/automake.am
deleted file mode 100644
index 87c0567..0000000
--- a/contrib/crossrpms/autotools/automake.am
+++ /dev/null
@@ -1,21 +0,0 @@
-AUTOMAKE_SUBPACKAGES = $(top_srcdir)/common/common.add
-AUTOMAKE_SUBPACKAGES += $(top_srcdir)/autotools/automake.add
-AUTOMAKE_SUBPACKAGES += $(top_srcdir)/binutils/rpm-install.add
-AUTOMAKE_SUBPACKAGES += $(top_srcdir)/common/clean.add
-AUTOMAKE_SUBPACKAGES += $(top_srcdir)/autotools/target-automake.add
-
-automake.spec.in: $(AUTOMAKE_SUBPACKAGES) Makefile.am $(srcdir)/automake-sources.add
- cat $(AUTOMAKE_SUBPACKAGES) | sed \
- -e "/[@]SOURCES[@]/r $(srcdir)/automake-sources.add" \
- -e "/[@]SOURCES[@]/d" \
- -e "s/[@]AUTOMAKE_VERS[@]/$(AUTOMAKE_VERS)/g" \
- -e "s/[@]AUTOMAKE_RPMREL[@]/$(AUTOMAKE_RPMREL)%{?dist}/g" > $@
-CLEANFILES += automake.spec.in
-
-
- at rpmprefix@automake.spec: automake.spec.in
- $(MKSPEC) automake.spec.in | $(SPECSTRIP) > $@
-CLEANFILES += @rpmprefix at automake.spec
-noinst_DATA += @rpmprefix at automake.spec
-
-EXTRA_DIST += $(AUTOMAKE_SUBPACKAGES)
diff --git a/contrib/crossrpms/autotools/rtems-4.10-autoconf.spec b/contrib/crossrpms/autotools/rtems-4.10-autoconf.spec
deleted file mode 100644
index 9d6d6a0..0000000
--- a/contrib/crossrpms/autotools/rtems-4.10-autoconf.spec
+++ /dev/null
@@ -1,211 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define srcvers 2.68
-%define rpmvers %{expand:%(echo "2.68" | tr - _ )}
-
-%define name rtems-4.10-autoconf
-
-# --with alltests enable all tests
-%bcond_with alltests
-
-Name: %{name}
-License: GPL
-URL: http://www.gnu.org/software/autoconf
-Group: Development/Tools
-Version: %{rpmvers}
-Release: 2%{?dist}
-Summary: Tool for automatically generating GNU style Makefile.in's
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires: perl m4 gawk emacs
-%if "%{version}" >= "2.62"
-BuildRequires: m4 >= 1.4.5
-%endif
-Requires: m4 gawk
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{srcvers}.tar.bz2
-%if "%{srcvers}" == "2.66"
-# Fedora's patch to fix
-# http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
-# http://lists.gnu.org/archive/html/bug-autoconf/2010-07/msg00012.html
-Patch0: autoconf-2.66-611661.diff
-%endif
-
-
-
-%description
-GNU's Autoconf is a tool for configuring source code and Makefiles.
-Using Autoconf, programmers can create portable and configurable
-packages, since the person building the package is allowed to
-specify various configuration options.
-You should install Autoconf if you are developing software and you'd
-like to use it to create shell scripts which will configure your
-source code packages.
-Note that the Autoconf package is not required for the end user who
-may be configuring software with an Autoconf-generated script;
-Autoconf is only required for the generation of the scripts, not
-their use.
-
-%prep
-%setup -q -n autoconf-%{srcvers}
-%{?PATCH0:%patch0 -p1}
-
-# Work around rpm inserting bogus perl-module deps
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
- sed -e '/^perl(Autom4te/d'
-EOF
-%define __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov
-chmod +x %{__perl_provides}
-
-cat << \EOF > %{name}-requ
-#!/bin/sh
-%{__perl_requires} $* |\
- sed -e '/^perl(Autom4te/d'
-EOF
-%define __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ
-chmod +x %{__perl_requires}
-
-%build
-./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
- --bindir=%{_bindir} --datadir=%{_datadir}
-make
-
-%check
-%if "%{_build}" == "%{_host}"
-%if "%{srcvers}" <= "2.66"
-# test 193 fails sporadically
-# test 199 fails deterministically
-TESTSUITEFLAGS='-192 194-198 200-'
-%endif
-
-%if "%{srcvers}" == "2.67"
-# test 199 fails deterministically
-TESTSUITEFLAGS='-198 200-'
-%endif
-
-%if "%{srcvers}" == "2.68"
-# test 205 fails deterministically
-TESTSUITEFLAGS='-204 206-'
-%endif
-
-make check %{!?with_alltests:TESTSUITEFLAGS="${TESTSUITEFLAGS}"}
-%endif
-
-%install
-rm -rf "${RPM_BUILD_ROOT}"
-make DESTDIR=${RPM_BUILD_ROOT} install
-
-# Create this directory to prevent the corresponding line
-# in %%files below to fail
-mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp
-
-# RTEMS's standards.info comes from binutils
-rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*
-
-rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
-
-%preun
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
-fi
-
-%files
-%defattr(-,root,root)
-# %doc AUTHORS COPYING ChangeLog NEWS README THANKS
-%dir %{_bindir}
-%{_bindir}/*
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-
-%{_infodir}/autoconf.info*
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/*
-%dir %{_datadir}
-%{_datadir}/autoconf
-%exclude %{_datadir}/emacs/site-lisp
diff --git a/contrib/crossrpms/autotools/rtems-4.10-automake.spec b/contrib/crossrpms/autotools/rtems-4.10-automake.spec
deleted file mode 100644
index 24ac67e..0000000
--- a/contrib/crossrpms/autotools/rtems-4.10-automake.spec
+++ /dev/null
@@ -1,183 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define rpmvers 1.11.1
-%define srcvers 1.11.1
-%define amvers 1.11
-
-%define name rtems-4.10-automake
-%define requirements rtems-4.10-autoconf >= 2.61
-
-Name: %{name}
-URL: http://sources.redhat.com/automake
-License: GPL
-Group: Development/Tools
-Version: %{rpmvers}
-Release: 2%{?dist}
-Summary: Tool for automatically generating GNU style Makefile.in's
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires: %{requirements} perl
-Requires: %{requirements}
-Requires(post): /sbin/install-info
-Requires(preun):/sbin/install-info
-
-Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{srcvers}.tar.bz2
-
-
-%description
-Automake is a tool for automatically generating "Makefile.in"s from
-files called "Makefile.am". "Makefile.am" is basically a series of
-"make" macro definitions (with rules being thrown in occasionally).
-The generated "Makefile.in"s are compatible to the GNU Makefile
-standards.
-
-%prep
-%setup -q -n automake-%{srcvers}
-%{?PATCH0:%patch0 -p1}
-
-# Work around rpm inserting bogus perl-module deps
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
- sed -e '/^perl(Automake/d'
-EOF
-%define __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
-chmod +x %{__perl_provides}
-
-cat << \EOF > %{name}-requ
-#!/bin/sh
-%{__perl_requires} $* |\
- sed -e '/^perl(Automake/d'
-EOF
-%define __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
-chmod +x %{__perl_requires}
-
-
-%build
-PATH=%{_bindir}:$PATH
-case %_host in
-*-mingw32)
-# MinGW ships obsolete perl-5.6.1, which doesn't support threads
- echo am_cv_prog_PERL_ithreads=no > config.cache
- ;;
-esac
-
-# Don't use %%configure, it replaces config.sub/config.guess with the
-# outdated versions bundled with rpm.
-./configure -C --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
- --bindir=%{_bindir} --datadir=%{_datadir} \
- --docdir=%{_datadir}/automake-%{amvers}/doc
-make
-
-%install
-rm -rf "$RPM_BUILD_ROOT"
-make DESTDIR=${RPM_BUILD_ROOT} install
-
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/aclocal
-echo "/usr/share/aclocal" > $RPM_BUILD_ROOT%{_datadir}/aclocal/dirlist
-
-rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
-
-%preun
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
-fi
-
-%files
-%defattr(-,root,root)
-%doc AUTHORS COPYING ChangeLog NEWS README THANKS
-%dir %{_bindir}
-%{_bindir}/aclocal*
-%{_bindir}/automake*
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/automake.info*.gz
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/*
-%dir %{_datadir}
-%{_datadir}/aclocal
-%{_datadir}/aclocal-%{amvers}
-%{_datadir}/automake-%{amvers}
-
diff --git a/contrib/crossrpms/autotools/target-autoconf.add b/contrib/crossrpms/autotools/target-autoconf.add
deleted file mode 100644
index e8d8508..0000000
--- a/contrib/crossrpms/autotools/target-autoconf.add
+++ /dev/null
@@ -1,23 +0,0 @@
-%post
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
-
-%preun
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
-fi
-
-%files
-%defattr(-,root,root)
-# %doc AUTHORS COPYING ChangeLog NEWS README THANKS
-%sysdir %{_bindir}
-%{_bindir}/*
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-
-%{_infodir}/autoconf.info*
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/*
-%sysdir %{_datadir}
-%{_datadir}/autoconf
-%exclude %{_datadir}/emacs/site-lisp
diff --git a/contrib/crossrpms/autotools/target-automake.add b/contrib/crossrpms/autotools/target-automake.add
deleted file mode 100644
index 4658da4..0000000
--- a/contrib/crossrpms/autotools/target-automake.add
+++ /dev/null
@@ -1,27 +0,0 @@
-%post
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
-
-%preun
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
-fi
-
-%files
-%defattr(-,root,root)
-%doc AUTHORS COPYING ChangeLog NEWS README THANKS
-%sysdir %{_bindir}
-%{_bindir}/aclocal*
-%{_bindir}/automake*
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/automake.info*.gz
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/*
-%sysdir %{_datadir}
-%if "%{_prefix}" != "/usr"
-%{_datadir}/aclocal
-%endif
-%{_datadir}/aclocal-%{amvers}
-%{_datadir}/automake-%{amvers}
-
diff --git a/contrib/crossrpms/binutils/base-binutils.add b/contrib/crossrpms/binutils/base-binutils.add
deleted file mode 100644
index 9507c0b..0000000
--- a/contrib/crossrpms/binutils/base-binutils.add
+++ /dev/null
@@ -1,52 +0,0 @@
-%if %build_infos
-# ==============================================================
-# @rpmprefix at binutils-common
-# ==============================================================
-%package -n @rpmprefix at binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n @rpmprefix at binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n @rpmprefix at binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n @rpmprefix at binutils-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%sysdir %{_prefix}/share
-%sysdir %{_prefix}/share/locale
-%endif
-
diff --git a/contrib/crossrpms/binutils/binutils.add b/contrib/crossrpms/binutils/binutils.add
deleted file mode 100644
index f1ca500..0000000
--- a/contrib/crossrpms/binutils/binutils.add
+++ /dev/null
@@ -1,40 +0,0 @@
-%define binutils_pkgvers @BINUTILS_PKGVERS@
-%define binutils_version @BINUTILS_VERS@
-%define binutils_rpmvers %{expand:%(echo "@BINUTILS_VERS@" | tr - _ )}
-
-Name: @rpmprefix@@tool_target at -binutils
-Summary: Binutils for target @tool_target@
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: @BINUTILS_RPMREL@
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-%if %build_infos
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%else
-%if "@tool_target@" == "i686-pc-cygwin"
-BuildRequires: texinfo >= 4.2
-%endif
-%endif
-%endif
-BuildRequires: flex
-BuildRequires: bison
-%if %build_infos
-
-Requires: @rpmprefix at binutils-common
-%endif
-
- at SOURCES@
-
-%description
-Cross binutils for target @tool_target@
diff --git a/contrib/crossrpms/binutils/build.add b/contrib/crossrpms/binutils/build.add
deleted file mode 100644
index 16cb5bb..0000000
--- a/contrib/crossrpms/binutils/build.add
+++ /dev/null
@@ -1,29 +0,0 @@
-%build
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=@tool_target@ \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --with-sysroot=%{_prefix}/@tool_target@/sys-root \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
-%if %build_infos
- make info
-%endif
- cd ..
-
diff --git a/contrib/crossrpms/binutils/install.add b/contrib/crossrpms/binutils/install.add
deleted file mode 100644
index d31d839..0000000
--- a/contrib/crossrpms/binutils/install.add
+++ /dev/null
@@ -1,53 +0,0 @@
-%install
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
-%if %build_infos
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-%endif
-
-%if %build_infos
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-%else
-# Conflict with a native binutils' infos
- rm -rf $RPM_BUILD_ROOT%{_infodir}
-%endif
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/@tool_target at -dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/@tool_target at -dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/@tool_target at -nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/@tool_target at -nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/@tool_target at -windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/@tool_target at -windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/@tool_target at -windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/@tool_target at -windmc*
- fi
-
- cd ..
-
diff --git a/contrib/crossrpms/binutils/prep.add b/contrib/crossrpms/binutils/prep.add
deleted file mode 100644
index 3f2f719..0000000
--- a/contrib/crossrpms/binutils/prep.add
+++ /dev/null
@@ -1,8 +0,0 @@
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
diff --git a/contrib/crossrpms/binutils/rpm-install.add b/contrib/crossrpms/binutils/rpm-install.add
deleted file mode 100644
index 07efd8f..0000000
--- a/contrib/crossrpms/binutils/rpm-install.add
+++ /dev/null
@@ -1,32 +0,0 @@
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-%if "%{_prefix}" != "/usr"
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-%endif
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-%if "%{_prefix}" != "/usr"
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-%endif
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
diff --git a/contrib/crossrpms/binutils/target-binutils.add b/contrib/crossrpms/binutils/target-binutils.add
deleted file mode 100644
index 4ffce14..0000000
--- a/contrib/crossrpms/binutils/target-binutils.add
+++ /dev/null
@@ -1,31 +0,0 @@
-# ==============================================================
-# @tool_target at -binutils
-# ==============================================================
-# %package -n @rpmprefix@@tool_target at -binutils
-# Summary: rtems binutils for @tool_target@
-# Group: Development/Tools
-# %if %build_infos
-# Requires: @rpmprefix at binutils-common
-# %endif
-
-%description -n @rpmprefix@@tool_target at -binutils
-GNU binutils targetting @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -binutils
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_datarootdir}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -*.1*
-
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -*
-
-%dir %{_exec_prefix}/@tool_target@
-%dir %{_exec_prefix}/@tool_target@/bin
-%{_exec_prefix}/@tool_target@/bin/*
-
-%dir %{_exec_prefix}/@tool_target@/lib
-%{_exec_prefix}/@tool_target@/lib/ldscripts
diff --git a/contrib/crossrpms/bootstrap b/contrib/crossrpms/bootstrap
deleted file mode 100755
index 378696c..0000000
--- a/contrib/crossrpms/bootstrap
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-autoreconf -fis
diff --git a/contrib/crossrpms/common/clean.add b/contrib/crossrpms/common/clean.add
deleted file mode 100644
index 4765590..0000000
--- a/contrib/crossrpms/common/clean.add
+++ /dev/null
@@ -1,3 +0,0 @@
-%clean
- rm -rf $RPM_BUILD_ROOT
-
diff --git a/contrib/crossrpms/common/common.add b/contrib/crossrpms/common/common.add
deleted file mode 100644
index e354c73..0000000
--- a/contrib/crossrpms/common/common.add
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%if "%{_prefix}" != "/usr"
-%define _prefix @_prefix@
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-%endif
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
diff --git a/contrib/crossrpms/configure.ac b/contrib/crossrpms/configure.ac
deleted file mode 100644
index e18fdef..0000000
--- a/contrib/crossrpms/configure.ac
+++ /dev/null
@@ -1,170 +0,0 @@
-## $Id$
-
-m4_define([RTEMS_API],[4.10])
-
-AC_PREREQ([2.68])
-AC_INIT([crossrpms],[0.20100607.0],[http://www.rtems.org/bugzilla])
-AC_CONFIG_SRCDIR([binutils/binutils.add])
-AC_CONFIG_AUX_DIR(.)
-
-AC_CANONICAL_HOST
-
-AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
-
-AM_INIT_AUTOMAKE([1.11.1])
-
-AC_ARG_ENABLE([targets],
- AS_HELP_STRING([--enable-targets=<targets>],[build for targets <targets>]),
- [targets="$enable_targets"],
- [targets=rtems]
-)
-
-case $targets in
-rtems )
- savdir=`pwd`
- cd $srcdir
- targets=
- for d in rtems*/*/Makefile.am; do
- o=`echo $d | sed -e 's,/.*,,'`
- a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
- targets="$targets $a-$o"
- done
- cd $savdir
- ;;
-all )
- savdir=`pwd`
- cd $srcdir
- targets=
- for d in rtems*/*/Makefile.am; do
- o=`echo $d | sed -e 's,/.*,,'`
- a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
- targets="$targets $a-$o"
- done
- for d in freebsd*/*/Makefile.am \
- netbsd*/*/Makefile.am \
- cygwin*/*/Makefile.am \
- mingw*/*/Makefile.am; \
- do
- o=`echo $d | sed -e 's,/.*,,'`
- a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
- targets="$targets $a-pc-$o"
- done
- for d in solaris*/*/Makefile.am; \
- do
- o=`echo $d | sed -e 's,/.*,,'`
- a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
- targets="$targets $a-sun-$o"
- done
- cd $savdir
- ;;
-esac
-
-case "$prefix" in
-/usr)
- sysdirpattern="/%sysdir/d"
- rpmprefix=
- host_subdirs=
- ;;
-/usr/local)
- sysdirpattern="/%sysdir/d"
- rpmprefix="local-"
- host_subdirs=autotools
- ;;
-/opt/rtems)
- sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="rtems-"
- host_subdirs=autotools
- ;;
-NONE|${ac_default_prefix}) # Default prefix
- sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="[rtems-]RTEMS_API[-]"
- host_subdirs=autotools
- ;;
-*)
- sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="custom-"
- host_subdirs=autotools
- ;;
-esac
-AC_SUBST(sysdirpattern)
-AC_SUBST(HOST_SUBDIRS,$host_subdirs)
-
-AC_ARG_ENABLE([rpmprefix],
-[ --enable-rpmprefix=<rpmprefix> prefix rpms],[
- case "$enable_rpmprefix" in
- yes) # ignore, use default
- ;;
- no) rpmprefix=
- ;;
- *) # presume user knows what he is doing
- rpmprefix=$enable_rpmprefix;;
- esac
-])
-AC_SUBST(rpmprefix)
-
-SPECSTRIP_OPTS=
-
-AC_ARG_ENABLE([infos],
-[ --enable-infos enable building infos],[
- case "$enable_infos" in
- yes)
- SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
- no)
- SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
- *)
- AC_MSG_ERROR([Invalid argument to --enable-infos])
- esac
-])
-AC_SUBST(SPECSTRIP_OPTS)
-
-AS_IF([test "${host}" != "${build}"],[
-AC_MSG_CHECKING(for RPM OS)
-case "$host" in
- i?86-*cygwin*) RPM_OS=cygwin ;;
- i?86-*mingw*) RPM_OS=mingw32 ;;
- sparc-*solaris*) RPM_OS=solaris2.7 ;;
- i?86-*freebsd5*) RPM_OS=freebsd5.2 ;;
- i?86-*freebsd6.0) RPM_OS=freebsd6.0 ;;
- i?86-*freebsd6.1) RPM_OS=freebsd6.1 ;;
- *)
- AC_MSG_ERROR([Unsupported host ${host}])
- ;;
-esac
-AC_MSG_RESULT($RPM_OS)
-])
-AC_SUBST(RPM_OS)
-
-for f in $targets; do
-ac_cv_mytarget=`$SHELL "$ac_aux_dir/config.sub" $f` ||
- AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $f failed])
- RTEMS_CANONICAL_SPLIT(mytarget)
-
- AS_IF([test -d $srcdir/$mytarget_os/$mytarget_cpu],[
- target_subdirs="$target_subdirs $mytarget_os/$mytarget_cpu"],[
- AC_MSG_WARN([ignoring unsupported target $f])
- ])
-done
-AC_SUBST(TARGET_SUBDIRS,$target_subdirs)
-AC_SUBST(rtems_api,RTEMS_API)
-
-AC_CONFIG_FILES([Makefile])
-
-AC_CONFIG_FILES([rtems4.10/Makefile])
-AC_CONFIG_FILES([rtems4.10/arm/Makefile])
-AC_CONFIG_FILES([rtems4.10/avr/Makefile])
-AC_CONFIG_FILES([rtems4.10/bfin/Makefile])
-AC_CONFIG_FILES([rtems4.10/h8300/Makefile])
-AC_CONFIG_FILES([rtems4.10/i386/Makefile])
-AC_CONFIG_FILES([rtems4.10/lm32/Makefile])
-AC_CONFIG_FILES([rtems4.10/m32c/Makefile])
-AC_CONFIG_FILES([rtems4.10/m32r/Makefile])
-AC_CONFIG_FILES([rtems4.10/m68k/Makefile])
-AC_CONFIG_FILES([rtems4.10/mips/Makefile])
-AC_CONFIG_FILES([rtems4.10/mipstx39/Makefile])
-AC_CONFIG_FILES([rtems4.10/powerpc/Makefile])
-AC_CONFIG_FILES([rtems4.10/sh/Makefile])
-AC_CONFIG_FILES([rtems4.10/sparc/Makefile])
-
-AC_CONFIG_FILES([autotools/Makefile])
-
-AC_OUTPUT
diff --git a/contrib/crossrpms/cpukit/build.add b/contrib/crossrpms/cpukit/build.add
deleted file mode 100644
index cd42b08..0000000
--- a/contrib/crossrpms/cpukit/build.add
+++ /dev/null
@@ -1,16 +0,0 @@
-%build
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- mkdir -p build
-
- cd build
- ../rtems-%{cpukit_version}/configure \
- --prefix=%{_prefix} \
- --target=@tool_target@ \
- --enable-multilib \
- --disable-rtemsbsp
-
- make all RTEMS_BSP=
- cd ..
-
diff --git a/contrib/crossrpms/cpukit/cpukit.add b/contrib/crossrpms/cpukit/cpukit.add
deleted file mode 100644
index f63b1c7..0000000
--- a/contrib/crossrpms/cpukit/cpukit.add
+++ /dev/null
@@ -1,24 +0,0 @@
-
-%define cpukit_pkgvers @CPUKIT_PKGVERS@
-%define cpukit_version @CPUKIT_VERS@
-%define cpukit_rpmvers %{expand:%(echo "@CPUKIT_PKGVERS@" | tr - . )}
-
-Name: @rpmprefix@@tool_target at -cpukit
-Summary: @tool_target@ cpukit
-
-Group: Development/Tools
-Version: %{cpukit_rpmvers}
-Release: @CPUKIT_RPMREL@
-License: GPL
-URL: http://cpukit.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-
-%define debug_package %{nil}
-
-BuildRequires: @rpmprefix@@tool_target at -gcc
-
- at SOURCES@
-
-%description
-RTEMS cpukit for @tool_target at .
diff --git a/contrib/crossrpms/cpukit/install.add b/contrib/crossrpms/cpukit/install.add
deleted file mode 100644
index 8c83a4c..0000000
--- a/contrib/crossrpms/cpukit/install.add
+++ /dev/null
@@ -1,11 +0,0 @@
-%install
- rm -rf $RPM_BUILD_ROOT
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- rm -rf $RPM_BUILD_ROOT%{_prefix}/share/man
- rm -rf $RPM_BUILD_ROOT%{_prefix}/bin
diff --git a/contrib/crossrpms/cpukit/prep.add b/contrib/crossrpms/cpukit/prep.add
deleted file mode 100644
index 8c2e43c..0000000
--- a/contrib/crossrpms/cpukit/prep.add
+++ /dev/null
@@ -1,6 +0,0 @@
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-
- at PREP@
diff --git a/contrib/crossrpms/cpukit/rpm-install.add b/contrib/crossrpms/cpukit/rpm-install.add
deleted file mode 100644
index 6121fae..0000000
--- a/contrib/crossrpms/cpukit/rpm-install.add
+++ /dev/null
@@ -1,49 +0,0 @@
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-%if "%{_prefix}" != "/usr"
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-%endif
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-%if "%{_prefix}" != "/usr"
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-%endif
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{version}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
- | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/@tool_target@/' | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{version}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{version}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{version}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
- | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/@tool_target@/' | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{version}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{version}/find-requires
-
diff --git a/contrib/crossrpms/cpukit/target-cpukit.add b/contrib/crossrpms/cpukit/target-cpukit.add
deleted file mode 100644
index 79b873d..0000000
--- a/contrib/crossrpms/cpukit/target-cpukit.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%description -n @rpmprefix@@tool_target at -cpukit
-RTEMS cpukit for target @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -cpukit
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%{_prefix}/@tool_target@
-# Violates the FHS
-%exclude %{_prefix}/make
\ No newline at end of file
diff --git a/contrib/crossrpms/gcc/base-gcc.add b/contrib/crossrpms/gcc/base-gcc.add
deleted file mode 100644
index 94ed39f..0000000
--- a/contrib/crossrpms/gcc/base-gcc.add
+++ /dev/null
@@ -1,53 +0,0 @@
-%if %build_infos
-# ==============================================================
-# @rpmprefix at gcc-common
-# ==============================================================
-%package -n @rpmprefix at gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at gcc-common
-GCC files that are shared by all targets.
-
-%files -n @rpmprefix at gcc-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n @rpmprefix at gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n @rpmprefix at gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-%endif
diff --git a/contrib/crossrpms/gcc/base-gcj.add b/contrib/crossrpms/gcc/base-gcj.add
deleted file mode 100644
index fe8aed9..0000000
--- a/contrib/crossrpms/gcc/base-gcj.add
+++ /dev/null
@@ -1,55 +0,0 @@
-%if %build_infos
-%if %build_gcj
-# ==============================================================
-# @rpmprefix at gcc-gcj-common
-# ==============================================================
-%package -n @rpmprefix at gcc-gcj-common
-Summary: Base package for rtems gcc/java compiler (gcj)
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at gcc-gcj-common
-RTEMS is an open source operating system for embedded systems.
-
-This is the files for gcc/java (gcj) that are shared by all targets.
-
-%files -n @rpmprefix at gcc-gcj-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gcj.info*
-%{_infodir}/fastjar.info*
-
-%if "%{gcc_version}" < "4.0"
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/gcjh.1*
-%{_mandir}/man1/jv-scan.1*
-%{_mandir}/man1/jcf-dump.1*
-%{_mandir}/man1/gij.1*
-%{_mandir}/man1/jv-convert.1*
-%{_mandir}/man1/rmic.1*
-%{_mandir}/man1/rmiregistry.1*
-%{_mandir}/man1/jar.1*
-%{_mandir}/man1/grepjar.1*
-%endif
-
-%post -n @rpmprefix at gcc-gcj-common
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcj.info* || :
-/sbin/install-info --info-dir=%{_infodir} %{_infodir}/fastjar.info* || :
-
-%preun -n @rpmprefix at gcc-gcj-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcj.info* || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/fastjar.info* || :
-fi
-
-%endif
-%endif
diff --git a/contrib/crossrpms/gcc/base-gfortran.add b/contrib/crossrpms/gcc/base-gfortran.add
deleted file mode 100644
index 993f763..0000000
--- a/contrib/crossrpms/gcc/base-gfortran.add
+++ /dev/null
@@ -1,38 +0,0 @@
-%if %build_infos
-%if %build_fortran
-# ==============================================================
-# @rpmprefix at gcc-gfortran-common
-# ==============================================================
-%package -n @rpmprefix at gcc-gfortran-common
-Summary: Base package for RTEMS gcc/gfortran compiler
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at gcc-gfortran-common
-RTEMS is an open source operating system for embedded systems.
-
-This is the files for gcc/gfortran that are shared by all targets.
-
-%files -n @rpmprefix at gcc-gfortran-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gfortran.info*.gz
-
-%post -n @rpmprefix at gcc-gfortran-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
-
-%preun -n @rpmprefix at gcc-gfortran-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
-fi
-
-%endif
-%endif
diff --git a/contrib/crossrpms/gcc/base-gnat.add b/contrib/crossrpms/gcc/base-gnat.add
deleted file mode 100644
index 71dc5cc..0000000
--- a/contrib/crossrpms/gcc/base-gnat.add
+++ /dev/null
@@ -1,40 +0,0 @@
-%if %build_infos
-%if %build_gnat
-# ==============================================================
-# @rpmprefix at gcc-gnat-common
-# ==============================================================
-%package -n @rpmprefix at gcc-gnat-common
-Summary: Base package for RTEMS gcc/gnat compiler
-Group: Development/Tools
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at gcc-gnat-common
-RTEMS is an open source operating system for embedded systems.
-
-This is the gcc/gnat tools for the gcc/gnat compiler
-
-%files -n @rpmprefix at gcc-gnat-common
-%defattr(-,root,root)
-%sysdir %{_bindir}
-%{_bindir}/vxaddr2line%{_exeext}
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gnat*
-
-%post -n @rpmprefix at gcc-gnat-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gnat_ugn_unw.info.gz || :
-
-%preun -n @rpmprefix at gcc-gnat-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn_unw.info.gz || :
-fi
-%endif
-%endif
diff --git a/contrib/crossrpms/gcc/base-newlib.add b/contrib/crossrpms/gcc/base-newlib.add
deleted file mode 100644
index 8dbe5aa..0000000
--- a/contrib/crossrpms/gcc/base-newlib.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if %build_infos
-%if %build_newlib
-# ==============================================================
-# @rpmprefix at newlib-common
-# ==============================================================
-%package -n @rpmprefix at newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: @NEWLIB_RPMREL@
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n @rpmprefix at newlib-common
-newlib files that are shared by all targets.
-
-%files -n @rpmprefix at newlib-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n @rpmprefix at newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n @rpmprefix at newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
-%endif
-%endif
diff --git a/contrib/crossrpms/gcc/build.add b/contrib/crossrpms/gcc/build.add
deleted file mode 100644
index 8330345..0000000
--- a/contrib/crossrpms/gcc/build.add
+++ /dev/null
@@ -1,75 +0,0 @@
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
-%if %build_cxx
- languages="$languages,c++"
-%endif
-%if %build_fortran
- languages="$languages,fortran"
-%endif
-%if %build_gcj
- languages="$languages,java"
-%endif
-%if %build_objc
- languages="$languages,objc"
-%endif
-%if %build_gnat
- languages="$languages,ada"
-%endif
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=@tool_target@ \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- --with-sysroot=%{_exec_prefix}/@tool_target@/sys-root \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
-%if %build_newlib
- --enable-newlib-io-c99-formats \
-%endif
-%if %build_libgcj
- --enable-libgcj \
-%endif
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
-%if %build_infos
- make info
-%endif
- cd ..
-
diff --git a/contrib/crossrpms/gcc/gccnewlib.add b/contrib/crossrpms/gcc/gccnewlib.add
deleted file mode 100644
index abd5202..0000000
--- a/contrib/crossrpms/gcc/gccnewlib.add
+++ /dev/null
@@ -1,253 +0,0 @@
-
-%define gcc_pkgvers @GCC_PKGVERS@
-%define gcc_version @GCC_VERS@
-%define gcc_rpmvers %{expand:%(echo "@GCC_VERS@" | tr - _ )}
-
-%if %build_newlib
-%define newlib_pkgvers @NEWLIB_PKGVERS@
-%define newlib_version @NEWLIB_VERS@
-%endif
-
-Name: @rpmprefix@@tool_target at -gcc
-Summary: @tool_target@ gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: @GCC_RPMREL@
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%if %build_fortran
-%define gmp_required 4.1
-%define mpfr_required 2.2.1
-%endif
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: @rpmprefix@@tool_target at -binutils
-BuildRequires: @rpmprefix@@tool_target at -sys-root
-BuildRequires: @rpmprefix@@tool_target at -w32api-sys-root
-
-%if %build_infos
-Requires: @rpmprefix at gcc-common
-%endif
-Requires: @rpmprefix@@tool_target at -binutils
-Requires: @rpmprefix@@tool_target at -sys-root
-Requires: @rpmprefix@@tool_target at -w32api-sys-root
-Requires: @rpmprefix@@tool_target at -gcc-libgcc = %{gcc_rpmvers}-%{release}
-%if %build_newlib
-Requires: @rpmprefix@@tool_target at -newlib = %{newlib_version}- at NEWLIB_RPMREL@
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%if %build_gcj
-BuildRequires: zlib-devel
-%endif
-%endif
-%if %build_gnat
-# Building gnat requires gnat
-BuildRequires: gcc-gnat
-BuildRequires: @rpmprefix@@tool_target at -newlib < %{newlib_version}- at NEWLIB_RPMREL@
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
- at SOURCES@
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for @tool_target at .
-
diff --git a/contrib/crossrpms/gcc/install.add b/contrib/crossrpms/gcc/install.add
deleted file mode 100644
index f6e38f6..0000000
--- a/contrib/crossrpms/gcc/install.add
+++ /dev/null
@@ -1,153 +0,0 @@
-%install
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
-%if %build_newlib
- cd build/@tool_target@/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-%endif
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/@tool_target at -c++filt%{_exeext}
-
-%if %build_gnat
- # Seemingly a VAX tool. Not meaningful, here.
- rm -f $RPM_BUILD_ROOT%{_bindir}/vxaddr2line%{_exeext}
-%endif
-
-%if %build_infos
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-%else
-# Conflict with a native GCC's infos
- rm -rf $RPM_BUILD_ROOT%{_infodir}
-
-# Conflict with a native GCC's man pages
- rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
-%endif
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/@tool_target at -@tool_target at -gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/@tool_target@/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/@tool_target@/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
-%if %build_newlib
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/@tool_target@/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-%endif
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/@tool_target@/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
diff --git a/contrib/crossrpms/gcc/prep.add b/contrib/crossrpms/gcc/prep.add
deleted file mode 100644
index 26da519..0000000
--- a/contrib/crossrpms/gcc/prep.add
+++ /dev/null
@@ -1,88 +0,0 @@
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%if %build_cxx
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-%endif
-
-%if %build_fortran
-%setup -q -T -D -n %{name}-%{version} -a2
-%{?PATCH2:%patch2 -p0}
-%endif
-
-%if %build_gcj
-%setup -q -T -D -n %{name}-%{version} -a3
-%{?PATCH3:%patch3 -p0}
-%endif
-
-%if %build_gnat
-%setup -q -T -D -n %{name}-%{version} -a4
-%{?PATCH4:%patch4 -p0}
-%endif
-
-%if %build_objc
-%setup -q -T -D -n %{name}-%{version} -a5
-%{?PATCH5:%patch5 -p0}
-%endif
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%if %build_newlib
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-%endif
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
- at PREP@
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
diff --git a/contrib/crossrpms/gcc/rpm-install.add b/contrib/crossrpms/gcc/rpm-install.add
deleted file mode 100644
index e1b456d..0000000
--- a/contrib/crossrpms/gcc/rpm-install.add
+++ /dev/null
@@ -1,73 +0,0 @@
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-%if "%{_prefix}" != "/usr"
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-%endif
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-%if "%{_prefix}" != "/usr"
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-%endif
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/@tool_target@/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/@tool_target@/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-c++.add b/contrib/crossrpms/gcc/target-c++.add
deleted file mode 100644
index f8fce19..0000000
--- a/contrib/crossrpms/gcc/target-c++.add
+++ /dev/null
@@ -1,65 +0,0 @@
-%if %build_cxx
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-c++
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-c++
-Summary: GCC c++ compiler for @tool_target@
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: @rpmprefix@@tool_target at -gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: @rpmprefix@@tool_target at -gcc-c++ = %{gcc_rpmvers}
-%endif
-
-%if %build_infos
-Requires: @rpmprefix at gcc-common
-%endif
-Requires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}-%{release}
-
-%description -n @rpmprefix@@tool_target at -gcc-c++
-GCC c++ compiler for @tool_target at .
-
-
-%package -n @rpmprefix@@tool_target at -gcc-libstdc++
-Summary: libstdc++ for @tool_target@
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n @rpmprefix@@tool_target at -gcc-libstdc++
-%{summary}
-
-
-%files -n @rpmprefix@@tool_target at -gcc-c++
-%defattr(-,root,root)
-%sysdir %{_prefix}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -g++.1*
-
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -c++%{_exeext}
-%{_bindir}/@tool_target at -g++%{_exeext}
-
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n @rpmprefix@@tool_target at -gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include/c++
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-gcc.add b/contrib/crossrpms/gcc/target-gcc.add
deleted file mode 100644
index afd3379..0000000
--- a/contrib/crossrpms/gcc/target-gcc.add
+++ /dev/null
@@ -1,84 +0,0 @@
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc
-# ==============================================================
-# %package -n @rpmprefix@@tool_target at -gcc
-# Summary: GNU cc compiler for @tool_target@
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: @rpmprefix@@tool_target at -binutils
-# Requires: @rpmprefix@@tool_target at -newlib = %{newlib_version}- at NEWLIB_RPMREL@
-# License: GPL
-
-# %if %build_infos
-# Requires: @rpmprefix at gcc-common
-# %endif
-
-%description -n @rpmprefix@@tool_target at -gcc
-GNU cc compiler for @tool_target at .
-
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-libgcc
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-libgcc
-Summary: libgcc for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: @rpmprefix@@tool_target at -newlib = %{newlib_version}- at NEWLIB_RPMREL@
-License: GPL
-
-%description -n @rpmprefix@@tool_target at -gcc-libgcc
-libgcc @tool_target at -gcc.
-
-
-%files -n @rpmprefix@@tool_target at -gcc
-%defattr(-,root,root)
-%sysdir %{_prefix}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -gcc.1*
-%{_mandir}/man1/@tool_target at -cpp.1*
-%{_mandir}/man1/@tool_target at -gcov.1*
-
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -cpp%{_exeext}
-%{_bindir}/@tool_target at -gcc%{_exeext}
-%{_bindir}/@tool_target at -gcc-%{gcc_version}%{_exeext}
-%{_bindir}/@tool_target at -gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/@tool_target at -gccbug
-%endif
-
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n @rpmprefix@@tool_target at -gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%if "@tool_target@" != "bfin-rtems at rtems_api@"
-%if "@tool_target@" != "avr-rtems at rtems_api@"
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include/ssp
-%endif
-%endif
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include-fixed
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-gcj.add b/contrib/crossrpms/gcc/target-gcj.add
deleted file mode 100644
index 0ea7735..0000000
--- a/contrib/crossrpms/gcc/target-gcj.add
+++ /dev/null
@@ -1,57 +0,0 @@
-%if %build_gcj
-# ==============================================================
-# @rpmprefix@@tool_target at -gcj
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-gcj
-Summary: Java support (gcj) for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-
-%if %build_infos
-Requires: @rpmprefix at gcc-gcj-common
-%endif
-Requires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}-%{release}
-
-%description -n @rpmprefix@@tool_target at -gcc-gcj
-RTEMS is an open source operating system for embedded systems.
-
-This is the gcc/java compiler for @tool_target@
-
-%files -n @rpmprefix@@tool_target at -gcc-gcj -f build/files.gcj
-%defattr(-,root,root)
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -gcj%{_exeext}
-%{_bindir}/@tool_target at -jcf-dump%{_exeext}
-%{_bindir}/@tool_target at -jv-scan%{_exeext}
-%{_bindir}/@tool_target at -gcjh%{_exeext}
-%{_bindir}/@tool_target at -*jar%{_exeext}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -*jar.1*
-%{_mandir}/man1/@tool_target at -gcj*.1*
-%{_mandir}/man1/@tool_target at -jv-*.1*
-%{_mandir}/man1/@tool_target at -jcf-dump.1*
-%{_mandir}/man1/@tool_target at -gij.1*
-
-%if "%{gcc_version}" >= "4.0"
-%{_mandir}/man1/@tool_target at -grmi*.1*
-%else
-%{_mandir}/man1/@tool_target at -rmi*.1*
-%endif
-
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/jc1%{_exeext}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/jvgenmain%{_exeext}
-
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-gfortran.add b/contrib/crossrpms/gcc/target-gfortran.add
deleted file mode 100644
index 81d5d48..0000000
--- a/contrib/crossrpms/gcc/target-gfortran.add
+++ /dev/null
@@ -1,60 +0,0 @@
-%if %build_fortran
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-gfortran
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-gfortran
-Summary: Fortran 95 support for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-
-%if %build_infos
-Requires: @rpmprefix at gcc-gfortran-common
-%endif
-Requires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}-%{release}
-Requires: @rpmprefix@@tool_target at -gcc-libgfortran = %{gcc_rpmvers}-%{release}
-
-%description -n @rpmprefix@@tool_target at -gcc-gfortran
-GCC fortran compiler for @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -gcc-gfortran
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -gfortran%{_exeext}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -gfortran.1*
-
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/f951%{_exeext}
-
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-libgfortran
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-libgfortran
-Summary: Fortran 95 support libraries for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n @rpmprefix@@tool_target at -gcc-libgfortran
-%{summary}
-
-%files -n @rpmprefix@@tool_target at -gcc-libgfortran -f build/files.gfortran
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-%if "%{gcc_version}" >= "4.2.0"
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/finclude
-%endif
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-gnat.add b/contrib/crossrpms/gcc/target-gnat.add
deleted file mode 100644
index 3e034a5..0000000
--- a/contrib/crossrpms/gcc/target-gnat.add
+++ /dev/null
@@ -1,42 +0,0 @@
-%if %build_gnat
-# ==============================================================
-# @rpmprefix@@tool_target at -gnat
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-gnat
-Summary: Ada support for for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-
-%if %_build_infos
-Requires: @rpmprefix at gcc-gnat-common
-%endif
-Requires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}-%{release}
-
-%description -n @rpmprefix@@tool_target at -gcc-gnat
-RTEMS is an open source operating system for embedded systems.
-
-This is the gcc/gnat compiler for @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -gcc-gnat
-%defattr(-,root,root)
-%sysdir %{_prefix}
-
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -gnat*
-%{_bindir}/@tool_target at -gprmake%{_exeext}
-
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/gnat1%{_exeext}
-
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/adalib
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/adainclude
-%endif
-
diff --git a/contrib/crossrpms/gcc/target-newlib.add b/contrib/crossrpms/gcc/target-newlib.add
deleted file mode 100644
index 50efe08..0000000
--- a/contrib/crossrpms/gcc/target-newlib.add
+++ /dev/null
@@ -1,26 +0,0 @@
-%if %build_newlib
-# ==============================================================
-# @rpmprefix@@tool_target at -newlib
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -newlib
-Summary: C Library (newlib) for @tool_target@
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: @NEWLIB_RPMREL@
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%if %build_infos
-Requires: @rpmprefix at newlib-common
-%endif
-
-%description -n @rpmprefix@@tool_target at -newlib
-Newlib C Library for @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -newlib -f build/files.newlib
-%defattr(-,root,root)
-%sysdir %{_exec_prefix}
-%dir %{_exec_prefix}/@tool_target@
-%{_exec_prefix}/@tool_target@/include
-
-%endif
diff --git a/contrib/crossrpms/gcc/target-objc.add b/contrib/crossrpms/gcc/target-objc.add
deleted file mode 100644
index 41a5e81..0000000
--- a/contrib/crossrpms/gcc/target-objc.add
+++ /dev/null
@@ -1,49 +0,0 @@
-%if %build_objc
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-objc
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-objc
-Summary: Objective C support for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-
-Requires: @rpmprefix@@tool_target at -gcc = %{gcc_rpmvers}-%{release}
-Requires: @rpmprefix@@tool_target at -gcc-libobjc = %{gcc_rpmvers}-%{release}
-
-%description -n @rpmprefix@@tool_target at -gcc-objc
-GCC objc compiler for @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -gcc-objc
-%defattr(-,root,root)
-%sysdir %{_exec_prefix}
-%sysdir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/@tool_target@
-%dir %{_libexecdir}/gcc/@tool_target@/%{gcc_version}
-%{_libexecdir}/gcc/@tool_target@/%{gcc_version}/cc1obj%{_exeext}
-
-# ==============================================================
-# @rpmprefix@@tool_target at -gcc-libobjc
-# ==============================================================
-%package -n @rpmprefix@@tool_target at -gcc-libobjc
-Summary: Objective C support for @tool_target at -gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n @rpmprefix@@tool_target at -gcc-libobjc
-Support libraries for GCC's objc compiler for @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -gcc-libobjc -f build/files.objc
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/@tool_target@
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}
-%dir %{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include
-%{_gcclibdir}/gcc/@tool_target@/%{gcc_version}/include/objc
-%endif
-
diff --git a/contrib/crossrpms/gdb/base-gdb.add b/contrib/crossrpms/gdb/base-gdb.add
deleted file mode 100644
index 658f8a3..0000000
--- a/contrib/crossrpms/gdb/base-gdb.add
+++ /dev/null
@@ -1,43 +0,0 @@
-%if %build_infos
-# ==============================================================
-# @rpmprefix at gdb-common
-# ==============================================================
-%package -n @rpmprefix at gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n @rpmprefix at gdb-common
-
-GDB files shared by all targets.
-
-%post -n @rpmprefix at gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n @rpmprefix at gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n @rpmprefix at gdb-common
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-
-%sysdir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
-%endif
diff --git a/contrib/crossrpms/gdb/build.add b/contrib/crossrpms/gdb/build.add
deleted file mode 100644
index ba4478d..0000000
--- a/contrib/crossrpms/gdb/build.add
+++ /dev/null
@@ -1,33 +0,0 @@
-%build
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=@tool_target@ \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/@tool_target at -gdb \
- --with-sysroot=%{_prefix}/@tool_target@/sys-root \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
-%if %build_infos
- make info
-%endif
- cd ..
-
diff --git a/contrib/crossrpms/gdb/gdb.add b/contrib/crossrpms/gdb/gdb.add
deleted file mode 100644
index 4b4bef8..0000000
--- a/contrib/crossrpms/gdb/gdb.add
+++ /dev/null
@@ -1,90 +0,0 @@
-%define gdb_version @GDB_VERS@
-%define gdb_rpmvers %{expand:%(echo @GDB_VERS@ | tr - _)}
-
-Name: @rpmprefix@@tool_target at -gdb
-Summary: Gdb for target @tool_target@
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: @GDB_RPMREL@
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%if "@tool_target@" == "powerpc-rtems at rtems_api@"
-%if "%{_build}" != "%{_host}"
-# psim doesn't support Cdn-X
-%global build_sim --disable-sim
-%else
-%global build_sim --enable-sim --enable-sim-trace
-%endif
-%endif
-%if "@tool_target@" == "sparc-rtems at rtems_api@"
-%ifos mingw mingw32
-# Mingw lacks functions required by the sparc simulator
-%define build_sim --disable-sim
-%endif
-%endif
-%if "@tool_target@" == "h8300-rtems at rtems_api@"
-%ifos mingw mingw32
-# Mingw lacks functions required by the h8300 simulator
-%define build_sim --disable-sim
-%endif
-%endif
-%if "@tool_target@" == "m32c-rtems at rtems_api@"
-%ifos mingw mingw32
-# Mingw lacks functions required by the m32c simulator
-%define build_sim --disable-sim
-%endif
-%endif
-%if "@tool_target@" == "lm32-rtems at rtems_api@"
-%ifos mingw mingw32
-# Mingw lacks functions required by the lm32 simulator
-%define build_sim --disable-sim
-%endif
-%endif
-%if "@tool_target@" == "mipstx39-rtems at rtems_api@"
-%ifos mingw mingw32
-# Mingw lacks functions required by the mipstx39 simulator
-%define build_sim --disable-sim
-%endif
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-%if %build_infos
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: @rpmprefix at gdb-common
-
-%endif
- at SOURCES@
-
-%description
-GDB for target @tool_target@
diff --git a/contrib/crossrpms/gdb/install.add b/contrib/crossrpms/gdb/install.add
deleted file mode 100644
index 182c846..0000000
--- a/contrib/crossrpms/gdb/install.add
+++ /dev/null
@@ -1,48 +0,0 @@
-%install
-%if "%{_prefix}" != "/usr"
- export PATH="%{_bindir}:${PATH}"
-%endif
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
-%if %build_infos
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-%else
-# Conflict with a native gdb's infos
- rm -rf $RPM_BUILD_ROOT%{_infodir}
-%endif
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib at tool_target@-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/@tool_target at -gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/@tool_target at -gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/@tool_target at -gdb/python
-%endif
-%endif
- cd ..
-
diff --git a/contrib/crossrpms/gdb/prep.add b/contrib/crossrpms/gdb/prep.add
deleted file mode 100644
index 02b65d6..0000000
--- a/contrib/crossrpms/gdb/prep.add
+++ /dev/null
@@ -1,10 +0,0 @@
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
diff --git a/contrib/crossrpms/gdb/rpm-install.add b/contrib/crossrpms/gdb/rpm-install.add
deleted file mode 100644
index 07efd8f..0000000
--- a/contrib/crossrpms/gdb/rpm-install.add
+++ /dev/null
@@ -1,32 +0,0 @@
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-%if "%{_prefix}" != "/usr"
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-%endif
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-%if "%{_prefix}" != "/usr"
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-%endif
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
diff --git a/contrib/crossrpms/gdb/target-gdb.add b/contrib/crossrpms/gdb/target-gdb.add
deleted file mode 100644
index 88789ad..0000000
--- a/contrib/crossrpms/gdb/target-gdb.add
+++ /dev/null
@@ -1,26 +0,0 @@
-# ==============================================================
-# @tool_target at -gdb
-# ==============================================================
-# %package -n @rpmprefix@@tool_target at -gdb
-# Summary: rtems gdb for @tool_target@
-# Group: Development/Tools
-# %if %build_infos
-# Requires: @rpmprefix at gdb-common
-# %endif
-
-%description -n @rpmprefix@@tool_target at -gdb
-GNU gdb targetting @tool_target at .
-
-%files -n @rpmprefix@@tool_target at -gdb
-%defattr(-,root,root)
-%sysdir %{_prefix}
-%sysdir %{_prefix}/share
-%{?with_python:%{_datadir}/@tool_target at -gdb}
-
-%sysdir %{_mandir}
-%sysdir %{_mandir}/man1
-%{_mandir}/man1/@tool_target at -*.1*
-
-%sysdir %{_bindir}
-%{_bindir}/@tool_target at -*
-
diff --git a/contrib/crossrpms/mkspec.am b/contrib/crossrpms/mkspec.am
deleted file mode 100644
index b251a19..0000000
--- a/contrib/crossrpms/mkspec.am
+++ /dev/null
@@ -1,17 +0,0 @@
-noinst_DATA =
-CLEANFILES =
-EXTRA_DIST =
-
-SPECSTRIP = $(top_srcdir)/specstrip --prefix=$(prefix) $(SPECSTRIP_OPTS)
-
-MKSPEC = sed \
- -e "s,[@]rpmprefix[@],$(rpmprefix),g" \
- -e "s,[@]_prefix[@],$(prefix),g" \
- -e "s/[@]tool_target[@]/$(TARGET)/g" \
- -e "/^%package -n [@]rpmprefix[@][@]tool_target[@]-gcc/d" \
- -e "@sysdirpattern@" \
- -e "/[@]PATCH/d"
-
-MKSPEC0 = sed \
- -e "s/[@]tool_target[@]/$(TARGET)/g" \
- -e "s/[@]rtems_api[@]/$(rtems_api)/g"
diff --git a/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100310.diff b/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100310.diff
deleted file mode 100644
index 40af9a1..0000000
--- a/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100310.diff
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur binutils-2.20.1.orig/bfd/Makefile.am binutils-2.20.1/bfd/Makefile.am
---- binutils-2.20.1.orig/bfd/Makefile.am 2010-03-03 14:31:55.000000000 +0100
-+++ binutils-2.20.1/bfd/Makefile.am 2010-03-10 07:14:32.000000000 +0100
-@@ -4,7 +4,7 @@
- ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-
- # Uncomment the following line when doing a release.
--# RELEASE=y
-+RELEASE=y
-
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-diff -Naur binutils-2.20.1.orig/bfd/Makefile.in binutils-2.20.1/bfd/Makefile.in
---- binutils-2.20.1.orig/bfd/Makefile.in 2010-03-03 14:59:15.000000000 +0100
-+++ binutils-2.20.1/bfd/Makefile.in 2010-03-10 07:26:28.000000000 +0100
-@@ -317,7 +317,7 @@
- ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-
- # Uncomment the following line when doing a release.
--# RELEASE=y
-+RELEASE = y
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
- SUBDIRS = doc po
diff --git a/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100826.diff b/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100826.diff
deleted file mode 100644
index 00f04ce..0000000
--- a/contrib/crossrpms/patches/binutils-2.20.1-rtems4.10-20100826.diff
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -Naur binutils-2.20.1.orig/bfd/ChangeLog.rtems binutils-2.20.1/bfd/ChangeLog.rtems
---- binutils-2.20.1.orig/bfd/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.20.1/bfd/ChangeLog.rtems 2010-08-26 05:03:08.221352824 +0200
-@@ -0,0 +1,6 @@
-+2010-08-25 H.J. Lu <hongjiu.lu at intel.com>
-+
-+ PR ld/11939
-+ * elflink.c (elf_link_add_object_symbols): Don't set
-+ unique_global for non-ELF hash link table.
-+
-diff -Naur binutils-2.20.1.orig/bfd/elflink.c binutils-2.20.1/bfd/elflink.c
---- binutils-2.20.1.orig/bfd/elflink.c 2009-09-10 13:47:12.000000000 +0200
-+++ binutils-2.20.1/bfd/elflink.c 2010-08-26 05:03:08.225352726 +0200
-@@ -4154,7 +4154,8 @@
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- *sym_hash = h;
-- h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
-+ if (is_elf_hash_table (htab))
-+ h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
-
- new_weakdef = FALSE;
- if (dynamic
-diff -Naur binutils-2.20.1.orig/bfd/Makefile.am binutils-2.20.1/bfd/Makefile.am
---- binutils-2.20.1.orig/bfd/Makefile.am 2010-03-03 14:31:55.000000000 +0100
-+++ binutils-2.20.1/bfd/Makefile.am 2010-08-26 05:02:54.181352514 +0200
-@@ -4,7 +4,7 @@
- ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-
- # Uncomment the following line when doing a release.
--# RELEASE=y
-+RELEASE=y
-
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-diff -Naur binutils-2.20.1.orig/bfd/Makefile.in binutils-2.20.1/bfd/Makefile.in
---- binutils-2.20.1.orig/bfd/Makefile.in 2010-03-03 14:59:15.000000000 +0100
-+++ binutils-2.20.1/bfd/Makefile.in 2010-08-26 05:02:54.181352514 +0200
-@@ -317,7 +317,7 @@
- ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-
- # Uncomment the following line when doing a release.
--# RELEASE=y
-+RELEASE = y
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
- SUBDIRS = doc po
diff --git a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110418.diff b/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110418.diff
deleted file mode 100644
index 2d05ae6..0000000
--- a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110418.diff
+++ /dev/null
@@ -1,4570 +0,0 @@
-diff -Naur gcc-4.4.6.orig/ChangeLog.rtems gcc-4.4.6/ChangeLog.rtems
---- gcc-4.4.6.orig/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/ChangeLog.rtems 2011-04-18 14:32:36.664582083 +0200
-@@ -0,0 +1,4 @@
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure, configure.ac (skipdirs): Add target-libiberty.
-+
-diff -Naur gcc-4.4.6.orig/configure gcc-4.4.6/configure
---- gcc-4.4.6.orig/configure 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure 2011-04-18 14:32:36.667582125 +0200
-@@ -2267,6 +2267,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -6259,7 +6260,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/configure.ac gcc-4.4.6/configure.ac
---- gcc-4.4.6.orig/configure.ac 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure.ac 2011-04-18 14:32:36.668582138 +0200
-@@ -502,6 +502,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -2560,7 +2561,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/gcc/ChangeLog.rtems gcc-4.4.6/gcc/ChangeLog.rtems
---- gcc-4.4.6.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/ChangeLog.rtems 2011-04-18 14:32:36.669582151 +0200
-@@ -0,0 +1,54 @@
-+2011-02-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/t-rtems: Remove -mcpu=601 multilib.
-+ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib.
-+
-+2010-03-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ Patch from Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>:
-+ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support
-+ for vfp FPU model
-+
-+2010-02-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rtems.h: Abandon -qrtems_debug.
-+
-+2009-12-01 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN.
-+
-+2009-11-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/m32c/rtems.h, config/m68k/rtemself.h,
-+ config/m68k/rtemself.h, config/sh/rtemself.h,
-+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
-+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
-+ to interfere and cause wchar_t/wint_t incompatibilities).
-+
-+2009-10-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/t-rtems: Don't build _exit.
-+
-+ Jon Beniston <jon at beniston.com>
-+
-+ * config/lm32/arithmetic.c, config/lm32/crti.S,
-+ config/lm32/crtn.S, config/lm32/lib1funcs.S,
-+ config/lm32/lm32.c, config/lm32/lm32.h,
-+ config/lm32/lm32.md, config/lm32/lm32.opt,
-+ config/lm32/lm32-protos.h, config/lm32/predicates.md,
-+ config/lm32/rtems.h, config/lm32/sfp-machine.h,
-+ config/lm32/t-fprules-softfp, config/lm32/t-lm32,
-+ config/lm32/uclinux-elf.h: New (lm32 port).
-+ * config.gcc: Add lm32* targets.
-+ * doc/contrib.texi, doc/invoke.texi: Add lm32.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/rtems.h: Support for custom RTEMS multilibs.
-+ Support TARGET_E500.
-+ * config/rs6000/t-rtems: Custom RTEMS multilibs.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
-+
-\ No newline at end of file
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h gcc-4.4.6/gcc/config/arm/rtems-elf.h
---- gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/rtems-elf.h 2011-04-18 14:32:36.669582151 +0200
-@@ -36,7 +36,7 @@
- */
- #undef SUBTARGET_EXTRA_ASM_SPEC
- #define SUBTARGET_EXTRA_ASM_SPEC "\
-- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
-+ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}"
-
- /*
- * The default includes --start-group and --end-group which conflicts
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/t-rtems gcc-4.4.6/gcc/config/arm/t-rtems
---- gcc-4.4.6.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/t-rtems 2011-04-18 14:32:36.669582151 +0200
-@@ -5,6 +5,41 @@
- MULTILIB_EXCEPTIONS =
- MULTILIB_MATCHES = marm=mno-thumb
-
--MULTILIB_OPTIONS += msoft-float/mhard-float
--MULTILIB_DIRNAMES += soft fpu
--MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
-+MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp
-+MULTILIB_DIRNAMES += fpu softfp
-+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp*
-+MULTILIB_MATCHES =
-+
-+MULTILIB_OPTIONS += mfpu=vfp
-+MULTILIB_DIRNAMES += vfp
-+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
-+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
-+
-+# default float model is fpa, so don't create a explicit copy of it
-+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
-+
-+# permutations of the options which are useful (+) or make no sense (-),
-+# defaults are in brackets:
-+# + (arm/soft/fpa)
-+# + (arm/soft)/vfp
-+# - (arm)/softfp(/fpa)
-+# + (arm)/softfp/vfp
-+# + (arm)/hard-float(/fpa)
-+# - (arm)/hard-float/vfp
-+# + thumb/(soft/fpa)
-+# + thumb/(soft/)vfp
-+# - thumb/softfp/fpa
-+# - thumb/softfp/vfp
-+# - thumb/hard-float/fpa
-+# - thumb/hard-float/vfp
-+
-+# subdirs to be used for multilibs and their respective options:
-+#/thumb/vfp -> thumb/soft/vfp
-+#/thumb/fpa -> thumb/soft/fpa
-+#/thumb -> thumb/soft/fpa
-+#/vfp -> arm/soft/vfp
-+#/softfp/vfp -> arm/softfp/cfp
-+#/fpu/fpa -> arm/hard/fpa
-+#/fpu -> arm/hard/fpa
-+#/fpa -> arm/soft/fpa
-+#. -> arm/soft/fpa
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/avr.h gcc-4.4.6/gcc/config/avr/avr.h
---- gcc-4.4.6.orig/gcc/config/avr/avr.h 2009-03-28 22:09:50.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/avr.h 2011-04-18 14:32:36.669582151 +0200
-@@ -811,12 +811,15 @@
- mmcu=at90can64*|\
- mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
- %{!mmcu*: -m avr2}\
--%{mmcu=at90s1200|\
-+%{mmcu=avr1|\
-+ mmcu=at90s1200|\
- mmcu=attiny11|\
- mmcu=attiny12|\
- mmcu=attiny15|\
- mmcu=attiny28: -m avr1}\
--%{mmcu=attiny22|\
-+%{mmcu=avr2|\
-+ mmcu=avr25|\
-+ mmcu=attiny22|\
- mmcu=attiny26|\
- mmcu=at90s2*|\
- mmcu=at90s4*|\
-@@ -831,14 +834,18 @@
- mmcu=attiny261|\
- mmcu=attiny4*|\
- mmcu=attiny8*: -m avr2}\
--%{mmcu=atmega103|\
-+%{mmcu=avr3|\
-+ mmcu=avr31|\
-+ mmcu=avr35|\
-+ mmcu=atmega103|\
- mmcu=at43*|\
- mmcu=at76*|\
- mmcu=at90usb82|\
- mmcu=at90usb162|\
- mmcu=attiny16*|\
- mmcu=attiny32*: -m avr3}\
--%{mmcu=atmega8*|\
-+%{mmcu=avr4|\
-+ mmcu=atmega8*|\
- mmcu=atmega4*|\
- mmcu=at90pwm1|\
- mmcu=at90pwm2|\
-@@ -846,7 +853,9 @@
- mmcu=at90pwm3|\
- mmcu=at90pwm3b|\
- mmcu=at90pwm81: -m avr4}\
--%{mmcu=atmega16*|\
-+%{mmcu=avr5|\
-+ mmcu=avr51|\
-+ mmcu=atmega16*|\
- mmcu=atmega32*|\
- mmcu=atmega406|\
- mmcu=atmega64*|\
-@@ -860,7 +869,8 @@
- mmcu=at94k|\
- mmcu=m3000*|\
- mmcu=m3001*: -m avr5}\
--%{mmcu=atmega256*:-m avr6}\
-+%{mmcu=avr6|\
-+ mmcu=atmega256*:-m avr6}\
- %{mmcu=atmega324*|\
- mmcu=atmega325*|\
- mmcu=atmega328p|\
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/t-rtems gcc-4.4.6/gcc/config/avr/t-rtems
---- gcc-4.4.6.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/t-rtems 2011-04-18 14:32:36.669582151 +0200
-@@ -1,3 +1,4 @@
- # Multilibs for avr RTEMS targets.
-
--# ATM, this is just a stub
-+# RTEMS uses _exit from newlib
-+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c gcc-4.4.6/gcc/config/lm32/arithmetic.c
---- gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/arithmetic.c 2011-04-18 14:32:36.670582164 +0200
-@@ -0,0 +1,305 @@
-+/* Fixed-point arithmetic for Lattice Mico32.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; either version 2, or (at your option) any
-+ later version.
-+
-+ In addition to the permissions in the GNU General Public License, the
-+ Free Software Foundation gives you unlimited permission to link the
-+ compiled version of this file into combinations with other programs,
-+ and to distribute those combinations without any restriction coming
-+ from the use of this file. (The General Public License restrictions
-+ do apply in other respects; for example, they cover modification of
-+ the file, and distribution when not linked into a combine
-+ executable.)
-+
-+ This file is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; see the file COPYING. If not, write to
-+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+typedef unsigned long UQItype __attribute__ ((mode (QI)));
-+typedef long SItype __attribute__ ((mode (SI)));
-+typedef unsigned long USItype __attribute__ ((mode (SI)));
-+
-+/* Prototypes */
-+
-+USItype __mulsi3 (USItype a, USItype b);
-+
-+USItype __udivmodsi4 (USItype num, USItype den, int modwanted);
-+SItype __divsi3 (SItype a, SItype b);
-+SItype __modsi3 (SItype a, SItype b);
-+USItype __udivsi3 (USItype a, USItype b);
-+USItype __umodsi3 (USItype a, USItype b);
-+
-+SItype __ashlsi3 (SItype a, SItype b);
-+SItype __ashrsi3 (SItype a, SItype b);
-+USItype __lshrsi3 (USItype a, USItype b);
-+
-+/* Multiplication */
-+
-+#ifdef L_mulsi3
-+USItype
-+__mulsi3 (USItype a, USItype b)
-+{
-+ USItype result;
-+
-+ result = 0;
-+
-+ if (a==0)
-+ return 0;
-+
-+ while (b!=0)
-+ {
-+ if (b & 1)
-+ result += a;
-+ a <<= 1;
-+ b >>= 1;
-+ }
-+
-+ return result;
-+}
-+#endif
-+
-+/* Division */
-+
-+#ifdef L_udivmodsi4
-+USItype
-+__udivmodsi4 (USItype num, USItype den, int modwanted)
-+{
-+ USItype bit = 1;
-+ USItype res = 0;
-+
-+ while (den < num && bit && !(den & (1L<<31)))
-+ {
-+ den <<=1;
-+ bit <<=1;
-+ }
-+ while (bit)
-+ {
-+ if (num >= den)
-+ {
-+ num -= den;
-+ res |= bit;
-+ }
-+ bit >>=1;
-+ den >>=1;
-+ }
-+ if (modwanted)
-+ return num;
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_divsi3
-+
-+static const UQItype __divsi3_table[] = {
-+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 7, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 8, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 9, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
-+ 0, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-+ 0, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
-+ 0, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0,
-+ 0, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0,
-+ 0, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0,
-+ 0, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
-+};
-+
-+SItype
-+__divsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba;
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (((USItype)(a | b)) < 16)
-+ {
-+ res = __divsi3_table[(a << 4) + b];
-+ }
-+ else
-+ {
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = !neg;
-+ }
-+
-+ if (b < 0)
-+ {
-+ b = -b;
-+ neg = !neg;
-+ }
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("divu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 0);
-+
-+ if (neg)
-+ res = -res;
-+ }
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_modsi3
-+SItype
-+__modsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = 1;
-+ }
-+
-+ if (b < 0)
-+ b = -b;
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("modu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 1);
-+
-+ if (neg)
-+ res = -res;
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_udivsi3
-+USItype
-+__udivsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 0);
-+}
-+#endif
-+
-+#ifdef L_umodsi3
-+USItype
-+__umodsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 1);
-+}
-+#endif
-+
-+#if 0
-+
-+/* Shifts - Optimized versions implemented in assembly. Use these if code space is preferred to performance. */
-+
-+#ifdef L_ashlsi3
-+SItype
-+__ashlsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ a += a;
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_ashrsi3
-+SItype
-+__ashrsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("sri %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_lshrsi3
-+USItype
-+__lshrsi3 (USItype a, USItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("srui %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#endif
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crti.S gcc-4.4.6/gcc/config/lm32/crti.S
---- gcc-4.4.6.orig/gcc/config/lm32/crti.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crti.S 2011-04-18 14:32:36.670582164 +0200
-@@ -0,0 +1,45 @@
-+# crti.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+ .global _init
-+ .type _init, at function
-+ .align 4
-+_init:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-+
-+ .section .fini
-+ .global _fini
-+ .type _fini, at function
-+ .align 4
-+_fini:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crtn.S gcc-4.4.6/gcc/config/lm32/crtn.S
---- gcc-4.4.6.orig/gcc/config/lm32/crtn.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crtn.S 2011-04-18 14:32:36.670582164 +0200
-@@ -0,0 +1,42 @@
-+# crtn.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-+ .section .fini
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S gcc-4.4.6/gcc/config/lm32/lib1funcs.S
---- gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lib1funcs.S 2011-04-18 14:32:36.671582177 +0200
-@@ -0,0 +1,429 @@
-+# lib1funcs.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+/* Arithmetic left shift */
-+
-+ .text
-+
-+ .global __ashlsi3
-+ .type __ashlsi3, at function
-+ .align 4
-+
-+__ashlsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashlsi3_table)
-+ addi r3, r3, gotofflo16(__ashlsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashlsi3_table)
-+ ori r3, r3, lo(__ashlsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashlsi3_31:
-+ add r1, r1, r1
-+__ashlsi3_30:
-+ add r1, r1, r1
-+__ashlsi3_29:
-+ add r1, r1, r1
-+__ashlsi3_28:
-+ add r1, r1, r1
-+__ashlsi3_27:
-+ add r1, r1, r1
-+__ashlsi3_26:
-+ add r1, r1, r1
-+__ashlsi3_25:
-+ add r1, r1, r1
-+__ashlsi3_24:
-+ add r1, r1, r1
-+__ashlsi3_23:
-+ add r1, r1, r1
-+__ashlsi3_22:
-+ add r1, r1, r1
-+__ashlsi3_21:
-+ add r1, r1, r1
-+__ashlsi3_20:
-+ add r1, r1, r1
-+__ashlsi3_19:
-+ add r1, r1, r1
-+__ashlsi3_18:
-+ add r1, r1, r1
-+__ashlsi3_17:
-+ add r1, r1, r1
-+__ashlsi3_16:
-+ add r1, r1, r1
-+__ashlsi3_15:
-+ add r1, r1, r1
-+__ashlsi3_14:
-+ add r1, r1, r1
-+__ashlsi3_13:
-+ add r1, r1, r1
-+__ashlsi3_12:
-+ add r1, r1, r1
-+__ashlsi3_11:
-+ add r1, r1, r1
-+__ashlsi3_10:
-+ add r1, r1, r1
-+__ashlsi3_9:
-+ add r1, r1, r1
-+__ashlsi3_8:
-+ add r1, r1, r1
-+__ashlsi3_7:
-+ add r1, r1, r1
-+__ashlsi3_6:
-+ add r1, r1, r1
-+__ashlsi3_5:
-+ add r1, r1, r1
-+__ashlsi3_4:
-+ add r1, r1, r1
-+__ashlsi3_3:
-+ add r1, r1, r1
-+__ashlsi3_2:
-+ add r1, r1, r1
-+__ashlsi3_1:
-+ add r1, r1, r1
-+__ashlsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashlsi3_table:
-+ .word __ashlsi3_0
-+ .word __ashlsi3_1
-+ .word __ashlsi3_2
-+ .word __ashlsi3_3
-+ .word __ashlsi3_4
-+ .word __ashlsi3_5
-+ .word __ashlsi3_6
-+ .word __ashlsi3_7
-+ .word __ashlsi3_8
-+ .word __ashlsi3_9
-+ .word __ashlsi3_10
-+ .word __ashlsi3_11
-+ .word __ashlsi3_12
-+ .word __ashlsi3_13
-+ .word __ashlsi3_14
-+ .word __ashlsi3_15
-+ .word __ashlsi3_16
-+ .word __ashlsi3_17
-+ .word __ashlsi3_18
-+ .word __ashlsi3_19
-+ .word __ashlsi3_20
-+ .word __ashlsi3_21
-+ .word __ashlsi3_22
-+ .word __ashlsi3_23
-+ .word __ashlsi3_24
-+ .word __ashlsi3_25
-+ .word __ashlsi3_26
-+ .word __ashlsi3_27
-+ .word __ashlsi3_28
-+ .word __ashlsi3_29
-+ .word __ashlsi3_30
-+ .word __ashlsi3_31
-+
-+/* Logical right shift */
-+
-+ .text
-+
-+ .global __lshrsi3
-+ .type __lshrsi3, at function
-+ .align 4
-+
-+__lshrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__lshrsi3_table)
-+ addi r3, r3, gotofflo16(__lshrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__lshrsi3_table)
-+ ori r3, r3, lo(__lshrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__lshrsi3_31:
-+ srui r1, r1, 1
-+__lshrsi3_30:
-+ srui r1, r1, 1
-+__lshrsi3_29:
-+ srui r1, r1, 1
-+__lshrsi3_28:
-+ srui r1, r1, 1
-+__lshrsi3_27:
-+ srui r1, r1, 1
-+__lshrsi3_26:
-+ srui r1, r1, 1
-+__lshrsi3_25:
-+ srui r1, r1, 1
-+__lshrsi3_24:
-+ srui r1, r1, 1
-+__lshrsi3_23:
-+ srui r1, r1, 1
-+__lshrsi3_22:
-+ srui r1, r1, 1
-+__lshrsi3_21:
-+ srui r1, r1, 1
-+__lshrsi3_20:
-+ srui r1, r1, 1
-+__lshrsi3_19:
-+ srui r1, r1, 1
-+__lshrsi3_18:
-+ srui r1, r1, 1
-+__lshrsi3_17:
-+ srui r1, r1, 1
-+__lshrsi3_16:
-+ srui r1, r1, 1
-+__lshrsi3_15:
-+ srui r1, r1, 1
-+__lshrsi3_14:
-+ srui r1, r1, 1
-+__lshrsi3_13:
-+ srui r1, r1, 1
-+__lshrsi3_12:
-+ srui r1, r1, 1
-+__lshrsi3_11:
-+ srui r1, r1, 1
-+__lshrsi3_10:
-+ srui r1, r1, 1
-+__lshrsi3_9:
-+ srui r1, r1, 1
-+__lshrsi3_8:
-+ srui r1, r1, 1
-+__lshrsi3_7:
-+ srui r1, r1, 1
-+__lshrsi3_6:
-+ srui r1, r1, 1
-+__lshrsi3_5:
-+ srui r1, r1, 1
-+__lshrsi3_4:
-+ srui r1, r1, 1
-+__lshrsi3_3:
-+ srui r1, r1, 1
-+__lshrsi3_2:
-+ srui r1, r1, 1
-+__lshrsi3_1:
-+ srui r1, r1, 1
-+__lshrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__lshrsi3_table:
-+ .word __lshrsi3_0
-+ .word __lshrsi3_1
-+ .word __lshrsi3_2
-+ .word __lshrsi3_3
-+ .word __lshrsi3_4
-+ .word __lshrsi3_5
-+ .word __lshrsi3_6
-+ .word __lshrsi3_7
-+ .word __lshrsi3_8
-+ .word __lshrsi3_9
-+ .word __lshrsi3_10
-+ .word __lshrsi3_11
-+ .word __lshrsi3_12
-+ .word __lshrsi3_13
-+ .word __lshrsi3_14
-+ .word __lshrsi3_15
-+ .word __lshrsi3_16
-+ .word __lshrsi3_17
-+ .word __lshrsi3_18
-+ .word __lshrsi3_19
-+ .word __lshrsi3_20
-+ .word __lshrsi3_21
-+ .word __lshrsi3_22
-+ .word __lshrsi3_23
-+ .word __lshrsi3_24
-+ .word __lshrsi3_25
-+ .word __lshrsi3_26
-+ .word __lshrsi3_27
-+ .word __lshrsi3_28
-+ .word __lshrsi3_29
-+ .word __lshrsi3_30
-+ .word __lshrsi3_31
-+
-+/* Arithmetic right shift */
-+
-+ .text
-+
-+ .global __ashrsi3
-+ .type __ashrsi3, at function
-+ .align 4
-+
-+__ashrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashrsi3_table)
-+ addi r3, r3, gotofflo16(__ashrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashrsi3_table)
-+ ori r3, r3, lo(__ashrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashrsi3_31:
-+ sri r1, r1, 1
-+__ashrsi3_30:
-+ sri r1, r1, 1
-+__ashrsi3_29:
-+ sri r1, r1, 1
-+__ashrsi3_28:
-+ sri r1, r1, 1
-+__ashrsi3_27:
-+ sri r1, r1, 1
-+__ashrsi3_26:
-+ sri r1, r1, 1
-+__ashrsi3_25:
-+ sri r1, r1, 1
-+__ashrsi3_24:
-+ sri r1, r1, 1
-+__ashrsi3_23:
-+ sri r1, r1, 1
-+__ashrsi3_22:
-+ sri r1, r1, 1
-+__ashrsi3_21:
-+ sri r1, r1, 1
-+__ashrsi3_20:
-+ sri r1, r1, 1
-+__ashrsi3_19:
-+ sri r1, r1, 1
-+__ashrsi3_18:
-+ sri r1, r1, 1
-+__ashrsi3_17:
-+ sri r1, r1, 1
-+__ashrsi3_16:
-+ sri r1, r1, 1
-+__ashrsi3_15:
-+ sri r1, r1, 1
-+__ashrsi3_14:
-+ sri r1, r1, 1
-+__ashrsi3_13:
-+ sri r1, r1, 1
-+__ashrsi3_12:
-+ sri r1, r1, 1
-+__ashrsi3_11:
-+ sri r1, r1, 1
-+__ashrsi3_10:
-+ sri r1, r1, 1
-+__ashrsi3_9:
-+ sri r1, r1, 1
-+__ashrsi3_8:
-+ sri r1, r1, 1
-+__ashrsi3_7:
-+ sri r1, r1, 1
-+__ashrsi3_6:
-+ sri r1, r1, 1
-+__ashrsi3_5:
-+ sri r1, r1, 1
-+__ashrsi3_4:
-+ sri r1, r1, 1
-+__ashrsi3_3:
-+ sri r1, r1, 1
-+__ashrsi3_2:
-+ sri r1, r1, 1
-+__ashrsi3_1:
-+ sri r1, r1, 1
-+__ashrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashrsi3_table:
-+ .word __ashrsi3_0
-+ .word __ashrsi3_1
-+ .word __ashrsi3_2
-+ .word __ashrsi3_3
-+ .word __ashrsi3_4
-+ .word __ashrsi3_5
-+ .word __ashrsi3_6
-+ .word __ashrsi3_7
-+ .word __ashrsi3_8
-+ .word __ashrsi3_9
-+ .word __ashrsi3_10
-+ .word __ashrsi3_11
-+ .word __ashrsi3_12
-+ .word __ashrsi3_13
-+ .word __ashrsi3_14
-+ .word __ashrsi3_15
-+ .word __ashrsi3_16
-+ .word __ashrsi3_17
-+ .word __ashrsi3_18
-+ .word __ashrsi3_19
-+ .word __ashrsi3_20
-+ .word __ashrsi3_21
-+ .word __ashrsi3_22
-+ .word __ashrsi3_23
-+ .word __ashrsi3_24
-+ .word __ashrsi3_25
-+ .word __ashrsi3_26
-+ .word __ashrsi3_27
-+ .word __ashrsi3_28
-+ .word __ashrsi3_29
-+ .word __ashrsi3_30
-+ .word __ashrsi3_31
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.c gcc-4.4.6/gcc/config/lm32/lm32.c
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.c 2011-04-18 14:32:36.672582190 +0200
-@@ -0,0 +1,869 @@
-+/* Subroutines used for code generation on the Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tm.h"
-+#include "rtl.h"
-+#include "regs.h"
-+#include "hard-reg-set.h"
-+#include "basic-block.h"
-+#include "real.h"
-+#include "insn-config.h"
-+#include "conditions.h"
-+#include "insn-flags.h"
-+#include "insn-attr.h"
-+#include "insn-codes.h"
-+#include "recog.h"
-+#include "output.h"
-+#include "tree.h"
-+#include "expr.h"
-+#include "flags.h"
-+#include "reload.h"
-+#include "tm_p.h"
-+#include "function.h"
-+#include "toplev.h"
-+#include "optabs.h"
-+#include "libfuncs.h"
-+#include "ggc.h"
-+#include "target.h"
-+#include "target-def.h"
-+#include "langhooks.h"
-+#include "tm-constrs.h"
-+#include "df.h"
-+
-+struct lm32_frame_info
-+{
-+ HOST_WIDE_INT total_size; /* number of bytes that the entire frame takes up. */
-+ HOST_WIDE_INT callee_size; /* number of bytes to save callee save registers */
-+ HOST_WIDE_INT pretend_size; /* number of bytes we push and pretend caller did. */
-+ HOST_WIDE_INT args_size; /* number of bytes that outgoing arguments take up. */
-+ HOST_WIDE_INT locals_size; /* number of bytes that local variables take up. */
-+ unsigned int reg_save_mask; /* mask of saved registers. */
-+};
-+
-+/* Prototypes for static functions */
-+static rtx emit_add (rtx dest, rtx src0, rtx src1);
-+static void expand_save_restore (struct lm32_frame_info *info, int op);
-+static void abort_with_insn (rtx insn, const char *reason);
-+static void stack_adjust (HOST_WIDE_INT amount);
-+static bool lm32_in_small_data_p (const_tree);
-+static void lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl);
-+
-+/* Detemines if given constant can be used as a displacement */
-+#define OFFSET_INT(X) (((X) > -32768) && ((X) < 32768))
-+
-+#undef TARGET_ADDRESS_COST
-+#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
-+#undef TARGET_IN_SMALL_DATA_P
-+#define TARGET_IN_SMALL_DATA_P lm32_in_small_data_p
-+#undef TARGET_PROMOTE_FUNCTION_ARGS
-+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
-+#undef TARGET_PROMOTE_FUNCTION_RETURN
-+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
-+#undef TARGET_SETUP_INCOMING_VARARGS
-+#define TARGET_SETUP_INCOMING_VARARGS lm32_setup_incoming_varargs
-+#undef TARGET_PROMOTE_PROTOTYPES
-+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
-+
-+struct gcc_target targetm = TARGET_INITIALIZER;
-+
-+/* Current frame information calculated by lm32_compute_frame_size. */
-+static struct lm32_frame_info current_frame_info;
-+
-+rtx lm32_compare_op0;
-+rtx lm32_compare_op1;
-+
-+/* Return non-zero if the specified return type should be returned in memory */
-+int
-+lm32_return_in_memory (tree type)
-+{
-+ HOST_WIDE_INT size;
-+
-+ if (!AGGREGATE_TYPE_P (type))
-+ {
-+ /* All simple types are returned in registers. */
-+ return 0;
-+ }
-+
-+ size = int_size_in_bytes (type);
-+ if (size >=0 && size <= UNITS_PER_WORD)
-+ {
-+ /* If it can fit in one register */
-+ return 0;
-+ }
-+
-+ return 1;
-+}
-+
-+/* Determine if given constant can be used as a register displacement */
-+int
-+const_ok_for_base_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-+{
-+ int val;
-+
-+ val = INTVAL (op);
-+ return OFFSET_INT (val);
-+}
-+
-+/* Generate an emit a word sized add instruction */
-+static rtx
-+emit_add (rtx dest, rtx src0, rtx src1)
-+{
-+ rtx insn;
-+ insn = emit_insn (gen_addsi3 (dest, src0, src1));
-+ return insn;
-+}
-+
-+/* Generate the code to compare (and possibly branch) two integer values
-+ TEST_CODE is the comparison code we are trying to emulate
-+ (or implement directly)
-+ RESULT is where to store the result of the comparison,
-+ or null to emit a branch
-+ CMP0 CMP1 are the two comparison operands
-+ DESTINATION is the destination of the branch, or null to only compare
-+ */
-+
-+void
-+gen_int_relational (enum rtx_code code, /* relational test (EQ, etc) */
-+ rtx result, /* result to store comp. or 0 if branch */
-+ rtx cmp0, /* first operand to compare */
-+ rtx cmp1, /* second operand to compare */
-+ rtx destination) /* destination of the branch, or 0 if compare */
-+{
-+ enum machine_mode mode;
-+ int branch_p;
-+
-+ mode = GET_MODE (cmp0);
-+ if (mode == VOIDmode)
-+ mode = GET_MODE (cmp1);
-+
-+ /* Is this a branch or compare */
-+ branch_p = (destination != 0);
-+
-+ /* Instruction set doesn't support LE or LT, so swap operands and use GE, GT */
-+ switch (code)
-+ {
-+ case LE:
-+ case LT:
-+ case LEU:
-+ case LTU:
-+ code = swap_condition (code);
-+ rtx temp = cmp0;
-+ cmp0 = cmp1;
-+ cmp1 = temp;
-+ break;
-+ default:
-+ break;
-+ }
-+
-+ if (branch_p)
-+ {
-+ rtx insn;
-+
-+ /* Operands must be in registers */
-+ if (!register_operand (cmp0, mode))
-+ cmp0 = force_reg (mode, cmp0);
-+ if (!register_operand (cmp1, mode))
-+ cmp1 = force_reg (mode, cmp1);
-+
-+ /* Generate conditional branch instruction */
-+ rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1);
-+ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
-+ insn = gen_rtx_SET (VOIDmode, pc_rtx,
-+ gen_rtx_IF_THEN_ELSE (VOIDmode,
-+ cond, label, pc_rtx));
-+ emit_jump_insn (insn);
-+ }
-+ else
-+ {
-+ /* We can't have const_ints in cmp0, other than 0 */
-+ if ((GET_CODE (cmp0) == CONST_INT) && (INTVAL (cmp0) != 0))
-+ cmp0 = force_reg (mode, cmp0);
-+
-+ /* If the comparison is against an int not in legal range
-+ move it into a register */
-+ if (GET_CODE (cmp1) == CONST_INT)
-+ {
-+ HOST_WIDE_INT value = INTVAL (cmp1);
-+ switch (code)
-+ {
-+ case EQ: case NE: case LE: case LT: case GE: case GT:
-+ if (!MEDIUM_INT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ case LEU: case LTU: case GEU: case GTU:
-+ if (!MEDIUM_UINT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ default:
-+ abort ();
-+ }
-+ }
-+
-+ /* Generate compare instruction */
-+ emit_move_insn (result, gen_rtx_fmt_ee (code, mode, cmp0, cmp1));
-+ }
-+}
-+
-+/* Generate and emit RTL to save or restore callee save registers */
-+static void
-+expand_save_restore (struct lm32_frame_info *info, int op)
-+{
-+ unsigned int reg_save_mask = info->reg_save_mask;
-+ int regno;
-+ HOST_WIDE_INT offset;
-+ rtx insn;
-+
-+ /* Callee saves are below locals and above outgoing arguments */
-+ offset = info->args_size + info->callee_size;
-+ for (regno = 0; regno <= 31; regno++)
-+ {
-+ if ((reg_save_mask & (1 << regno)) != 0)
-+ {
-+ if (op == 0)
-+ {
-+ insn = emit_move_insn (gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))),
-+ gen_rtx_REG (word_mode, regno));
-+ }
-+ else
-+ {
-+ insn = emit_move_insn (gen_rtx_REG (word_mode, regno),
-+ gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))));
-+ }
-+
-+ /* only prologue instructions which set the sp fp or save a
-+ register should be marked as frame related */
-+ if (op==0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ offset -= UNITS_PER_WORD;
-+ }
-+ }
-+}
-+
-+static void
-+stack_adjust (HOST_WIDE_INT amount)
-+{
-+ rtx insn;
-+
-+ if (!MEDIUM_INT (amount))
-+ {
-+ /* r10 is caller saved so it can be used as a temp reg */
-+ rtx r10;
-+ r10 = gen_rtx_REG (word_mode, 10);
-+ insn = emit_move_insn (r10, GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ insn = emit_add (stack_pointer_rtx, stack_pointer_rtx, r10);
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+ else
-+ {
-+ insn = emit_add (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+}
-+
-+
-+/* Create and emit instructions for a functions prologue */
-+void
-+lm32_expand_prologue (void)
-+{
-+ rtx insn;
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Add space on stack new frame */
-+ stack_adjust (-current_frame_info.total_size);
-+
-+ /* Save callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 0);
-+
-+ /* Setup frame pointer if it's needed */
-+ if (frame_pointer_needed == 1)
-+ {
-+ /* Load offset - Don't use total_size, as that includes pretend_size, which isn't part of this frame? */
-+ insn = emit_move_insn (frame_pointer_rtx, GEN_INT ( current_frame_info.args_size
-+ + current_frame_info.callee_size
-+ + current_frame_info.locals_size));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Add in sp */
-+ insn = emit_add (frame_pointer_rtx,
-+ frame_pointer_rtx,
-+ stack_pointer_rtx);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+
-+ /* Prevent prologue from being scheduled into function body */
-+ emit_insn (gen_blockage ());
-+ }
-+}
-+
-+/* Create an emit instructions for a functions epilogue */
-+void
-+lm32_expand_epilogue (void)
-+{
-+ rtx ra_rtx = gen_rtx_REG (Pmode, RA_REGNUM);
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Prevent stack code from being reordered */
-+ emit_insn (gen_blockage ());
-+
-+ /* Restore callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 1);
-+
-+ /* Deallocate stack */
-+ stack_adjust (current_frame_info.total_size);
-+
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+ else
-+ {
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+}
-+
-+/* Return the bytes needed to compute the frame pointer from the current
-+ stack pointer. */
-+HOST_WIDE_INT
-+lm32_compute_frame_size (int size)
-+{
-+ int regno;
-+ HOST_WIDE_INT total_size, locals_size, args_size, pretend_size, callee_size;
-+ unsigned int reg_save_mask;
-+
-+ locals_size = size;
-+ args_size = crtl->outgoing_args_size;
-+ pretend_size = crtl->args.pretend_args_size;
-+ callee_size = 0;
-+ reg_save_mask = 0;
-+
-+ /* Build mask that actually determines which regsiters we save
-+ and calculate size required to store them in the stack. */
-+ for (regno = 1; regno < SP_REGNUM; regno++)
-+ {
-+ if (df_regs_ever_live_p(regno) && !call_used_regs[regno])
-+ {
-+ reg_save_mask |= 1 << regno;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ }
-+ if (df_regs_ever_live_p(RA_REGNUM) || !current_function_is_leaf || !optimize)
-+ {
-+ reg_save_mask |= 1 << RA_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ if (!(reg_save_mask & (1 << FP_REGNUM)) && frame_pointer_needed)
-+ {
-+ reg_save_mask |= 1 << FP_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+
-+ /* Compute total frame size */
-+ total_size = pretend_size + args_size + locals_size + callee_size;
-+
-+ /* Align frame to appropriate boundary */
-+ total_size = (total_size+3) & ~3;
-+
-+ /* Save computed information. */
-+ current_frame_info.total_size = total_size;
-+ current_frame_info.callee_size = callee_size;
-+ current_frame_info.pretend_size = pretend_size;
-+ current_frame_info.locals_size = locals_size;
-+ current_frame_info.args_size = args_size;
-+ current_frame_info.reg_save_mask = reg_save_mask;
-+
-+ return total_size;
-+}
-+
-+void
-+lm32_print_operand (FILE *file, rtx op, int letter)
-+{
-+ register enum rtx_code code;
-+
-+ if (! op)
-+ {
-+ error ("PRINT_OPERAND null pointer");
-+ abort ();
-+ }
-+
-+ code = GET_CODE (op);
-+
-+ if (code == SIGN_EXTEND)
-+ op = XEXP (op, 0), code = GET_CODE (op);
-+ else if (code == REG || code == SUBREG)
-+ {
-+ int regnum;
-+
-+ if (code == REG)
-+ regnum = REGNO (op);
-+ else
-+ regnum = true_regnum (op);
-+
-+ if ( (letter == 'H' && !WORDS_BIG_ENDIAN)
-+ || (letter == 'L' && WORDS_BIG_ENDIAN))
-+ {
-+ abort();
-+ regnum++;
-+ }
-+
-+ fprintf (file, "%s", reg_names[regnum]);
-+ }
-+ else if (code == MEM)
-+ output_address (XEXP (op, 0));
-+ else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0)
-+ fprintf (file, "%s", reg_names[0]);
-+ else if (GET_CODE (op) == CONST_DOUBLE)
-+ {
-+ if ((CONST_DOUBLE_LOW (op) != 0) || (CONST_DOUBLE_HIGH (op) != 0))
-+ output_operand_lossage ("Only 0.0 can be loaded as an immediate");
-+ else
-+ fprintf (file, "0");
-+ }
-+ else if (code == EQ)
-+ fprintf (file, "e ");
-+ else if (code == NE)
-+ fprintf (file, "ne ");
-+ else if (code == GT)
-+ fprintf (file, "g ");
-+ else if (code == GTU)
-+ fprintf (file, "gu ");
-+ else if (code == LT)
-+ fprintf (file, "l ");
-+ else if (code == LTU)
-+ fprintf (file, "lu ");
-+ else if (code == GE)
-+ fprintf (file, "ge ");
-+ else if (code == GEU)
-+ fprintf (file, "geu");
-+ else if (code == LE)
-+ fprintf (file, "le ");
-+ else if (code == LEU)
-+ fprintf (file, "leu");
-+ else
-+ output_addr_const (file, op);
-+}
-+
-+/* A C compound statement to output to stdio stream STREAM the
-+ assembler syntax for an instruction operand that is a memory
-+ reference whose address is ADDR. ADDR is an RTL expression.
-+
-+ On some machines, the syntax for a symbolic address depends on
-+ the section that the address refers to. On these machines,
-+ define the macro `ENCODE_SECTION_INFO' to store the information
-+ into the `symbol_ref', and then check for it here. */
-+
-+void
-+lm32_print_operand_address (FILE *file, rtx addr)
-+{
-+ switch (GET_CODE (addr))
-+ {
-+ case REG:
-+ fprintf (file, "(%s+0)", reg_names [REGNO (addr)]);
-+ break;
-+
-+ case MEM:
-+ output_address (XEXP (addr, 0));
-+ break;
-+
-+ case PLUS:
-+ {
-+ rtx arg0 = XEXP (addr, 0);
-+ rtx arg1 = XEXP (addr, 1);
-+
-+ if (GET_CODE (arg0) == REG && CONSTANT_P (arg1))
-+ {
-+ if (GET_CODE(arg1) == CONST_INT)
-+ fprintf (file, "(%s+%ld)", reg_names [REGNO (arg0)], INTVAL (arg1));
-+ else
-+ {
-+ fprintf (file, "(%s+", reg_names [REGNO (arg0)]);
-+ output_addr_const (file, arg1);
-+ fprintf (file, ")");
-+ }
-+ }
-+ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1))
-+ output_addr_const (file, addr);
-+ else
-+ abort_with_insn (addr, "bad operand");
-+ }
-+ break;
-+
-+ case SYMBOL_REF:
-+ if (SYMBOL_REF_SMALL_P (addr))
-+ {
-+ fprintf (file, "gp(");
-+ output_addr_const (file, addr);
-+ fprintf (file, ")");
-+ }
-+ else
-+ abort_with_insn (addr, "can't use non gp relative absolute address");
-+ break;
-+
-+ default:
-+ abort_with_insn (addr, "invalid addressing mode");
-+ break;
-+ }
-+}
-+
-+/* Determine where to put an argument to a function.
-+ Value is zero to push the argument on the stack,
-+ or a hard register in which to store the argument.
-+
-+ MODE is the argument's machine mode.
-+ TYPE is the data type of the argument (as a tree).
-+ This is null for libcalls where that information may
-+ not be available.
-+ CUM is a variable of type CUMULATIVE_ARGS which gives info about
-+ the preceding args and about the function being called.
-+ NAMED is nonzero if this argument is a named parameter
-+ (otherwise it is an extra parameter matching an ellipsis). */
-+
-+rtx
-+lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named)
-+{
-+ if (mode == VOIDmode)
-+ /* Compute operand 2 of the call insn. */
-+ return GEN_INT (0);
-+
-+ if (targetm.calls.must_pass_in_stack (mode, type))
-+ return NULL_RTX;
-+
-+ if (!named || (cum + LM32_NUM_REGS2(mode, type) > LM32_NUM_ARG_REGS))
-+ return NULL_RTX;
-+
-+ return gen_rtx_REG (mode, cum + LM32_FIRST_ARG_REG);
-+}
-+
-+HOST_WIDE_INT
-+lm32_compute_initial_elimination_offset (int from, int to)
-+{
-+ HOST_WIDE_INT offset = 0;
-+
-+ switch (from)
-+ {
-+ /*case FRAME_POINTER_REGNUM: - Same as ARG_POINTER_REGNUM */
-+ case ARG_POINTER_REGNUM:
-+ switch (to)
-+ {
-+ case FRAME_POINTER_REGNUM:
-+ offset = 0;
-+ break;
-+ case STACK_POINTER_REGNUM:
-+ offset = lm32_compute_frame_size (get_frame_size ()) - current_frame_info.pretend_size;
-+ break;
-+ default:
-+ abort ();
-+ }
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ return offset;
-+}
-+
-+static void
-+lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl)
-+{
-+ int first_anon_arg;
-+ tree fntype;
-+ int stdarg_p;
-+
-+ fntype = TREE_TYPE (current_function_decl);
-+ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0
-+ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
-+ != void_type_node));
-+
-+ if (stdarg_p)
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG;
-+ else
-+ {
-+ /* this is the common case, we have been passed details setup
-+ for the last named argument, we want to skip over the
-+ registers, if any used in passing this named paramter in
-+ order to determine which is the first registers used to pass
-+ anonymous arguments */
-+ int size;
-+
-+ if (mode==BLKmode)
-+ size = int_size_in_bytes (type);
-+ else
-+ size = GET_MODE_SIZE (mode);
-+
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG + ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
-+ }
-+
-+ if ((first_anon_arg < (LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS)) && !no_rtl)
-+ {
-+ int first_reg_offset = first_anon_arg;
-+ int size = LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS - first_anon_arg;
-+ rtx regblock;
-+
-+ regblock = gen_rtx_MEM (BLKmode,
-+ plus_constant (arg_pointer_rtx,
-+ FIRST_PARM_OFFSET (0)));
-+ move_block_from_reg (first_reg_offset, regblock, size);
-+
-+ *pretend_size = size * UNITS_PER_WORD;
-+ }
-+}
-+
-+/* Abort after printing out a specific insn. */
-+static void
-+abort_with_insn (rtx insn, const char *reason)
-+{
-+ error (reason);
-+ debug_rtx (insn);
-+ abort ();
-+}
-+
-+/* Override command line options */
-+void
-+lm32_override_options (void)
-+{
-+ /* We must have sign-extend enabled if barrel-shift isn't */
-+ if (!MASK_BARREL_SHIFT_ENABLED)
-+ {
-+ warning (0, "neither -mbarrel-shift-enabled nor -msign-extend-enabled specified. Assuming -msign-extend-enabled");
-+ target_flags |= MASK_SIGN_EXTEND_ENABLED;
-+ }
-+}
-+
-+/* Return nonzero if this function is known to have a null epilogue.
-+ This allows the optimizer to omit jumps to jumps if no stack
-+ was created. */
-+int
-+lm32_can_use_return (void)
-+{
-+ if (!reload_completed)
-+ return 0;
-+
-+ if (df_regs_ever_live_p(RA_REGNUM) || crtl->profile)
-+ return 0;
-+
-+ if (lm32_compute_frame_size (get_frame_size ()) != 0)
-+ return 0;
-+
-+ return 1;
-+}
-+
-+/* Support function to determine the return address of the function
-+ 'count' frames back up the stack. */
-+rtx
-+lm32_return_addr_rtx (int count, rtx frame)
-+{
-+ rtx r;
-+ if (count == 0)
-+ {
-+ /* *mjs* This test originally used leaf_function_p (), we now use
-+ the regs_ever_live test which I *think* is more accurate. */
-+ if (!df_regs_ever_live_p(RA_REGNUM))
-+ {
-+ r = gen_rtx_REG (Pmode, RA_REGNUM);
-+ }
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ }
-+ else if (flag_omit_frame_pointer)
-+ r = NULL_RTX;
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ return r;
-+}
-+
-+/* Return true if EXP should be placed in the small data section. */
-+
-+static bool
-+lm32_in_small_data_p (const_tree exp)
-+{
-+ /* We want to merge strings, so we never consider them small data. */
-+ if (TREE_CODE (exp) == STRING_CST)
-+ return false;
-+
-+ /* Functions are never in the small data area. Duh. */
-+ if (TREE_CODE (exp) == FUNCTION_DECL)
-+ return false;
-+
-+ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
-+ {
-+ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
-+ if (strcmp (section, ".sdata") == 0
-+ || strcmp (section, ".sbss") == 0)
-+ return true;
-+ }
-+ else
-+ {
-+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
-+
-+ /* If this is an incomplete type with size 0, then we can't put it
-+ in sdata because it might be too big when completed. */
-+ if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+/* Emit straight-line code to move LENGTH bytes from SRC to DEST.
-+ Assume that the areas do not overlap. */
-+
-+static void
-+lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length, HOST_WIDE_INT alignment)
-+{
-+ HOST_WIDE_INT offset, delta;
-+ unsigned HOST_WIDE_INT bits;
-+ int i;
-+ enum machine_mode mode;
-+ rtx *regs;
-+
-+ /* Work out how many bits to move at a time. */
-+ switch (alignment)
-+ {
-+ case 1:
-+ bits = 8;
-+ break;
-+ case 2:
-+ bits = 16;
-+ break;
-+ case 4:
-+ bits = 32;
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ mode = mode_for_size (bits, MODE_INT, 0);
-+ delta = bits / BITS_PER_UNIT;
-+
-+ /* Allocate a buffer for the temporary registers. */
-+ regs = alloca (sizeof (rtx) * length / delta);
-+
-+ /* Load as many BITS-sized chunks as possible. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ {
-+ regs[i] = gen_reg_rtx (mode);
-+ emit_move_insn (regs[i], adjust_address (src, mode, offset));
-+ }
-+
-+ /* Copy the chunks to the destination. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ emit_move_insn (adjust_address (dest, mode, offset), regs[i]);
-+
-+ /* Mop up any left-over bytes. */
-+ if (offset < length)
-+ {
-+ src = adjust_address (src, BLKmode, offset);
-+ dest = adjust_address (dest, BLKmode, offset);
-+ move_by_pieces (dest, src, length - offset,
-+ MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), 0);
-+ }
-+}
-+
-+/* Expand string/block move operations.
-+
-+ operands[0] is the pointer to the destination.
-+ operands[1] is the pointer to the source.
-+ operands[2] is the number of bytes to move.
-+ operands[3] is the alignment. */
-+
-+int
-+lm32_expand_block_move (rtx *operands)
-+{
-+ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) <= 32))
-+ {
-+ lm32_block_move_inline (operands[0], operands[1], INTVAL (operands[2]), INTVAL (operands[3]));
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
-+ isn't protected by a PIC unspec. */
-+int
-+nonpic_symbol_mentioned_p (rtx x)
-+{
-+ register const char *fmt;
-+ register int i;
-+
-+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF
-+ || GET_CODE (x) == PC)
-+ return 1;
-+
-+ /* We don't want to look into the possible MEM location of a
-+ CONST_DOUBLE, since we're not going to use it, in general. */
-+ if (GET_CODE (x) == CONST_DOUBLE)
-+ return 0;
-+
-+ if (GET_CODE (x) == UNSPEC)
-+ return 0;
-+
-+ fmt = GET_RTX_FORMAT (GET_CODE (x));
-+ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
-+ {
-+ if (fmt[i] == 'E')
-+ {
-+ register int j;
-+
-+ for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-+ if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j)))
-+ return 1;
-+ }
-+ else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i)))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.h gcc-4.4.6/gcc/config/lm32/lm32.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.h 2011-04-18 14:32:36.674582217 +0200
-@@ -0,0 +1,657 @@
-+/* Definitions of target machine for GNU compiler, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/*-------------------------------*/
-+/* Run-time Target Specification */
-+/*-------------------------------*/
-+
-+/* Print subsidiary information on the compiler version in use. */
-+#ifndef TARGET_VERSION
-+#define TARGET_VERSION fprintf (stderr, " (LatticeMico32)")
-+#endif
-+
-+/* Target CPU builtins. */
-+#define TARGET_CPU_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__lm32__"); \
-+ builtin_define_std ("lm32"); \
-+ builtin_assert ("cpu=lm32"); \
-+ builtin_assert ("machine=lm32"); \
-+ } \
-+ while (0)
-+
-+#define CPP_SPEC "\
-+%{mmultiply-enabled:-D__multiply_enabled__} \
-+%{mdivide-enabled:-D__divide_enabled__} \
-+%{mbarrel-shift-enabled:-D__barrel_shift_enabled__} \
-+%{msign-extend-enabled:-D__sign_extend_enabled__} \
-+%{muser-enabled:-D__user_enabled__} \
-+"
-+
-+#undef ASM_SPEC
-+#define ASM_SPEC "\
-+%{mmultiply-enabled} \
-+%{mdivide-enabled} \
-+%{mbarrel-shift-enabled} \
-+%{msign-extend-enabled} \
-+%{muser-extend-enabled} \
-+%{v} \
-+"
-+
-+/* Let link script define all link options.
-+ Default to using simulator link script. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC ""
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC ""
-+#undef LIB_SPEC
-+#define LIB_SPEC "%{!T*:-T sim.ld}"
-+
-+#define OVERRIDE_OPTIONS lm32_override_options()
-+
-+extern int target_flags;
-+
-+/* Add -G xx support. */
-+
-+#undef SWITCH_TAKES_ARG
-+#define SWITCH_TAKES_ARG(CHAR) \
-+(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*}"
-+
-+extern struct rtx_def *lm32_compare_op0;
-+extern struct rtx_def *lm32_compare_op1;
-+
-+/*---------------------------------*/
-+/* Target machine storage layout. */
-+/*---------------------------------*/
-+
-+#define BITS_BIG_ENDIAN 0
-+#define BYTES_BIG_ENDIAN 1
-+#define WORDS_BIG_ENDIAN 1
-+#define LIBGCC2_WORDS_BIG_ENDIAN 1
-+
-+#define BITS_PER_UNIT 8
-+#define BITS_PER_WORD 32
-+#define UNITS_PER_WORD 4
-+
-+#define POINTER_SIZE 32
-+
-+#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
-+do { \
-+ if (GET_MODE_CLASS (MODE) == MODE_INT \
-+ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
-+ (MODE) = word_mode; \
-+} while (0)
-+
-+#define PARM_BOUNDARY 32
-+
-+#define STACK_BOUNDARY 32
-+
-+#define BIGGEST_ALIGNMENT 64
-+
-+#define FUNCTION_BOUNDARY 32
-+
-+#define EMPTY_FIELD_BOUNDARY 32
-+
-+#define STRICT_ALIGNMENT 1
-+
-+#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
-+
-+/* Make strings word-aligned so strcpy from constants will be faster. */
-+#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
-+ (TREE_CODE (EXP) == STRING_CST \
-+ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
-+
-+/* Make arrays and structures word-aligned to allow faster copying etc. */
-+#define DATA_ALIGNMENT(TYPE, ALIGN) \
-+ ((((ALIGN) < BITS_PER_WORD) \
-+ && (TREE_CODE (TYPE) == ARRAY_TYPE \
-+ || TREE_CODE (TYPE) == UNION_TYPE \
-+ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))
-+
-+/* We need this for the same reason as DATA_ALIGNMENT, namely to cause
-+ character arrays to be word-aligned so that `strcpy' calls that copy
-+ constants to character arrays can be done inline, and 'strcmp' can be
-+ optimised to use word loads. */
-+#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
-+ DATA_ALIGNMENT (TYPE, ALIGN)
-+
-+/*----------------------------------------*/
-+/* Layout of source language data types. */
-+/*----------------------------------------*/
-+
-+#define INT_TYPE_SIZE 32
-+#define SHORT_TYPE_SIZE 16
-+#define LONG_TYPE_SIZE 32
-+#define LONG_LONG_TYPE_SIZE 64
-+
-+#define FLOAT_TYPE_SIZE 32
-+#define DOUBLE_TYPE_SIZE 64
-+#define LONG_DOUBLE_TYPE_SIZE 64
-+
-+#define DEFAULT_SIGNED_CHAR 0
-+
-+#define SIZE_TYPE "unsigned int"
-+
-+#define PTRDIFF_TYPE "int"
-+
-+/*---------------------------*/
-+/* Standard register usage. */
-+/*---------------------------*/
-+
-+#define FIRST_PSEUDO_REGISTER 32
-+
-+#define RV_REGNUM 1
-+#define GP_REGNUM 26
-+#define FP_REGNUM 27
-+#define SP_REGNUM 28
-+#define RA_REGNUM 29
-+
-+#define G_REG_P(X) ((X)<32)
-+#define PSEUDO_REG_P(X) ((X)>=FIRST_PSEUDO_REGISTER)
-+
-+#define FIXED_REGISTERS \
-+{ 1, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define CALL_USED_REGISTERS \
-+{ 1, 1, 1, 1, 1, 1, 1, 1, \
-+ 1, 1, 1, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define HARD_REGNO_NREGS(REGNO, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define HARD_REGNO_MODE_OK(REGNO, MODE) G_REG_P(REGNO)
-+
-+#define MODES_TIEABLE_P(MODE1, MODE2) \
-+( GET_MODE_CLASS (MODE1) == MODE_INT \
-+ && GET_MODE_CLASS (MODE2) == MODE_INT \
-+ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
-+ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
-+
-+#define AVOID_CCMODE_COPIES
-+
-+/*----------------------------------*/
-+/* Register classes and constants. */
-+/*----------------------------------*/
-+
-+enum reg_class {
-+ NO_REGS,
-+ GENERAL_REGS,
-+ ALL_REGS,
-+ LIM_REG_CLASSES
-+};
-+
-+#define N_REG_CLASSES (int) LIM_REG_CLASSES
-+
-+#define REG_CLASS_NAMES { "NO_REGS", "GENERAL_REGS", "ALL_REGS" }
-+
-+#define REG_CLASS_CONTENTS \
-+{ {0x00000000}, \
-+ {0xffffffff}, \
-+ {0xffffffff} \
-+}
-+
-+#define REGNO_REG_CLASS(REGNO) \
-+ (G_REG_P(REGNO) ? GENERAL_REGS : NO_REGS)
-+
-+#define CLASS_MAX_NREGS(CLASS, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define INDEX_REG_CLASS NO_REGS
-+
-+#define BASE_REG_CLASS GENERAL_REGS
-+
-+#define REG_CLASS_FROM_LETTER(C) NO_REGS
-+
-+#ifdef REG_OK_STRICT
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || G_REG_P (reg_renumber[REGNO]))
-+#else
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || PSEUDO_REG_P (REGNO))
-+#endif
-+
-+#define REGNO_OK_FOR_INDEX_P(REGNO) 0
-+
-+#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
-+
-+/* The letters I, J, K, L, M, N, O, P in a register constraint string
-+ can be used to stand for particular ranges of immediate operands.
-+ This macro defines what the ranges are.
-+ C is the letter, and VALUE is a constant value.
-+ Return 1 if VALUE is in the range specified by C.
-+
-+ Lattice usage:
-+
-+ J - 0
-+ K - 16-bit signed
-+ L - 16-bit unsigned
-+ M - 32-bit signed
-+ */
-+#define MEDIUM_INT(X) ((((HOST_WIDE_INT)(X)) >= -32768) && (((HOST_WIDE_INT)(X)) < 32768))
-+#define MEDIUM_UINT(X) (((unsigned HOST_WIDE_INT)(X)) < 65536)
-+#define LARGE_INT(X) \
-+((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
-+ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
-+
-+#define CONST_OK_FOR_LETTER_P(VALUE, C) \
-+( (C) == 'J' ? (VALUE) == 0 \
-+ : (C) == 'K' ? MEDIUM_INT (VALUE) \
-+ : (C) == 'L' ? MEDIUM_UINT (VALUE) \
-+ : (C) == 'M' ? LARGE_INT (VALUE) \
-+ : 0 \
-+)
-+
-+#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
-+
-+/*----------------------------------------*/
-+/* Stack Layout and Calling Conventions. */
-+/*----------------------------------------*/
-+
-+#define STACK_GROWS_DOWNWARD 1
-+
-+#define FRAME_GROWS_DOWNWARD 1
-+
-+#define STACK_POINTER_OFFSET (UNITS_PER_WORD)
-+
-+#define STARTING_FRAME_OFFSET (UNITS_PER_WORD)
-+
-+#define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD)
-+
-+#define STACK_POINTER_REGNUM SP_REGNUM
-+
-+#define FRAME_POINTER_REGNUM FP_REGNUM
-+
-+#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
-+
-+#define FRAME_POINTER_REQUIRED (cfun->calls_alloca)
-+
-+#define RETURN_ADDR_RTX(count, frame) \
-+ lm32_return_addr_rtx (count, frame)
-+
-+/* FIXME! */
-+#define STATIC_CHAIN_REGNUM 3
-+
-+#define ELIMINABLE_REGS \
-+{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+}
-+
-+#define CAN_ELIMINATE(FROM, TO) \
-+ (((TO) == STACK_POINTER_REGNUM && frame_pointer_needed) ? 0 : 1)
-+
-+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
-+ (OFFSET) = lm32_compute_initial_elimination_offset (FROM, TO)
-+
-+/*-----------------------------*/
-+/* Function argument passing. */
-+/*-----------------------------*/
-+
-+#define ACCUMULATE_OUTGOING_ARGS 1
-+
-+#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
-+
-+/*--------------------------------*/
-+/* Passing Arguments in Registers */
-+/*--------------------------------*/
-+
-+/* The first argument register */
-+#define LM32_FIRST_ARG_REG 1
-+
-+/* The number of (integer) argument register available. */
-+#define LM32_NUM_ARG_REGS 8
-+
-+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-+ lm32_function_arg ((CUM), (MODE), (TYPE), (NAMED))
-+
-+#define CUMULATIVE_ARGS int
-+
-+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \
-+ (CUM) = 0
-+
-+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-+ (CUM) += LM32_NUM_REGS2 (MODE, TYPE)
-+
-+#define FUNCTION_ARG_REGNO_P(r) (((r) >= 1) && ((r) <= LM32_NUM_ARG_REGS))
-+
-+/*--------------------*/
-+/* Function results. */
-+/*--------------------*/
-+
-+#define FUNCTION_VALUE(VALTYPE, FUNC) \
-+ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \
-+ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
-+ ? word_mode \
-+ : TYPE_MODE (VALTYPE), \
-+ RV_REGNUM)
-+
-+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RV_REGNUM)
-+
-+#define FUNCTION_VALUE_REGNO_P(N) ((N) == RV_REGNUM)
-+
-+#define RETURN_IN_MEMORY(TYPE) lm32_return_in_memory (TYPE)
-+
-+#define DEFAULT_PCC_STRUCT_RETURN 0
-+
-+/* Convert from bytes to ints. */
-+#define LM32_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ type MODE. */
-+#define LM32_NUM_REGS(MODE) LM32_NUM_INTS (GET_MODE_SIZE (MODE))
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ TYPE MODE. */
-+#define LM32_NUM_REGS2(MODE, TYPE) \
-+ LM32_NUM_INTS ((MODE) == BLKmode ? \
-+ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))
-+
-+#define STRUCT_VALUE 0
-+
-+/*---------------------------*/
-+/* Function entry and exit. */
-+/*---------------------------*/
-+
-+/*-------------*/
-+/* Profiling. */
-+/*-------------*/
-+
-+#define FUNCTION_PROFILER(FILE, LABELNO)
-+
-+/*---------------*/
-+/* Trampolines. */
-+/*---------------*/
-+
-+#define INITIALIZE_TRAMPOLINE
-+#define TRAMPOLINE_SIZE 0
-+
-+/*---------------------*/
-+/* Addressing Modes. */
-+/*---------------------*/
-+
-+#define CONSTANT_ADDRESS_P(X) \
-+ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
-+ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \
-+ || (GET_CODE (X) == CONST)))
-+
-+#define MAX_REGS_PER_ADDRESS 1
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#else
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#endif
-+
-+#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X))
-+#define RTX_OK_FOR_STACK_P(X) (REG_P (X) && (REGNO (X) == STACK_POINTER_REGNUM))
-+#define CONST_OK_FOR_BASE_OFFSET(X, MODE) const_ok_for_base_offset ((X), (MODE))
-+
-+#define LEGITIMATE_BASE_INDEX_P(ADDR, MODE) \
-+( GET_CODE (ADDR)==PLUS \
-+ && RTX_OK_FOR_BASE_P (XEXP (ADDR, 0)) \
-+ && GET_CODE (XEXP (ADDR, 1)) == CONST_INT \
-+ && CONST_OK_FOR_BASE_OFFSET (XEXP ((ADDR), 1), (MODE)))
-+
-+#define LEGITIMATE_GPREL_P(ADDR) \
-+( GET_CODE (ADDR) == SYMBOL_REF \
-+ && SYMBOL_REF_SMALL_P (ADDR))
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#define GO_IF_LEGITIMATE_ADDRESS(m,x,l) \
-+{ \
-+ if (RTX_OK_FOR_BASE_P (x)) goto l; /* (rM) */ \
-+ else if (LEGITIMATE_BASE_INDEX_P (x, m)) goto l; /* (rM)+literal) */ \
-+ else if (LEGITIMATE_GPREL_P (x)) goto l; \
-+}
-+
-+#define ARM_LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
-+do { \
-+ if (flag_pic) \
-+ X = lm32_legitimize_pic_address (OLDX, MODE, NULL_RTX); \
-+} while (0)
-+
-+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-+ if (GET_CODE (ADDR) == PLUS) goto LABEL; \
-+
-+#define LEGITIMATE_CONSTANT_P(X) 1
-+
-+/*-------------------------*/
-+/* Condition Code Status. */
-+/*-------------------------*/
-+
-+#define REVERSIBLE_CC_MODE(MODE) 1
-+
-+/*---------*/
-+/* Costs. */
-+/*---------*/
-+
-+#define SLOW_BYTE_ACCESS 1
-+
-+#define NO_FUNCTION_CSE
-+
-+#define BRANCH_COST(speed_p, predictable_p) 4
-+
-+#define MOVE_RATIO(speed) (speed ? 24 : 3)
-+
-+/*------------*/
-+/* Sections. */
-+/*------------*/
-+
-+#define TEXT_SECTION_ASM_OP "\t.section\t.text"
-+#define DATA_SECTION_ASM_OP "\t.section\t.data"
-+#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\""
-+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
-+#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\""
-+
-+/*-------*/
-+/* PIC. */
-+/*-------*/
-+
-+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM)
-+
-+#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-+
-+#define LEGITIMATE_PIC_OPERAND_P(X) \
-+ (!(nonpic_symbol_mentioned_p (X)))
-+
-+/*-------------*/
-+/* Assembler. */
-+/*-------------*/
-+
-+#define ASM_COMMENT_START "#"
-+
-+#define ASM_APP_ON "#APP\n"
-+
-+#define ASM_APP_OFF "#NO_APP\n"
-+
-+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
-+ do { \
-+ fputc ( '\t', FILE); \
-+ assemble_name (FILE, LABEL1); \
-+ fputs ( " = ", FILE); \
-+ assemble_name (FILE, LABEL2); \
-+ fputc ( '\n', FILE); \
-+ } while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_LOCAL
-+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
-+do { \
-+ if ((SIZE) <= g_switch_value) \
-+ switch_to_section (sbss_section); \
-+ else \
-+ switch_to_section (bss_section); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+} while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_COMMON
-+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
-+do \
-+{ \
-+ if ((SIZE) <= g_switch_value) \
-+ { \
-+ switch_to_section (sbss_section); \
-+ (*targetm.asm_out.globalize_label) (FILE, NAME); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+ } \
-+ else \
-+ { \
-+ switch_to_section (bss_section); \
-+ fprintf ((FILE), "%s", COMMON_ASM_OP); \
-+ assemble_name ((FILE), (NAME)); \
-+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
-+ } \
-+} \
-+while (0)
-+
-+#define ASM_OUTPUT_LABEL(FILE, NAME) \
-+ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-+
-+#define ASM_OUTPUT_LABELREF(FILE,NAME) \
-+ do { \
-+ const char *xname = (NAME); \
-+ if (xname[0] == '@') \
-+ xname += 1; \
-+ if (xname[0] == '*') \
-+ xname += 1; \
-+ fputs (xname, FILE); \
-+ } while (0)
-+
-+#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \
-+ do { \
-+ assemble_name (STREAM, XSTR (SYMBOL, 0)); \
-+ } while (0)
-+
-+#define GLOBAL_ASM_OP "\t.global\t"
-+
-+#define REGISTER_NAMES \
-+{ \
-+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
-+ "r24", "r25", "gp", "fp", "sp", "ra", "ea", "ba"}
-+
-+#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
-+ (((CHAR) == '&') || ((CHAR) == '@') || ((CHAR) == '*'))
-+
-+#define PRINT_OPERAND(FILE, X, CODE) \
-+ lm32_print_operand (FILE, X, CODE)
-+
-+#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
-+ lm32_print_operand_address (FILE, ADDR)
-+
-+#ifndef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+#endif
-+
-+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-+ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", (1 << (LOG))); } while (0)
-+
-+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
-+do { \
-+ char label[64]; \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ fprintf (FILE, "\n\t.word\t"); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "\n"); \
-+} while (0)
-+
-+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-+do { \
-+ char label[64]; \
-+ fprintf (FILE, "\t.word\t("); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "-"); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, ")\n"); \
-+} while (0)
-+
-+/*-------------*/
-+/* Debugging. */
-+/*-------------*/
-+
-+#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
-+
-+#define CAN_DEBUG_WITHOUT_FP
-+
-+#define DEFAULT_GDB_EXTENSIONS 1
-+
-+/*--------*/
-+/* Misc. */
-+/*--------*/
-+
-+#define CASE_VECTOR_MODE Pmode
-+
-+#define WORD_REGISTER_OPERATIONS
-+
-+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
-+
-+#define SHORT_IMMEDIATES_SIGN_EXTEND
-+
-+#define MOVE_MAX UNITS_PER_WORD
-+#define MAX_MOVE_MAX 4
-+
-+#define SHIFT_COUNT_TRUNCATED 1
-+
-+#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-+
-+#define Pmode SImode
-+
-+#define FUNCTION_MODE SImode
-+
-+#ifndef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+#endif
-+
-+#define STORE_FLAG_VALUE 1
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.md gcc-4.4.6/gcc/config/lm32/lm32.md
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.md 2011-04-18 14:32:36.674582217 +0200
-@@ -0,0 +1,1233 @@
-+;; Machine description of the Lattice Mico32 architecture for GNU C compiler.
-+;; Contributed by Jon Beniston <jon at beniston.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
-+;; <http://www.gnu.org/licenses/>.
-+
-+;; Include predicate definitions
-+(include "predicates.md")
-+
-+;; Register numbers
-+(define_constants
-+ [(RA_REGNUM 29) ; return address register.
-+ ]
-+)
-+
-+;; LM32 specific volatile operations
-+(define_constants
-+ [(UNSPECV_BLOCKAGE 1)] ; use to prevent scheduler from optimising accross bounaries
-+)
-+
-+;; LM32 specific operations
-+(define_constants
-+ [(UNSPEC_GOT 2)
-+ (UNSPEC_GOTOFF_HI16 3)
-+ (UNSPEC_GOTOFF_LO16 4)]
-+)
-+
-+;; ---------------------------------
-+;; instruction types
-+;; ---------------------------------
-+
-+(define_attr "type"
-+ "unknown,load,store,arith,compare,shift,multiply,divide,call,icall,ubranch,uibranch,cbranch"
-+ (const_string "unknown"))
-+
-+;; ---------------------------------
-+;; instruction lengths
-+;; ---------------------------------
-+
-+; All instructions are 4 bytes
-+; Except for branches that are out of range, and have to be implemented
-+; as two instructions
-+(define_attr "length" ""
-+ (cond [
-+ (eq_attr "type" "cbranch")
-+ (if_then_else
-+ (lt (abs (minus (match_dup 2) (pc)))
-+ (const_int 32768)
-+ )
-+ (const_int 4)
-+ (const_int 8)
-+ )
-+ ]
-+ (const_int 4))
-+)
-+
-+;; ---------------------------------
-+;; scheduling
-+;; ---------------------------------
-+
-+(define_automaton "lm32")
-+
-+(define_cpu_unit "x" "lm32")
-+(define_cpu_unit "m" "lm32")
-+(define_cpu_unit "w" "lm32")
-+
-+(define_insn_reservation "singlecycle" 1
-+ (eq_attr "type" "store,arith,call,icall,ubranch,uibranch,cbranch")
-+ "x")
-+
-+(define_insn_reservation "twocycle" 2
-+ (eq_attr "type" "compare,shift,divide")
-+ "x,m")
-+
-+(define_insn_reservation "threecycle" 3
-+ (eq_attr "type" "load,multiply")
-+ "x,m,w")
-+
-+;; ---------------------------------
-+;; mov
-+;; ---------------------------------
-+
-+(define_expand "movqi"
-+ [(set (match_operand:QI 0 "general_operand" "")
-+ (match_operand:QI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operand0) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (QImode, operands[1]);
-+ }
-+ }
-+ if ( GET_CODE (operands[1]) == CONST_INT
-+ && GET_CODE (operands[0]) == REG)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ emit_insn (gen_movsi (operands[0], operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movhi"
-+ [(set (match_operand:HI 0 "general_operand" "")
-+ (match_operand:HI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (HImode, operands[1]);
-+ }
-+ }
-+ if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movsi"
-+ [(set (match_operand:SI 0 "general_operand" "")
-+ (match_operand:SI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM
-+ || (GET_CODE (operands[0]) == SUBREG
-+ && GET_CODE (SUBREG_REG (operands[0])) == MEM))
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (SImode, operands[1]);
-+ }
-+ }
-+
-+ if (flag_pic && symbolic_operand (operands[1], SImode))
-+ {
-+ if (GET_CODE (operands[1]) == LABEL_REF
-+ || (GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (operands[1])
-+ && !SYMBOL_REF_WEAK (operands[1])))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], operands[1]));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], operands[1]));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], operands[1]));
-+ }
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ else if (flag_pic && GET_CODE (operands[1]) == CONST)
-+ {
-+ rtx op = XEXP (operands[1], 0);
-+ if (GET_CODE (op) == PLUS)
-+ {
-+ rtx arg0 = XEXP (op, 0);
-+ rtx arg1 = XEXP (op, 1);
-+ if (GET_CODE (arg0) == LABEL_REF
-+ || (GET_CODE (arg0) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (arg0)
-+ && !SYMBOL_REF_WEAK (arg0)))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], arg0));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], arg0));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], arg0));
-+ }
-+ emit_insn (gen_addsi3 (operands[0], operands[0], arg1));
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_SMALL_P (operands[1])
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_gprel (operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == LABEL_REF
-+ || GET_CODE (operands[1]) == SYMBOL_REF
-+ || GET_CODE (operands[1]) == CONST
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_hi (operands[0], operands[1]));
-+ emit_insn (gen_movsi_reloc_lo (operands[0], operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+;;(define_expand "movmemsi"
-+;; [(parallel [(set (match_operand:BLK 0 "general_operand" "")
-+;; (match_operand:BLK 1 "general_operand" ""))
-+;; (use (match_operand:SI 2 "" ""))
-+;; (use (match_operand:SI 3 "const_int_operand" ""))])]
-+;; ""
-+;;{
-+;; if (!lm32_expand_block_move (operands))
-+;; FAIL;
-+;; DONE;
-+;;})
-+
-+;; ---------------------------------
-+;; load/stores/moves
-+;; ---------------------------------
-+
-+(define_insn "movsi_kimm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_K_operand" "K"))]
-+ ""
-+ "addi %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_limm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_L_operand" "L"))]
-+ ""
-+ "ori %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "immediate_operand" "i")))]
-+ ""
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "immediate_operand" "i")))]
-+ ""
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_gprel"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "reloc_operand" "i"))]
-+ "GET_CODE (operands[1]) == SYMBOL_REF && SYMBOL_REF_SMALL_P (operands[1])"
-+ "mva %0, gp(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_got"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))]
-+ "flag_pic"
-+ "lw %0, (gp+got(%1))"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_hi16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))]
-+ "flag_pic"
-+ "orhi %0, r0, gotoffhi16(%1)"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_lo16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))]
-+ "flag_pic"
-+ "addi %0, %1, gotofflo16(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*movqi_insn"
-+ [(set (match_operand:QI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:QI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ or %0, %1, r0
-+ sb %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movhi_insn"
-+ [(set (match_operand:HI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:HI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ or %0, %1, r0
-+ sh %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movsi_insn"
-+ [(set (match_operand:SI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:SI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lw %0, %1
-+ or %0, %1, r0
-+ sw %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+;; ---------------------------------
-+;; sign and zero extension
-+;; ---------------------------------
-+
-+(define_insn "*extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (sign_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (zero_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lh %0, %1
-+ sexth %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ andi %0, %1, 0xffff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+;; ---------------------------------
-+;; compare
-+;; ---------------------------------
-+
-+(define_expand "cmpsi"
-+ [(set (cc0)
-+ (compare:CC (match_operand:SI 0 "register_operand" "")
-+ (match_operand:SI 1 "register_or_K_operand" "")))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = operands[1];
-+ DONE;
-+}")
-+
-+
-+(define_expand "tstsi"
-+ [(set (cc0)
-+ (match_operand:SI 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = const0_rtx;
-+ DONE;
-+}")
-+
-+(define_expand "seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (eq:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (eq:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpe %0, %z1, %2
-+ cmpei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ne:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ne:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpne %0, %z1, %2
-+ cmpnei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpg %0, %z1, %2
-+ cmpgi %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "slt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ge:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ge:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpge %0, %z1, %2
-+ cmpgei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sle"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (le:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gtu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gtu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgu %0, %z1, %2
-+ cmpgui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sltu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ltu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (geu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (geu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgeu %0, %z1, %2
-+ cmpgeui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sleu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (leu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+;; ---------------------------------
-+;; unconditional branch
-+;; ---------------------------------
-+
-+(define_insn "jump"
-+ [(set (pc) (label_ref (match_operand 0 "" "")))]
-+ ""
-+ "bi %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+(define_expand "indirect_jump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ emit_jump_insn (gen_indirect_jumpsi (operands[0]));
-+ DONE;
-+}")
-+
-+(define_insn "indirect_jumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; conditional branch
-+;; ---------------------------------
-+
-+(define_expand "beq"
-+ [(set (pc)
-+ (if_then_else (eq:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (EQ, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bne"
-+ [(set (pc)
-+ (if_then_else (ne:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (NE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgt"
-+ [(set (pc)
-+ (if_then_else (gt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bge"
-+ [(set (pc)
-+ (if_then_else (ge:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "ble"
-+ [(set (pc)
-+ (if_then_else (le:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "blt"
-+ [(set (pc)
-+ (if_then_else (lt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bleu"
-+ [(set (pc)
-+ (if_then_else (leu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bltu"
-+ [(set (pc)
-+ (if_then_else (ltu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_insn "*beq"
-+ [(set (pc)
-+ (if_then_else (eq:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "be %z0,%z1,%2"
-+ : "bne %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bne"
-+ [(set (pc)
-+ (if_then_else (ne:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bne %z0,%z1,%2"
-+ : "be %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgt"
-+ [(set (pc)
-+ (if_then_else (gt:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bg %z0,%z1,%2"
-+ : "bge %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bge"
-+ [(set (pc)
-+ (if_then_else (ge:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bge %z0,%z1,%2"
-+ : "bg %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgu %z0,%z1,%2"
-+ : "bgeu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgeu %z0,%z1,%2"
-+ : "bgu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+;; ---------------------------------
-+;; call
-+;; ---------------------------------
-+
-+(define_expand "call"
-+ [(parallel [(call (match_operand 0 "memory_operand" "m")
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[0], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_via_regsi (addr, operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_via_regsi"
-+ [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %0"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_via_labelsi"
-+ [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "X"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %0"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_expand "call_value"
-+ [(parallel [(set (match_operand 0 "register_operand" "=r")
-+ (call (match_operand 1 "memory_operand" "m")
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[1], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_value_via_regsi (operands[0], addr, operands[2]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_value_via_regsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %1"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_value_via_labelsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "symbolic_operand" "X"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %1"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_insn "return_internalsi"
-+ [(use (match_operand:SI 0 "register_operand" "r"))
-+ (return)]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+(define_insn "return"
-+ [(return)]
-+ "lm32_can_use_return ()"
-+ "ret"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; switch/case statements
-+;; ---------------------------------
-+
-+(define_expand "tablejump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "
-+{
-+ rtx target = operands[0];
-+ if (flag_pic)
-+ {
-+ /* For PIC, the table entry is relative to the start of the table. */
-+ rtx label = gen_reg_rtx (SImode);
-+ target = gen_reg_rtx (SImode);
-+ emit_move_insn (label, gen_rtx_LABEL_REF (SImode, operands[1]));
-+ emit_insn (gen_addsi3 (target, operands[0], label));
-+ }
-+ emit_jump_insn (gen_tablejumpsi (target, operands[1]));
-+ DONE;
-+}")
-+
-+(define_insn "tablejumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+;; ---------------------------------
-+;; arithmetic
-+;; ---------------------------------
-+
-+(define_insn "addsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (plus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ add %0, %z1, %2
-+ addi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "subsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, %z1, %z2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "mulsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (mult:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ "TARGET_MULTIPLY_ENABLED"
-+ "@
-+ mul %0, %z1, %2
-+ muli %0, %z1, %2"
-+ [(set_attr "type" "multiply")]
-+)
-+
-+(define_insn "udivsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (udiv:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "divu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+(define_insn "umodsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (umod:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "modu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+;; ---------------------------------
-+;; negation and inversion
-+;; ---------------------------------
-+
-+(define_insn "negsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (neg:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, r0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "one_cmplsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (not:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "not %0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; logical
-+;; ---------------------------------
-+
-+(define_insn "andsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (and:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ and %0, %z1, %2
-+ andi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "iorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ or %0, %z1, %2
-+ ori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "xorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ xor %0, %z1, %2
-+ xori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*norsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ nor %0, %z1, %2
-+ nori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*xnorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ xnor %0, %z1, %2
-+ xnori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; shifts
-+;; ---------------------------------
-+
-+(define_insn "ashlsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashift:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sl %0, %z1, %2
-+ sli %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "ashrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sr %0, %z1, %2
-+ sri %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "lshrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (lshiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sru %0, %z1, %2
-+ srui %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+;; ---------------------------------
-+;; function entry / exit
-+;; ---------------------------------
-+
-+(define_expand "prologue"
-+ [(const_int 1)]
-+ ""
-+ "
-+{
-+ lm32_expand_prologue ();
-+ DONE;
-+}")
-+
-+(define_expand "epilogue"
-+ [(return)]
-+ ""
-+ "
-+{
-+ lm32_expand_epilogue ();
-+ DONE;
-+}")
-+
-+;; ---------------------------------
-+;; nop
-+;; ---------------------------------
-+
-+(define_insn "nop"
-+ [(const_int 0)]
-+ ""
-+ "nop"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; blockage
-+;; ---------------------------------
-+
-+;; used to stop the scheduler from
-+;; scheduling code across certain boundaries
-+
-+(define_insn "blockage"
-+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
-+ ""
-+ ""
-+ [(set_attr "length" "0")]
-+)
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.opt gcc-4.4.6/gcc/config/lm32/lm32.opt
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.opt 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.opt 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,40 @@
-+; Options for the Lattice Mico32 port of the compiler.
-+; Contributed by Jon Beniston <jon at beniston.com>
-+;
-+; Copyright (C) 2008 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it
-+; under the terms of the GNU General Public License as published
-+; by the Free Software Foundation; either version 3, or (at your
-+; option) any later version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT
-+; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+; License for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+mmultiply-enabled
-+Target Report Mask(MULTIPLY_ENABLED)
-+Enable multiply instructions
-+
-+mdivide-enabled
-+Target Report Mask(DIVIDE_ENABLED)
-+Enable divide and modulus instructions
-+
-+mbarrel-shift-enabled
-+Target Report Mask(BARREL_SHIFT_ENABLED)
-+Enable barrel shift instructions
-+
-+msign-extend-enabled
-+Target Report Mask(SIGN_EXTEND_ENABLED)
-+Enable sign extend instructions
-+
-+muser-enabled
-+Target Report Mask(USER_ENABLED)
-+Enable user-defined instructions
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h gcc-4.4.6/gcc/config/lm32/lm32-protos.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32-protos.h 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,52 @@
-+/* Prototypes of target machine functions, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+extern int lm32_return_in_memory (tree type);
-+extern void lm32_declare_object (FILE *stream, char *name, char *init_string,
-+ char *final_string, int size);
-+extern int symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_zero_operand (rtx op, enum machine_mode mode);
-+extern int register_or_K_operand (rtx op, enum machine_mode mode);
-+extern int constant_K_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_L_operand (rtx op, enum machine_mode mode);
-+extern int constant_L_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_memory_operand (rtx op, enum machine_mode mode);
-+extern int register_operand (rtx op, enum machine_mode mode);
-+extern int const_ok_for_base_offset (rtx op, enum machine_mode mode);
-+extern void lm32_expand_prologue (void);
-+extern void lm32_expand_epilogue (void);
-+extern HOST_WIDE_INT lm32_compute_frame_size (int size);
-+extern void lm32_print_operand (FILE *file, rtx op, int letter);
-+extern void lm32_print_operand_address (FILE *file, rtx addr);
-+extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named);
-+extern void lm32_override_options (void);
-+extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
-+ int to);
-+extern int lm32_can_use_return (void);
-+extern rtx lm32_return_addr_rtx (int count, rtx frame);
-+#ifdef RTX_CODE
-+extern void gen_int_relational (enum rtx_code code, rtx result, rtx cmp0,
-+ rtx cmp1, rtx destination);
-+#endif
-+extern int lm32_expand_block_move (rtx *);
-+extern int nonpic_symbol_mentioned_p (rtx);
-+extern rtx lm32_legitimize_pic_address (rtx, enum machine_mode, rtx);
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/predicates.md gcc-4.4.6/gcc/config/lm32/predicates.md
---- gcc-4.4.6.orig/gcc/config/lm32/predicates.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/predicates.md 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,58 @@
-+;; Predicate definitions for Lattice Mico32.
-+;; Contributed by Jon Beniston <jon at beniston.com>
-+;;
-+;; Copyright (C) 2008 Free Software Foundation, Inc.
-+;;
-+;; This file is part of GCC.
-+;;
-+;; GCC is free software; you can redistribute it and/or modify it
-+;; under the terms of the GNU General Public License as published
-+;; by the Free Software Foundation; either version 3, or (at your
-+;; option) any later version.
-+;;
-+;; GCC is distributed in the hope that it will be useful, but WITHOUT
-+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+;; License for more details.
-+;;
-+;; You should have received a copy of the GNU General Public License
-+;; along with GCC; see the file COPYING3. If not see
-+;; <http://www.gnu.org/licenses/>.
-+
-+(define_predicate "const0_operand"
-+ (and (match_code "const_int,const_double,const_vector")
-+ (match_test "op == CONST0_RTX (GET_MODE (op))")))
-+
-+(define_predicate "constant_K_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_INT (INTVAL (op))")))
-+
-+(define_predicate "constant_L_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_UINT (INTVAL (op))")))
-+
-+(define_predicate "register_or_zero_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "const0_operand")))
-+
-+(define_predicate "register_or_memory_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "memory_operand")))
-+
-+(define_predicate "register_or_K_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_K_operand")))
-+
-+(define_predicate "register_or_L_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_L_operand")))
-+
-+(define_predicate "reloc_operand"
-+ (ior (ior (match_code "label_ref")
-+ (match_code "symbol_ref"))
-+ (match_code "const")))
-+
-+(define_predicate "symbolic_operand"
-+ (ior (match_code "label_ref")
-+ (match_code "symbol_ref")))
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/rtems.h gcc-4.4.6/gcc/config/lm32/rtems.h
---- gcc-4.4.6.orig/gcc/config/lm32/rtems.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/rtems.h 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,32 @@
-+/* Definitions for rtems targeting a lm32 using ELF.
-+ Copyright (C) 2009, Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+/* Target OS builtins. */
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__rtems__"); \
-+ builtin_define ("__USE_INIT_FINI__"); \
-+ builtin_assert ("system=rtems"); \
-+ } \
-+ while (0)
-+
-+/* Use the default */
-+#undef LINK_GCC_C_SEQUENCE_SPEC
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h gcc-4.4.6/gcc/config/lm32/sfp-machine.h
---- gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/sfp-machine.h 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,51 @@
-+#define _FP_W_TYPE_SIZE 32
-+#define _FP_W_TYPE unsigned long
-+#define _FP_WS_TYPE signed long
-+#define _FP_I_TYPE long
-+
-+#define _FP_MUL_MEAT_S(R,X,Y) \
-+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_D(R,X,Y) \
-+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_Q(R,X,Y) \
-+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
-+
-+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
-+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
-+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
-+
-+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
-+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
-+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
-+#define _FP_NANSIGN_S 0
-+#define _FP_NANSIGN_D 0
-+#define _FP_NANSIGN_Q 0
-+
-+#define _FP_KEEPNANFRACP 1
-+
-+/* Someone please check this. */
-+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
-+ do { \
-+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
-+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
-+ { \
-+ R##_s = Y##_s; \
-+ _FP_FRAC_COPY_##wc(R,Y); \
-+ } \
-+ else \
-+ { \
-+ R##_s = X##_s; \
-+ _FP_FRAC_COPY_##wc(R,X); \
-+ } \
-+ R##_c = FP_CLS_NAN; \
-+ } while (0)
-+
-+#define __LITTLE_ENDIAN 1234
-+#define __BIG_ENDIAN 4321
-+
-+#define __BYTE_ORDER __BIG_ENDIAN
-+
-+/* Define ALIASNAME as a strong alias for NAME. */
-+# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-+# define _strong_alias(name, aliasname) \
-+ extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp gcc-4.4.6/gcc/config/lm32/t-fprules-softfp
---- gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-fprules-softfp 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,5 @@
-+softfp_float_modes := sf df
-+softfp_int_modes := si di
-+softfp_extensions := sfdf
-+softfp_truncations := dfsf
-+softfp_machine_header := lm32/sfp-machine.h
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-lm32 gcc-4.4.6/gcc/config/lm32/t-lm32
---- gcc-4.4.6.orig/gcc/config/lm32/t-lm32 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-lm32 2011-04-18 14:32:36.675582231 +0200
-@@ -0,0 +1,19 @@
-+LIB1ASMSRC = lm32/lib1funcs.S
-+LIB1ASMFUNCS = _ashlsi3 _ashrsi3 _lshrsi3
-+
-+LM32_LIB1CSRC = $(srcdir)/config/lm32/arithmetic.c
-+LIB2FUNCS_EXTRA = _mulsi3.c \
-+ _udivmodsi4.c _divsi3.c _modsi3.c _udivsi3.c _umodsi3.c
-+# Size optimised versions: _ashlsi3.c _ashrsi3.c _lshrsi3.c
-+
-+# The fixed-point arithmetic code is in one file
-+# similar to libgcc2.c (or the old libgcc1.c). We need to
-+# "split it up" with one file per define.
-+$(LIB2FUNCS_EXTRA): $(LM32_LIB1CSRC)
-+ name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \
-+ echo "#define L$$name" > tmp-$@ \
-+ && echo '#include "$<"' >> tmp-$@ \
-+ && mv -f tmp-$@ $@
-+
-+MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled
-+# Don't bother building multilib with mdivide-enabled, not much of a gain
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h gcc-4.4.6/gcc/config/lm32/uclinux-elf.h
---- gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/uclinux-elf.h 2011-04-18 14:32:36.680582297 +0200
-@@ -0,0 +1,85 @@
-+/* Definitions for LM32 running Linux-based GNU systems using ELF
-+ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-+ 2008 Free Software Foundation, Inc.
-+ Contributed by Philip Blundell <philb at gnu.org>
-+
-+ 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
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* elfos.h should have already been included. Now just override
-+ any conflicting definitions and add any extras. */
-+
-+/* Run-time Target Specification. */
-+#undef TARGET_VERSION
-+#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr);
-+
-+/* Do not assume anything about header files. */
-+#undef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+
-+/* The GNU C++ standard library requires that these macros be defined. */
-+#undef CPLUSPLUS_CPP_SPEC
-+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-+
-+/* Now we define the strings used to build the spec file. */
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ "%{pthread:-lpthread} \
-+ %{shared:-lc} \
-+ %{!shared:-lc} "
-+
-+#define LIBGCC_SPEC "-lgcc"
-+
-+/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
-+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main'. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared: \
-+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
-+ %{!p:%{profile:gcrt1.o%s} \
-+ %{!profile:crt1.o%s}}}} \
-+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
-+
-+/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
-+ the GNU/Linux magical crtend.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main', followed by a normal
-+ GNU/Linux "finalizer" file, `crtn.o'. */
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "%{h*} %{version:-v} \
-+ %{b} %{Wl,*:%*} \
-+ %{static:-Bstatic} \
-+ %{shared:-shared} \
-+ %{symbolic:-Bsymbolic} \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
-+
-+#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
-+
-+#define LINK_GCC_C_SEQUENCE_SPEC \
-+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/m32c/rtems.h gcc-4.4.6/gcc/config/m32c/rtems.h
---- gcc-4.4.6.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
-+++ gcc-4.4.6/gcc/config/m32c/rtems.h 2011-04-18 14:32:36.680582297 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/m68k/rtemself.h gcc-4.4.6/gcc/config/m68k/rtemself.h
---- gcc-4.4.6.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/m68k/rtemself.h 2011-04-18 14:32:36.680582297 +0200
-@@ -31,3 +31,8 @@
- builtin_assert ("system=rtems"); \
- } \
- while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/mips/elf.h gcc-4.4.6/gcc/config/mips/elf.h
---- gcc-4.4.6.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/mips/elf.h 2011-04-18 14:32:36.680582297 +0200
-@@ -48,6 +48,4 @@
- #undef ENDFILE_SPEC
- #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
--#define NO_IMPLICIT_EXTERN_C 1
--
- #define HANDLE_PRAGMA_PACK_PUSH_POP 1
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/rtems.h gcc-4.4.6/gcc/config/rs6000/rtems.h
---- gcc-4.4.6.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rs6000/rtems.h 2011-04-18 14:32:36.680582297 +0200
-@@ -49,8 +49,22 @@
- %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
- %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
- %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
--%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
-+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
-+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }"
-
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS \
- { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }
-+
-+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
-+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
-+ do { \
-+ if (TARGET_E500) \
-+ { \
-+ rs6000_float_gprs = 1; \
-+ } \
-+ } while(0)
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/t-rtems gcc-4.4.6/gcc/config/rs6000/t-rtems
---- gcc-4.4.6.orig/gcc/config/rs6000/t-rtems 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/rs6000/t-rtems 2011-04-18 14:32:36.680582297 +0200
-@@ -1,13 +1,29 @@
- # Multilibs for powerpc RTEMS targets.
-+#
-+# Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
-+#
-+# This file is part of GCC.
-+#
-+# GCC is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+#
-+# GCC is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with GCC; see the file COPYING3. If not see
-+# <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = \
--mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
--Dmpc8260 \
-+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
- msoft-float
-
- MULTILIB_DIRNAMES = \
--m403 m505 m601 m603e m604 m860 m7400 \
--mpc8260 \
-+m403 m505 m601 m603e m604 m860 m7400 m8540 \
- nof
-
- # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
-@@ -29,6 +45,9 @@
- # Map 750 to .
- MULTILIB_MATCHES += mcpu?750=
-
-+# Map 8548 to 8540
-+MULTILIB_MATCHES += mcpu?8540=mcpu?8548
-+
- # Soft-float only, default implies msoft-float
- # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
- MULTILIB_SOFTFLOAT_ONLY = \
-@@ -55,10 +74,3 @@
-
- # Special rules
- # Take out all variants we don't want
--MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
-diff -Naur gcc-4.4.6.orig/gcc/config/rtems.h gcc-4.4.6/gcc/config/rtems.h
---- gcc-4.4.6.orig/gcc/config/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rtems.h 2011-04-18 14:32:36.681582310 +0200
-@@ -38,6 +38,5 @@
- #undef LIB_SPEC
- #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
- "%{!nostdlib: %{qrtems: --start-group \
-- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \
-- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
-+ -lrtemsbsp -lrtemscpu \
- -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
-diff -Naur gcc-4.4.6.orig/gcc/config/sh/rtemself.h gcc-4.4.6/gcc/config/sh/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sh/rtemself.h 2011-04-18 14:32:36.681582310 +0200
-@@ -24,3 +24,8 @@
- builtin_define( "__rtems__" ); \
- builtin_assert( "system=rtems" ); \
- } while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/sparc/rtemself.h gcc-4.4.6/gcc/config/sparc/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sparc/rtemself.h 2011-04-18 14:32:36.681582310 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config.gcc gcc-4.4.6/gcc/config.gcc
---- gcc-4.4.6.orig/gcc/config.gcc 2011-02-18 22:39:51.000000000 +0100
-+++ gcc-4.4.6/gcc/config.gcc 2011-04-18 14:32:36.682582324 +0200
-@@ -1377,6 +1377,23 @@
- out_file=iq2000/iq2000.c
- md_file=iq2000/iq2000.md
- ;;
-+lm32-*-elf*)
-+ tm_file="dbxelf.h elfos.h ${tm_file}"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
-+lm32-*-rtems*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ tmake_file="${tmake_file} t-rtems"
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ ;;
-+lm32-*-uclinux*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
- m32r-*-elf*)
- tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
- extra_parts="crtinit.o crtfini.o"
-diff -Naur gcc-4.4.6.orig/gcc/doc/contrib.texi gcc-4.4.6/gcc/doc/contrib.texi
---- gcc-4.4.6.orig/gcc/doc/contrib.texi 2009-02-20 16:20:38.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/contrib.texi 2011-04-18 14:32:36.683582338 +0200
-@@ -55,7 +55,7 @@
- Wolfgang Bangerth for processing tons of bug reports.
-
- @item
--Jon Beniston for his Microsoft Windows port of Java.
-+Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32.
-
- @item
- Daniel Berlin for better DWARF2 support, faster/better optimizations,
-diff -Naur gcc-4.4.6.orig/gcc/doc/install.texi gcc-4.4.6/gcc/doc/install.texi
---- gcc-4.4.6.orig/gcc/doc/install.texi 2010-07-15 11:26:30.000000000 +0200
-+++ gcc-4.4.6/gcc/doc/install.texi 2011-04-18 14:32:36.684582352 +0200
-@@ -2660,6 +2660,10 @@
- @item
- @uref{#iq2000-x-elf,,iq2000-*-elf}
- @item
-+ at uref{#lm32-x-elf,,lm32-*-elf}
-+ at item
-+ at uref{#lm32-x-uclinux,,lm32-*-uclinux}
-+ at item
- @uref{#m32c-x-elf,,m32c-*-elf}
- @item
- @uref{#m32r-x-elf,,m32r-*-elf}
-@@ -3472,6 +3476,20 @@
- @html
- <hr />
- @end html
-+ at heading @anchor{lm32-x-elf}lm32-*-elf
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems.
-+
-+ at html
-+<hr />
-+ at end html
-+ at heading @anchor{lm32-x-uclinux}lm32-*-uclinux
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems running uClinux.
-+
-+ at html
-+<hr />
-+ at end html
- @heading @anchor{m32c-x-elf}m32c-*-elf
- Renesas M32C processor.
- This configuration is intended for embedded systems.
-diff -Naur gcc-4.4.6.orig/gcc/doc/invoke.texi gcc-4.4.6/gcc/doc/invoke.texi
---- gcc-4.4.6.orig/gcc/doc/invoke.texi 2011-03-23 23:02:12.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/invoke.texi 2011-04-18 14:32:36.689582417 +0200
-@@ -610,6 +610,10 @@
- -mno-sched-prefer-non-control-spec-insns @gol
- -mno-sched-count-spec-in-critical-path}
-
-+ at emph{LM32 Options}
-+ at gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol
-+-msign-extend-enabled -muser-enabled}
-+
- @emph{M32R/D Options}
- @gccoptlist{-m32r2 -m32rx -m32r @gol
- -mdebug @gol
-@@ -8858,6 +8862,7 @@
- * i386 and x86-64 Options::
- * i386 and x86-64 Windows Options::
- * IA-64 Options::
-+* LM32 Options::
- * M32C Options::
- * M32R/D Options::
- * M680x0 Options::
-@@ -11907,6 +11912,35 @@
-
- @end table
-
-+ at node LM32 Options
-+ at subsection LM32 Options
-+ at cindex LM32 options
-+
-+These @option{-m} options are defined for the Lattice Mico32 architecture:
-+
-+ at table @gcctabopt
-+ at item -mbarrel-shift-enabled
-+ at opindex mbarrel-shift-enabled
-+Enable barrel-shift instructions.
-+
-+ at item -mdivide-enabled
-+ at opindex mdivide-enabled
-+Enable divide and modulus instructions.
-+
-+ at item -mmultiply-enabled
-+ at opindex multiply-enabled
-+Enable multiply instructions.
-+
-+ at item -msign-extend-enabled
-+ at opindex msign-extend-enabled
-+Enable sign extend instructions.
-+
-+ at item -muser-enabled
-+ at opindex muser-enabled
-+Enable user-defined instructions.
-+
-+ at end table
-+
- @node M32R/D Options
- @subsection M32R/D Options
- @cindex M32R/D options
-diff -Naur gcc-4.4.6.orig/libgcc/ChangeLog.rtems gcc-4.4.6/libgcc/ChangeLog.rtems
---- gcc-4.4.6.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/ChangeLog.rtems 2011-04-18 14:32:36.689582417 +0200
-@@ -0,0 +1,5 @@
-+ Jon Beniston <jon at beniston.com>
-+
-+ * libgcc/config/lm32/t-elf, libgcc/config/lm32/t-uclinux,
-+ libgcc/config/lm32/t-uclinux: New (lm32 port).
-+ * libgcc/config.host: Add lm32* targets.
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-elf gcc-4.4.6/libgcc/config/lm32/t-elf
---- gcc-4.4.6.orig/libgcc/config/lm32/t-elf 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-elf 2011-04-18 14:32:36.689582417 +0200
-@@ -0,0 +1,12 @@
-+# Assemble startup files.
-+
-+$(T)crti.o: $(gcc_srcdir)/config/lm32/crti.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crti.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crti.S
-+
-+$(T)crtn.o: $(gcc_srcdir)/config/lm32/crtn.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crtn.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crtn.S
-+
-+CRTSTUFF_T_CFLAGS = -G 0
-+TARGET_LIBGCC2_CFLAGS = -G 0
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux gcc-4.4.6/libgcc/config/lm32/t-uclinux
---- gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-uclinux 2011-04-18 14:32:36.689582417 +0200
-@@ -0,0 +1,2 @@
-+CRTSTUFF_T_CFLAGS = -fPIC
-+TARGET_LIBGCC2_CFLAGS = -fPIC
-diff -Naur gcc-4.4.6.orig/libgcc/config.host gcc-4.4.6/libgcc/config.host
---- gcc-4.4.6.orig/libgcc/config.host 2009-04-17 13:58:41.000000000 +0200
-+++ gcc-4.4.6/libgcc/config.host 2011-04-18 14:32:36.689582417 +0200
-@@ -95,6 +95,9 @@
- hppa*-*-*)
- cpu_type=pa
- ;;
-+lm32*-*-*)
-+ cpu_type=lm32
-+ ;;
- m32r*-*-*)
- cpu_type=m32r
- ;;
-@@ -355,6 +358,14 @@
- ;;
- iq2000*-*-elf*)
- ;;
-+lm32-*-elf* | lm32-*-rtems*)
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ tmake_file="lm32/t-elf"
-+ ;;
-+lm32-*-uclinux*)
-+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-+ tmake_file="lm32/t-uclinux"
-+ ;;
- m32r-*-elf*|m32r-*-rtems*)
- ;;
- m32rle-*-elf*)
diff --git a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110420.diff b/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110420.diff
deleted file mode 100644
index cc2638a..0000000
--- a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110420.diff
+++ /dev/null
@@ -1,4928 +0,0 @@
-diff -Naur gcc-4.4.6.orig/ChangeLog.rtems gcc-4.4.6/ChangeLog.rtems
---- gcc-4.4.6.orig/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/ChangeLog.rtems 2011-04-20 17:27:23.044805682 +0200
-@@ -0,0 +1,9 @@
-+2011-04-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure, configure.ac (PPL): Merge gcc-4.6.0's ppl detection
-+ (Work-around build breakdown on fedora 15).
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure, configure.ac (skipdirs): Add target-libiberty.
-+
-diff -Naur gcc-4.4.6.orig/configure gcc-4.4.6/configure
---- gcc-4.4.6.orig/configure 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure 2011-04-20 17:27:23.049805736 +0200
-@@ -935,7 +935,8 @@
- --enable-gold use gold instead of ld
- --enable-libada build libada directory
- --enable-libssp build libssp directory
-- --disable-ppl-version-check disable check for PPL version
-+ --disable-ppl-version-check
-+ disable check for PPL version
- --disable-cloog-version-check disable check for CLooG version
- --enable-stage1-languages[=all] choose additional languages to build during
- stage1. Mostly useful for compiler development.
-@@ -971,11 +972,12 @@
- --with-gmp-lib=PATH specify directory for the installed GMP library
- --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
- when linking with PPL
-- --with-ppl=PATH Specify prefix directory for the installed PPL package
-- Equivalent to --with-ppl-include=PATH/include
-- plus --with-ppl-lib=PATH/lib
-- --with-ppl-include=PATH Specify directory for installed PPL include files
-- --with-ppl-lib=PATH Specify the directory for the installed PPL library
-+ --with-ppl=PATH specify prefix directory for the installed PPL
-+ package. Equivalent to
-+ --with-ppl-include=PATH/include plus
-+ --with-ppl-lib=PATH/lib
-+ --with-ppl-include=PATH specify directory for installed PPL include files
-+ --with-ppl-lib=PATH specify directory for the installed PPL library
- --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
- Equivalent to --with-cloog-include=PATH/include
- plus --with-cloog-lib=PATH/lib
-@@ -2267,6 +2269,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -4829,10 +4832,9 @@
- esac
-
- # Check for PPL
--ppl_major_version=0
--ppl_minor_version=10
--ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
-+ppllibs=
- pplinc=
-+pwllib=
-
-
- # Check whether --with-ppl or --without-ppl was given.
-@@ -4841,55 +4843,143 @@
-
- fi;
-
--# Check whether --with-ppl_include or --without-ppl_include was given.
-+# Check whether --with-ppl-include or --without-ppl-include was given.
- if test "${with_ppl_include+set}" = set; then
- withval="$with_ppl_include"
-
- fi;
-
--# Check whether --with-ppl_lib or --without-ppl_lib was given.
-+# Check whether --with-ppl-lib or --without-ppl-lib was given.
- if test "${with_ppl_lib+set}" = set; then
- withval="$with_ppl_lib"
-
- fi;
-
-+# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given.
-+if test "${enable_ppl_version_check+set}" = set; then
-+ enableval="$enable_ppl_version_check"
-+
-+fi;
-+
- case $with_ppl in
-- no)
-- ppllibs=
-+ yes | no | "")
- ;;
- *)
-- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-+ ppllibs="-L$with_ppl/lib"
- pplinc="-I$with_ppl/include $pplinc"
-- LIBS="$ppllibs $LIBS"
-+ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then
-+ with_ppl=yes
-+ else
-+ { { echo "$as_me:$LINENO: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&5
-+echo "$as_me: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi
- ;;
- esac
--if test "x$with_ppl_include" != x; then
-+
-+if test x"$with_ppl_include" != x; then
- pplinc="-I$with_ppl_include $pplinc"
-+ with_ppl=yes
- fi
-+
- if test "x$with_ppl_lib" != x; then
-- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-- LIBS="$ppllibs $LIBS"
-+ ppllibs="-L$with_ppl_lib"
-+ with_ppl=yes
- fi
--if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
-- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-- LIBS="$ppllibs $LIBS"
-+
-+if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-+ if test x"$enable_watchdog" = xyes; then
-+ pwllib="-lpwl"
-+ fi
-+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"
-+ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
-+ enable_ppl_version_check=no
-+ with_ppl=yes
- fi
-
--# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given.
--if test "${enable_ppl_version_check+set}" = set; then
-- enableval="$enable_ppl_version_check"
-- ENABLE_PPL_CHECK=$enableval
-+if test "x$with_ppl" != xno; then
-+ if test "x$pwllib" = x; then
-+ saved_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $ppllibs"
-+ echo "$as_me:$LINENO: checking for PWL_handle_timeout in -lpwl" >&5
-+echo $ECHO_N "checking for PWL_handle_timeout in -lpwl... $ECHO_C" >&6
-+if test "${ac_cv_lib_pwl_PWL_handle_timeout+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- ENABLE_PPL_CHECK=yes
--fi;
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lpwl $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-
--if test "${ENABLE_PPL_CHECK}" = "yes"; then
-- saved_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $pplinc $gmpinc"
-- echo "$as_me:$LINENO: checking for version $ppl_major_version.$ppl_minor_version of PPL" >&5
--echo $ECHO_N "checking for version $ppl_major_version.$ppl_minor_version of PPL... $ECHO_C" >&6
-- cat >conftest.$ac_ext <<_ACEOF
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char PWL_handle_timeout ();
-+int
-+main ()
-+{
-+PWL_handle_timeout ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_lib_pwl_PWL_handle_timeout=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_lib_pwl_PWL_handle_timeout=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_lib_pwl_PWL_handle_timeout" >&5
-+echo "${ECHO_T}$ac_cv_lib_pwl_PWL_handle_timeout" >&6
-+if test $ac_cv_lib_pwl_PWL_handle_timeout = yes; then
-+ pwllib="-lpwl"
-+fi
-+
-+ LDFLAGS="$saved_LDFLAGS"
-+ fi
-+
-+ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"
-+
-+ if test "$enable_ppl_version_check" != no; then
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $pplinc $gmpinc"
-+ echo "$as_me:$LINENO: checking for version 0.10 (revision 0 or later) of PPL" >&5
-+echo $ECHO_N "checking for version 0.10 (revision 0 or later) of PPL... $ECHO_C" >&6
-+ cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4900,9 +4990,9 @@
- main ()
- {
-
-- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
-- choke me
-- #endif
-+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
-+ choke me
-+ #endif
-
- ;
- return 0;
-@@ -4937,10 +5027,11 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6; ppllibs= ; pplinc=
-+echo "${ECHO_T}no" >&6; ppllibs= ; pplinc= ; with_ppl=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-- CFLAGS="$saved_CFLAGS"
-+ CFLAGS="$saved_CFLAGS"
-+ fi
- fi
-
- # Flags needed for PPL
-@@ -6259,7 +6350,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/configure.ac gcc-4.4.6/configure.ac
---- gcc-4.4.6.orig/configure.ac 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure.ac 2011-04-20 17:27:23.050805747 +0200
-@@ -502,6 +502,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -1328,55 +1329,81 @@
- esac
-
- # Check for PPL
--ppl_major_version=0
--ppl_minor_version=10
--ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
-+ppllibs=
- pplinc=
-+pwllib=
-
--AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
-- Equivalent to --with-ppl-include=PATH/include
-- plus --with-ppl-lib=PATH/lib])
--AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
--AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
-+AC_ARG_WITH(ppl,
-+[AS_HELP_STRING([--with-ppl=PATH],
-+ [specify prefix directory for the installed PPL package.
-+ Equivalent to --with-ppl-include=PATH/include
-+ plus --with-ppl-lib=PATH/lib])])
-+AC_ARG_WITH(ppl-include,
-+[AS_HELP_STRING([--with-ppl-include=PATH],
-+ [specify directory for installed PPL include files])])
-+AC_ARG_WITH(ppl-lib,
-+[AS_HELP_STRING([--with-ppl-lib=PATH],
-+ [specify directory for the installed PPL library])])
-
--case $with_ppl in
-- no)
-- ppllibs=
-+AC_ARG_ENABLE(ppl-version-check,
-+[AS_HELP_STRING([--disable-ppl-version-check],
-+ [disable check for PPL version])])
-+
-+case $with_ppl in
-+ yes | no | "")
- ;;
- *)
-- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-+ ppllibs="-L$with_ppl/lib"
- pplinc="-I$with_ppl/include $pplinc"
-- LIBS="$ppllibs $LIBS"
-+ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then
-+ with_ppl=yes
-+ else
-+ AC_MSG_ERROR([cannot find directories "$with_ppl/lib" or "$with_ppl/include"])
-+ fi
- ;;
- esac
--if test "x$with_ppl_include" != x; then
-+
-+if test x"$with_ppl_include" != x; then
- pplinc="-I$with_ppl_include $pplinc"
-+ with_ppl=yes
- fi
-+
- if test "x$with_ppl_lib" != x; then
-- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-- LIBS="$ppllibs $LIBS"
-+ ppllibs="-L$with_ppl_lib"
-+ with_ppl=yes
- fi
--if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
-- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-- LIBS="$ppllibs $LIBS"
-+
-+if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-+ if test x"$enable_watchdog" = xyes; then
-+ pwllib="-lpwl"
-+ fi
-+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"
-+ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
-+ enable_ppl_version_check=no
-+ with_ppl=yes
- fi
-
--AC_ARG_ENABLE(ppl-version-check,
--[ --disable-ppl-version-check disable check for PPL version],
--ENABLE_PPL_CHECK=$enableval,
--ENABLE_PPL_CHECK=yes)
-+if test "x$with_ppl" != xno; then
-+ if test "x$pwllib" = x; then
-+ saved_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $ppllibs"
-+ AC_CHECK_LIB(pwl,PWL_handle_timeout,[pwllib="-lpwl"])
-+ LDFLAGS="$saved_LDFLAGS"
-+ fi
-
--if test "${ENABLE_PPL_CHECK}" = "yes"; then
-- saved_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $pplinc $gmpinc"
-- AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
-- AC_TRY_COMPILE([#include "ppl_c.h"],[
-- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
-- choke me
-- #endif
-- ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ])
-- CFLAGS="$saved_CFLAGS"
-+ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"
-+
-+ if test "$enable_ppl_version_check" != no; then
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $pplinc $gmpinc"
-+ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL])
-+ AC_TRY_COMPILE([#include "ppl_c.h"],[
-+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
-+ choke me
-+ #endif
-+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ])
-+ CFLAGS="$saved_CFLAGS"
-+ fi
- fi
-
- # Flags needed for PPL
-@@ -2560,7 +2587,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/gcc/ChangeLog.rtems gcc-4.4.6/gcc/ChangeLog.rtems
---- gcc-4.4.6.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/ChangeLog.rtems 2011-04-20 17:27:23.061805866 +0200
-@@ -0,0 +1,54 @@
-+2011-02-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/t-rtems: Remove -mcpu=601 multilib.
-+ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib.
-+
-+2010-03-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ Patch from Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>:
-+ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support
-+ for vfp FPU model
-+
-+2010-02-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rtems.h: Abandon -qrtems_debug.
-+
-+2009-12-01 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN.
-+
-+2009-11-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/m32c/rtems.h, config/m68k/rtemself.h,
-+ config/m68k/rtemself.h, config/sh/rtemself.h,
-+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
-+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
-+ to interfere and cause wchar_t/wint_t incompatibilities).
-+
-+2009-10-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/t-rtems: Don't build _exit.
-+
-+ Jon Beniston <jon at beniston.com>
-+
-+ * config/lm32/arithmetic.c, config/lm32/crti.S,
-+ config/lm32/crtn.S, config/lm32/lib1funcs.S,
-+ config/lm32/lm32.c, config/lm32/lm32.h,
-+ config/lm32/lm32.md, config/lm32/lm32.opt,
-+ config/lm32/lm32-protos.h, config/lm32/predicates.md,
-+ config/lm32/rtems.h, config/lm32/sfp-machine.h,
-+ config/lm32/t-fprules-softfp, config/lm32/t-lm32,
-+ config/lm32/uclinux-elf.h: New (lm32 port).
-+ * config.gcc: Add lm32* targets.
-+ * doc/contrib.texi, doc/invoke.texi: Add lm32.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/rtems.h: Support for custom RTEMS multilibs.
-+ Support TARGET_E500.
-+ * config/rs6000/t-rtems: Custom RTEMS multilibs.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
-+
-\ No newline at end of file
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h gcc-4.4.6/gcc/config/arm/rtems-elf.h
---- gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/rtems-elf.h 2011-04-20 17:27:23.061805866 +0200
-@@ -36,7 +36,7 @@
- */
- #undef SUBTARGET_EXTRA_ASM_SPEC
- #define SUBTARGET_EXTRA_ASM_SPEC "\
-- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
-+ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}"
-
- /*
- * The default includes --start-group and --end-group which conflicts
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/t-rtems gcc-4.4.6/gcc/config/arm/t-rtems
---- gcc-4.4.6.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/t-rtems 2011-04-20 17:27:23.062805877 +0200
-@@ -5,6 +5,41 @@
- MULTILIB_EXCEPTIONS =
- MULTILIB_MATCHES = marm=mno-thumb
-
--MULTILIB_OPTIONS += msoft-float/mhard-float
--MULTILIB_DIRNAMES += soft fpu
--MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
-+MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp
-+MULTILIB_DIRNAMES += fpu softfp
-+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp*
-+MULTILIB_MATCHES =
-+
-+MULTILIB_OPTIONS += mfpu=vfp
-+MULTILIB_DIRNAMES += vfp
-+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
-+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
-+
-+# default float model is fpa, so don't create a explicit copy of it
-+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
-+
-+# permutations of the options which are useful (+) or make no sense (-),
-+# defaults are in brackets:
-+# + (arm/soft/fpa)
-+# + (arm/soft)/vfp
-+# - (arm)/softfp(/fpa)
-+# + (arm)/softfp/vfp
-+# + (arm)/hard-float(/fpa)
-+# - (arm)/hard-float/vfp
-+# + thumb/(soft/fpa)
-+# + thumb/(soft/)vfp
-+# - thumb/softfp/fpa
-+# - thumb/softfp/vfp
-+# - thumb/hard-float/fpa
-+# - thumb/hard-float/vfp
-+
-+# subdirs to be used for multilibs and their respective options:
-+#/thumb/vfp -> thumb/soft/vfp
-+#/thumb/fpa -> thumb/soft/fpa
-+#/thumb -> thumb/soft/fpa
-+#/vfp -> arm/soft/vfp
-+#/softfp/vfp -> arm/softfp/cfp
-+#/fpu/fpa -> arm/hard/fpa
-+#/fpu -> arm/hard/fpa
-+#/fpa -> arm/soft/fpa
-+#. -> arm/soft/fpa
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/avr.h gcc-4.4.6/gcc/config/avr/avr.h
---- gcc-4.4.6.orig/gcc/config/avr/avr.h 2009-03-28 22:09:50.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/avr.h 2011-04-20 17:27:23.062805877 +0200
-@@ -811,12 +811,15 @@
- mmcu=at90can64*|\
- mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
- %{!mmcu*: -m avr2}\
--%{mmcu=at90s1200|\
-+%{mmcu=avr1|\
-+ mmcu=at90s1200|\
- mmcu=attiny11|\
- mmcu=attiny12|\
- mmcu=attiny15|\
- mmcu=attiny28: -m avr1}\
--%{mmcu=attiny22|\
-+%{mmcu=avr2|\
-+ mmcu=avr25|\
-+ mmcu=attiny22|\
- mmcu=attiny26|\
- mmcu=at90s2*|\
- mmcu=at90s4*|\
-@@ -831,14 +834,18 @@
- mmcu=attiny261|\
- mmcu=attiny4*|\
- mmcu=attiny8*: -m avr2}\
--%{mmcu=atmega103|\
-+%{mmcu=avr3|\
-+ mmcu=avr31|\
-+ mmcu=avr35|\
-+ mmcu=atmega103|\
- mmcu=at43*|\
- mmcu=at76*|\
- mmcu=at90usb82|\
- mmcu=at90usb162|\
- mmcu=attiny16*|\
- mmcu=attiny32*: -m avr3}\
--%{mmcu=atmega8*|\
-+%{mmcu=avr4|\
-+ mmcu=atmega8*|\
- mmcu=atmega4*|\
- mmcu=at90pwm1|\
- mmcu=at90pwm2|\
-@@ -846,7 +853,9 @@
- mmcu=at90pwm3|\
- mmcu=at90pwm3b|\
- mmcu=at90pwm81: -m avr4}\
--%{mmcu=atmega16*|\
-+%{mmcu=avr5|\
-+ mmcu=avr51|\
-+ mmcu=atmega16*|\
- mmcu=atmega32*|\
- mmcu=atmega406|\
- mmcu=atmega64*|\
-@@ -860,7 +869,8 @@
- mmcu=at94k|\
- mmcu=m3000*|\
- mmcu=m3001*: -m avr5}\
--%{mmcu=atmega256*:-m avr6}\
-+%{mmcu=avr6|\
-+ mmcu=atmega256*:-m avr6}\
- %{mmcu=atmega324*|\
- mmcu=atmega325*|\
- mmcu=atmega328p|\
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/t-rtems gcc-4.4.6/gcc/config/avr/t-rtems
---- gcc-4.4.6.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/t-rtems 2011-04-20 17:27:23.062805877 +0200
-@@ -1,3 +1,4 @@
- # Multilibs for avr RTEMS targets.
-
--# ATM, this is just a stub
-+# RTEMS uses _exit from newlib
-+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c gcc-4.4.6/gcc/config/lm32/arithmetic.c
---- gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/arithmetic.c 2011-04-20 17:27:23.062805877 +0200
-@@ -0,0 +1,305 @@
-+/* Fixed-point arithmetic for Lattice Mico32.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; either version 2, or (at your option) any
-+ later version.
-+
-+ In addition to the permissions in the GNU General Public License, the
-+ Free Software Foundation gives you unlimited permission to link the
-+ compiled version of this file into combinations with other programs,
-+ and to distribute those combinations without any restriction coming
-+ from the use of this file. (The General Public License restrictions
-+ do apply in other respects; for example, they cover modification of
-+ the file, and distribution when not linked into a combine
-+ executable.)
-+
-+ This file is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; see the file COPYING. If not, write to
-+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+typedef unsigned long UQItype __attribute__ ((mode (QI)));
-+typedef long SItype __attribute__ ((mode (SI)));
-+typedef unsigned long USItype __attribute__ ((mode (SI)));
-+
-+/* Prototypes */
-+
-+USItype __mulsi3 (USItype a, USItype b);
-+
-+USItype __udivmodsi4 (USItype num, USItype den, int modwanted);
-+SItype __divsi3 (SItype a, SItype b);
-+SItype __modsi3 (SItype a, SItype b);
-+USItype __udivsi3 (USItype a, USItype b);
-+USItype __umodsi3 (USItype a, USItype b);
-+
-+SItype __ashlsi3 (SItype a, SItype b);
-+SItype __ashrsi3 (SItype a, SItype b);
-+USItype __lshrsi3 (USItype a, USItype b);
-+
-+/* Multiplication */
-+
-+#ifdef L_mulsi3
-+USItype
-+__mulsi3 (USItype a, USItype b)
-+{
-+ USItype result;
-+
-+ result = 0;
-+
-+ if (a==0)
-+ return 0;
-+
-+ while (b!=0)
-+ {
-+ if (b & 1)
-+ result += a;
-+ a <<= 1;
-+ b >>= 1;
-+ }
-+
-+ return result;
-+}
-+#endif
-+
-+/* Division */
-+
-+#ifdef L_udivmodsi4
-+USItype
-+__udivmodsi4 (USItype num, USItype den, int modwanted)
-+{
-+ USItype bit = 1;
-+ USItype res = 0;
-+
-+ while (den < num && bit && !(den & (1L<<31)))
-+ {
-+ den <<=1;
-+ bit <<=1;
-+ }
-+ while (bit)
-+ {
-+ if (num >= den)
-+ {
-+ num -= den;
-+ res |= bit;
-+ }
-+ bit >>=1;
-+ den >>=1;
-+ }
-+ if (modwanted)
-+ return num;
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_divsi3
-+
-+static const UQItype __divsi3_table[] = {
-+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 7, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 8, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 9, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
-+ 0, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-+ 0, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
-+ 0, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0,
-+ 0, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0,
-+ 0, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0,
-+ 0, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
-+};
-+
-+SItype
-+__divsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba;
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (((USItype)(a | b)) < 16)
-+ {
-+ res = __divsi3_table[(a << 4) + b];
-+ }
-+ else
-+ {
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = !neg;
-+ }
-+
-+ if (b < 0)
-+ {
-+ b = -b;
-+ neg = !neg;
-+ }
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("divu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 0);
-+
-+ if (neg)
-+ res = -res;
-+ }
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_modsi3
-+SItype
-+__modsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = 1;
-+ }
-+
-+ if (b < 0)
-+ b = -b;
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("modu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 1);
-+
-+ if (neg)
-+ res = -res;
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_udivsi3
-+USItype
-+__udivsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 0);
-+}
-+#endif
-+
-+#ifdef L_umodsi3
-+USItype
-+__umodsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 1);
-+}
-+#endif
-+
-+#if 0
-+
-+/* Shifts - Optimized versions implemented in assembly. Use these if code space is preferred to performance. */
-+
-+#ifdef L_ashlsi3
-+SItype
-+__ashlsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ a += a;
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_ashrsi3
-+SItype
-+__ashrsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("sri %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_lshrsi3
-+USItype
-+__lshrsi3 (USItype a, USItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("srui %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#endif
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crti.S gcc-4.4.6/gcc/config/lm32/crti.S
---- gcc-4.4.6.orig/gcc/config/lm32/crti.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crti.S 2011-04-20 17:27:23.062805877 +0200
-@@ -0,0 +1,45 @@
-+# crti.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+ .global _init
-+ .type _init, at function
-+ .align 4
-+_init:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-+
-+ .section .fini
-+ .global _fini
-+ .type _fini, at function
-+ .align 4
-+_fini:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crtn.S gcc-4.4.6/gcc/config/lm32/crtn.S
---- gcc-4.4.6.orig/gcc/config/lm32/crtn.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crtn.S 2011-04-20 17:27:23.063805887 +0200
-@@ -0,0 +1,42 @@
-+# crtn.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-+ .section .fini
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S gcc-4.4.6/gcc/config/lm32/lib1funcs.S
---- gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lib1funcs.S 2011-04-20 17:27:23.063805887 +0200
-@@ -0,0 +1,429 @@
-+# lib1funcs.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+/* Arithmetic left shift */
-+
-+ .text
-+
-+ .global __ashlsi3
-+ .type __ashlsi3, at function
-+ .align 4
-+
-+__ashlsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashlsi3_table)
-+ addi r3, r3, gotofflo16(__ashlsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashlsi3_table)
-+ ori r3, r3, lo(__ashlsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashlsi3_31:
-+ add r1, r1, r1
-+__ashlsi3_30:
-+ add r1, r1, r1
-+__ashlsi3_29:
-+ add r1, r1, r1
-+__ashlsi3_28:
-+ add r1, r1, r1
-+__ashlsi3_27:
-+ add r1, r1, r1
-+__ashlsi3_26:
-+ add r1, r1, r1
-+__ashlsi3_25:
-+ add r1, r1, r1
-+__ashlsi3_24:
-+ add r1, r1, r1
-+__ashlsi3_23:
-+ add r1, r1, r1
-+__ashlsi3_22:
-+ add r1, r1, r1
-+__ashlsi3_21:
-+ add r1, r1, r1
-+__ashlsi3_20:
-+ add r1, r1, r1
-+__ashlsi3_19:
-+ add r1, r1, r1
-+__ashlsi3_18:
-+ add r1, r1, r1
-+__ashlsi3_17:
-+ add r1, r1, r1
-+__ashlsi3_16:
-+ add r1, r1, r1
-+__ashlsi3_15:
-+ add r1, r1, r1
-+__ashlsi3_14:
-+ add r1, r1, r1
-+__ashlsi3_13:
-+ add r1, r1, r1
-+__ashlsi3_12:
-+ add r1, r1, r1
-+__ashlsi3_11:
-+ add r1, r1, r1
-+__ashlsi3_10:
-+ add r1, r1, r1
-+__ashlsi3_9:
-+ add r1, r1, r1
-+__ashlsi3_8:
-+ add r1, r1, r1
-+__ashlsi3_7:
-+ add r1, r1, r1
-+__ashlsi3_6:
-+ add r1, r1, r1
-+__ashlsi3_5:
-+ add r1, r1, r1
-+__ashlsi3_4:
-+ add r1, r1, r1
-+__ashlsi3_3:
-+ add r1, r1, r1
-+__ashlsi3_2:
-+ add r1, r1, r1
-+__ashlsi3_1:
-+ add r1, r1, r1
-+__ashlsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashlsi3_table:
-+ .word __ashlsi3_0
-+ .word __ashlsi3_1
-+ .word __ashlsi3_2
-+ .word __ashlsi3_3
-+ .word __ashlsi3_4
-+ .word __ashlsi3_5
-+ .word __ashlsi3_6
-+ .word __ashlsi3_7
-+ .word __ashlsi3_8
-+ .word __ashlsi3_9
-+ .word __ashlsi3_10
-+ .word __ashlsi3_11
-+ .word __ashlsi3_12
-+ .word __ashlsi3_13
-+ .word __ashlsi3_14
-+ .word __ashlsi3_15
-+ .word __ashlsi3_16
-+ .word __ashlsi3_17
-+ .word __ashlsi3_18
-+ .word __ashlsi3_19
-+ .word __ashlsi3_20
-+ .word __ashlsi3_21
-+ .word __ashlsi3_22
-+ .word __ashlsi3_23
-+ .word __ashlsi3_24
-+ .word __ashlsi3_25
-+ .word __ashlsi3_26
-+ .word __ashlsi3_27
-+ .word __ashlsi3_28
-+ .word __ashlsi3_29
-+ .word __ashlsi3_30
-+ .word __ashlsi3_31
-+
-+/* Logical right shift */
-+
-+ .text
-+
-+ .global __lshrsi3
-+ .type __lshrsi3, at function
-+ .align 4
-+
-+__lshrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__lshrsi3_table)
-+ addi r3, r3, gotofflo16(__lshrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__lshrsi3_table)
-+ ori r3, r3, lo(__lshrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__lshrsi3_31:
-+ srui r1, r1, 1
-+__lshrsi3_30:
-+ srui r1, r1, 1
-+__lshrsi3_29:
-+ srui r1, r1, 1
-+__lshrsi3_28:
-+ srui r1, r1, 1
-+__lshrsi3_27:
-+ srui r1, r1, 1
-+__lshrsi3_26:
-+ srui r1, r1, 1
-+__lshrsi3_25:
-+ srui r1, r1, 1
-+__lshrsi3_24:
-+ srui r1, r1, 1
-+__lshrsi3_23:
-+ srui r1, r1, 1
-+__lshrsi3_22:
-+ srui r1, r1, 1
-+__lshrsi3_21:
-+ srui r1, r1, 1
-+__lshrsi3_20:
-+ srui r1, r1, 1
-+__lshrsi3_19:
-+ srui r1, r1, 1
-+__lshrsi3_18:
-+ srui r1, r1, 1
-+__lshrsi3_17:
-+ srui r1, r1, 1
-+__lshrsi3_16:
-+ srui r1, r1, 1
-+__lshrsi3_15:
-+ srui r1, r1, 1
-+__lshrsi3_14:
-+ srui r1, r1, 1
-+__lshrsi3_13:
-+ srui r1, r1, 1
-+__lshrsi3_12:
-+ srui r1, r1, 1
-+__lshrsi3_11:
-+ srui r1, r1, 1
-+__lshrsi3_10:
-+ srui r1, r1, 1
-+__lshrsi3_9:
-+ srui r1, r1, 1
-+__lshrsi3_8:
-+ srui r1, r1, 1
-+__lshrsi3_7:
-+ srui r1, r1, 1
-+__lshrsi3_6:
-+ srui r1, r1, 1
-+__lshrsi3_5:
-+ srui r1, r1, 1
-+__lshrsi3_4:
-+ srui r1, r1, 1
-+__lshrsi3_3:
-+ srui r1, r1, 1
-+__lshrsi3_2:
-+ srui r1, r1, 1
-+__lshrsi3_1:
-+ srui r1, r1, 1
-+__lshrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__lshrsi3_table:
-+ .word __lshrsi3_0
-+ .word __lshrsi3_1
-+ .word __lshrsi3_2
-+ .word __lshrsi3_3
-+ .word __lshrsi3_4
-+ .word __lshrsi3_5
-+ .word __lshrsi3_6
-+ .word __lshrsi3_7
-+ .word __lshrsi3_8
-+ .word __lshrsi3_9
-+ .word __lshrsi3_10
-+ .word __lshrsi3_11
-+ .word __lshrsi3_12
-+ .word __lshrsi3_13
-+ .word __lshrsi3_14
-+ .word __lshrsi3_15
-+ .word __lshrsi3_16
-+ .word __lshrsi3_17
-+ .word __lshrsi3_18
-+ .word __lshrsi3_19
-+ .word __lshrsi3_20
-+ .word __lshrsi3_21
-+ .word __lshrsi3_22
-+ .word __lshrsi3_23
-+ .word __lshrsi3_24
-+ .word __lshrsi3_25
-+ .word __lshrsi3_26
-+ .word __lshrsi3_27
-+ .word __lshrsi3_28
-+ .word __lshrsi3_29
-+ .word __lshrsi3_30
-+ .word __lshrsi3_31
-+
-+/* Arithmetic right shift */
-+
-+ .text
-+
-+ .global __ashrsi3
-+ .type __ashrsi3, at function
-+ .align 4
-+
-+__ashrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashrsi3_table)
-+ addi r3, r3, gotofflo16(__ashrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashrsi3_table)
-+ ori r3, r3, lo(__ashrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashrsi3_31:
-+ sri r1, r1, 1
-+__ashrsi3_30:
-+ sri r1, r1, 1
-+__ashrsi3_29:
-+ sri r1, r1, 1
-+__ashrsi3_28:
-+ sri r1, r1, 1
-+__ashrsi3_27:
-+ sri r1, r1, 1
-+__ashrsi3_26:
-+ sri r1, r1, 1
-+__ashrsi3_25:
-+ sri r1, r1, 1
-+__ashrsi3_24:
-+ sri r1, r1, 1
-+__ashrsi3_23:
-+ sri r1, r1, 1
-+__ashrsi3_22:
-+ sri r1, r1, 1
-+__ashrsi3_21:
-+ sri r1, r1, 1
-+__ashrsi3_20:
-+ sri r1, r1, 1
-+__ashrsi3_19:
-+ sri r1, r1, 1
-+__ashrsi3_18:
-+ sri r1, r1, 1
-+__ashrsi3_17:
-+ sri r1, r1, 1
-+__ashrsi3_16:
-+ sri r1, r1, 1
-+__ashrsi3_15:
-+ sri r1, r1, 1
-+__ashrsi3_14:
-+ sri r1, r1, 1
-+__ashrsi3_13:
-+ sri r1, r1, 1
-+__ashrsi3_12:
-+ sri r1, r1, 1
-+__ashrsi3_11:
-+ sri r1, r1, 1
-+__ashrsi3_10:
-+ sri r1, r1, 1
-+__ashrsi3_9:
-+ sri r1, r1, 1
-+__ashrsi3_8:
-+ sri r1, r1, 1
-+__ashrsi3_7:
-+ sri r1, r1, 1
-+__ashrsi3_6:
-+ sri r1, r1, 1
-+__ashrsi3_5:
-+ sri r1, r1, 1
-+__ashrsi3_4:
-+ sri r1, r1, 1
-+__ashrsi3_3:
-+ sri r1, r1, 1
-+__ashrsi3_2:
-+ sri r1, r1, 1
-+__ashrsi3_1:
-+ sri r1, r1, 1
-+__ashrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashrsi3_table:
-+ .word __ashrsi3_0
-+ .word __ashrsi3_1
-+ .word __ashrsi3_2
-+ .word __ashrsi3_3
-+ .word __ashrsi3_4
-+ .word __ashrsi3_5
-+ .word __ashrsi3_6
-+ .word __ashrsi3_7
-+ .word __ashrsi3_8
-+ .word __ashrsi3_9
-+ .word __ashrsi3_10
-+ .word __ashrsi3_11
-+ .word __ashrsi3_12
-+ .word __ashrsi3_13
-+ .word __ashrsi3_14
-+ .word __ashrsi3_15
-+ .word __ashrsi3_16
-+ .word __ashrsi3_17
-+ .word __ashrsi3_18
-+ .word __ashrsi3_19
-+ .word __ashrsi3_20
-+ .word __ashrsi3_21
-+ .word __ashrsi3_22
-+ .word __ashrsi3_23
-+ .word __ashrsi3_24
-+ .word __ashrsi3_25
-+ .word __ashrsi3_26
-+ .word __ashrsi3_27
-+ .word __ashrsi3_28
-+ .word __ashrsi3_29
-+ .word __ashrsi3_30
-+ .word __ashrsi3_31
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.c gcc-4.4.6/gcc/config/lm32/lm32.c
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.c 2011-04-20 17:27:23.063805887 +0200
-@@ -0,0 +1,869 @@
-+/* Subroutines used for code generation on the Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tm.h"
-+#include "rtl.h"
-+#include "regs.h"
-+#include "hard-reg-set.h"
-+#include "basic-block.h"
-+#include "real.h"
-+#include "insn-config.h"
-+#include "conditions.h"
-+#include "insn-flags.h"
-+#include "insn-attr.h"
-+#include "insn-codes.h"
-+#include "recog.h"
-+#include "output.h"
-+#include "tree.h"
-+#include "expr.h"
-+#include "flags.h"
-+#include "reload.h"
-+#include "tm_p.h"
-+#include "function.h"
-+#include "toplev.h"
-+#include "optabs.h"
-+#include "libfuncs.h"
-+#include "ggc.h"
-+#include "target.h"
-+#include "target-def.h"
-+#include "langhooks.h"
-+#include "tm-constrs.h"
-+#include "df.h"
-+
-+struct lm32_frame_info
-+{
-+ HOST_WIDE_INT total_size; /* number of bytes that the entire frame takes up. */
-+ HOST_WIDE_INT callee_size; /* number of bytes to save callee save registers */
-+ HOST_WIDE_INT pretend_size; /* number of bytes we push and pretend caller did. */
-+ HOST_WIDE_INT args_size; /* number of bytes that outgoing arguments take up. */
-+ HOST_WIDE_INT locals_size; /* number of bytes that local variables take up. */
-+ unsigned int reg_save_mask; /* mask of saved registers. */
-+};
-+
-+/* Prototypes for static functions */
-+static rtx emit_add (rtx dest, rtx src0, rtx src1);
-+static void expand_save_restore (struct lm32_frame_info *info, int op);
-+static void abort_with_insn (rtx insn, const char *reason);
-+static void stack_adjust (HOST_WIDE_INT amount);
-+static bool lm32_in_small_data_p (const_tree);
-+static void lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl);
-+
-+/* Detemines if given constant can be used as a displacement */
-+#define OFFSET_INT(X) (((X) > -32768) && ((X) < 32768))
-+
-+#undef TARGET_ADDRESS_COST
-+#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
-+#undef TARGET_IN_SMALL_DATA_P
-+#define TARGET_IN_SMALL_DATA_P lm32_in_small_data_p
-+#undef TARGET_PROMOTE_FUNCTION_ARGS
-+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
-+#undef TARGET_PROMOTE_FUNCTION_RETURN
-+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
-+#undef TARGET_SETUP_INCOMING_VARARGS
-+#define TARGET_SETUP_INCOMING_VARARGS lm32_setup_incoming_varargs
-+#undef TARGET_PROMOTE_PROTOTYPES
-+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
-+
-+struct gcc_target targetm = TARGET_INITIALIZER;
-+
-+/* Current frame information calculated by lm32_compute_frame_size. */
-+static struct lm32_frame_info current_frame_info;
-+
-+rtx lm32_compare_op0;
-+rtx lm32_compare_op1;
-+
-+/* Return non-zero if the specified return type should be returned in memory */
-+int
-+lm32_return_in_memory (tree type)
-+{
-+ HOST_WIDE_INT size;
-+
-+ if (!AGGREGATE_TYPE_P (type))
-+ {
-+ /* All simple types are returned in registers. */
-+ return 0;
-+ }
-+
-+ size = int_size_in_bytes (type);
-+ if (size >=0 && size <= UNITS_PER_WORD)
-+ {
-+ /* If it can fit in one register */
-+ return 0;
-+ }
-+
-+ return 1;
-+}
-+
-+/* Determine if given constant can be used as a register displacement */
-+int
-+const_ok_for_base_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-+{
-+ int val;
-+
-+ val = INTVAL (op);
-+ return OFFSET_INT (val);
-+}
-+
-+/* Generate an emit a word sized add instruction */
-+static rtx
-+emit_add (rtx dest, rtx src0, rtx src1)
-+{
-+ rtx insn;
-+ insn = emit_insn (gen_addsi3 (dest, src0, src1));
-+ return insn;
-+}
-+
-+/* Generate the code to compare (and possibly branch) two integer values
-+ TEST_CODE is the comparison code we are trying to emulate
-+ (or implement directly)
-+ RESULT is where to store the result of the comparison,
-+ or null to emit a branch
-+ CMP0 CMP1 are the two comparison operands
-+ DESTINATION is the destination of the branch, or null to only compare
-+ */
-+
-+void
-+gen_int_relational (enum rtx_code code, /* relational test (EQ, etc) */
-+ rtx result, /* result to store comp. or 0 if branch */
-+ rtx cmp0, /* first operand to compare */
-+ rtx cmp1, /* second operand to compare */
-+ rtx destination) /* destination of the branch, or 0 if compare */
-+{
-+ enum machine_mode mode;
-+ int branch_p;
-+
-+ mode = GET_MODE (cmp0);
-+ if (mode == VOIDmode)
-+ mode = GET_MODE (cmp1);
-+
-+ /* Is this a branch or compare */
-+ branch_p = (destination != 0);
-+
-+ /* Instruction set doesn't support LE or LT, so swap operands and use GE, GT */
-+ switch (code)
-+ {
-+ case LE:
-+ case LT:
-+ case LEU:
-+ case LTU:
-+ code = swap_condition (code);
-+ rtx temp = cmp0;
-+ cmp0 = cmp1;
-+ cmp1 = temp;
-+ break;
-+ default:
-+ break;
-+ }
-+
-+ if (branch_p)
-+ {
-+ rtx insn;
-+
-+ /* Operands must be in registers */
-+ if (!register_operand (cmp0, mode))
-+ cmp0 = force_reg (mode, cmp0);
-+ if (!register_operand (cmp1, mode))
-+ cmp1 = force_reg (mode, cmp1);
-+
-+ /* Generate conditional branch instruction */
-+ rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1);
-+ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
-+ insn = gen_rtx_SET (VOIDmode, pc_rtx,
-+ gen_rtx_IF_THEN_ELSE (VOIDmode,
-+ cond, label, pc_rtx));
-+ emit_jump_insn (insn);
-+ }
-+ else
-+ {
-+ /* We can't have const_ints in cmp0, other than 0 */
-+ if ((GET_CODE (cmp0) == CONST_INT) && (INTVAL (cmp0) != 0))
-+ cmp0 = force_reg (mode, cmp0);
-+
-+ /* If the comparison is against an int not in legal range
-+ move it into a register */
-+ if (GET_CODE (cmp1) == CONST_INT)
-+ {
-+ HOST_WIDE_INT value = INTVAL (cmp1);
-+ switch (code)
-+ {
-+ case EQ: case NE: case LE: case LT: case GE: case GT:
-+ if (!MEDIUM_INT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ case LEU: case LTU: case GEU: case GTU:
-+ if (!MEDIUM_UINT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ default:
-+ abort ();
-+ }
-+ }
-+
-+ /* Generate compare instruction */
-+ emit_move_insn (result, gen_rtx_fmt_ee (code, mode, cmp0, cmp1));
-+ }
-+}
-+
-+/* Generate and emit RTL to save or restore callee save registers */
-+static void
-+expand_save_restore (struct lm32_frame_info *info, int op)
-+{
-+ unsigned int reg_save_mask = info->reg_save_mask;
-+ int regno;
-+ HOST_WIDE_INT offset;
-+ rtx insn;
-+
-+ /* Callee saves are below locals and above outgoing arguments */
-+ offset = info->args_size + info->callee_size;
-+ for (regno = 0; regno <= 31; regno++)
-+ {
-+ if ((reg_save_mask & (1 << regno)) != 0)
-+ {
-+ if (op == 0)
-+ {
-+ insn = emit_move_insn (gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))),
-+ gen_rtx_REG (word_mode, regno));
-+ }
-+ else
-+ {
-+ insn = emit_move_insn (gen_rtx_REG (word_mode, regno),
-+ gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))));
-+ }
-+
-+ /* only prologue instructions which set the sp fp or save a
-+ register should be marked as frame related */
-+ if (op==0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ offset -= UNITS_PER_WORD;
-+ }
-+ }
-+}
-+
-+static void
-+stack_adjust (HOST_WIDE_INT amount)
-+{
-+ rtx insn;
-+
-+ if (!MEDIUM_INT (amount))
-+ {
-+ /* r10 is caller saved so it can be used as a temp reg */
-+ rtx r10;
-+ r10 = gen_rtx_REG (word_mode, 10);
-+ insn = emit_move_insn (r10, GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ insn = emit_add (stack_pointer_rtx, stack_pointer_rtx, r10);
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+ else
-+ {
-+ insn = emit_add (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+}
-+
-+
-+/* Create and emit instructions for a functions prologue */
-+void
-+lm32_expand_prologue (void)
-+{
-+ rtx insn;
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Add space on stack new frame */
-+ stack_adjust (-current_frame_info.total_size);
-+
-+ /* Save callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 0);
-+
-+ /* Setup frame pointer if it's needed */
-+ if (frame_pointer_needed == 1)
-+ {
-+ /* Load offset - Don't use total_size, as that includes pretend_size, which isn't part of this frame? */
-+ insn = emit_move_insn (frame_pointer_rtx, GEN_INT ( current_frame_info.args_size
-+ + current_frame_info.callee_size
-+ + current_frame_info.locals_size));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Add in sp */
-+ insn = emit_add (frame_pointer_rtx,
-+ frame_pointer_rtx,
-+ stack_pointer_rtx);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+
-+ /* Prevent prologue from being scheduled into function body */
-+ emit_insn (gen_blockage ());
-+ }
-+}
-+
-+/* Create an emit instructions for a functions epilogue */
-+void
-+lm32_expand_epilogue (void)
-+{
-+ rtx ra_rtx = gen_rtx_REG (Pmode, RA_REGNUM);
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Prevent stack code from being reordered */
-+ emit_insn (gen_blockage ());
-+
-+ /* Restore callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 1);
-+
-+ /* Deallocate stack */
-+ stack_adjust (current_frame_info.total_size);
-+
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+ else
-+ {
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+}
-+
-+/* Return the bytes needed to compute the frame pointer from the current
-+ stack pointer. */
-+HOST_WIDE_INT
-+lm32_compute_frame_size (int size)
-+{
-+ int regno;
-+ HOST_WIDE_INT total_size, locals_size, args_size, pretend_size, callee_size;
-+ unsigned int reg_save_mask;
-+
-+ locals_size = size;
-+ args_size = crtl->outgoing_args_size;
-+ pretend_size = crtl->args.pretend_args_size;
-+ callee_size = 0;
-+ reg_save_mask = 0;
-+
-+ /* Build mask that actually determines which regsiters we save
-+ and calculate size required to store them in the stack. */
-+ for (regno = 1; regno < SP_REGNUM; regno++)
-+ {
-+ if (df_regs_ever_live_p(regno) && !call_used_regs[regno])
-+ {
-+ reg_save_mask |= 1 << regno;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ }
-+ if (df_regs_ever_live_p(RA_REGNUM) || !current_function_is_leaf || !optimize)
-+ {
-+ reg_save_mask |= 1 << RA_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ if (!(reg_save_mask & (1 << FP_REGNUM)) && frame_pointer_needed)
-+ {
-+ reg_save_mask |= 1 << FP_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+
-+ /* Compute total frame size */
-+ total_size = pretend_size + args_size + locals_size + callee_size;
-+
-+ /* Align frame to appropriate boundary */
-+ total_size = (total_size+3) & ~3;
-+
-+ /* Save computed information. */
-+ current_frame_info.total_size = total_size;
-+ current_frame_info.callee_size = callee_size;
-+ current_frame_info.pretend_size = pretend_size;
-+ current_frame_info.locals_size = locals_size;
-+ current_frame_info.args_size = args_size;
-+ current_frame_info.reg_save_mask = reg_save_mask;
-+
-+ return total_size;
-+}
-+
-+void
-+lm32_print_operand (FILE *file, rtx op, int letter)
-+{
-+ register enum rtx_code code;
-+
-+ if (! op)
-+ {
-+ error ("PRINT_OPERAND null pointer");
-+ abort ();
-+ }
-+
-+ code = GET_CODE (op);
-+
-+ if (code == SIGN_EXTEND)
-+ op = XEXP (op, 0), code = GET_CODE (op);
-+ else if (code == REG || code == SUBREG)
-+ {
-+ int regnum;
-+
-+ if (code == REG)
-+ regnum = REGNO (op);
-+ else
-+ regnum = true_regnum (op);
-+
-+ if ( (letter == 'H' && !WORDS_BIG_ENDIAN)
-+ || (letter == 'L' && WORDS_BIG_ENDIAN))
-+ {
-+ abort();
-+ regnum++;
-+ }
-+
-+ fprintf (file, "%s", reg_names[regnum]);
-+ }
-+ else if (code == MEM)
-+ output_address (XEXP (op, 0));
-+ else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0)
-+ fprintf (file, "%s", reg_names[0]);
-+ else if (GET_CODE (op) == CONST_DOUBLE)
-+ {
-+ if ((CONST_DOUBLE_LOW (op) != 0) || (CONST_DOUBLE_HIGH (op) != 0))
-+ output_operand_lossage ("Only 0.0 can be loaded as an immediate");
-+ else
-+ fprintf (file, "0");
-+ }
-+ else if (code == EQ)
-+ fprintf (file, "e ");
-+ else if (code == NE)
-+ fprintf (file, "ne ");
-+ else if (code == GT)
-+ fprintf (file, "g ");
-+ else if (code == GTU)
-+ fprintf (file, "gu ");
-+ else if (code == LT)
-+ fprintf (file, "l ");
-+ else if (code == LTU)
-+ fprintf (file, "lu ");
-+ else if (code == GE)
-+ fprintf (file, "ge ");
-+ else if (code == GEU)
-+ fprintf (file, "geu");
-+ else if (code == LE)
-+ fprintf (file, "le ");
-+ else if (code == LEU)
-+ fprintf (file, "leu");
-+ else
-+ output_addr_const (file, op);
-+}
-+
-+/* A C compound statement to output to stdio stream STREAM the
-+ assembler syntax for an instruction operand that is a memory
-+ reference whose address is ADDR. ADDR is an RTL expression.
-+
-+ On some machines, the syntax for a symbolic address depends on
-+ the section that the address refers to. On these machines,
-+ define the macro `ENCODE_SECTION_INFO' to store the information
-+ into the `symbol_ref', and then check for it here. */
-+
-+void
-+lm32_print_operand_address (FILE *file, rtx addr)
-+{
-+ switch (GET_CODE (addr))
-+ {
-+ case REG:
-+ fprintf (file, "(%s+0)", reg_names [REGNO (addr)]);
-+ break;
-+
-+ case MEM:
-+ output_address (XEXP (addr, 0));
-+ break;
-+
-+ case PLUS:
-+ {
-+ rtx arg0 = XEXP (addr, 0);
-+ rtx arg1 = XEXP (addr, 1);
-+
-+ if (GET_CODE (arg0) == REG && CONSTANT_P (arg1))
-+ {
-+ if (GET_CODE(arg1) == CONST_INT)
-+ fprintf (file, "(%s+%ld)", reg_names [REGNO (arg0)], INTVAL (arg1));
-+ else
-+ {
-+ fprintf (file, "(%s+", reg_names [REGNO (arg0)]);
-+ output_addr_const (file, arg1);
-+ fprintf (file, ")");
-+ }
-+ }
-+ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1))
-+ output_addr_const (file, addr);
-+ else
-+ abort_with_insn (addr, "bad operand");
-+ }
-+ break;
-+
-+ case SYMBOL_REF:
-+ if (SYMBOL_REF_SMALL_P (addr))
-+ {
-+ fprintf (file, "gp(");
-+ output_addr_const (file, addr);
-+ fprintf (file, ")");
-+ }
-+ else
-+ abort_with_insn (addr, "can't use non gp relative absolute address");
-+ break;
-+
-+ default:
-+ abort_with_insn (addr, "invalid addressing mode");
-+ break;
-+ }
-+}
-+
-+/* Determine where to put an argument to a function.
-+ Value is zero to push the argument on the stack,
-+ or a hard register in which to store the argument.
-+
-+ MODE is the argument's machine mode.
-+ TYPE is the data type of the argument (as a tree).
-+ This is null for libcalls where that information may
-+ not be available.
-+ CUM is a variable of type CUMULATIVE_ARGS which gives info about
-+ the preceding args and about the function being called.
-+ NAMED is nonzero if this argument is a named parameter
-+ (otherwise it is an extra parameter matching an ellipsis). */
-+
-+rtx
-+lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named)
-+{
-+ if (mode == VOIDmode)
-+ /* Compute operand 2 of the call insn. */
-+ return GEN_INT (0);
-+
-+ if (targetm.calls.must_pass_in_stack (mode, type))
-+ return NULL_RTX;
-+
-+ if (!named || (cum + LM32_NUM_REGS2(mode, type) > LM32_NUM_ARG_REGS))
-+ return NULL_RTX;
-+
-+ return gen_rtx_REG (mode, cum + LM32_FIRST_ARG_REG);
-+}
-+
-+HOST_WIDE_INT
-+lm32_compute_initial_elimination_offset (int from, int to)
-+{
-+ HOST_WIDE_INT offset = 0;
-+
-+ switch (from)
-+ {
-+ /*case FRAME_POINTER_REGNUM: - Same as ARG_POINTER_REGNUM */
-+ case ARG_POINTER_REGNUM:
-+ switch (to)
-+ {
-+ case FRAME_POINTER_REGNUM:
-+ offset = 0;
-+ break;
-+ case STACK_POINTER_REGNUM:
-+ offset = lm32_compute_frame_size (get_frame_size ()) - current_frame_info.pretend_size;
-+ break;
-+ default:
-+ abort ();
-+ }
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ return offset;
-+}
-+
-+static void
-+lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl)
-+{
-+ int first_anon_arg;
-+ tree fntype;
-+ int stdarg_p;
-+
-+ fntype = TREE_TYPE (current_function_decl);
-+ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0
-+ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
-+ != void_type_node));
-+
-+ if (stdarg_p)
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG;
-+ else
-+ {
-+ /* this is the common case, we have been passed details setup
-+ for the last named argument, we want to skip over the
-+ registers, if any used in passing this named paramter in
-+ order to determine which is the first registers used to pass
-+ anonymous arguments */
-+ int size;
-+
-+ if (mode==BLKmode)
-+ size = int_size_in_bytes (type);
-+ else
-+ size = GET_MODE_SIZE (mode);
-+
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG + ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
-+ }
-+
-+ if ((first_anon_arg < (LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS)) && !no_rtl)
-+ {
-+ int first_reg_offset = first_anon_arg;
-+ int size = LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS - first_anon_arg;
-+ rtx regblock;
-+
-+ regblock = gen_rtx_MEM (BLKmode,
-+ plus_constant (arg_pointer_rtx,
-+ FIRST_PARM_OFFSET (0)));
-+ move_block_from_reg (first_reg_offset, regblock, size);
-+
-+ *pretend_size = size * UNITS_PER_WORD;
-+ }
-+}
-+
-+/* Abort after printing out a specific insn. */
-+static void
-+abort_with_insn (rtx insn, const char *reason)
-+{
-+ error (reason);
-+ debug_rtx (insn);
-+ abort ();
-+}
-+
-+/* Override command line options */
-+void
-+lm32_override_options (void)
-+{
-+ /* We must have sign-extend enabled if barrel-shift isn't */
-+ if (!MASK_BARREL_SHIFT_ENABLED)
-+ {
-+ warning (0, "neither -mbarrel-shift-enabled nor -msign-extend-enabled specified. Assuming -msign-extend-enabled");
-+ target_flags |= MASK_SIGN_EXTEND_ENABLED;
-+ }
-+}
-+
-+/* Return nonzero if this function is known to have a null epilogue.
-+ This allows the optimizer to omit jumps to jumps if no stack
-+ was created. */
-+int
-+lm32_can_use_return (void)
-+{
-+ if (!reload_completed)
-+ return 0;
-+
-+ if (df_regs_ever_live_p(RA_REGNUM) || crtl->profile)
-+ return 0;
-+
-+ if (lm32_compute_frame_size (get_frame_size ()) != 0)
-+ return 0;
-+
-+ return 1;
-+}
-+
-+/* Support function to determine the return address of the function
-+ 'count' frames back up the stack. */
-+rtx
-+lm32_return_addr_rtx (int count, rtx frame)
-+{
-+ rtx r;
-+ if (count == 0)
-+ {
-+ /* *mjs* This test originally used leaf_function_p (), we now use
-+ the regs_ever_live test which I *think* is more accurate. */
-+ if (!df_regs_ever_live_p(RA_REGNUM))
-+ {
-+ r = gen_rtx_REG (Pmode, RA_REGNUM);
-+ }
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ }
-+ else if (flag_omit_frame_pointer)
-+ r = NULL_RTX;
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ return r;
-+}
-+
-+/* Return true if EXP should be placed in the small data section. */
-+
-+static bool
-+lm32_in_small_data_p (const_tree exp)
-+{
-+ /* We want to merge strings, so we never consider them small data. */
-+ if (TREE_CODE (exp) == STRING_CST)
-+ return false;
-+
-+ /* Functions are never in the small data area. Duh. */
-+ if (TREE_CODE (exp) == FUNCTION_DECL)
-+ return false;
-+
-+ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
-+ {
-+ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
-+ if (strcmp (section, ".sdata") == 0
-+ || strcmp (section, ".sbss") == 0)
-+ return true;
-+ }
-+ else
-+ {
-+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
-+
-+ /* If this is an incomplete type with size 0, then we can't put it
-+ in sdata because it might be too big when completed. */
-+ if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+/* Emit straight-line code to move LENGTH bytes from SRC to DEST.
-+ Assume that the areas do not overlap. */
-+
-+static void
-+lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length, HOST_WIDE_INT alignment)
-+{
-+ HOST_WIDE_INT offset, delta;
-+ unsigned HOST_WIDE_INT bits;
-+ int i;
-+ enum machine_mode mode;
-+ rtx *regs;
-+
-+ /* Work out how many bits to move at a time. */
-+ switch (alignment)
-+ {
-+ case 1:
-+ bits = 8;
-+ break;
-+ case 2:
-+ bits = 16;
-+ break;
-+ case 4:
-+ bits = 32;
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ mode = mode_for_size (bits, MODE_INT, 0);
-+ delta = bits / BITS_PER_UNIT;
-+
-+ /* Allocate a buffer for the temporary registers. */
-+ regs = alloca (sizeof (rtx) * length / delta);
-+
-+ /* Load as many BITS-sized chunks as possible. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ {
-+ regs[i] = gen_reg_rtx (mode);
-+ emit_move_insn (regs[i], adjust_address (src, mode, offset));
-+ }
-+
-+ /* Copy the chunks to the destination. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ emit_move_insn (adjust_address (dest, mode, offset), regs[i]);
-+
-+ /* Mop up any left-over bytes. */
-+ if (offset < length)
-+ {
-+ src = adjust_address (src, BLKmode, offset);
-+ dest = adjust_address (dest, BLKmode, offset);
-+ move_by_pieces (dest, src, length - offset,
-+ MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), 0);
-+ }
-+}
-+
-+/* Expand string/block move operations.
-+
-+ operands[0] is the pointer to the destination.
-+ operands[1] is the pointer to the source.
-+ operands[2] is the number of bytes to move.
-+ operands[3] is the alignment. */
-+
-+int
-+lm32_expand_block_move (rtx *operands)
-+{
-+ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) <= 32))
-+ {
-+ lm32_block_move_inline (operands[0], operands[1], INTVAL (operands[2]), INTVAL (operands[3]));
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
-+ isn't protected by a PIC unspec. */
-+int
-+nonpic_symbol_mentioned_p (rtx x)
-+{
-+ register const char *fmt;
-+ register int i;
-+
-+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF
-+ || GET_CODE (x) == PC)
-+ return 1;
-+
-+ /* We don't want to look into the possible MEM location of a
-+ CONST_DOUBLE, since we're not going to use it, in general. */
-+ if (GET_CODE (x) == CONST_DOUBLE)
-+ return 0;
-+
-+ if (GET_CODE (x) == UNSPEC)
-+ return 0;
-+
-+ fmt = GET_RTX_FORMAT (GET_CODE (x));
-+ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
-+ {
-+ if (fmt[i] == 'E')
-+ {
-+ register int j;
-+
-+ for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-+ if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j)))
-+ return 1;
-+ }
-+ else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i)))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.h gcc-4.4.6/gcc/config/lm32/lm32.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.h 2011-04-20 17:27:23.064805897 +0200
-@@ -0,0 +1,657 @@
-+/* Definitions of target machine for GNU compiler, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/*-------------------------------*/
-+/* Run-time Target Specification */
-+/*-------------------------------*/
-+
-+/* Print subsidiary information on the compiler version in use. */
-+#ifndef TARGET_VERSION
-+#define TARGET_VERSION fprintf (stderr, " (LatticeMico32)")
-+#endif
-+
-+/* Target CPU builtins. */
-+#define TARGET_CPU_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__lm32__"); \
-+ builtin_define_std ("lm32"); \
-+ builtin_assert ("cpu=lm32"); \
-+ builtin_assert ("machine=lm32"); \
-+ } \
-+ while (0)
-+
-+#define CPP_SPEC "\
-+%{mmultiply-enabled:-D__multiply_enabled__} \
-+%{mdivide-enabled:-D__divide_enabled__} \
-+%{mbarrel-shift-enabled:-D__barrel_shift_enabled__} \
-+%{msign-extend-enabled:-D__sign_extend_enabled__} \
-+%{muser-enabled:-D__user_enabled__} \
-+"
-+
-+#undef ASM_SPEC
-+#define ASM_SPEC "\
-+%{mmultiply-enabled} \
-+%{mdivide-enabled} \
-+%{mbarrel-shift-enabled} \
-+%{msign-extend-enabled} \
-+%{muser-extend-enabled} \
-+%{v} \
-+"
-+
-+/* Let link script define all link options.
-+ Default to using simulator link script. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC ""
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC ""
-+#undef LIB_SPEC
-+#define LIB_SPEC "%{!T*:-T sim.ld}"
-+
-+#define OVERRIDE_OPTIONS lm32_override_options()
-+
-+extern int target_flags;
-+
-+/* Add -G xx support. */
-+
-+#undef SWITCH_TAKES_ARG
-+#define SWITCH_TAKES_ARG(CHAR) \
-+(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*}"
-+
-+extern struct rtx_def *lm32_compare_op0;
-+extern struct rtx_def *lm32_compare_op1;
-+
-+/*---------------------------------*/
-+/* Target machine storage layout. */
-+/*---------------------------------*/
-+
-+#define BITS_BIG_ENDIAN 0
-+#define BYTES_BIG_ENDIAN 1
-+#define WORDS_BIG_ENDIAN 1
-+#define LIBGCC2_WORDS_BIG_ENDIAN 1
-+
-+#define BITS_PER_UNIT 8
-+#define BITS_PER_WORD 32
-+#define UNITS_PER_WORD 4
-+
-+#define POINTER_SIZE 32
-+
-+#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
-+do { \
-+ if (GET_MODE_CLASS (MODE) == MODE_INT \
-+ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
-+ (MODE) = word_mode; \
-+} while (0)
-+
-+#define PARM_BOUNDARY 32
-+
-+#define STACK_BOUNDARY 32
-+
-+#define BIGGEST_ALIGNMENT 64
-+
-+#define FUNCTION_BOUNDARY 32
-+
-+#define EMPTY_FIELD_BOUNDARY 32
-+
-+#define STRICT_ALIGNMENT 1
-+
-+#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
-+
-+/* Make strings word-aligned so strcpy from constants will be faster. */
-+#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
-+ (TREE_CODE (EXP) == STRING_CST \
-+ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
-+
-+/* Make arrays and structures word-aligned to allow faster copying etc. */
-+#define DATA_ALIGNMENT(TYPE, ALIGN) \
-+ ((((ALIGN) < BITS_PER_WORD) \
-+ && (TREE_CODE (TYPE) == ARRAY_TYPE \
-+ || TREE_CODE (TYPE) == UNION_TYPE \
-+ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))
-+
-+/* We need this for the same reason as DATA_ALIGNMENT, namely to cause
-+ character arrays to be word-aligned so that `strcpy' calls that copy
-+ constants to character arrays can be done inline, and 'strcmp' can be
-+ optimised to use word loads. */
-+#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
-+ DATA_ALIGNMENT (TYPE, ALIGN)
-+
-+/*----------------------------------------*/
-+/* Layout of source language data types. */
-+/*----------------------------------------*/
-+
-+#define INT_TYPE_SIZE 32
-+#define SHORT_TYPE_SIZE 16
-+#define LONG_TYPE_SIZE 32
-+#define LONG_LONG_TYPE_SIZE 64
-+
-+#define FLOAT_TYPE_SIZE 32
-+#define DOUBLE_TYPE_SIZE 64
-+#define LONG_DOUBLE_TYPE_SIZE 64
-+
-+#define DEFAULT_SIGNED_CHAR 0
-+
-+#define SIZE_TYPE "unsigned int"
-+
-+#define PTRDIFF_TYPE "int"
-+
-+/*---------------------------*/
-+/* Standard register usage. */
-+/*---------------------------*/
-+
-+#define FIRST_PSEUDO_REGISTER 32
-+
-+#define RV_REGNUM 1
-+#define GP_REGNUM 26
-+#define FP_REGNUM 27
-+#define SP_REGNUM 28
-+#define RA_REGNUM 29
-+
-+#define G_REG_P(X) ((X)<32)
-+#define PSEUDO_REG_P(X) ((X)>=FIRST_PSEUDO_REGISTER)
-+
-+#define FIXED_REGISTERS \
-+{ 1, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define CALL_USED_REGISTERS \
-+{ 1, 1, 1, 1, 1, 1, 1, 1, \
-+ 1, 1, 1, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define HARD_REGNO_NREGS(REGNO, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define HARD_REGNO_MODE_OK(REGNO, MODE) G_REG_P(REGNO)
-+
-+#define MODES_TIEABLE_P(MODE1, MODE2) \
-+( GET_MODE_CLASS (MODE1) == MODE_INT \
-+ && GET_MODE_CLASS (MODE2) == MODE_INT \
-+ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
-+ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
-+
-+#define AVOID_CCMODE_COPIES
-+
-+/*----------------------------------*/
-+/* Register classes and constants. */
-+/*----------------------------------*/
-+
-+enum reg_class {
-+ NO_REGS,
-+ GENERAL_REGS,
-+ ALL_REGS,
-+ LIM_REG_CLASSES
-+};
-+
-+#define N_REG_CLASSES (int) LIM_REG_CLASSES
-+
-+#define REG_CLASS_NAMES { "NO_REGS", "GENERAL_REGS", "ALL_REGS" }
-+
-+#define REG_CLASS_CONTENTS \
-+{ {0x00000000}, \
-+ {0xffffffff}, \
-+ {0xffffffff} \
-+}
-+
-+#define REGNO_REG_CLASS(REGNO) \
-+ (G_REG_P(REGNO) ? GENERAL_REGS : NO_REGS)
-+
-+#define CLASS_MAX_NREGS(CLASS, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define INDEX_REG_CLASS NO_REGS
-+
-+#define BASE_REG_CLASS GENERAL_REGS
-+
-+#define REG_CLASS_FROM_LETTER(C) NO_REGS
-+
-+#ifdef REG_OK_STRICT
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || G_REG_P (reg_renumber[REGNO]))
-+#else
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || PSEUDO_REG_P (REGNO))
-+#endif
-+
-+#define REGNO_OK_FOR_INDEX_P(REGNO) 0
-+
-+#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
-+
-+/* The letters I, J, K, L, M, N, O, P in a register constraint string
-+ can be used to stand for particular ranges of immediate operands.
-+ This macro defines what the ranges are.
-+ C is the letter, and VALUE is a constant value.
-+ Return 1 if VALUE is in the range specified by C.
-+
-+ Lattice usage:
-+
-+ J - 0
-+ K - 16-bit signed
-+ L - 16-bit unsigned
-+ M - 32-bit signed
-+ */
-+#define MEDIUM_INT(X) ((((HOST_WIDE_INT)(X)) >= -32768) && (((HOST_WIDE_INT)(X)) < 32768))
-+#define MEDIUM_UINT(X) (((unsigned HOST_WIDE_INT)(X)) < 65536)
-+#define LARGE_INT(X) \
-+((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
-+ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
-+
-+#define CONST_OK_FOR_LETTER_P(VALUE, C) \
-+( (C) == 'J' ? (VALUE) == 0 \
-+ : (C) == 'K' ? MEDIUM_INT (VALUE) \
-+ : (C) == 'L' ? MEDIUM_UINT (VALUE) \
-+ : (C) == 'M' ? LARGE_INT (VALUE) \
-+ : 0 \
-+)
-+
-+#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
-+
-+/*----------------------------------------*/
-+/* Stack Layout and Calling Conventions. */
-+/*----------------------------------------*/
-+
-+#define STACK_GROWS_DOWNWARD 1
-+
-+#define FRAME_GROWS_DOWNWARD 1
-+
-+#define STACK_POINTER_OFFSET (UNITS_PER_WORD)
-+
-+#define STARTING_FRAME_OFFSET (UNITS_PER_WORD)
-+
-+#define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD)
-+
-+#define STACK_POINTER_REGNUM SP_REGNUM
-+
-+#define FRAME_POINTER_REGNUM FP_REGNUM
-+
-+#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
-+
-+#define FRAME_POINTER_REQUIRED (cfun->calls_alloca)
-+
-+#define RETURN_ADDR_RTX(count, frame) \
-+ lm32_return_addr_rtx (count, frame)
-+
-+/* FIXME! */
-+#define STATIC_CHAIN_REGNUM 3
-+
-+#define ELIMINABLE_REGS \
-+{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+}
-+
-+#define CAN_ELIMINATE(FROM, TO) \
-+ (((TO) == STACK_POINTER_REGNUM && frame_pointer_needed) ? 0 : 1)
-+
-+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
-+ (OFFSET) = lm32_compute_initial_elimination_offset (FROM, TO)
-+
-+/*-----------------------------*/
-+/* Function argument passing. */
-+/*-----------------------------*/
-+
-+#define ACCUMULATE_OUTGOING_ARGS 1
-+
-+#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
-+
-+/*--------------------------------*/
-+/* Passing Arguments in Registers */
-+/*--------------------------------*/
-+
-+/* The first argument register */
-+#define LM32_FIRST_ARG_REG 1
-+
-+/* The number of (integer) argument register available. */
-+#define LM32_NUM_ARG_REGS 8
-+
-+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-+ lm32_function_arg ((CUM), (MODE), (TYPE), (NAMED))
-+
-+#define CUMULATIVE_ARGS int
-+
-+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \
-+ (CUM) = 0
-+
-+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-+ (CUM) += LM32_NUM_REGS2 (MODE, TYPE)
-+
-+#define FUNCTION_ARG_REGNO_P(r) (((r) >= 1) && ((r) <= LM32_NUM_ARG_REGS))
-+
-+/*--------------------*/
-+/* Function results. */
-+/*--------------------*/
-+
-+#define FUNCTION_VALUE(VALTYPE, FUNC) \
-+ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \
-+ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
-+ ? word_mode \
-+ : TYPE_MODE (VALTYPE), \
-+ RV_REGNUM)
-+
-+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RV_REGNUM)
-+
-+#define FUNCTION_VALUE_REGNO_P(N) ((N) == RV_REGNUM)
-+
-+#define RETURN_IN_MEMORY(TYPE) lm32_return_in_memory (TYPE)
-+
-+#define DEFAULT_PCC_STRUCT_RETURN 0
-+
-+/* Convert from bytes to ints. */
-+#define LM32_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ type MODE. */
-+#define LM32_NUM_REGS(MODE) LM32_NUM_INTS (GET_MODE_SIZE (MODE))
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ TYPE MODE. */
-+#define LM32_NUM_REGS2(MODE, TYPE) \
-+ LM32_NUM_INTS ((MODE) == BLKmode ? \
-+ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))
-+
-+#define STRUCT_VALUE 0
-+
-+/*---------------------------*/
-+/* Function entry and exit. */
-+/*---------------------------*/
-+
-+/*-------------*/
-+/* Profiling. */
-+/*-------------*/
-+
-+#define FUNCTION_PROFILER(FILE, LABELNO)
-+
-+/*---------------*/
-+/* Trampolines. */
-+/*---------------*/
-+
-+#define INITIALIZE_TRAMPOLINE
-+#define TRAMPOLINE_SIZE 0
-+
-+/*---------------------*/
-+/* Addressing Modes. */
-+/*---------------------*/
-+
-+#define CONSTANT_ADDRESS_P(X) \
-+ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
-+ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \
-+ || (GET_CODE (X) == CONST)))
-+
-+#define MAX_REGS_PER_ADDRESS 1
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#else
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#endif
-+
-+#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X))
-+#define RTX_OK_FOR_STACK_P(X) (REG_P (X) && (REGNO (X) == STACK_POINTER_REGNUM))
-+#define CONST_OK_FOR_BASE_OFFSET(X, MODE) const_ok_for_base_offset ((X), (MODE))
-+
-+#define LEGITIMATE_BASE_INDEX_P(ADDR, MODE) \
-+( GET_CODE (ADDR)==PLUS \
-+ && RTX_OK_FOR_BASE_P (XEXP (ADDR, 0)) \
-+ && GET_CODE (XEXP (ADDR, 1)) == CONST_INT \
-+ && CONST_OK_FOR_BASE_OFFSET (XEXP ((ADDR), 1), (MODE)))
-+
-+#define LEGITIMATE_GPREL_P(ADDR) \
-+( GET_CODE (ADDR) == SYMBOL_REF \
-+ && SYMBOL_REF_SMALL_P (ADDR))
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#define GO_IF_LEGITIMATE_ADDRESS(m,x,l) \
-+{ \
-+ if (RTX_OK_FOR_BASE_P (x)) goto l; /* (rM) */ \
-+ else if (LEGITIMATE_BASE_INDEX_P (x, m)) goto l; /* (rM)+literal) */ \
-+ else if (LEGITIMATE_GPREL_P (x)) goto l; \
-+}
-+
-+#define ARM_LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
-+do { \
-+ if (flag_pic) \
-+ X = lm32_legitimize_pic_address (OLDX, MODE, NULL_RTX); \
-+} while (0)
-+
-+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-+ if (GET_CODE (ADDR) == PLUS) goto LABEL; \
-+
-+#define LEGITIMATE_CONSTANT_P(X) 1
-+
-+/*-------------------------*/
-+/* Condition Code Status. */
-+/*-------------------------*/
-+
-+#define REVERSIBLE_CC_MODE(MODE) 1
-+
-+/*---------*/
-+/* Costs. */
-+/*---------*/
-+
-+#define SLOW_BYTE_ACCESS 1
-+
-+#define NO_FUNCTION_CSE
-+
-+#define BRANCH_COST(speed_p, predictable_p) 4
-+
-+#define MOVE_RATIO(speed) (speed ? 24 : 3)
-+
-+/*------------*/
-+/* Sections. */
-+/*------------*/
-+
-+#define TEXT_SECTION_ASM_OP "\t.section\t.text"
-+#define DATA_SECTION_ASM_OP "\t.section\t.data"
-+#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\""
-+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
-+#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\""
-+
-+/*-------*/
-+/* PIC. */
-+/*-------*/
-+
-+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM)
-+
-+#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-+
-+#define LEGITIMATE_PIC_OPERAND_P(X) \
-+ (!(nonpic_symbol_mentioned_p (X)))
-+
-+/*-------------*/
-+/* Assembler. */
-+/*-------------*/
-+
-+#define ASM_COMMENT_START "#"
-+
-+#define ASM_APP_ON "#APP\n"
-+
-+#define ASM_APP_OFF "#NO_APP\n"
-+
-+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
-+ do { \
-+ fputc ( '\t', FILE); \
-+ assemble_name (FILE, LABEL1); \
-+ fputs ( " = ", FILE); \
-+ assemble_name (FILE, LABEL2); \
-+ fputc ( '\n', FILE); \
-+ } while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_LOCAL
-+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
-+do { \
-+ if ((SIZE) <= g_switch_value) \
-+ switch_to_section (sbss_section); \
-+ else \
-+ switch_to_section (bss_section); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+} while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_COMMON
-+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
-+do \
-+{ \
-+ if ((SIZE) <= g_switch_value) \
-+ { \
-+ switch_to_section (sbss_section); \
-+ (*targetm.asm_out.globalize_label) (FILE, NAME); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+ } \
-+ else \
-+ { \
-+ switch_to_section (bss_section); \
-+ fprintf ((FILE), "%s", COMMON_ASM_OP); \
-+ assemble_name ((FILE), (NAME)); \
-+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
-+ } \
-+} \
-+while (0)
-+
-+#define ASM_OUTPUT_LABEL(FILE, NAME) \
-+ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-+
-+#define ASM_OUTPUT_LABELREF(FILE,NAME) \
-+ do { \
-+ const char *xname = (NAME); \
-+ if (xname[0] == '@') \
-+ xname += 1; \
-+ if (xname[0] == '*') \
-+ xname += 1; \
-+ fputs (xname, FILE); \
-+ } while (0)
-+
-+#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \
-+ do { \
-+ assemble_name (STREAM, XSTR (SYMBOL, 0)); \
-+ } while (0)
-+
-+#define GLOBAL_ASM_OP "\t.global\t"
-+
-+#define REGISTER_NAMES \
-+{ \
-+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
-+ "r24", "r25", "gp", "fp", "sp", "ra", "ea", "ba"}
-+
-+#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
-+ (((CHAR) == '&') || ((CHAR) == '@') || ((CHAR) == '*'))
-+
-+#define PRINT_OPERAND(FILE, X, CODE) \
-+ lm32_print_operand (FILE, X, CODE)
-+
-+#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
-+ lm32_print_operand_address (FILE, ADDR)
-+
-+#ifndef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+#endif
-+
-+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-+ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", (1 << (LOG))); } while (0)
-+
-+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
-+do { \
-+ char label[64]; \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ fprintf (FILE, "\n\t.word\t"); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "\n"); \
-+} while (0)
-+
-+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-+do { \
-+ char label[64]; \
-+ fprintf (FILE, "\t.word\t("); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "-"); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, ")\n"); \
-+} while (0)
-+
-+/*-------------*/
-+/* Debugging. */
-+/*-------------*/
-+
-+#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
-+
-+#define CAN_DEBUG_WITHOUT_FP
-+
-+#define DEFAULT_GDB_EXTENSIONS 1
-+
-+/*--------*/
-+/* Misc. */
-+/*--------*/
-+
-+#define CASE_VECTOR_MODE Pmode
-+
-+#define WORD_REGISTER_OPERATIONS
-+
-+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
-+
-+#define SHORT_IMMEDIATES_SIGN_EXTEND
-+
-+#define MOVE_MAX UNITS_PER_WORD
-+#define MAX_MOVE_MAX 4
-+
-+#define SHIFT_COUNT_TRUNCATED 1
-+
-+#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-+
-+#define Pmode SImode
-+
-+#define FUNCTION_MODE SImode
-+
-+#ifndef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+#endif
-+
-+#define STORE_FLAG_VALUE 1
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.md gcc-4.4.6/gcc/config/lm32/lm32.md
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.md 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,1233 @@
-+;; Machine description of the Lattice Mico32 architecture for GNU C compiler.
-+;; Contributed by Jon Beniston <jon at beniston.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
-+;; <http://www.gnu.org/licenses/>.
-+
-+;; Include predicate definitions
-+(include "predicates.md")
-+
-+;; Register numbers
-+(define_constants
-+ [(RA_REGNUM 29) ; return address register.
-+ ]
-+)
-+
-+;; LM32 specific volatile operations
-+(define_constants
-+ [(UNSPECV_BLOCKAGE 1)] ; use to prevent scheduler from optimising accross bounaries
-+)
-+
-+;; LM32 specific operations
-+(define_constants
-+ [(UNSPEC_GOT 2)
-+ (UNSPEC_GOTOFF_HI16 3)
-+ (UNSPEC_GOTOFF_LO16 4)]
-+)
-+
-+;; ---------------------------------
-+;; instruction types
-+;; ---------------------------------
-+
-+(define_attr "type"
-+ "unknown,load,store,arith,compare,shift,multiply,divide,call,icall,ubranch,uibranch,cbranch"
-+ (const_string "unknown"))
-+
-+;; ---------------------------------
-+;; instruction lengths
-+;; ---------------------------------
-+
-+; All instructions are 4 bytes
-+; Except for branches that are out of range, and have to be implemented
-+; as two instructions
-+(define_attr "length" ""
-+ (cond [
-+ (eq_attr "type" "cbranch")
-+ (if_then_else
-+ (lt (abs (minus (match_dup 2) (pc)))
-+ (const_int 32768)
-+ )
-+ (const_int 4)
-+ (const_int 8)
-+ )
-+ ]
-+ (const_int 4))
-+)
-+
-+;; ---------------------------------
-+;; scheduling
-+;; ---------------------------------
-+
-+(define_automaton "lm32")
-+
-+(define_cpu_unit "x" "lm32")
-+(define_cpu_unit "m" "lm32")
-+(define_cpu_unit "w" "lm32")
-+
-+(define_insn_reservation "singlecycle" 1
-+ (eq_attr "type" "store,arith,call,icall,ubranch,uibranch,cbranch")
-+ "x")
-+
-+(define_insn_reservation "twocycle" 2
-+ (eq_attr "type" "compare,shift,divide")
-+ "x,m")
-+
-+(define_insn_reservation "threecycle" 3
-+ (eq_attr "type" "load,multiply")
-+ "x,m,w")
-+
-+;; ---------------------------------
-+;; mov
-+;; ---------------------------------
-+
-+(define_expand "movqi"
-+ [(set (match_operand:QI 0 "general_operand" "")
-+ (match_operand:QI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operand0) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (QImode, operands[1]);
-+ }
-+ }
-+ if ( GET_CODE (operands[1]) == CONST_INT
-+ && GET_CODE (operands[0]) == REG)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ emit_insn (gen_movsi (operands[0], operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movhi"
-+ [(set (match_operand:HI 0 "general_operand" "")
-+ (match_operand:HI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (HImode, operands[1]);
-+ }
-+ }
-+ if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movsi"
-+ [(set (match_operand:SI 0 "general_operand" "")
-+ (match_operand:SI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM
-+ || (GET_CODE (operands[0]) == SUBREG
-+ && GET_CODE (SUBREG_REG (operands[0])) == MEM))
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (SImode, operands[1]);
-+ }
-+ }
-+
-+ if (flag_pic && symbolic_operand (operands[1], SImode))
-+ {
-+ if (GET_CODE (operands[1]) == LABEL_REF
-+ || (GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (operands[1])
-+ && !SYMBOL_REF_WEAK (operands[1])))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], operands[1]));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], operands[1]));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], operands[1]));
-+ }
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ else if (flag_pic && GET_CODE (operands[1]) == CONST)
-+ {
-+ rtx op = XEXP (operands[1], 0);
-+ if (GET_CODE (op) == PLUS)
-+ {
-+ rtx arg0 = XEXP (op, 0);
-+ rtx arg1 = XEXP (op, 1);
-+ if (GET_CODE (arg0) == LABEL_REF
-+ || (GET_CODE (arg0) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (arg0)
-+ && !SYMBOL_REF_WEAK (arg0)))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], arg0));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], arg0));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], arg0));
-+ }
-+ emit_insn (gen_addsi3 (operands[0], operands[0], arg1));
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_SMALL_P (operands[1])
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_gprel (operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == LABEL_REF
-+ || GET_CODE (operands[1]) == SYMBOL_REF
-+ || GET_CODE (operands[1]) == CONST
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_hi (operands[0], operands[1]));
-+ emit_insn (gen_movsi_reloc_lo (operands[0], operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+;;(define_expand "movmemsi"
-+;; [(parallel [(set (match_operand:BLK 0 "general_operand" "")
-+;; (match_operand:BLK 1 "general_operand" ""))
-+;; (use (match_operand:SI 2 "" ""))
-+;; (use (match_operand:SI 3 "const_int_operand" ""))])]
-+;; ""
-+;;{
-+;; if (!lm32_expand_block_move (operands))
-+;; FAIL;
-+;; DONE;
-+;;})
-+
-+;; ---------------------------------
-+;; load/stores/moves
-+;; ---------------------------------
-+
-+(define_insn "movsi_kimm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_K_operand" "K"))]
-+ ""
-+ "addi %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_limm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_L_operand" "L"))]
-+ ""
-+ "ori %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "immediate_operand" "i")))]
-+ ""
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "immediate_operand" "i")))]
-+ ""
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_gprel"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "reloc_operand" "i"))]
-+ "GET_CODE (operands[1]) == SYMBOL_REF && SYMBOL_REF_SMALL_P (operands[1])"
-+ "mva %0, gp(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_got"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))]
-+ "flag_pic"
-+ "lw %0, (gp+got(%1))"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_hi16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))]
-+ "flag_pic"
-+ "orhi %0, r0, gotoffhi16(%1)"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_lo16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))]
-+ "flag_pic"
-+ "addi %0, %1, gotofflo16(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*movqi_insn"
-+ [(set (match_operand:QI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:QI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ or %0, %1, r0
-+ sb %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movhi_insn"
-+ [(set (match_operand:HI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:HI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ or %0, %1, r0
-+ sh %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movsi_insn"
-+ [(set (match_operand:SI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:SI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lw %0, %1
-+ or %0, %1, r0
-+ sw %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+;; ---------------------------------
-+;; sign and zero extension
-+;; ---------------------------------
-+
-+(define_insn "*extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (sign_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (zero_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lh %0, %1
-+ sexth %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ andi %0, %1, 0xffff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+;; ---------------------------------
-+;; compare
-+;; ---------------------------------
-+
-+(define_expand "cmpsi"
-+ [(set (cc0)
-+ (compare:CC (match_operand:SI 0 "register_operand" "")
-+ (match_operand:SI 1 "register_or_K_operand" "")))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = operands[1];
-+ DONE;
-+}")
-+
-+
-+(define_expand "tstsi"
-+ [(set (cc0)
-+ (match_operand:SI 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = const0_rtx;
-+ DONE;
-+}")
-+
-+(define_expand "seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (eq:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (eq:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpe %0, %z1, %2
-+ cmpei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ne:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ne:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpne %0, %z1, %2
-+ cmpnei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpg %0, %z1, %2
-+ cmpgi %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "slt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ge:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ge:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpge %0, %z1, %2
-+ cmpgei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sle"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (le:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gtu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gtu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgu %0, %z1, %2
-+ cmpgui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sltu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ltu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (geu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (geu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgeu %0, %z1, %2
-+ cmpgeui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sleu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (leu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+;; ---------------------------------
-+;; unconditional branch
-+;; ---------------------------------
-+
-+(define_insn "jump"
-+ [(set (pc) (label_ref (match_operand 0 "" "")))]
-+ ""
-+ "bi %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+(define_expand "indirect_jump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ emit_jump_insn (gen_indirect_jumpsi (operands[0]));
-+ DONE;
-+}")
-+
-+(define_insn "indirect_jumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; conditional branch
-+;; ---------------------------------
-+
-+(define_expand "beq"
-+ [(set (pc)
-+ (if_then_else (eq:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (EQ, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bne"
-+ [(set (pc)
-+ (if_then_else (ne:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (NE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgt"
-+ [(set (pc)
-+ (if_then_else (gt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bge"
-+ [(set (pc)
-+ (if_then_else (ge:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "ble"
-+ [(set (pc)
-+ (if_then_else (le:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "blt"
-+ [(set (pc)
-+ (if_then_else (lt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bleu"
-+ [(set (pc)
-+ (if_then_else (leu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bltu"
-+ [(set (pc)
-+ (if_then_else (ltu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_insn "*beq"
-+ [(set (pc)
-+ (if_then_else (eq:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "be %z0,%z1,%2"
-+ : "bne %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bne"
-+ [(set (pc)
-+ (if_then_else (ne:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bne %z0,%z1,%2"
-+ : "be %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgt"
-+ [(set (pc)
-+ (if_then_else (gt:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bg %z0,%z1,%2"
-+ : "bge %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bge"
-+ [(set (pc)
-+ (if_then_else (ge:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bge %z0,%z1,%2"
-+ : "bg %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgu %z0,%z1,%2"
-+ : "bgeu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgeu %z0,%z1,%2"
-+ : "bgu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+;; ---------------------------------
-+;; call
-+;; ---------------------------------
-+
-+(define_expand "call"
-+ [(parallel [(call (match_operand 0 "memory_operand" "m")
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[0], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_via_regsi (addr, operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_via_regsi"
-+ [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %0"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_via_labelsi"
-+ [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "X"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %0"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_expand "call_value"
-+ [(parallel [(set (match_operand 0 "register_operand" "=r")
-+ (call (match_operand 1 "memory_operand" "m")
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[1], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_value_via_regsi (operands[0], addr, operands[2]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_value_via_regsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %1"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_value_via_labelsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "symbolic_operand" "X"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %1"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_insn "return_internalsi"
-+ [(use (match_operand:SI 0 "register_operand" "r"))
-+ (return)]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+(define_insn "return"
-+ [(return)]
-+ "lm32_can_use_return ()"
-+ "ret"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; switch/case statements
-+;; ---------------------------------
-+
-+(define_expand "tablejump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "
-+{
-+ rtx target = operands[0];
-+ if (flag_pic)
-+ {
-+ /* For PIC, the table entry is relative to the start of the table. */
-+ rtx label = gen_reg_rtx (SImode);
-+ target = gen_reg_rtx (SImode);
-+ emit_move_insn (label, gen_rtx_LABEL_REF (SImode, operands[1]));
-+ emit_insn (gen_addsi3 (target, operands[0], label));
-+ }
-+ emit_jump_insn (gen_tablejumpsi (target, operands[1]));
-+ DONE;
-+}")
-+
-+(define_insn "tablejumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+;; ---------------------------------
-+;; arithmetic
-+;; ---------------------------------
-+
-+(define_insn "addsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (plus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ add %0, %z1, %2
-+ addi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "subsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, %z1, %z2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "mulsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (mult:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ "TARGET_MULTIPLY_ENABLED"
-+ "@
-+ mul %0, %z1, %2
-+ muli %0, %z1, %2"
-+ [(set_attr "type" "multiply")]
-+)
-+
-+(define_insn "udivsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (udiv:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "divu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+(define_insn "umodsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (umod:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "modu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+;; ---------------------------------
-+;; negation and inversion
-+;; ---------------------------------
-+
-+(define_insn "negsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (neg:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, r0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "one_cmplsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (not:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "not %0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; logical
-+;; ---------------------------------
-+
-+(define_insn "andsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (and:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ and %0, %z1, %2
-+ andi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "iorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ or %0, %z1, %2
-+ ori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "xorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ xor %0, %z1, %2
-+ xori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*norsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ nor %0, %z1, %2
-+ nori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*xnorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ xnor %0, %z1, %2
-+ xnori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; shifts
-+;; ---------------------------------
-+
-+(define_insn "ashlsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashift:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sl %0, %z1, %2
-+ sli %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "ashrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sr %0, %z1, %2
-+ sri %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "lshrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (lshiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sru %0, %z1, %2
-+ srui %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+;; ---------------------------------
-+;; function entry / exit
-+;; ---------------------------------
-+
-+(define_expand "prologue"
-+ [(const_int 1)]
-+ ""
-+ "
-+{
-+ lm32_expand_prologue ();
-+ DONE;
-+}")
-+
-+(define_expand "epilogue"
-+ [(return)]
-+ ""
-+ "
-+{
-+ lm32_expand_epilogue ();
-+ DONE;
-+}")
-+
-+;; ---------------------------------
-+;; nop
-+;; ---------------------------------
-+
-+(define_insn "nop"
-+ [(const_int 0)]
-+ ""
-+ "nop"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; blockage
-+;; ---------------------------------
-+
-+;; used to stop the scheduler from
-+;; scheduling code across certain boundaries
-+
-+(define_insn "blockage"
-+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
-+ ""
-+ ""
-+ [(set_attr "length" "0")]
-+)
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.opt gcc-4.4.6/gcc/config/lm32/lm32.opt
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.opt 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.opt 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,40 @@
-+; Options for the Lattice Mico32 port of the compiler.
-+; Contributed by Jon Beniston <jon at beniston.com>
-+;
-+; Copyright (C) 2008 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it
-+; under the terms of the GNU General Public License as published
-+; by the Free Software Foundation; either version 3, or (at your
-+; option) any later version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT
-+; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+; License for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+mmultiply-enabled
-+Target Report Mask(MULTIPLY_ENABLED)
-+Enable multiply instructions
-+
-+mdivide-enabled
-+Target Report Mask(DIVIDE_ENABLED)
-+Enable divide and modulus instructions
-+
-+mbarrel-shift-enabled
-+Target Report Mask(BARREL_SHIFT_ENABLED)
-+Enable barrel shift instructions
-+
-+msign-extend-enabled
-+Target Report Mask(SIGN_EXTEND_ENABLED)
-+Enable sign extend instructions
-+
-+muser-enabled
-+Target Report Mask(USER_ENABLED)
-+Enable user-defined instructions
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h gcc-4.4.6/gcc/config/lm32/lm32-protos.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32-protos.h 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,52 @@
-+/* Prototypes of target machine functions, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+extern int lm32_return_in_memory (tree type);
-+extern void lm32_declare_object (FILE *stream, char *name, char *init_string,
-+ char *final_string, int size);
-+extern int symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_zero_operand (rtx op, enum machine_mode mode);
-+extern int register_or_K_operand (rtx op, enum machine_mode mode);
-+extern int constant_K_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_L_operand (rtx op, enum machine_mode mode);
-+extern int constant_L_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_memory_operand (rtx op, enum machine_mode mode);
-+extern int register_operand (rtx op, enum machine_mode mode);
-+extern int const_ok_for_base_offset (rtx op, enum machine_mode mode);
-+extern void lm32_expand_prologue (void);
-+extern void lm32_expand_epilogue (void);
-+extern HOST_WIDE_INT lm32_compute_frame_size (int size);
-+extern void lm32_print_operand (FILE *file, rtx op, int letter);
-+extern void lm32_print_operand_address (FILE *file, rtx addr);
-+extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named);
-+extern void lm32_override_options (void);
-+extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
-+ int to);
-+extern int lm32_can_use_return (void);
-+extern rtx lm32_return_addr_rtx (int count, rtx frame);
-+#ifdef RTX_CODE
-+extern void gen_int_relational (enum rtx_code code, rtx result, rtx cmp0,
-+ rtx cmp1, rtx destination);
-+#endif
-+extern int lm32_expand_block_move (rtx *);
-+extern int nonpic_symbol_mentioned_p (rtx);
-+extern rtx lm32_legitimize_pic_address (rtx, enum machine_mode, rtx);
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/predicates.md gcc-4.4.6/gcc/config/lm32/predicates.md
---- gcc-4.4.6.orig/gcc/config/lm32/predicates.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/predicates.md 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,58 @@
-+;; Predicate definitions for Lattice Mico32.
-+;; Contributed by Jon Beniston <jon at beniston.com>
-+;;
-+;; Copyright (C) 2008 Free Software Foundation, Inc.
-+;;
-+;; This file is part of GCC.
-+;;
-+;; GCC is free software; you can redistribute it and/or modify it
-+;; under the terms of the GNU General Public License as published
-+;; by the Free Software Foundation; either version 3, or (at your
-+;; option) any later version.
-+;;
-+;; GCC is distributed in the hope that it will be useful, but WITHOUT
-+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+;; License for more details.
-+;;
-+;; You should have received a copy of the GNU General Public License
-+;; along with GCC; see the file COPYING3. If not see
-+;; <http://www.gnu.org/licenses/>.
-+
-+(define_predicate "const0_operand"
-+ (and (match_code "const_int,const_double,const_vector")
-+ (match_test "op == CONST0_RTX (GET_MODE (op))")))
-+
-+(define_predicate "constant_K_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_INT (INTVAL (op))")))
-+
-+(define_predicate "constant_L_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_UINT (INTVAL (op))")))
-+
-+(define_predicate "register_or_zero_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "const0_operand")))
-+
-+(define_predicate "register_or_memory_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "memory_operand")))
-+
-+(define_predicate "register_or_K_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_K_operand")))
-+
-+(define_predicate "register_or_L_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_L_operand")))
-+
-+(define_predicate "reloc_operand"
-+ (ior (ior (match_code "label_ref")
-+ (match_code "symbol_ref"))
-+ (match_code "const")))
-+
-+(define_predicate "symbolic_operand"
-+ (ior (match_code "label_ref")
-+ (match_code "symbol_ref")))
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/rtems.h gcc-4.4.6/gcc/config/lm32/rtems.h
---- gcc-4.4.6.orig/gcc/config/lm32/rtems.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/rtems.h 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,32 @@
-+/* Definitions for rtems targeting a lm32 using ELF.
-+ Copyright (C) 2009, Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+/* Target OS builtins. */
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__rtems__"); \
-+ builtin_define ("__USE_INIT_FINI__"); \
-+ builtin_assert ("system=rtems"); \
-+ } \
-+ while (0)
-+
-+/* Use the default */
-+#undef LINK_GCC_C_SEQUENCE_SPEC
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h gcc-4.4.6/gcc/config/lm32/sfp-machine.h
---- gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/sfp-machine.h 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,51 @@
-+#define _FP_W_TYPE_SIZE 32
-+#define _FP_W_TYPE unsigned long
-+#define _FP_WS_TYPE signed long
-+#define _FP_I_TYPE long
-+
-+#define _FP_MUL_MEAT_S(R,X,Y) \
-+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_D(R,X,Y) \
-+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_Q(R,X,Y) \
-+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
-+
-+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
-+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
-+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
-+
-+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
-+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
-+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
-+#define _FP_NANSIGN_S 0
-+#define _FP_NANSIGN_D 0
-+#define _FP_NANSIGN_Q 0
-+
-+#define _FP_KEEPNANFRACP 1
-+
-+/* Someone please check this. */
-+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
-+ do { \
-+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
-+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
-+ { \
-+ R##_s = Y##_s; \
-+ _FP_FRAC_COPY_##wc(R,Y); \
-+ } \
-+ else \
-+ { \
-+ R##_s = X##_s; \
-+ _FP_FRAC_COPY_##wc(R,X); \
-+ } \
-+ R##_c = FP_CLS_NAN; \
-+ } while (0)
-+
-+#define __LITTLE_ENDIAN 1234
-+#define __BIG_ENDIAN 4321
-+
-+#define __BYTE_ORDER __BIG_ENDIAN
-+
-+/* Define ALIASNAME as a strong alias for NAME. */
-+# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-+# define _strong_alias(name, aliasname) \
-+ extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp gcc-4.4.6/gcc/config/lm32/t-fprules-softfp
---- gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-fprules-softfp 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,5 @@
-+softfp_float_modes := sf df
-+softfp_int_modes := si di
-+softfp_extensions := sfdf
-+softfp_truncations := dfsf
-+softfp_machine_header := lm32/sfp-machine.h
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-lm32 gcc-4.4.6/gcc/config/lm32/t-lm32
---- gcc-4.4.6.orig/gcc/config/lm32/t-lm32 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-lm32 2011-04-20 17:27:23.065805908 +0200
-@@ -0,0 +1,19 @@
-+LIB1ASMSRC = lm32/lib1funcs.S
-+LIB1ASMFUNCS = _ashlsi3 _ashrsi3 _lshrsi3
-+
-+LM32_LIB1CSRC = $(srcdir)/config/lm32/arithmetic.c
-+LIB2FUNCS_EXTRA = _mulsi3.c \
-+ _udivmodsi4.c _divsi3.c _modsi3.c _udivsi3.c _umodsi3.c
-+# Size optimised versions: _ashlsi3.c _ashrsi3.c _lshrsi3.c
-+
-+# The fixed-point arithmetic code is in one file
-+# similar to libgcc2.c (or the old libgcc1.c). We need to
-+# "split it up" with one file per define.
-+$(LIB2FUNCS_EXTRA): $(LM32_LIB1CSRC)
-+ name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \
-+ echo "#define L$$name" > tmp-$@ \
-+ && echo '#include "$<"' >> tmp-$@ \
-+ && mv -f tmp-$@ $@
-+
-+MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled
-+# Don't bother building multilib with mdivide-enabled, not much of a gain
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h gcc-4.4.6/gcc/config/lm32/uclinux-elf.h
---- gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/uclinux-elf.h 2011-04-20 17:27:23.066805919 +0200
-@@ -0,0 +1,85 @@
-+/* Definitions for LM32 running Linux-based GNU systems using ELF
-+ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-+ 2008 Free Software Foundation, Inc.
-+ Contributed by Philip Blundell <philb at gnu.org>
-+
-+ 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
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* elfos.h should have already been included. Now just override
-+ any conflicting definitions and add any extras. */
-+
-+/* Run-time Target Specification. */
-+#undef TARGET_VERSION
-+#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr);
-+
-+/* Do not assume anything about header files. */
-+#undef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+
-+/* The GNU C++ standard library requires that these macros be defined. */
-+#undef CPLUSPLUS_CPP_SPEC
-+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-+
-+/* Now we define the strings used to build the spec file. */
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ "%{pthread:-lpthread} \
-+ %{shared:-lc} \
-+ %{!shared:-lc} "
-+
-+#define LIBGCC_SPEC "-lgcc"
-+
-+/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
-+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main'. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared: \
-+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
-+ %{!p:%{profile:gcrt1.o%s} \
-+ %{!profile:crt1.o%s}}}} \
-+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
-+
-+/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
-+ the GNU/Linux magical crtend.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main', followed by a normal
-+ GNU/Linux "finalizer" file, `crtn.o'. */
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "%{h*} %{version:-v} \
-+ %{b} %{Wl,*:%*} \
-+ %{static:-Bstatic} \
-+ %{shared:-shared} \
-+ %{symbolic:-Bsymbolic} \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
-+
-+#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
-+
-+#define LINK_GCC_C_SEQUENCE_SPEC \
-+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/m32c/rtems.h gcc-4.4.6/gcc/config/m32c/rtems.h
---- gcc-4.4.6.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
-+++ gcc-4.4.6/gcc/config/m32c/rtems.h 2011-04-20 17:27:23.066805919 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/m68k/rtemself.h gcc-4.4.6/gcc/config/m68k/rtemself.h
---- gcc-4.4.6.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/m68k/rtemself.h 2011-04-20 17:27:23.066805919 +0200
-@@ -31,3 +31,8 @@
- builtin_assert ("system=rtems"); \
- } \
- while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/mips/elf.h gcc-4.4.6/gcc/config/mips/elf.h
---- gcc-4.4.6.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/mips/elf.h 2011-04-20 17:27:23.066805919 +0200
-@@ -48,6 +48,4 @@
- #undef ENDFILE_SPEC
- #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
--#define NO_IMPLICIT_EXTERN_C 1
--
- #define HANDLE_PRAGMA_PACK_PUSH_POP 1
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/rtems.h gcc-4.4.6/gcc/config/rs6000/rtems.h
---- gcc-4.4.6.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rs6000/rtems.h 2011-04-20 17:27:23.066805919 +0200
-@@ -49,8 +49,22 @@
- %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
- %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
- %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
--%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
-+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
-+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }"
-
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS \
- { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }
-+
-+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
-+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
-+ do { \
-+ if (TARGET_E500) \
-+ { \
-+ rs6000_float_gprs = 1; \
-+ } \
-+ } while(0)
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/t-rtems gcc-4.4.6/gcc/config/rs6000/t-rtems
---- gcc-4.4.6.orig/gcc/config/rs6000/t-rtems 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/rs6000/t-rtems 2011-04-20 17:27:23.066805919 +0200
-@@ -1,13 +1,29 @@
- # Multilibs for powerpc RTEMS targets.
-+#
-+# Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
-+#
-+# This file is part of GCC.
-+#
-+# GCC is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+#
-+# GCC is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with GCC; see the file COPYING3. If not see
-+# <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = \
--mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
--Dmpc8260 \
-+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
- msoft-float
-
- MULTILIB_DIRNAMES = \
--m403 m505 m601 m603e m604 m860 m7400 \
--mpc8260 \
-+m403 m505 m601 m603e m604 m860 m7400 m8540 \
- nof
-
- # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
-@@ -29,6 +45,9 @@
- # Map 750 to .
- MULTILIB_MATCHES += mcpu?750=
-
-+# Map 8548 to 8540
-+MULTILIB_MATCHES += mcpu?8540=mcpu?8548
-+
- # Soft-float only, default implies msoft-float
- # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
- MULTILIB_SOFTFLOAT_ONLY = \
-@@ -55,10 +74,3 @@
-
- # Special rules
- # Take out all variants we don't want
--MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
-diff -Naur gcc-4.4.6.orig/gcc/config/rtems.h gcc-4.4.6/gcc/config/rtems.h
---- gcc-4.4.6.orig/gcc/config/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rtems.h 2011-04-20 17:27:23.066805919 +0200
-@@ -38,6 +38,5 @@
- #undef LIB_SPEC
- #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
- "%{!nostdlib: %{qrtems: --start-group \
-- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \
-- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
-+ -lrtemsbsp -lrtemscpu \
- -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
-diff -Naur gcc-4.4.6.orig/gcc/config/sh/rtemself.h gcc-4.4.6/gcc/config/sh/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sh/rtemself.h 2011-04-20 17:27:23.067805930 +0200
-@@ -24,3 +24,8 @@
- builtin_define( "__rtems__" ); \
- builtin_assert( "system=rtems" ); \
- } while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/sparc/rtemself.h gcc-4.4.6/gcc/config/sparc/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sparc/rtemself.h 2011-04-20 17:27:23.067805930 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config.gcc gcc-4.4.6/gcc/config.gcc
---- gcc-4.4.6.orig/gcc/config.gcc 2011-02-18 22:39:51.000000000 +0100
-+++ gcc-4.4.6/gcc/config.gcc 2011-04-20 17:27:23.067805930 +0200
-@@ -1377,6 +1377,23 @@
- out_file=iq2000/iq2000.c
- md_file=iq2000/iq2000.md
- ;;
-+lm32-*-elf*)
-+ tm_file="dbxelf.h elfos.h ${tm_file}"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
-+lm32-*-rtems*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ tmake_file="${tmake_file} t-rtems"
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ ;;
-+lm32-*-uclinux*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
- m32r-*-elf*)
- tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
- extra_parts="crtinit.o crtfini.o"
-diff -Naur gcc-4.4.6.orig/gcc/doc/contrib.texi gcc-4.4.6/gcc/doc/contrib.texi
---- gcc-4.4.6.orig/gcc/doc/contrib.texi 2009-02-20 16:20:38.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/contrib.texi 2011-04-20 17:27:23.068805941 +0200
-@@ -55,7 +55,7 @@
- Wolfgang Bangerth for processing tons of bug reports.
-
- @item
--Jon Beniston for his Microsoft Windows port of Java.
-+Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32.
-
- @item
- Daniel Berlin for better DWARF2 support, faster/better optimizations,
-diff -Naur gcc-4.4.6.orig/gcc/doc/install.texi gcc-4.4.6/gcc/doc/install.texi
---- gcc-4.4.6.orig/gcc/doc/install.texi 2010-07-15 11:26:30.000000000 +0200
-+++ gcc-4.4.6/gcc/doc/install.texi 2011-04-20 17:27:23.069805952 +0200
-@@ -2660,6 +2660,10 @@
- @item
- @uref{#iq2000-x-elf,,iq2000-*-elf}
- @item
-+ at uref{#lm32-x-elf,,lm32-*-elf}
-+ at item
-+ at uref{#lm32-x-uclinux,,lm32-*-uclinux}
-+ at item
- @uref{#m32c-x-elf,,m32c-*-elf}
- @item
- @uref{#m32r-x-elf,,m32r-*-elf}
-@@ -3472,6 +3476,20 @@
- @html
- <hr />
- @end html
-+ at heading @anchor{lm32-x-elf}lm32-*-elf
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems.
-+
-+ at html
-+<hr />
-+ at end html
-+ at heading @anchor{lm32-x-uclinux}lm32-*-uclinux
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems running uClinux.
-+
-+ at html
-+<hr />
-+ at end html
- @heading @anchor{m32c-x-elf}m32c-*-elf
- Renesas M32C processor.
- This configuration is intended for embedded systems.
-diff -Naur gcc-4.4.6.orig/gcc/doc/invoke.texi gcc-4.4.6/gcc/doc/invoke.texi
---- gcc-4.4.6.orig/gcc/doc/invoke.texi 2011-03-23 23:02:12.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/invoke.texi 2011-04-20 17:27:23.073805994 +0200
-@@ -610,6 +610,10 @@
- -mno-sched-prefer-non-control-spec-insns @gol
- -mno-sched-count-spec-in-critical-path}
-
-+ at emph{LM32 Options}
-+ at gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol
-+-msign-extend-enabled -muser-enabled}
-+
- @emph{M32R/D Options}
- @gccoptlist{-m32r2 -m32rx -m32r @gol
- -mdebug @gol
-@@ -8858,6 +8862,7 @@
- * i386 and x86-64 Options::
- * i386 and x86-64 Windows Options::
- * IA-64 Options::
-+* LM32 Options::
- * M32C Options::
- * M32R/D Options::
- * M680x0 Options::
-@@ -11907,6 +11912,35 @@
-
- @end table
-
-+ at node LM32 Options
-+ at subsection LM32 Options
-+ at cindex LM32 options
-+
-+These @option{-m} options are defined for the Lattice Mico32 architecture:
-+
-+ at table @gcctabopt
-+ at item -mbarrel-shift-enabled
-+ at opindex mbarrel-shift-enabled
-+Enable barrel-shift instructions.
-+
-+ at item -mdivide-enabled
-+ at opindex mdivide-enabled
-+Enable divide and modulus instructions.
-+
-+ at item -mmultiply-enabled
-+ at opindex multiply-enabled
-+Enable multiply instructions.
-+
-+ at item -msign-extend-enabled
-+ at opindex msign-extend-enabled
-+Enable sign extend instructions.
-+
-+ at item -muser-enabled
-+ at opindex muser-enabled
-+Enable user-defined instructions.
-+
-+ at end table
-+
- @node M32R/D Options
- @subsection M32R/D Options
- @cindex M32R/D options
-diff -Naur gcc-4.4.6.orig/libgcc/ChangeLog.rtems gcc-4.4.6/libgcc/ChangeLog.rtems
---- gcc-4.4.6.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/ChangeLog.rtems 2011-04-20 17:27:23.074806005 +0200
-@@ -0,0 +1,5 @@
-+ Jon Beniston <jon at beniston.com>
-+
-+ * libgcc/config/lm32/t-elf, libgcc/config/lm32/t-uclinux,
-+ libgcc/config/lm32/t-uclinux: New (lm32 port).
-+ * libgcc/config.host: Add lm32* targets.
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-elf gcc-4.4.6/libgcc/config/lm32/t-elf
---- gcc-4.4.6.orig/libgcc/config/lm32/t-elf 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-elf 2011-04-20 17:27:23.074806005 +0200
-@@ -0,0 +1,12 @@
-+# Assemble startup files.
-+
-+$(T)crti.o: $(gcc_srcdir)/config/lm32/crti.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crti.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crti.S
-+
-+$(T)crtn.o: $(gcc_srcdir)/config/lm32/crtn.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crtn.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crtn.S
-+
-+CRTSTUFF_T_CFLAGS = -G 0
-+TARGET_LIBGCC2_CFLAGS = -G 0
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux gcc-4.4.6/libgcc/config/lm32/t-uclinux
---- gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-uclinux 2011-04-20 17:27:23.074806005 +0200
-@@ -0,0 +1,2 @@
-+CRTSTUFF_T_CFLAGS = -fPIC
-+TARGET_LIBGCC2_CFLAGS = -fPIC
-diff -Naur gcc-4.4.6.orig/libgcc/config.host gcc-4.4.6/libgcc/config.host
---- gcc-4.4.6.orig/libgcc/config.host 2009-04-17 13:58:41.000000000 +0200
-+++ gcc-4.4.6/libgcc/config.host 2011-04-20 17:27:23.074806005 +0200
-@@ -95,6 +95,9 @@
- hppa*-*-*)
- cpu_type=pa
- ;;
-+lm32*-*-*)
-+ cpu_type=lm32
-+ ;;
- m32r*-*-*)
- cpu_type=m32r
- ;;
-@@ -355,6 +358,14 @@
- ;;
- iq2000*-*-elf*)
- ;;
-+lm32-*-elf* | lm32-*-rtems*)
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ tmake_file="lm32/t-elf"
-+ ;;
-+lm32-*-uclinux*)
-+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-+ tmake_file="lm32/t-uclinux"
-+ ;;
- m32r-*-elf*|m32r-*-rtems*)
- ;;
- m32rle-*-elf*)
diff --git a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff b/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff
deleted file mode 100644
index c3a2c22..0000000
--- a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff
+++ /dev/null
@@ -1,4958 +0,0 @@
-diff -Naur gcc-4.4.6.orig/ChangeLog.rtems gcc-4.4.6/ChangeLog.rtems
---- gcc-4.4.6.orig/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/ChangeLog.rtems 2011-08-29 07:16:18.126123562 +0200
-@@ -0,0 +1,9 @@
-+2011-04-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure, configure.ac (PPL): Merge gcc-4.6.0's ppl detection
-+ (Work-around build breakdown on fedora 15).
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure, configure.ac (skipdirs): Add target-libiberty.
-+
-diff -Naur gcc-4.4.6.orig/configure gcc-4.4.6/configure
---- gcc-4.4.6.orig/configure 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure 2011-08-29 07:16:18.130123715 +0200
-@@ -935,7 +935,8 @@
- --enable-gold use gold instead of ld
- --enable-libada build libada directory
- --enable-libssp build libssp directory
-- --disable-ppl-version-check disable check for PPL version
-+ --disable-ppl-version-check
-+ disable check for PPL version
- --disable-cloog-version-check disable check for CLooG version
- --enable-stage1-languages[=all] choose additional languages to build during
- stage1. Mostly useful for compiler development.
-@@ -971,11 +972,12 @@
- --with-gmp-lib=PATH specify directory for the installed GMP library
- --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
- when linking with PPL
-- --with-ppl=PATH Specify prefix directory for the installed PPL package
-- Equivalent to --with-ppl-include=PATH/include
-- plus --with-ppl-lib=PATH/lib
-- --with-ppl-include=PATH Specify directory for installed PPL include files
-- --with-ppl-lib=PATH Specify the directory for the installed PPL library
-+ --with-ppl=PATH specify prefix directory for the installed PPL
-+ package. Equivalent to
-+ --with-ppl-include=PATH/include plus
-+ --with-ppl-lib=PATH/lib
-+ --with-ppl-include=PATH specify directory for installed PPL include files
-+ --with-ppl-lib=PATH specify directory for the installed PPL library
- --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
- Equivalent to --with-cloog-include=PATH/include
- plus --with-cloog-lib=PATH/lib
-@@ -2267,6 +2269,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -4829,10 +4832,9 @@
- esac
-
- # Check for PPL
--ppl_major_version=0
--ppl_minor_version=10
--ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
-+ppllibs=
- pplinc=
-+pwllib=
-
-
- # Check whether --with-ppl or --without-ppl was given.
-@@ -4841,55 +4843,143 @@
-
- fi;
-
--# Check whether --with-ppl_include or --without-ppl_include was given.
-+# Check whether --with-ppl-include or --without-ppl-include was given.
- if test "${with_ppl_include+set}" = set; then
- withval="$with_ppl_include"
-
- fi;
-
--# Check whether --with-ppl_lib or --without-ppl_lib was given.
-+# Check whether --with-ppl-lib or --without-ppl-lib was given.
- if test "${with_ppl_lib+set}" = set; then
- withval="$with_ppl_lib"
-
- fi;
-
-+# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given.
-+if test "${enable_ppl_version_check+set}" = set; then
-+ enableval="$enable_ppl_version_check"
-+
-+fi;
-+
- case $with_ppl in
-- no)
-- ppllibs=
-+ yes | no | "")
- ;;
- *)
-- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-+ ppllibs="-L$with_ppl/lib"
- pplinc="-I$with_ppl/include $pplinc"
-- LIBS="$ppllibs $LIBS"
-+ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then
-+ with_ppl=yes
-+ else
-+ { { echo "$as_me:$LINENO: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&5
-+echo "$as_me: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi
- ;;
- esac
--if test "x$with_ppl_include" != x; then
-+
-+if test x"$with_ppl_include" != x; then
- pplinc="-I$with_ppl_include $pplinc"
-+ with_ppl=yes
- fi
-+
- if test "x$with_ppl_lib" != x; then
-- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-- LIBS="$ppllibs $LIBS"
-+ ppllibs="-L$with_ppl_lib"
-+ with_ppl=yes
- fi
--if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
-- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-- LIBS="$ppllibs $LIBS"
-+
-+if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-+ if test x"$enable_watchdog" = xyes; then
-+ pwllib="-lpwl"
-+ fi
-+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"
-+ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
-+ enable_ppl_version_check=no
-+ with_ppl=yes
- fi
-
--# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given.
--if test "${enable_ppl_version_check+set}" = set; then
-- enableval="$enable_ppl_version_check"
-- ENABLE_PPL_CHECK=$enableval
-+if test "x$with_ppl" != xno; then
-+ if test "x$pwllib" = x; then
-+ saved_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $ppllibs"
-+ echo "$as_me:$LINENO: checking for PWL_handle_timeout in -lpwl" >&5
-+echo $ECHO_N "checking for PWL_handle_timeout in -lpwl... $ECHO_C" >&6
-+if test "${ac_cv_lib_pwl_PWL_handle_timeout+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-- ENABLE_PPL_CHECK=yes
--fi;
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lpwl $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-
--if test "${ENABLE_PPL_CHECK}" = "yes"; then
-- saved_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $pplinc $gmpinc"
-- echo "$as_me:$LINENO: checking for version $ppl_major_version.$ppl_minor_version of PPL" >&5
--echo $ECHO_N "checking for version $ppl_major_version.$ppl_minor_version of PPL... $ECHO_C" >&6
-- cat >conftest.$ac_ext <<_ACEOF
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char PWL_handle_timeout ();
-+int
-+main ()
-+{
-+PWL_handle_timeout ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_lib_pwl_PWL_handle_timeout=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_lib_pwl_PWL_handle_timeout=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_lib_pwl_PWL_handle_timeout" >&5
-+echo "${ECHO_T}$ac_cv_lib_pwl_PWL_handle_timeout" >&6
-+if test $ac_cv_lib_pwl_PWL_handle_timeout = yes; then
-+ pwllib="-lpwl"
-+fi
-+
-+ LDFLAGS="$saved_LDFLAGS"
-+ fi
-+
-+ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"
-+
-+ if test "$enable_ppl_version_check" != no; then
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $pplinc $gmpinc"
-+ echo "$as_me:$LINENO: checking for version 0.10 (revision 0 or later) of PPL" >&5
-+echo $ECHO_N "checking for version 0.10 (revision 0 or later) of PPL... $ECHO_C" >&6
-+ cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
-@@ -4900,9 +4990,9 @@
- main ()
- {
-
-- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
-- choke me
-- #endif
-+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
-+ choke me
-+ #endif
-
- ;
- return 0;
-@@ -4937,10 +5027,11 @@
- sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6; ppllibs= ; pplinc=
-+echo "${ECHO_T}no" >&6; ppllibs= ; pplinc= ; with_ppl=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-- CFLAGS="$saved_CFLAGS"
-+ CFLAGS="$saved_CFLAGS"
-+ fi
- fi
-
- # Flags needed for PPL
-@@ -6259,7 +6350,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/configure.ac gcc-4.4.6/configure.ac
---- gcc-4.4.6.orig/configure.ac 2010-10-02 13:40:32.000000000 +0200
-+++ gcc-4.4.6/configure.ac 2011-08-29 07:16:18.131123743 +0200
-@@ -502,6 +502,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -1328,55 +1329,81 @@
- esac
-
- # Check for PPL
--ppl_major_version=0
--ppl_minor_version=10
--ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
-+ppllibs=
- pplinc=
-+pwllib=
-
--AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
-- Equivalent to --with-ppl-include=PATH/include
-- plus --with-ppl-lib=PATH/lib])
--AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
--AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
-+AC_ARG_WITH(ppl,
-+[AS_HELP_STRING([--with-ppl=PATH],
-+ [specify prefix directory for the installed PPL package.
-+ Equivalent to --with-ppl-include=PATH/include
-+ plus --with-ppl-lib=PATH/lib])])
-+AC_ARG_WITH(ppl-include,
-+[AS_HELP_STRING([--with-ppl-include=PATH],
-+ [specify directory for installed PPL include files])])
-+AC_ARG_WITH(ppl-lib,
-+[AS_HELP_STRING([--with-ppl-lib=PATH],
-+ [specify directory for the installed PPL library])])
-
--case $with_ppl in
-- no)
-- ppllibs=
-+AC_ARG_ENABLE(ppl-version-check,
-+[AS_HELP_STRING([--disable-ppl-version-check],
-+ [disable check for PPL version])])
-+
-+case $with_ppl in
-+ yes | no | "")
- ;;
- *)
-- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-+ ppllibs="-L$with_ppl/lib"
- pplinc="-I$with_ppl/include $pplinc"
-- LIBS="$ppllibs $LIBS"
-+ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then
-+ with_ppl=yes
-+ else
-+ AC_MSG_ERROR([cannot find directories "$with_ppl/lib" or "$with_ppl/include"])
-+ fi
- ;;
- esac
--if test "x$with_ppl_include" != x; then
-+
-+if test x"$with_ppl_include" != x; then
- pplinc="-I$with_ppl_include $pplinc"
-+ with_ppl=yes
- fi
-+
- if test "x$with_ppl_lib" != x; then
-- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
-- LIBS="$ppllibs $LIBS"
-+ ppllibs="-L$with_ppl_lib"
-+ with_ppl=yes
- fi
--if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
-- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-- LIBS="$ppllibs $LIBS"
-+
-+if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
-+ if test x"$enable_watchdog" = xyes; then
-+ pwllib="-lpwl"
-+ fi
-+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"
-+ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
-+ enable_ppl_version_check=no
-+ with_ppl=yes
- fi
-
--AC_ARG_ENABLE(ppl-version-check,
--[ --disable-ppl-version-check disable check for PPL version],
--ENABLE_PPL_CHECK=$enableval,
--ENABLE_PPL_CHECK=yes)
-+if test "x$with_ppl" != xno; then
-+ if test "x$pwllib" = x; then
-+ saved_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $ppllibs"
-+ AC_CHECK_LIB(pwl,PWL_handle_timeout,[pwllib="-lpwl"])
-+ LDFLAGS="$saved_LDFLAGS"
-+ fi
-
--if test "${ENABLE_PPL_CHECK}" = "yes"; then
-- saved_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $pplinc $gmpinc"
-- AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
-- AC_TRY_COMPILE([#include "ppl_c.h"],[
-- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
-- choke me
-- #endif
-- ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ])
-- CFLAGS="$saved_CFLAGS"
-+ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"
-+
-+ if test "$enable_ppl_version_check" != no; then
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $pplinc $gmpinc"
-+ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL])
-+ AC_TRY_COMPILE([#include "ppl_c.h"],[
-+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
-+ choke me
-+ #endif
-+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ])
-+ CFLAGS="$saved_CFLAGS"
-+ fi
- fi
-
- # Flags needed for PPL
-@@ -2560,7 +2587,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-diff -Naur gcc-4.4.6.orig/gcc/ChangeLog.rtems gcc-4.4.6/gcc/ChangeLog.rtems
---- gcc-4.4.6.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/ChangeLog.rtems 2011-08-29 07:16:18.132123787 +0200
-@@ -0,0 +1,60 @@
-+2011-08-29 Ralf Corsépius <ralf.corsepius at rtems.org>
-+ and Eric Norum <wenorum at lbl.gov>
-+
-+ Fix bootstrap breakdowns on OS X 10.7.1 (Lion):
-+ * toplev.h, toplev.c: Switch-off "extern inline" if using clang.
-+
-+2011-02-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/t-rtems: Remove -mcpu=601 multilib.
-+ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib.
-+
-+2010-03-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ Patch from Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>:
-+ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support
-+ for vfp FPU model
-+
-+2010-02-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rtems.h: Abandon -qrtems_debug.
-+
-+2009-12-01 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN.
-+
-+2009-11-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/m32c/rtems.h, config/m68k/rtemself.h,
-+ config/m68k/rtemself.h, config/sh/rtemself.h,
-+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
-+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
-+ to interfere and cause wchar_t/wint_t incompatibilities).
-+
-+2009-10-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/avr/t-rtems: Don't build _exit.
-+
-+ Jon Beniston <jon at beniston.com>
-+
-+ * config/lm32/arithmetic.c, config/lm32/crti.S,
-+ config/lm32/crtn.S, config/lm32/lib1funcs.S,
-+ config/lm32/lm32.c, config/lm32/lm32.h,
-+ config/lm32/lm32.md, config/lm32/lm32.opt,
-+ config/lm32/lm32-protos.h, config/lm32/predicates.md,
-+ config/lm32/rtems.h, config/lm32/sfp-machine.h,
-+ config/lm32/t-fprules-softfp, config/lm32/t-lm32,
-+ config/lm32/uclinux-elf.h: New (lm32 port).
-+ * config.gcc: Add lm32* targets.
-+ * doc/contrib.texi, doc/invoke.texi: Add lm32.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/rs6000/rtems.h: Support for custom RTEMS multilibs.
-+ Support TARGET_E500.
-+ * config/rs6000/t-rtems: Custom RTEMS multilibs.
-+
-+ Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
-+
-\ No newline at end of file
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h gcc-4.4.6/gcc/config/arm/rtems-elf.h
---- gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/rtems-elf.h 2011-08-29 07:16:18.132123787 +0200
-@@ -36,7 +36,7 @@
- */
- #undef SUBTARGET_EXTRA_ASM_SPEC
- #define SUBTARGET_EXTRA_ASM_SPEC "\
-- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
-+ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}"
-
- /*
- * The default includes --start-group and --end-group which conflicts
-diff -Naur gcc-4.4.6.orig/gcc/config/arm/t-rtems gcc-4.4.6/gcc/config/arm/t-rtems
---- gcc-4.4.6.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100
-+++ gcc-4.4.6/gcc/config/arm/t-rtems 2011-08-29 07:16:18.133123835 +0200
-@@ -5,6 +5,41 @@
- MULTILIB_EXCEPTIONS =
- MULTILIB_MATCHES = marm=mno-thumb
-
--MULTILIB_OPTIONS += msoft-float/mhard-float
--MULTILIB_DIRNAMES += soft fpu
--MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
-+MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp
-+MULTILIB_DIRNAMES += fpu softfp
-+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp*
-+MULTILIB_MATCHES =
-+
-+MULTILIB_OPTIONS += mfpu=vfp
-+MULTILIB_DIRNAMES += vfp
-+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
-+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
-+
-+# default float model is fpa, so don't create a explicit copy of it
-+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
-+
-+# permutations of the options which are useful (+) or make no sense (-),
-+# defaults are in brackets:
-+# + (arm/soft/fpa)
-+# + (arm/soft)/vfp
-+# - (arm)/softfp(/fpa)
-+# + (arm)/softfp/vfp
-+# + (arm)/hard-float(/fpa)
-+# - (arm)/hard-float/vfp
-+# + thumb/(soft/fpa)
-+# + thumb/(soft/)vfp
-+# - thumb/softfp/fpa
-+# - thumb/softfp/vfp
-+# - thumb/hard-float/fpa
-+# - thumb/hard-float/vfp
-+
-+# subdirs to be used for multilibs and their respective options:
-+#/thumb/vfp -> thumb/soft/vfp
-+#/thumb/fpa -> thumb/soft/fpa
-+#/thumb -> thumb/soft/fpa
-+#/vfp -> arm/soft/vfp
-+#/softfp/vfp -> arm/softfp/cfp
-+#/fpu/fpa -> arm/hard/fpa
-+#/fpu -> arm/hard/fpa
-+#/fpa -> arm/soft/fpa
-+#. -> arm/soft/fpa
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/avr.h gcc-4.4.6/gcc/config/avr/avr.h
---- gcc-4.4.6.orig/gcc/config/avr/avr.h 2009-03-28 22:09:50.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/avr.h 2011-08-29 07:16:18.133123835 +0200
-@@ -811,12 +811,15 @@
- mmcu=at90can64*|\
- mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
- %{!mmcu*: -m avr2}\
--%{mmcu=at90s1200|\
-+%{mmcu=avr1|\
-+ mmcu=at90s1200|\
- mmcu=attiny11|\
- mmcu=attiny12|\
- mmcu=attiny15|\
- mmcu=attiny28: -m avr1}\
--%{mmcu=attiny22|\
-+%{mmcu=avr2|\
-+ mmcu=avr25|\
-+ mmcu=attiny22|\
- mmcu=attiny26|\
- mmcu=at90s2*|\
- mmcu=at90s4*|\
-@@ -831,14 +834,18 @@
- mmcu=attiny261|\
- mmcu=attiny4*|\
- mmcu=attiny8*: -m avr2}\
--%{mmcu=atmega103|\
-+%{mmcu=avr3|\
-+ mmcu=avr31|\
-+ mmcu=avr35|\
-+ mmcu=atmega103|\
- mmcu=at43*|\
- mmcu=at76*|\
- mmcu=at90usb82|\
- mmcu=at90usb162|\
- mmcu=attiny16*|\
- mmcu=attiny32*: -m avr3}\
--%{mmcu=atmega8*|\
-+%{mmcu=avr4|\
-+ mmcu=atmega8*|\
- mmcu=atmega4*|\
- mmcu=at90pwm1|\
- mmcu=at90pwm2|\
-@@ -846,7 +853,9 @@
- mmcu=at90pwm3|\
- mmcu=at90pwm3b|\
- mmcu=at90pwm81: -m avr4}\
--%{mmcu=atmega16*|\
-+%{mmcu=avr5|\
-+ mmcu=avr51|\
-+ mmcu=atmega16*|\
- mmcu=atmega32*|\
- mmcu=atmega406|\
- mmcu=atmega64*|\
-@@ -860,7 +869,8 @@
- mmcu=at94k|\
- mmcu=m3000*|\
- mmcu=m3001*: -m avr5}\
--%{mmcu=atmega256*:-m avr6}\
-+%{mmcu=avr6|\
-+ mmcu=atmega256*:-m avr6}\
- %{mmcu=atmega324*|\
- mmcu=atmega325*|\
- mmcu=atmega328p|\
-diff -Naur gcc-4.4.6.orig/gcc/config/avr/t-rtems gcc-4.4.6/gcc/config/avr/t-rtems
---- gcc-4.4.6.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100
-+++ gcc-4.4.6/gcc/config/avr/t-rtems 2011-08-29 07:16:18.133123835 +0200
-@@ -1,3 +1,4 @@
- # Multilibs for avr RTEMS targets.
-
--# ATM, this is just a stub
-+# RTEMS uses _exit from newlib
-+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c gcc-4.4.6/gcc/config/lm32/arithmetic.c
---- gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/arithmetic.c 2011-08-29 07:16:18.133123835 +0200
-@@ -0,0 +1,305 @@
-+/* Fixed-point arithmetic for Lattice Mico32.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by the
-+ Free Software Foundation; either version 2, or (at your option) any
-+ later version.
-+
-+ In addition to the permissions in the GNU General Public License, the
-+ Free Software Foundation gives you unlimited permission to link the
-+ compiled version of this file into combinations with other programs,
-+ and to distribute those combinations without any restriction coming
-+ from the use of this file. (The General Public License restrictions
-+ do apply in other respects; for example, they cover modification of
-+ the file, and distribution when not linked into a combine
-+ executable.)
-+
-+ This file is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; see the file COPYING. If not, write to
-+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+typedef unsigned long UQItype __attribute__ ((mode (QI)));
-+typedef long SItype __attribute__ ((mode (SI)));
-+typedef unsigned long USItype __attribute__ ((mode (SI)));
-+
-+/* Prototypes */
-+
-+USItype __mulsi3 (USItype a, USItype b);
-+
-+USItype __udivmodsi4 (USItype num, USItype den, int modwanted);
-+SItype __divsi3 (SItype a, SItype b);
-+SItype __modsi3 (SItype a, SItype b);
-+USItype __udivsi3 (USItype a, USItype b);
-+USItype __umodsi3 (USItype a, USItype b);
-+
-+SItype __ashlsi3 (SItype a, SItype b);
-+SItype __ashrsi3 (SItype a, SItype b);
-+USItype __lshrsi3 (USItype a, USItype b);
-+
-+/* Multiplication */
-+
-+#ifdef L_mulsi3
-+USItype
-+__mulsi3 (USItype a, USItype b)
-+{
-+ USItype result;
-+
-+ result = 0;
-+
-+ if (a==0)
-+ return 0;
-+
-+ while (b!=0)
-+ {
-+ if (b & 1)
-+ result += a;
-+ a <<= 1;
-+ b >>= 1;
-+ }
-+
-+ return result;
-+}
-+#endif
-+
-+/* Division */
-+
-+#ifdef L_udivmodsi4
-+USItype
-+__udivmodsi4 (USItype num, USItype den, int modwanted)
-+{
-+ USItype bit = 1;
-+ USItype res = 0;
-+
-+ while (den < num && bit && !(den & (1L<<31)))
-+ {
-+ den <<=1;
-+ bit <<=1;
-+ }
-+ while (bit)
-+ {
-+ if (num >= den)
-+ {
-+ num -= den;
-+ res |= bit;
-+ }
-+ bit >>=1;
-+ den >>=1;
-+ }
-+ if (modwanted)
-+ return num;
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_divsi3
-+
-+static const UQItype __divsi3_table[] = {
-+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 7, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 8, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
-+ 0, 9, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
-+ 0, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-+ 0, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
-+ 0, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0,
-+ 0, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0,
-+ 0, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0,
-+ 0, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
-+};
-+
-+SItype
-+__divsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba;
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (((USItype)(a | b)) < 16)
-+ {
-+ res = __divsi3_table[(a << 4) + b];
-+ }
-+ else
-+ {
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = !neg;
-+ }
-+
-+ if (b < 0)
-+ {
-+ b = -b;
-+ neg = !neg;
-+ }
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("divu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 0);
-+
-+ if (neg)
-+ res = -res;
-+ }
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_modsi3
-+SItype
-+__modsi3 (SItype a, SItype b)
-+{
-+ int neg = 0;
-+ SItype res;
-+ int cfg;
-+
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ if (a < 0)
-+ {
-+ a = -a;
-+ neg = 1;
-+ }
-+
-+ if (b < 0)
-+ b = -b;
-+
-+ __asm__ ("rcsr %0, CFG" : "=r" (cfg));
-+ if (cfg & 2)
-+ __asm__ ("modu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b));
-+ else
-+ res = __udivmodsi4 (a, b, 1);
-+
-+ if (neg)
-+ res = -res;
-+
-+ return res;
-+}
-+#endif
-+
-+#ifdef L_udivsi3
-+USItype
-+__udivsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 0);
-+}
-+#endif
-+
-+#ifdef L_umodsi3
-+USItype
-+__umodsi3 (USItype a, USItype b)
-+{
-+ if (b == 0)
-+ {
-+ /* Raise divide by zero exception */
-+ int eba, sr;
-+ /* Save interrupt enable */
-+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr));
-+ sr = (sr & 1) << 1;
-+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr));
-+ /* Branch to exception handler */
-+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba));
-+ eba += 32 * 5;
-+ __asm__ __volatile__ ("mv ea, ra");
-+ __asm__ __volatile__ ("b %0" : : "r" (eba));
-+ }
-+
-+ return __udivmodsi4 (a, b, 1);
-+}
-+#endif
-+
-+#if 0
-+
-+/* Shifts - Optimized versions implemented in assembly. Use these if code space is preferred to performance. */
-+
-+#ifdef L_ashlsi3
-+SItype
-+__ashlsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ a += a;
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_ashrsi3
-+SItype
-+__ashrsi3 (SItype a, SItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("sri %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#ifdef L_lshrsi3
-+USItype
-+__lshrsi3 (USItype a, USItype b)
-+{
-+ int i;
-+
-+ for (i = (b & 0x1f); i > 0; --i)
-+ __asm__ ("srui %0, %0, 1" : "=r" (a) : "0" (a));
-+ return a;
-+}
-+#endif
-+
-+#endif
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crti.S gcc-4.4.6/gcc/config/lm32/crti.S
---- gcc-4.4.6.orig/gcc/config/lm32/crti.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crti.S 2011-08-29 07:16:18.133123835 +0200
-@@ -0,0 +1,45 @@
-+# crti.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+ .global _init
-+ .type _init, at function
-+ .align 4
-+_init:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-+
-+ .section .fini
-+ .global _fini
-+ .type _fini, at function
-+ .align 4
-+_fini:
-+ addi sp, sp, -4
-+ sw (sp+4), ra
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crtn.S gcc-4.4.6/gcc/config/lm32/crtn.S
---- gcc-4.4.6.orig/gcc/config/lm32/crtn.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/crtn.S 2011-08-29 07:16:18.134123880 +0200
-@@ -0,0 +1,42 @@
-+# crtn.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+ .section .init
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-+ .section .fini
-+
-+ lw ra, (sp+4)
-+ addi sp, sp, 4
-+ ret
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S gcc-4.4.6/gcc/config/lm32/lib1funcs.S
---- gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lib1funcs.S 2011-08-29 07:16:18.134123880 +0200
-@@ -0,0 +1,429 @@
-+# lib1funcs.S for Lattice Mico32
-+# Contributed by Jon Beniston <jon at beniston.com>
-+#
-+# Copyright (C) 2008 Free Software Foundation, Inc.
-+#
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2, or (at your option) any
-+# later version.
-+#
-+# In addition to the permissions in the GNU General Public License, the
-+# Free Software Foundation gives you unlimited permission to link the
-+# compiled version of this file into combinations with other programs,
-+# and to distribute those combinations without any restriction coming
-+# from the use of this file. (The General Public License restrictions
-+# do apply in other respects; for example, they cover modification of
-+# the file, and distribution when not linked into a combine
-+# executable.)
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; see the file COPYING. If not, write to
-+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+#
-+
-+/* Arithmetic left shift */
-+
-+ .text
-+
-+ .global __ashlsi3
-+ .type __ashlsi3, at function
-+ .align 4
-+
-+__ashlsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashlsi3_table)
-+ addi r3, r3, gotofflo16(__ashlsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashlsi3_table)
-+ ori r3, r3, lo(__ashlsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashlsi3_31:
-+ add r1, r1, r1
-+__ashlsi3_30:
-+ add r1, r1, r1
-+__ashlsi3_29:
-+ add r1, r1, r1
-+__ashlsi3_28:
-+ add r1, r1, r1
-+__ashlsi3_27:
-+ add r1, r1, r1
-+__ashlsi3_26:
-+ add r1, r1, r1
-+__ashlsi3_25:
-+ add r1, r1, r1
-+__ashlsi3_24:
-+ add r1, r1, r1
-+__ashlsi3_23:
-+ add r1, r1, r1
-+__ashlsi3_22:
-+ add r1, r1, r1
-+__ashlsi3_21:
-+ add r1, r1, r1
-+__ashlsi3_20:
-+ add r1, r1, r1
-+__ashlsi3_19:
-+ add r1, r1, r1
-+__ashlsi3_18:
-+ add r1, r1, r1
-+__ashlsi3_17:
-+ add r1, r1, r1
-+__ashlsi3_16:
-+ add r1, r1, r1
-+__ashlsi3_15:
-+ add r1, r1, r1
-+__ashlsi3_14:
-+ add r1, r1, r1
-+__ashlsi3_13:
-+ add r1, r1, r1
-+__ashlsi3_12:
-+ add r1, r1, r1
-+__ashlsi3_11:
-+ add r1, r1, r1
-+__ashlsi3_10:
-+ add r1, r1, r1
-+__ashlsi3_9:
-+ add r1, r1, r1
-+__ashlsi3_8:
-+ add r1, r1, r1
-+__ashlsi3_7:
-+ add r1, r1, r1
-+__ashlsi3_6:
-+ add r1, r1, r1
-+__ashlsi3_5:
-+ add r1, r1, r1
-+__ashlsi3_4:
-+ add r1, r1, r1
-+__ashlsi3_3:
-+ add r1, r1, r1
-+__ashlsi3_2:
-+ add r1, r1, r1
-+__ashlsi3_1:
-+ add r1, r1, r1
-+__ashlsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashlsi3_table:
-+ .word __ashlsi3_0
-+ .word __ashlsi3_1
-+ .word __ashlsi3_2
-+ .word __ashlsi3_3
-+ .word __ashlsi3_4
-+ .word __ashlsi3_5
-+ .word __ashlsi3_6
-+ .word __ashlsi3_7
-+ .word __ashlsi3_8
-+ .word __ashlsi3_9
-+ .word __ashlsi3_10
-+ .word __ashlsi3_11
-+ .word __ashlsi3_12
-+ .word __ashlsi3_13
-+ .word __ashlsi3_14
-+ .word __ashlsi3_15
-+ .word __ashlsi3_16
-+ .word __ashlsi3_17
-+ .word __ashlsi3_18
-+ .word __ashlsi3_19
-+ .word __ashlsi3_20
-+ .word __ashlsi3_21
-+ .word __ashlsi3_22
-+ .word __ashlsi3_23
-+ .word __ashlsi3_24
-+ .word __ashlsi3_25
-+ .word __ashlsi3_26
-+ .word __ashlsi3_27
-+ .word __ashlsi3_28
-+ .word __ashlsi3_29
-+ .word __ashlsi3_30
-+ .word __ashlsi3_31
-+
-+/* Logical right shift */
-+
-+ .text
-+
-+ .global __lshrsi3
-+ .type __lshrsi3, at function
-+ .align 4
-+
-+__lshrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__lshrsi3_table)
-+ addi r3, r3, gotofflo16(__lshrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__lshrsi3_table)
-+ ori r3, r3, lo(__lshrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__lshrsi3_31:
-+ srui r1, r1, 1
-+__lshrsi3_30:
-+ srui r1, r1, 1
-+__lshrsi3_29:
-+ srui r1, r1, 1
-+__lshrsi3_28:
-+ srui r1, r1, 1
-+__lshrsi3_27:
-+ srui r1, r1, 1
-+__lshrsi3_26:
-+ srui r1, r1, 1
-+__lshrsi3_25:
-+ srui r1, r1, 1
-+__lshrsi3_24:
-+ srui r1, r1, 1
-+__lshrsi3_23:
-+ srui r1, r1, 1
-+__lshrsi3_22:
-+ srui r1, r1, 1
-+__lshrsi3_21:
-+ srui r1, r1, 1
-+__lshrsi3_20:
-+ srui r1, r1, 1
-+__lshrsi3_19:
-+ srui r1, r1, 1
-+__lshrsi3_18:
-+ srui r1, r1, 1
-+__lshrsi3_17:
-+ srui r1, r1, 1
-+__lshrsi3_16:
-+ srui r1, r1, 1
-+__lshrsi3_15:
-+ srui r1, r1, 1
-+__lshrsi3_14:
-+ srui r1, r1, 1
-+__lshrsi3_13:
-+ srui r1, r1, 1
-+__lshrsi3_12:
-+ srui r1, r1, 1
-+__lshrsi3_11:
-+ srui r1, r1, 1
-+__lshrsi3_10:
-+ srui r1, r1, 1
-+__lshrsi3_9:
-+ srui r1, r1, 1
-+__lshrsi3_8:
-+ srui r1, r1, 1
-+__lshrsi3_7:
-+ srui r1, r1, 1
-+__lshrsi3_6:
-+ srui r1, r1, 1
-+__lshrsi3_5:
-+ srui r1, r1, 1
-+__lshrsi3_4:
-+ srui r1, r1, 1
-+__lshrsi3_3:
-+ srui r1, r1, 1
-+__lshrsi3_2:
-+ srui r1, r1, 1
-+__lshrsi3_1:
-+ srui r1, r1, 1
-+__lshrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__lshrsi3_table:
-+ .word __lshrsi3_0
-+ .word __lshrsi3_1
-+ .word __lshrsi3_2
-+ .word __lshrsi3_3
-+ .word __lshrsi3_4
-+ .word __lshrsi3_5
-+ .word __lshrsi3_6
-+ .word __lshrsi3_7
-+ .word __lshrsi3_8
-+ .word __lshrsi3_9
-+ .word __lshrsi3_10
-+ .word __lshrsi3_11
-+ .word __lshrsi3_12
-+ .word __lshrsi3_13
-+ .word __lshrsi3_14
-+ .word __lshrsi3_15
-+ .word __lshrsi3_16
-+ .word __lshrsi3_17
-+ .word __lshrsi3_18
-+ .word __lshrsi3_19
-+ .word __lshrsi3_20
-+ .word __lshrsi3_21
-+ .word __lshrsi3_22
-+ .word __lshrsi3_23
-+ .word __lshrsi3_24
-+ .word __lshrsi3_25
-+ .word __lshrsi3_26
-+ .word __lshrsi3_27
-+ .word __lshrsi3_28
-+ .word __lshrsi3_29
-+ .word __lshrsi3_30
-+ .word __lshrsi3_31
-+
-+/* Arithmetic right shift */
-+
-+ .text
-+
-+ .global __ashrsi3
-+ .type __ashrsi3, at function
-+ .align 4
-+
-+__ashrsi3:
-+ /* Only use 5 LSBs, as that's all the h/w shifter uses */
-+ andi r2, r2, 0x1f
-+ /* Get address of offset into unrolled shift loop to jump to */
-+#ifdef __PIC__
-+ orhi r3, r0, gotoffhi16(__ashrsi3_table)
-+ addi r3, r3, gotofflo16(__ashrsi3_table)
-+ add r3, r3, gp
-+#else
-+ mvhi r3, hi(__ashrsi3_table)
-+ ori r3, r3, lo(__ashrsi3_table)
-+#endif
-+ add r2, r2, r2
-+ add r2, r2, r2
-+ add r3, r3, r2
-+ lw r3, (r3+0)
-+ b r3
-+
-+__ashrsi3_31:
-+ sri r1, r1, 1
-+__ashrsi3_30:
-+ sri r1, r1, 1
-+__ashrsi3_29:
-+ sri r1, r1, 1
-+__ashrsi3_28:
-+ sri r1, r1, 1
-+__ashrsi3_27:
-+ sri r1, r1, 1
-+__ashrsi3_26:
-+ sri r1, r1, 1
-+__ashrsi3_25:
-+ sri r1, r1, 1
-+__ashrsi3_24:
-+ sri r1, r1, 1
-+__ashrsi3_23:
-+ sri r1, r1, 1
-+__ashrsi3_22:
-+ sri r1, r1, 1
-+__ashrsi3_21:
-+ sri r1, r1, 1
-+__ashrsi3_20:
-+ sri r1, r1, 1
-+__ashrsi3_19:
-+ sri r1, r1, 1
-+__ashrsi3_18:
-+ sri r1, r1, 1
-+__ashrsi3_17:
-+ sri r1, r1, 1
-+__ashrsi3_16:
-+ sri r1, r1, 1
-+__ashrsi3_15:
-+ sri r1, r1, 1
-+__ashrsi3_14:
-+ sri r1, r1, 1
-+__ashrsi3_13:
-+ sri r1, r1, 1
-+__ashrsi3_12:
-+ sri r1, r1, 1
-+__ashrsi3_11:
-+ sri r1, r1, 1
-+__ashrsi3_10:
-+ sri r1, r1, 1
-+__ashrsi3_9:
-+ sri r1, r1, 1
-+__ashrsi3_8:
-+ sri r1, r1, 1
-+__ashrsi3_7:
-+ sri r1, r1, 1
-+__ashrsi3_6:
-+ sri r1, r1, 1
-+__ashrsi3_5:
-+ sri r1, r1, 1
-+__ashrsi3_4:
-+ sri r1, r1, 1
-+__ashrsi3_3:
-+ sri r1, r1, 1
-+__ashrsi3_2:
-+ sri r1, r1, 1
-+__ashrsi3_1:
-+ sri r1, r1, 1
-+__ashrsi3_0:
-+ ret
-+
-+#ifdef __PIC__
-+ .section .data
-+#else
-+ .section .rodata
-+#endif
-+
-+ .align 4
-+
-+__ashrsi3_table:
-+ .word __ashrsi3_0
-+ .word __ashrsi3_1
-+ .word __ashrsi3_2
-+ .word __ashrsi3_3
-+ .word __ashrsi3_4
-+ .word __ashrsi3_5
-+ .word __ashrsi3_6
-+ .word __ashrsi3_7
-+ .word __ashrsi3_8
-+ .word __ashrsi3_9
-+ .word __ashrsi3_10
-+ .word __ashrsi3_11
-+ .word __ashrsi3_12
-+ .word __ashrsi3_13
-+ .word __ashrsi3_14
-+ .word __ashrsi3_15
-+ .word __ashrsi3_16
-+ .word __ashrsi3_17
-+ .word __ashrsi3_18
-+ .word __ashrsi3_19
-+ .word __ashrsi3_20
-+ .word __ashrsi3_21
-+ .word __ashrsi3_22
-+ .word __ashrsi3_23
-+ .word __ashrsi3_24
-+ .word __ashrsi3_25
-+ .word __ashrsi3_26
-+ .word __ashrsi3_27
-+ .word __ashrsi3_28
-+ .word __ashrsi3_29
-+ .word __ashrsi3_30
-+ .word __ashrsi3_31
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.c gcc-4.4.6/gcc/config/lm32/lm32.c
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.c 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.c 2011-08-29 07:16:18.135123923 +0200
-@@ -0,0 +1,869 @@
-+/* Subroutines used for code generation on the Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tm.h"
-+#include "rtl.h"
-+#include "regs.h"
-+#include "hard-reg-set.h"
-+#include "basic-block.h"
-+#include "real.h"
-+#include "insn-config.h"
-+#include "conditions.h"
-+#include "insn-flags.h"
-+#include "insn-attr.h"
-+#include "insn-codes.h"
-+#include "recog.h"
-+#include "output.h"
-+#include "tree.h"
-+#include "expr.h"
-+#include "flags.h"
-+#include "reload.h"
-+#include "tm_p.h"
-+#include "function.h"
-+#include "toplev.h"
-+#include "optabs.h"
-+#include "libfuncs.h"
-+#include "ggc.h"
-+#include "target.h"
-+#include "target-def.h"
-+#include "langhooks.h"
-+#include "tm-constrs.h"
-+#include "df.h"
-+
-+struct lm32_frame_info
-+{
-+ HOST_WIDE_INT total_size; /* number of bytes that the entire frame takes up. */
-+ HOST_WIDE_INT callee_size; /* number of bytes to save callee save registers */
-+ HOST_WIDE_INT pretend_size; /* number of bytes we push and pretend caller did. */
-+ HOST_WIDE_INT args_size; /* number of bytes that outgoing arguments take up. */
-+ HOST_WIDE_INT locals_size; /* number of bytes that local variables take up. */
-+ unsigned int reg_save_mask; /* mask of saved registers. */
-+};
-+
-+/* Prototypes for static functions */
-+static rtx emit_add (rtx dest, rtx src0, rtx src1);
-+static void expand_save_restore (struct lm32_frame_info *info, int op);
-+static void abort_with_insn (rtx insn, const char *reason);
-+static void stack_adjust (HOST_WIDE_INT amount);
-+static bool lm32_in_small_data_p (const_tree);
-+static void lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl);
-+
-+/* Detemines if given constant can be used as a displacement */
-+#define OFFSET_INT(X) (((X) > -32768) && ((X) < 32768))
-+
-+#undef TARGET_ADDRESS_COST
-+#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
-+#undef TARGET_IN_SMALL_DATA_P
-+#define TARGET_IN_SMALL_DATA_P lm32_in_small_data_p
-+#undef TARGET_PROMOTE_FUNCTION_ARGS
-+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
-+#undef TARGET_PROMOTE_FUNCTION_RETURN
-+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
-+#undef TARGET_SETUP_INCOMING_VARARGS
-+#define TARGET_SETUP_INCOMING_VARARGS lm32_setup_incoming_varargs
-+#undef TARGET_PROMOTE_PROTOTYPES
-+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
-+
-+struct gcc_target targetm = TARGET_INITIALIZER;
-+
-+/* Current frame information calculated by lm32_compute_frame_size. */
-+static struct lm32_frame_info current_frame_info;
-+
-+rtx lm32_compare_op0;
-+rtx lm32_compare_op1;
-+
-+/* Return non-zero if the specified return type should be returned in memory */
-+int
-+lm32_return_in_memory (tree type)
-+{
-+ HOST_WIDE_INT size;
-+
-+ if (!AGGREGATE_TYPE_P (type))
-+ {
-+ /* All simple types are returned in registers. */
-+ return 0;
-+ }
-+
-+ size = int_size_in_bytes (type);
-+ if (size >=0 && size <= UNITS_PER_WORD)
-+ {
-+ /* If it can fit in one register */
-+ return 0;
-+ }
-+
-+ return 1;
-+}
-+
-+/* Determine if given constant can be used as a register displacement */
-+int
-+const_ok_for_base_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-+{
-+ int val;
-+
-+ val = INTVAL (op);
-+ return OFFSET_INT (val);
-+}
-+
-+/* Generate an emit a word sized add instruction */
-+static rtx
-+emit_add (rtx dest, rtx src0, rtx src1)
-+{
-+ rtx insn;
-+ insn = emit_insn (gen_addsi3 (dest, src0, src1));
-+ return insn;
-+}
-+
-+/* Generate the code to compare (and possibly branch) two integer values
-+ TEST_CODE is the comparison code we are trying to emulate
-+ (or implement directly)
-+ RESULT is where to store the result of the comparison,
-+ or null to emit a branch
-+ CMP0 CMP1 are the two comparison operands
-+ DESTINATION is the destination of the branch, or null to only compare
-+ */
-+
-+void
-+gen_int_relational (enum rtx_code code, /* relational test (EQ, etc) */
-+ rtx result, /* result to store comp. or 0 if branch */
-+ rtx cmp0, /* first operand to compare */
-+ rtx cmp1, /* second operand to compare */
-+ rtx destination) /* destination of the branch, or 0 if compare */
-+{
-+ enum machine_mode mode;
-+ int branch_p;
-+
-+ mode = GET_MODE (cmp0);
-+ if (mode == VOIDmode)
-+ mode = GET_MODE (cmp1);
-+
-+ /* Is this a branch or compare */
-+ branch_p = (destination != 0);
-+
-+ /* Instruction set doesn't support LE or LT, so swap operands and use GE, GT */
-+ switch (code)
-+ {
-+ case LE:
-+ case LT:
-+ case LEU:
-+ case LTU:
-+ code = swap_condition (code);
-+ rtx temp = cmp0;
-+ cmp0 = cmp1;
-+ cmp1 = temp;
-+ break;
-+ default:
-+ break;
-+ }
-+
-+ if (branch_p)
-+ {
-+ rtx insn;
-+
-+ /* Operands must be in registers */
-+ if (!register_operand (cmp0, mode))
-+ cmp0 = force_reg (mode, cmp0);
-+ if (!register_operand (cmp1, mode))
-+ cmp1 = force_reg (mode, cmp1);
-+
-+ /* Generate conditional branch instruction */
-+ rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1);
-+ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
-+ insn = gen_rtx_SET (VOIDmode, pc_rtx,
-+ gen_rtx_IF_THEN_ELSE (VOIDmode,
-+ cond, label, pc_rtx));
-+ emit_jump_insn (insn);
-+ }
-+ else
-+ {
-+ /* We can't have const_ints in cmp0, other than 0 */
-+ if ((GET_CODE (cmp0) == CONST_INT) && (INTVAL (cmp0) != 0))
-+ cmp0 = force_reg (mode, cmp0);
-+
-+ /* If the comparison is against an int not in legal range
-+ move it into a register */
-+ if (GET_CODE (cmp1) == CONST_INT)
-+ {
-+ HOST_WIDE_INT value = INTVAL (cmp1);
-+ switch (code)
-+ {
-+ case EQ: case NE: case LE: case LT: case GE: case GT:
-+ if (!MEDIUM_INT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ case LEU: case LTU: case GEU: case GTU:
-+ if (!MEDIUM_UINT(value))
-+ cmp1 = force_reg (mode, cmp1);
-+ break;
-+ default:
-+ abort ();
-+ }
-+ }
-+
-+ /* Generate compare instruction */
-+ emit_move_insn (result, gen_rtx_fmt_ee (code, mode, cmp0, cmp1));
-+ }
-+}
-+
-+/* Generate and emit RTL to save or restore callee save registers */
-+static void
-+expand_save_restore (struct lm32_frame_info *info, int op)
-+{
-+ unsigned int reg_save_mask = info->reg_save_mask;
-+ int regno;
-+ HOST_WIDE_INT offset;
-+ rtx insn;
-+
-+ /* Callee saves are below locals and above outgoing arguments */
-+ offset = info->args_size + info->callee_size;
-+ for (regno = 0; regno <= 31; regno++)
-+ {
-+ if ((reg_save_mask & (1 << regno)) != 0)
-+ {
-+ if (op == 0)
-+ {
-+ insn = emit_move_insn (gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))),
-+ gen_rtx_REG (word_mode, regno));
-+ }
-+ else
-+ {
-+ insn = emit_move_insn (gen_rtx_REG (word_mode, regno),
-+ gen_rtx_MEM (word_mode,
-+ gen_rtx_PLUS (Pmode,
-+ stack_pointer_rtx,
-+ GEN_INT (offset))));
-+ }
-+
-+ /* only prologue instructions which set the sp fp or save a
-+ register should be marked as frame related */
-+ if (op==0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ offset -= UNITS_PER_WORD;
-+ }
-+ }
-+}
-+
-+static void
-+stack_adjust (HOST_WIDE_INT amount)
-+{
-+ rtx insn;
-+
-+ if (!MEDIUM_INT (amount))
-+ {
-+ /* r10 is caller saved so it can be used as a temp reg */
-+ rtx r10;
-+ r10 = gen_rtx_REG (word_mode, 10);
-+ insn = emit_move_insn (r10, GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ insn = emit_add (stack_pointer_rtx, stack_pointer_rtx, r10);
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+ else
-+ {
-+ insn = emit_add (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ GEN_INT (amount));
-+ if (amount < 0)
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+}
-+
-+
-+/* Create and emit instructions for a functions prologue */
-+void
-+lm32_expand_prologue (void)
-+{
-+ rtx insn;
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Add space on stack new frame */
-+ stack_adjust (-current_frame_info.total_size);
-+
-+ /* Save callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 0);
-+
-+ /* Setup frame pointer if it's needed */
-+ if (frame_pointer_needed == 1)
-+ {
-+ /* Load offset - Don't use total_size, as that includes pretend_size, which isn't part of this frame? */
-+ insn = emit_move_insn (frame_pointer_rtx, GEN_INT ( current_frame_info.args_size
-+ + current_frame_info.callee_size
-+ + current_frame_info.locals_size));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Add in sp */
-+ insn = emit_add (frame_pointer_rtx,
-+ frame_pointer_rtx,
-+ stack_pointer_rtx);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+
-+ /* Prevent prologue from being scheduled into function body */
-+ emit_insn (gen_blockage ());
-+ }
-+}
-+
-+/* Create an emit instructions for a functions epilogue */
-+void
-+lm32_expand_epilogue (void)
-+{
-+ rtx ra_rtx = gen_rtx_REG (Pmode, RA_REGNUM);
-+
-+ lm32_compute_frame_size (get_frame_size ());
-+
-+ if (current_frame_info.total_size > 0)
-+ {
-+ /* Prevent stack code from being reordered */
-+ emit_insn (gen_blockage ());
-+
-+ /* Restore callee save registers */
-+ if (current_frame_info.reg_save_mask != 0)
-+ expand_save_restore (¤t_frame_info, 1);
-+
-+ /* Deallocate stack */
-+ stack_adjust (current_frame_info.total_size);
-+
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+ else
-+ {
-+ /* Return to calling function */
-+ emit_jump_insn (gen_return_internalsi (ra_rtx));
-+ }
-+}
-+
-+/* Return the bytes needed to compute the frame pointer from the current
-+ stack pointer. */
-+HOST_WIDE_INT
-+lm32_compute_frame_size (int size)
-+{
-+ int regno;
-+ HOST_WIDE_INT total_size, locals_size, args_size, pretend_size, callee_size;
-+ unsigned int reg_save_mask;
-+
-+ locals_size = size;
-+ args_size = crtl->outgoing_args_size;
-+ pretend_size = crtl->args.pretend_args_size;
-+ callee_size = 0;
-+ reg_save_mask = 0;
-+
-+ /* Build mask that actually determines which regsiters we save
-+ and calculate size required to store them in the stack. */
-+ for (regno = 1; regno < SP_REGNUM; regno++)
-+ {
-+ if (df_regs_ever_live_p(regno) && !call_used_regs[regno])
-+ {
-+ reg_save_mask |= 1 << regno;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ }
-+ if (df_regs_ever_live_p(RA_REGNUM) || !current_function_is_leaf || !optimize)
-+ {
-+ reg_save_mask |= 1 << RA_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+ if (!(reg_save_mask & (1 << FP_REGNUM)) && frame_pointer_needed)
-+ {
-+ reg_save_mask |= 1 << FP_REGNUM;
-+ callee_size += UNITS_PER_WORD;
-+ }
-+
-+ /* Compute total frame size */
-+ total_size = pretend_size + args_size + locals_size + callee_size;
-+
-+ /* Align frame to appropriate boundary */
-+ total_size = (total_size+3) & ~3;
-+
-+ /* Save computed information. */
-+ current_frame_info.total_size = total_size;
-+ current_frame_info.callee_size = callee_size;
-+ current_frame_info.pretend_size = pretend_size;
-+ current_frame_info.locals_size = locals_size;
-+ current_frame_info.args_size = args_size;
-+ current_frame_info.reg_save_mask = reg_save_mask;
-+
-+ return total_size;
-+}
-+
-+void
-+lm32_print_operand (FILE *file, rtx op, int letter)
-+{
-+ register enum rtx_code code;
-+
-+ if (! op)
-+ {
-+ error ("PRINT_OPERAND null pointer");
-+ abort ();
-+ }
-+
-+ code = GET_CODE (op);
-+
-+ if (code == SIGN_EXTEND)
-+ op = XEXP (op, 0), code = GET_CODE (op);
-+ else if (code == REG || code == SUBREG)
-+ {
-+ int regnum;
-+
-+ if (code == REG)
-+ regnum = REGNO (op);
-+ else
-+ regnum = true_regnum (op);
-+
-+ if ( (letter == 'H' && !WORDS_BIG_ENDIAN)
-+ || (letter == 'L' && WORDS_BIG_ENDIAN))
-+ {
-+ abort();
-+ regnum++;
-+ }
-+
-+ fprintf (file, "%s", reg_names[regnum]);
-+ }
-+ else if (code == MEM)
-+ output_address (XEXP (op, 0));
-+ else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0)
-+ fprintf (file, "%s", reg_names[0]);
-+ else if (GET_CODE (op) == CONST_DOUBLE)
-+ {
-+ if ((CONST_DOUBLE_LOW (op) != 0) || (CONST_DOUBLE_HIGH (op) != 0))
-+ output_operand_lossage ("Only 0.0 can be loaded as an immediate");
-+ else
-+ fprintf (file, "0");
-+ }
-+ else if (code == EQ)
-+ fprintf (file, "e ");
-+ else if (code == NE)
-+ fprintf (file, "ne ");
-+ else if (code == GT)
-+ fprintf (file, "g ");
-+ else if (code == GTU)
-+ fprintf (file, "gu ");
-+ else if (code == LT)
-+ fprintf (file, "l ");
-+ else if (code == LTU)
-+ fprintf (file, "lu ");
-+ else if (code == GE)
-+ fprintf (file, "ge ");
-+ else if (code == GEU)
-+ fprintf (file, "geu");
-+ else if (code == LE)
-+ fprintf (file, "le ");
-+ else if (code == LEU)
-+ fprintf (file, "leu");
-+ else
-+ output_addr_const (file, op);
-+}
-+
-+/* A C compound statement to output to stdio stream STREAM the
-+ assembler syntax for an instruction operand that is a memory
-+ reference whose address is ADDR. ADDR is an RTL expression.
-+
-+ On some machines, the syntax for a symbolic address depends on
-+ the section that the address refers to. On these machines,
-+ define the macro `ENCODE_SECTION_INFO' to store the information
-+ into the `symbol_ref', and then check for it here. */
-+
-+void
-+lm32_print_operand_address (FILE *file, rtx addr)
-+{
-+ switch (GET_CODE (addr))
-+ {
-+ case REG:
-+ fprintf (file, "(%s+0)", reg_names [REGNO (addr)]);
-+ break;
-+
-+ case MEM:
-+ output_address (XEXP (addr, 0));
-+ break;
-+
-+ case PLUS:
-+ {
-+ rtx arg0 = XEXP (addr, 0);
-+ rtx arg1 = XEXP (addr, 1);
-+
-+ if (GET_CODE (arg0) == REG && CONSTANT_P (arg1))
-+ {
-+ if (GET_CODE(arg1) == CONST_INT)
-+ fprintf (file, "(%s+%ld)", reg_names [REGNO (arg0)], INTVAL (arg1));
-+ else
-+ {
-+ fprintf (file, "(%s+", reg_names [REGNO (arg0)]);
-+ output_addr_const (file, arg1);
-+ fprintf (file, ")");
-+ }
-+ }
-+ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1))
-+ output_addr_const (file, addr);
-+ else
-+ abort_with_insn (addr, "bad operand");
-+ }
-+ break;
-+
-+ case SYMBOL_REF:
-+ if (SYMBOL_REF_SMALL_P (addr))
-+ {
-+ fprintf (file, "gp(");
-+ output_addr_const (file, addr);
-+ fprintf (file, ")");
-+ }
-+ else
-+ abort_with_insn (addr, "can't use non gp relative absolute address");
-+ break;
-+
-+ default:
-+ abort_with_insn (addr, "invalid addressing mode");
-+ break;
-+ }
-+}
-+
-+/* Determine where to put an argument to a function.
-+ Value is zero to push the argument on the stack,
-+ or a hard register in which to store the argument.
-+
-+ MODE is the argument's machine mode.
-+ TYPE is the data type of the argument (as a tree).
-+ This is null for libcalls where that information may
-+ not be available.
-+ CUM is a variable of type CUMULATIVE_ARGS which gives info about
-+ the preceding args and about the function being called.
-+ NAMED is nonzero if this argument is a named parameter
-+ (otherwise it is an extra parameter matching an ellipsis). */
-+
-+rtx
-+lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named)
-+{
-+ if (mode == VOIDmode)
-+ /* Compute operand 2 of the call insn. */
-+ return GEN_INT (0);
-+
-+ if (targetm.calls.must_pass_in_stack (mode, type))
-+ return NULL_RTX;
-+
-+ if (!named || (cum + LM32_NUM_REGS2(mode, type) > LM32_NUM_ARG_REGS))
-+ return NULL_RTX;
-+
-+ return gen_rtx_REG (mode, cum + LM32_FIRST_ARG_REG);
-+}
-+
-+HOST_WIDE_INT
-+lm32_compute_initial_elimination_offset (int from, int to)
-+{
-+ HOST_WIDE_INT offset = 0;
-+
-+ switch (from)
-+ {
-+ /*case FRAME_POINTER_REGNUM: - Same as ARG_POINTER_REGNUM */
-+ case ARG_POINTER_REGNUM:
-+ switch (to)
-+ {
-+ case FRAME_POINTER_REGNUM:
-+ offset = 0;
-+ break;
-+ case STACK_POINTER_REGNUM:
-+ offset = lm32_compute_frame_size (get_frame_size ()) - current_frame_info.pretend_size;
-+ break;
-+ default:
-+ abort ();
-+ }
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ return offset;
-+}
-+
-+static void
-+lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-+ tree type, int *pretend_size, int no_rtl)
-+{
-+ int first_anon_arg;
-+ tree fntype;
-+ int stdarg_p;
-+
-+ fntype = TREE_TYPE (current_function_decl);
-+ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0
-+ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
-+ != void_type_node));
-+
-+ if (stdarg_p)
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG;
-+ else
-+ {
-+ /* this is the common case, we have been passed details setup
-+ for the last named argument, we want to skip over the
-+ registers, if any used in passing this named paramter in
-+ order to determine which is the first registers used to pass
-+ anonymous arguments */
-+ int size;
-+
-+ if (mode==BLKmode)
-+ size = int_size_in_bytes (type);
-+ else
-+ size = GET_MODE_SIZE (mode);
-+
-+ first_anon_arg = *cum + LM32_FIRST_ARG_REG + ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
-+ }
-+
-+ if ((first_anon_arg < (LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS)) && !no_rtl)
-+ {
-+ int first_reg_offset = first_anon_arg;
-+ int size = LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS - first_anon_arg;
-+ rtx regblock;
-+
-+ regblock = gen_rtx_MEM (BLKmode,
-+ plus_constant (arg_pointer_rtx,
-+ FIRST_PARM_OFFSET (0)));
-+ move_block_from_reg (first_reg_offset, regblock, size);
-+
-+ *pretend_size = size * UNITS_PER_WORD;
-+ }
-+}
-+
-+/* Abort after printing out a specific insn. */
-+static void
-+abort_with_insn (rtx insn, const char *reason)
-+{
-+ error (reason);
-+ debug_rtx (insn);
-+ abort ();
-+}
-+
-+/* Override command line options */
-+void
-+lm32_override_options (void)
-+{
-+ /* We must have sign-extend enabled if barrel-shift isn't */
-+ if (!MASK_BARREL_SHIFT_ENABLED)
-+ {
-+ warning (0, "neither -mbarrel-shift-enabled nor -msign-extend-enabled specified. Assuming -msign-extend-enabled");
-+ target_flags |= MASK_SIGN_EXTEND_ENABLED;
-+ }
-+}
-+
-+/* Return nonzero if this function is known to have a null epilogue.
-+ This allows the optimizer to omit jumps to jumps if no stack
-+ was created. */
-+int
-+lm32_can_use_return (void)
-+{
-+ if (!reload_completed)
-+ return 0;
-+
-+ if (df_regs_ever_live_p(RA_REGNUM) || crtl->profile)
-+ return 0;
-+
-+ if (lm32_compute_frame_size (get_frame_size ()) != 0)
-+ return 0;
-+
-+ return 1;
-+}
-+
-+/* Support function to determine the return address of the function
-+ 'count' frames back up the stack. */
-+rtx
-+lm32_return_addr_rtx (int count, rtx frame)
-+{
-+ rtx r;
-+ if (count == 0)
-+ {
-+ /* *mjs* This test originally used leaf_function_p (), we now use
-+ the regs_ever_live test which I *think* is more accurate. */
-+ if (!df_regs_ever_live_p(RA_REGNUM))
-+ {
-+ r = gen_rtx_REG (Pmode, RA_REGNUM);
-+ }
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ }
-+ else if (flag_omit_frame_pointer)
-+ r = NULL_RTX;
-+ else
-+ {
-+ r = gen_rtx_MEM (Pmode,
-+ gen_rtx_PLUS (Pmode, frame,
-+ GEN_INT(- 2 * UNITS_PER_WORD)));
-+ set_mem_alias_set (r, get_frame_alias_set ());
-+ }
-+ return r;
-+}
-+
-+/* Return true if EXP should be placed in the small data section. */
-+
-+static bool
-+lm32_in_small_data_p (const_tree exp)
-+{
-+ /* We want to merge strings, so we never consider them small data. */
-+ if (TREE_CODE (exp) == STRING_CST)
-+ return false;
-+
-+ /* Functions are never in the small data area. Duh. */
-+ if (TREE_CODE (exp) == FUNCTION_DECL)
-+ return false;
-+
-+ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
-+ {
-+ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
-+ if (strcmp (section, ".sdata") == 0
-+ || strcmp (section, ".sbss") == 0)
-+ return true;
-+ }
-+ else
-+ {
-+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
-+
-+ /* If this is an incomplete type with size 0, then we can't put it
-+ in sdata because it might be too big when completed. */
-+ if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+/* Emit straight-line code to move LENGTH bytes from SRC to DEST.
-+ Assume that the areas do not overlap. */
-+
-+static void
-+lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length, HOST_WIDE_INT alignment)
-+{
-+ HOST_WIDE_INT offset, delta;
-+ unsigned HOST_WIDE_INT bits;
-+ int i;
-+ enum machine_mode mode;
-+ rtx *regs;
-+
-+ /* Work out how many bits to move at a time. */
-+ switch (alignment)
-+ {
-+ case 1:
-+ bits = 8;
-+ break;
-+ case 2:
-+ bits = 16;
-+ break;
-+ case 4:
-+ bits = 32;
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ mode = mode_for_size (bits, MODE_INT, 0);
-+ delta = bits / BITS_PER_UNIT;
-+
-+ /* Allocate a buffer for the temporary registers. */
-+ regs = alloca (sizeof (rtx) * length / delta);
-+
-+ /* Load as many BITS-sized chunks as possible. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ {
-+ regs[i] = gen_reg_rtx (mode);
-+ emit_move_insn (regs[i], adjust_address (src, mode, offset));
-+ }
-+
-+ /* Copy the chunks to the destination. */
-+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
-+ emit_move_insn (adjust_address (dest, mode, offset), regs[i]);
-+
-+ /* Mop up any left-over bytes. */
-+ if (offset < length)
-+ {
-+ src = adjust_address (src, BLKmode, offset);
-+ dest = adjust_address (dest, BLKmode, offset);
-+ move_by_pieces (dest, src, length - offset,
-+ MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), 0);
-+ }
-+}
-+
-+/* Expand string/block move operations.
-+
-+ operands[0] is the pointer to the destination.
-+ operands[1] is the pointer to the source.
-+ operands[2] is the number of bytes to move.
-+ operands[3] is the alignment. */
-+
-+int
-+lm32_expand_block_move (rtx *operands)
-+{
-+ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) <= 32))
-+ {
-+ lm32_block_move_inline (operands[0], operands[1], INTVAL (operands[2]), INTVAL (operands[3]));
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
-+ isn't protected by a PIC unspec. */
-+int
-+nonpic_symbol_mentioned_p (rtx x)
-+{
-+ register const char *fmt;
-+ register int i;
-+
-+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF
-+ || GET_CODE (x) == PC)
-+ return 1;
-+
-+ /* We don't want to look into the possible MEM location of a
-+ CONST_DOUBLE, since we're not going to use it, in general. */
-+ if (GET_CODE (x) == CONST_DOUBLE)
-+ return 0;
-+
-+ if (GET_CODE (x) == UNSPEC)
-+ return 0;
-+
-+ fmt = GET_RTX_FORMAT (GET_CODE (x));
-+ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
-+ {
-+ if (fmt[i] == 'E')
-+ {
-+ register int j;
-+
-+ for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-+ if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j)))
-+ return 1;
-+ }
-+ else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i)))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.h gcc-4.4.6/gcc/config/lm32/lm32.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.h 2011-08-29 07:16:18.135123923 +0200
-@@ -0,0 +1,657 @@
-+/* Definitions of target machine for GNU compiler, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/*-------------------------------*/
-+/* Run-time Target Specification */
-+/*-------------------------------*/
-+
-+/* Print subsidiary information on the compiler version in use. */
-+#ifndef TARGET_VERSION
-+#define TARGET_VERSION fprintf (stderr, " (LatticeMico32)")
-+#endif
-+
-+/* Target CPU builtins. */
-+#define TARGET_CPU_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__lm32__"); \
-+ builtin_define_std ("lm32"); \
-+ builtin_assert ("cpu=lm32"); \
-+ builtin_assert ("machine=lm32"); \
-+ } \
-+ while (0)
-+
-+#define CPP_SPEC "\
-+%{mmultiply-enabled:-D__multiply_enabled__} \
-+%{mdivide-enabled:-D__divide_enabled__} \
-+%{mbarrel-shift-enabled:-D__barrel_shift_enabled__} \
-+%{msign-extend-enabled:-D__sign_extend_enabled__} \
-+%{muser-enabled:-D__user_enabled__} \
-+"
-+
-+#undef ASM_SPEC
-+#define ASM_SPEC "\
-+%{mmultiply-enabled} \
-+%{mdivide-enabled} \
-+%{mbarrel-shift-enabled} \
-+%{msign-extend-enabled} \
-+%{muser-extend-enabled} \
-+%{v} \
-+"
-+
-+/* Let link script define all link options.
-+ Default to using simulator link script. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC ""
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC ""
-+#undef LIB_SPEC
-+#define LIB_SPEC "%{!T*:-T sim.ld}"
-+
-+#define OVERRIDE_OPTIONS lm32_override_options()
-+
-+extern int target_flags;
-+
-+/* Add -G xx support. */
-+
-+#undef SWITCH_TAKES_ARG
-+#define SWITCH_TAKES_ARG(CHAR) \
-+(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*}"
-+
-+extern struct rtx_def *lm32_compare_op0;
-+extern struct rtx_def *lm32_compare_op1;
-+
-+/*---------------------------------*/
-+/* Target machine storage layout. */
-+/*---------------------------------*/
-+
-+#define BITS_BIG_ENDIAN 0
-+#define BYTES_BIG_ENDIAN 1
-+#define WORDS_BIG_ENDIAN 1
-+#define LIBGCC2_WORDS_BIG_ENDIAN 1
-+
-+#define BITS_PER_UNIT 8
-+#define BITS_PER_WORD 32
-+#define UNITS_PER_WORD 4
-+
-+#define POINTER_SIZE 32
-+
-+#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
-+do { \
-+ if (GET_MODE_CLASS (MODE) == MODE_INT \
-+ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
-+ (MODE) = word_mode; \
-+} while (0)
-+
-+#define PARM_BOUNDARY 32
-+
-+#define STACK_BOUNDARY 32
-+
-+#define BIGGEST_ALIGNMENT 64
-+
-+#define FUNCTION_BOUNDARY 32
-+
-+#define EMPTY_FIELD_BOUNDARY 32
-+
-+#define STRICT_ALIGNMENT 1
-+
-+#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
-+
-+/* Make strings word-aligned so strcpy from constants will be faster. */
-+#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
-+ (TREE_CODE (EXP) == STRING_CST \
-+ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
-+
-+/* Make arrays and structures word-aligned to allow faster copying etc. */
-+#define DATA_ALIGNMENT(TYPE, ALIGN) \
-+ ((((ALIGN) < BITS_PER_WORD) \
-+ && (TREE_CODE (TYPE) == ARRAY_TYPE \
-+ || TREE_CODE (TYPE) == UNION_TYPE \
-+ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))
-+
-+/* We need this for the same reason as DATA_ALIGNMENT, namely to cause
-+ character arrays to be word-aligned so that `strcpy' calls that copy
-+ constants to character arrays can be done inline, and 'strcmp' can be
-+ optimised to use word loads. */
-+#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
-+ DATA_ALIGNMENT (TYPE, ALIGN)
-+
-+/*----------------------------------------*/
-+/* Layout of source language data types. */
-+/*----------------------------------------*/
-+
-+#define INT_TYPE_SIZE 32
-+#define SHORT_TYPE_SIZE 16
-+#define LONG_TYPE_SIZE 32
-+#define LONG_LONG_TYPE_SIZE 64
-+
-+#define FLOAT_TYPE_SIZE 32
-+#define DOUBLE_TYPE_SIZE 64
-+#define LONG_DOUBLE_TYPE_SIZE 64
-+
-+#define DEFAULT_SIGNED_CHAR 0
-+
-+#define SIZE_TYPE "unsigned int"
-+
-+#define PTRDIFF_TYPE "int"
-+
-+/*---------------------------*/
-+/* Standard register usage. */
-+/*---------------------------*/
-+
-+#define FIRST_PSEUDO_REGISTER 32
-+
-+#define RV_REGNUM 1
-+#define GP_REGNUM 26
-+#define FP_REGNUM 27
-+#define SP_REGNUM 28
-+#define RA_REGNUM 29
-+
-+#define G_REG_P(X) ((X)<32)
-+#define PSEUDO_REG_P(X) ((X)>=FIRST_PSEUDO_REGISTER)
-+
-+#define FIXED_REGISTERS \
-+{ 1, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define CALL_USED_REGISTERS \
-+{ 1, 1, 1, 1, 1, 1, 1, 1, \
-+ 1, 1, 1, 0, 0, 0, 0, 0, \
-+ 0, 0, 0, 0, 0, 0, 0, 0, \
-+ 0, 0, 1, 0, 1, 0, 1, 1}
-+
-+#define HARD_REGNO_NREGS(REGNO, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define HARD_REGNO_MODE_OK(REGNO, MODE) G_REG_P(REGNO)
-+
-+#define MODES_TIEABLE_P(MODE1, MODE2) \
-+( GET_MODE_CLASS (MODE1) == MODE_INT \
-+ && GET_MODE_CLASS (MODE2) == MODE_INT \
-+ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
-+ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
-+
-+#define AVOID_CCMODE_COPIES
-+
-+/*----------------------------------*/
-+/* Register classes and constants. */
-+/*----------------------------------*/
-+
-+enum reg_class {
-+ NO_REGS,
-+ GENERAL_REGS,
-+ ALL_REGS,
-+ LIM_REG_CLASSES
-+};
-+
-+#define N_REG_CLASSES (int) LIM_REG_CLASSES
-+
-+#define REG_CLASS_NAMES { "NO_REGS", "GENERAL_REGS", "ALL_REGS" }
-+
-+#define REG_CLASS_CONTENTS \
-+{ {0x00000000}, \
-+ {0xffffffff}, \
-+ {0xffffffff} \
-+}
-+
-+#define REGNO_REG_CLASS(REGNO) \
-+ (G_REG_P(REGNO) ? GENERAL_REGS : NO_REGS)
-+
-+#define CLASS_MAX_NREGS(CLASS, MODE) \
-+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+#define INDEX_REG_CLASS NO_REGS
-+
-+#define BASE_REG_CLASS GENERAL_REGS
-+
-+#define REG_CLASS_FROM_LETTER(C) NO_REGS
-+
-+#ifdef REG_OK_STRICT
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || G_REG_P (reg_renumber[REGNO]))
-+#else
-+#define REGNO_OK_FOR_BASE_P(REGNO) \
-+(G_REG_P (REGNO) || PSEUDO_REG_P (REGNO))
-+#endif
-+
-+#define REGNO_OK_FOR_INDEX_P(REGNO) 0
-+
-+#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
-+
-+/* The letters I, J, K, L, M, N, O, P in a register constraint string
-+ can be used to stand for particular ranges of immediate operands.
-+ This macro defines what the ranges are.
-+ C is the letter, and VALUE is a constant value.
-+ Return 1 if VALUE is in the range specified by C.
-+
-+ Lattice usage:
-+
-+ J - 0
-+ K - 16-bit signed
-+ L - 16-bit unsigned
-+ M - 32-bit signed
-+ */
-+#define MEDIUM_INT(X) ((((HOST_WIDE_INT)(X)) >= -32768) && (((HOST_WIDE_INT)(X)) < 32768))
-+#define MEDIUM_UINT(X) (((unsigned HOST_WIDE_INT)(X)) < 65536)
-+#define LARGE_INT(X) \
-+((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
-+ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
-+
-+#define CONST_OK_FOR_LETTER_P(VALUE, C) \
-+( (C) == 'J' ? (VALUE) == 0 \
-+ : (C) == 'K' ? MEDIUM_INT (VALUE) \
-+ : (C) == 'L' ? MEDIUM_UINT (VALUE) \
-+ : (C) == 'M' ? LARGE_INT (VALUE) \
-+ : 0 \
-+)
-+
-+#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
-+
-+/*----------------------------------------*/
-+/* Stack Layout and Calling Conventions. */
-+/*----------------------------------------*/
-+
-+#define STACK_GROWS_DOWNWARD 1
-+
-+#define FRAME_GROWS_DOWNWARD 1
-+
-+#define STACK_POINTER_OFFSET (UNITS_PER_WORD)
-+
-+#define STARTING_FRAME_OFFSET (UNITS_PER_WORD)
-+
-+#define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD)
-+
-+#define STACK_POINTER_REGNUM SP_REGNUM
-+
-+#define FRAME_POINTER_REGNUM FP_REGNUM
-+
-+#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
-+
-+#define FRAME_POINTER_REQUIRED (cfun->calls_alloca)
-+
-+#define RETURN_ADDR_RTX(count, frame) \
-+ lm32_return_addr_rtx (count, frame)
-+
-+/* FIXME! */
-+#define STATIC_CHAIN_REGNUM 3
-+
-+#define ELIMINABLE_REGS \
-+{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
-+}
-+
-+#define CAN_ELIMINATE(FROM, TO) \
-+ (((TO) == STACK_POINTER_REGNUM && frame_pointer_needed) ? 0 : 1)
-+
-+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
-+ (OFFSET) = lm32_compute_initial_elimination_offset (FROM, TO)
-+
-+/*-----------------------------*/
-+/* Function argument passing. */
-+/*-----------------------------*/
-+
-+#define ACCUMULATE_OUTGOING_ARGS 1
-+
-+#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
-+
-+/*--------------------------------*/
-+/* Passing Arguments in Registers */
-+/*--------------------------------*/
-+
-+/* The first argument register */
-+#define LM32_FIRST_ARG_REG 1
-+
-+/* The number of (integer) argument register available. */
-+#define LM32_NUM_ARG_REGS 8
-+
-+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-+ lm32_function_arg ((CUM), (MODE), (TYPE), (NAMED))
-+
-+#define CUMULATIVE_ARGS int
-+
-+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \
-+ (CUM) = 0
-+
-+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-+ (CUM) += LM32_NUM_REGS2 (MODE, TYPE)
-+
-+#define FUNCTION_ARG_REGNO_P(r) (((r) >= 1) && ((r) <= LM32_NUM_ARG_REGS))
-+
-+/*--------------------*/
-+/* Function results. */
-+/*--------------------*/
-+
-+#define FUNCTION_VALUE(VALTYPE, FUNC) \
-+ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \
-+ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
-+ ? word_mode \
-+ : TYPE_MODE (VALTYPE), \
-+ RV_REGNUM)
-+
-+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RV_REGNUM)
-+
-+#define FUNCTION_VALUE_REGNO_P(N) ((N) == RV_REGNUM)
-+
-+#define RETURN_IN_MEMORY(TYPE) lm32_return_in_memory (TYPE)
-+
-+#define DEFAULT_PCC_STRUCT_RETURN 0
-+
-+/* Convert from bytes to ints. */
-+#define LM32_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ type MODE. */
-+#define LM32_NUM_REGS(MODE) LM32_NUM_INTS (GET_MODE_SIZE (MODE))
-+
-+/* The number of (integer) registers required to hold a quantity of
-+ TYPE MODE. */
-+#define LM32_NUM_REGS2(MODE, TYPE) \
-+ LM32_NUM_INTS ((MODE) == BLKmode ? \
-+ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))
-+
-+#define STRUCT_VALUE 0
-+
-+/*---------------------------*/
-+/* Function entry and exit. */
-+/*---------------------------*/
-+
-+/*-------------*/
-+/* Profiling. */
-+/*-------------*/
-+
-+#define FUNCTION_PROFILER(FILE, LABELNO)
-+
-+/*---------------*/
-+/* Trampolines. */
-+/*---------------*/
-+
-+#define INITIALIZE_TRAMPOLINE
-+#define TRAMPOLINE_SIZE 0
-+
-+/*---------------------*/
-+/* Addressing Modes. */
-+/*---------------------*/
-+
-+#define CONSTANT_ADDRESS_P(X) \
-+ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
-+ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \
-+ || (GET_CODE (X) == CONST)))
-+
-+#define MAX_REGS_PER_ADDRESS 1
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#else
-+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM)
-+#endif
-+
-+#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X))
-+#define RTX_OK_FOR_STACK_P(X) (REG_P (X) && (REGNO (X) == STACK_POINTER_REGNUM))
-+#define CONST_OK_FOR_BASE_OFFSET(X, MODE) const_ok_for_base_offset ((X), (MODE))
-+
-+#define LEGITIMATE_BASE_INDEX_P(ADDR, MODE) \
-+( GET_CODE (ADDR)==PLUS \
-+ && RTX_OK_FOR_BASE_P (XEXP (ADDR, 0)) \
-+ && GET_CODE (XEXP (ADDR, 1)) == CONST_INT \
-+ && CONST_OK_FOR_BASE_OFFSET (XEXP ((ADDR), 1), (MODE)))
-+
-+#define LEGITIMATE_GPREL_P(ADDR) \
-+( GET_CODE (ADDR) == SYMBOL_REF \
-+ && SYMBOL_REF_SMALL_P (ADDR))
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#ifdef REG_OK_STRICT
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)))
-+#else
-+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X)))
-+#endif
-+
-+#define GO_IF_LEGITIMATE_ADDRESS(m,x,l) \
-+{ \
-+ if (RTX_OK_FOR_BASE_P (x)) goto l; /* (rM) */ \
-+ else if (LEGITIMATE_BASE_INDEX_P (x, m)) goto l; /* (rM)+literal) */ \
-+ else if (LEGITIMATE_GPREL_P (x)) goto l; \
-+}
-+
-+#define ARM_LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
-+do { \
-+ if (flag_pic) \
-+ X = lm32_legitimize_pic_address (OLDX, MODE, NULL_RTX); \
-+} while (0)
-+
-+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-+ if (GET_CODE (ADDR) == PLUS) goto LABEL; \
-+
-+#define LEGITIMATE_CONSTANT_P(X) 1
-+
-+/*-------------------------*/
-+/* Condition Code Status. */
-+/*-------------------------*/
-+
-+#define REVERSIBLE_CC_MODE(MODE) 1
-+
-+/*---------*/
-+/* Costs. */
-+/*---------*/
-+
-+#define SLOW_BYTE_ACCESS 1
-+
-+#define NO_FUNCTION_CSE
-+
-+#define BRANCH_COST(speed_p, predictable_p) 4
-+
-+#define MOVE_RATIO(speed) (speed ? 24 : 3)
-+
-+/*------------*/
-+/* Sections. */
-+/*------------*/
-+
-+#define TEXT_SECTION_ASM_OP "\t.section\t.text"
-+#define DATA_SECTION_ASM_OP "\t.section\t.data"
-+#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\""
-+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
-+#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\""
-+
-+/*-------*/
-+/* PIC. */
-+/*-------*/
-+
-+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM)
-+
-+#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-+
-+#define LEGITIMATE_PIC_OPERAND_P(X) \
-+ (!(nonpic_symbol_mentioned_p (X)))
-+
-+/*-------------*/
-+/* Assembler. */
-+/*-------------*/
-+
-+#define ASM_COMMENT_START "#"
-+
-+#define ASM_APP_ON "#APP\n"
-+
-+#define ASM_APP_OFF "#NO_APP\n"
-+
-+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
-+ do { \
-+ fputc ( '\t', FILE); \
-+ assemble_name (FILE, LABEL1); \
-+ fputs ( " = ", FILE); \
-+ assemble_name (FILE, LABEL2); \
-+ fputc ( '\n', FILE); \
-+ } while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_LOCAL
-+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
-+do { \
-+ if ((SIZE) <= g_switch_value) \
-+ switch_to_section (sbss_section); \
-+ else \
-+ switch_to_section (bss_section); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+} while (0)
-+
-+/* Override default implementation in elfos.h to support -G. */
-+#undef ASM_OUTPUT_ALIGNED_COMMON
-+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
-+do \
-+{ \
-+ if ((SIZE) <= g_switch_value) \
-+ { \
-+ switch_to_section (sbss_section); \
-+ (*targetm.asm_out.globalize_label) (FILE, NAME); \
-+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
-+ if (!flag_inhibit_size_directive) \
-+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
-+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
-+ ASM_OUTPUT_LABEL(FILE, NAME); \
-+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
-+ } \
-+ else \
-+ { \
-+ switch_to_section (bss_section); \
-+ fprintf ((FILE), "%s", COMMON_ASM_OP); \
-+ assemble_name ((FILE), (NAME)); \
-+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
-+ } \
-+} \
-+while (0)
-+
-+#define ASM_OUTPUT_LABEL(FILE, NAME) \
-+ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-+
-+#define ASM_OUTPUT_LABELREF(FILE,NAME) \
-+ do { \
-+ const char *xname = (NAME); \
-+ if (xname[0] == '@') \
-+ xname += 1; \
-+ if (xname[0] == '*') \
-+ xname += 1; \
-+ fputs (xname, FILE); \
-+ } while (0)
-+
-+#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \
-+ do { \
-+ assemble_name (STREAM, XSTR (SYMBOL, 0)); \
-+ } while (0)
-+
-+#define GLOBAL_ASM_OP "\t.global\t"
-+
-+#define REGISTER_NAMES \
-+{ \
-+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
-+ "r24", "r25", "gp", "fp", "sp", "ra", "ea", "ba"}
-+
-+#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
-+ (((CHAR) == '&') || ((CHAR) == '@') || ((CHAR) == '*'))
-+
-+#define PRINT_OPERAND(FILE, X, CODE) \
-+ lm32_print_operand (FILE, X, CODE)
-+
-+#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
-+ lm32_print_operand_address (FILE, ADDR)
-+
-+#ifndef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+#endif
-+
-+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-+ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", (1 << (LOG))); } while (0)
-+
-+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
-+do { \
-+ char label[64]; \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ fprintf (FILE, "\n\t.word\t"); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "\n"); \
-+} while (0)
-+
-+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-+do { \
-+ char label[64]; \
-+ fprintf (FILE, "\t.word\t("); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, "-"); \
-+ ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \
-+ assemble_name (FILE, label); \
-+ fprintf (FILE, ")\n"); \
-+} while (0)
-+
-+/*-------------*/
-+/* Debugging. */
-+/*-------------*/
-+
-+#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
-+
-+#define CAN_DEBUG_WITHOUT_FP
-+
-+#define DEFAULT_GDB_EXTENSIONS 1
-+
-+/*--------*/
-+/* Misc. */
-+/*--------*/
-+
-+#define CASE_VECTOR_MODE Pmode
-+
-+#define WORD_REGISTER_OPERATIONS
-+
-+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
-+
-+#define SHORT_IMMEDIATES_SIGN_EXTEND
-+
-+#define MOVE_MAX UNITS_PER_WORD
-+#define MAX_MOVE_MAX 4
-+
-+#define SHIFT_COUNT_TRUNCATED 1
-+
-+#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-+
-+#define Pmode SImode
-+
-+#define FUNCTION_MODE SImode
-+
-+#ifndef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+#endif
-+
-+#define STORE_FLAG_VALUE 1
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.md gcc-4.4.6/gcc/config/lm32/lm32.md
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.md 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,1233 @@
-+;; Machine description of the Lattice Mico32 architecture for GNU C compiler.
-+;; Contributed by Jon Beniston <jon at beniston.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
-+;; <http://www.gnu.org/licenses/>.
-+
-+;; Include predicate definitions
-+(include "predicates.md")
-+
-+;; Register numbers
-+(define_constants
-+ [(RA_REGNUM 29) ; return address register.
-+ ]
-+)
-+
-+;; LM32 specific volatile operations
-+(define_constants
-+ [(UNSPECV_BLOCKAGE 1)] ; use to prevent scheduler from optimising accross bounaries
-+)
-+
-+;; LM32 specific operations
-+(define_constants
-+ [(UNSPEC_GOT 2)
-+ (UNSPEC_GOTOFF_HI16 3)
-+ (UNSPEC_GOTOFF_LO16 4)]
-+)
-+
-+;; ---------------------------------
-+;; instruction types
-+;; ---------------------------------
-+
-+(define_attr "type"
-+ "unknown,load,store,arith,compare,shift,multiply,divide,call,icall,ubranch,uibranch,cbranch"
-+ (const_string "unknown"))
-+
-+;; ---------------------------------
-+;; instruction lengths
-+;; ---------------------------------
-+
-+; All instructions are 4 bytes
-+; Except for branches that are out of range, and have to be implemented
-+; as two instructions
-+(define_attr "length" ""
-+ (cond [
-+ (eq_attr "type" "cbranch")
-+ (if_then_else
-+ (lt (abs (minus (match_dup 2) (pc)))
-+ (const_int 32768)
-+ )
-+ (const_int 4)
-+ (const_int 8)
-+ )
-+ ]
-+ (const_int 4))
-+)
-+
-+;; ---------------------------------
-+;; scheduling
-+;; ---------------------------------
-+
-+(define_automaton "lm32")
-+
-+(define_cpu_unit "x" "lm32")
-+(define_cpu_unit "m" "lm32")
-+(define_cpu_unit "w" "lm32")
-+
-+(define_insn_reservation "singlecycle" 1
-+ (eq_attr "type" "store,arith,call,icall,ubranch,uibranch,cbranch")
-+ "x")
-+
-+(define_insn_reservation "twocycle" 2
-+ (eq_attr "type" "compare,shift,divide")
-+ "x,m")
-+
-+(define_insn_reservation "threecycle" 3
-+ (eq_attr "type" "load,multiply")
-+ "x,m,w")
-+
-+;; ---------------------------------
-+;; mov
-+;; ---------------------------------
-+
-+(define_expand "movqi"
-+ [(set (match_operand:QI 0 "general_operand" "")
-+ (match_operand:QI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operand0) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (QImode, operands[1]);
-+ }
-+ }
-+ if ( GET_CODE (operands[1]) == CONST_INT
-+ && GET_CODE (operands[0]) == REG)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ emit_insn (gen_movsi (operands[0], operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movhi"
-+ [(set (match_operand:HI 0 "general_operand" "")
-+ (match_operand:HI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM)
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (HImode, operands[1]);
-+ }
-+ }
-+ if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+(define_expand "movsi"
-+ [(set (match_operand:SI 0 "general_operand" "")
-+ (match_operand:SI 1 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ if (can_create_pseudo_p ())
-+ {
-+ if (GET_CODE (operands[0]) == MEM
-+ || (GET_CODE (operands[0]) == SUBREG
-+ && GET_CODE (SUBREG_REG (operands[0])) == MEM))
-+ {
-+ /* Source operand for store must be in a register */
-+ operands[1] = force_reg (SImode, operands[1]);
-+ }
-+ }
-+
-+ if (flag_pic && symbolic_operand (operands[1], SImode))
-+ {
-+ if (GET_CODE (operands[1]) == LABEL_REF
-+ || (GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (operands[1])
-+ && !SYMBOL_REF_WEAK (operands[1])))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], operands[1]));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], operands[1]));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], operands[1]));
-+ }
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ else if (flag_pic && GET_CODE (operands[1]) == CONST)
-+ {
-+ rtx op = XEXP (operands[1], 0);
-+ if (GET_CODE (op) == PLUS)
-+ {
-+ rtx arg0 = XEXP (op, 0);
-+ rtx arg1 = XEXP (op, 1);
-+ if (GET_CODE (arg0) == LABEL_REF
-+ || (GET_CODE (arg0) == SYMBOL_REF
-+ && SYMBOL_REF_LOCAL_P (arg0)
-+ && !SYMBOL_REF_WEAK (arg0)))
-+ {
-+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], arg0));
-+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx));
-+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], arg0));
-+ }
-+ else
-+ {
-+ emit_insn (gen_movsi_got (operands[0], arg0));
-+ }
-+ emit_insn (gen_addsi3 (operands[0], operands[0], arg1));
-+ crtl->uses_pic_offset_table = 1;
-+ DONE;
-+ }
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == SYMBOL_REF
-+ && SYMBOL_REF_SMALL_P (operands[1])
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_gprel (operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (!flag_pic && ( GET_CODE (operands[1]) == LABEL_REF
-+ || GET_CODE (operands[1]) == SYMBOL_REF
-+ || GET_CODE (operands[1]) == CONST
-+ )
-+ )
-+ {
-+ emit_insn (gen_movsi_reloc_hi (operands[0], operands[1]));
-+ emit_insn (gen_movsi_reloc_lo (operands[0], operands[0], operands[1]));
-+ DONE;
-+ }
-+ else if (GET_CODE (operands[1]) == CONST_INT)
-+ {
-+ if (MEDIUM_INT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_kimm (operands[0], operands[1]));
-+ else if (MEDIUM_UINT (INTVAL (operands[1])))
-+ emit_insn (gen_movsi_limm (operands[0], operands[1]));
-+ else
-+ {
-+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1]))));
-+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1]))));
-+ }
-+ DONE;
-+ }
-+}")
-+
-+;;(define_expand "movmemsi"
-+;; [(parallel [(set (match_operand:BLK 0 "general_operand" "")
-+;; (match_operand:BLK 1 "general_operand" ""))
-+;; (use (match_operand:SI 2 "" ""))
-+;; (use (match_operand:SI 3 "const_int_operand" ""))])]
-+;; ""
-+;;{
-+;; if (!lm32_expand_block_move (operands))
-+;; FAIL;
-+;; DONE;
-+;;})
-+
-+;; ---------------------------------
-+;; load/stores/moves
-+;; ---------------------------------
-+
-+(define_insn "movsi_kimm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_K_operand" "K"))]
-+ ""
-+ "addi %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_limm"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "constant_L_operand" "L"))]
-+ ""
-+ "ori %0, r0, %1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "immediate_operand" "i")))]
-+ ""
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_imm_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "immediate_operand" "i")))]
-+ ""
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_gprel"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (match_operand:SI 1 "reloc_operand" "i"))]
-+ "GET_CODE (operands[1]) == SYMBOL_REF && SYMBOL_REF_SMALL_P (operands[1])"
-+ "mva %0, gp(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_got"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))]
-+ "flag_pic"
-+ "lw %0, (gp+got(%1))"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_hi16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))]
-+ "flag_pic"
-+ "orhi %0, r0, gotoffhi16(%1)"
-+ [(set_attr "type" "load")]
-+)
-+
-+(define_insn "movsi_gotoff_lo16"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))]
-+ "flag_pic"
-+ "addi %0, %1, gotofflo16(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_hi"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (high:SI (match_operand:SI 1 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "orhi %0, r0, hi(%1)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "movsi_reloc_lo"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
-+ (match_operand:SI 2 "reloc_operand" "i")))]
-+ "!flag_pic"
-+ "ori %0, %0, lo(%2)"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*movqi_insn"
-+ [(set (match_operand:QI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:QI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ or %0, %1, r0
-+ sb %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movhi_insn"
-+ [(set (match_operand:HI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:HI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ or %0, %1, r0
-+ sh %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+(define_insn "*movsi_insn"
-+ [(set (match_operand:SI 0 "register_or_memory_operand" "=r,r,m")
-+ (match_operand:SI 1 "register_or_memory_operand" "m,r,r"))]
-+ ""
-+ "@
-+ lw %0, %1
-+ or %0, %1, r0
-+ sw %0, %1"
-+ [(set_attr "type" "load,arith,store")]
-+)
-+
-+;; ---------------------------------
-+;; sign and zero extension
-+;; ---------------------------------
-+
-+(define_insn "*extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (sign_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqihi2"
-+ [(set (match_operand:HI 0 "register_operand" "=r,r")
-+ (zero_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lb %0, %1
-+ sextb %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendqisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lbu %0, %1
-+ andi %0, %1, 0xff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "*extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (sign_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)"
-+ "@
-+ lh %0, %1
-+ sexth %0, %1"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+(define_insn "zero_extendhisi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (zero_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))]
-+ ""
-+ "@
-+ lhu %0, %1
-+ andi %0, %1, 0xffff"
-+ [(set_attr "type" "load,arith")]
-+)
-+
-+;; ---------------------------------
-+;; compare
-+;; ---------------------------------
-+
-+(define_expand "cmpsi"
-+ [(set (cc0)
-+ (compare:CC (match_operand:SI 0 "register_operand" "")
-+ (match_operand:SI 1 "register_or_K_operand" "")))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = operands[1];
-+ DONE;
-+}")
-+
-+
-+(define_expand "tstsi"
-+ [(set (cc0)
-+ (match_operand:SI 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ lm32_compare_op0 = operands[0];
-+ lm32_compare_op1 = const0_rtx;
-+ DONE;
-+}")
-+
-+(define_expand "seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (eq:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*seq"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (eq:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpe %0, %z1, %2
-+ cmpei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ne:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sne"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ne:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpne %0, %z1, %2
-+ cmpnei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgt"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpg %0, %z1, %2
-+ cmpgi %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "slt"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (lt:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ge:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sge"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ge:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ cmpge %0, %z1, %2
-+ cmpgei %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sle"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (le:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gtu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgtu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (gtu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgu %0, %z1, %2
-+ cmpgui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sltu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ltu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_expand "sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (geu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+(define_insn "*sgeu"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (geu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,L")))]
-+ ""
-+ "@
-+ cmpgeu %0, %z1, %2
-+ cmpgeui %0, %z1, %2"
-+ [(set_attr "type" "compare")]
-+)
-+
-+(define_expand "sleu"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (leu:SI (match_dup 1)
-+ (match_dup 2)))]
-+ ""
-+{
-+ operands[1] = lm32_compare_op0;
-+ operands[2] = lm32_compare_op1;
-+ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
-+ DONE;
-+})
-+
-+;; ---------------------------------
-+;; unconditional branch
-+;; ---------------------------------
-+
-+(define_insn "jump"
-+ [(set (pc) (label_ref (match_operand 0 "" "")))]
-+ ""
-+ "bi %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+(define_expand "indirect_jump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))]
-+ ""
-+ "
-+{
-+ emit_jump_insn (gen_indirect_jumpsi (operands[0]));
-+ DONE;
-+}")
-+
-+(define_insn "indirect_jumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; conditional branch
-+;; ---------------------------------
-+
-+(define_expand "beq"
-+ [(set (pc)
-+ (if_then_else (eq:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (EQ, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bne"
-+ [(set (pc)
-+ (if_then_else (ne:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (NE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgt"
-+ [(set (pc)
-+ (if_then_else (gt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bge"
-+ [(set (pc)
-+ (if_then_else (ge:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "ble"
-+ [(set (pc)
-+ (if_then_else (le:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "blt"
-+ [(set (pc)
-+ (if_then_else (lt:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (GEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bleu"
-+ [(set (pc)
-+ (if_then_else (leu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_expand "bltu"
-+ [(set (pc)
-+ (if_then_else (ltu:CC (cc0)
-+ (const_int 0))
-+ (label_ref (match_operand 0 "" ""))
-+ (pc)))]
-+ ""
-+ "
-+{
-+ gen_int_relational (LTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]);
-+ DONE;
-+}")
-+
-+(define_insn "*beq"
-+ [(set (pc)
-+ (if_then_else (eq:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "be %z0,%z1,%2"
-+ : "bne %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bne"
-+ [(set (pc)
-+ (if_then_else (ne:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bne %z0,%z1,%2"
-+ : "be %z0,%z1,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgt"
-+ [(set (pc)
-+ (if_then_else (gt:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bg %z0,%z1,%2"
-+ : "bge %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bge"
-+ [(set (pc)
-+ (if_then_else (ge:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bge %z0,%z1,%2"
-+ : "bg %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgtu"
-+ [(set (pc)
-+ (if_then_else (gtu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgu %z0,%z1,%2"
-+ : "bgeu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+(define_insn "*bgeu"
-+ [(set (pc)
-+ (if_then_else (geu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 1 "register_or_zero_operand" "rJ"))
-+ (label_ref (match_operand 2 "" ""))
-+ (pc)))]
-+ ""
-+{
-+ return get_attr_length (insn) == 4
-+ ? "bgeu %z0,%z1,%2"
-+ : "bgu %z1,%z0,8\n\tbi %2";
-+}
-+ [(set_attr "type" "cbranch")])
-+
-+;; ---------------------------------
-+;; call
-+;; ---------------------------------
-+
-+(define_expand "call"
-+ [(parallel [(call (match_operand 0 "memory_operand" "m")
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[0], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_via_regsi (addr, operands[1]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_via_regsi"
-+ [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %0"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_via_labelsi"
-+ [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "X"))
-+ (match_operand 1 "" ""))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %0"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_expand "call_value"
-+ [(parallel [(set (match_operand 0 "register_operand" "=r")
-+ (call (match_operand 1 "memory_operand" "m")
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))
-+ ])]
-+ ""
-+ "
-+{
-+ rtx addr = XEXP (operands[1], 0);
-+ if (!CONSTANT_ADDRESS_P (addr))
-+ {
-+ emit_call_insn (gen_call_value_via_regsi (operands[0], addr, operands[2]));
-+ DONE;
-+ }
-+}")
-+
-+(define_insn "call_value_via_regsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "call %1"
-+ [(set_attr "type" "icall")]
-+)
-+
-+(define_insn "*call_value_via_labelsi"
-+ [(set (match_operand 0 "register_operand" "=r")
-+ (call (mem:SI (match_operand:SI 1 "symbolic_operand" "X"))
-+ (match_operand 2 "" "")))
-+ (clobber (reg:SI RA_REGNUM))]
-+ ""
-+ "calli %1"
-+ [(set_attr "type" "call")]
-+)
-+
-+(define_insn "return_internalsi"
-+ [(use (match_operand:SI 0 "register_operand" "r"))
-+ (return)]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+(define_insn "return"
-+ [(return)]
-+ "lm32_can_use_return ()"
-+ "ret"
-+ [(set_attr "type" "uibranch")]
-+)
-+
-+;; ---------------------------------
-+;; switch/case statements
-+;; ---------------------------------
-+
-+(define_expand "tablejump"
-+ [(set (pc) (match_operand 0 "register_operand" ""))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "
-+{
-+ rtx target = operands[0];
-+ if (flag_pic)
-+ {
-+ /* For PIC, the table entry is relative to the start of the table. */
-+ rtx label = gen_reg_rtx (SImode);
-+ target = gen_reg_rtx (SImode);
-+ emit_move_insn (label, gen_rtx_LABEL_REF (SImode, operands[1]));
-+ emit_insn (gen_addsi3 (target, operands[0], label));
-+ }
-+ emit_jump_insn (gen_tablejumpsi (target, operands[1]));
-+ DONE;
-+}")
-+
-+(define_insn "tablejumpsi"
-+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))
-+ (use (label_ref (match_operand 1 "" "")))]
-+ ""
-+ "b %0"
-+ [(set_attr "type" "ubranch")]
-+)
-+
-+;; ---------------------------------
-+;; arithmetic
-+;; ---------------------------------
-+
-+(define_insn "addsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (plus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ ""
-+ "@
-+ add %0, %z1, %2
-+ addi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "subsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, %z1, %z2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "mulsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (mult:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_K_operand" "r,K")))]
-+ "TARGET_MULTIPLY_ENABLED"
-+ "@
-+ mul %0, %z1, %2
-+ muli %0, %z1, %2"
-+ [(set_attr "type" "multiply")]
-+)
-+
-+(define_insn "udivsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (udiv:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "divu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+(define_insn "umodsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (umod:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
-+ (match_operand:SI 2 "register_operand" "r")))]
-+ "TARGET_DIVIDE_ENABLED"
-+ "modu %0, %z1, %2"
-+ [(set_attr "type" "divide")]
-+)
-+
-+;; ---------------------------------
-+;; negation and inversion
-+;; ---------------------------------
-+
-+(define_insn "negsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (neg:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "sub %0, r0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "one_cmplsi2"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (not:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))]
-+ ""
-+ "not %0, %z1"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; logical
-+;; ---------------------------------
-+
-+(define_insn "andsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (and:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ and %0, %z1, %2
-+ andi %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "iorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ or %0, %z1, %2
-+ ori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "xorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ ""
-+ "@
-+ xor %0, %z1, %2
-+ xori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*norsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ nor %0, %z1, %2
-+ nori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+(define_insn "*xnorsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (not:SI (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))]
-+ ""
-+ "@
-+ xnor %0, %z1, %2
-+ xnori %0, %z1, %2"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; shifts
-+;; ---------------------------------
-+
-+(define_insn "ashlsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashift:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sl %0, %z1, %2
-+ sli %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "ashrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (ashiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sr %0, %z1, %2
-+ sri %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+(define_insn "lshrsi3"
-+ [(set (match_operand:SI 0 "register_operand" "=r,r")
-+ (lshiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
-+ (match_operand:SI 2 "register_or_L_operand" "r,L")))]
-+ "TARGET_BARREL_SHIFT_ENABLED"
-+ "@
-+ sru %0, %z1, %2
-+ srui %0, %z1, %2"
-+ [(set_attr "type" "shift")]
-+)
-+
-+;; ---------------------------------
-+;; function entry / exit
-+;; ---------------------------------
-+
-+(define_expand "prologue"
-+ [(const_int 1)]
-+ ""
-+ "
-+{
-+ lm32_expand_prologue ();
-+ DONE;
-+}")
-+
-+(define_expand "epilogue"
-+ [(return)]
-+ ""
-+ "
-+{
-+ lm32_expand_epilogue ();
-+ DONE;
-+}")
-+
-+;; ---------------------------------
-+;; nop
-+;; ---------------------------------
-+
-+(define_insn "nop"
-+ [(const_int 0)]
-+ ""
-+ "nop"
-+ [(set_attr "type" "arith")]
-+)
-+
-+;; ---------------------------------
-+;; blockage
-+;; ---------------------------------
-+
-+;; used to stop the scheduler from
-+;; scheduling code across certain boundaries
-+
-+(define_insn "blockage"
-+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
-+ ""
-+ ""
-+ [(set_attr "length" "0")]
-+)
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.opt gcc-4.4.6/gcc/config/lm32/lm32.opt
---- gcc-4.4.6.orig/gcc/config/lm32/lm32.opt 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32.opt 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,40 @@
-+; Options for the Lattice Mico32 port of the compiler.
-+; Contributed by Jon Beniston <jon at beniston.com>
-+;
-+; Copyright (C) 2008 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it
-+; under the terms of the GNU General Public License as published
-+; by the Free Software Foundation; either version 3, or (at your
-+; option) any later version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT
-+; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+; License for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+mmultiply-enabled
-+Target Report Mask(MULTIPLY_ENABLED)
-+Enable multiply instructions
-+
-+mdivide-enabled
-+Target Report Mask(DIVIDE_ENABLED)
-+Enable divide and modulus instructions
-+
-+mbarrel-shift-enabled
-+Target Report Mask(BARREL_SHIFT_ENABLED)
-+Enable barrel shift instructions
-+
-+msign-extend-enabled
-+Target Report Mask(SIGN_EXTEND_ENABLED)
-+Enable sign extend instructions
-+
-+muser-enabled
-+Target Report Mask(USER_ENABLED)
-+Enable user-defined instructions
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h gcc-4.4.6/gcc/config/lm32/lm32-protos.h
---- gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/lm32-protos.h 2011-08-29 07:16:18.134123880 +0200
-@@ -0,0 +1,52 @@
-+/* Prototypes of target machine functions, Lattice Mico32 architecture.
-+ Contributed by Jon Beniston <jon at beniston.com>
-+
-+ Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published
-+ by the Free Software Foundation; either version 3, or (at your
-+ option) any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+ License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+extern int lm32_return_in_memory (tree type);
-+extern void lm32_declare_object (FILE *stream, char *name, char *init_string,
-+ char *final_string, int size);
-+extern int symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_zero_operand (rtx op, enum machine_mode mode);
-+extern int register_or_K_operand (rtx op, enum machine_mode mode);
-+extern int constant_K_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_L_operand (rtx op, enum machine_mode mode);
-+extern int constant_L_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED);
-+extern int register_or_memory_operand (rtx op, enum machine_mode mode);
-+extern int register_operand (rtx op, enum machine_mode mode);
-+extern int const_ok_for_base_offset (rtx op, enum machine_mode mode);
-+extern void lm32_expand_prologue (void);
-+extern void lm32_expand_epilogue (void);
-+extern HOST_WIDE_INT lm32_compute_frame_size (int size);
-+extern void lm32_print_operand (FILE *file, rtx op, int letter);
-+extern void lm32_print_operand_address (FILE *file, rtx addr);
-+extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-+ tree type, int named);
-+extern void lm32_override_options (void);
-+extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
-+ int to);
-+extern int lm32_can_use_return (void);
-+extern rtx lm32_return_addr_rtx (int count, rtx frame);
-+#ifdef RTX_CODE
-+extern void gen_int_relational (enum rtx_code code, rtx result, rtx cmp0,
-+ rtx cmp1, rtx destination);
-+#endif
-+extern int lm32_expand_block_move (rtx *);
-+extern int nonpic_symbol_mentioned_p (rtx);
-+extern rtx lm32_legitimize_pic_address (rtx, enum machine_mode, rtx);
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/predicates.md gcc-4.4.6/gcc/config/lm32/predicates.md
---- gcc-4.4.6.orig/gcc/config/lm32/predicates.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/predicates.md 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,58 @@
-+;; Predicate definitions for Lattice Mico32.
-+;; Contributed by Jon Beniston <jon at beniston.com>
-+;;
-+;; Copyright (C) 2008 Free Software Foundation, Inc.
-+;;
-+;; This file is part of GCC.
-+;;
-+;; GCC is free software; you can redistribute it and/or modify it
-+;; under the terms of the GNU General Public License as published
-+;; by the Free Software Foundation; either version 3, or (at your
-+;; option) any later version.
-+;;
-+;; GCC is distributed in the hope that it will be useful, but WITHOUT
-+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+;; License for more details.
-+;;
-+;; You should have received a copy of the GNU General Public License
-+;; along with GCC; see the file COPYING3. If not see
-+;; <http://www.gnu.org/licenses/>.
-+
-+(define_predicate "const0_operand"
-+ (and (match_code "const_int,const_double,const_vector")
-+ (match_test "op == CONST0_RTX (GET_MODE (op))")))
-+
-+(define_predicate "constant_K_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_INT (INTVAL (op))")))
-+
-+(define_predicate "constant_L_operand"
-+ (and (match_code "const_int")
-+ (match_test "MEDIUM_UINT (INTVAL (op))")))
-+
-+(define_predicate "register_or_zero_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "const0_operand")))
-+
-+(define_predicate "register_or_memory_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "memory_operand")))
-+
-+(define_predicate "register_or_K_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_K_operand")))
-+
-+(define_predicate "register_or_L_operand"
-+ (ior (match_operand 0 "register_operand")
-+ (match_operand 0 "constant_L_operand")))
-+
-+(define_predicate "reloc_operand"
-+ (ior (ior (match_code "label_ref")
-+ (match_code "symbol_ref"))
-+ (match_code "const")))
-+
-+(define_predicate "symbolic_operand"
-+ (ior (match_code "label_ref")
-+ (match_code "symbol_ref")))
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/rtems.h gcc-4.4.6/gcc/config/lm32/rtems.h
---- gcc-4.4.6.orig/gcc/config/lm32/rtems.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/rtems.h 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,32 @@
-+/* Definitions for rtems targeting a lm32 using ELF.
-+ Copyright (C) 2009, Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+/* Target OS builtins. */
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define ("__rtems__"); \
-+ builtin_define ("__USE_INIT_FINI__"); \
-+ builtin_assert ("system=rtems"); \
-+ } \
-+ while (0)
-+
-+/* Use the default */
-+#undef LINK_GCC_C_SEQUENCE_SPEC
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h gcc-4.4.6/gcc/config/lm32/sfp-machine.h
---- gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/sfp-machine.h 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,51 @@
-+#define _FP_W_TYPE_SIZE 32
-+#define _FP_W_TYPE unsigned long
-+#define _FP_WS_TYPE signed long
-+#define _FP_I_TYPE long
-+
-+#define _FP_MUL_MEAT_S(R,X,Y) \
-+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_D(R,X,Y) \
-+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_Q(R,X,Y) \
-+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
-+
-+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
-+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
-+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
-+
-+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
-+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
-+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
-+#define _FP_NANSIGN_S 0
-+#define _FP_NANSIGN_D 0
-+#define _FP_NANSIGN_Q 0
-+
-+#define _FP_KEEPNANFRACP 1
-+
-+/* Someone please check this. */
-+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
-+ do { \
-+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
-+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
-+ { \
-+ R##_s = Y##_s; \
-+ _FP_FRAC_COPY_##wc(R,Y); \
-+ } \
-+ else \
-+ { \
-+ R##_s = X##_s; \
-+ _FP_FRAC_COPY_##wc(R,X); \
-+ } \
-+ R##_c = FP_CLS_NAN; \
-+ } while (0)
-+
-+#define __LITTLE_ENDIAN 1234
-+#define __BIG_ENDIAN 4321
-+
-+#define __BYTE_ORDER __BIG_ENDIAN
-+
-+/* Define ALIASNAME as a strong alias for NAME. */
-+# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-+# define _strong_alias(name, aliasname) \
-+ extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp gcc-4.4.6/gcc/config/lm32/t-fprules-softfp
---- gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-fprules-softfp 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,5 @@
-+softfp_float_modes := sf df
-+softfp_int_modes := si di
-+softfp_extensions := sfdf
-+softfp_truncations := dfsf
-+softfp_machine_header := lm32/sfp-machine.h
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-lm32 gcc-4.4.6/gcc/config/lm32/t-lm32
---- gcc-4.4.6.orig/gcc/config/lm32/t-lm32 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/t-lm32 2011-08-29 07:16:18.136123965 +0200
-@@ -0,0 +1,19 @@
-+LIB1ASMSRC = lm32/lib1funcs.S
-+LIB1ASMFUNCS = _ashlsi3 _ashrsi3 _lshrsi3
-+
-+LM32_LIB1CSRC = $(srcdir)/config/lm32/arithmetic.c
-+LIB2FUNCS_EXTRA = _mulsi3.c \
-+ _udivmodsi4.c _divsi3.c _modsi3.c _udivsi3.c _umodsi3.c
-+# Size optimised versions: _ashlsi3.c _ashrsi3.c _lshrsi3.c
-+
-+# The fixed-point arithmetic code is in one file
-+# similar to libgcc2.c (or the old libgcc1.c). We need to
-+# "split it up" with one file per define.
-+$(LIB2FUNCS_EXTRA): $(LM32_LIB1CSRC)
-+ name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \
-+ echo "#define L$$name" > tmp-$@ \
-+ && echo '#include "$<"' >> tmp-$@ \
-+ && mv -f tmp-$@ $@
-+
-+MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled
-+# Don't bother building multilib with mdivide-enabled, not much of a gain
-diff -Naur gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h gcc-4.4.6/gcc/config/lm32/uclinux-elf.h
---- gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/gcc/config/lm32/uclinux-elf.h 2011-08-29 07:16:18.137124000 +0200
-@@ -0,0 +1,85 @@
-+/* Definitions for LM32 running Linux-based GNU systems using ELF
-+ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-+ 2008 Free Software Foundation, Inc.
-+ Contributed by Philip Blundell <philb at gnu.org>
-+
-+ 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
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* elfos.h should have already been included. Now just override
-+ any conflicting definitions and add any extras. */
-+
-+/* Run-time Target Specification. */
-+#undef TARGET_VERSION
-+#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr);
-+
-+/* Do not assume anything about header files. */
-+#undef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C
-+
-+/* The GNU C++ standard library requires that these macros be defined. */
-+#undef CPLUSPLUS_CPP_SPEC
-+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-+
-+/* Now we define the strings used to build the spec file. */
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ "%{pthread:-lpthread} \
-+ %{shared:-lc} \
-+ %{!shared:-lc} "
-+
-+#define LIBGCC_SPEC "-lgcc"
-+
-+/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
-+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main'. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared: \
-+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
-+ %{!p:%{profile:gcrt1.o%s} \
-+ %{!profile:crt1.o%s}}}} \
-+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
-+
-+/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
-+ the GNU/Linux magical crtend.o file (see crtstuff.c) which
-+ provides part of the support for getting C++ file-scope static
-+ object constructed before entering `main', followed by a normal
-+ GNU/Linux "finalizer" file, `crtn.o'. */
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "%{h*} %{version:-v} \
-+ %{b} %{Wl,*:%*} \
-+ %{static:-Bstatic} \
-+ %{shared:-shared} \
-+ %{symbolic:-Bsymbolic} \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
-+
-+#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
-+
-+#define LINK_GCC_C_SEQUENCE_SPEC \
-+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"
-+
-diff -Naur gcc-4.4.6.orig/gcc/config/m32c/rtems.h gcc-4.4.6/gcc/config/m32c/rtems.h
---- gcc-4.4.6.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
-+++ gcc-4.4.6/gcc/config/m32c/rtems.h 2011-08-29 07:16:18.137124000 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/m68k/rtemself.h gcc-4.4.6/gcc/config/m68k/rtemself.h
---- gcc-4.4.6.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/m68k/rtemself.h 2011-08-29 07:16:18.137124000 +0200
-@@ -31,3 +31,8 @@
- builtin_assert ("system=rtems"); \
- } \
- while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/mips/elf.h gcc-4.4.6/gcc/config/mips/elf.h
---- gcc-4.4.6.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/mips/elf.h 2011-08-29 07:16:18.137124000 +0200
-@@ -48,6 +48,4 @@
- #undef ENDFILE_SPEC
- #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
--#define NO_IMPLICIT_EXTERN_C 1
--
- #define HANDLE_PRAGMA_PACK_PUSH_POP 1
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/rtems.h gcc-4.4.6/gcc/config/rs6000/rtems.h
---- gcc-4.4.6.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rs6000/rtems.h 2011-08-29 07:16:18.137124000 +0200
-@@ -49,8 +49,22 @@
- %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
- %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
- %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
--%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
-+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
-+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }"
-
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS \
- { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }
-+
-+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
-+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
-+ do { \
-+ if (TARGET_E500) \
-+ { \
-+ rs6000_float_gprs = 1; \
-+ } \
-+ } while(0)
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/t-rtems gcc-4.4.6/gcc/config/rs6000/t-rtems
---- gcc-4.4.6.orig/gcc/config/rs6000/t-rtems 2009-03-25 13:54:16.000000000 +0100
-+++ gcc-4.4.6/gcc/config/rs6000/t-rtems 2011-08-29 07:16:18.137124000 +0200
-@@ -1,13 +1,29 @@
- # Multilibs for powerpc RTEMS targets.
-+#
-+# Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
-+#
-+# This file is part of GCC.
-+#
-+# GCC is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+#
-+# GCC is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with GCC; see the file COPYING3. If not see
-+# <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = \
--mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
--Dmpc8260 \
-+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
- msoft-float
-
- MULTILIB_DIRNAMES = \
--m403 m505 m601 m603e m604 m860 m7400 \
--mpc8260 \
-+m403 m505 m601 m603e m604 m860 m7400 m8540 \
- nof
-
- # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
-@@ -29,6 +45,9 @@
- # Map 750 to .
- MULTILIB_MATCHES += mcpu?750=
-
-+# Map 8548 to 8540
-+MULTILIB_MATCHES += mcpu?8540=mcpu?8548
-+
- # Soft-float only, default implies msoft-float
- # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
- MULTILIB_SOFTFLOAT_ONLY = \
-@@ -55,10 +74,3 @@
-
- # Special rules
- # Take out all variants we don't want
--MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
--MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
-diff -Naur gcc-4.4.6.orig/gcc/config/rtems.h gcc-4.4.6/gcc/config/rtems.h
---- gcc-4.4.6.orig/gcc/config/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/rtems.h 2011-08-29 07:16:18.138124032 +0200
-@@ -38,6 +38,5 @@
- #undef LIB_SPEC
- #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
- "%{!nostdlib: %{qrtems: --start-group \
-- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \
-- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
-+ -lrtemsbsp -lrtemscpu \
- -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
-diff -Naur gcc-4.4.6.orig/gcc/config/sh/rtemself.h gcc-4.4.6/gcc/config/sh/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sh/rtemself.h 2011-08-29 07:16:18.138124032 +0200
-@@ -24,3 +24,8 @@
- builtin_define( "__rtems__" ); \
- builtin_assert( "system=rtems" ); \
- } while (0)
-+
-+/* Use the defaults */
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config/sparc/rtemself.h gcc-4.4.6/gcc/config/sparc/rtemself.h
---- gcc-4.4.6.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.4.6/gcc/config/sparc/rtemself.h 2011-08-29 07:16:18.138124032 +0200
-@@ -29,5 +29,9 @@
- } \
- while (0)
-
--/* Use the default */
-+/* Use the defaults */
- #undef LINK_GCC_C_SEQUENCE_SPEC
-+
-+#undef WCHAR_TYPE
-+
-+#undef WCHAR_TYPE_SIZE
-diff -Naur gcc-4.4.6.orig/gcc/config.gcc gcc-4.4.6/gcc/config.gcc
---- gcc-4.4.6.orig/gcc/config.gcc 2011-02-18 22:39:51.000000000 +0100
-+++ gcc-4.4.6/gcc/config.gcc 2011-08-29 07:16:18.132123787 +0200
-@@ -1377,6 +1377,23 @@
- out_file=iq2000/iq2000.c
- md_file=iq2000/iq2000.md
- ;;
-+lm32-*-elf*)
-+ tm_file="dbxelf.h elfos.h ${tm_file}"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
-+lm32-*-rtems*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ tmake_file="${tmake_file} t-rtems"
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ ;;
-+lm32-*-uclinux*)
-+ tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h"
-+ tmake_file="lm32/t-lm32"
-+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp"
-+ ;;
- m32r-*-elf*)
- tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
- extra_parts="crtinit.o crtfini.o"
-diff -Naur gcc-4.4.6.orig/gcc/doc/contrib.texi gcc-4.4.6/gcc/doc/contrib.texi
---- gcc-4.4.6.orig/gcc/doc/contrib.texi 2009-02-20 16:20:38.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/contrib.texi 2011-08-29 07:16:21.941181976 +0200
-@@ -55,7 +55,7 @@
- Wolfgang Bangerth for processing tons of bug reports.
-
- @item
--Jon Beniston for his Microsoft Windows port of Java.
-+Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32.
-
- @item
- Daniel Berlin for better DWARF2 support, faster/better optimizations,
-diff -Naur gcc-4.4.6.orig/gcc/doc/install.texi gcc-4.4.6/gcc/doc/install.texi
---- gcc-4.4.6.orig/gcc/doc/install.texi 2010-07-15 11:26:30.000000000 +0200
-+++ gcc-4.4.6/gcc/doc/install.texi 2011-08-29 07:16:21.942182004 +0200
-@@ -2660,6 +2660,10 @@
- @item
- @uref{#iq2000-x-elf,,iq2000-*-elf}
- @item
-+ at uref{#lm32-x-elf,,lm32-*-elf}
-+ at item
-+ at uref{#lm32-x-uclinux,,lm32-*-uclinux}
-+ at item
- @uref{#m32c-x-elf,,m32c-*-elf}
- @item
- @uref{#m32r-x-elf,,m32r-*-elf}
-@@ -3472,6 +3476,20 @@
- @html
- <hr />
- @end html
-+ at heading @anchor{lm32-x-elf}lm32-*-elf
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems.
-+
-+ at html
-+<hr />
-+ at end html
-+ at heading @anchor{lm32-x-uclinux}lm32-*-uclinux
-+Lattice Mico32 processor.
-+This configuration is intended for embedded systems running uClinux.
-+
-+ at html
-+<hr />
-+ at end html
- @heading @anchor{m32c-x-elf}m32c-*-elf
- Renesas M32C processor.
- This configuration is intended for embedded systems.
-diff -Naur gcc-4.4.6.orig/gcc/doc/invoke.texi gcc-4.4.6/gcc/doc/invoke.texi
---- gcc-4.4.6.orig/gcc/doc/invoke.texi 2011-03-23 23:02:12.000000000 +0100
-+++ gcc-4.4.6/gcc/doc/invoke.texi 2011-08-29 07:16:21.948182208 +0200
-@@ -610,6 +610,10 @@
- -mno-sched-prefer-non-control-spec-insns @gol
- -mno-sched-count-spec-in-critical-path}
-
-+ at emph{LM32 Options}
-+ at gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol
-+-msign-extend-enabled -muser-enabled}
-+
- @emph{M32R/D Options}
- @gccoptlist{-m32r2 -m32rx -m32r @gol
- -mdebug @gol
-@@ -8858,6 +8862,7 @@
- * i386 and x86-64 Options::
- * i386 and x86-64 Windows Options::
- * IA-64 Options::
-+* LM32 Options::
- * M32C Options::
- * M32R/D Options::
- * M680x0 Options::
-@@ -11907,6 +11912,35 @@
-
- @end table
-
-+ at node LM32 Options
-+ at subsection LM32 Options
-+ at cindex LM32 options
-+
-+These @option{-m} options are defined for the Lattice Mico32 architecture:
-+
-+ at table @gcctabopt
-+ at item -mbarrel-shift-enabled
-+ at opindex mbarrel-shift-enabled
-+Enable barrel-shift instructions.
-+
-+ at item -mdivide-enabled
-+ at opindex mdivide-enabled
-+Enable divide and modulus instructions.
-+
-+ at item -mmultiply-enabled
-+ at opindex multiply-enabled
-+Enable multiply instructions.
-+
-+ at item -msign-extend-enabled
-+ at opindex msign-extend-enabled
-+Enable sign extend instructions.
-+
-+ at item -muser-enabled
-+ at opindex muser-enabled
-+Enable user-defined instructions.
-+
-+ at end table
-+
- @node M32R/D Options
- @subsection M32R/D Options
- @cindex M32R/D options
-diff -Naur gcc-4.4.6.orig/gcc/toplev.c gcc-4.4.6/gcc/toplev.c
---- gcc-4.4.6.orig/gcc/toplev.c 2010-03-31 04:51:31.000000000 +0200
-+++ gcc-4.4.6/gcc/toplev.c 2011-08-29 07:16:21.949182232 +0200
-@@ -527,7 +527,7 @@
- for floor_log2 and exact_log2; see toplev.h. That construct, however,
- conflicts with the ISO C++ One Definition Rule. */
-
--#if GCC_VERSION < 3004 || !defined (__cplusplus)
-+#if ((GCC_VERSION < 3004) || defined(__clang__)) || !defined (__cplusplus)
-
- /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
- If X is 0, return -1. */
-diff -Naur gcc-4.4.6.orig/gcc/toplev.h gcc-4.4.6/gcc/toplev.h
---- gcc-4.4.6.orig/gcc/toplev.h 2009-02-20 16:20:38.000000000 +0100
-+++ gcc-4.4.6/gcc/toplev.h 2011-08-29 07:16:21.949182232 +0200
-@@ -174,7 +174,7 @@
- extern int floor_log2 (unsigned HOST_WIDE_INT);
-
- /* Inline versions of the above for speed. */
--#if GCC_VERSION >= 3004
-+#if (GCC_VERSION >= 3004) && !defined(__clang__)
- # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- # define CLZ_HWI __builtin_clzl
- # define CTZ_HWI __builtin_ctzl
-diff -Naur gcc-4.4.6.orig/libgcc/ChangeLog.rtems gcc-4.4.6/libgcc/ChangeLog.rtems
---- gcc-4.4.6.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/ChangeLog.rtems 2011-08-29 07:16:21.949182232 +0200
-@@ -0,0 +1,5 @@
-+ Jon Beniston <jon at beniston.com>
-+
-+ * libgcc/config/lm32/t-elf, libgcc/config/lm32/t-uclinux,
-+ libgcc/config/lm32/t-uclinux: New (lm32 port).
-+ * libgcc/config.host: Add lm32* targets.
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-elf gcc-4.4.6/libgcc/config/lm32/t-elf
---- gcc-4.4.6.orig/libgcc/config/lm32/t-elf 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-elf 2011-08-29 07:16:21.950182265 +0200
-@@ -0,0 +1,12 @@
-+# Assemble startup files.
-+
-+$(T)crti.o: $(gcc_srcdir)/config/lm32/crti.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crti.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crti.S
-+
-+$(T)crtn.o: $(gcc_srcdir)/config/lm32/crtn.S $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crtn.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crtn.S
-+
-+CRTSTUFF_T_CFLAGS = -G 0
-+TARGET_LIBGCC2_CFLAGS = -G 0
-diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux gcc-4.4.6/libgcc/config/lm32/t-uclinux
---- gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6/libgcc/config/lm32/t-uclinux 2011-08-29 07:16:21.950182265 +0200
-@@ -0,0 +1,2 @@
-+CRTSTUFF_T_CFLAGS = -fPIC
-+TARGET_LIBGCC2_CFLAGS = -fPIC
-diff -Naur gcc-4.4.6.orig/libgcc/config.host gcc-4.4.6/libgcc/config.host
---- gcc-4.4.6.orig/libgcc/config.host 2009-04-17 13:58:41.000000000 +0200
-+++ gcc-4.4.6/libgcc/config.host 2011-08-29 07:16:21.949182232 +0200
-@@ -95,6 +95,9 @@
- hppa*-*-*)
- cpu_type=pa
- ;;
-+lm32*-*-*)
-+ cpu_type=lm32
-+ ;;
- m32r*-*-*)
- cpu_type=m32r
- ;;
-@@ -355,6 +358,14 @@
- ;;
- iq2000*-*-elf*)
- ;;
-+lm32-*-elf* | lm32-*-rtems*)
-+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-+ tmake_file="lm32/t-elf"
-+ ;;
-+lm32-*-uclinux*)
-+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-+ tmake_file="lm32/t-uclinux"
-+ ;;
- m32r-*-elf*|m32r-*-rtems*)
- ;;
- m32rle-*-elf*)
diff --git a/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff b/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff
deleted file mode 100644
index 005be71..0000000
--- a/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6gcc/cp/cfns.h
---- gcc-4.4.6.orig/gcc/cp/cfns.h 2011-08-29 08:52:31.238300940 +0200
-+++ gcc-4.4.6gcc/cp/cfns.h 2011-08-29 08:53:20.485041120 +0200
-@@ -1,5 +1,5 @@
--/* ANSI-C code produced by gperf version 3.0.1 */
--/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */
-+/* ANSI-C code produced by gperf version 3.0.3 */
-+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
-
- #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-@@ -74,13 +74,13 @@
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 0, 0,
-- 1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
-+ 1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 28, 90, 0,
- 95, 0, 51, 93, 114, 26, 109, 124, 5, 1,
-- 6, 13, 37, 128, 3, 0, 0, 49, 38, 0,
-+ 6, 13, 37, 128, 3, 0, 0, 49, 38, 0,
- 104, 45, 0, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
-@@ -101,29 +101,32 @@
- switch (hval)
- {
- default:
-- hval += asso_values[(unsigned char)str[5]+1];
-+ hval += asso_values[(unsigned char)str[5]+1];
- /*FALLTHROUGH*/
- case 5:
-- hval += asso_values[(unsigned char)str[4]];
-+ hval += asso_values[(unsigned char)str[4]];
- /*FALLTHROUGH*/
- case 4:
-- hval += asso_values[(unsigned char)str[3]];
-+ hval += asso_values[(unsigned char)str[3]];
- /*FALLTHROUGH*/
- case 3:
-- hval += asso_values[(unsigned char)str[2]];
-+ hval += asso_values[(unsigned char)str[2]];
- /*FALLTHROUGH*/
- case 2:
-- hval += asso_values[(unsigned char)str[1]];
-+ hval += asso_values[(unsigned char)str[1]];
- /*FALLTHROUGH*/
- case 1:
-- hval += asso_values[(unsigned char)str[0]];
-- break;
-+ hval += asso_values[(unsigned char)str[0]];
-+ break;
- }
- return hval + asso_values[(unsigned char)str[len - 1]];
- }
-
- #ifdef __GNUC__
- __inline
-+#ifdef __GNUC_STDC_INLINE__
-+__attribute__ ((__gnu_inline__))
-+#endif
- #endif
- const char *
- libc_name_p (register const char *str, register unsigned int len)
-@@ -346,17 +349,17 @@
- register int key = hash (str, len);
-
- if (key <= MAX_HASH_VALUE && key >= 0)
-- {
-- register int index = lookup[key];
-+ {
-+ register int index = lookup[key];
-
-- if (index >= 0)
-- {
-- register const char *s = wordlist[index];
--
-- if (*str == *s && !strcmp (str + 1, s + 1))
-- return s;
-- }
-- }
-+ if (index >= 0)
-+ {
-+ register const char *s = wordlist[index];
-+
-+ if (*str == *s && !strcmp (str + 1, s + 1))
-+ return s;
-+ }
-+ }
- }
- return 0;
- }
-diff -Naur gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems gcc-4.4.6gcc/cp/ChangeLog.rtems
---- gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.4.6gcc/cp/ChangeLog.rtems 2011-08-29 07:14:47.561734025 +0200
-@@ -0,0 +1,5 @@
-+2011-08-29 Ralf Corsépius <ralf.corsepius at rtems.org>
-+ and Eric Norum <wenorum at lbl.gov>
-+
-+ Fix bootstrap breakdowns on OS X 10.7.1 (Lion):
-+ * cfns.h: Regenerate.
diff --git a/contrib/crossrpms/patches/gdb-6.5-bfinrtems-20090122.diff b/contrib/crossrpms/patches/gdb-6.5-bfinrtems-20090122.diff
deleted file mode 100644
index 58253d8..0000000
--- a/contrib/crossrpms/patches/gdb-6.5-bfinrtems-20090122.diff
+++ /dev/null
@@ -1,16252 +0,0 @@
-diff -Naur gdb-6.5.orig/bfd/sysdep.h gdb-6.5/bfd/sysdep.h
---- gdb-6.5.orig/bfd/sysdep.h 2005-05-05 20:51:14.000000000 +0200
-+++ gdb-6.5/bfd/sysdep.h 2009-01-22 08:19:21.000000000 +0100
-@@ -135,7 +135,7 @@
- #endif
-
- #if !HAVE_DECL_STRSTR
--extern char *strstr ();
-+/* extern char *strstr (); */
- #endif
-
- #ifdef HAVE_FTELLO
-diff -Naur gdb-6.5.orig/configure gdb-6.5/configure
---- gdb-6.5.orig/configure 2006-05-02 02:16:50.000000000 +0200
-+++ gdb-6.5/configure 2009-01-22 08:19:21.000000000 +0100
-@@ -3648,7 +3648,7 @@
- # For an installed makeinfo, we require it to be from texinfo 4.4 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
- :
- else
- MAKEINFO="$MISSING makeinfo"
-diff -Naur gdb-6.5.orig/configure.in gdb-6.5/configure.in
---- gdb-6.5.orig/configure.in 2006-06-21 07:16:16.000000000 +0200
-+++ gdb-6.5/configure.in 2009-01-22 08:19:21.000000000 +0100
-@@ -2217,7 +2217,7 @@
- # For an installed makeinfo, we require it to be from texinfo 4.4 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
- :
- else
- MAKEINFO="$MISSING makeinfo"
-diff -Naur gdb-6.5.orig/gdb/bfin-tdep.c gdb-6.5/gdb/bfin-tdep.c
---- gdb-6.5.orig/gdb/bfin-tdep.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/bfin-tdep.c 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,1341 @@
-+/* Target-dependent code for Analog Devices Blackfin processer, for GDB.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+#include "defs.h"
-+#include "frame.h"
-+#include "frame-base.h"
-+#include "frame-unwind.h"
-+#include "dwarf2-frame.h"
-+#include "trad-frame.h"
-+#include "inferior.h"
-+#include "gdbcore.h"
-+#include "dis-asm.h"
-+#include "regcache.h"
-+#include "arch-utils.h"
-+#include "gdb_assert.h"
-+#include "sim-regno.h"
-+#include "bfin-tdep.h"
-+#include "gdb/sim-bfin.h"
-+#include "elf-bfd.h"
-+#include "elf/bfin.h"
-+#include "infcall.h"
-+
-+/* Macros used by prologue functions. */
-+#define P_LINKAGE 0xE800
-+#define P_MINUS_SP1 0x0140
-+#define P_MINUS_SP2 0x05C0
-+#define P_MINUS_SP3 0x0540
-+#define P_MINUS_SP4 0x04C0
-+#define P_SP_PLUS 0x6C06
-+#define P_P2_LOW 0xE10A
-+#define P_P2_HIGH 0XE14A
-+#define P_SP_EQ_SP_PLUS_P2 0X5BB2
-+#define P_SP_EQ_P2_PLUS_SP 0x5B96
-+#define P_MINUS_MINUS_SP_EQ_RETS 0x0167
-+
-+/* Macros used for program flow control. */
-+/* 16 bit instruction, max */
-+#define P_16_BIT_INSR_MAX 0xBFFF
-+/* 32 bit instruction, min */
-+#define P_32_BIT_INSR_MIN 0xC000
-+/* 32 bit instruction, max */
-+#define P_32_BIT_INSR_MAX 0xE801
-+/* jump (preg), 16-bit, min */
-+#define P_JUMP_PREG_MIN 0x0050
-+/* jump (preg), 16-bit, max */
-+#define P_JUMP_PREG_MAX 0x0057
-+/* jump (pc+preg), 16-bit, min */
-+#define P_JUMP_PC_PLUS_PREG_MIN 0x0080
-+/* jump (pc+preg), 16-bit, max */
-+#define P_JUMP_PC_PLUS_PREG_MAX 0x0087
-+/* jump.s pcrel13m2, 16-bit, min */
-+#define P_JUMP_S_MIN 0x2000
-+/* jump.s pcrel13m2, 16-bit, max */
-+#define P_JUMP_S_MAX 0x2FFF
-+/* jump.l pcrel25m2, 32-bit, min */
-+#define P_JUMP_L_MIN 0xE200
-+/* jump.l pcrel25m2, 32-bit, max */
-+#define P_JUMP_L_MAX 0xE2FF
-+/* conditional jump pcrel11m2, 16-bit, min */
-+#define P_IF_CC_JUMP_MIN 0x1800
-+/* conditional jump pcrel11m2, 16-bit, max */
-+#define P_IF_CC_JUMP_MAX 0x1BFF
-+/* conditional jump(bp) pcrel11m2, 16-bit, min */
-+#define P_IF_CC_JUMP_BP_MIN 0x1C00
-+/* conditional jump(bp) pcrel11m2, 16-bit, max */
-+#define P_IF_CC_JUMP_BP_MAX 0x1FFF
-+/* conditional !jump pcrel11m2, 16-bit, min */
-+#define P_IF_NOT_CC_JUMP_MIN 0x1000
-+/* conditional !jump pcrel11m2, 16-bit, max */
-+#define P_IF_NOT_CC_JUMP_MAX 0x13FF
-+/* conditional jump(bp) pcrel11m2, 16-bit, min */
-+#define P_IF_NOT_CC_JUMP_BP_MIN 0x1400
-+/* conditional jump(bp) pcrel11m2, 16-bit, max */
-+#define P_IF_NOT_CC_JUMP_BP_MAX 0x17FF
-+/* call (preg), 16-bit, min */
-+#define P_CALL_PREG_MIN 0x0060
-+/* call (preg), 16-bit, max */
-+#define P_CALL_PREG_MAX 0x0067
-+/* call (pc+preg), 16-bit, min */
-+#define P_CALL_PC_PLUS_PREG_MIN 0x0070
-+/* call (pc+preg), 16-bit, max */
-+#define P_CALL_PC_PLUS_PREG_MAX 0x0077
-+/* call pcrel25m2, 32-bit, min */
-+#define P_CALL_MIN 0xE300
-+/* call pcrel25m2, 32-bit, max */
-+#define P_CALL_MAX 0xE3FF
-+/* RTS */
-+#define P_RTS 0x0010
-+/* MNOP */
-+#define P_MNOP 0xC803
-+/* EXCPT, 16-bit, min */
-+#define P_EXCPT_MIN 0x00A0
-+/* EXCPT, 16-bit, max */
-+#define P_EXCPT_MAX 0x00AF
-+/* multi instruction mask 1, 16-bit */
-+#define P_BIT_MULTI_INS_1 0xC000
-+/* multi instruction mask 2, 16-bit */
-+#define P_BIT_MULTI_INS_2 0x0800
-+
-+/* Macros used for signal handling */
-+/* Instruction 1 for signal */
-+#define P_SIGNAL_INS_1 0x0077E128
-+/* Instruction 1 for rt_signal */
-+#define P_RT_SIGNAL_INS_1 0x00ADE128
-+/* Instruction 2 is common for both signal and rt_signal */
-+#define P_SIGNAL_INS_2 0x000000A0
-+
-+/* The maximum bytes we search to skip the prologue. */
-+#define UPPER_LIMIT 40
-+
-+#define RETS_OFFSET 4
-+
-+/* Initial value: Register names used in BFIN's ISA documentation. */
-+
-+static char *bfin_register_name_strings[] =
-+{
-+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-+ "p0", "p1", "p2", "p3", "p4", "p5", "sp", "fp",
-+ "i0", "i1", "i2", "i3", "m0", "m1", "m2", "m3",
-+ "b0", "b1", "b2", "b3", "l0", "l1", "l2", "l3",
-+ "a0x", "a0w", "a1x", "a1w", "astat", "rets",
-+ "lc0", "lt0", "lb0", "lc1", "lt1", "lb1", "cycles", "cycles2",
-+ "usp", "seqstat", "syscfg", "reti", "retx", "retn", "rete",
-+ "pc", "cc", "extra1", "extra2", "extra3", "fdpic_exec", "fdpic_interp",
-+ "ipend"
-+};
-+
-+
-+#define NUM_BFIN_REGNAMES \
-+ (sizeof (bfin_register_name_strings) / sizeof (char *))
-+
-+
-+/* In this diagram successive memory locations increase downwards or the
-+ stack grows upwards with negative indices. (PUSH analogy for stack.)
-+
-+ The top frame is the "frame" of the current function being executed.
-+
-+ +--------------+ SP -
-+ | local vars | ^
-+ +--------------+ |
-+ | save regs | |
-+ +--------------+ FP |
-+ | old FP -|-- top
-+ +--------------+ | frame
-+ | RETS | | |
-+ +--------------+ | |
-+ | param 1 | | |
-+ | param 2 | | |
-+ | ... | | V
-+ +--------------+ | -
-+ | local vars | | ^
-+ +--------------+ | |
-+ | save regs | | |
-+ +--------------+<- |
-+ | old FP -|-- next
-+ +--------------+ | frame
-+ | RETS | | |
-+ +--------------+ | |
-+ | param 1 | | |
-+ | param 2 | | |
-+ | ... | | V
-+ +--------------+ | -
-+ | local vars | | ^
-+ +--------------+ | |
-+ | save regs | | |
-+ +--------------+<- next frame
-+ | old FP | |
-+ +--------------+ |
-+ | RETS | V
-+ +--------------+ -
-+
-+ The frame chain is formed as following:
-+
-+ FP has the topmost frame.
-+ FP + 4 has the previous FP and so on. */
-+
-+
-+/* Map from DWARF2 register number to GDB register number. */
-+
-+int map_gcc_gdb[] =
-+{
-+ BFIN_R0_REGNUM,
-+ BFIN_R1_REGNUM,
-+ BFIN_R2_REGNUM,
-+ BFIN_R3_REGNUM,
-+ BFIN_R4_REGNUM,
-+ BFIN_R5_REGNUM,
-+ BFIN_R6_REGNUM,
-+ BFIN_R7_REGNUM,
-+ BFIN_P0_REGNUM,
-+ BFIN_P1_REGNUM,
-+ BFIN_P2_REGNUM,
-+ BFIN_P3_REGNUM,
-+ BFIN_P4_REGNUM,
-+ BFIN_P5_REGNUM,
-+ BFIN_SP_REGNUM,
-+ BFIN_FP_REGNUM,
-+ BFIN_I0_REGNUM,
-+ BFIN_I1_REGNUM,
-+ BFIN_I2_REGNUM,
-+ BFIN_I3_REGNUM,
-+ BFIN_B0_REGNUM,
-+ BFIN_B1_REGNUM,
-+ BFIN_B2_REGNUM,
-+ BFIN_B3_REGNUM,
-+ BFIN_L0_REGNUM,
-+ BFIN_L1_REGNUM,
-+ BFIN_L2_REGNUM,
-+ BFIN_L3_REGNUM,
-+ BFIN_M0_REGNUM,
-+ BFIN_M1_REGNUM,
-+ BFIN_M2_REGNUM,
-+ BFIN_M3_REGNUM,
-+ BFIN_A0_DOT_X_REGNUM,
-+ BFIN_A1_DOT_X_REGNUM,
-+ BFIN_CC_REGNUM,
-+ BFIN_RETS_REGNUM,
-+ BFIN_RETI_REGNUM,
-+ BFIN_RETX_REGNUM,
-+ BFIN_RETN_REGNUM,
-+ BFIN_RETE_REGNUM,
-+ BFIN_ASTAT_REGNUM,
-+ BFIN_SEQSTAT_REGNUM,
-+ BFIN_USP_REGNUM,
-+ BFIN_LT0_REGNUM,
-+ BFIN_LT1_REGNUM,
-+ BFIN_LC0_REGNUM,
-+ BFIN_LC1_REGNUM,
-+ BFIN_LB0_REGNUM,
-+ BFIN_LB1_REGNUM
-+};
-+
-+
-+/* Check whether insn1 and insn2 are parts of a signal trampoline. */
-+
-+#define IS_SIGTRAMP(insn1, insn2) \
-+ /* P0=0x77 (X); EXCPT 0x0 */ \
-+ ((insn1 == P_SIGNAL_INS_1) && ((insn2 & P_SIGNAL_INS_2) == P_SIGNAL_INS_2))
-+
-+#define IS_RT_SIGTRAMP(insn1, insn2) \
-+ /* P0=0xad (X); EXCPT 0x0 */ \
-+ ((insn1 == P_RT_SIGNAL_INS_1) && ((insn2 & P_SIGNAL_INS_2) == P_SIGNAL_INS_2))
-+
-+#define SIGCONTEXT_OFFSET 28
-+#define UCONTEXT_OFFSET 172
-+
-+
-+/* From <asm/sigcontext.h>. */
-+
-+static int bfin_linux_sigcontext_reg_offset[BFIN_NUM_REGS] =
-+{
-+ 2 * 4, /* %r0 */
-+ 3 * 4, /* %r1 */
-+ 4 * 4, /* %r2 */
-+ 5 * 4, /* %r3 */
-+ 6 * 4, /* %r4 */
-+ -1, /* %r5 */
-+ -1, /* %r6 */
-+ -1, /* %r7 */
-+ 7 * 4, /* %p0 */
-+ 8 * 4, /* %p1 */
-+ 9 * 4, /* %p2 */
-+ 10 * 4, /* %p3 */
-+ -1, /* %p4 */
-+ -1, /* %p5 */
-+ 1 * 4, /* %sp */
-+ -1, /* %fp */
-+ 11 * 4, /* %i0 */
-+ 12 * 4, /* %i1 */
-+ 13 * 4, /* %i2 */
-+ 14 * 4, /* %i3 */
-+ 15 * 4, /* %m0 */
-+ 16 * 4, /* %m1 */
-+ 17 * 4, /* %m2 */
-+ 18 * 4, /* %m3 */
-+ 23 * 4, /* %b0 */
-+ 24 * 4, /* %b1 */
-+ 25 * 4, /* %b2 */
-+ 26 * 4, /* %b3 */
-+ 19 * 4, /* %l0 */
-+ 20 * 4, /* %l1 */
-+ 21 * 4, /* %l2 */
-+ 22 * 4, /* %l3 */
-+ 27 * 4, /* %a0x */
-+ 28 * 4, /* %a0w */
-+ 29 * 4, /* %a1x */
-+ 30 * 4, /* %a1w */
-+ 31 * 4, /* %astat */
-+ 32 * 4, /* %rets */
-+ 33 * 4, /* %lc0 */
-+ 35 * 4, /* %lt0 */
-+ 37 * 4, /* %lb0 */
-+ 34 * 4, /* %lc1 */
-+ 36 * 4, /* %lt1 */
-+ 38 * 4, /* %lb1 */
-+ -1, /* %cycles */
-+ -1, /* %cycles2 */
-+ -1, /* %usp */
-+ 39 * 4, /* %seqstat */
-+ -1, /* syscfg */
-+ 40 * 4, /* %reti */
-+ 41 * 4, /* %retx */
-+ -1, /* %retn */
-+ -1, /* %rete */
-+ 40 * 4, /* %pc */
-+ -1, /* %cc */
-+ -1, /* %extra1 */
-+ -1, /* %extra2 */
-+ -1, /* %extra3 */
-+ -1 /* %ipend */
-+};
-+
-+
-+/* From <asm/ucontext.h>. */
-+
-+static int bfin_linux_ucontext_reg_offset[BFIN_NUM_REGS] =
-+{
-+ 1 * 4, /* %r0 */
-+ 2 * 4, /* %r1 */
-+ 3 * 4, /* %r2 */
-+ 4 * 4, /* %r3 */
-+ 5 * 4, /* %r4 */
-+ 6 * 4, /* %r5 */
-+ 7 * 4, /* %r6 */
-+ 8 * 4, /* %r7 */
-+ 9 * 4, /* %p0 */
-+ 10 * 4, /* %p1 */
-+ 11 * 4, /* %p2 */
-+ 12 * 4, /* %p3 */
-+ 13 * 4, /* %p4 */
-+ 14 * 4, /* %p5 */
-+ 15 * 4, /* %sp */
-+ 24 * 4, /* %fp */
-+ 25 * 4, /* %i0 */
-+ 26 * 4, /* %i1 */
-+ 27 * 4, /* %i2 */
-+ 28 * 4, /* %i3 */
-+ 29 * 4, /* %m0 */
-+ 30 * 4, /* %m1 */
-+ 31 * 4, /* %m2 */
-+ 32 * 4, /* %m3 */
-+ 37 * 4, /* %b0 */
-+ 38 * 4, /* %b1 */
-+ 39 * 4, /* %b2 */
-+ 40 * 4, /* %b3 */
-+ 33 * 4, /* %l0 */
-+ 34 * 4, /* %l1 */
-+ 35 * 4, /* %l2 */
-+ 36 * 4, /* %l3 */
-+ 18 * 4, /* %a0x */
-+ 16 * 4, /* %a0w */
-+ 19 * 4, /* %a1x */
-+ 17 * 4, /* %a1w */
-+ 20 * 4, /* %astat */
-+ 21 * 4, /* %rets */
-+ 41 * 4, /* %lc0 */
-+ 43 * 4, /* %lt0 */
-+ 45 * 4, /* %lb0 */
-+ 42 * 4, /* %lc1 */
-+ 44 * 4, /* %lt1 */
-+ 46 * 4, /* %lb1 */
-+ -1, /* %cycles */
-+ -1, /* %cycles2 */
-+ -1, /* %usp */
-+ 47 * 4, /* %seqstat */
-+ -1, /* syscfg */
-+ 22 * 4, /* %reti */
-+ 23 * 4, /* %retx */
-+ -1, /* %retn */
-+ -1, /* %rete */
-+ 22 * 4, /* %pc */
-+ -1, /* %cc */
-+ -1, /* %extra1 */
-+ -1, /* %extra2 */
-+ -1, /* %extra3 */
-+ -1 /* %ipend */
-+};
-+
-+/* Get info about saved registers in sigtramp. */
-+
-+struct bfin_linux_sigtramp_info
-+{
-+ /* Address of context. */
-+ CORE_ADDR context_addr;
-+
-+ /* Offset of registers in `struct sigcontext'. */
-+ int *sc_reg_offset;
-+};
-+
-+static enum bfin_abi
-+bfin_abi (struct gdbarch *gdbarch)
-+{
-+ return gdbarch_tdep (gdbarch)->bfin_abi;
-+}
-+
-+/* Return non-zero if PC points into the signal trampoline. For the
-+ sake of bfin_linux_get_sigtramp_info. */
-+
-+static int
-+bfin_linux_pc_in_sigtramp (struct frame_info *next_frame, CORE_ADDR pc)
-+{
-+ gdb_byte buf[12];
-+ unsigned long insn0, insn1, insn2;
-+
-+ if (pc < 4
-+ || pc >= (CORE_ADDR) 0x7ffffff8
-+ || !safe_frame_unwind_memory (next_frame, pc - 4, buf, sizeof (buf)))
-+ return 0;
-+
-+ insn1 = extract_unsigned_integer (buf + 4, 4);
-+ insn2 = extract_unsigned_integer (buf + 8, 4);
-+
-+ if (IS_SIGTRAMP (insn1, insn2))
-+ return 1;
-+
-+ if (IS_RT_SIGTRAMP (insn1, insn2))
-+ return 2;
-+
-+ insn0 = extract_unsigned_integer (buf, 4);
-+ if (IS_SIGTRAMP (insn0, insn1))
-+ return 1;
-+
-+ if (IS_RT_SIGTRAMP (insn0, insn1))
-+ return 2;
-+
-+ insn0 = ((insn0 << 16) & 0xffffffff) | (insn1 >> 16);
-+ insn1 = ((insn1 << 16) & 0xffffffff) | (insn2 >> 16);
-+
-+ if (IS_SIGTRAMP (insn0, insn1))
-+ return 1;
-+
-+ if (IS_RT_SIGTRAMP (insn0, insn1))
-+ return 2;
-+
-+ return 0;
-+}
-+
-+static struct bfin_linux_sigtramp_info
-+bfin_linux_get_sigtramp_info (struct frame_info *next_frame)
-+{
-+ CORE_ADDR sp;
-+ int ret;
-+ struct bfin_linux_sigtramp_info info;
-+
-+ sp = frame_unwind_register_unsigned (next_frame, BFIN_SP_REGNUM);
-+ ret = bfin_linux_pc_in_sigtramp (next_frame, frame_pc_unwind (next_frame));
-+
-+ if (ret == 1)
-+ {
-+ /* Get sigcontext address. */
-+ info.context_addr = sp + SIGCONTEXT_OFFSET;
-+ info.sc_reg_offset = bfin_linux_sigcontext_reg_offset;
-+ }
-+ else if (ret == 2)
-+ {
-+ /* Get ucontext address. */
-+ info.context_addr = sp + UCONTEXT_OFFSET;
-+ info.sc_reg_offset = bfin_linux_ucontext_reg_offset;
-+ }
-+ else
-+ internal_error (__FILE__, __LINE__, _("not a sigtramp\n"));
-+
-+ return info;
-+}
-+
-+/* Signal trampolines. */
-+
-+static struct trad_frame_cache *
-+bfin_linux_sigtramp_frame_cache (struct frame_info *next_frame,
-+ void **this_cache)
-+{
-+ struct frame_id this_id;
-+ struct trad_frame_cache *cache;
-+ struct bfin_linux_sigtramp_info info;
-+ CORE_ADDR sp;
-+ int i;
-+
-+ if (*this_cache)
-+ return *this_cache;
-+
-+ cache = trad_frame_cache_zalloc (next_frame);
-+
-+ /* The frame ID's code address should be the start-address of the
-+ signal trampoline and not the current PC within that trampoline. */
-+ sp = frame_unwind_register_unsigned (next_frame, BFIN_SP_REGNUM);
-+
-+ /* This would come after the LINK instruction in the ret_from_signal ()
-+ function, hence the frame id would be SP + 8. */
-+ this_id = frame_id_build (sp + 8, frame_pc_unwind (next_frame));
-+ trad_frame_set_id (cache, this_id);
-+
-+ info = bfin_linux_get_sigtramp_info (next_frame);
-+
-+ for (i = 0; i < BFIN_NUM_REGS; i++)
-+ if (info.sc_reg_offset[i] != -1)
-+ trad_frame_set_reg_addr (cache, i,
-+ info.context_addr + info.sc_reg_offset[i]);
-+
-+ *this_cache = cache;
-+ return cache;
-+}
-+
-+static void
-+bfin_linux_sigtramp_frame_this_id (struct frame_info *next_frame,
-+ void **this_cache,
-+ struct frame_id *this_id)
-+{
-+ struct trad_frame_cache *cache;
-+
-+ cache = bfin_linux_sigtramp_frame_cache (next_frame, this_cache);
-+ trad_frame_get_id (cache, this_id);
-+}
-+
-+static void
-+bfin_linux_sigtramp_frame_prev_register (struct frame_info *next_frame,
-+ void **this_cache,
-+ int regnum,
-+ int *optimizedp,
-+ enum lval_type *lvalp,
-+ CORE_ADDR *addrp,
-+ int *realnump,
-+ gdb_byte *valuep)
-+{
-+ struct trad_frame_cache *cache;
-+
-+ cache = bfin_linux_sigtramp_frame_cache (next_frame, this_cache);
-+ trad_frame_get_register (cache, next_frame, regnum, optimizedp, lvalp,
-+ addrp, realnump, valuep);
-+}
-+
-+static const struct frame_unwind bfin_linux_sigtramp_frame_unwind =
-+{
-+ SIGTRAMP_FRAME,
-+ bfin_linux_sigtramp_frame_this_id,
-+ bfin_linux_sigtramp_frame_prev_register
-+};
-+
-+static const struct frame_unwind *
-+bfin_linux_sigtramp_frame_sniffer (struct frame_info *next_frame)
-+{
-+ CORE_ADDR pc = frame_pc_unwind (next_frame);
-+
-+ if (bfin_linux_pc_in_sigtramp (next_frame, pc))
-+ return &bfin_linux_sigtramp_frame_unwind;
-+
-+ return NULL;
-+}
-+
-+struct bfin_frame_cache
-+{
-+ /* Base address. */
-+ CORE_ADDR base;
-+ CORE_ADDR sp_offset;
-+ CORE_ADDR pc;
-+ int frameless_pc_value;
-+
-+ /* Saved registers. */
-+ CORE_ADDR saved_regs[BFIN_NUM_REGS];
-+ CORE_ADDR saved_sp;
-+
-+ /* Stack space reserved for local variables. */
-+ long locals;
-+};
-+
-+/* Allocate and initialize a frame cache. */
-+
-+static struct bfin_frame_cache *
-+bfin_alloc_frame_cache (void)
-+{
-+ struct bfin_frame_cache *cache;
-+ int i;
-+
-+ cache = FRAME_OBSTACK_ZALLOC (struct bfin_frame_cache);
-+
-+ /* Base address. */
-+ cache->base = 0;
-+ cache->sp_offset = -4;
-+ cache->pc = 0;
-+ cache->frameless_pc_value = 0;
-+
-+ /* Saved registers. We initialize these to -1 since zero is a valid
-+ offset (that's where fp is supposed to be stored). */
-+ for (i = 0; i < BFIN_NUM_REGS; i++)
-+ cache->saved_regs[i] = -1;
-+
-+ /* Frameless until proven otherwise. */
-+ cache->locals = -1;
-+
-+ return cache;
-+}
-+
-+static struct bfin_frame_cache *
-+bfin_frame_cache (struct frame_info *next_frame, void **this_cache)
-+{
-+ struct bfin_frame_cache *cache;
-+ int i;
-+
-+ if (*this_cache)
-+ return *this_cache;
-+
-+ cache = bfin_alloc_frame_cache ();
-+ *this_cache = cache;
-+
-+ cache->base = frame_unwind_register_unsigned (next_frame, BFIN_FP_REGNUM);
-+ if (cache->base == 0)
-+ return cache;
-+
-+ /* For normal frames, PC is stored at [FP + 4]. */
-+ cache->saved_regs[BFIN_PC_REGNUM] = 4;
-+ cache->saved_regs[BFIN_FP_REGNUM] = 0;
-+
-+ /* Adjust all the saved registers such that they contain addresses
-+ instead of offsets. */
-+ for (i = 0; i < BFIN_NUM_REGS; i++)
-+ if (cache->saved_regs[i] != -1)
-+ cache->saved_regs[i] += cache->base;
-+
-+ cache->pc = frame_func_unwind (next_frame) ;
-+ if (cache->pc == 0 || cache->pc == frame_pc_unwind (next_frame))
-+ {
-+ /* Either there is no prologue (frameless function) or we are at
-+ the start of a function. In short we do not have a frame.
-+ PC is stored in rets register. FP points to previous frame. */
-+
-+ cache->saved_regs[BFIN_PC_REGNUM] = read_register (BFIN_RETS_REGNUM);
-+ cache->frameless_pc_value = 1;
-+ cache->base = frame_unwind_register_unsigned (next_frame, BFIN_FP_REGNUM);
-+#ifdef _DEBUG
-+ fprintf (stderr, "frameless pc case base %x\n", cache->base);
-+#endif
-+ cache->saved_regs[BFIN_FP_REGNUM] = cache->base;
-+ cache->saved_sp = cache->base;
-+ }
-+ else
-+ {
-+ cache->frameless_pc_value = 0;
-+
-+ /* Now that we have the base address for the stack frame we can
-+ calculate the value of SP in the calling frame. */
-+ cache->saved_sp = cache->base + 8;
-+ }
-+
-+ return cache;
-+}
-+
-+static void
-+bfin_frame_this_id (struct frame_info *next_frame,
-+ void **this_cache,
-+ struct frame_id *this_id)
-+{
-+ struct bfin_frame_cache *cache = bfin_frame_cache (next_frame, this_cache);
-+
-+ /* This marks the outermost frame. */
-+ if (cache->base == 0)
-+ return;
-+
-+ /* See the end of bfin_push_dummy_call. */
-+ *this_id = frame_id_build (cache->base + 8, cache->pc);
-+}
-+
-+static void
-+bfin_frame_prev_register (struct frame_info *next_frame,
-+ void **this_cache,
-+ int regnum,
-+ int *optimizedp,
-+ enum lval_type *lvalp,
-+ CORE_ADDR *addrp,
-+ int *realnump,
-+ gdb_byte *valuep)
-+{
-+ struct bfin_frame_cache *cache = bfin_frame_cache (next_frame, this_cache);
-+
-+ gdb_assert (regnum >= 0);
-+
-+ if (regnum == BFIN_SP_REGNUM && cache->saved_sp)
-+ {
-+ *optimizedp = 0;
-+ *lvalp = not_lval;
-+ *addrp = 0;
-+ *realnump = -1;
-+
-+ if (valuep)
-+ {
-+ /* Store the value. */
-+ store_unsigned_integer (valuep, 4, cache->saved_sp);
-+ }
-+
-+ return;
-+ }
-+
-+ if (regnum < BFIN_NUM_REGS && cache->saved_regs[regnum] != -1)
-+ {
-+ *optimizedp = 0;
-+ *lvalp = lval_memory;
-+ *addrp = cache->saved_regs[regnum];
-+ *realnump = -1;
-+
-+ if (valuep)
-+ {
-+ /* Read the value in from memory. */
-+
-+ if (regnum == BFIN_PC_REGNUM)
-+ {
-+ int *pi = (int *) valuep;
-+
-+ if (cache->frameless_pc_value)
-+ {
-+ /* Blackfin stores the value of the return pc on
-+ a register not a stack. A LINK command will
-+ save it on the stack. */
-+ store_unsigned_integer (valuep, 4, *addrp);
-+ }
-+ else
-+ store_unsigned_integer (valuep, 4,
-+ read_memory_unsigned_integer (*addrp, 4));
-+ }
-+ else if (regnum == BFIN_FP_REGNUM)
-+ {
-+ int *pi = (int *) valuep;
-+
-+ if (cache->frameless_pc_value)
-+ {
-+ /* Blackfin stores the value of the return pc on
-+ a register not a stack. A LINK command will
-+ save it on the stack. */
-+#ifdef _DEBUG
-+ fprintf (stderr, "returning frameless %x\n", *addrp);
-+#endif
-+ store_unsigned_integer (valuep, 4, *addrp);
-+ }
-+ else
-+ store_unsigned_integer (valuep, 4,
-+ read_memory_unsigned_integer (*addrp, 4));
-+ }
-+ else
-+ read_memory (*addrp, valuep,
-+ register_size (current_gdbarch, regnum));
-+ }
-+ return;
-+ }
-+
-+ frame_register_unwind (next_frame, regnum,
-+ optimizedp, lvalp, addrp, realnump, valuep);
-+}
-+
-+CORE_ADDR
-+bfin_frame_chain (struct frame_info *frame_ptr)
-+{
-+ return read_memory_unsigned_integer (get_frame_base (frame_ptr), 4);
-+}
-+
-+static const struct frame_unwind bfin_frame_unwind =
-+{
-+ NORMAL_FRAME,
-+ bfin_frame_this_id,
-+ bfin_frame_prev_register
-+};
-+
-+static const struct frame_unwind *
-+bfin_frame_sniffer (struct frame_info *next_frame)
-+{
-+ return &bfin_frame_unwind;
-+}
-+
-+/* The following functions are for function prologue length calculations. */
-+
-+static int
-+is_minus_minus_sp (int op)
-+{
-+ op &= 0xFFC0;
-+
-+ if ((op == P_MINUS_SP1) || (op == P_MINUS_SP2)
-+ || (op == P_MINUS_SP3) || (op == P_MINUS_SP4))
-+ return 1;
-+
-+ return 0;
-+}
-+
-+CORE_ADDR
-+bfin_skip_prologue (CORE_ADDR pc)
-+{
-+ int op = read_memory_unsigned_integer (pc, 2);
-+ CORE_ADDR orig_pc = pc;
-+ int done = 0;
-+
-+ /* The new gcc prologue generates the register saves BEFORE the link
-+ or RETS saving instruction.
-+ So, our job is to stop either at those instructions or some upper
-+ limit saying there is no frame! */
-+
-+ while (!done)
-+ {
-+ if (is_minus_minus_sp (op))
-+ {
-+ while (is_minus_minus_sp (op))
-+ {
-+ pc += 2;
-+ op = read_memory_unsigned_integer (pc, 2);
-+ }
-+
-+ if (op == P_LINKAGE)
-+ pc += 4;
-+
-+ done = 1;
-+ }
-+ else if (op == P_LINKAGE)
-+ {
-+ pc += 4;
-+ done = 1;
-+ }
-+ else if (op == P_MINUS_MINUS_SP_EQ_RETS)
-+ {
-+ pc += 2;
-+ done = 1;
-+ }
-+ else if (op == P_RTS)
-+ {
-+ done = 1;
-+ }
-+ else if ((op >= P_JUMP_PREG_MIN && op <= P_JUMP_PREG_MAX)
-+ || (op >= P_JUMP_PC_PLUS_PREG_MIN
-+ && op <= P_JUMP_PC_PLUS_PREG_MAX)
-+ || (op == P_JUMP_S_MIN && op <= P_JUMP_S_MAX))
-+ {
-+ done = 1;
-+ }
-+ else if (pc - orig_pc >= UPPER_LIMIT)
-+ {
-+ fprintf (stderr, "Function Prologue not recognised. pc will point to ENTRY_POINT of the function\n");
-+ pc = orig_pc + 2;
-+ done = 1;
-+ }
-+ else
-+ {
-+ pc += 2; /* Not a terminating instruction go on. */
-+ op = read_memory_unsigned_integer (pc, 2);
-+ }
-+ }
-+
-+ /* TODO:
-+ Dwarf2 uses entry point value AFTER some register initializations.
-+ We should perhaps skip such asssignments as well (R6 = R1, ...). */
-+
-+ return pc;
-+}
-+
-+/* Return the GDB type object for the "standard" data type of data in
-+ register N. This should be void pointer for P0-P5, SP, FP;
-+ void pointer to function for PC; int otherwise. */
-+
-+static struct type *
-+bfin_register_type (struct gdbarch *gdbarch, int regnum)
-+{
-+ if ((regnum >= BFIN_P0_REGNUM && regnum <= BFIN_FP_REGNUM)
-+ || regnum == BFIN_USP_REGNUM)
-+ return builtin_type_void_data_ptr;
-+
-+ if (regnum == BFIN_PC_REGNUM || regnum == BFIN_RETS_REGNUM)
-+ return builtin_type_void_func_ptr;
-+
-+ return builtin_type_int32;
-+}
-+
-+/* Return the saved PC from this frame.
-+ Assumes LINK is used in every function. */
-+
-+CORE_ADDR
-+bfin_frame_saved_pc (struct frame_info *frame)
-+{
-+ return read_memory_unsigned_integer (get_frame_base (frame) + RETS_OFFSET, 4);
-+}
-+
-+static CORE_ADDR
-+find_func_descr (struct gdbarch *gdbarch, CORE_ADDR entry_point)
-+{
-+ CORE_ADDR descr;
-+ char valbuf[4];
-+
-+ descr = bfin_fdpic_find_canonical_descriptor (entry_point);
-+
-+ if (descr != 0)
-+ return descr;
-+
-+ /* Construct a non-canonical descriptor from space allocated on
-+ the stack. */
-+
-+ descr = value_as_long (value_allocate_space_in_inferior (8));
-+ store_unsigned_integer (valbuf, 4, entry_point);
-+ write_memory (descr, valbuf, 4);
-+ store_unsigned_integer (valbuf, 4,
-+ bfin_fdpic_find_global_pointer (entry_point));
-+ write_memory (descr + 4, valbuf, 4);
-+ return descr;
-+}
-+
-+static CORE_ADDR
-+bfin_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
-+ struct target_ops *targ)
-+{
-+ CORE_ADDR entry_point;
-+ CORE_ADDR got_address;
-+
-+ entry_point = get_target_memory_unsigned (targ, addr, 4);
-+ got_address = get_target_memory_unsigned (targ, addr + 4, 4);
-+
-+ if (got_address == bfin_fdpic_find_global_pointer (entry_point))
-+ return entry_point;
-+ else
-+ return addr;
-+}
-+
-+/* We currently only support passing parameters in integer registers. This
-+ conforms with GCC's default model. Several other variants exist and
-+ we should probably support some of them based on the selected ABI. */
-+
-+static CORE_ADDR
-+bfin_push_dummy_call (struct gdbarch *gdbarch,
-+ struct value * function,
-+ struct regcache *regcache,
-+ CORE_ADDR bp_addr,
-+ int nargs,
-+ struct value **args,
-+ CORE_ADDR sp,
-+ int struct_return,
-+ CORE_ADDR struct_addr)
-+{
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-+ char buf[4];
-+ int i;
-+ long reg_r0, reg_r1, reg_r2;
-+ int total_len = 0;
-+ enum bfin_abi abi = bfin_abi (gdbarch);
-+ CORE_ADDR func_addr = find_function_addr (function, NULL);
-+
-+ for (i = nargs - 1; i >= 0; i--)
-+ {
-+ struct type *value_type = value_enclosing_type (args[i]);
-+ int len = TYPE_LENGTH (value_type);
-+ total_len += (len + 3) & ~3;
-+ }
-+
-+ /* At least twelve bytes of stack space must be allocated for the function's
-+ arguments, even for functions that have less than 12 bytes of argument
-+ data. */
-+
-+ if (total_len < 12)
-+ sp -= 12 - total_len;
-+
-+ /* Push arguments in reverse order. */
-+
-+ for (i = nargs - 1; i >= 0; i--)
-+ {
-+ struct type *value_type = value_enclosing_type (args[i]);
-+ struct type *arg_type = check_typedef (value_type);
-+ int len = TYPE_LENGTH (value_type);
-+ int container_len = (len + 3) & ~3;
-+ sp -= container_len;
-+
-+ if (abi == BFIN_ABI_FDPIC
-+ && len == 4
-+ && TYPE_CODE (arg_type) == TYPE_CODE_PTR
-+ && TYPE_CODE (TYPE_TARGET_TYPE (arg_type)) == TYPE_CODE_FUNC)
-+ {
-+ CORE_ADDR descr;
-+
-+ /* The FDPIC ABI requires function descriptors to be passed instead
-+ of entry points. */
-+ descr = extract_unsigned_integer (value_contents (args[i]), 4);
-+ descr = find_func_descr (gdbarch, descr);
-+ write_memory_unsigned_integer (sp, 4, descr);
-+ }
-+ else
-+ write_memory (sp, value_contents_writeable (args[i]), container_len);
-+ }
-+
-+ /* initialize R0, R1 and R2 to the first 3 words of paramters */
-+
-+ reg_r0 = read_memory_integer (sp, 4);
-+ regcache_cooked_write_unsigned (regcache, BFIN_R0_REGNUM, reg_r0);
-+ reg_r1 = read_memory_integer (sp + 4, 4);
-+ regcache_cooked_write_unsigned (regcache, BFIN_R1_REGNUM, reg_r1);
-+ reg_r2 = read_memory_integer (sp + 8, 4);
-+ regcache_cooked_write_unsigned (regcache, BFIN_R2_REGNUM, reg_r2);
-+
-+ /* Store struct value address. */
-+
-+ if (struct_return)
-+ regcache_cooked_write_unsigned (regcache, BFIN_P0_REGNUM, struct_addr);
-+
-+ /* Set the dummy return value to bp_addr.
-+ A dummy breakpoint will be setup to execute the call. */
-+
-+ regcache_cooked_write_unsigned (regcache, BFIN_RETS_REGNUM, bp_addr);
-+
-+ /* Finally, update the stack pointer. */
-+
-+ regcache_cooked_write_unsigned (regcache, BFIN_SP_REGNUM, sp);
-+
-+ return sp;
-+}
-+
-+/* Convert DWARF2 register number REG to the appropriate register number
-+ used by GDB. */
-+
-+static int
-+bfin_reg_to_regnum (int reg)
-+{
-+ if (reg > sizeof (map_gcc_gdb) / sizeof (int))
-+ return 0;
-+
-+ return map_gcc_gdb[reg];
-+}
-+
-+static int
-+gdb_print_insn_bfin (bfd_vma memaddr, disassemble_info *info)
-+{
-+ return print_insn_bfin (memaddr, info);
-+}
-+
-+/* This function implements the BREAKPOINT_FROM_PC macro. It returns
-+ a pointer to a string of bytes that encode a breakpoint instruction,
-+ stores the length of the string to *lenptr, and adjusts the program
-+ counter (if necessary) to point to the actual memory location where
-+ the breakpoint should be inserted. */
-+
-+const unsigned char *
-+bfin_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
-+{
-+ static unsigned char bfin_breakpoint[] = {0xa1, 0x00};
-+ *lenptr = sizeof (bfin_breakpoint);
-+ return bfin_breakpoint;
-+}
-+
-+static void
-+bfin_extract_return_value (struct type *type,
-+ struct regcache *regs,
-+ gdb_byte *dst)
-+{
-+ bfd_byte *valbuf = dst;
-+ int len = TYPE_LENGTH (type);
-+ ULONGEST tmp;
-+ int regno = BFIN_R0_REGNUM;
-+
-+ gdb_assert (len <= 8);
-+
-+ while (len > 0)
-+ {
-+ regcache_cooked_read_unsigned (regs, regno++, &tmp);
-+ store_unsigned_integer (valbuf, (len > 4 ? 4 : len), tmp);
-+ len -= 4;
-+ valbuf += 4;
-+ }
-+}
-+
-+/* Write into appropriate registers a function return value of type
-+ TYPE, given in virtual format. */
-+
-+static void
-+bfin_store_return_value (struct type *type,
-+ struct regcache *regs,
-+ const gdb_byte *src)
-+{
-+ const bfd_byte *valbuf = src;
-+
-+ /* Integral values greater than one word are stored in consecutive
-+ registers starting with R0. This will always be a multiple of
-+ the register size. */
-+
-+ int len = TYPE_LENGTH (type);
-+ int regno = BFIN_R0_REGNUM;
-+
-+ gdb_assert (len <= 8);
-+
-+ while (len > 0)
-+ {
-+ regcache_cooked_write (regs, regno++, valbuf);
-+ len -= 4;
-+ valbuf += 4;
-+ }
-+}
-+
-+/* Determine, for architecture GDBARCH, how a return value of TYPE
-+ should be returned. If it is supposed to be returned in registers,
-+ and READBUF is non-zero, read the appropriate value from REGCACHE,
-+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
-+ from WRITEBUF into REGCACHE. */
-+
-+static enum return_value_convention
-+bfin_return_value (struct gdbarch *gdbarch,
-+ struct type *type,
-+ struct regcache *regcache,
-+ gdb_byte *readbuf,
-+ const gdb_byte *writebuf)
-+{
-+ if (TYPE_LENGTH (type) > 8)
-+ return RETURN_VALUE_STRUCT_CONVENTION;
-+
-+ if (readbuf)
-+ bfin_extract_return_value (type, regcache, readbuf);
-+
-+ if (writebuf)
-+ bfin_store_return_value (type, regcache, writebuf);
-+
-+ return RETURN_VALUE_REGISTER_CONVENTION;
-+}
-+
-+/* Return the BFIN register name corresponding to register I. */
-+
-+static const char *
-+bfin_register_name (int i)
-+{
-+ return bfin_register_name_strings[i];
-+}
-+
-+static CORE_ADDR
-+bfin_frame_base_address (struct frame_info *next_frame, void **this_cache)
-+{
-+ struct bfin_frame_cache *cache = bfin_frame_cache (next_frame, this_cache);
-+
-+ return cache->base;
-+}
-+
-+static CORE_ADDR
-+bfin_frame_local_address (struct frame_info *next_frame, void **this_cache)
-+{
-+ struct bfin_frame_cache *cache = bfin_frame_cache (next_frame, this_cache);
-+
-+ return cache->base - 4;
-+}
-+
-+static CORE_ADDR
-+bfin_frame_args_address (struct frame_info *next_frame, void **this_cache)
-+{
-+ struct bfin_frame_cache *cache = bfin_frame_cache (next_frame, this_cache);
-+
-+ return cache->base + 8;
-+}
-+
-+static const struct frame_base bfin_frame_base =
-+{
-+ &bfin_frame_unwind,
-+ bfin_frame_base_address,
-+ bfin_frame_local_address,
-+ bfin_frame_args_address
-+};
-+
-+static struct frame_id
-+bfin_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
-+{
-+ CORE_ADDR sp;
-+
-+ sp = frame_unwind_register_unsigned (next_frame, BFIN_SP_REGNUM);
-+
-+ return frame_id_build (sp, frame_pc_unwind (next_frame));
-+}
-+
-+static CORE_ADDR
-+bfin_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-+{
-+ return frame_unwind_register_unsigned (next_frame, PC_REGNUM);
-+}
-+
-+static int
-+bfin_sim_regno (int regno)
-+{
-+ switch (regno)
-+ {
-+ case SIM_BFIN_ASTAT_REGNUM:
-+ case SIM_BFIN_CYCLES_REGNUM:
-+ case SIM_BFIN_CYCLES2_REGNUM:
-+ case SIM_BFIN_USP_REGNUM:
-+ case SIM_BFIN_SEQSTAT_REGNUM:
-+ case SIM_BFIN_SYSCFG_REGNUM:
-+ case SIM_BFIN_RETI_REGNUM:
-+ case SIM_BFIN_RETX_REGNUM:
-+ case SIM_BFIN_RETN_REGNUM:
-+ case SIM_BFIN_RETE_REGNUM:
-+ case SIM_BFIN_EXTRA1:
-+ case SIM_BFIN_EXTRA2:
-+ case SIM_BFIN_EXTRA3:
-+ case SIM_BFIN_IPEND_REGNUM:
-+ return SIM_REGNO_DOES_NOT_EXIST;
-+ default:
-+ return regno;
-+ }
-+}
-+
-+CORE_ADDR
-+bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
-+{
-+ return (address & ~0x3);
-+}
-+
-+/* Fetch the interpreter and executable loadmap addresses (for shared
-+ library support) for the FDPIC ABI. Return 0 if successful, -1 if
-+ not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
-+int
-+bfin_fdpic_loadmap_addresses (struct gdbarch *gdbarch, CORE_ADDR *interp_addr,
-+ CORE_ADDR *exec_addr)
-+{
-+ if (bfin_abi (gdbarch) != BFIN_ABI_FDPIC)
-+ return -1;
-+ else
-+ {
-+ if (interp_addr != NULL)
-+ {
-+ ULONGEST val;
-+ regcache_cooked_read_unsigned (current_regcache,
-+ BFIN_FDPIC_INTERP_REGNUM, &val);
-+ *interp_addr = val;
-+ }
-+ if (exec_addr != NULL)
-+ {
-+ ULONGEST val;
-+ regcache_cooked_read_unsigned (current_regcache,
-+ BFIN_FDPIC_EXEC_REGNUM, &val);
-+ *exec_addr = val;
-+ }
-+ return 0;
-+ }
-+}
-+
-+/* Initialize the current architecture based on INFO. If possible,
-+ re-use an architecture from ARCHES, which is a list of
-+ architectures already created during this debugging session.
-+
-+ Called e.g. at program startup, when reading a core file, and when
-+ reading a binary file. */
-+
-+static struct gdbarch *
-+bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
-+{
-+ struct gdbarch_tdep *tdep;
-+ struct gdbarch *gdbarch;
-+ int elf_flags;
-+ enum bfin_abi abi;
-+
-+ /* Extract the ELF flags, if available. */
-+ if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
-+ elf_flags = elf_elfheader (info.abfd)->e_flags;
-+ else
-+ elf_flags = 0;
-+
-+ if (elf_flags & EF_BFIN_FDPIC)
-+ abi = BFIN_ABI_FDPIC;
-+ else
-+ abi = BFIN_ABI_FLAT;
-+
-+ /* If there is already a candidate, use it. */
-+
-+ for (arches = gdbarch_list_lookup_by_info (arches, &info);
-+ arches != NULL;
-+ arches = gdbarch_list_lookup_by_info (arches->next, &info))
-+ {
-+ if (gdbarch_tdep (arches->gdbarch)->bfin_abi != abi)
-+ continue;
-+ return arches->gdbarch;
-+ }
-+
-+ tdep = XMALLOC (struct gdbarch_tdep);
-+ gdbarch = gdbarch_alloc (&info, tdep);
-+
-+ tdep->bfin_abi = abi;
-+
-+ set_gdbarch_num_regs (gdbarch, BFIN_NUM_REGS);
-+ set_gdbarch_num_pseudo_regs (gdbarch, 0);
-+ set_gdbarch_sp_regnum (gdbarch, BFIN_SP_REGNUM);
-+ set_gdbarch_pc_regnum (gdbarch, BFIN_PC_REGNUM);
-+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, bfin_reg_to_regnum);
-+ set_gdbarch_register_name (gdbarch, bfin_register_name);
-+ set_gdbarch_register_type (gdbarch, bfin_register_type);
-+ set_gdbarch_unwind_dummy_id (gdbarch, bfin_unwind_dummy_id);
-+ set_gdbarch_push_dummy_call (gdbarch, bfin_push_dummy_call);
-+ set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
-+ set_gdbarch_register_sim_regno (gdbarch, bfin_sim_regno);
-+ set_gdbarch_believe_pcc_promotion (gdbarch, 1);
-+ set_gdbarch_return_value (gdbarch, bfin_return_value);
-+ set_gdbarch_extract_return_value (gdbarch, bfin_extract_return_value);
-+ set_gdbarch_store_return_value (gdbarch, bfin_store_return_value);
-+ set_gdbarch_skip_prologue (gdbarch, bfin_skip_prologue);
-+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-+ set_gdbarch_breakpoint_from_pc (gdbarch, bfin_breakpoint_from_pc);
-+ set_gdbarch_decr_pc_after_break (gdbarch, 0);
-+ set_gdbarch_frame_args_skip (gdbarch, 8);
-+ set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
-+ set_gdbarch_frame_align (gdbarch, bfin_frame_align);
-+ set_gdbarch_print_insn (gdbarch, gdb_print_insn_bfin);
-+
-+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
-+
-+ frame_base_set_default (gdbarch, &bfin_frame_base);
-+
-+ frame_unwind_append_sniffer (gdbarch, bfin_linux_sigtramp_frame_sniffer);
-+ frame_unwind_append_sniffer (gdbarch, bfin_frame_sniffer);
-+
-+
-+ if (bfin_abi (gdbarch) == BFIN_ABI_FDPIC)
-+ set_gdbarch_convert_from_func_ptr_addr (gdbarch,
-+ bfin_convert_from_func_ptr_addr);
-+
-+ if (bfin_abi (gdbarch) == BFIN_ABI_FDPIC)
-+ set_gdbarch_use_get_offsets (gdbarch, 0);
-+
-+ return gdbarch;
-+}
-+
-+static void
-+bfin_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
-+{
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-+
-+ if (tdep == NULL)
-+ return;
-+}
-+
-+extern initialize_file_ftype _initialize_bfin_tdep; /* -Wmissing-prototypes */
-+
-+void
-+_initialize_bfin_tdep (void)
-+{
-+ gdbarch_register (bfd_arch_bfin, bfin_gdbarch_init, bfin_dump_tdep);
-+}
-diff -Naur gdb-6.5.orig/gdb/bfin-tdep.h gdb-6.5/gdb/bfin-tdep.h
---- gdb-6.5.orig/gdb/bfin-tdep.h 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/bfin-tdep.h 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,180 @@
-+/* Target-dependent code for Analog Devices Blackfin processer, for GDB.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+enum gdb_regnum {
-+ /* Core Registers */
-+ BFIN_R0_REGNUM = 0,
-+ BFIN_R1_REGNUM,
-+ BFIN_R2_REGNUM,
-+ BFIN_R3_REGNUM,
-+ BFIN_R4_REGNUM,
-+ BFIN_R5_REGNUM,
-+ BFIN_R6_REGNUM,
-+ BFIN_R7_REGNUM,
-+ BFIN_P0_REGNUM,
-+ BFIN_P1_REGNUM,
-+ BFIN_P2_REGNUM,
-+ BFIN_P3_REGNUM,
-+ BFIN_P4_REGNUM,
-+ BFIN_P5_REGNUM,
-+ BFIN_SP_REGNUM,
-+ BFIN_FP_REGNUM,
-+ BFIN_I0_REGNUM,
-+ BFIN_I1_REGNUM,
-+ BFIN_I2_REGNUM,
-+ BFIN_I3_REGNUM,
-+ BFIN_M0_REGNUM,
-+ BFIN_M1_REGNUM,
-+ BFIN_M2_REGNUM,
-+ BFIN_M3_REGNUM,
-+ BFIN_B0_REGNUM,
-+ BFIN_B1_REGNUM,
-+ BFIN_B2_REGNUM,
-+ BFIN_B3_REGNUM,
-+ BFIN_L0_REGNUM,
-+ BFIN_L1_REGNUM,
-+ BFIN_L2_REGNUM,
-+ BFIN_L3_REGNUM,
-+ BFIN_A0_DOT_X_REGNUM,
-+ BFIN_AO_DOT_W_REGNUM,
-+ BFIN_A1_DOT_X_REGNUM,
-+ BFIN_A1_DOT_W_REGNUM,
-+ BFIN_ASTAT_REGNUM,
-+ BFIN_RETS_REGNUM,
-+ BFIN_LC0_REGNUM,
-+ BFIN_LT0_REGNUM,
-+ BFIN_LB0_REGNUM,
-+ BFIN_LC1_REGNUM,
-+ BFIN_LT1_REGNUM,
-+ BFIN_LB1_REGNUM,
-+ BFIN_CYCLES_REGNUM,
-+ BFIN_CYCLES2_REGNUM,
-+ BFIN_USP_REGNUM,
-+ BFIN_SEQSTAT_REGNUM,
-+ BFIN_SYSCFG_REGNUM,
-+ BFIN_RETI_REGNUM,
-+ BFIN_RETX_REGNUM,
-+ BFIN_RETN_REGNUM,
-+ BFIN_RETE_REGNUM,
-+
-+ /* Pseudo Registers */
-+ BFIN_PC_REGNUM,
-+ BFIN_CC_REGNUM,
-+ BFIN_EXTRA1, /* Address of .text section. */
-+ BFIN_EXTRA2, /* Address of .data section. */
-+ BFIN_EXTRA3, /* Address of .bss section. */
-+
-+ BFIN_FDPIC_EXEC_REGNUM,
-+ BFIN_FDPIC_INTERP_REGNUM,
-+
-+ /* MMRs */
-+ BFIN_IPEND_REGNUM,
-+
-+ /* LAST ENTRY SHOULD NOT BE CHANGED. */
-+ BFIN_NUM_REGS /* The number of all registers. */
-+};
-+
-+enum gcc_regnum {
-+ BFIN_GCC_R0_REGNUM = 0,
-+ BFIN_GCC_R1_REGNUM,
-+ BFIN_GCC_R2_REGNUM,
-+ BFIN_GCC_R3_REGNUM,
-+ BFIN_GCC_R4_REGNUM,
-+ BFIN_GCC_R5_REGNUM,
-+ BFIN_GCC_R6_REGNUM,
-+ BFIN_GCC_R7_REGNUM,
-+ BFIN_GCC_P0_REGNUM,
-+ BFIN_GCC_P1_REGNUM,
-+ BFIN_GCC_P2_REGNUM,
-+ BFIN_GCC_P3_REGNUM,
-+ BFIN_GCC_P4_REGNUM,
-+ BFIN_GCC_P5_REGNUM,
-+ BFIN_GCC_SP_REGNUM,
-+ BFIN_GCC_FP_REGNUM,
-+ BFIN_GCC_I0_REGNUM,
-+ BFIN_GCC_I1_REGNUM,
-+ BFIN_GCC_I2_REGNUM,
-+ BFIN_GCC_I3_REGNUM,
-+ BFIN_GCC_B0_REGNUM,
-+ BFIN_GCC_B1_REGNUM,
-+ BFIN_GCC_B2_REGNUM,
-+ BFIN_GCC_B3_REGNUM,
-+ BFIN_GCC_L0_REGNUM,
-+ BFIN_GCC_L1_REGNUM,
-+ BFIN_GCC_L2_REGNUM,
-+ BFIN_GCC_L3_REGNUM,
-+ BFIN_GCC_M0_REGNUM,
-+ BFIN_GCC_M1_REGNUM,
-+ BFIN_GCC_M2_REGNUM,
-+ BFIN_GCC_M3_REGNUM,
-+ BFIN_GCC_A0_REGNUM,
-+ BFIN_GCC_A1_REGNUM,
-+ BFIN_GCC_CC_REGNUM,
-+ BFIN_GCC_RETS_REGNUM,
-+ BFIN_GCC_RETI_REGNUM,
-+ BFIN_GCC_RETX_REGNUM,
-+ BFIN_GCC_RETN_REGNUM,
-+ BFIN_GCC_RETE_REGNUM,
-+ BFIN_GCC_ASTAT_REGNUM,
-+ BFIN_GCC_SEQSTAT_REGNUM,
-+ BFIN_GCC_USP_REGNUM,
-+ BFIN_GCC_ARGP_REGNUM,
-+ BFIN_GCC_LT0_REGNUM,
-+ BFIN_GCC_LT1_REGNUM,
-+ BFIN_GCC_LC0_REGNUM,
-+ BFIN_GCC_LC1_REGNUM,
-+ BFIN_GCC_LB0_REGNUM,
-+ BFIN_GCC_LB1_REGNUM
-+};
-+
-+/* The ABIs for Blackfin. */
-+enum bfin_abi
-+{
-+ BFIN_ABI_FLAT,
-+ BFIN_ABI_FDPIC
-+};
-+
-+/* Target-dependent structure in gdbarch. */
-+struct gdbarch_tdep
-+{
-+ /* Which ABI is in use? */
-+ enum bfin_abi bfin_abi;
-+};
-+
-+/* in opcodes/bfin-dis.c */
-+extern int print_insn_bfin (bfd_vma pc, struct disassemble_info *outf);
-+
-+/* Fetch the interpreter and executable loadmap addresses (for shared
-+ library support) for the FDPIC ABI. Return 0 if successful, -1 if
-+ not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
-+extern int bfin_fdpic_loadmap_addresses (struct gdbarch *gdbarch,
-+ CORE_ADDR *interp_addr,
-+ CORE_ADDR *exec_addr);
-+
-+/* Given a function entry point, find and return the GOT address for the
-+ containing load module. */
-+CORE_ADDR bfin_fdpic_find_global_pointer (CORE_ADDR addr);
-+
-+/* Given a function entry point, find and return the canonical descriptor
-+ for that function, if one exists. If no canonical descriptor could
-+ be found, return 0. */
-+CORE_ADDR bfin_fdpic_find_canonical_descriptor (CORE_ADDR entry_point);
-diff -Naur gdb-6.5.orig/gdb/config/bfin/bfin.mt gdb-6.5/gdb/config/bfin/bfin.mt
---- gdb-6.5.orig/gdb/config/bfin/bfin.mt 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/config/bfin/bfin.mt 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,4 @@
-+TDEPFILES= bfin-tdep.o solib.o solib-bfin.o
-+DEPRECATED_TM_FILE= solib.h
-+SIM_OBS= remote-sim.o
-+SIM= ../sim/bfin/libsim.a
-diff -Naur gdb-6.5.orig/gdb/configure.tgt gdb-6.5/gdb/configure.tgt
---- gdb-6.5.orig/gdb/configure.tgt 2006-04-21 01:18:48.000000000 +0200
-+++ gdb-6.5/gdb/configure.tgt 2009-01-22 08:19:21.000000000 +0100
-@@ -14,6 +14,7 @@
- am33_2.0*) gdb_target_cpu=mn10300 ;;
- arm*) gdb_target_cpu=arm ;;
- avr*) gdb_target_cpu=avr ;;
-+bfin*) gdb_target_cpu=bfin ;;
- hppa*) gdb_target_cpu=pa ;;
- i[34567]86*) gdb_target_cpu=i386 ;;
- m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
-@@ -69,6 +70,9 @@
-
- avr-*-*) gdb_target=avr ;;
-
-+bfin-*-*) gdb_target=bfin
-+ build_gdbserver=yes
-+ ;;
- cris*) gdb_target=cris ;;
-
- # OBSOLETE d10v-*-*) gdb_target=d10v ;;
-diff -Naur gdb-6.5.orig/gdb/gdbarch.c gdb-6.5/gdb/gdbarch.c
---- gdb-6.5.orig/gdb/gdbarch.c 2006-04-18 21:20:06.000000000 +0200
-+++ gdb-6.5/gdb/gdbarch.c 2009-01-22 08:19:21.000000000 +0100
-@@ -235,6 +235,7 @@
- gdbarch_register_reggroup_p_ftype *register_reggroup_p;
- gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
- gdbarch_regset_from_core_section_ftype *regset_from_core_section;
-+ int use_get_offsets;
- };
-
-
-@@ -361,6 +362,7 @@
- default_register_reggroup_p, /* register_reggroup_p */
- 0, /* fetch_pointer_argument */
- 0, /* regset_from_core_section */
-+ 1, /* use_get_offsets */
- /* startup_gdbarch() */
- };
-
-@@ -450,6 +452,7 @@
- current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
- current_gdbarch->name_of_malloc = "malloc";
- current_gdbarch->register_reggroup_p = default_register_reggroup_p;
-+ current_gdbarch->use_get_offsets = 1;
- /* gdbarch_alloc() */
-
- return current_gdbarch;
-@@ -615,6 +618,7 @@
- /* Skip verify of register_reggroup_p, invalid_p == 0 */
- /* Skip verify of fetch_pointer_argument, has predicate */
- /* Skip verify of regset_from_core_section, has predicate */
-+ /* Skip verify of use_get_offsets, invalid_p == 0 */
- buf = ui_file_xstrdup (log, &dummy);
- make_cleanup (xfree, buf);
- if (strlen (buf) > 0)
-@@ -1601,6 +1605,9 @@
- fprintf_unfiltered (file,
- "gdbarch_dump: unwind_sp = <0x%lx>\n",
- (long) current_gdbarch->unwind_sp);
-+ fprintf_unfiltered (file,
-+ "gdbarch_dump: use_get_offsets = %s\n",
-+ paddr_d (current_gdbarch->use_get_offsets));
- #ifdef VALUE_TO_REGISTER
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
-@@ -3683,6 +3690,23 @@
- gdbarch->regset_from_core_section = regset_from_core_section;
- }
-
-+int
-+gdbarch_use_get_offsets (struct gdbarch *gdbarch)
-+{
-+ gdb_assert (gdbarch != NULL);
-+ /* Skip verify of use_get_offsets, invalid_p == 0 */
-+ if (gdbarch_debug >= 2)
-+ fprintf_unfiltered (gdb_stdlog, "gdbarch_use_get_offsets called\n");
-+ return gdbarch->use_get_offsets;
-+}
-+
-+void
-+set_gdbarch_use_get_offsets (struct gdbarch *gdbarch,
-+ int use_get_offsets)
-+{
-+ gdbarch->use_get_offsets = use_get_offsets;
-+}
-+
-
- /* Keep a registry of per-architecture data-pointers required by GDB
- modules. */
-diff -Naur gdb-6.5.orig/gdb/gdbarch.h gdb-6.5/gdb/gdbarch.h
---- gdb-6.5.orig/gdb/gdbarch.h 2006-04-18 21:20:06.000000000 +0200
-+++ gdb-6.5/gdb/gdbarch.h 2009-01-22 08:19:21.000000000 +0100
-@@ -1404,6 +1404,11 @@
- extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
- extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section);
-
-+/* Query the remote side for the text, data and bss offsets */
-+
-+extern int gdbarch_use_get_offsets (struct gdbarch *gdbarch);
-+extern void set_gdbarch_use_get_offsets (struct gdbarch *gdbarch, int use_get_offsets);
-+
- extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
-
-
-diff -Naur gdb-6.5.orig/gdb/gdbarch.sh gdb-6.5/gdb/gdbarch.sh
---- gdb-6.5.orig/gdb/gdbarch.sh 2006-04-18 21:20:06.000000000 +0200
-+++ gdb-6.5/gdb/gdbarch.sh 2009-01-22 08:19:21.000000000 +0100
-@@ -662,6 +662,8 @@
- # Return the appropriate register set for a core file section with
- # name SECT_NAME and size SECT_SIZE.
- M::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
-+# Query the remote side for the text, data and bss offsets
-+v::int:use_get_offsets:::1:1::0
- EOF
- }
-
-diff -Naur gdb-6.5.orig/gdb/gdbserver/configure.srv gdb-6.5/gdb/gdbserver/configure.srv
---- gdb-6.5.orig/gdb/gdbserver/configure.srv 2006-05-09 17:21:19.000000000 +0200
-+++ gdb-6.5/gdb/gdbserver/configure.srv 2009-01-22 08:19:21.000000000 +0100
-@@ -23,6 +23,11 @@
- srv_linux_usrregs=yes
- srv_linux_thread_db=yes
- ;;
-+ bfin-*-*) srv_regobj=reg-bfin.o
-+ srv_tgtobj="linux-low.o linux-bfin-low.o"
-+ srv_linux_usrregs=yes
-+ srv_linux_thread_db=yes
-+ ;;
- crisv32-*-linux*) srv_regobj=reg-crisv32.o
- srv_tgtobj="linux-low.o linux-crisv32-low.o"
- srv_linux_regsets=yes
-diff -Naur gdb-6.5.orig/gdb/gdbserver/linux-bfin-low.c gdb-6.5/gdb/gdbserver/linux-bfin-low.c
---- gdb-6.5.orig/gdb/gdbserver/linux-bfin-low.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/gdbserver/linux-bfin-low.c 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,101 @@
-+/* GNU/Linux/BFIN specific low level interface, for the remote server for GDB.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+#include "server.h"
-+#include "linux-low.h"
-+#include <asm/asm-offsets.h>
-+
-+static int bfin_regmap[] =
-+{
-+ PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5, PT_R6, PT_R7,
-+ PT_P0, PT_P1, PT_P2, PT_P3, PT_P4, PT_P5, PT_USP, PT_FP,
-+ PT_I0, PT_I1, PT_I2, PT_I3, PT_M0, PT_M1, PT_M2, PT_M3,
-+ PT_B0, PT_B1, PT_B2, PT_B3, PT_L0, PT_L1, PT_L2, PT_L3,
-+ PT_A0X, PT_A0W, PT_A1X, PT_A1W, PT_ASTAT, PT_RETS,
-+ PT_LC0, PT_LT0, PT_LB0, PT_LC1, PT_LT1, PT_LB1,
-+ -1 /* PT_CYCLES */, -1 /* PT_CYCLES2 */,
-+ -1 /* PT_USP */, PT_SEQSTAT, PT_SYSCFG, PT_PC, PT_RETX, PT_RETN, PT_RETE,
-+ PT_PC, -1 /* PT_CC */, PT_EXTRA1, PT_EXTRA2, PT_EXTRA3,
-+ PT_FDPIC_EXEC, PT_FDPIC_INTERP,
-+ PT_IPEND
-+};
-+
-+#define bfin_num_regs (sizeof(bfin_regmap) / sizeof(bfin_regmap[0]))
-+
-+static int
-+bfin_cannot_store_register (int regno)
-+{
-+ return (regno >= bfin_num_regs);
-+}
-+
-+static int
-+bfin_cannot_fetch_register (int regno)
-+{
-+ return (regno >= bfin_num_regs);
-+}
-+
-+static CORE_ADDR
-+bfin_get_pc ()
-+{
-+ unsigned long pc;
-+ collect_register_by_name ("pc", &pc);
-+ return pc;
-+}
-+
-+static void
-+bfin_set_pc (CORE_ADDR pc)
-+{
-+ unsigned long newpc = pc;
-+ supply_register_by_name ("pc", &newpc);
-+}
-+
-+#define bfin_breakpoint_len 2
-+static const unsigned char bfin_breakpoint[bfin_breakpoint_len]={0xa1, 0x00};
-+
-+static int
-+bfin_breakpoint_at (CORE_ADDR where)
-+{
-+ unsigned char insn[bfin_breakpoint_len];
-+
-+ read_inferior_memory(where, insn, bfin_breakpoint_len);
-+ if (insn[0] == bfin_breakpoint[0]
-+ && insn[1] == bfin_breakpoint[1])
-+ return 1;
-+
-+ /* If necessary, recognize more trap instructions here. GDB only uses the
-+ one. */
-+ return 0;
-+}
-+
-+struct linux_target_ops the_low_target = {
-+ bfin_num_regs,
-+ bfin_regmap,
-+ bfin_cannot_fetch_register,
-+ bfin_cannot_store_register,
-+ bfin_get_pc,
-+ bfin_set_pc,
-+ bfin_breakpoint,
-+ bfin_breakpoint_len,
-+ 0,
-+ 0,
-+ bfin_breakpoint_at,
-+};
-diff -Naur gdb-6.5.orig/gdb/gdbserver/Makefile.in gdb-6.5/gdb/gdbserver/Makefile.in
---- gdb-6.5.orig/gdb/gdbserver/Makefile.in 2006-03-15 17:26:02.000000000 +0100
-+++ gdb-6.5/gdb/gdbserver/Makefile.in 2009-01-22 08:19:21.000000000 +0100
-@@ -119,9 +119,9 @@
- $(srcdir)/mem-break.c $(srcdir)/proc-service.c $(srcdir)/regcache.c \
- $(srcdir)/remote-utils.c $(srcdir)/server.c $(srcdir)/target.c \
- $(srcdir)/thread-db.c $(srcdir)/utils.c \
-- $(srcdir)/linux-arm-low.c $(srcdir)/linux-cris-low.c \
-- $(srcdir)/linux-crisv32-low.c $(srcdir)/linux-i386-low.c \
-- $(srcdir)/i387-fp.c \
-+ $(srcdir)/linux-arm-low.c $(srcdir)/linux-bfin-low.c \
-+ $(srcdir)/linux-cris-low.c $(srcdir)/linux-crisv32-low.c \
-+ $(srcdir)/linux-i386-low.c $(srcdir)/i387-fp.c \
- $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
- $(srcdir)/linux-m32r-low.c \
- $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
-@@ -206,6 +206,7 @@
- rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
- rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
- rm -f reg-cris.c reg-crisv32.c
-+ rm -f reg-bfin.c
-
- maintainer-clean realclean distclean: clean
- rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
-@@ -270,6 +271,7 @@
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
-
- linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
-+linux-bfin-low.o: linux-bfin-low.c $(linux_low_h) $(server_h)
- linux-cris-low.o: linux-cris-low.c $(linux_low_h) $(server_h)
- linux-crisv32-low.o: linux-crisv32-low.c $(linux_low_h) $(server_h)
- linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h) \
-@@ -288,6 +290,9 @@
- reg-arm.o : reg-arm.c $(regdef_h)
- reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
- sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
-+reg-bfin.o : reg-bfin.c $(regdef_h)
-+reg-bfin.c : $(srcdir)/../regformats/reg-bfin.dat $(regdat_sh)
-+ sh $(regdat_sh) $(srcdir)/../regformats/reg-bfin.dat reg-bfin.c
- reg-cris.o : reg-cris.c $(regdef_h)
- reg-cris.c : $(srcdir)/../regformats/reg-cris.dat $(regdat_sh)
- sh $(regdat_sh) $(srcdir)/../regformats/reg-cris.dat reg-cris.c
-diff -Naur gdb-6.5.orig/gdb/Makefile.in gdb-6.5/gdb/Makefile.in
---- gdb-6.5.orig/gdb/Makefile.in 2006-05-12 22:53:15.000000000 +0200
-+++ gdb-6.5/gdb/Makefile.in 2009-01-22 08:19:21.000000000 +0100
-@@ -581,6 +581,7 @@
- elf_sh_h = $(INCLUDE_DIR)/elf/sh.h
- elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h)
- elf_bfd_h = $(BFD_SRC)/elf-bfd.h
-+elf_bfin_h = $(INCLUDE_DIR)/elf/bfin.h $(elf_reloc_macros_h)
- elf_frv_h = $(INCLUDE_DIR)/elf/frv.h $(elf_reloc_macros_h)
- elf_m32c_h = $(INCLUDE_DIR)/elf/m32c.h $(elf_reloc_macros_h)
- libaout_h = $(BFD_SRC)/libaout.h
-@@ -597,6 +598,7 @@
- sh_opc_h = $(OPCODES_SRC)/sh-opc.h
- gdb_callback_h = $(INCLUDE_DIR)/gdb/callback.h
- gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
-+gdb_sim_bfin_h = $(INCLUDE_DIR)/gdb/sim-bfin.h
- gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
- gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h
- gdb_sim_m32c_h = $(INCLUDE_DIR)/gdb/sim-m32c.h
-@@ -646,6 +648,7 @@
- ax_h = ax.h $(doublest_h)
- bcache_h = bcache.h
- bfd_target_h = bfd-target.h
-+bfin_tdep_h = bfin-tdep.h
- block_h = block.h
- breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h)
- bsd_kvm_h = bsd-kvm.h
-@@ -1401,6 +1404,7 @@
- arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
- armnbsd-nat.c armnbsd-tdep.c \
- avr-tdep.c \
-+ bfin-tdep.c \
- bsd-uthread.c bsd-kvm.c \
- coff-solib.c \
- core-regset.c core-aout.c corelow.c \
-@@ -1782,6 +1786,11 @@
- $(gdb_assert_h)
- bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \
- $(gdb_assert_h) $(gdb_string_h)
-+bfin-tdep.o: bfin-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
-+ $(frame_unwind_h) $(dwarf2_frame_h) $(trad_frame_h) $(inferior_h) \
-+ $(gdbcore_h) $(dis_asm_h) $(regcache_h) $(arch_utils_h) \
-+ $(gdb_assert_h) $(sim_regno_h) $(bfin_tdep_h) $(gdb_sim_bfin_h) \
-+ $(elf_bfd_h) $(elf_bfin_h) $(infcall_h)
- block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \
- $(gdb_obstack_h) $(cp_support_h)
- blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \
-@@ -2580,6 +2589,9 @@
- $(frame_h) $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) \
- $(gdbcmd_h) $(completer_h) $(filenames_h) $(exec_h) $(solist_h) \
- $(observer_h) $(readline_h)
-+solib-bfin.o: solib-bfin.c $(defs_h) $(gdb_string_h) $(inferior_h) \
-+ $(gdbcore_h) $(solist_h) $(bfin_tdep_h) $(objfiles_h) $(symtab_h) \
-+ $(language_h) $(command_h) $(gdbcmd_h) $(elf_bfin_h)
- solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \
- $(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \
- $(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h)
-diff -Naur gdb-6.5.orig/gdb/regformats/reg-bfin.dat gdb-6.5/gdb/regformats/reg-bfin.dat
---- gdb-6.5.orig/gdb/regformats/reg-bfin.dat 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/regformats/reg-bfin.dat 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,63 @@
-+name:bfin
-+expedite:pc,sp,fp
-+32:r0
-+32:r1
-+32:r2
-+32:r3
-+32:r4
-+32:r5
-+32:r6
-+32:r7
-+32:p0
-+32:p1
-+32:p2
-+32:p3
-+32:p4
-+32:p5
-+32:sp
-+32:fp
-+32:i0
-+32:i1
-+32:i2
-+32:i3
-+32:m0
-+32:m1
-+32:m2
-+32:m3
-+32:b0
-+32:b1
-+32:b2
-+32:b3
-+32:l0
-+32:l1
-+32:l2
-+32:l3
-+32:a0x
-+32:a0w
-+32:a1x
-+32:a1w
-+32:astat
-+32:rets
-+32:lc0
-+32:lt0
-+32:lb0
-+32:lc1
-+32:lt1
-+32:lb1
-+32:cycles
-+32:cycles2
-+32:usp
-+32:seqstat
-+32:syscfg
-+32:reti
-+32:retx
-+32:retn
-+32:rete
-+32:pc
-+32:cc
-+32:extra1
-+32:extra2
-+32:extra3
-+32:fdpic_exec
-+32:fdpic_interp
-+32:ipend
-diff -Naur gdb-6.5.orig/gdb/remote.c gdb-6.5/gdb/remote.c
---- gdb-6.5.orig/gdb/remote.c 2006-05-05 22:08:45.000000000 +0200
-+++ gdb-6.5/gdb/remote.c 2009-01-22 08:19:21.000000000 +0100
-@@ -1912,7 +1912,9 @@
-
- inferior_ptid = remote_current_thread (inferior_ptid);
-
-- get_offsets (); /* Get text, data & bss offsets. */
-+ /* Get text, data & bss offsets. */
-+ if (gdbarch_use_get_offsets (current_gdbarch))
-+ get_offsets ();
-
- putpkt ("?"); /* Initiate a query from remote machine. */
- immediate_quit--;
-diff -Naur gdb-6.5.orig/gdb/solib-bfin.c gdb-6.5/gdb/solib-bfin.c
---- gdb-6.5.orig/gdb/solib-bfin.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/solib-bfin.c 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,1231 @@
-+/* Handle Blackfin (FDPIC) shared libraries for GDB, the GNU Debugger.
-+ Copyright 2006
-+ Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA. */
-+
-+
-+#include "defs.h"
-+#include "gdb_string.h"
-+#include "inferior.h"
-+#include "gdbcore.h"
-+#include "solist.h"
-+#include "bfin-tdep.h"
-+#include "objfiles.h"
-+#include "symtab.h"
-+#include "language.h"
-+#include "command.h"
-+#include "gdbcmd.h"
-+#include "elf/bfin.h"
-+
-+/* Flag which indicates whether internal debug messages should be printed. */
-+static int solib_bfin_debug;
-+
-+/* BFIN pointers are four bytes wide. */
-+enum { BFIN_PTR_SIZE = 4 };
-+
-+/* Representation of loadmap and related structs for the BFIN FDPIC ABI. */
-+
-+/* External versions; the size and alignment of the fields should be
-+ the same as those on the target. When loaded, the placement of
-+ the bits in each field will be the same as on the target. */
-+typedef gdb_byte ext_Elf32_Half[2];
-+typedef gdb_byte ext_Elf32_Addr[4];
-+typedef gdb_byte ext_Elf32_Word[4];
-+
-+struct ext_elf32_fdpic_loadseg
-+{
-+ /* Core address to which the segment is mapped. */
-+ ext_Elf32_Addr addr;
-+ /* VMA recorded in the program header. */
-+ ext_Elf32_Addr p_vaddr;
-+ /* Size of this segment in memory. */
-+ ext_Elf32_Word p_memsz;
-+};
-+
-+struct ext_elf32_fdpic_loadmap {
-+ /* Protocol version number, must be zero. */
-+ ext_Elf32_Half version;
-+ /* Number of segments in this map. */
-+ ext_Elf32_Half nsegs;
-+ /* The actual memory map. */
-+ struct ext_elf32_fdpic_loadseg segs[1 /* nsegs, actually */];
-+};
-+
-+/* Internal versions; the types are GDB types and the data in each
-+ of the fields is (or will be) decoded from the external struct
-+ for ease of consumption. */
-+struct int_elf32_fdpic_loadseg
-+{
-+ /* Core address to which the segment is mapped. */
-+ CORE_ADDR addr;
-+ /* VMA recorded in the program header. */
-+ CORE_ADDR p_vaddr;
-+ /* Size of this segment in memory. */
-+ long p_memsz;
-+};
-+
-+struct int_elf32_fdpic_loadmap {
-+ /* Protocol version number, must be zero. */
-+ int version;
-+ /* Number of segments in this map. */
-+ int nsegs;
-+ /* The actual memory map. */
-+ struct int_elf32_fdpic_loadseg segs[1 /* nsegs, actually */];
-+};
-+
-+/* Given address LDMADDR, fetch and decode the loadmap at that address.
-+ Return NULL if there is a problem reading the target memory or if
-+ there doesn't appear to be a loadmap at the given address. The
-+ allocated space (representing the loadmap) returned by this
-+ function may be freed via a single call to xfree(). */
-+
-+static struct int_elf32_fdpic_loadmap *
-+fetch_loadmap (CORE_ADDR ldmaddr)
-+{
-+ struct ext_elf32_fdpic_loadmap ext_ldmbuf_partial;
-+ struct ext_elf32_fdpic_loadmap *ext_ldmbuf;
-+ struct int_elf32_fdpic_loadmap *int_ldmbuf;
-+ int ext_ldmbuf_size, int_ldmbuf_size;
-+ int version, seg, nsegs;
-+
-+ /* Fetch initial portion of the loadmap. */
-+ if (target_read_memory (ldmaddr, (gdb_byte *) &ext_ldmbuf_partial,
-+ sizeof ext_ldmbuf_partial))
-+ {
-+ /* Problem reading the target's memory. */
-+ return NULL;
-+ }
-+
-+ /* Extract the version. */
-+ version = extract_unsigned_integer (ext_ldmbuf_partial.version,
-+ sizeof ext_ldmbuf_partial.version);
-+ if (version != 0)
-+ {
-+ /* We only handle version 0. */
-+ return NULL;
-+ }
-+
-+ /* Extract the number of segments. */
-+ nsegs = extract_unsigned_integer (ext_ldmbuf_partial.nsegs,
-+ sizeof ext_ldmbuf_partial.nsegs);
-+
-+ /* Allocate space for the complete (external) loadmap. */
-+ ext_ldmbuf_size = sizeof (struct ext_elf32_fdpic_loadmap)
-+ + (nsegs - 1) * sizeof (struct ext_elf32_fdpic_loadseg);
-+ ext_ldmbuf = xmalloc (ext_ldmbuf_size);
-+
-+ /* Copy over the portion of the loadmap that's already been read. */
-+ memcpy (ext_ldmbuf, &ext_ldmbuf_partial, sizeof ext_ldmbuf_partial);
-+
-+ /* Read the rest of the loadmap from the target. */
-+ if (target_read_memory (ldmaddr + sizeof ext_ldmbuf_partial,
-+ (gdb_byte *) ext_ldmbuf + sizeof ext_ldmbuf_partial,
-+ ext_ldmbuf_size - sizeof ext_ldmbuf_partial))
-+ {
-+ /* Couldn't read rest of the loadmap. */
-+ xfree (ext_ldmbuf);
-+ return NULL;
-+ }
-+
-+ /* Allocate space into which to put information extract from the
-+ external loadsegs. I.e, allocate the internal loadsegs. */
-+ int_ldmbuf_size = sizeof (struct int_elf32_fdpic_loadmap)
-+ + (nsegs - 1) * sizeof (struct int_elf32_fdpic_loadseg);
-+ int_ldmbuf = xmalloc (int_ldmbuf_size);
-+
-+ /* Place extracted information in internal structs. */
-+ int_ldmbuf->version = version;
-+ int_ldmbuf->nsegs = nsegs;
-+ for (seg = 0; seg < nsegs; seg++)
-+ {
-+ int_ldmbuf->segs[seg].addr
-+ = extract_unsigned_integer (ext_ldmbuf->segs[seg].addr,
-+ sizeof (ext_ldmbuf->segs[seg].addr));
-+ int_ldmbuf->segs[seg].p_vaddr
-+ = extract_unsigned_integer (ext_ldmbuf->segs[seg].p_vaddr,
-+ sizeof (ext_ldmbuf->segs[seg].p_vaddr));
-+ int_ldmbuf->segs[seg].p_memsz
-+ = extract_unsigned_integer (ext_ldmbuf->segs[seg].p_memsz,
-+ sizeof (ext_ldmbuf->segs[seg].p_memsz));
-+ }
-+
-+ xfree (ext_ldmbuf);
-+ return int_ldmbuf;
-+}
-+
-+/* External link_map and elf32_fdpic_loadaddr struct definitions. */
-+
-+typedef gdb_byte ext_ptr[4];
-+
-+struct ext_elf32_fdpic_loadaddr
-+{
-+ ext_ptr map; /* struct elf32_fdpic_loadmap *map; */
-+ ext_ptr got_value; /* void *got_value; */
-+};
-+
-+struct ext_link_map
-+{
-+ struct ext_elf32_fdpic_loadaddr l_addr;
-+
-+ /* Absolute file name object was found in. */
-+ ext_ptr l_name; /* char *l_name; */
-+
-+ /* Dynamic section of the shared object. */
-+ ext_ptr l_ld; /* ElfW(Dyn) *l_ld; */
-+
-+ /* Chain of loaded objects. */
-+ ext_ptr l_next, l_prev; /* struct link_map *l_next, *l_prev; */
-+};
-+
-+/* Link map info to include in an allocated so_list entry */
-+
-+struct lm_info
-+ {
-+ /* The loadmap, digested into an easier to use form. */
-+ struct int_elf32_fdpic_loadmap *map;
-+ /* The GOT address for this link map entry. */
-+ CORE_ADDR got_value;
-+
-+ /* Cached dynamic symbol table and dynamic relocs initialized and
-+ used only by find_canonical_descriptor_in_load_object().
-+
-+ Note: kevinb/2004-02-26: It appears that calls to
-+ bfd_canonicalize_dynamic_reloc() will use the same symbols as
-+ those supplied to the first call to this function. Therefore,
-+ it's important to NOT free the asymbol ** data structure
-+ supplied to the first call. Thus the caching of the dynamic
-+ symbols (dyn_syms) is critical for correct operation. The
-+ caching of the dynamic relocations could be dispensed with. */
-+ asymbol **dyn_syms;
-+ arelent **dyn_relocs;
-+ int dyn_reloc_count; /* number of dynamic relocs. */
-+
-+ };
-+
-+/* The load map, got value, etc. are not available from the chain
-+ of loaded shared objects. ``main_executable_lm_info'' provides
-+ a way to get at this information so that it doesn't need to be
-+ frequently recomputed. Initialized by bfin_relocate_main_executable(). */
-+static struct lm_info *main_executable_lm_info;
-+
-+static void bfin_relocate_main_executable (void);
-+static CORE_ADDR main_got (void);
-+static int enable_break2 (void);
-+
-+/*
-+
-+ LOCAL FUNCTION
-+
-+ bfd_lookup_symbol -- lookup the value for a specific symbol
-+
-+ SYNOPSIS
-+
-+ CORE_ADDR bfd_lookup_symbol (bfd *abfd, char *symname)
-+
-+ DESCRIPTION
-+
-+ An expensive way to lookup the value of a single symbol for
-+ bfd's that are only temporary anyway. This is used by the
-+ shared library support to find the address of the debugger
-+ interface structures in the shared library.
-+
-+ Note that 0 is specifically allowed as an error return (no
-+ such symbol).
-+ */
-+
-+static CORE_ADDR
-+bfd_lookup_symbol (bfd *abfd, char *symname)
-+{
-+ long storage_needed;
-+ asymbol *sym;
-+ asymbol **symbol_table;
-+ unsigned int number_of_symbols;
-+ unsigned int i;
-+ struct cleanup *back_to;
-+ CORE_ADDR symaddr = 0;
-+
-+ storage_needed = bfd_get_symtab_upper_bound (abfd);
-+
-+ if (storage_needed > 0)
-+ {
-+ symbol_table = (asymbol **) xmalloc (storage_needed);
-+ back_to = make_cleanup (xfree, symbol_table);
-+ number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
-+
-+ for (i = 0; i < number_of_symbols; i++)
-+ {
-+ sym = *symbol_table++;
-+ if (strcmp (sym->name, symname) == 0)
-+ {
-+ /* Bfd symbols are section relative. */
-+ symaddr = sym->value + sym->section->vma;
-+ break;
-+ }
-+ }
-+ do_cleanups (back_to);
-+ }
-+
-+ if (symaddr)
-+ return symaddr;
-+
-+ /* Look for the symbol in the dynamic string table too. */
-+
-+ storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
-+
-+ if (storage_needed > 0)
-+ {
-+ symbol_table = (asymbol **) xmalloc (storage_needed);
-+ back_to = make_cleanup (xfree, symbol_table);
-+ number_of_symbols = bfd_canonicalize_dynamic_symtab (abfd, symbol_table);
-+
-+ for (i = 0; i < number_of_symbols; i++)
-+ {
-+ sym = *symbol_table++;
-+ if (strcmp (sym->name, symname) == 0)
-+ {
-+ /* Bfd symbols are section relative. */
-+ symaddr = sym->value + sym->section->vma;
-+ break;
-+ }
-+ }
-+ do_cleanups (back_to);
-+ }
-+
-+ return symaddr;
-+}
-+
-+
-+/*
-+
-+ LOCAL FUNCTION
-+
-+ open_symbol_file_object
-+
-+ SYNOPSIS
-+
-+ void open_symbol_file_object (void *from_tty)
-+
-+ DESCRIPTION
-+
-+ If no open symbol file, attempt to locate and open the main symbol
-+ file.
-+
-+ If FROM_TTYP dereferences to a non-zero integer, allow messages to
-+ be printed. This parameter is a pointer rather than an int because
-+ open_symbol_file_object() is called via catch_errors() and
-+ catch_errors() requires a pointer argument. */
-+
-+static int
-+open_symbol_file_object (void *from_ttyp)
-+{
-+ /* Unimplemented. */
-+ return 0;
-+}
-+
-+/* Cached value for lm_base(), below. */
-+static CORE_ADDR lm_base_cache = 0;
-+
-+/* Return the address from which the link map chain may be found. On
-+ the BFIN, this may be found in a number of ways. Assuming that the
-+ main executable has already been relocated, the easiest way to find
-+ this value is to look up the address of _GLOBAL_OFFSET_TABLE_. A
-+ pointer to the start of the link map will be located at the word found
-+ at _GLOBAL_OFFSET_TABLE_ + 8. (This is part of the dynamic linker
-+ reserve area mandated by the ABI.) */
-+
-+static CORE_ADDR
-+lm_base (void)
-+{
-+ struct minimal_symbol *got_sym;
-+ CORE_ADDR addr;
-+ gdb_byte buf[BFIN_PTR_SIZE];
-+
-+ /* If we already have a cached value, return it. */
-+ if (lm_base_cache)
-+ return lm_base_cache;
-+
-+ got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
-+ symfile_objfile);
-+ if (got_sym == 0)
-+ {
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "lm_base: _GLOBAL_OFFSET_TABLE_ not found.\n");
-+ return 0;
-+ }
-+
-+ addr = SYMBOL_VALUE_ADDRESS (got_sym) + 8;
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "lm_base: _GLOBAL_OFFSET_TABLE_ + 8 = %s\n",
-+ hex_string_custom (addr, 8));
-+
-+ if (target_read_memory (addr, buf, sizeof buf) != 0)
-+ return 0;
-+ lm_base_cache = extract_unsigned_integer (buf, sizeof buf);
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "lm_base: lm_base_cache = %s\n",
-+ hex_string_custom (lm_base_cache, 8));
-+
-+ return lm_base_cache;
-+}
-+
-+
-+/* LOCAL FUNCTION
-+
-+ bfin_current_sos -- build a list of currently loaded shared objects
-+
-+ SYNOPSIS
-+
-+ struct so_list *bfin_current_sos ()
-+
-+ DESCRIPTION
-+
-+ Build a list of `struct so_list' objects describing the shared
-+ objects currently loaded in the inferior. This list does not
-+ include an entry for the main executable file.
-+
-+ Note that we only gather information directly available from the
-+ inferior --- we don't examine any of the shared library files
-+ themselves. The declaration of `struct so_list' says which fields
-+ we provide values for. */
-+
-+static struct so_list *
-+bfin_current_sos (void)
-+{
-+ CORE_ADDR lm_addr, mgot;
-+ struct so_list *sos_head = NULL;
-+ struct so_list **sos_next_ptr = &sos_head;
-+
-+ mgot = main_got ();
-+
-+ /* Locate the address of the first link map struct. */
-+ lm_addr = lm_base ();
-+
-+ /* We have at least one link map entry. Fetch the the lot of them,
-+ building the solist chain. */
-+ while (lm_addr)
-+ {
-+ struct ext_link_map lm_buf;
-+ CORE_ADDR got_addr;
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "bfin_current_sos: reading link_map entry at %s\n",
-+ hex_string_custom (lm_addr, 8));
-+
-+ if (target_read_memory (lm_addr, (gdb_byte *) &lm_buf, sizeof (lm_buf)) != 0)
-+ {
-+ warning ("bfin_current_sos: Unable to read link map entry. Shared object chain may be incomplete.");
-+ break;
-+ }
-+
-+ got_addr
-+ = extract_unsigned_integer (lm_buf.l_addr.got_value,
-+ sizeof (lm_buf.l_addr.got_value));
-+ /* If the got_addr is the same as mgotr, then we're looking at the
-+ entry for the main executable. By convention, we don't include
-+ this in the list of shared objects. */
-+ if (got_addr != mgot)
-+ {
-+ int errcode;
-+ char *name_buf;
-+ struct int_elf32_fdpic_loadmap *loadmap;
-+ struct so_list *sop;
-+ CORE_ADDR addr;
-+
-+ /* Fetch the load map address. */
-+ addr = extract_unsigned_integer (lm_buf.l_addr.map,
-+ sizeof lm_buf.l_addr.map);
-+ loadmap = fetch_loadmap (addr);
-+ if (loadmap == NULL)
-+ {
-+ warning ("bfin_current_sos: Unable to fetch load map. Shared object chain may be incomplete.");
-+ break;
-+ }
-+
-+ sop = xcalloc (1, sizeof (struct so_list));
-+ sop->lm_info = xcalloc (1, sizeof (struct lm_info));
-+ sop->lm_info->map = loadmap;
-+ sop->lm_info->got_value = got_addr;
-+ /* Fetch the name. */
-+ addr = extract_unsigned_integer (lm_buf.l_name,
-+ sizeof (lm_buf.l_name));
-+ target_read_string (addr, &name_buf, SO_NAME_MAX_PATH_SIZE - 1,
-+ &errcode);
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog, "bfin_current_sos: name = %s\n",
-+ name_buf);
-+
-+ if (errcode != 0)
-+ {
-+ warning ("bfin_current_sos: Can't read pathname for link map entry: %s\n",
-+ safe_strerror (errcode));
-+ }
-+ else
-+ {
-+ strncpy (sop->so_name, name_buf, SO_NAME_MAX_PATH_SIZE - 1);
-+ sop->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-+ xfree (name_buf);
-+ strcpy (sop->so_original_name, sop->so_name);
-+ }
-+
-+ *sos_next_ptr = sop;
-+ sos_next_ptr = &sop->next;
-+ }
-+
-+ lm_addr = extract_unsigned_integer (lm_buf.l_next, sizeof (lm_buf.l_next));
-+ }
-+
-+ enable_break2 ();
-+
-+ return sos_head;
-+}
-+
-+
-+/* Return 1 if PC lies in the dynamic symbol resolution code of the
-+ run time loader. */
-+
-+static CORE_ADDR interp_text_sect_low;
-+static CORE_ADDR interp_text_sect_high;
-+static CORE_ADDR interp_plt_sect_low;
-+static CORE_ADDR interp_plt_sect_high;
-+
-+static int
-+bfin_in_dynsym_resolve_code (CORE_ADDR pc)
-+{
-+ return ((pc >= interp_text_sect_low && pc < interp_text_sect_high)
-+ || (pc >= interp_plt_sect_low && pc < interp_plt_sect_high)
-+ || in_plt_section (pc, NULL));
-+}
-+
-+/* Given a loadmap and an address, return the displacement needed
-+ to relocate the address. */
-+
-+CORE_ADDR
-+displacement_from_map (struct int_elf32_fdpic_loadmap *map,
-+ CORE_ADDR addr)
-+{
-+ int seg;
-+
-+ for (seg = 0; seg < map->nsegs; seg++)
-+ {
-+ if (map->segs[seg].p_vaddr <= addr
-+ && addr < map->segs[seg].p_vaddr + map->segs[seg].p_memsz)
-+ {
-+ return map->segs[seg].addr - map->segs[seg].p_vaddr;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+/* Print a warning about being unable to set the dynamic linker
-+ breakpoint. */
-+
-+static void
-+enable_break_failure_warning (void)
-+{
-+ warning ("Unable to find dynamic linker breakpoint function.\n"
-+ "GDB will be unable to debug shared library initializers\n"
-+ "and track explicitly loaded dynamic code.");
-+}
-+
-+/*
-+
-+ LOCAL FUNCTION
-+
-+ enable_break -- arrange for dynamic linker to hit breakpoint
-+
-+ SYNOPSIS
-+
-+ int enable_break (void)
-+
-+ DESCRIPTION
-+
-+ The dynamic linkers has, as part of its debugger interface, support
-+ for arranging for the inferior to hit a breakpoint after mapping in
-+ the shared libraries. This function enables that breakpoint.
-+
-+ On the BFIN, using the shared library (FDPIC) ABI, the symbol
-+ _dl_debug_addr points to the r_debug struct which contains
-+ a field called r_brk. r_brk is the address of the function
-+ descriptor upon which a breakpoint must be placed. Being a
-+ function descriptor, we must extract the entry point in order
-+ to set the breakpoint.
-+
-+ Our strategy will be to get the .interp section from the
-+ executable. This section will provide us with the name of the
-+ interpreter. We'll open the interpreter and then look up
-+ the address of _dl_debug_addr. We then relocate this address
-+ using the interpreter's loadmap. Once the relocated address
-+ is known, we fetch the value (address) corresponding to r_brk
-+ and then use that value to fetch the entry point of the function
-+ we're interested in.
-+
-+ */
-+
-+static int enable_break1_done = 0;
-+static int enable_break2_done = 0;
-+
-+static int
-+enable_break2 (void)
-+{
-+ int success = 0;
-+ char **bkpt_namep;
-+ asection *interp_sect;
-+
-+ if (!enable_break1_done || enable_break2_done)
-+ return 1;
-+
-+ enable_break2_done = 1;
-+
-+ /* First, remove all the solib event breakpoints. Their addresses
-+ may have changed since the last time we ran the program. */
-+ remove_solib_event_breakpoints ();
-+
-+ interp_text_sect_low = interp_text_sect_high = 0;
-+ interp_plt_sect_low = interp_plt_sect_high = 0;
-+
-+ /* Find the .interp section; if not found, warn the user and drop
-+ into the old breakpoint at symbol code. */
-+ interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
-+ if (interp_sect)
-+ {
-+ unsigned int interp_sect_size;
-+ gdb_byte *buf;
-+ bfd *tmp_bfd = NULL;
-+ int tmp_fd = -1;
-+ char *tmp_pathname = NULL;
-+ int status;
-+ CORE_ADDR addr, interp_loadmap_addr;
-+ gdb_byte addr_buf[BFIN_PTR_SIZE];
-+ struct int_elf32_fdpic_loadmap *ldm;
-+
-+ /* Read the contents of the .interp section into a local buffer;
-+ the contents specify the dynamic linker this program uses. */
-+ interp_sect_size = bfd_section_size (exec_bfd, interp_sect);
-+ buf = alloca (interp_sect_size);
-+ bfd_get_section_contents (exec_bfd, interp_sect,
-+ buf, 0, interp_sect_size);
-+
-+ /* Now we need to figure out where the dynamic linker was
-+ loaded so that we can load its symbols and place a breakpoint
-+ in the dynamic linker itself.
-+
-+ This address is stored on the stack. However, I've been unable
-+ to find any magic formula to find it for Solaris (appears to
-+ be trivial on GNU/Linux). Therefore, we have to try an alternate
-+ mechanism to find the dynamic linker's base address. */
-+
-+ tmp_fd = solib_open (buf, &tmp_pathname);
-+ if (tmp_fd >= 0)
-+ tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
-+
-+ if (tmp_bfd == NULL)
-+ {
-+ enable_break_failure_warning ();
-+ return 0;
-+ }
-+
-+ /* Make sure the dynamic linker is really a useful object. */
-+ if (!bfd_check_format (tmp_bfd, bfd_object))
-+ {
-+ warning ("Unable to grok dynamic linker %s as an object file", buf);
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+
-+ status = bfin_fdpic_loadmap_addresses (current_gdbarch,
-+ &interp_loadmap_addr, 0);
-+ if (status < 0)
-+ {
-+ warning ("Unable to determine dynamic linker loadmap address\n");
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "enable_break: interp_loadmap_addr = %s\n",
-+ hex_string_custom (interp_loadmap_addr, 8));
-+
-+ ldm = fetch_loadmap (interp_loadmap_addr);
-+ if (ldm == NULL)
-+ {
-+ warning ("Unable to load dynamic linker loadmap at address %s\n",
-+ hex_string_custom (interp_loadmap_addr, 8));
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+
-+ /* Record the relocated start and end address of the dynamic linker
-+ text and plt section for svr4_in_dynsym_resolve_code. */
-+ interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
-+ if (interp_sect)
-+ {
-+ interp_text_sect_low
-+ = bfd_section_vma (tmp_bfd, interp_sect);
-+ interp_text_sect_low
-+ += displacement_from_map (ldm, interp_text_sect_low);
-+ interp_text_sect_high
-+ = interp_text_sect_low + bfd_section_size (tmp_bfd, interp_sect);
-+ }
-+ interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");
-+ if (interp_sect)
-+ {
-+ interp_plt_sect_low =
-+ bfd_section_vma (tmp_bfd, interp_sect);
-+ interp_plt_sect_low
-+ += displacement_from_map (ldm, interp_plt_sect_low);
-+ interp_plt_sect_high =
-+ interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
-+ }
-+
-+ addr = bfd_lookup_symbol (tmp_bfd, "__dl_debug_addr");
-+ if (addr == 0)
-+ {
-+ warning ("Could not find symbol _dl_debug_addr in dynamic linker");
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "enable_break: _dl_debug_addr (prior to relocation) = %s\n",
-+ hex_string_custom (addr, 8));
-+
-+ addr += displacement_from_map (ldm, addr);
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "enable_break: _dl_debug_addr (after relocation) = %s\n",
-+ hex_string_custom (addr, 8));
-+
-+ /* Fetch the address of the r_debug struct. */
-+ if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
-+ {
-+ warning ("Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic linker",
-+ hex_string_custom (addr, 8));
-+ }
-+ addr = extract_unsigned_integer (addr_buf, sizeof addr_buf);
-+
-+ /* Fetch the r_brk field. It's 8 bytes from the start of
-+ _dl_debug_addr. */
-+ if (target_read_memory (addr + 8, addr_buf, sizeof addr_buf) != 0)
-+ {
-+ warning ("Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker",
-+ hex_string_custom (addr + 8, 8));
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+ addr = extract_unsigned_integer (addr_buf, sizeof addr_buf);
-+
-+ /* Now fetch the function entry point. */
-+ if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
-+ {
-+ warning ("Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from dynamic linker",
-+ hex_string_custom (addr, 8));
-+ enable_break_failure_warning ();
-+ bfd_close (tmp_bfd);
-+ return 0;
-+ }
-+ addr = extract_unsigned_integer (addr_buf, sizeof addr_buf);
-+
-+ /* We're done with the temporary bfd. */
-+ bfd_close (tmp_bfd);
-+
-+ /* We're also done with the loadmap. */
-+ xfree (ldm);
-+
-+ /* Now (finally!) create the solib breakpoint. */
-+ create_solib_event_breakpoint (addr);
-+
-+ return 1;
-+ }
-+
-+ /* Tell the user we couldn't set a dynamic linker breakpoint. */
-+ enable_break_failure_warning ();
-+
-+ /* Failure return. */
-+ return 0;
-+}
-+
-+static int
-+enable_break (void)
-+{
-+ asection *interp_sect;
-+
-+ /* Remove all the solib event breakpoints. Their addresses
-+ may have changed since the last time we ran the program. */
-+ remove_solib_event_breakpoints ();
-+
-+ /* Check for the presence of a .interp section. If there is no
-+ such section, the executable is statically linked. */
-+
-+ interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
-+
-+ if (interp_sect)
-+ {
-+ enable_break1_done = 1;
-+ create_solib_event_breakpoint (symfile_objfile->ei.entry_point);
-+
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "enable_break: solib event breakpoint placed at entry point: %s\n",
-+ hex_string_custom
-+ (symfile_objfile->ei.entry_point, 8));
-+ }
-+ else
-+ {
-+ if (solib_bfin_debug)
-+ fprintf_unfiltered (gdb_stdlog,
-+ "enable_break: No .interp section found.\n");
-+ }
-+
-+ return 1;
-+}
-+
-+/*
-+
-+ LOCAL FUNCTION
-+
-+ special_symbol_handling -- additional shared library symbol handling
-+
-+ SYNOPSIS
-+
-+ void special_symbol_handling ()
-+
-+ DESCRIPTION
-+
-+ Once the symbols from a shared object have been loaded in the usual
-+ way, we are called to do any system specific symbol handling that
-+ is needed.
-+
-+ */
-+
-+static void
-+bfin_special_symbol_handling (void)
-+{
-+ /* Nothing needed (yet) for FRV. */
-+}
-+
-+static void
-+bfin_relocate_main_executable (void)
-+{
-+ int status;
-+ CORE_ADDR exec_addr;
-+ struct int_elf32_fdpic_loadmap *ldm;
-+ struct cleanup *old_chain;
-+ struct section_offsets *new_offsets;
-+ int changed;
-+ struct obj_section *osect;
-+
-+ status = bfin_fdpic_loadmap_addresses (current_gdbarch, 0, &exec_addr);
-+
-+ if (status < 0)
-+ {
-+ /* Not using FDPIC ABI, so do nothing. */
-+ return;
-+ }
-+
-+ /* Fetch the loadmap located at ``exec_addr''. */
-+ ldm = fetch_loadmap (exec_addr);
-+ if (ldm == NULL)
-+ error ("Unable to load the executable's loadmap.");
-+
-+ if (main_executable_lm_info)
-+ xfree (main_executable_lm_info);
-+ main_executable_lm_info = xcalloc (1, sizeof (struct lm_info));
-+ main_executable_lm_info->map = ldm;
-+
-+ new_offsets = xcalloc (symfile_objfile->num_sections,
-+ sizeof (struct section_offsets));
-+ old_chain = make_cleanup (xfree, new_offsets);
-+ changed = 0;
-+
-+ ALL_OBJFILE_OSECTIONS (symfile_objfile, osect)
-+ {
-+ CORE_ADDR orig_addr, addr, offset;
-+ int osect_idx;
-+ int seg;
-+
-+ osect_idx = osect->the_bfd_section->index;
-+
-+ /* Current address of section. */
-+ addr = osect->addr;
-+ /* Offset from where this section started. */
-+ offset = ANOFFSET (symfile_objfile->section_offsets, osect_idx);
-+ /* Original address prior to any past relocations. */
-+ orig_addr = addr - offset;
-+
-+ for (seg = 0; seg < ldm->nsegs; seg++)
-+ {
-+ if (ldm->segs[seg].p_vaddr <= orig_addr
-+ && orig_addr < ldm->segs[seg].p_vaddr + ldm->segs[seg].p_memsz)
-+ {
-+ new_offsets->offsets[osect_idx]
-+ = ldm->segs[seg].addr - ldm->segs[seg].p_vaddr;
-+
-+ if (new_offsets->offsets[osect_idx] != offset)
-+ changed = 1;
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (changed)
-+ objfile_relocate (symfile_objfile, new_offsets);
-+
-+ do_cleanups (old_chain);
-+
-+ /* Now that symfile_objfile has been relocated, we can compute the
-+ GOT value and stash it away. */
-+ main_executable_lm_info->got_value = main_got ();
-+}
-+
-+/*
-+
-+ GLOBAL FUNCTION
-+
-+ bfin_solib_create_inferior_hook -- shared library startup support
-+
-+ SYNOPSIS
-+
-+ void bfin_solib_create_inferior_hook()
-+
-+ DESCRIPTION
-+
-+ When gdb starts up the inferior, it nurses it along (through the
-+ shell) until it is ready to execute it's first instruction. At this
-+ point, this function gets called via expansion of the macro
-+ SOLIB_CREATE_INFERIOR_HOOK.
-+
-+ For the BFIN shared library ABI (FDPIC), the main executable
-+ needs to be relocated. The shared library breakpoints also need
-+ to be enabled.
-+ */
-+
-+static void
-+bfin_solib_create_inferior_hook (void)
-+{
-+ /* Relocate main executable. */
-+ bfin_relocate_main_executable ();
-+
-+ /* Enable shared library breakpoints. */
-+ if (!enable_break ())
-+ {
-+ warning ("shared library handler failed to enable breakpoint");
-+ return;
-+ }
-+}
-+
-+static void
-+bfin_clear_solib (void)
-+{
-+ lm_base_cache = 0;
-+ enable_break1_done = 0;
-+ enable_break2_done = 0;
-+}
-+
-+static void
-+bfin_free_so (struct so_list *so)
-+{
-+ xfree (so->lm_info->map);
-+ xfree (so->lm_info->dyn_syms);
-+ xfree (so->lm_info->dyn_relocs);
-+ xfree (so->lm_info);
-+}
-+
-+static void
-+bfin_relocate_section_addresses (struct so_list *so,
-+ struct section_table *sec)
-+{
-+ int seg;
-+ struct int_elf32_fdpic_loadmap *map;
-+
-+ map = so->lm_info->map;
-+
-+ for (seg = 0; seg < map->nsegs; seg++)
-+ {
-+ if (map->segs[seg].p_vaddr <= sec->addr
-+ && sec->addr < map->segs[seg].p_vaddr + map->segs[seg].p_memsz)
-+ {
-+ CORE_ADDR displ = map->segs[seg].addr - map->segs[seg].p_vaddr;
-+ sec->addr += displ;
-+ sec->endaddr += displ;
-+ break;
-+ }
-+ }
-+}
-+
-+/* Return the GOT address associated with the main executable. Return
-+ 0 if it can't be found. */
-+
-+static CORE_ADDR
-+main_got (void)
-+{
-+ struct minimal_symbol *got_sym;
-+
-+ got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, symfile_objfile);
-+ if (got_sym == 0)
-+ return 0;
-+
-+ return SYMBOL_VALUE_ADDRESS (got_sym);
-+}
-+
-+/* Find the global pointer for the given function address ADDR. */
-+
-+CORE_ADDR
-+bfin_fdpic_find_global_pointer (CORE_ADDR addr)
-+{
-+ struct so_list *so;
-+
-+ so = master_so_list ();
-+ while (so)
-+ {
-+ int seg;
-+ struct int_elf32_fdpic_loadmap *map;
-+
-+ map = so->lm_info->map;
-+
-+ for (seg = 0; seg < map->nsegs; seg++)
-+ {
-+ if (map->segs[seg].addr <= addr
-+ && addr < map->segs[seg].addr + map->segs[seg].p_memsz)
-+ return so->lm_info->got_value;
-+ }
-+
-+ so = so->next;
-+ }
-+
-+ /* Didn't find it it any of the shared objects. So assume it's in the
-+ main executable. */
-+ return main_got ();
-+}
-+
-+/* Forward declarations for frv_fdpic_find_canonical_descriptor(). */
-+static CORE_ADDR find_canonical_descriptor_in_load_object
-+ (CORE_ADDR, CORE_ADDR, char *, bfd *, struct lm_info *);
-+
-+/* Given a function entry point, attempt to find the canonical descriptor
-+ associated with that entry point. Return 0 if no canonical descriptor
-+ could be found. */
-+
-+CORE_ADDR
-+bfin_fdpic_find_canonical_descriptor (CORE_ADDR entry_point)
-+{
-+ char *name;
-+ CORE_ADDR addr;
-+ CORE_ADDR got_value;
-+ struct int_elf32_fdpic_loadmap *ldm = 0;
-+ struct symbol *sym;
-+ int status;
-+ CORE_ADDR exec_loadmap_addr;
-+
-+ /* Fetch the corresponding global pointer for the entry point. */
-+ got_value = bfin_fdpic_find_global_pointer (entry_point);
-+
-+ /* Attempt to find the name of the function. If the name is available,
-+ it'll be used as an aid in finding matching functions in the dynamic
-+ symbol table. */
-+ sym = find_pc_function (entry_point);
-+ if (sym == 0)
-+ name = 0;
-+ else
-+ name = SYMBOL_LINKAGE_NAME (sym);
-+
-+ /* Check the main executable. */
-+ addr = find_canonical_descriptor_in_load_object
-+ (entry_point, got_value, name, symfile_objfile->obfd,
-+ main_executable_lm_info);
-+
-+ /* If descriptor not found via main executable, check each load object
-+ in list of shared objects. */
-+ if (addr == 0)
-+ {
-+ struct so_list *so;
-+
-+ so = master_so_list ();
-+ while (so)
-+ {
-+ addr = find_canonical_descriptor_in_load_object
-+ (entry_point, got_value, name, so->abfd, so->lm_info);
-+
-+ if (addr != 0)
-+ break;
-+
-+ so = so->next;
-+ }
-+ }
-+
-+ return addr;
-+}
-+
-+static CORE_ADDR
-+find_canonical_descriptor_in_load_object
-+ (CORE_ADDR entry_point, CORE_ADDR got_value, char *name, bfd *abfd,
-+ struct lm_info *lm)
-+{
-+ arelent *rel;
-+ unsigned int i;
-+ CORE_ADDR addr = 0;
-+
-+ /* Nothing to do if no bfd. */
-+ if (abfd == 0)
-+ return 0;
-+
-+ /* We want to scan the dynamic relocs for R_BFIN_FUNCDESC relocations.
-+ (More about this later.) But in order to fetch the relocs, we
-+ need to first fetch the dynamic symbols. These symbols need to
-+ be cached due to the way that bfd_canonicalize_dynamic_reloc()
-+ works. (See the comments in the declaration of struct lm_info
-+ for more information.) */
-+ if (lm->dyn_syms == NULL)
-+ {
-+ long storage_needed;
-+ unsigned int number_of_symbols;
-+
-+ /* Determine amount of space needed to hold the dynamic symbol table. */
-+ storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
-+
-+ /* If there are no dynamic symbols, there's nothing to do. */
-+ if (storage_needed <= 0)
-+ return 0;
-+
-+ /* Allocate space for the dynamic symbol table. */
-+ lm->dyn_syms = (asymbol **) xmalloc (storage_needed);
-+
-+ /* Fetch the dynamic symbol table. */
-+ number_of_symbols = bfd_canonicalize_dynamic_symtab (abfd, lm->dyn_syms);
-+
-+ if (number_of_symbols == 0)
-+ return 0;
-+ }
-+
-+ /* Fetch the dynamic relocations if not already cached. */
-+ if (lm->dyn_relocs == NULL)
-+ {
-+ long storage_needed;
-+
-+ /* Determine amount of space needed to hold the dynamic relocs. */
-+ storage_needed = bfd_get_dynamic_reloc_upper_bound (abfd);
-+
-+ /* Bail out if there are no dynamic relocs. */
-+ if (storage_needed <= 0)
-+ return 0;
-+
-+ /* Allocate space for the relocs. */
-+ lm->dyn_relocs = (arelent **) xmalloc (storage_needed);
-+
-+ /* Fetch the dynamic relocs. */
-+ lm->dyn_reloc_count
-+ = bfd_canonicalize_dynamic_reloc (abfd, lm->dyn_relocs, lm->dyn_syms);
-+ }
-+
-+ /* Search the dynamic relocs. */
-+ for (i = 0; i < lm->dyn_reloc_count; i++)
-+ {
-+ rel = lm->dyn_relocs[i];
-+
-+ /* Relocs of interest are those which meet the following
-+ criteria:
-+
-+ - the names match (assuming the caller could provide
-+ a name which matches ``entry_point'').
-+ - the relocation type must be R_BFIN_FUNCDESC. Relocs
-+ of this type are used (by the dynamic linker) to
-+ look up the address of a canonical descriptor (allocating
-+ it if need be) and initializing the GOT entry referred
-+ to by the offset to the address of the descriptor.
-+
-+ These relocs of interest may be used to obtain a
-+ candidate descriptor by first adjusting the reloc's
-+ address according to the link map and then dereferencing
-+ this address (which is a GOT entry) to obtain a descriptor
-+ address. */
-+ if ((name == 0 || strcmp (name, (*rel->sym_ptr_ptr)->name) == 0)
-+ && rel->howto->type == R_BFIN_FUNCDESC)
-+ {
-+ gdb_byte buf[BFIN_PTR_SIZE];
-+
-+ /* Compute address of address of candidate descriptor. */
-+ addr = rel->address + displacement_from_map (lm->map, rel->address);
-+
-+ /* Fetch address of candidate descriptor. */
-+ if (target_read_memory (addr, buf, sizeof buf) != 0)
-+ continue;
-+ addr = extract_unsigned_integer (buf, sizeof buf);
-+
-+ /* Check for matching entry point. */
-+ if (target_read_memory (addr, buf, sizeof buf) != 0)
-+ continue;
-+ if (extract_unsigned_integer (buf, sizeof buf) != entry_point)
-+ continue;
-+
-+ /* Check for matching got value. */
-+ if (target_read_memory (addr + 4, buf, sizeof buf) != 0)
-+ continue;
-+ if (extract_unsigned_integer (buf, sizeof buf) != got_value)
-+ continue;
-+
-+ /* Match was successful! Exit loop. */
-+ break;
-+ }
-+ }
-+
-+ return addr;
-+}
-+
-+static struct target_so_ops bfin_so_ops;
-+
-+void
-+_initialize_bfin_solib (void)
-+{
-+ bfin_so_ops.relocate_section_addresses = bfin_relocate_section_addresses;
-+ bfin_so_ops.free_so = bfin_free_so;
-+ bfin_so_ops.clear_solib = bfin_clear_solib;
-+ bfin_so_ops.solib_create_inferior_hook = bfin_solib_create_inferior_hook;
-+ bfin_so_ops.special_symbol_handling = bfin_special_symbol_handling;
-+ bfin_so_ops.current_sos = bfin_current_sos;
-+ bfin_so_ops.open_symbol_file_object = open_symbol_file_object;
-+ bfin_so_ops.in_dynsym_resolve_code = bfin_in_dynsym_resolve_code;
-+
-+ /* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */
-+ current_target_so_ops = &bfin_so_ops;
-+
-+ /* Debug this file's internals. */
-+ add_setshow_zinteger_cmd ("solib-bfin", class_maintenance,
-+ &solib_bfin_debug, _("\
-+Set internal debugging of shared library code for BFIN."), _("\
-+Show internal debugging of shared library code for BFIN."), _("\
-+When non-zero, BFIN solib specific internal debugging is enabled."),
-+ NULL,
-+ NULL, /* FIXME: i18n: */
-+ &setdebuglist, &showdebuglist);
-+}
-diff -Naur gdb-6.5.orig/gdb/testsuite/gdb.asm/asm-source.exp gdb-6.5/gdb/testsuite/gdb.asm/asm-source.exp
---- gdb-6.5.orig/gdb/testsuite/gdb.asm/asm-source.exp 2006-05-02 00:21:35.000000000 +0200
-+++ gdb-6.5/gdb/testsuite/gdb.asm/asm-source.exp 2009-01-22 08:19:21.000000000 +0100
-@@ -51,6 +51,15 @@
- "xscale-*-*" {
- set asm-arch arm
- }
-+ "bfin-*-elf" {
-+ set asm-arch bfin
-+ set debug-flags "-g"
-+ }
-+ "bfin-*-uclinux" {
-+ set asm-arch bfin
-+ set debug-flags "-g"
-+ append link-flags " -Wl,-elf2flt"
-+ }
- "d10v-*-*" {
- set asm-arch d10v
- }
-diff -Naur gdb-6.5.orig/gdb/testsuite/gdb.asm/bfin.inc gdb-6.5/gdb/testsuite/gdb.asm/bfin.inc
---- gdb-6.5.orig/gdb/testsuite/gdb.asm/bfin.inc 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/gdb/testsuite/gdb.asm/bfin.inc 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,44 @@
-+ comment "subroutine prologue"
-+ .macro gdbasm_enter
-+ LINK 12;
-+ .endm
-+
-+ comment "subroutine epilogue"
-+ .macro gdbasm_leave
-+ UNLINK;
-+ RTS;
-+ .endm
-+
-+ .macro gdbasm_call subr
-+ call \subr;
-+ .endm
-+
-+ .macro gdbasm_several_nops
-+ mnop;
-+ mnop;
-+ mnop;
-+ mnop;
-+ .endm
-+
-+ comment "exit (0)"
-+ .macro gdbasm_exit0
-+ R0 = 0;
-+ RAISE 0;
-+ .endm
-+
-+ comment "crt0 startup"
-+ .macro gdbasm_startup
-+ FP = 0;
-+ .endm
-+
-+ comment "Declare a data variable"
-+ .purgem gdbasm_datavar
-+ .macro gdbasm_datavar name value
-+ .data
-+ .align 4
-+ .type \name, @object
-+ .size \name, 4
-+\name:
-+ .long \value
-+ .endm
-+
-diff -Naur gdb-6.5.orig/include/gdb/sim-bfin.h gdb-6.5/include/gdb/sim-bfin.h
---- gdb-6.5.orig/include/gdb/sim-bfin.h 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/include/gdb/sim-bfin.h 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,84 @@
-+/* This file defines the interface between the Blackfin simulator and GDB.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU General Public License as
-+ published by the Free Software Foundation; either version 2 of the
-+ License, or (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+enum sim_bfin_regnum {
-+ SIM_BFIN_R0_REGNUM = 0,
-+ SIM_BFIN_R1_REGNUM,
-+ SIM_BFIN_R2_REGNUM,
-+ SIM_BFIN_R3_REGNUM,
-+ SIM_BFIN_R4_REGNUM,
-+ SIM_BFIN_R5_REGNUM,
-+ SIM_BFIN_R6_REGNUM,
-+ SIM_BFIN_R7_REGNUM,
-+ SIM_BFIN_P0_REGNUM,
-+ SIM_BFIN_P1_REGNUM,
-+ SIM_BFIN_P2_REGNUM,
-+ SIM_BFIN_P3_REGNUM,
-+ SIM_BFIN_P4_REGNUM,
-+ SIM_BFIN_P5_REGNUM,
-+ SIM_BFIN_SP_REGNUM,
-+ SIM_BFIN_FP_REGNUM,
-+ SIM_BFIN_I0_REGNUM,
-+ SIM_BFIN_I1_REGNUM,
-+ SIM_BFIN_I2_REGNUM,
-+ SIM_BFIN_I3_REGNUM,
-+ SIM_BFIN_M0_REGNUM,
-+ SIM_BFIN_M1_REGNUM,
-+ SIM_BFIN_M2_REGNUM,
-+ SIM_BFIN_M3_REGNUM,
-+ SIM_BFIN_B0_REGNUM,
-+ SIM_BFIN_B1_REGNUM,
-+ SIM_BFIN_B2_REGNUM,
-+ SIM_BFIN_B3_REGNUM,
-+ SIM_BFIN_L0_REGNUM,
-+ SIM_BFIN_L1_REGNUM,
-+ SIM_BFIN_L2_REGNUM,
-+ SIM_BFIN_L3_REGNUM,
-+ SIM_BFIN_A0_DOT_X_REGNUM,
-+ SIM_BFIN_AO_DOT_W_REGNUM,
-+ SIM_BFIN_A1_DOT_X_REGNUM,
-+ SIM_BFIN_A1_DOT_W_REGNUM,
-+ SIM_BFIN_ASTAT_REGNUM,
-+ SIM_BFIN_RETS_REGNUM,
-+ SIM_BFIN_LC0_REGNUM,
-+ SIM_BFIN_LT0_REGNUM,
-+ SIM_BFIN_LB0_REGNUM,
-+ SIM_BFIN_LC1_REGNUM,
-+ SIM_BFIN_LT1_REGNUM,
-+ SIM_BFIN_LB1_REGNUM,
-+ SIM_BFIN_CYCLES_REGNUM,
-+ SIM_BFIN_CYCLES2_REGNUM,
-+ SIM_BFIN_USP_REGNUM,
-+ SIM_BFIN_SEQSTAT_REGNUM,
-+ SIM_BFIN_SYSCFG_REGNUM,
-+ SIM_BFIN_RETI_REGNUM,
-+ SIM_BFIN_RETX_REGNUM,
-+ SIM_BFIN_RETN_REGNUM,
-+ SIM_BFIN_RETE_REGNUM,
-+ SIM_BFIN_PC_REGNUM,
-+ SIM_BFIN_CC_REGNUM,
-+ SIM_BFIN_EXTRA1,
-+ SIM_BFIN_EXTRA2,
-+ SIM_BFIN_EXTRA3,
-+ SIM_BFIN_IPEND_REGNUM
-+};
-+
-diff -Naur gdb-6.5.orig/sim/bfin/acconfig.h gdb-6.5/sim/bfin/acconfig.h
---- gdb-6.5.orig/sim/bfin/acconfig.h 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/acconfig.h 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,15 @@
-+
-+/* Define to 1 if NLS is requested. */
-+#undef ENABLE_NLS
-+
-+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
-+#undef HAVE_CATGETS
-+
-+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-+#undef HAVE_GETTEXT
-+
-+/* Define as 1 if you have the stpcpy function. */
-+#undef HAVE_STPCPY
-+
-+/* Define if your locale.h file contains LC_MESSAGES. */
-+#undef HAVE_LC_MESSAGES
-diff -Naur gdb-6.5.orig/sim/bfin/bfin-dis.c gdb-6.5/sim/bfin/bfin-dis.c
---- gdb-6.5.orig/sim/bfin/bfin-dis.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/bfin-dis.c 2009-01-22 08:21:17.000000000 +0100
-@@ -0,0 +1,3095 @@
-+/* Simulator for Analog Devices Blackfin processer.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of simulators.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <signal.h>
-+
-+#include "opcode/bfin.h"
-+#include "bfin-sim.h"
-+
-+/* HACK: Work around mingw32 lacking SIGTRAP */
-+#ifdef _WIN32
-+#ifndef SIGTRAP
-+#define SIGTRAP 5
-+#endif
-+#endif
-+
-+#define M_S2RND 1
-+#define M_T 2
-+#define M_W32 3
-+#define M_FU 4
-+#define M_TFU 6
-+#define M_IS 8
-+#define M_ISS2 9
-+#define M_IH 11
-+#define M_IU 12
-+
-+#define HOST_LONG_WORD_SIZE (sizeof(long)*8)
-+
-+#define SIGNEXTEND(v, n) (((bs32)v << (HOST_LONG_WORD_SIZE - (n))) >> (HOST_LONG_WORD_SIZE - (n)))
-+
-+/* For dealing with parallel instructions, we must avoid changing our register
-+ file until all parallel insns have been simulated. This queue of stores
-+ can be used to delay a modification.
-+ @@@ Should go and convert all 32 bit insns to use this. */
-+struct store {
-+ bu32 *addr;
-+ bu32 val;
-+};
-+
-+struct store stores[10];
-+int n_stores;
-+
-+#define STORE(X,Y) do { \
-+ stores[n_stores].addr = &(X); \
-+ stores[n_stores++].val = (Y); \
-+ } while (0)
-+
-+static __attribute__ ((noreturn)) void
-+unhandled_instruction (char *insn)
-+{
-+ fprintf(stderr, "Unhandled instruction \"%s\" ... aborting\n", insn);
-+ raise (SIGILL);
-+ abort ();
-+}
-+
-+static __attribute__ ((noreturn)) void
-+illegal_instruction ()
-+{
-+ fprintf(stderr, "Illegal instruction ... aborting\n");
-+ raise (SIGILL);
-+ abort ();
-+}
-+
-+static void
-+setflags_nz (bu32 val)
-+{
-+ saved_state.az = val == 0;
-+ saved_state.an = val >> 31;
-+}
-+
-+static void
-+setflags_nz_2x16 (bu32 val)
-+{
-+ saved_state.an = (bs16)val < 0 || (bs16)(val >> 16) < 0;
-+ saved_state.az = (bs16)val == 0 || (bs16)(val >> 16) == 0;
-+}
-+
-+static void
-+setflags_logical (bu32 val)
-+{
-+ setflags_nz (val);
-+ saved_state.ac0 = 0;
-+ saved_state.v = 0;
-+}
-+
-+static int
-+dagadd (int dagno, bs32 modify)
-+{
-+ bs32 i, l, b, val;
-+
-+ i = IREG (dagno);
-+ l = LREG (dagno);
-+ b = BREG (dagno);
-+ val = i;
-+
-+ if (l)
-+ {
-+ if (i + modify - b - l < 0 && modify > 0
-+ || i + modify - b >= 0 && modify < 0
-+ || modify == 0)
-+ val = i + modify;
-+ else if (i + modify - b - l >= 0 && modify > 0)
-+ val = i + modify - l;
-+ else if (i + modify - b < 0 && modify < 0)
-+ val = i + modify + l;
-+ }
-+ else
-+ val = i + modify;
-+
-+ STORE (IREG (dagno), val);
-+ return val;
-+}
-+
-+static int
-+dagsub (int dagno, bs32 modify)
-+{
-+ bs32 i, l, b, val;
-+
-+ i = IREG (dagno);
-+ l = LREG (dagno);
-+ b = BREG (dagno);
-+ val = i;
-+
-+ if (l)
-+ {
-+ if (i - modify - b - l < 0 && modify < 0
-+ || i - modify - b >= 0 && modify > 0
-+ || modify == 0)
-+ val = i - modify;
-+ else if (i - modify - b - l >= 0 && modify < 0)
-+ val = i - modify - l;
-+ else if (i - modify - b < 0 && modify > 0)
-+ val = i - modify + l;
-+ }
-+ else
-+ val = i - modify;
-+
-+ STORE (IREG (dagno), val);
-+ return val;
-+}
-+
-+static bu32
-+ashiftrt (bu32 val, int cnt, int size)
-+{
-+ int real_cnt = cnt > size ? size : cnt;
-+ bu32 sgn = ~((val >> (size - 1)) - 1);
-+ int sgncnt = size - real_cnt;
-+ if (sgncnt > 16)
-+ sgn <<= 16, sgncnt -= 16;
-+ sgn <<= sgncnt;
-+ if (real_cnt > 16)
-+ val >>= 16, real_cnt -= 16;
-+ val >>= real_cnt;
-+ val |= sgn;
-+ saved_state.an = val >> (size - 1);
-+ saved_state.az = val == 0;
-+ /* @@@ */
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+lshiftrt (bu32 val, int cnt, int size)
-+{
-+ int real_cnt = cnt > size ? size : cnt;
-+ if (real_cnt > 16)
-+ val >>= 16, real_cnt -= 16;
-+ val >>= real_cnt;
-+ saved_state.an = val >> (size - 1);
-+ saved_state.az = val == 0;
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+lshift (bu32 val, int cnt, int size, int saturate)
-+{
-+ int real_cnt = cnt > size ? size : cnt;
-+ int mask_cnt = size - real_cnt;
-+ bu32 sgn = ~((val >> (size - 1)) - 1);
-+ bu32 masked;
-+ bu32 mask = ~0;
-+ if (mask_cnt > 16)
-+ mask <<= 16, sgn <<= 16, mask_cnt -= 16;
-+ mask <<= mask_cnt;
-+ sgn <<= mask_cnt;
-+ masked = val & mask;
-+
-+ if (real_cnt > 16)
-+ val <<= 16, real_cnt -= 16;
-+ val <<= real_cnt;
-+ if (saturate && sgn != masked)
-+ {
-+ if (size == 32)
-+ val = sgn == 0 ? 0x7fffffff : 0x80000000;
-+ else
-+ val = sgn == 0 ? 0x7fff : 0x8000;
-+ }
-+ saved_state.an = val >> (size - 1);
-+ saved_state.az = val == 0;
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+add32 (bu32 a, bu32 b, int carry, int sat)
-+{
-+ int flgs = a >> 31;
-+ int flgo = b >> 31;
-+ bu32 v = a + b;
-+ int flgn = v >> 31;
-+ int overflow = (flgs ^ flgn) & (flgo ^ flgn);
-+ if (sat && overflow)
-+ {
-+ v = flgn ? 0x7fffffff : 0x80000000;
-+ /* Saturating insns are documented as not setting overflow. */
-+ overflow = 0;
-+ }
-+ saved_state.an = flgn;
-+ saved_state.vs |= overflow;
-+ saved_state.v = overflow;
-+ saved_state.v_internal |= overflow;
-+ saved_state.az = v == 0;
-+ if (carry)
-+ saved_state.ac0 = ~a < b;
-+ return v;
-+}
-+
-+static bu32
-+sub32 (bu32 a, bu32 b, int carry, int sat)
-+{
-+ int flgs = a >> 31;
-+ int flgo = b >> 31;
-+ bu32 v = a - b;
-+ int flgn = v >> 31;
-+ int overflow = (flgs ^ flgo) & (flgn ^ flgs);
-+ if (sat && overflow)
-+ {
-+ v = flgn ? 0x7fffffff : 0x80000000;
-+ /* Saturating insns are documented as not setting overflow. */
-+ overflow = 0;
-+ }
-+ saved_state.an = flgn;
-+ saved_state.vs |= overflow;
-+ saved_state.v = overflow;
-+ saved_state.v_internal |= overflow;
-+ saved_state.az = v == 0;
-+ if (carry)
-+ saved_state.ac0 = b <= a;
-+ return v;
-+}
-+
-+static bu32
-+add16 (bu32 a, bu32 b, int *carry, int sat)
-+{
-+ int flgs = (a >> 15) & 1;
-+ int flgo = (b >> 15) & 1;
-+ bu32 v = a + b;
-+ int flgn = (v >> 15) & 1;
-+ int overflow = (flgs ^ flgn) & (flgo ^ flgn);
-+ if (sat && overflow)
-+ {
-+ v = flgn ? 0x7fff : 0x8000;
-+ /* Saturating insns are documented as not setting overflow. */
-+ overflow = 0;
-+ }
-+ saved_state.an = flgn;
-+ saved_state.vs |= overflow;
-+ saved_state.v = overflow;
-+ saved_state.v_internal |= overflow;
-+ saved_state.az = v == 0;
-+ if (carry)
-+ *carry = (bu16)~a < (bu16)b;
-+ return v & 0xffff;
-+}
-+
-+static bu32
-+sub16 (bu32 a, bu32 b, int *carry, int sat)
-+{
-+ int flgs = (a >> 15) & 1;
-+ int flgo = (b >> 15) & 1;
-+ bu32 v = a - b;
-+ int flgn = (v >> 15) & 1;
-+ int overflow = (flgs ^ flgo) & (flgn ^ flgs);
-+ if (sat && overflow)
-+ {
-+ v = flgn ? 0x7fff : 0x8000;
-+ /* Saturating insns are documented as not setting overflow. */
-+ overflow = 0;
-+ }
-+ saved_state.an = flgn;
-+ saved_state.vs |= overflow;
-+ saved_state.v = overflow;
-+ saved_state.v_internal |= overflow;
-+ saved_state.az = v == 0;
-+ if (carry)
-+ *carry = (bu16)b <= (bu16)a;
-+ return v;
-+}
-+
-+static bu32
-+addadd16 (bu32 a, bu32 b, int sat, int x)
-+{
-+ int c0 = 0, c1 = 0;
-+ bu32 x0, x1;
-+ x0 = add16 ((a >> 16) & 0xffff, (b >> 16) & 0xffff, &c0, sat) & 0xffff;
-+ x1 = add16 (a & 0xffff, b & 0xffff, &c1, sat) & 0xffff;
-+ if (x == 0)
-+ return (x0 << 16) | x1;
-+ else
-+ return (x1 << 16) | x0;
-+}
-+
-+static bu32
-+subsub16 (bu32 a, bu32 b, int sat, int x)
-+{
-+ int c0 = 0, c1 = 0;
-+ bu32 x0, x1;
-+ x0 = sub16 ((a >> 16) & 0xffff, (b >> 16) & 0xffff, &c0, sat) & 0xffff;
-+ x1 = sub16 (a & 0xffff, b & 0xffff, &c1, sat) & 0xffff;
-+ if (x == 0)
-+ return (x0 << 16) | x1;
-+ else
-+ return (x1 << 16) | x0;
-+}
-+
-+static bu32
-+min32 (bu32 a, bu32 b)
-+{
-+ int val = a;
-+ if ((bs32)a > (bs32)b)
-+ val = b;
-+ setflags_nz (val);
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+max32 (bu32 a, bu32 b)
-+{
-+ int val = a;
-+ if ((bs32)a < (bs32)b)
-+ val = b;
-+ setflags_nz (val);
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+min2x16 (bu32 a, bu32 b)
-+{
-+ int val = a;
-+ if ((bs16)a > (bs16)b)
-+ val = (val & 0xFFFF0000) | (b & 0xFFFF);
-+ if ((bs16)(a >> 16) > (bs16)(b >> 16))
-+ val = (val & 0xFFFF) | (b & 0xFFFF0000);
-+ setflags_nz_2x16 (val);
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+max2x16 (bu32 a, bu32 b)
-+{
-+ int val = a;
-+ if ((bs16)a < (bs16)b)
-+ val = (val & 0xFFFF0000) | (b & 0xFFFF);
-+ if ((bs16)(a >> 16) < (bs16)(b >> 16))
-+ val = (val & 0xFFFF) | (b & 0xFFFF0000);
-+ setflags_nz_2x16 (val);
-+ saved_state.v = 0;
-+ return val;
-+}
-+
-+static bu32
-+add_and_shift (bu32 a, bu32 b, int shift)
-+{
-+ int v;
-+ saved_state.v_internal = 0;
-+ v = add32 (a, b, 0, 0);
-+ while (shift-- > 0)
-+ {
-+ int x = v >> 30;
-+ if (x == 1 || x == 2)
-+ saved_state.v_internal = 1;
-+ v <<= 1;
-+ }
-+ saved_state.v = saved_state.v_internal;
-+ saved_state.vs |= saved_state.v;
-+ return v;
-+}
-+
-+typedef enum
-+{
-+ c_0, c_1, c_4, c_2, c_uimm2, c_uimm3, c_imm3, c_pcrel4,
-+ c_imm4, c_uimm4s4, c_uimm4, c_uimm4s2, c_negimm5s4, c_imm5, c_uimm5, c_imm6,
-+ c_imm7, c_imm8, c_uimm8, c_pcrel8, c_uimm8s4, c_pcrel8s4, c_lppcrel10,
-+ c_pcrel10,
-+ c_pcrel12, c_imm16s4, c_luimm16, c_imm16, c_huimm16, c_rimm16, c_imm16s2,
-+ c_uimm16s4,
-+ c_uimm16, c_pcrel24,
-+} const_forms_t;
-+
-+static struct
-+{
-+ char *name;
-+ int nbits;
-+ char reloc;
-+ char issigned;
-+ char pcrel;
-+ char scale;
-+ char offset;
-+ char negative;
-+ char positive;
-+} constant_formats[] =
-+{
-+ { "0", 0, 0, 1, 0, 0, 0, 0, 0},
-+ { "1", 0, 0, 1, 0, 0, 0, 0, 0},
-+ { "4", 0, 0, 1, 0, 0, 0, 0, 0},
-+ { "2", 0, 0, 1, 0, 0, 0, 0, 0},
-+ { "uimm2", 2, 0, 0, 0, 0, 0, 0, 0},
-+ { "uimm3", 3, 0, 0, 0, 0, 0, 0, 0},
-+ { "imm3", 3, 0, 1, 0, 0, 0, 0, 0},
-+ { "pcrel4", 4, 1, 0, 1, 1, 0, 0, 0},
-+ { "imm4", 4, 0, 1, 0, 0, 0, 0, 0},
-+ { "uimm4s4", 4, 0, 0, 0, 2, 0, 0, 1},
-+ { "uimm4", 4, 0, 0, 0, 0, 0, 0, 0},
-+ { "uimm4s2", 4, 0, 0, 0, 1, 0, 0, 1},
-+ { "negimm5s4", 5, 0, 1, 0, 2, 0, 1, 0},
-+ { "imm5", 5, 0, 1, 0, 0, 0, 0, 0},
-+ { "uimm5", 5, 0, 0, 0, 0, 0, 0, 0},
-+ { "imm6", 6, 0, 1, 0, 0, 0, 0, 0},
-+ { "imm7", 7, 0, 1, 0, 0, 0, 0, 0},
-+ { "imm8", 8, 0, 1, 0, 0, 0, 0, 0},
-+ { "uimm8", 8, 0, 0, 0, 0, 0, 0, 0},
-+ { "pcrel8", 8, 1, 0, 1, 1, 0, 0, 0},
-+ { "uimm8s4", 8, 0, 0, 0, 2, 0, 0, 0},
-+ { "pcrel8s4", 8, 1, 1, 1, 2, 0, 0, 0},
-+ { "lppcrel10", 10, 1, 0, 1, 1, 0, 0, 0},
-+ { "pcrel10", 10, 1, 1, 1, 1, 0, 0, 0},
-+ { "pcrel12", 12, 1, 1, 1, 1, 0, 0, 0},
-+ { "imm16s4", 16, 0, 1, 0, 2, 0, 0, 0},
-+ { "luimm16", 16, 1, 0, 0, 0, 0, 0, 0},
-+ { "imm16", 16, 0, 1, 0, 0, 0, 0, 0},
-+ { "huimm16", 16, 1, 0, 0, 0, 0, 0, 0},
-+ { "rimm16", 16, 1, 1, 0, 0, 0, 0, 0},
-+ { "imm16s2", 16, 0, 1, 0, 1, 0, 0, 0},
-+ { "uimm16s4", 16, 0, 0, 0, 2, 0, 0, 0},
-+ { "uimm16", 16, 0, 0, 0, 0, 0, 0, 0},
-+ { "pcrel24", 24, 1, 1, 1, 1, 0, 0, 0},};
-+
-+static bu32
-+fmtconst (const_forms_t cf, bu32 x, bu32 pc)
-+{
-+ if (0 && constant_formats[cf].reloc)
-+ {
-+ bu32 ea = (((constant_formats[cf].pcrel
-+ ? SIGNEXTEND (x, constant_formats[cf].nbits)
-+ : x) + constant_formats[cf].offset)
-+ << constant_formats[cf].scale);
-+ if (constant_formats[cf].pcrel)
-+ ea += pc;
-+
-+ return ea;
-+ }
-+
-+ /* Negative constants have an implied sign bit. */
-+ if (constant_formats[cf].negative)
-+ {
-+ int nb = constant_formats[cf].nbits + 1;
-+ x = x | (1 << constant_formats[cf].nbits);
-+ x = SIGNEXTEND (x, nb);
-+ }
-+ else if (constant_formats[cf].issigned)
-+ x = SIGNEXTEND (x, constant_formats[cf].nbits);
-+
-+ x += constant_formats[cf].offset;
-+ x <<= constant_formats[cf].scale;
-+
-+ return x;
-+}
-+
-+#define uimm16s4(x) fmtconst(c_uimm16s4, x, 0)
-+#define pcrel4(x) fmtconst(c_pcrel4, x, pc)
-+#define pcrel8(x) fmtconst(c_pcrel8, x, pc)
-+#define pcrel8s4(x) fmtconst(c_pcrel8s4, x, pc)
-+#define pcrel10(x) fmtconst(c_pcrel10, x, pc)
-+#define pcrel12(x) fmtconst(c_pcrel12, x, pc)
-+#define negimm5s4(x) fmtconst(c_negimm5s4, x, 0)
-+#define rimm16(x) fmtconst(c_rimm16, x, 0)
-+#define huimm16(x) fmtconst(c_huimm16, x, 0)
-+#define imm16(x) fmtconst(c_imm16, x, 0)
-+#define uimm2(x) fmtconst(c_uimm2, x, 0)
-+#define uimm3(x) fmtconst(c_uimm3, x, 0)
-+#define luimm16(x) fmtconst(c_luimm16, x, 0)
-+#define uimm4(x) fmtconst(c_uimm4, x, 0)
-+#define uimm5(x) fmtconst(c_uimm5, x, 0)
-+#define imm16s2(x) fmtconst(c_imm16s2, x, 0)
-+#define uimm8(x) fmtconst(c_uimm8, x, 0)
-+#define imm16s4(x) fmtconst(c_imm16s4, x, 0)
-+#define uimm4s2(x) fmtconst(c_uimm4s2, x, 0)
-+#define uimm4s4(x) fmtconst(c_uimm4s4, x, 0)
-+#define lppcrel10(x) fmtconst(c_lppcrel10, x, pc)
-+#define imm3(x) fmtconst(c_imm3, x, 0)
-+#define imm4(x) fmtconst(c_imm4, x, 0)
-+#define uimm8s4(x) fmtconst(c_uimm8s4, x, 0)
-+#define imm5(x) fmtconst(c_imm5, x, 0)
-+#define imm6(x) fmtconst(c_imm6, x, 0)
-+#define imm7(x) fmtconst(c_imm7, x, 0)
-+#define imm8(x) fmtconst(c_imm8, x, 0)
-+#define pcrel24(x) fmtconst(c_pcrel24, x, pc)
-+#define uimm16(x) fmtconst(c_uimm16, x, 0)
-+
-+static bu32 *
-+get_allreg (int grp, int reg)
-+{
-+ int fullreg = (grp << 3) | reg;
-+ /* REG_R0, REG_R1, REG_R2, REG_R3, REG_R4, REG_R5, REG_R6, REG_R7,
-+ REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_SP, REG_FP,
-+ REG_I0, REG_I1, REG_I2, REG_I3, REG_M0, REG_M1, REG_M2, REG_M3,
-+ REG_B0, REG_B1, REG_B2, REG_B3, REG_L0, REG_L1, REG_L2, REG_L3,
-+ REG_A0x, REG_A0w, REG_A1x, REG_A1w, , , REG_ASTAT, REG_RETS,
-+ , , , , , , , ,
-+ REG_LC0, REG_LT0, REG_LB0, REG_LC1, REG_LT1, REG_LB1, REG_CYCLES,
-+ REG_CYCLES2,
-+ REG_USP, REG_SEQSTAT, REG_SYSCFG, REG_RETI, REG_RETX, REG_RETN, REG_RETE,
-+ REG_LASTREG */
-+ switch (fullreg >> 2)
-+ {
-+ case 0: case 1: return &DREG (reg); break;
-+ case 2: case 3: return &PREG (reg); break;
-+ case 4: return &IREG (reg & 3); break;
-+ case 5: return &MREG (reg & 3); break;
-+ case 6: return &BREG (reg & 3); break;
-+ case 7: return &LREG (reg & 3); break;
-+ default:
-+ switch (fullreg)
-+ {
-+ case 32: return &saved_state.a0x;
-+ case 33: return &saved_state.a0w;
-+ case 34: return &saved_state.a1x;
-+ case 35: return &saved_state.a1w;
-+ case 39: return &saved_state.rets;
-+ case 48: return &LC0REG;
-+ case 49: return <0REG;
-+ case 50: return &LB0REG;
-+ case 51: return &LC1REG;
-+ case 52: return <1REG;
-+ case 53: return &LB1REG;
-+ }
-+ return 0;
-+ }
-+}
-+
-+/* Perform a multiplication, sign- or zero-extending the result to 64 bit. */
-+static bu64
-+decode_multfunc (int h0, int h1, int src0, int src1, int mmod, int MM)
-+{
-+ bu32 s0 = DREG (src0), s1 = DREG (src1);
-+ bu32 sgn0, sgn1;
-+ bu32 val;
-+ bu64 val1;
-+
-+ if (h0)
-+ s0 >>= 16;
-+
-+ if (h1)
-+ s1 >>= 16;
-+
-+ s0 &= 0xffff;
-+ s1 &= 0xffff;
-+
-+ sgn0 = -(s0 & 0x8000);
-+ sgn1 = -(s1 & 0x8000);
-+
-+ if (MM)
-+ s0 |= sgn0;
-+ else switch (mmod)
-+ {
-+ case 0:
-+ case M_S2RND:
-+ case M_T:
-+ case M_IS:
-+ case M_ISS2:
-+ case M_IH:
-+ s0 |= sgn0;
-+ s1 |= sgn1;
-+ break;
-+ case M_FU:
-+ case M_IU:
-+ case M_TFU:
-+ break;
-+ default:
-+ abort ();
-+ }
-+
-+ val = s0 * s1;
-+ /* Perform shift correction if appropriate for the mode. */
-+ if (mmod == 0 || mmod == M_T || mmod == M_S2RND)
-+ {
-+ if (val == 0x40000000)
-+ val = 0x7fffffff;
-+ else
-+ val <<= 1;
-+ }
-+
-+ val1 = val;
-+ if (mmod == 0 || mmod == M_IS || mmod == M_T || mmod == M_S2RND
-+ || mmod == M_ISS2 || mmod == M_IH)
-+ val1 |= -(val1 & 0x80000000);
-+
-+ return val1;
-+}
-+
-+static bu32
-+saturate_s32 (bu64 val)
-+{
-+ if ((bs64)val < -0x80000000ll)
-+ return 0x80000000;
-+ if ((bs64)val > 0x7fffffff)
-+ return 0x7fffffff;
-+ return val;
-+}
-+
-+static bu32
-+saturate_s16 (bu64 val)
-+{
-+ if ((bs64)val < -0x8000ll)
-+ return 0x8000;
-+ if ((bs64)val > 0x7fff)
-+ return 0x7fff;
-+ return val & 0xffff;
-+}
-+
-+static bu32
-+saturate_u32 (bu64 val)
-+{
-+ if (val > 0xffffffff)
-+ return 0xffffffff;
-+ return val;
-+}
-+
-+static bu32
-+saturate_u16 (bu64 val)
-+{
-+ if (val > 0xffff)
-+ return 0xffff;
-+ return val;
-+}
-+
-+static bu64
-+rnd16 (bu64 val)
-+{
-+ bu64 sgnbits;
-+
-+ /* FIXME: Should honour rounding mode. */
-+ if ((val & 0xffff) > 0x8000
-+ || ((val & 0xffff) == 0x8000 && (val & 0x10000)))
-+ val += 0x8000;
-+
-+ sgnbits = val & 0xffff000000000000ull;
-+ val >>= 16;
-+ return val | sgnbits;
-+}
-+
-+static bu64
-+trunc16 (bu64 val)
-+{
-+ bu64 sgnbits = val & 0xffff000000000000ull;
-+ val >>= 16;
-+ return val | sgnbits;
-+}
-+
-+static int
-+signbits (bu64 val, int size)
-+{
-+ bu64 mask = (bu64)1 << (size - 1);
-+ bu64 bit = val & mask;
-+ int count = 0;
-+ for (;;)
-+ {
-+ mask >>= 1;
-+ bit >>= 1;
-+ if (mask == 0)
-+ return count;
-+ if ((val & mask) != bit)
-+ return count;
-+ count++;
-+ }
-+}
-+
-+/* Extract a 16 or 32 bit value from a 64 bit multiplication result.
-+ These 64 bits must be sign- or zero-extended properly from the source
-+ we want to extract, either a 32 bit multiply or a 40 bit accumulator. */
-+
-+static bu32
-+extract_mult (bu64 res, int mmod, int fullword)
-+{
-+ if (fullword)
-+ switch (mmod)
-+ {
-+ case 0:
-+ case M_IS:
-+ return saturate_s32 (res);
-+ case M_FU:
-+ return saturate_u32 (res);
-+ case M_S2RND:
-+ case M_ISS2:
-+ return saturate_s32 (res << 1);
-+ default:
-+ abort ();
-+ }
-+ else
-+ switch (mmod)
-+ {
-+ case 0:
-+ case M_IH:
-+ return saturate_s16 (rnd16 (res));
-+ case M_IS:
-+ return saturate_s16 (res);
-+ case M_FU:
-+ return saturate_u16 (rnd16 (res));
-+ case M_IU:
-+ return saturate_u16 (res);
-+
-+ case M_T:
-+ return saturate_s16 (trunc16 (res));
-+ case M_TFU:
-+ return saturate_u16 (trunc16 (res));
-+
-+ case M_S2RND:
-+ return saturate_s16 (rnd16 (res << 1));
-+ case M_ISS2:
-+ return saturate_s16 (res << 1);
-+ default:
-+ abort ();
-+ }
-+}
-+
-+static bu32
-+decode_macfunc (int which, int op, int h0, int h1, int src0, int src1,
-+ int mmod, int MM, int fullword)
-+{
-+ bu32 *ax, *aw;
-+ bu64 acc;
-+
-+ ax = which ? &A1XREG : &A0XREG;
-+ aw = which ? &A1WREG : &A0WREG;
-+ acc = (((bu64)*ax << 32) | ((bu64)*aw)) & 0xFFFFFFFFFFull;
-+
-+ /* Sign extend accumulator if necessary. */
-+ if (mmod == 0 || mmod == M_T || mmod == M_IS || mmod == M_ISS2
-+ || mmod == M_S2RND)
-+ acc |= -(acc & 0x80000000);
-+
-+ if (op != 3)
-+ {
-+ bu64 res = decode_multfunc (h0, h1, src0, src1, mmod, MM);
-+
-+ /* Perform accumulation. */
-+ switch (op)
-+ {
-+ case 0:
-+ acc = res;
-+ break;
-+ case 1:
-+ acc = acc + res;
-+ break;
-+ case 2:
-+ acc = acc - res;
-+ break;
-+ }
-+
-+ /* Saturate. */
-+ switch (mmod)
-+ {
-+ case 0:
-+ case M_T:
-+ case M_IS:
-+ case M_ISS2:
-+ case M_S2RND:
-+ if ((bs64)acc < -0x8000000000ll)
-+ acc = -0x8000000000ull;
-+ else if ((bs64)acc >= 0x7fffffffffll)
-+ acc = 0x7fffffffffull;
-+ break;
-+ case M_TFU:
-+ case M_FU:
-+ case M_IU:
-+ if (acc > 0xFFFFFFFFFFull)
-+ acc = 0xFFFFFFFFFFull;
-+ break;
-+ default:
-+ abort ();
-+ }
-+ }
-+
-+ if (which)
-+ {
-+ STORE (A1XREG, (acc >> 32) & 0xff);
-+ STORE (A1WREG, acc & 0xffffffff);
-+ }
-+ else
-+ {
-+ STORE (A0XREG, (acc >> 32) & 0xff);
-+ STORE (A0WREG, acc & 0xffffffff);
-+ }
-+
-+ return extract_mult (acc, mmod, fullword);
-+}
-+
-+static void
-+decode_ProgCtrl_0 (bu16 iw0)
-+{
-+ /* ProgCtrl
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |.prgfunc.......|.poprnd........|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int poprnd = ((iw0 >> 0) & 0xf);
-+ int prgfunc = ((iw0 >> 4) & 0xf);
-+
-+ if (prgfunc == 0 && poprnd == 0)
-+ /* NOP */
-+ PCREG += 2;
-+ else if (prgfunc == 1 && poprnd == 0)
-+ /* RTS */
-+ PCREG = saved_state.rets;
-+ else if (prgfunc == 1 && poprnd == 1)
-+ unhandled_instruction ("RTI");
-+ else if (prgfunc == 1 && poprnd == 2)
-+ unhandled_instruction ("RTX");
-+ else if (prgfunc == 1 && poprnd == 3)
-+ unhandled_instruction ("RTN");
-+ else if (prgfunc == 1 && poprnd == 4)
-+ unhandled_instruction ("RTE");
-+ else if (prgfunc == 2 && poprnd == 0)
-+ unhandled_instruction ("IDLE");
-+ else if (prgfunc == 2 && poprnd == 3)
-+ unhandled_instruction ("CSYNC");
-+ else if (prgfunc == 2 && poprnd == 4)
-+ unhandled_instruction ("SSYNC");
-+ else if (prgfunc == 2 && poprnd == 5)
-+ unhandled_instruction ("EMUEXCPT");
-+ else if (prgfunc == 3)
-+ unhandled_instruction ("CLI dregs");
-+ else if (prgfunc == 4)
-+ unhandled_instruction ("STI dregs");
-+ else if (prgfunc == 5)
-+ {
-+ /* JUMP (pregs) */
-+ PCREG = PREG (poprnd);
-+ did_jump = 1;
-+ }
-+ else if (prgfunc == 6)
-+ {
-+ /* CALL (pregs) */
-+ saved_state.rets = PCREG + 2;
-+ PCREG = PREG (poprnd);
-+ did_jump = 1;
-+ }
-+ else if (prgfunc == 7)
-+ {
-+ /* CALL (PC + pregs) */
-+ saved_state.rets = PCREG + 2;
-+ PCREG = PCREG + PREG (poprnd);
-+ did_jump = 1;
-+ }
-+ else if (prgfunc == 8)
-+ {
-+ /* JUMP (PC + pregs) */
-+ PCREG = PCREG + PREG (poprnd);
-+ did_jump = 1;
-+ }
-+ else if (prgfunc == 9)
-+ {
-+ /* RAISE uimm4 */
-+ bfin_trap ();
-+ PCREG += 2;
-+ }
-+ else if (prgfunc == 10)
-+ {
-+ /* EXCPT uimm4 */
-+ if(uimm4 (poprnd) == 1)
-+ raise_exception(SIGTRAP);
-+ else
-+ unhandled_instruction ("unhandled exception");
-+ }
-+ else if (prgfunc == 11)
-+ unhandled_instruction ("TESTSET");
-+ else
-+ illegal_instruction ();
-+}
-+
-+static void
-+decode_CaCTRL_0 (bu16 iw0)
-+{
-+ /* CaCTRL
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |.a.|.op....|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int a = ((iw0 >> 5) & 0x1);
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int op = ((iw0 >> 3) & 0x3);
-+
-+ if (a == 0 && op == 0)
-+ unhandled_instruction ("PREFETCH [pregs]");
-+ else if (a == 0 && op == 1)
-+ unhandled_instruction ("FLUSHINV [pregs]");
-+ else if (a == 0 && op == 2)
-+ unhandled_instruction ("FLUSH [pregs]");
-+ else if (a == 0 && op == 3)
-+ unhandled_instruction ("IFLUSH [pregs]");
-+ else if (a == 1 && op == 0)
-+ unhandled_instruction ("PREFETCH [pregs++]");
-+ else if (a == 1 && op == 1)
-+ unhandled_instruction ("FLUSHINV [pregs++]");
-+ else if (a == 1 && op == 2)
-+ unhandled_instruction ("FLUSH [pregs++]");
-+ else if (a == 1 && op == 3)
-+ unhandled_instruction ("IFLUSH [pregs++]");
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_PushPopReg_0 (bu16 iw0)
-+{
-+ /* PushPopReg
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |.W.|.grp.......|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int grp = ((iw0 >> 3) & 0x7);
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int W = ((iw0 >> 6) & 0x1);
-+ bu32 *whichreg = get_allreg (grp, reg);
-+
-+ if (whichreg == 0)
-+ unhandled_instruction ("push/pop");
-+
-+ if (W == 0)
-+ {
-+ /* allregs = [SP++] */
-+ *whichreg = get_long (saved_state.memory, PREG (6));
-+ PREG (6) += 4;
-+ }
-+ else
-+ {
-+ /* [--SP] = allregs */
-+ PREG (6) -= 4;
-+ put_long (saved_state.memory, PREG (6), *whichreg);
-+ }
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_PushPopMultiple_0 (bu16 iw0)
-+{
-+ /* PushPopMultiple
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 1 | 0 |.d.|.p.|.W.|.dr........|.pr........|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int p = ((iw0 >> 7) & 0x1);
-+ int pr = ((iw0 >> 0) & 0x7);
-+ int d = ((iw0 >> 8) & 0x1);
-+ int dr = ((iw0 >> 3) & 0x7);
-+ int W = ((iw0 >> 6) & 0x1);
-+ int i;
-+ bu32 sp = PREG (6);
-+
-+ if ((d == 0 && p == 0)
-+ || (p && imm5 (pr) > 5))
-+ illegal_instruction ();
-+
-+ if (W == 1)
-+ {
-+ if (d)
-+ for (i = dr; i < 8; i++)
-+ {
-+ sp -= 4;
-+ put_long (saved_state.memory, sp, DREG (i));
-+ }
-+ if (p)
-+ for (i = pr; i < 6; i++)
-+ {
-+ sp -= 4;
-+ put_long (saved_state.memory, sp, PREG (i));
-+ }
-+ }
-+ else
-+ {
-+ if (p)
-+ for (i = 5; i >= pr; i--)
-+ {
-+ PREG (i) = get_long (saved_state.memory, sp);
-+ sp += 4;
-+ }
-+ if (d)
-+ for (i = 7; i >= dr; i--)
-+ {
-+ DREG (i) = get_long (saved_state.memory, sp);
-+ sp += 4;
-+ }
-+ }
-+ PREG (6) = sp;
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_ccMV_0 (bu16 iw0)
-+{
-+ /* ccMV
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 1 | 1 |.T.|.d.|.s.|.dst.......|.src.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 0) & 0x7);
-+ int dst = ((iw0 >> 3) & 0x7);
-+ int s = ((iw0 >> 6) & 0x1);
-+ int d = ((iw0 >> 7) & 0x1);
-+ int T = ((iw0 >> 8) & 0x1);
-+ int cond = T ? CCREG : ! CCREG;
-+ if (cond)
-+ GREG (dst, d) = GREG (src, s);
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_CCflag_0 (bu16 iw0)
-+{
-+ /* CCflag
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 1 |.I.|.opc.......|.G.|.y.........|.x.........|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int x = ((iw0 >> 0) & 0x7);
-+ int y = ((iw0 >> 3) & 0x7);
-+ int I = ((iw0 >> 10) & 0x1);
-+ int opc = ((iw0 >> 7) & 0x7);
-+ int G = ((iw0 >> 6) & 0x1);
-+
-+ if (opc > 4)
-+ {
-+ if (opc == 5 && I == 0 && G == 0)
-+ unhandled_instruction ("CC = A0 == A1");
-+ else if (opc == 6 && I == 0 && G == 0)
-+ unhandled_instruction ("CC = A0 < A1");
-+ else if (opc == 7 && I == 0 && G == 0)
-+ unhandled_instruction ("CC = A0 <= A1");
-+ }
-+ else
-+ {
-+ int issigned = opc < 3;
-+ bu32 srcop = G ? PREG (x) : DREG (x);
-+ bu32 dstop = I ? (issigned ? imm3 (y) : uimm3 (y)) : G ? PREG (y) : DREG (y);
-+ int flgs = srcop >> 31;
-+ int flgo = dstop >> 31;
-+
-+ bu32 result = srcop - dstop;
-+ int flgn = result >> 31;
-+ int overflow = (flgs ^ flgo) & (flgn ^ flgs);
-+
-+ saved_state.az = result == 0;
-+ saved_state.an = flgn;
-+ saved_state.ac0 = srcop < dstop;
-+ switch (opc)
-+ {
-+ case 0: /* == */
-+ CCREG = saved_state.az;
-+ break;
-+ case 1: /* <, signed */
-+ CCREG = (flgn && !overflow) || (!flgn && overflow);
-+ break;
-+ case 2: /* <=, signed */
-+ CCREG = (flgn && !overflow) || (!flgn && overflow) || saved_state.az;
-+ break;
-+ case 3: /* <, unsigned */
-+ CCREG = saved_state.ac0;
-+ break;
-+ case 4: /* <=, unsigned */
-+ CCREG = saved_state.ac0 | saved_state.az;
-+ break;
-+ }
-+ }
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_CC2dreg_0 (bu16 iw0)
-+{
-+ /* CC2dreg
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |.op....|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int op = ((iw0 >> 3) & 0x3);
-+
-+ if (op == 0)
-+ /* dregs = CC */
-+ DREG (reg) = CCREG;
-+ else if (op == 1)
-+ /* CC = dregs */
-+ CCREG = DREG (reg) != 0;
-+ else if (op == 3)
-+ /* CC = !CC */
-+ CCREG = !CCREG;
-+ else
-+ illegal_instruction ();
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_CC2stat_0 (bu16 iw0)
-+{
-+ /* CC2stat
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |.D.|.op....|.cbit..............|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int cbit = ((iw0 >> 0) & 0x1f);
-+ int D = ((iw0 >> 7) & 0x1);
-+ int op = ((iw0 >> 5) & 0x3);
-+ int *pval;
-+
-+ switch (cbit)
-+ {
-+ case 0: pval = &saved_state.az; break;
-+ case 1: pval = &saved_state.an; break;
-+ case 6: pval = &saved_state.aq; break;
-+ case 12: pval = &saved_state.ac0; break;
-+ case 13: pval = &saved_state.ac1; break;
-+ case 16: pval = &saved_state.av0; break;
-+ case 17: pval = &saved_state.av0s; break;
-+ case 18: pval = &saved_state.av1; break;
-+ case 19: pval = &saved_state.av1s; break;
-+ case 24: pval = &saved_state.v; break;
-+ case 25: pval = &saved_state.vs; break;
-+ default:
-+ illegal_instruction ();
-+ }
-+
-+ if (D == 0)
-+ switch (op)
-+ {
-+ case 0: CCREG = *pval; break;
-+ case 1: CCREG |= *pval; break;
-+ case 2: CCREG &= *pval; break;
-+ case 3: CCREG ^= *pval; break;
-+ }
-+ else
-+ switch (op)
-+ {
-+ case 0: *pval = CCREG; break;
-+ case 1: *pval |= CCREG; break;
-+ case 2: *pval &= CCREG; break;
-+ case 3: *pval ^= CCREG; break;
-+ }
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_BRCC_0 (bu16 iw0, bu32 pc)
-+{
-+ /* BRCC
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 0 | 1 |.T.|.B.|.offset................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int B = ((iw0 >> 10) & 0x1);
-+ int T = ((iw0 >> 11) & 0x1);
-+ int offset = ((iw0 >> 0) & 0x3ff);
-+
-+ /* B is just the branch predictor hint - we can ignore it. */
-+
-+ /* IF CC JUMP pcrel10 */
-+ if (CCREG == T)
-+ {
-+ PCREG += pcrel10 (offset);
-+ did_jump = 1;
-+ }
-+ else
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_UJUMP_0 (bu16 iw0, bu32 pc)
-+{
-+ /* UJUMP
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 1 | 0 |.offset........................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int offset = ((iw0 >> 0) & 0xfff);
-+
-+ /* JUMP.S pcrel12 */
-+ PCREG += pcrel12 (offset);
-+ did_jump = 1;
-+}
-+
-+static void
-+decode_REGMV_0 (bu16 iw0)
-+{
-+ /* REGMV
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 0 | 1 | 1 |.gd........|.gs........|.dst.......|.src.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 0) & 0x7);
-+ int gs = ((iw0 >> 6) & 0x7);
-+ int dst = ((iw0 >> 3) & 0x7);
-+ int gd = ((iw0 >> 9) & 0x7);
-+ bu32 *srcreg = get_allreg (gs, src);
-+ bu32 *dstreg = get_allreg (gd, dst);
-+
-+ if (srcreg == 0 || dstreg == 0)
-+ unhandled_instruction ("reg move");
-+
-+ *dstreg = *srcreg;
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_ALU2op_0 (bu16 iw0)
-+{
-+ /* ALU2op
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 0 | 0 | 0 | 0 |.opc...........|.src.......|.dst.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 3) & 0x7);
-+ int opc = ((iw0 >> 6) & 0xf);
-+ int dst = ((iw0 >> 0) & 0x7);
-+
-+ if (opc == 0)
-+ /* dregs >>>= dregs */
-+ DREG (dst) = ashiftrt (DREG (dst), DREG (src), 32);
-+ else if (opc == 1)
-+ /* dregs >>= dregs */
-+ DREG (dst) = lshiftrt (DREG (dst), DREG (src), 32);
-+ else if (opc == 2)
-+ /* dregs <<= dregs */
-+ DREG (dst) = lshift (DREG (dst), DREG (src), 32, 0);
-+ else if (opc == 3)
-+ /* dregs *= dregs */
-+ DREG (dst) *= DREG (src);
-+ else if (opc == 4)
-+ /* dregs = (dregs + dregs) << 1 */
-+ DREG (dst) = add_and_shift (DREG (dst), DREG (src), 1);
-+ else if (opc == 5)
-+ /* dregs = (dregs + dregs) << 2 */
-+ DREG (dst) = add_and_shift (DREG (dst), DREG (src), 2);
-+ else if (opc == 8)
-+ unhandled_instruction ("DIVQ (dregs , dregs)");
-+ else if (opc == 9)
-+ unhandled_instruction ("DIVS (dregs , dregs)");
-+ else if (opc == 10)
-+ {
-+ /* dregs = dregs_lo (X) */
-+ DREG (dst) = (bs32) (bs16) DREG (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 11)
-+ {
-+ /* dregs = dregs_lo (Z) */
-+ DREG (dst) = (bu32) (bu16) DREG (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 12)
-+ {
-+ /* dregs = dregs_byte (X) */
-+ DREG (dst) = (bs32) (bs8) DREG (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 13)
-+ {
-+ /* dregs = dregs_byte (Z) */
-+ DREG (dst) = (bu32) (bu8) DREG (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 14)
-+ {
-+ /* dregs = - dregs */
-+ bu32 val = DREG (src);
-+ DREG (dst) = -val;
-+ setflags_nz (DREG (dst));
-+ if (val == 0x80000000)
-+ saved_state.v = saved_state.vs = 1;
-+ /* @@@ Documentation isn't entirely clear about av0 and av1. */
-+ }
-+ else if (opc == 15)
-+ {
-+ /* dregs = ~ dregs */
-+ DREG (dst) = ~DREG (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else
-+ illegal_instruction ();
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_PTR2op_0 (bu16 iw0)
-+{
-+ /* PTR2op
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 0 | 0 | 0 | 1 | 0 |.opc.......|.src.......|.dst.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 3) & 0x7);
-+ int opc = ((iw0 >> 6) & 0x7);
-+ int dst = ((iw0 >> 0) & 0x7);
-+
-+ if (opc == 0)
-+ PREG (dst) -= PREG (src);
-+ else if (opc == 1)
-+ PREG (dst) = PREG (src) << 2;
-+ else if (opc == 3)
-+ PREG (dst) = PREG (src) >> 2;
-+ else if (opc == 4)
-+ PREG (dst) = PREG (src) >> 1;
-+ else if (opc == 5)
-+ unhandled_instruction ("pregs += pregs ( BREV )");
-+ else if (opc == 6)
-+ PREG (dst) = (PREG (dst) + PREG (src)) << 1;
-+ else if (opc == 7)
-+ PREG (dst) = (PREG (dst) + PREG (src)) << 2;
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LOGI2op_0 (bu16 iw0)
-+{
-+ /* LOGI2op
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 0 | 0 | 1 |.opc.......|.src...............|.dst.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 3) & 0x1f);
-+ int opc = ((iw0 >> 8) & 0x7);
-+ int dst = ((iw0 >> 0) & 0x7);
-+
-+ if (opc == 0)
-+ /* CC = ! BITTST (dregs, uimm5) */
-+ CCREG = (~DREG (dst) >> uimm5 (src)) & 1;
-+ else if (opc == 1)
-+ /* CC = BITTST (dregs, uimm5) */
-+ CCREG = (DREG (dst) >> uimm5 (src)) & 1;
-+ else if (opc == 2)
-+ {
-+ /* BITSET (dregs, uimm5) */
-+ DREG (dst) |= 1 << uimm5 (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 3)
-+ {
-+ /* BITTGL (dregs, uimm5) */
-+ DREG (dst) ^= 1 << uimm5 (src);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 4)
-+ {
-+ /* BITCLR (dregs, uimm5) */
-+ DREG (dst) &= ~(1 << uimm5 (src));
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 5)
-+ /* dregs >>>= uimm5 */
-+ DREG (dst) = ashiftrt (DREG (dst), uimm5 (src), 32);
-+ else if (opc == 6)
-+ /* dregs >>= uimm5 */
-+ DREG (dst) = lshiftrt (DREG (dst), uimm5 (src), 32);
-+ else if (opc == 7)
-+ /* dregs <<= uimm5 */
-+ DREG (dst) = lshift (DREG (dst), uimm5 (src), 32, 0);
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_COMP3op_0 (bu16 iw0)
-+{
-+ /* COMP3op
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 0 | 1 |.opc.......|.dst.......|.src1......|.src0......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src0 = ((iw0 >> 0) & 0x7);
-+ int src1 = ((iw0 >> 3) & 0x7);
-+ int opc = ((iw0 >> 9) & 0x7);
-+ int dst = ((iw0 >> 6) & 0x7);
-+
-+ if (opc == 0)
-+ /* dregs = dregs + dregs */
-+ DREG (dst) = add32 (DREG (src0), DREG (src1), 1, 0);
-+ else if (opc == 1)
-+ /* dregs = dregs - dregs */
-+ DREG (dst) = sub32 (DREG (src0), DREG (src1), 1, 0);
-+ else if (opc == 2)
-+ {
-+ /* dregs = dregs & dregs */
-+ DREG (dst) = DREG (src0) & DREG (src1);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 3)
-+ {
-+ /* dregs = dregs | dregs */
-+ DREG (dst) = DREG (src0) | DREG (src1);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 4)
-+ {
-+ /* dregs = dregs ^ dregs */
-+ DREG (dst) = DREG (src0) ^ DREG (src1);
-+ setflags_logical (DREG (dst));
-+ }
-+ else if (opc == 5)
-+ /* If src0 == src1 this is disassembled as a shift by 1, but this
-+ distinction doesn't matter for our purposes. */
-+ PREG (dst) = PREG (src0) + PREG (src1);
-+ else if (opc == 6)
-+ PREG (dst) = PREG (src0) + (PREG (src1) << 1);
-+ else if (opc == 7)
-+ PREG (dst) = PREG (src0) + (PREG (src1) << 2);
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_COMPI2opD_0 (bu16 iw0)
-+{
-+ /* COMPI2opD
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 1 | 0 | 0 |.op|.isrc......................|.dst.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int isrc = ((iw0 >> 3) & 0x7f);
-+ int dst = ((iw0 >> 0) & 0x7);
-+ int op = ((iw0 >> 10) & 0x1);
-+
-+ if (op == 0)
-+ DREG (dst) = imm7 (isrc);
-+ else if (op == 1)
-+ DREG (dst) = add32 (DREG (dst), imm7 (isrc), 1, 0);
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_COMPI2opP_0 (bu16 iw0)
-+{
-+ /* COMPI2opP
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 0 | 1 | 1 | 0 | 1 |.op|.src.......................|.dst.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src = ((iw0 >> 3) & 0x7f);
-+ int dst = ((iw0 >> 0) & 0x7);
-+ int op = ((iw0 >> 10) & 0x1);
-+
-+ if (op == 0)
-+ PREG (dst) = imm7 (src);
-+ else if (op == 1)
-+ PREG (dst) += imm7 (src);
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LDSTpmod_0 (bu16 iw0)
-+{
-+ /* LDSTpmod
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 0 | 0 |.W.|.aop...|.reg.......|.idx.......|.ptr.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int aop = ((iw0 >> 9) & 0x3);
-+ int idx = ((iw0 >> 3) & 0x7);
-+ int ptr = ((iw0 >> 0) & 0x7);
-+ int reg = ((iw0 >> 6) & 0x7);
-+ int W = ((iw0 >> 11) & 0x1);
-+ bu32 addr, val;
-+
-+ if (aop == 1 && W == 0 && idx == ptr)
-+ {
-+ /* dregs_lo = W[pregs] */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF0000) | val);
-+ }
-+ else if (aop == 2 && W == 0 && idx == ptr)
-+ {
-+ /* dregs_hi = W[pregs] */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF) | (val << 16));
-+ }
-+ else if (aop == 1 && W == 1 && idx == ptr)
-+ {
-+ /* W[pregs] = dregs_lo */
-+ addr = PREG (ptr);
-+ put_word (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 2 && W == 1 && idx == ptr)
-+ {
-+ /* W[pregs] = dregs_hi */
-+ addr = PREG (ptr);
-+ put_word (saved_state.memory, addr, DREG (reg) >> 16);
-+ }
-+ else if (aop == 0 && W == 0)
-+ {
-+ /* dregs = [pregs ++ pregs] */
-+ addr = PREG (ptr);
-+ val = get_long (saved_state.memory, addr);
-+ STORE (DREG (reg), val);
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 1 && W == 0)
-+ {
-+ /* dregs_lo = W[pregs ++ pregs] */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF0000) | val);
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 2 && W == 0)
-+ {
-+ /* dregs_hi = W[pregs ++ pregs] */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF) | (val << 16));
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 3 && W == 0)
-+ {
-+ /* dregs = W[pregs ++ pregs] (Z) */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), val);
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 3 && W == 1)
-+ {
-+ /* dregs = W [ pregs ++ pregs ] (X) */
-+ addr = PREG (ptr);
-+ val = get_word (saved_state.memory, addr);
-+ STORE (DREG (reg), (bs32) (bs16) val);
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 0 && W == 1)
-+ {
-+ /* [pregs ++ pregs] = dregs */
-+ addr = PREG (ptr);
-+ put_long (saved_state.memory, addr, DREG (reg));
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 1 && W == 1)
-+ {
-+ /* W[pregs ++ pregs] = dregs_lo */
-+ addr = PREG (ptr);
-+ put_word (saved_state.memory, addr, DREG (reg));
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else if (aop == 2 && W == 1)
-+ {
-+ /* W[pregs ++ pregs] = dregs_hi */
-+ addr = PREG (ptr);
-+ put_word (saved_state.memory, addr, DREG (reg) >> 16);
-+ STORE (PREG (ptr), addr + PREG (idx));
-+ }
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_dagMODim_0 (bu16 iw0)
-+{
-+ /* dagMODim
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 |.br| 1 | 1 |.op|.m.....|.i.....|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int i = ((iw0 >> 0) & 0x3);
-+ int br = ((iw0 >> 7) & 0x1);
-+ int m = ((iw0 >> 2) & 0x3);
-+ int op = ((iw0 >> 4) & 0x1);
-+
-+ if (op == 0 && br == 1)
-+ unhandled_instruction ("iregs += mregs (BREV)");
-+ else if (op == 0)
-+ /* iregs += mregs */
-+ dagadd (i, MREG (m));
-+ else if (op == 1)
-+ /* iregs -= mregs */
-+ dagsub (i, MREG (m));
-+ else
-+ illegal_instruction ();
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_dagMODik_0 (bu16 iw0)
-+{
-+ /* dagMODik
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 |.op....|.i.....|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int i = ((iw0 >> 0) & 0x3);
-+ int op = ((iw0 >> 2) & 0x3);
-+
-+ if (op == 0)
-+ /* iregs += 2 */
-+ dagadd (i, 2);
-+ else if (op == 1)
-+ /* iregs -= 2 */
-+ dagsub (i, 2);
-+ else if (op == 2)
-+ /* iregs += 4 */
-+ dagadd (i, 4);
-+ else if (op == 3)
-+ /* iregs -= 4 */
-+ dagsub (i, 4);
-+ else
-+ illegal_instruction ();
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_dspLDST_0 (bu16 iw0)
-+{
-+ /* dspLDST
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 0 | 1 | 1 | 1 |.W.|.aop...|.m.....|.i.....|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int aop = ((iw0 >> 7) & 0x3);
-+ int i = ((iw0 >> 3) & 0x3);
-+ int m = ((iw0 >> 5) & 0x3);
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int W = ((iw0 >> 9) & 0x1);
-+ bu32 addr;
-+
-+ if (aop == 0 && W == 0 && m == 0)
-+ {
-+ /* dregs = [iregs++] */
-+ addr = IREG (i);
-+ dagadd (i, 4);
-+ STORE (DREG (reg), get_long (saved_state.memory, addr));
-+ }
-+ else if (aop == 0 && W == 0 && m == 1)
-+ {
-+ /* dregs_lo = W[iregs++] */
-+ addr = IREG (i);
-+ dagadd (i, 2);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF0000) | get_word (saved_state.memory, addr));
-+ }
-+ else if (aop == 0 && W == 0 && m == 2)
-+ {
-+ /* dregs_hi = W[iregs++] */
-+ addr = IREG (i);
-+ dagadd (i, 2);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF) | (get_word (saved_state.memory, addr) << 16));
-+ }
-+ else if (aop == 1 && W == 0 && m == 0)
-+ {
-+ /* dregs = [iregs--] */
-+ addr = IREG (i);
-+ dagsub (i, 4);
-+ STORE (DREG (reg), get_long (saved_state.memory, addr));
-+ }
-+ else if (aop == 1 && W == 0 && m == 1)
-+ {
-+ /* dregs_lo = W[iregs--] */
-+ addr = IREG (i);
-+ dagsub (i, 2);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF0000) | get_word (saved_state.memory, addr));
-+ }
-+ else if (aop == 1 && W == 0 && m == 2)
-+ {
-+ /* dregs_hi = W[iregs--] */
-+ addr = IREG (i);
-+ dagsub (i, 2);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF) | (get_word (saved_state.memory, addr) << 16));
-+ }
-+ else if (aop == 2 && W == 0 && m == 0)
-+ {
-+ /* dregs = [iregs] */
-+ addr = IREG (i);
-+ STORE (DREG (reg), get_long (saved_state.memory, addr));
-+ }
-+ else if (aop == 2 && W == 0 && m == 1)
-+ {
-+ /* dregs_lo = W[iregs] */
-+ addr = IREG (i);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF0000) | get_word (saved_state.memory, addr));
-+ }
-+ else if (aop == 2 && W == 0 && m == 2)
-+ {
-+ /* dregs_hi = W[iregs] */
-+ addr = IREG (i);
-+ STORE (DREG (reg), (DREG (reg) & 0xFFFF) | (get_word (saved_state.memory, addr) << 16));
-+ }
-+ else if (aop == 0 && W == 1 && m == 0)
-+ {
-+ /* [iregs++] = dregs */
-+ addr = IREG (i);
-+ dagadd (i, 4);
-+ put_long (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 0 && W == 1 && m == 1)
-+ {
-+ /* W[iregs++] = dregs_lo */
-+ addr = IREG (i);
-+ dagadd (i, 2);
-+ put_word (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 0 && W == 1 && m == 2)
-+ {
-+ /* W[iregs++] = dregs_hi */
-+ addr = IREG (i);
-+ dagadd (i, 2);
-+ put_word (saved_state.memory, addr, DREG (reg) >> 16);
-+ }
-+ else if (aop == 1 && W == 1 && m == 0)
-+ {
-+ /* [iregs--] = dregs */
-+ addr = IREG (i);
-+ dagsub (i, 4);
-+ put_long (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 1 && W == 1 && m == 1)
-+ {
-+ /* W[iregs--] = dregs_lo */
-+ addr = IREG (i);
-+ dagsub (i, 2);
-+ put_word (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 1 && W == 1 && m == 2)
-+ {
-+ /* W[iregs--] = dregs_hi */
-+ addr = IREG (i);
-+ dagsub (i, 2);
-+ put_word (saved_state.memory, addr, DREG (reg) >> 16);
-+ }
-+ else if (aop == 2 && W == 1 && m == 0)
-+ {
-+ /* [iregs] = dregs */
-+ addr = IREG (i);
-+ put_long (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 2 && W == 1 && m == 1)
-+ {
-+ /* W[iregs] = dregs_lo */
-+ addr = IREG (i);
-+ put_word (saved_state.memory, addr, DREG (reg));
-+ }
-+ else if (aop == 2 && W == 1 && m == 2)
-+ {
-+ /* W[iregs] = dregs_hi */
-+ addr = IREG (i);
-+ put_word (saved_state.memory, addr, DREG (reg) >> 16);
-+ }
-+ else if (aop == 3 && W == 0)
-+ {
-+ /* dregs = [iregs ++ mregs] */
-+ addr = IREG (i);
-+ dagadd (i, MREG (m));
-+ STORE (DREG (reg), get_long (saved_state.memory, addr));
-+ }
-+ else if (aop == 3 && W == 1)
-+ {
-+ /* [iregs ++ mregs] = dregs */
-+ addr = IREG (i);
-+ dagadd(i, MREG (m));
-+ put_long (saved_state.memory, addr, DREG (reg));
-+ }
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LDST_0 (bu16 iw0)
-+{
-+ /* LDST
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 0 | 1 |.sz....|.W.|.aop...|.Z.|.ptr.......|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int aop = ((iw0 >> 7) & 0x3);
-+ int Z = ((iw0 >> 6) & 0x1);
-+ int sz = ((iw0 >> 10) & 0x3);
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int ptr = ((iw0 >> 3) & 0x7);
-+ int W = ((iw0 >> 9) & 0x1);
-+
-+ if (aop == 3)
-+ illegal_instruction ();
-+
-+ if (W == 0)
-+ {
-+ if (aop != 2 && sz == 0 && Z == 1
-+ && ptr == reg)
-+ illegal_instruction ();
-+
-+ if (sz == 0 && Z == 0)
-+ /* dregs = [pregs] */
-+ DREG (reg) = get_long (saved_state.memory, PREG (ptr));
-+ else if (sz == 0 && Z == 1)
-+ /* pregs = [pregs] */
-+ PREG (reg) = get_long (saved_state.memory, PREG (ptr));
-+ else if (sz == 1 && Z == 0)
-+ /* dregs = W[pregs] (z) */
-+ DREG (reg) = get_word (saved_state.memory, PREG (ptr));
-+ else if (sz == 1 && Z == 1)
-+ /* dregs = W[pregs] (X) */
-+ DREG (reg) = (bs32) (bs16) get_word (saved_state.memory, PREG (ptr));
-+ else if (sz == 2 && Z == 0)
-+ /* dregs = B[pregs] (Z) */
-+ DREG (reg) = get_byte (saved_state.memory, PREG (ptr));
-+ else if (sz == 2 && Z == 1)
-+ /* dregs = B[pregs] (X) */
-+ DREG (reg) = (bs32) (bs8) get_byte (saved_state.memory, PREG (ptr));
-+
-+ if (aop == 0)
-+ PREG (ptr) += sz == 0 ? 4 : sz == 1 ? 2 : 1;
-+ if (aop == 1)
-+ PREG (ptr) -= sz == 0 ? 4 : sz == 1 ? 2 : 1;
-+ }
-+ else
-+ {
-+ if (sz != 0 && Z == 1)
-+ illegal_instruction ();
-+
-+ if (sz == 0 && Z == 0)
-+ /* [pregs] = dregs */
-+ put_long (saved_state.memory, PREG (ptr), DREG (reg));
-+ else if (sz == 0 && Z == 1)
-+ /* [pregs] = pregs */
-+ put_long (saved_state.memory, PREG (ptr), PREG (reg));
-+ else if (sz == 1 && Z == 0)
-+ /* W[pregs] = dregs */
-+ put_word (saved_state.memory, PREG (ptr), DREG (reg));
-+ else if (sz == 2 && Z == 0)
-+ /* B[pregs] = dregs */
-+ put_byte (saved_state.memory, PREG (ptr), DREG (reg));
-+
-+ if (aop == 0)
-+ PREG (ptr) += sz == 0 ? 4 : sz == 1 ? 2 : 1;
-+ if (aop == 1)
-+ PREG (ptr) -= sz == 0 ? 4 : sz == 1 ? 2 : 1;
-+ }
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LDSTiiFP_0 (bu16 iw0)
-+{
-+ /* LDSTiiFP
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 1 | 1 | 1 | 0 |.W.|.offset............|.reg...........|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int reg = ((iw0 >> 0) & 0xf);
-+ int offset = ((iw0 >> 4) & 0x1f);
-+ int W = ((iw0 >> 9) & 0x1);
-+ bu32 ea = PREG (7) + negimm5s4 (offset);
-+
-+ if (W == 0)
-+ DPREG (reg) = get_long (saved_state.memory, ea);
-+ else
-+ put_long (saved_state.memory, ea, DPREG (reg));
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LDSTii_0 (bu16 iw0)
-+{
-+ /* LDSTii
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 0 | 1 |.W.|.op....|.offset........|.ptr.......|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int ptr = ((iw0 >> 3) & 0x7);
-+ int offset = ((iw0 >> 6) & 0xf);
-+ int op = ((iw0 >> 10) & 0x3);
-+ int W = ((iw0 >> 12) & 0x1);
-+ bu32 ea = PREG (ptr) + (op == 0 || op == 3 ? uimm4s4 (offset)
-+ : uimm4s2 (offset));
-+
-+ if (W == 1 && op == 2)
-+ illegal_instruction ();
-+
-+ if (W == 0)
-+ {
-+ if (op == 0)
-+ /* dregs = [pregs + uimm4s4] */
-+ DREG (reg) = get_long (saved_state.memory, ea);
-+ else if (op == 1)
-+ /* dregs = W[pregs + uimm4s2] (Z) */
-+ DREG (reg) = get_word (saved_state.memory, ea);
-+ else if (op == 2)
-+ /* dregs = W[pregs + uimm4s2] (X) */
-+ DREG (reg) = (bs32) (bs16) get_word (saved_state.memory, ea);
-+ else if (op == 3)
-+ /* pregs = [pregs + uimm4s4] */
-+ PREG (reg) = get_long (saved_state.memory, ea);
-+ }
-+ else
-+ {
-+ if (op == 0)
-+ /* [pregs + uimm4s4] = dregs */
-+ put_long (saved_state.memory, ea, DREG (reg));
-+ else if (op == 1)
-+ /* W[pregs + uimm4s2] = dregs */
-+ put_word (saved_state.memory, ea, DREG (reg));
-+ else if (op == 3)
-+ /* [pregs + uimm4s4] = pregs */
-+ put_long (saved_state.memory, ea, PREG (reg));
-+ }
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_LoopSetup_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* LoopSetup
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |.rop...|.c.|.soffset.......|
-+ |.reg...........| - | - |.eoffset...............................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int rop = ((iw0 >> 5) & 0x3);
-+ int soffset = ((iw0 >> 0) & 0xf);
-+ int c = ((iw0 >> 4) & 0x1);
-+ int eoffset = ((iw1 >> 0) & 0x3ff);
-+ int reg = ((iw1 >> 12) & 0xf);
-+
-+ if (rop == 0)
-+ {
-+ /* LSETUP (pcrel4, lppcrel10) counters */
-+ saved_state.lt[c] = PCREG + pcrel4 (soffset);
-+ saved_state.lb[c] = PCREG + lppcrel10 (eoffset);
-+ }
-+ else if (rop == 1)
-+ {
-+ /* LSETUP (pcrel4, lppcrel10) counters = pregs */
-+ saved_state.lt[c] = PCREG + pcrel4 (soffset);
-+ saved_state.lb[c] = PCREG + lppcrel10 (eoffset);
-+ saved_state.lc[c] = PREG (reg);
-+ }
-+ else if (rop == 3)
-+ {
-+ /* LSETUP (pcrel4, lppcrel10) counters = pregs >> 1 */
-+ saved_state.lt[c] = PCREG + pcrel4 (soffset);
-+ saved_state.lb[c] = PCREG + lppcrel10 (eoffset);
-+ saved_state.lc[c] = PREG (reg) >> 1;
-+ }
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_LDIMMhalf_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* LDIMMhalf
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |.Z.|.H.|.S.|.grp...|.reg.......|
-+ |.hword.........................................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int H = ((iw0 >> 6) & 0x1);
-+ int grp = ((iw0 >> 3) & 0x3);
-+ int Z = ((iw0 >> 7) & 0x1);
-+ int S = ((iw0 >> 5) & 0x1);
-+ int hword = ((iw1 >> 0) & 0xffff);
-+ int reg = ((iw0 >> 0) & 0x7);
-+
-+ if (H == 0 && S == 1 && Z == 0)
-+ {
-+ bu32 *pval = get_allreg (grp, reg);
-+ /* regs = imm16 (x) */
-+ *pval = imm16 (hword);
-+ }
-+ else if (H == 0 && S == 0 && Z == 1)
-+ {
-+ bu32 *pval = get_allreg (grp, reg);
-+ /* regs = luimm16 (Z) */
-+ *pval = luimm16 (hword);
-+ }
-+ else if (H == 0 && S == 0 && Z == 0)
-+ {
-+ bu32 *pval = get_allreg (grp, reg);
-+ /* regs_lo = luimm16 */
-+ *pval &= 0xFFFF0000;
-+ *pval |= luimm16 (hword);
-+ }
-+ else if (H == 1 && S == 0 && Z == 0)
-+ {
-+ bu32 *pval = get_allreg (grp, reg);
-+ /* regs_hi = huimm16 */
-+ *pval &= 0xFFFF;
-+ *pval |= luimm16 (hword) << 16;
-+ }
-+ else
-+ illegal_instruction ();
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_CALLa_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* CALLa
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 0 | 0 | 0 | 1 |.S.|.msw...........................|
-+ |.lsw...........................................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int S = ((iw0 >> 8) & 0x1);
-+ int lsw = ((iw1 >> 0) & 0xffff);
-+ int msw = ((iw0 >> 0) & 0xff);
-+
-+ if (S == 1)
-+ /* CALL pcrel24 */
-+ saved_state.rets = PCREG + 4;
-+ /* JUMP.L pcrel24 */
-+ PCREG += pcrel24 (((msw) << 16) | (lsw));
-+}
-+
-+static void
-+decode_LDSTidxI_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* LDSTidxI
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 0 | 0 | 1 |.W.|.Z.|.sz....|.ptr.......|.reg.......|
-+ |.offset........................................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int Z = ((iw0 >> 8) & 0x1);
-+ int sz = ((iw0 >> 6) & 0x3);
-+ int reg = ((iw0 >> 0) & 0x7);
-+ int ptr = ((iw0 >> 3) & 0x7);
-+ int offset = ((iw1 >> 0) & 0xffff);
-+ int W = ((iw0 >> 9) & 0x1);
-+
-+ if (sz == 3)
-+ illegal_instruction ();
-+
-+ if (W == 0)
-+ {
-+ if (sz == 0 && Z == 0)
-+ /* dregs = [pregs + imm16s4] */
-+ DREG (reg) = get_long (saved_state.memory, PREG (ptr) + imm16s4 (offset));
-+ else if (sz == 0 && Z == 1)
-+ /* pregs = [pregs + imm16s4] */
-+ PREG (reg) = get_long (saved_state.memory, PREG (ptr) + imm16s4 (offset));
-+ else if (sz == 1 && Z == 0)
-+ /* dregs = W[pregs + imm16s2] (Z) */
-+ DREG (reg) = get_word (saved_state.memory, PREG (ptr) + imm16s2 (offset));
-+ else if (sz == 1 && Z == 1)
-+ /* dregs = W[pregs + imm16s2] (X) */
-+ DREG (reg) = (bs32) (bs16) get_word (saved_state.memory, PREG (ptr) + imm16s2 (offset));
-+ else if (sz == 2 && Z == 0)
-+ /* dregs = B[pregs + imm16] (Z) */
-+ DREG (reg) = get_byte (saved_state.memory, PREG (ptr) + imm16 (offset));
-+ else if (sz == 2 && Z == 1)
-+ /* dregs = B[pregs + imm16] (X) */
-+ DREG (reg) = (bs32) (bs8) get_byte (saved_state.memory, PREG (ptr) + imm16 (offset));
-+ }
-+ else
-+ {
-+ if (sz != 0 && Z != 0)
-+ illegal_instruction ();
-+
-+ if (sz == 0 && Z == 0)
-+ /* [pregs + imm16s4] = dregs */
-+ put_long (saved_state.memory, PREG (ptr) + imm16s4 (offset), DREG (reg));
-+ else if (sz == 0 && Z == 1)
-+ /* [pregs + imm16s4] = pregs */
-+ put_long (saved_state.memory, PREG (ptr) + imm16s4 (offset), PREG (reg));
-+ else if (sz == 1 && Z == 0)
-+ /* W[pregs + imm16s2] = dregs */
-+ put_word (saved_state.memory, PREG (ptr) + imm16s2 (offset), DREG (reg));
-+ else if (sz == 2 && Z == 0)
-+ /* B[pregs + imm16] = dregs */
-+ put_byte (saved_state.memory, PREG (ptr) + imm16 (offset), DREG (reg));
-+ }
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_linkage_0 (bu16 iw0, bu16 iw1)
-+{
-+ /* linkage
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |.R.|
-+ |.framesize.....................................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int R = ((iw0 >> 0) & 0x1);
-+ int framesize = ((iw1 >> 0) & 0xffff);
-+
-+ if (R == 0)
-+ {
-+ bu32 sp = PREG (6);
-+ /* LINK uimm16s4 */
-+ sp -= 4;
-+ put_long (saved_state.memory, sp, saved_state.rets);
-+ sp -= 4;
-+ put_long (saved_state.memory, sp, PREG (7));
-+ PREG (7) = sp;
-+ sp -= uimm16s4 (framesize);
-+ PREG (6) = sp;
-+ }
-+ else
-+ {
-+ /* Restore SP from FP. */
-+ bu32 sp = PREG (7);
-+ /* UNLINK */
-+ PREG (7) = get_long (saved_state.memory, sp);
-+ sp += 4;
-+ saved_state.rets = get_long (saved_state.memory, sp);
-+ sp += 4;
-+ PREG (6) = sp;
-+ }
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_dsp32mac_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* dsp32mac
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 0 | 0 |.M.| 0 | 0 |.mmod..........|.MM|.P.|.w1|.op1...|
-+ |.h01|.h11|.w0|.op0...|.h00|.h10|.dst.......|.src0......|.src1......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int op1 = ((iw0 >> 0) & 0x3);
-+ int w1 = ((iw0 >> 2) & 0x1);
-+ int P = ((iw0 >> 3) & 0x1);
-+ int MM = ((iw0 >> 4) & 0x1);
-+ int mmod = ((iw0 >> 5) & 0xf);
-+ int M = ((iw0 >> 11) & 0x1);
-+
-+ int w0 = ((iw1 >> 13) & 0x1);
-+ int src1 = ((iw1 >> 0) & 0x7);
-+ int src0 = ((iw1 >> 3) & 0x7);
-+ int dst = ((iw1 >> 6) & 0x7);
-+ int h10 = ((iw1 >> 9) & 0x1);
-+ int h00 = ((iw1 >> 10) & 0x1);
-+ int op0 = ((iw1 >> 11) & 0x3);
-+ int h11 = ((iw1 >> 14) & 0x1);
-+ int h01 = ((iw1 >> 15) & 0x1);
-+
-+ bu32 res0, res1;
-+
-+ if (w0 == 0 && w1 == 0 && op1 == 3 && op0 == 3)
-+ illegal_instruction ();
-+
-+ if (op1 == 3 && MM)
-+ illegal_instruction ();
-+
-+ if (((1 << mmod) & (P ? 0x313 : 0x1b57)) == 0)
-+ illegal_instruction ();
-+
-+ if (w1 == 1 || op1 != 3)
-+ res1 = decode_macfunc (1, op1, h01, h11, src0, src1, mmod, MM, P);
-+
-+ if (w0 == 1 || op0 != 3)
-+ res0 = decode_macfunc (0, op0, h00, h10, src0, src1, mmod, 0, P);
-+
-+ if (w0)
-+ {
-+ if (P)
-+ DREG (dst) = res0;
-+ else
-+ {
-+ if (res0 & 0xffff0000)
-+ abort ();
-+ DREG (dst) = (DREG (dst) & 0xFFFF0000) | res0;
-+ }
-+ }
-+
-+ if (w1)
-+ {
-+ if (P)
-+ DREG (dst + 1) = res1;
-+ else
-+ {
-+ if (res1 & 0xffff0000)
-+ abort ();
-+ DREG (dst) = (DREG (dst) & 0xFFFF) | (res1 << 16);
-+ }
-+ }
-+
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_dsp32mult_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* dsp32mult
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 0 | 0 |.M.| 0 | 1 |.mmod..........|.MM|.P.|.w1|.op1...|
-+ |.h01|.h11|.w0|.op0...|.h00|.h10|.dst.......|.src0......|.src1......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int op1 = ((iw0 >> 0) & 0x3);
-+ int w1 = ((iw0 >> 2) & 0x1);
-+ int P = ((iw0 >> 3) & 0x1);
-+ int MM = ((iw0 >> 4) & 0x1);
-+ int mmod = ((iw0 >> 5) & 0xf);
-+ int M = ((iw0 >> 11) & 0x1);
-+
-+ int src1 = ((iw1 >> 0) & 0x7);
-+ int src0 = ((iw1 >> 3) & 0x7);
-+ int dst = ((iw1 >> 6) & 0x7);
-+ int h10 = ((iw1 >> 9) & 0x1);
-+ int h00 = ((iw1 >> 10) & 0x1);
-+ int op0 = ((iw1 >> 11) & 0x3);
-+ int w0 = ((iw1 >> 13) & 0x1);
-+ int h01 = ((iw1 >> 15) & 0x1);
-+ int h11 = ((iw1 >> 14) & 0x1);
-+
-+ bu32 res0, res1;
-+
-+ if (w1 == 0 && w0 == 0)
-+ illegal_instruction ();
-+ if (((1 << mmod) & (P ? 0x313 : 0x1b57)) == 0)
-+ illegal_instruction ();
-+
-+ if (w1)
-+ {
-+ bu64 r = decode_multfunc (h01, h11, src0, src1, mmod, MM);
-+ res1 = extract_mult (r, mmod, P);
-+ }
-+
-+ if (w0)
-+ {
-+ bu64 r = decode_multfunc (h00, h10, src0, src1, mmod, 0);
-+ res0 = extract_mult (r, mmod, P);
-+ }
-+
-+ if (w0)
-+ {
-+ if (P)
-+ DREG (dst) = res0;
-+ else
-+ {
-+ if (res0 & 0xFFFF0000)
-+ abort ();
-+ DREG (dst) = (DREG (dst) & 0xFFFF0000) | res0;
-+ }
-+ }
-+
-+ if (w1)
-+ {
-+ if (P)
-+ DREG (dst + 1) = res1;
-+ else
-+ {
-+ if (res1 & 0xFFFF0000)
-+ abort ();
-+ DREG (dst) = (DREG (dst) & 0xFFFF) | (res1 << 16);
-+ }
-+ }
-+
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_dsp32alu_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* dsp32alu
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 0 | 0 |.M.| 1 | 0 | - | - | - |.HL|.aopcde............|
-+ |.aop...|.s.|.x.|.dst0......|.dst1......|.src0......|.src1......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int aop = ((iw1 >> 14) & 0x3);
-+ int s = ((iw1 >> 13) & 0x1);
-+ int HL = ((iw0 >> 5) & 0x1);
-+ int x = ((iw1 >> 12) & 0x1);
-+ int src0 = ((iw1 >> 3) & 0x7);
-+ int src1 = ((iw1 >> 0) & 0x7);
-+ int dst0 = ((iw1 >> 9) & 0x7);
-+ int aopcde = ((iw0 >> 0) & 0x1f);
-+ int dst1 = ((iw1 >> 6) & 0x7);
-+ int M = ((iw0 >> 11) & 0x1);
-+
-+ if (aop == 0 && aopcde == 9 && HL == 0 && s == 0)
-+ unhandled_instruction ("A0.L = dregs_lo");
-+ else if (aop == 2 && aopcde == 9 && HL == 1 && s == 0)
-+ unhandled_instruction ("A1.H = dregs_hi");
-+ else if (aop == 2 && aopcde == 9 && HL == 0 && s == 0)
-+ unhandled_instruction ("A1.L = dregs_lo");
-+ else if (aop == 0 && aopcde == 9 && HL == 1 && s == 0)
-+ unhandled_instruction ("A0.H = dregs_hi");
-+ else if (x == 1 && HL == 1 && aop == 3 && aopcde == 5)
-+ unhandled_instruction ("dregs_hi = dregs - dregs (RND20)");
-+ else if (x == 1 && HL == 1 && aop == 2 && aopcde == 5)
-+ unhandled_instruction ("dregs_hi = dregs + dregs (RND20)");
-+ else if (x == 0 && HL == 0 && aop == 1 && aopcde == 5)
-+ unhandled_instruction ("dregs_lo = dregs - dregs (RND12)");
-+ else if (x == 0 && HL == 0 && aop == 0 && aopcde == 5)
-+ unhandled_instruction ("dregs_lo = dregs + dregs (RND12)");
-+ else if (x == 1 && HL == 0 && aop == 3 && aopcde == 5)
-+ unhandled_instruction ("dregs_lo = dregs - dregs (RND20)");
-+ else if (x == 0 && HL == 1 && aop == 0 && aopcde == 5)
-+ unhandled_instruction ("dregs_hi = dregs + dregs (RND12)");
-+ else if (x == 1 && HL == 0 && aop == 2 && aopcde == 5)
-+ unhandled_instruction ("dregs_lo = dregs + dregs (RND20)");
-+ else if (x == 0 && HL == 1 && aop == 1 && aopcde == 5)
-+ unhandled_instruction ("dregs_hi = dregs - dregs (RND12)");
-+ else if (aopcde == 2 || aopcde == 3)
-+ {
-+ bu32 s1 = DREG (src0);
-+ bu32 s2 = DREG (src1);
-+ bu16 val;
-+ if (aop & 1)
-+ s2 >>= 16;
-+ if (aop & 2)
-+ s1 >>= 16;
-+ if (aopcde == 2)
-+ val = add16 (s1, s2, &saved_state.ac0, s);
-+ else
-+ val = sub16 (s1, s2, &saved_state.ac0, s);
-+ if (HL)
-+ DREG (dst0) = (DREG (dst0) & 0xFFFF) | (val << 16);
-+ else
-+ DREG (dst0) = (DREG (dst0) & 0xFFFF0000) | val;
-+ }
-+ else if (aop == 0 && aopcde == 9 && s == 1)
-+ {
-+ saved_state.a0w = DREG (src0);
-+ saved_state.a0x = -(saved_state.a1w >> 31);
-+ }
-+ else if (aop == 1 && aopcde == 9 && s == 0)
-+ saved_state.a0x = (bs32)(bs8)DREG (src0);
-+ else if (aop == 2 && aopcde == 9 && s == 1)
-+ {
-+ saved_state.a1w = DREG (src0);
-+ saved_state.a1x = -(saved_state.a1w >> 31);
-+ }
-+ else if (aop == 3 && aopcde == 9 && s == 0)
-+ saved_state.a1x = (bs32)(bs8)DREG (src0);
-+ else if (aop == 3 && aopcde == 11 && s == 0)
-+ unhandled_instruction ("A0 -= A1");
-+ else if (aop == 3 && aopcde == 11 && s == 1)
-+ unhandled_instruction ("A0 -= A1 (W32)");
-+ else if (aop == 3 && aopcde == 22 && HL == 1)
-+ unhandled_instruction ("dregs = BYTEOP2M (dregs_pair, dregs_pair) (TH,R)");
-+ else if (aop == 3 && aopcde == 22 && HL == 0)
-+ unhandled_instruction ("dregs = BYTEOP2M (dregs_pair, dregs_pair) (TL,R)");
-+ else if (aop == 2 && aopcde == 22 && HL == 1)
-+ unhandled_instruction ("dregs = BYTEOP2M (dregs_pair, dregs_pair) (RNDH,R)");
-+ else if (aop == 2 && aopcde == 22 && HL == 0)
-+ unhandled_instruction ("dregs = BYTEOP2M (dregs_pair, dregs_pair) (RNDL,R)");
-+ else if (aop == 1 && aopcde == 22 && HL == 1)
-+ unhandled_instruction ("dregs = BYTEOP2P (dregs_pair, dregs_pair) (TH ,R)");
-+ else if (aop == 1 && aopcde == 22 && HL == 0)
-+ unhandled_instruction ("dregs = BYTEOP2P (dregs_pair, dregs_pair) (TL ,R)");
-+ else if (aop == 0 && aopcde == 22 && HL == 1)
-+ unhandled_instruction ("dregs = BYTEOP2P (dregs_pair, dregs_pair) (RNDH,R)");
-+ else if (aop == 0 && aopcde == 22 && HL == 0)
-+ unhandled_instruction ("dregs = BYTEOP2P (dregs_pair, dregs_pair) (RNDL,aligndir)");
-+ else if (aop == 0 && s == 0 && aopcde == 8)
-+ {
-+ /* A0 = 0 */
-+ saved_state.a0x = 0;
-+ saved_state.a0w = 0;
-+ }
-+ else if (aop == 0 && s == 1 && aopcde == 8)
-+ saved_state.a0x = -(saved_state.a0w >> 31);
-+ else if (aop == 1 && s == 0 && aopcde == 8)
-+ {
-+ /* A1 = 0 */
-+ saved_state.a1x = 0;
-+ saved_state.a1w = 0;
-+ }
-+ else if (aop == 1 && s == 1 && aopcde == 8)
-+ saved_state.a1x = -(saved_state.a1w >> 31);
-+ else if (aop == 2 && s == 0 && aopcde == 8)
-+ {
-+ /* A1 = A0 = 0 */
-+ saved_state.a1x = saved_state.a0x = 0;
-+ saved_state.a1w = saved_state.a0w = 0;
-+ }
-+ else if (aop == 2 && s == 1 && aopcde == 8)
-+ {
-+ saved_state.a0x = -(saved_state.a0w >> 31);
-+ saved_state.a1x = -(saved_state.a1w >> 31);
-+ }
-+ else if (aop == 3 && s == 0 && aopcde == 8)
-+ {
-+ saved_state.a0x = saved_state.a1x;
-+ saved_state.a0w = saved_state.a1w;
-+ }
-+ else if (aop == 3 && s == 1 && aopcde == 8)
-+ {
-+ saved_state.a1x = saved_state.a0x;
-+ saved_state.a1w = saved_state.a0w;
-+ }
-+ else if (aop == 1 && HL == 0 && aopcde == 11)
-+ unhandled_instruction ("dregs_lo = (A0 += A1)");
-+ else if (aop == 3 && HL == 0 && aopcde == 16)
-+ unhandled_instruction ("A1 = ABS A1, A0 = ABS A0");
-+ else if (aop == 0 && aopcde == 23 && HL == 1)
-+ unhandled_instruction ("dregs = BYTEOP3P (dregs_pair, dregs_pair) (HI,R)");
-+ else if (aop == 1 && HL == 1 && aopcde == 16)
-+ unhandled_instruction ("A1 = ABS A1");
-+ else if (aop == 0 && HL == 1 && aopcde == 16)
-+ unhandled_instruction ("A1 = ABS A0");
-+ else if (HL == 0 && aop == 3 && aopcde == 12)
-+ unhandled_instruction ("dregs_lo = dregs (RND)");
-+ else if (aop == 1 && HL == 0 && aopcde == 16)
-+ unhandled_instruction ("A0 = ABS A1");
-+ else if (aop == 0 && HL == 0 && aopcde == 16)
-+ unhandled_instruction ("A0 = ABS A0");
-+ else if (aop == 3 && HL == 0 && aopcde == 15)
-+ {
-+ /* Vector NEG. */
-+ bu32 hi = (-(bs16)(DREG (src0) >> 16)) << 16;
-+ bu32 lo = (-(bs16)(DREG (src0) & 0xFFFF)) & 0xFFFF;
-+ DREG (dst0) = hi | lo;
-+ setflags_nz_2x16 (DREG (dst0));
-+ saved_state.v = 0;
-+ }
-+ else if (aop == 1 && HL == 1 && aopcde == 11)
-+ unhandled_instruction ("dregs_hi = (A0 += A1)");
-+ else if (aop == 2 && aopcde == 11 && s == 0)
-+ unhandled_instruction ("A0 += A1");
-+ else if (aop == 2 && aopcde == 11 && s == 1)
-+ unhandled_instruction ("A0 += A1 (W32)");
-+ else if (aop == 3 && HL == 0 && aopcde == 14)
-+ unhandled_instruction ("A1 = - A1 , A0 = - A0");
-+ else if (HL == 1 && aop == 3 && aopcde == 12)
-+ unhandled_instruction ("dregs_hi = dregs (RND)");
-+ else if (aop == 0 && aopcde == 23 && HL == 0)
-+ unhandled_instruction ("dregs = BYTEOP3P (dregs_pair, dregs_pair) (LO,R)");
-+ else if (aop == 0 && HL == 0 && aopcde == 14)
-+ unhandled_instruction ("A0 = - A0");
-+ else if (aop == 1 && HL == 0 && aopcde == 14)
-+ unhandled_instruction ("A0 = - A1");
-+ else if (aop == 0 && HL == 1 && aopcde == 14)
-+ unhandled_instruction ("A1 = - A0");
-+ else if (aop == 1 && HL == 1 && aopcde == 14)
-+ unhandled_instruction ("A1 = - A1");
-+ else if (aop == 0 && aopcde == 12)
-+ unhandled_instruction ("dregs_hi=dregs_lo=SIGN(dregs_hi)*dregs_hi + SIGN(dregs_lo)*dregs_lo)");
-+ else if (aopcde == 0)
-+ {
-+ /* dregs = dregs +-|+- dregs amod0 */
-+ bu32 s0 = DREG (src0);
-+ bu32 s1 = DREG (src1);
-+ bu32 s0h = s0 >> 16;
-+ bu32 s0l = s0 & 0xFFFF;
-+ bu32 s1h = s1 >> 16;
-+ bu32 s1l = s1 & 0xFFFF;
-+ bu32 t0, t1;
-+ if (aop & 2)
-+ t0 = sub16 (s0h, s1h, &saved_state.ac1, s);
-+ else
-+ t0 = add16 (s0h, s1h, &saved_state.ac1, s);
-+ if (aop & 1)
-+ t1 = sub16 (s0l, s1l, &saved_state.ac0, s);
-+ else
-+ t1 = add16 (s0l, s1l, &saved_state.ac0, s);
-+ t0 &= 0xFFFF;
-+ t1 &= 0xFFFF;
-+ if (x)
-+ DREG (dst0) = (t1 << 16) | t0;
-+ else
-+ DREG (dst0) = (t0 << 16) | t1;
-+ }
-+ else if (aop == 1 && aopcde == 12)
-+ unhandled_instruction ("dregs = A1.L + A1.H , dregs = A0.L + A0.H");
-+ else if (HL == 0 && aopcde == 1)
-+ {
-+ if (aop == 0)
-+ {
-+ /* dregs = dregs +|+ dregs, dregs = dregs -|- dregs (amod0) */
-+ bu32 d0, d1;
-+ d1 = addadd16 (DREG (src0), DREG (src1), s, 0);
-+ d0 = subsub16 (DREG (src0), DREG (src1), s, x);
-+ STORE (DREG (dst0), d0);
-+ STORE (DREG (dst1), d1);
-+ }
-+ else
-+ unhandled_instruction
-+ ("dregs = dregs +|+ dregs, dregs = dregs -|- dregs (amod0, amod2)");
-+ }
-+ else if (aop == 0 && aopcde == 11)
-+ unhandled_instruction ("dregs = (A0 += A1)");
-+ else if (aop == 0 && aopcde == 10)
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= saved_state.a0x & 0xFFFF;
-+ }
-+ else if (aop == 1 && aopcde == 10)
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= saved_state.a1x & 0xFFFF;
-+ }
-+ else if (aop == 0 && aopcde == 4)
-+ DREG (dst0) = add32 (DREG (src0), DREG (src1), 1, s);
-+ else if (aop == 1 && aopcde == 4)
-+ DREG (dst0) = sub32 (DREG (src0), DREG (src1), 1, s);
-+ else if (aop == 2 && aopcde == 4)
-+ unhandled_instruction ("dregs = dregs + dregs , dregs = dregs - dregs amod1");
-+ else if (aop == 0 && aopcde == 17)
-+ unhandled_instruction ("dregs = A1 + A0, dregs = A1 - A0 amod1");
-+ else if (aop == 1 && aopcde == 17)
-+ unhandled_instruction ("dregs = A0 + A1, dregs = A0 - A1 amod1");
-+ else if (aop == 0 && aopcde == 18)
-+ unhandled_instruction ("SAA (dregs_pair, dregs_pair) aligndir");
-+ else if (aop == 3 && aopcde == 18)
-+ unhandled_instruction ("DISALGNEXCPT");
-+ else if (aop == 0 && aopcde == 20)
-+ unhandled_instruction ("dregs = BYTEOP1P (dregs_pair, dregs_pair) aligndir");
-+ else if (aop == 1 && aopcde == 20)
-+ unhandled_instruction ("dregs = BYTEOP1P (dregs_pair, dregs_pair) (T, R)");
-+ else if (aop == 0 && aopcde == 21)
-+ unhandled_instruction ("(dregs, dregs) = BYTEOP16P (dregs_pair, dregs_pair) aligndir");
-+ else if (aop == 1 && aopcde == 21)
-+ unhandled_instruction ("(dregs, dregs) = BYTEOP16M (dregs_pair, dregs_pair) aligndir");
-+ else if (aop == 1 && aopcde == 7)
-+ /* dregs = MIN (dregs, dregs) */
-+ DREG (dst0) = min32 (DREG (src0), DREG (src1));
-+ else if (aop == 0 && aopcde == 7)
-+ /* dregs = MAX (dregs, dregs) */
-+ DREG (dst0) = max32 (DREG (src0), DREG (src1));
-+ else if (aop == 2 && aopcde == 7)
-+ {
-+ bu32 val = DREG (src0);
-+ /* dregs = ABS dregs */
-+ if (val >> 31)
-+ val = -val;
-+ /* @@@ The manual is talking about saturation. Check what the hardware
-+ does when it gets 0x80000000. */
-+ setflags_logical (val);
-+ DREG (dst0) = val;
-+ }
-+ else if (aop == 3 && aopcde == 7)
-+ {
-+ bu32 val = DREG (src0);
-+ /* dregs = - dregs (opt_sat) */
-+ saved_state.v = val == 0x8000;
-+ if (saved_state.v)
-+ saved_state.vs = 1;
-+ if (val == 0x80000000)
-+ val = 0x7fffffff;
-+ else
-+ val = -val;
-+ setflags_logical (val);
-+ DREG (dst0) = val;
-+ }
-+ else if (aop == 2 && aopcde == 6)
-+ {
-+ /* Vector ABS. */
-+ bu32 in = DREG (src0);
-+ bu32 hi = (in & 0x80000000 ? -(bs16)(in >> 16) : in >> 16) << 16;
-+ bu32 lo = (in & 0x8000 ? -(bs16)(in & 0xFFFF) : in) & 0xFFFF;
-+ DREG (dst0) = hi | lo;
-+ setflags_nz_2x16 (DREG (dst0));
-+ saved_state.v = 0;
-+ }
-+ else if (aop == 1 && aopcde == 6)
-+ DREG (dst0) = min2x16 (DREG (src0), DREG (src1));
-+ else if (aop == 0 && aopcde == 6)
-+ DREG (dst0) = max2x16 (DREG (src0), DREG (src1));
-+ else if (HL == 1 && aopcde == 1)
-+ unhandled_instruction ("dregs = dregs +|- dregs, dregs = dregs -|+ dregs (amod0, amod2)");
-+ else if (aop == 0 && aopcde == 24)
-+ unhandled_instruction ("dregs = BYTEPACK (dregs, dregs)");
-+ else if (aop == 1 && aopcde == 24)
-+ unhandled_instruction ("(dregs, dregs) = BYTEUNPACK dregs_pair aligndir");
-+ else if (aopcde == 13)
-+ unhandled_instruction ("(dregs, dregs) = SEARCH dregs (searchmod)");
-+ else
-+ illegal_instruction ();
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_dsp32shift_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* dsp32shift
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 0 | 0 |.M.| 1 | 1 | 0 | 0 | - | - |.sopcde............|
-+ |.sop...|.HLs...|.dst0......| - | - | - |.src0......|.src1......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src0 = ((iw1 >> 3) & 0x7);
-+ int src1 = ((iw1 >> 0) & 0x7);
-+ int sop = ((iw1 >> 14) & 0x3);
-+ int dst0 = ((iw1 >> 9) & 0x7);
-+ int M = ((iw0 >> 11) & 0x1);
-+ int sopcde = ((iw0 >> 0) & 0x1f);
-+ int HLs = ((iw1 >> 12) & 0x3);
-+
-+ if (HLs == 0 && sop == 0 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = ASHIFT dregs_lo BY dregs_lo");
-+ else if (HLs == 1 && sop == 0 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = ASHIFT dregs_hi BY dregs_lo");
-+ else if (HLs == 2 && sop == 0 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = ASHIFT dregs_lo BY dregs_lo");
-+ else if (HLs == 3 && sop == 0 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = ASHIFT dregs_hi BY dregs_lo");
-+ else if (HLs == 0 && sop == 1 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = ASHIFT dregs_lo BY dregs_lo (S)");
-+ else if (HLs == 1 && sop == 1 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = ASHIFT dregs_hi BY dregs_lo (S)");
-+ else if (HLs == 2 && sop == 1 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = ASHIFT dregs_lo BY dregs_lo (S)");
-+ else if (HLs == 3 && sop == 1 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = ASHIFT dregs_hi BY dregs_lo (S)");
-+ else if (HLs == 0 && sop == 2 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = LSHIFT dregs_lo BY dregs_lo");
-+ else if (HLs == 1 && sop == 2 && sopcde == 0)
-+ unhandled_instruction ("dregs_lo = LSHIFT dregs_hi BY dregs_lo");
-+ else if (HLs == 2 && sop == 2 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = LSHIFT dregs_lo BY dregs_lo");
-+ else if (HLs == 3 && sop == 2 && sopcde == 0)
-+ unhandled_instruction ("dregs_hi = LSHIFT dregs_hi BY dregs_lo");
-+ else if (sop == 2 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = ROT A1 BY dregs_lo");
-+ else if (sop == 0 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = ASHIFT A0 BY dregs_lo");
-+ else if (sop == 0 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = ASHIFT A1 BY dregs_lo");
-+ else if (sop == 1 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = LSHIFT A0 BY dregs_lo");
-+ else if (sop == 1 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = LSHIFT A1 BY dregs_lo");
-+ else if (sop == 2 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = ROT A0 BY dregs_lo");
-+ else if (sop == 1 && sopcde == 1)
-+ unhandled_instruction ("dregs = ASHIFT dregs BY dregs_lo (V,S)");
-+ else if (sop == 0 && sopcde == 1)
-+ unhandled_instruction ("dregs = ASHIFT dregs BY dregs_lo (V)");
-+ else if ((sop == 0 || sop == 1 || sop == 2) && sopcde == 2)
-+ {
-+ /* dregs = [LA]SHIFT dregs BY dregs_lo (opt_S) */
-+ bu32 v = DREG (src1);
-+ bs32 shft = (bs16)DREG (src0);
-+ if (shft < 0)
-+ {
-+ if (sop == 2)
-+ DREG (dst0) = lshiftrt (v, -shft, 32);
-+ else
-+ DREG (dst0) = ashiftrt (v, -shft, 32);
-+ }
-+ else
-+ {
-+ DREG (dst0) = lshift (v, shft, 32, sop == 1);
-+ }
-+ }
-+ else if (sop == 3 && sopcde == 2)
-+ unhandled_instruction ("dregs = ROT dregs BY dregs_lo");
-+ else if (sop == 2 && sopcde == 1)
-+ unhandled_instruction ("dregs = SHIFT dregs BY dregs_lo (V)");
-+ else if (sop == 0 && sopcde == 4)
-+ unhandled_instruction ("dregs = PACK (dregs_lo, dregs_lo)");
-+ else if (sop == 1 && sopcde == 4)
-+ unhandled_instruction ("dregs = PACK (dregs_lo, dregs_hi)");
-+ else if (sop == 2 && sopcde == 4)
-+ unhandled_instruction ("dregs = PACK (dregs_hi, dregs_lo)");
-+ else if (sop == 3 && sopcde == 4)
-+ unhandled_instruction ("dregs = PACK (dregs_hi, dregs_hi)");
-+ else if (sop == 0 && sopcde == 5)
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= signbits (DREG (src0), 32);
-+ }
-+ else if (sop == 1 && sopcde == 5)
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= signbits (DREG (src0), 16);
-+ }
-+ else if (sop == 2 && sopcde == 5)
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= signbits (DREG (src0) >> 16, 16);
-+ }
-+ else if (sop == 0 && sopcde == 6)
-+ {
-+ bu64 acc0 = saved_state.a0x;
-+ acc0 <<= 32;
-+ acc0 |= saved_state.a0w;
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= signbits (acc0, 40);
-+ }
-+ else if (sop == 1 && sopcde == 6)
-+ {
-+ bu64 acc1 = saved_state.a1x;
-+ acc1 <<= 32;
-+ acc1 |= saved_state.a1w;
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= signbits (acc1, 40);
-+ }
-+ else if (sop == 3 && sopcde == 6)
-+ unhandled_instruction ("dregs_lo = ONES dregs");
-+ else if (sop == 0 && sopcde == 7)
-+ unhandled_instruction ("dregs_lo = EXPADJ (dregs, dregs_lo)");
-+ else if (sop == 1 && sopcde == 7)
-+ unhandled_instruction ("dregs_lo = EXPADJ (dregs, dregs_lo) (V)");
-+ else if (sop == 2 && sopcde == 7)
-+ unhandled_instruction ("dregs_lo = EXPADJ (dregs_lo, dregs_lo)");
-+ else if (sop == 3 && sopcde == 7)
-+ unhandled_instruction ("dregs_lo = EXPADJ (dregs_hi, dregs_lo)");
-+ else if (sop == 0 && sopcde == 8)
-+ unhandled_instruction ("BITMUX (dregs, dregs, A0) (ASR)");
-+ else if (sop == 1 && sopcde == 8)
-+ unhandled_instruction ("BITMUX (dregs, dregs, A0) (ASL)");
-+ else if (sop == 0 && sopcde == 9)
-+ unhandled_instruction ("dregs_lo = VIT_MAX (dregs) (ASL)");
-+ else if (sop == 1 && sopcde == 9)
-+ unhandled_instruction ("dregs_lo = VIT_MAX (dregs) (ASR)");
-+ else if (sop == 2 && sopcde == 9)
-+ unhandled_instruction ("dregs = VIT_MAX (dregs, dregs) (ASL)");
-+ else if (sop == 3 && sopcde == 9)
-+ unhandled_instruction ("dregs = VIT_MAX (dregs, dregs) (ASR)");
-+ else if (sop == 0 && sopcde == 10)
-+ {
-+ /* dregs = EXTRACT (dregs, dregs_lo) (Z) */
-+ bu32 v = DREG (src0);
-+ bu32 x = DREG (src1);
-+ bu32 mask = (1 << (v & 0x1f)) - 1;
-+ x >>= ((v >> 8) & 0x1f);
-+ DREG (dst0) = x & mask;
-+ setflags_logical (DREG (dst0));
-+ }
-+ else if (sop == 1 && sopcde == 10)
-+ {
-+ /* dregs = EXTRACT (dregs, dregs_lo) (X) */
-+ bu32 v = DREG (src0);
-+ bu32 x = DREG (src1);
-+ bu32 sgn = (1 << (v & 0x1f)) >> 1;
-+ bu32 mask = (1 << (v & 0x1f)) - 1;
-+ x >>= ((v >> 8) & 0x1f);
-+ x &= mask;
-+ if (x & sgn)
-+ x |= ~mask;
-+ DREG (dst0) = x;
-+ setflags_logical (DREG (dst0));
-+ }
-+ else if (sop == 2 && sopcde == 10)
-+ {
-+ /* dregs = DEPOSIT (dregs, dregs) */
-+ bu32 v = DREG (src0);
-+ bu32 x = DREG (src1);
-+ bu32 mask = (1 << (v & 0x1f)) - 1;
-+ bu32 fgnd = (v >> 16) & mask;
-+ int shft = ((v >> 8) & 0x1f);
-+ fgnd <<= shft;
-+ mask <<= shft;
-+ x &= ~mask;
-+ DREG (dst0) = x | fgnd;
-+ setflags_logical (DREG (dst0));
-+ }
-+ else if (sop == 3 && sopcde == 10)
-+ {
-+ /* dregs = DEPOSIT (dregs, dregs) */
-+ bu32 v = DREG (src0);
-+ bu32 x = DREG (src1);
-+ bu32 mask = (1 << (v & 0x1f)) - 1;
-+ bu32 fgnd = ((bs32)(bs16)(v >> 16)) & mask;
-+ int shft = ((v >> 8) & 0x1f);
-+ fgnd <<= shft;
-+ mask <<= shft;
-+ x &= ~mask;
-+ DREG (dst0) = x | fgnd;
-+ setflags_logical (DREG (dst0));
-+ }
-+ else if (sop == 0 && sopcde == 11)
-+ unhandled_instruction ("dregs_lo = CC = BXORSHIFT (A0, dregs)");
-+ else if (sop == 1 && sopcde == 11)
-+ unhandled_instruction ("dregs_lo = CC = BXOR (A0, dregs)");
-+ else if (sop == 0 && sopcde == 12)
-+ unhandled_instruction ("A0 = BXORSHIFT (A0, A1, CC)");
-+ else if (sop == 1 && sopcde == 12)
-+ unhandled_instruction ("dregs_lo = CC = BXOR (A0, A1, CC)");
-+ else if (sop == 0 && sopcde == 13)
-+ /* dregs = ALIGN8 (dregs, dregs) */
-+ DREG (dst0) = (DREG (src1) << 24) | (DREG (src0) >> 8);
-+ else if (sop == 1 && sopcde == 13)
-+ /* dregs = ALIGN16 (dregs, dregs) */
-+ DREG (dst0) = (DREG (src1) << 16) | (DREG (src0) >> 16);
-+ else if (sop == 2 && sopcde == 13)
-+ /* dregs = ALIGN24 (dregs , dregs) */
-+ DREG (dst0) = (DREG (src1) << 8) | (DREG (src0) >> 24);
-+ else
-+ illegal_instruction ();
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_dsp32shiftimm_0 (bu16 iw0, bu16 iw1, bu32 pc)
-+{
-+ /* dsp32shiftimm
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 0 | 0 |.M.| 1 | 1 | 0 | 1 | - | - |.sopcde............|
-+ |.sop...|.HLs...|.dst0......|.immag.................|.src1......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int src1 = ((iw1 >> 0) & 0x7);
-+ int sop = ((iw1 >> 14) & 0x3);
-+ int immag = ((iw1 >> 3) & 0x3f);
-+ int newimmag = (-(iw1 >> 3) & 0x3f);
-+ int dst0 = ((iw1 >> 9) & 0x7);
-+ int M = ((iw0 >> 11) & 0x1);
-+ int sopcde = ((iw0 >> 0) & 0x1f);
-+ int HLs = ((iw1 >> 12) & 0x3);
-+ int bit8 = immag >> 5;
-+
-+ if (sopcde == 0)
-+ {
-+ bu16 in = DREG (src1) >> ((HLs & 1) ? 16 : 0);
-+ bu16 result;
-+ if (sop == 0 && bit8)
-+ result = ashiftrt (in, newimmag, 16);
-+ else if (sop == 1 && bit8)
-+ result = lshift (in, immag, 16, 1);
-+ else if (sop == 2 && bit8)
-+ result = lshiftrt (in, newimmag, 16);
-+ else if (sop == 2)
-+ result = lshift (in, immag, 16, 0);
-+ else
-+ unhandled_instruction ("illegal DSP shift");
-+ if (HLs & 2)
-+ {
-+ DREG (dst0) &= 0xFFFF;
-+ DREG (dst0) |= result << 16;
-+ }
-+ else
-+ {
-+ DREG (dst0) &= 0xFFFF0000;
-+ DREG (dst0) |= result;
-+ }
-+ }
-+ else if (sop == 2 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = ROT A1 BY imm6");
-+ else if (sop == 0 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = A0 << imm6");
-+ else if (sop == 0 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = A1 << imm6");
-+ else if (sop == 1 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = A0 >> imm6");
-+ else if (sop == 1 && sopcde == 3 && HLs == 1)
-+ unhandled_instruction ("A1 = A1 >> imm6");
-+ else if (sop == 2 && sopcde == 3 && HLs == 0)
-+ unhandled_instruction ("A0 = ROT A0 BY imm6");
-+ else if (sop == 1 && sopcde == 1)
-+ unhandled_instruction ("dregs = dregs >>> uimm5 (V,S)");
-+ else if (sop == 2 && sopcde == 1)
-+ unhandled_instruction ("dregs = dregs >> uimm5 (V)");
-+ else if (sop == 0 && sopcde == 1)
-+ unhandled_instruction ("dregs = dregs << imm5 (V)");
-+ else if (sop == 1 && sopcde == 2)
-+ unhandled_instruction ("dregs = dregs << imm6 (S)");
-+ else if (sop == 2 && sopcde == 2)
-+ {
-+ int count = imm6 (newimmag);
-+ /* dregs = dregs >> imm6 */
-+ if (count < 0)
-+ DREG (dst0) = lshift (DREG (src1), -count, 32, 0);
-+ else
-+ DREG (dst0) = lshiftrt (DREG (src1), count, 32);
-+ }
-+ else if (sop == 3 && sopcde == 2)
-+ {
-+ int t = imm6 (immag);
-+ /* dregs = ROT dregs BY imm6 */
-+
-+ /* Reduce everything to rotate left. */
-+ if (t < 0)
-+ t += 33;
-+
-+ if (t > 0)
-+ {
-+ int oldcc = CCREG;
-+ bu32 srcval = DREG (src1);
-+ bu32 result;
-+ result = t == 32 ? 0 : srcval << t;
-+ result |= t == 1 ? 0 : srcval >> (33 - t);
-+ result |= oldcc << (t - 1);
-+ DREG (dst0) = result;
-+ CCREG = (srcval >> (32 - t)) & 1;
-+ }
-+ }
-+ else if (sop == 0 && sopcde == 2)
-+ {
-+ int count = imm6 (newimmag);
-+ /* dregs = dregs >>> imm6 */
-+ if (count < 0)
-+ DREG (dst0) = lshift (DREG (src1), -count, 32, 0);
-+ else
-+ DREG (dst0) = ashiftrt (DREG (src1), count, 32);
-+ }
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 4;
-+}
-+
-+static void
-+decode_psedoDEBUG_0 (bu16 iw0)
-+{
-+ /* psedoDEBUG
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |.fn....|.grp.......|.reg.......|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int grp = ((iw0 >> 3) & 0x7);
-+ int fn = ((iw0 >> 6) & 0x3);
-+ int reg = ((iw0 >> 0) & 0x7);
-+
-+ if (reg == 0 && fn == 3)
-+ unhandled_instruction ("DBG A0");
-+ else if (reg == 1 && fn == 3)
-+ unhandled_instruction ("DBG A1");
-+ else if (reg == 3 && fn == 3)
-+ unhandled_instruction ("ABORT");
-+ else if (reg == 4 && fn == 3)
-+ unhandled_instruction ("HLT");
-+ else if (reg == 5 && fn == 3)
-+ unhandled_instruction ("DBGHALT");
-+ else if (reg == 6 && fn == 3)
-+ unhandled_instruction ("DBGCMPLX (dregs)");
-+ else if (reg == 7 && fn == 3)
-+ unhandled_instruction ("DBG");
-+ else if (grp == 0 && fn == 2)
-+ unhandled_instruction ("OUTC dregs");
-+ else if (fn == 0)
-+ unhandled_instruction ("DBG allregs");
-+ else if (fn == 1)
-+ unhandled_instruction ("PRNT allregs");
-+ else
-+ illegal_instruction ();
-+
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_psedoOChar_0 (bu16 iw0)
-+{
-+ /* psedoOChar
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |.ch............................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int ch = ((iw0 >> 0) & 0xff);
-+
-+ unhandled_instruction ("OUTC uimm8");
-+ PCREG += 2;
-+}
-+
-+static void
-+decode_psedodbg_assert_0 (bu16 iw0, bu16 iw1)
-+{
-+ /* psedodbg_assert
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-+ | 1 | 1 | 1 | 1 | 0 | - | - | - | - | - |.dbgop.....|.regtest...|
-+ |.expected......................................................|
-+ +---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
-+ int expected = ((iw1 >> 0) & 0xffff);
-+ int dbgop = ((iw0 >> 3) & 0x7);
-+ int regtest = ((iw0 >> 0) & 0x7);
-+
-+ if (dbgop == 0)
-+ unhandled_instruction ("DBGA ( dregs_lo , uimm16 )");
-+ else if (dbgop == 1)
-+ unhandled_instruction ("DBGA ( dregs_hi , uimm16 )");
-+ else if (dbgop == 2)
-+ unhandled_instruction ("DBGAL ( dregs , uimm16 )");
-+ else if (dbgop == 3)
-+ unhandled_instruction ("DBGAH ( dregs , uimm16 )");
-+ else
-+ illegal_instruction ();
-+ PCREG += 4;
-+}
-+
-+static void
-+_interp_insn_bfin (bu32 pc)
-+{
-+ bu8 buf[4];
-+ bu16 iw0 = get_word (saved_state.memory, pc);
-+ bu16 iw1 = get_word (saved_state.memory, pc + 2);
-+
-+ if ((iw0 & 0xf7ff) == 0xc003 && iw1 == 0x1800)
-+ {
-+ /* MNOP. */
-+ PCREG += 4;
-+ return;
-+ }
-+ if ((iw0 & 0xFF00) == 0x0000)
-+ decode_ProgCtrl_0 (iw0);
-+ else if ((iw0 & 0xFFC0) == 0x0240)
-+ decode_CaCTRL_0 (iw0);
-+ else if ((iw0 & 0xFF80) == 0x0100)
-+ decode_PushPopReg_0 (iw0);
-+ else if ((iw0 & 0xFE00) == 0x0400)
-+ decode_PushPopMultiple_0 (iw0);
-+ else if ((iw0 & 0xFE00) == 0x0600)
-+ decode_ccMV_0 (iw0);
-+ else if ((iw0 & 0xF800) == 0x0800)
-+ decode_CCflag_0 (iw0);
-+ else if ((iw0 & 0xFFE0) == 0x0200)
-+ decode_CC2dreg_0 (iw0);
-+ else if ((iw0 & 0xFF00) == 0x0300)
-+ decode_CC2stat_0 (iw0);
-+ else if ((iw0 & 0xF000) == 0x1000)
-+ decode_BRCC_0 (iw0, pc);
-+ else if ((iw0 & 0xF000) == 0x2000)
-+ decode_UJUMP_0 (iw0, pc);
-+ else if ((iw0 & 0xF000) == 0x3000)
-+ decode_REGMV_0 (iw0);
-+ else if ((iw0 & 0xFC00) == 0x4000)
-+ decode_ALU2op_0 (iw0);
-+ else if ((iw0 & 0xFE00) == 0x4400)
-+ decode_PTR2op_0 (iw0);
-+ else if (((iw0 & 0xF800) == 0x4800))
-+ decode_LOGI2op_0 (iw0);
-+ else if (((iw0 & 0xF000) == 0x5000))
-+ decode_COMP3op_0 (iw0);
-+ else if (((iw0 & 0xF800) == 0x6000))
-+ decode_COMPI2opD_0 (iw0);
-+ else if (((iw0 & 0xF800) == 0x6800))
-+ decode_COMPI2opP_0 (iw0);
-+ else if (((iw0 & 0xF000) == 0x8000))
-+ decode_LDSTpmod_0 (iw0);
-+ else if (((iw0 & 0xFF60) == 0x9E60))
-+ decode_dagMODim_0 (iw0);
-+ else if (((iw0 & 0xFFF0) == 0x9F60))
-+ decode_dagMODik_0 (iw0);
-+ else if (((iw0 & 0xFC00) == 0x9C00))
-+ decode_dspLDST_0 (iw0);
-+ else if (((iw0 & 0xF000) == 0x9000))
-+ decode_LDST_0 (iw0);
-+ else if (((iw0 & 0xFC00) == 0xB800))
-+ decode_LDSTiiFP_0 (iw0);
-+ else if (((iw0 & 0xE000) == 0xA000))
-+ decode_LDSTii_0 (iw0);
-+ else if (((iw0 & 0xFF80) == 0xE080) && ((iw1 & 0x0C00) == 0x0000))
-+ decode_LoopSetup_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xFF00) == 0xE100) && ((iw1 & 0x0000) == 0x0000))
-+ decode_LDIMMhalf_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xFE00) == 0xE200) && ((iw1 & 0x0000) == 0x0000))
-+ decode_CALLa_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xFC00) == 0xE400) && ((iw1 & 0x0000) == 0x0000))
-+ decode_LDSTidxI_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xFFFE) == 0xE800) && ((iw1 & 0x0000) == 0x0000))
-+ decode_linkage_0 (iw0, iw1);
-+ else if (((iw0 & 0xF600) == 0xC000) && ((iw1 & 0x0000) == 0x0000))
-+ decode_dsp32mac_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xF600) == 0xC200) && ((iw1 & 0x0000) == 0x0000))
-+ decode_dsp32mult_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xF7C0) == 0xC400) && ((iw1 & 0x0000) == 0x0000))
-+ decode_dsp32alu_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xF7E0) == 0xC600) && ((iw1 & 0x01C0) == 0x0000))
-+ decode_dsp32shift_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xF7E0) == 0xC680) && ((iw1 & 0x0000) == 0x0000))
-+ decode_dsp32shiftimm_0 (iw0, iw1, pc);
-+ else if (((iw0 & 0xFF00) == 0xF800))
-+ decode_psedoDEBUG_0 (iw0);
-+ else if (((iw0 & 0xFF00) == 0xF900))
-+ decode_psedoOChar_0 (iw0);
-+ else if (((iw0 & 0xFFC0) == 0xF000) && ((iw1 & 0x0000) == 0x0000))
-+ decode_psedodbg_assert_0 (iw0, iw1);
-+ else
-+ illegal_instruction ();
-+}
-+
-+void
-+interp_insn_bfin (bu32 pc)
-+{
-+ int i;
-+ bu16 iw0 = get_word (saved_state.memory, pc);
-+
-+ int is_multiinsn = ((iw0 & 0xc000) == 0xc000 && (iw0 & BIT_MULTI_INS)
-+ && ((iw0 & 0xe800) != 0xe800 /* not linkage */));
-+
-+ n_stores = 0;
-+
-+ _interp_insn_bfin (pc);
-+
-+ /* Proper display of multiple issue instructions. */
-+ if (is_multiinsn)
-+ {
-+ _interp_insn_bfin (pc + 4);
-+ _interp_insn_bfin (pc + 6);
-+ }
-+ for (i = 0; i < n_stores; i++)
-+ *stores[i].addr = stores[i].val;
-+}
-diff -Naur gdb-6.5.orig/sim/bfin/bfin-sim.h gdb-6.5/sim/bfin/bfin-sim.h
---- gdb-6.5.orig/sim/bfin/bfin-sim.h 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/bfin-sim.h 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,124 @@
-+/* Simulator for Analog Devices Blackfin processer.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of simulators.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+#include "sysdep.h"
-+#include "gdb/callback.h"
-+#include "gdb/remote-sim.h"
-+#include "sim-config.h"
-+#include "sim-types.h"
-+
-+typedef unsigned8 bu8;
-+typedef unsigned16 bu16;
-+typedef unsigned32 bu32;
-+typedef unsigned64 bu64;
-+typedef signed8 bs8;
-+typedef signed16 bs16;
-+typedef signed32 bs32;
-+typedef signed64 bs64;
-+
-+typedef struct
-+{
-+ bu32 dpregs[16], iregs[4], mregs[4], bregs[4], lregs[4];
-+ bu32 a0x, a0w, a1x, a1w;
-+ bu32 lt[2], lc[2], lb[2];
-+ int ac0, ac0_copy, ac1, an, aq;
-+ int av0, av0s, av1, av1s, az, cc, v, v_copy, vs;
-+ int v_internal;
-+ bu32 pc, rets;
-+
-+ int ticks;
-+ int insts;
-+
-+ int exception;
-+
-+ int end_of_registers;
-+
-+ int msize;
-+ unsigned char *memory;
-+ unsigned long bfd_mach;
-+} saved_state_type;
-+
-+extern saved_state_type saved_state;
-+
-+#define GREG(x,i) DPREG ((x) | (i << 3))
-+#define DPREG(x) (saved_state.dpregs[x])
-+#define DREG(x) (saved_state.dpregs[x])
-+#define PREG(x) (saved_state.dpregs[x + 8])
-+#define SPREG PREG (6)
-+#define FPREG PREG (7)
-+#define IREG(x) (saved_state.iregs[x])
-+#define MREG(x) (saved_state.mregs[x])
-+#define BREG(x) (saved_state.bregs[x])
-+#define LREG(x) (saved_state.lregs[x])
-+#define A0XREG (saved_state.a0x)
-+#define A0WREG (saved_state.a0w)
-+#define A1XREG (saved_state.a1x)
-+#define A1WREG (saved_state.a1w)
-+#define CCREG (saved_state.cc)
-+#define LC0REG (saved_state.lc[0])
-+#define LT0REG (saved_state.lt[0])
-+#define LB0REG (saved_state.lb[0])
-+#define LC1REG (saved_state.lc[1])
-+#define LT1REG (saved_state.lt[1])
-+#define LB1REG (saved_state.lb[1])
-+#define RETSREG (saved_state.rets)
-+#define PCREG (saved_state.pc)
-+
-+extern int did_jump;
-+
-+static inline void put_byte (unsigned char *memory, bu32 addr, bu8 v)
-+{
-+ memory[addr] = v;
-+}
-+
-+static inline void put_word (unsigned char *memory, bu32 addr, bu16 v)
-+{
-+ memory[addr] = v;
-+ memory[addr + 1] = v >> 8;
-+}
-+
-+static inline void put_long (unsigned char *memory, bu32 addr, bu32 v)
-+{
-+ memory[addr] = v;
-+ memory[addr + 1] = v >> 8;
-+ memory[addr + 2] = v >> 16;
-+ memory[addr + 3] = v >> 24;
-+}
-+
-+static inline bu8 get_byte (unsigned char *memory, bu32 addr)
-+{
-+ return memory[addr];
-+}
-+
-+static inline bu16 get_word (unsigned char *memory, bu32 addr)
-+{
-+ return (memory[addr] | (memory[addr + 1] << 8));
-+}
-+
-+static inline bu32 get_long (unsigned char *memory, bu32 addr)
-+{
-+ return (memory[addr] | (memory[addr + 1] << 8)
-+ | (memory[addr + 2] << 16) | (memory[addr + 3] << 24));
-+}
-+
-+extern void interp_insn_bfin (bu32);
-+
-diff -Naur gdb-6.5.orig/sim/bfin/config.in gdb-6.5/sim/bfin/config.in
---- gdb-6.5.orig/sim/bfin/config.in 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/config.in 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,158 @@
-+/* config.in. Generated automatically from configure.in by autoheader. */
-+
-+/* Define if using alloca.c. */
-+#undef C_ALLOCA
-+
-+/* Define to empty if the keyword does not work. */
-+#undef const
-+
-+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-+ This function is required for alloca.c support on those systems. */
-+#undef CRAY_STACKSEG_END
-+
-+/* Define if you have alloca, as a function or macro. */
-+#undef HAVE_ALLOCA
-+
-+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-+#undef HAVE_ALLOCA_H
-+
-+/* Define if you have a working `mmap' system call. */
-+#undef HAVE_MMAP
-+
-+/* Define as __inline if that's what the C compiler calls it. */
-+#undef inline
-+
-+/* Define to `long' if <sys/types.h> doesn't define. */
-+#undef off_t
-+
-+/* Define if you need to in order for stat and other things to work. */
-+#undef _POSIX_SOURCE
-+
-+/* Define as the return type of signal handlers (int or void). */
-+#undef RETSIGTYPE
-+
-+/* Define to `unsigned' if <sys/types.h> doesn't define. */
-+#undef size_t
-+
-+/* If using the C implementation of alloca, define if you know the
-+ direction of stack growth for your system; otherwise it will be
-+ automatically deduced at run-time.
-+ STACK_DIRECTION > 0 => grows toward higher addresses
-+ STACK_DIRECTION < 0 => grows toward lower addresses
-+ STACK_DIRECTION = 0 => direction of growth unknown
-+ */
-+#undef STACK_DIRECTION
-+
-+/* Define if you have the ANSI C header files. */
-+#undef STDC_HEADERS
-+
-+/* Define to 1 if NLS is requested. */
-+#undef ENABLE_NLS
-+
-+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-+#undef HAVE_GETTEXT
-+
-+/* Define as 1 if you have the stpcpy function. */
-+#undef HAVE_STPCPY
-+
-+/* Define if your locale.h file contains LC_MESSAGES. */
-+#undef HAVE_LC_MESSAGES
-+
-+/* Define if you have the __argz_count function. */
-+#undef HAVE___ARGZ_COUNT
-+
-+/* Define if you have the __argz_next function. */
-+#undef HAVE___ARGZ_NEXT
-+
-+/* Define if you have the __argz_stringify function. */
-+#undef HAVE___ARGZ_STRINGIFY
-+
-+/* Define if you have the __setfpucw function. */
-+#undef HAVE___SETFPUCW
-+
-+/* Define if you have the dcgettext function. */
-+#undef HAVE_DCGETTEXT
-+
-+/* Define if you have the getcwd function. */
-+#undef HAVE_GETCWD
-+
-+/* Define if you have the getpagesize function. */
-+#undef HAVE_GETPAGESIZE
-+
-+/* Define if you have the getrusage function. */
-+#undef HAVE_GETRUSAGE
-+
-+/* Define if you have the munmap function. */
-+#undef HAVE_MUNMAP
-+
-+/* Define if you have the putenv function. */
-+#undef HAVE_PUTENV
-+
-+/* Define if you have the setenv function. */
-+#undef HAVE_SETENV
-+
-+/* Define if you have the setlocale function. */
-+#undef HAVE_SETLOCALE
-+
-+/* Define if you have the sigaction function. */
-+#undef HAVE_SIGACTION
-+
-+/* Define if you have the stpcpy function. */
-+#undef HAVE_STPCPY
-+
-+/* Define if you have the strcasecmp function. */
-+#undef HAVE_STRCASECMP
-+
-+/* Define if you have the strchr function. */
-+#undef HAVE_STRCHR
-+
-+/* Define if you have the time function. */
-+#undef HAVE_TIME
-+
-+/* Define if you have the <argz.h> header file. */
-+#undef HAVE_ARGZ_H
-+
-+/* Define if you have the <fcntl.h> header file. */
-+#undef HAVE_FCNTL_H
-+
-+/* Define if you have the <fpu_control.h> header file. */
-+#undef HAVE_FPU_CONTROL_H
-+
-+/* Define if you have the <limits.h> header file. */
-+#undef HAVE_LIMITS_H
-+
-+/* Define if you have the <locale.h> header file. */
-+#undef HAVE_LOCALE_H
-+
-+/* Define if you have the <malloc.h> header file. */
-+#undef HAVE_MALLOC_H
-+
-+/* Define if you have the <nl_types.h> header file. */
-+#undef HAVE_NL_TYPES_H
-+
-+/* Define if you have the <stdlib.h> header file. */
-+#undef HAVE_STDLIB_H
-+
-+/* Define if you have the <string.h> header file. */
-+#undef HAVE_STRING_H
-+
-+/* Define if you have the <strings.h> header file. */
-+#undef HAVE_STRINGS_H
-+
-+/* Define if you have the <sys/param.h> header file. */
-+#undef HAVE_SYS_PARAM_H
-+
-+/* Define if you have the <sys/resource.h> header file. */
-+#undef HAVE_SYS_RESOURCE_H
-+
-+/* Define if you have the <sys/time.h> header file. */
-+#undef HAVE_SYS_TIME_H
-+
-+/* Define if you have the <time.h> header file. */
-+#undef HAVE_TIME_H
-+
-+/* Define if you have the <unistd.h> header file. */
-+#undef HAVE_UNISTD_H
-+
-+/* Define if you have the <values.h> header file. */
-+#undef HAVE_VALUES_H
-diff -Naur gdb-6.5.orig/sim/bfin/configure gdb-6.5/sim/bfin/configure
---- gdb-6.5.orig/sim/bfin/configure 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/configure 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,8672 @@
-+#! /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="Makefile.in"
-+# Factoring default headers for most tests.
-+ac_includes_default="\
-+#include <stdio.h>
-+#if HAVE_SYS_TYPES_H
-+# include <sys/types.h>
-+#endif
-+#if HAVE_SYS_STAT_H
-+# include <sys/stat.h>
-+#endif
-+#if STDC_HEADERS
-+# include <stdlib.h>
-+# include <stddef.h>
-+#else
-+# if HAVE_STDLIB_H
-+# include <stdlib.h>
-+# endif
-+#endif
-+#if HAVE_STRING_H
-+# if !STDC_HEADERS && HAVE_MEMORY_H
-+# include <memory.h>
-+# endif
-+# include <string.h>
-+#endif
-+#if HAVE_STRINGS_H
-+# include <strings.h>
-+#endif
-+#if HAVE_INTTYPES_H
-+# include <inttypes.h>
-+#else
-+# if HAVE_STDINT_H
-+# include <stdint.h>
-+# endif
-+#endif
-+#if HAVE_UNISTD_H
-+# include <unistd.h>
-+#endif"
-+
-+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 sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB SET_MAKE CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINT sim_bswap sim_cflags sim_debug sim_stdio sim_trace sim_profile cgen_breaks LIBOBJS LTLIBOBJS'
-+ac_subst_files=''
-+
-+# 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_CC_set=${CC+set}
-+ac_env_CC_value=$CC
-+ac_cv_env_CC_set=${CC+set}
-+ac_cv_env_CC_value=$CC
-+ac_env_CFLAGS_set=${CFLAGS+set}
-+ac_env_CFLAGS_value=$CFLAGS
-+ac_cv_env_CFLAGS_set=${CFLAGS+set}
-+ac_cv_env_CFLAGS_value=$CFLAGS
-+ac_env_LDFLAGS_set=${LDFLAGS+set}
-+ac_env_LDFLAGS_value=$LDFLAGS
-+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-+ac_cv_env_LDFLAGS_value=$LDFLAGS
-+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-+ac_env_CPPFLAGS_value=$CPPFLAGS
-+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-+ac_env_CPP_set=${CPP+set}
-+ac_env_CPP_value=$CPP
-+ac_cv_env_CPP_set=${CPP+set}
-+ac_cv_env_CPP_value=$CPP
-+
-+#
-+# 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-nls do not use Native Language Support
-+ --enable-maintainer-mode Enable developer functionality.
-+ --enable-sim-bswap Use Host specific BSWAP instruction.
-+ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator
-+ --enable-sim-debug=opts Enable debugging flags
-+ --enable-sim-stdio Specify whether to use stdio for console input/output.
-+ --enable-sim-trace=opts Enable tracing flags
-+ --enable-sim-profile=opts Enable profiling flags
-+
-+Optional Packages:
-+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-+ --with-included-gettext use the GNU gettext library included here
-+
-+Some influential environment variables:
-+ CC C compiler command
-+ CFLAGS C compiler flags
-+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
-+ nonstandard directory <lib dir>
-+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
-+ headers in a nonstandard directory <include dir>
-+ CPP C preprocessor
-+
-+Use these variables to override the choices made by `configure' or to help
-+it to find libraries and programs with nonstandard names/locations.
-+
-+_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:config.in"
-+
-+
-+# This file contains common code used by all simulators.
-+#
-+# SIM_AC_COMMON invokes AC macros used by all simulators and by the common
-+# directory. It is intended to be invoked before any target specific stuff.
-+# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
-+# It is intended to be invoked last.
-+#
-+# The simulator's configure.in should look like:
-+#
-+# dnl Process this file with autoconf to produce a configure script.
-+# sinclude(../common/aclocal.m4)
-+# AC_PREREQ(2.5)dnl
-+# AC_INIT(Makefile.in)
-+#
-+# SIM_AC_COMMON
-+#
-+# ... target specific stuff ...
-+#
-+# SIM_AC_OUTPUT
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+sim_inline="-DDEFAULT_INLINE=0"
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+# This file is derived from `gettext.m4'. The difference is that the
-+# included macros assume Cygnus-style source and build trees.
-+
-+# Macro to add for using GNU gettext.
-+# Ulrich Drepper <drepper at cygnus.com>, 1995.
-+#
-+# This file file be copied and used freely without restrictions. It can
-+# be used in projects which are not available under the GNU Public License
-+# but which still want to provide support for the GNU gettext functionality.
-+# Please note that the actual code is *not* freely available.
-+
-+# serial 3
-+
-+
-+
-+
-+
-+# Search path for a program which passes the given test.
-+# Ulrich Drepper <drepper at cygnus.com>, 1996.
-+#
-+# This file file be copied and used freely without restrictions. It can
-+# be used in projects which are not available under the GNU Public License
-+# but which still want to provide support for the GNU gettext functionality.
-+# Please note that the actual code is *not* freely available.
-+
-+# serial 1
-+
-+
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+# Ulrich Drepper <drepper at cygnus.com>, 1995.
-+#
-+# This file file be copied and used freely without restrictions. It can
-+# be used in projects which are not available under the GNU Public License
-+# but which still want to provide support for the GNU gettext functionality.
-+# Please note that the actual code is *not* freely available.
-+
-+# serial 1
-+
-+
-+
-+
-+
-+
-+
-+# This file contains common code used by all simulators.
-+#
-+# common.m4 invokes AC macros used by all simulators and by the common
-+# directory. It is intended to be included before any target specific
-+# stuff. SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate
-+# the Makefile. It is intended to be invoked last.
-+#
-+# The simulator's configure.in should look like:
-+#
-+# dnl Process this file with autoconf to produce a configure script.
-+# AC_PREREQ(2.5)dnl
-+# AC_INIT(Makefile.in)
-+# AC_CONFIG_HEADER(config.h:config.in)
-+#
-+# sinclude(../common/aclocal.m4)
-+# sinclude(../common/common.m4)
-+#
-+# ... target specific stuff ...
-+
-+ac_aux_dir=
-+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 $srcdir $srcdir/.. $srcdir/../.." >&5
-+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&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
-+
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+if test -n "$ac_tool_prefix"; then
-+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}gcc; ac_word=$2
-+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="${ac_tool_prefix}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
-+
-+fi
-+if test -z "$ac_cv_prog_CC"; then
-+ ac_ct_CC=$CC
-+ # Extract the first word of "gcc", so it can be a program name with args.
-+set dummy gcc; ac_word=$2
-+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_CC+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -n "$ac_ct_CC"; then
-+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_ac_ct_CC="gcc"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+fi
-+fi
-+ac_ct_CC=$ac_cv_prog_ac_ct_CC
-+if test -n "$ac_ct_CC"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-+echo "${ECHO_T}$ac_ct_CC" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ CC=$ac_ct_CC
-+else
-+ CC="$ac_cv_prog_CC"
-+fi
-+
-+if test -z "$CC"; then
-+ if test -n "$ac_tool_prefix"; then
-+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}cc; ac_word=$2
-+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="${ac_tool_prefix}cc"
-+ 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
-+
-+fi
-+if test -z "$ac_cv_prog_CC"; then
-+ ac_ct_CC=$CC
-+ # 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_ac_ct_CC+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -n "$ac_ct_CC"; then
-+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_ac_ct_CC="cc"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+fi
-+fi
-+ac_ct_CC=$ac_cv_prog_ac_ct_CC
-+if test -n "$ac_ct_CC"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-+echo "${ECHO_T}$ac_ct_CC" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ CC=$ac_ct_CC
-+else
-+ CC="$ac_cv_prog_CC"
-+fi
-+
-+fi
-+if test -z "$CC"; then
-+ # Extract the first word of "cc", so it can be a program name with args.
-+set dummy cc; ac_word=$2
-+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
-+
-+fi
-+if test -z "$CC"; then
-+ if test -n "$ac_tool_prefix"; then
-+ for ac_prog in cl
-+ do
-+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-+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="$ac_tool_prefix$ac_prog"
-+ 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
-+
-+ test -n "$CC" && break
-+ done
-+fi
-+if test -z "$CC"; then
-+ ac_ct_CC=$CC
-+ for ac_prog in cl
-+do
-+ # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; 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_CC+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -n "$ac_ct_CC"; then
-+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_ac_ct_CC="$ac_prog"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+fi
-+fi
-+ac_ct_CC=$ac_cv_prog_ac_ct_CC
-+if test -n "$ac_ct_CC"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-+echo "${ECHO_T}$ac_ct_CC" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ test -n "$ac_ct_CC" && break
-+done
-+
-+ CC=$ac_ct_CC
-+fi
-+
-+fi
-+
-+
-+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: no acceptable C compiler found in \$PATH
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }
-+
-+# Provide some information about the compiler.
-+echo "$as_me:$LINENO:" \
-+ "checking for C compiler version" >&5
-+ac_compiler=`set X $ac_compile; echo $2`
-+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-+ (eval $ac_compiler --version </dev/null >&5) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }
-+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-+ (eval $ac_compiler -v </dev/null >&5) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }
-+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-+ (eval $ac_compiler -V </dev/null >&5) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }
-+
-+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
-+ac_clean_files_save=$ac_clean_files
-+ac_clean_files="$ac_clean_files a.out a.exe b.out"
-+# Try to create an executable without -o first, disregard a.out.
-+# It will help us diagnose broken compilers, and finding out an intuition
-+# of exeext.
-+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-+ (eval $ac_link_default) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; then
-+ # Find the output, starting from the most likely. This scheme is
-+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-+# resort.
-+
-+# Be careful to initialize this variable, since it used to be cached.
-+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-+ac_cv_exeext=
-+# b.out is created by i960 compilers.
-+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-+do
-+ test -f "$ac_file" || continue
-+ case $ac_file in
-+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-+ ;;
-+ conftest.$ac_ext )
-+ # This is the source file.
-+ ;;
-+ [ab].out )
-+ # We found the default executable, but exeext='' is most
-+ # certainly right.
-+ break;;
-+ *.* )
-+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-+ # FIXME: I believe we export ac_cv_exeext for Libtool,
-+ # but it would be cool to find out if it's true. Does anybody
-+ # maintain Libtool? --akim.
-+ export ac_cv_exeext
-+ break;;
-+ * )
-+ break;;
-+ esac
-+done
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: C compiler cannot create executables
-+See \`config.log' for more details." >&2;}
-+ { (exit 77); exit 77; }; }
-+fi
-+
-+ac_exeext=$ac_cv_exeext
-+echo "$as_me:$LINENO: result: $ac_file" >&5
-+echo "${ECHO_T}$ac_file" >&6
-+
-+# Check the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-+# If not cross compiling, check that we can run a simple program.
-+if test "$cross_compiling" != yes; then
-+ if { ac_try='./$ac_file'
-+ { (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
-+ cross_compiling=no
-+ else
-+ if test "$cross_compiling" = maybe; then
-+ cross_compiling=yes
-+ else
-+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi
-+ fi
-+fi
-+echo "$as_me:$LINENO: result: yes" >&5
-+echo "${ECHO_T}yes" >&6
-+
-+rm -f a.out a.exe conftest$ac_cv_exeext b.out
-+ac_clean_files=$ac_clean_files_save
-+# Check the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-+echo "$as_me:$LINENO: result: $cross_compiling" >&5
-+echo "${ECHO_T}$cross_compiling" >&6
-+
-+echo "$as_me:$LINENO: checking for suffix of executables" >&5
-+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; then
-+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
-+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-+# work properly (i.e., refer to `conftest.exe'), while it won't with
-+# `rm'.
-+for ac_file in conftest.exe conftest conftest.*; do
-+ test -f "$ac_file" || continue
-+ case $ac_file in
-+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
-+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-+ export ac_cv_exeext
-+ break;;
-+ * ) break;;
-+ esac
-+done
-+else
-+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+
-+rm -f conftest$ac_cv_exeext
-+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-+echo "${ECHO_T}$ac_cv_exeext" >&6
-+
-+rm -f conftest.$ac_ext
-+EXEEXT=$ac_cv_exeext
-+ac_exeext=$EXEEXT
-+echo "$as_me:$LINENO: checking for suffix of object files" >&5
-+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-+if test "${ac_cv_objext+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.o conftest.obj
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; then
-+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-+ case $ac_file in
-+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
-+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-+ break;;
-+ esac
-+done
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: cannot compute suffix of object files: cannot compile
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+
-+rm -f conftest.$ac_cv_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-+echo "${ECHO_T}$ac_cv_objext" >&6
-+OBJEXT=$ac_cv_objext
-+ac_objext=$OBJEXT
-+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-+if test "${ac_cv_c_compiler_gnu+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 ()
-+{
-+#ifndef __GNUC__
-+ choke me
-+#endif
-+
-+ ;
-+ 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_compiler_gnu=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_compiler_gnu=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+ac_cv_c_compiler_gnu=$ac_compiler_gnu
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-+GCC=`test $ac_compiler_gnu = yes && echo yes`
-+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
-+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-+if test "${ac_cv_prog_cc_stdc+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_cv_prog_cc_stdc=no
-+ac_save_CC=$CC
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-+struct buf { int x; };
-+FILE * (*rcsopen) (struct buf *, struct stat *, int);
-+static char *e (p, i)
-+ char **p;
-+ int i;
-+{
-+ return p[i];
-+}
-+static char *f (char * (*g) (char **, int), char **p, ...)
-+{
-+ char *s;
-+ va_list v;
-+ va_start (v,p);
-+ s = g (p, va_arg (v,int));
-+ va_end (v);
-+ return s;
-+}
-+
-+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
-+ function prototypes and stuff, but not '\xHH' hex character constants.
-+ These don't provoke an error unfortunately, instead are silently treated
-+ as 'x'. The following induces an error, until -std1 is added to get
-+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
-+ array size at least. It's necessary to write '\x00'==0 to get something
-+ that's true only with -std1. */
-+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-+
-+int test (int i, double x);
-+struct s1 {int (*f) (int a);};
-+struct s2 {int (*f) (double a);};
-+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-+int argc;
-+char **argv;
-+int
-+main ()
-+{
-+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+# Don't try gcc -ansi; that turns off useful extensions and
-+# breaks some systems' header files.
-+# AIX -qlanglvl=ansi
-+# Ultrix and OSF/1 -std1
-+# HP-UX 10.20 and later -Ae
-+# HP-UX older versions -Aa -D_HPUX_SOURCE
-+# SVR4 -Xc -D__EXTENSIONS__
-+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-+do
-+ CC="$ac_save_CC $ac_arg"
-+ 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_stdc=$ac_arg
-+break
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext
-+done
-+rm -f conftest.$ac_ext conftest.$ac_objext
-+CC=$ac_save_CC
-+
-+fi
-+
-+case "x$ac_cv_prog_cc_stdc" in
-+ x|xno)
-+ echo "$as_me:$LINENO: result: none needed" >&5
-+echo "${ECHO_T}none needed" >&6 ;;
-+ *)
-+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-+ CC="$CC $ac_cv_prog_cc_stdc" ;;
-+esac
-+
-+# Some people use a C++ compiler to compile C. Since we use `exit',
-+# in C++ we need to declare it. In case someone uses the same compiler
-+# for both compiling C and C++ we need to have the C++ compiler decide
-+# the declaration of exit, since it's the most demanding environment.
-+cat >conftest.$ac_ext <<_ACEOF
-+#ifndef __cplusplus
-+ choke me
-+#endif
-+_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
-+ for ac_declaration in \
-+ '' \
-+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
-+ 'extern "C" void std::exit (int); using std::exit;' \
-+ 'extern "C" void exit (int) throw ();' \
-+ 'extern "C" void exit (int);' \
-+ 'void exit (int);'
-+do
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_declaration
-+#include <stdlib.h>
-+int
-+main ()
-+{
-+exit (42);
-+ ;
-+ 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
-+ :
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_declaration
-+int
-+main ()
-+{
-+exit (42);
-+ ;
-+ 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
-+ break
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+done
-+rm -f conftest*
-+if test -n "$ac_declaration"; then
-+ echo '#ifdef __cplusplus' >>confdefs.h
-+ echo $ac_declaration >>confdefs.h
-+ echo '#endif' >>confdefs.h
-+fi
-+
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+# 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'
-+
-+
-+# Put a plausible default for CC_FOR_BUILD in Makefile.
-+if test "x$cross_compiling" = "xno"; then
-+ CC_FOR_BUILD='$(CC)'
-+else
-+ CC_FOR_BUILD=gcc
-+fi
-+
-+
-+
-+
-+AR=${AR-ar}
-+
-+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
-+
-+
-+ALL_LINGUAS=
-+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.make <<\_ACEOF
-+all:
-+ @echo 'ac_maketemp="$(MAKE)"'
-+_ACEOF
-+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-+if test -n "$ac_maketemp"; then
-+ eval ac_cv_prog_make_${ac_make}_set=yes
-+else
-+ eval ac_cv_prog_make_${ac_make}_set=no
-+fi
-+rm -f conftest.make
-+fi
-+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-+ echo "$as_me:$LINENO: result: yes" >&5
-+echo "${ECHO_T}yes" >&6
-+ SET_MAKE=
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+ SET_MAKE="MAKE=${MAKE-make}"
-+fi
-+
-+
-+echo "$as_me:$LINENO: checking for library containing strerror" >&5
-+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-+if test "${ac_cv_search_strerror+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_func_search_save_LIBS=$LIBS
-+ac_cv_search_strerror=no
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char strerror ();
-+int
-+main ()
-+{
-+strerror ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_search_strerror="none required"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+if test "$ac_cv_search_strerror" = no; then
-+ for ac_lib in cposix; do
-+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char strerror ();
-+int
-+main ()
-+{
-+strerror ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_search_strerror="-l$ac_lib"
-+break
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ done
-+fi
-+LIBS=$ac_func_search_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-+echo "${ECHO_T}$ac_cv_search_strerror" >&6
-+if test "$ac_cv_search_strerror" != no; then
-+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-+
-+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
-+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-+# On Suns, sometimes $CPP names a directory.
-+if test -n "$CPP" && test -d "$CPP"; then
-+ CPP=
-+fi
-+if test -z "$CPP"; then
-+ if test "${ac_cv_prog_CPP+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ # Double quotes because CPP needs to be expanded
-+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-+ do
-+ ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ # <limits.h> exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+ Syntax error
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ :
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether non-existent headers
-+ # can be detected and how.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <ac_nonexistent.h>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ # Broken: success on invalid input.
-+continue
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then
-+ break
-+fi
-+
-+ done
-+ ac_cv_prog_CPP=$CPP
-+
-+fi
-+ CPP=$ac_cv_prog_CPP
-+else
-+ ac_cv_prog_CPP=$CPP
-+fi
-+echo "$as_me:$LINENO: result: $CPP" >&5
-+echo "${ECHO_T}$CPP" >&6
-+ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ # <limits.h> exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+ Syntax error
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ :
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether non-existent headers
-+ # can be detected and how.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <ac_nonexistent.h>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ # Broken: success on invalid input.
-+continue
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then
-+ :
-+else
-+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details." >&5
-+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details." >&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
-+
-+
-+echo "$as_me:$LINENO: checking for egrep" >&5
-+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-+if test "${ac_cv_prog_egrep+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-+ then ac_cv_prog_egrep='grep -E'
-+ else ac_cv_prog_egrep='egrep'
-+ fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
-+ EGREP=$ac_cv_prog_egrep
-+
-+
-+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-+if test "${ac_cv_header_stdc+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. */
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <string.h>
-+#include <float.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_header_stdc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_header_stdc=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <string.h>
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "memchr" >/dev/null 2>&1; then
-+ :
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <stdlib.h>
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "free" >/dev/null 2>&1; then
-+ :
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+ if test "$cross_compiling" = yes; then
-+ :
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <ctype.h>
-+#if ((' ' & 0x0FF) == 0x020)
-+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-+#else
-+# define ISLOWER(c) \
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
-+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-+#endif
-+
-+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-+int
-+main ()
-+{
-+ int i;
-+ for (i = 0; i < 256; i++)
-+ if (XOR (islower (i), ISLOWER (i))
-+ || toupper (i) != TOUPPER (i))
-+ exit(2);
-+ exit (0);
-+}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+ { (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
-+ :
-+else
-+ echo "$as_me: program exited with status $ac_status" >&5
-+echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+ac_cv_header_stdc=no
-+fi
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-+echo "${ECHO_T}$ac_cv_header_stdc" >&6
-+if test $ac_cv_header_stdc = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define STDC_HEADERS 1
-+_ACEOF
-+
-+fi
-+
-+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-+if test "${ac_cv_c_const+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 ()
-+{
-+/* FIXME: Include the comments suggested by Paul. */
-+#ifndef __cplusplus
-+ /* Ultrix mips cc rejects this. */
-+ typedef int charset[2];
-+ const charset x;
-+ /* SunOS 4.1.1 cc rejects this. */
-+ char const *const *ccp;
-+ char **p;
-+ /* NEC SVR4.0.2 mips cc rejects this. */
-+ struct point {int x, y;};
-+ static struct point const zero = {0,0};
-+ /* AIX XL C 1.02.0.0 rejects this.
-+ It does not let you subtract one const X* pointer from another in
-+ an arm of an if-expression whose if-part is not a constant
-+ expression */
-+ const char *g = "string";
-+ ccp = &g + (g ? g-g : 0);
-+ /* HPUX 7.0 cc rejects these. */
-+ ++ccp;
-+ p = (char**) ccp;
-+ ccp = (char const *const *) p;
-+ { /* SCO 3.2v4 cc rejects this. */
-+ char *t;
-+ char const *s = 0 ? (char *) 0 : (char const *) 0;
-+
-+ *t++ = 0;
-+ }
-+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
-+ int x[] = {25, 17};
-+ const int *foo = &x[0];
-+ ++foo;
-+ }
-+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-+ typedef const int *iptr;
-+ iptr p = 0;
-+ ++p;
-+ }
-+ { /* AIX XL C 1.02.0.0 rejects this saying
-+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-+ struct s { int j; const int *ap[3]; };
-+ struct s *b; b->j = 5;
-+ }
-+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-+ const int foo = 10;
-+ }
-+#endif
-+
-+ ;
-+ 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_c_const=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_c_const=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-+echo "${ECHO_T}$ac_cv_c_const" >&6
-+if test $ac_cv_c_const = no; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define const
-+_ACEOF
-+
-+fi
-+
-+echo "$as_me:$LINENO: checking for inline" >&5
-+echo $ECHO_N "checking for inline... $ECHO_C" >&6
-+if test "${ac_cv_c_inline+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_cv_c_inline=no
-+for ac_kw in inline __inline__ __inline; do
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#ifndef __cplusplus
-+typedef int foo_t;
-+static $ac_kw foo_t static_foo () {return 0; }
-+$ac_kw foo_t foo () {return 0; }
-+#endif
-+
-+_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_c_inline=$ac_kw; break
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+done
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-+echo "${ECHO_T}$ac_cv_c_inline" >&6
-+
-+
-+case $ac_cv_c_inline in
-+ inline | yes) ;;
-+ *)
-+ case $ac_cv_c_inline in
-+ no) ac_val=;;
-+ *) ac_val=$ac_cv_c_inline;;
-+ esac
-+ cat >>confdefs.h <<_ACEOF
-+#ifndef __cplusplus
-+#define inline $ac_val
-+#endif
-+_ACEOF
-+ ;;
-+esac
-+
-+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-+ inttypes.h stdint.h unistd.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+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. */
-+$ac_includes_default
-+
-+#include <$ac_header>
-+_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
-+ eval "$as_ac_Header=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_Header=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+echo "$as_me:$LINENO: checking for off_t" >&5
-+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-+if test "${ac_cv_type_off_t+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. */
-+$ac_includes_default
-+int
-+main ()
-+{
-+if ((off_t *) 0)
-+ return 0;
-+if (sizeof (off_t))
-+ return 0;
-+ ;
-+ 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_type_off_t=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_type_off_t=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-+echo "${ECHO_T}$ac_cv_type_off_t" >&6
-+if test $ac_cv_type_off_t = yes; then
-+ :
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long
-+_ACEOF
-+
-+fi
-+
-+echo "$as_me:$LINENO: checking for size_t" >&5
-+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-+if test "${ac_cv_type_size_t+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. */
-+$ac_includes_default
-+int
-+main ()
-+{
-+if ((size_t *) 0)
-+ return 0;
-+if (sizeof (size_t))
-+ return 0;
-+ ;
-+ 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_type_size_t=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_type_size_t=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-+echo "${ECHO_T}$ac_cv_type_size_t" >&6
-+if test $ac_cv_type_size_t = yes; then
-+ :
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned
-+_ACEOF
-+
-+fi
-+
-+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-+# for constant arguments. Useless!
-+echo "$as_me:$LINENO: checking for working alloca.h" >&5
-+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-+if test "${ac_cv_working_alloca_h+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. */
-+#include <alloca.h>
-+int
-+main ()
-+{
-+char *p = (char *) alloca (2 * sizeof (int));
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_working_alloca_h=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_working_alloca_h=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-+if test $ac_cv_working_alloca_h = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_ALLOCA_H 1
-+_ACEOF
-+
-+fi
-+
-+echo "$as_me:$LINENO: checking for alloca" >&5
-+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-+if test "${ac_cv_func_alloca_works+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. */
-+#ifdef __GNUC__
-+# define alloca __builtin_alloca
-+#else
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
-+# else
-+# if HAVE_ALLOCA_H
-+# include <alloca.h>
-+# else
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca /* predefined by HP cc +Olibcalls */
-+char *alloca ();
-+# endif
-+# endif
-+# endif
-+# endif
-+#endif
-+
-+int
-+main ()
-+{
-+char *p = (char *) alloca (1);
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_func_alloca_works=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_func_alloca_works=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-+
-+if test $ac_cv_func_alloca_works = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_ALLOCA 1
-+_ACEOF
-+
-+else
-+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-+# that cause trouble. Some versions do not even contain alloca or
-+# contain a buggy version. If you still want to use their alloca,
-+# use ar to extract alloca.o from them instead of compiling alloca.c.
-+
-+ALLOCA=alloca.$ac_objext
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define C_ALLOCA 1
-+_ACEOF
-+
-+
-+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-+if test "${ac_cv_os_cray+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. */
-+#if defined(CRAY) && ! defined(CRAY2)
-+webecray
-+#else
-+wenotbecray
-+#endif
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "webecray" >/dev/null 2>&1; then
-+ ac_cv_os_cray=yes
-+else
-+ ac_cv_os_cray=no
-+fi
-+rm -f conftest*
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-+echo "${ECHO_T}$ac_cv_os_cray" >&6
-+if test $ac_cv_os_cray = yes; then
-+ for ac_func in _getb67 GETB67 getb67; do
-+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+
-+cat >>confdefs.h <<_ACEOF
-+#define CRAY_STACKSEG_END $ac_func
-+_ACEOF
-+
-+ break
-+fi
-+
-+ done
-+fi
-+
-+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-+if test "${ac_cv_c_stack_direction+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test "$cross_compiling" = yes; then
-+ ac_cv_c_stack_direction=0
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+int
-+find_stack_direction ()
-+{
-+ static char *addr = 0;
-+ auto char dummy;
-+ if (addr == 0)
-+ {
-+ addr = &dummy;
-+ return find_stack_direction ();
-+ }
-+ else
-+ return (&dummy > addr) ? 1 : -1;
-+}
-+
-+int
-+main ()
-+{
-+ exit (find_stack_direction () < 0);
-+}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+ { (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_c_stack_direction=1
-+else
-+ echo "$as_me: program exited with status $ac_status" >&5
-+echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+ac_cv_c_stack_direction=-1
-+fi
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-+
-+cat >>confdefs.h <<_ACEOF
-+#define STACK_DIRECTION $ac_cv_c_stack_direction
-+_ACEOF
-+
-+
-+fi
-+
-+
-+
-+for ac_header in stdlib.h unistd.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+for ac_func in getpagesize
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+echo "$as_me:$LINENO: checking for working mmap" >&5
-+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test "$cross_compiling" = yes; then
-+ ac_cv_func_mmap_fixed_mapped=no
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+/* malloc might have been renamed as rpl_malloc. */
-+#undef malloc
-+
-+/* Thanks to Mike Haertel and Jim Avera for this test.
-+ Here is a matrix of mmap possibilities:
-+ mmap private not fixed
-+ mmap private fixed at somewhere currently unmapped
-+ mmap private fixed at somewhere already mapped
-+ mmap shared not fixed
-+ mmap shared fixed at somewhere currently unmapped
-+ mmap shared fixed at somewhere already mapped
-+ For private mappings, we should verify that changes cannot be read()
-+ back from the file, nor mmap's back from the file at a different
-+ address. (There have been systems where private was not correctly
-+ implemented like the infamous i386 svr4.0, and systems where the
-+ VM page cache was not coherent with the file system buffer cache
-+ like early versions of FreeBSD and possibly contemporary NetBSD.)
-+ For shared mappings, we should conversely verify that changes get
-+ propagated back to all the places they're supposed to be.
-+
-+ Grep wants private fixed already mapped.
-+ The main things grep needs to know about mmap are:
-+ * does it exist and is it safe to write into the mmap'd area
-+ * how to use it (BSD variants) */
-+
-+#include <fcntl.h>
-+#include <sys/mman.h>
-+
-+#if !STDC_HEADERS && !HAVE_STDLIB_H
-+char *malloc ();
-+#endif
-+
-+/* This mess was copied from the GNU getpagesize.h. */
-+#if !HAVE_GETPAGESIZE
-+/* Assume that all systems that can run configure have sys/param.h. */
-+# if !HAVE_SYS_PARAM_H
-+# define HAVE_SYS_PARAM_H 1
-+# endif
-+
-+# ifdef _SC_PAGESIZE
-+# define getpagesize() sysconf(_SC_PAGESIZE)
-+# else /* no _SC_PAGESIZE */
-+# if HAVE_SYS_PARAM_H
-+# include <sys/param.h>
-+# ifdef EXEC_PAGESIZE
-+# define getpagesize() EXEC_PAGESIZE
-+# else /* no EXEC_PAGESIZE */
-+# ifdef NBPG
-+# define getpagesize() NBPG * CLSIZE
-+# ifndef CLSIZE
-+# define CLSIZE 1
-+# endif /* no CLSIZE */
-+# else /* no NBPG */
-+# ifdef NBPC
-+# define getpagesize() NBPC
-+# else /* no NBPC */
-+# ifdef PAGESIZE
-+# define getpagesize() PAGESIZE
-+# endif /* PAGESIZE */
-+# endif /* no NBPC */
-+# endif /* no NBPG */
-+# endif /* no EXEC_PAGESIZE */
-+# else /* no HAVE_SYS_PARAM_H */
-+# define getpagesize() 8192 /* punt totally */
-+# endif /* no HAVE_SYS_PARAM_H */
-+# endif /* no _SC_PAGESIZE */
-+
-+#endif /* no HAVE_GETPAGESIZE */
-+
-+int
-+main ()
-+{
-+ char *data, *data2, *data3;
-+ int i, pagesize;
-+ int fd;
-+
-+ pagesize = getpagesize ();
-+
-+ /* First, make a file with some known garbage in it. */
-+ data = (char *) malloc (pagesize);
-+ if (!data)
-+ exit (1);
-+ for (i = 0; i < pagesize; ++i)
-+ *(data + i) = rand ();
-+ umask (0);
-+ fd = creat ("conftest.mmap", 0600);
-+ if (fd < 0)
-+ exit (1);
-+ if (write (fd, data, pagesize) != pagesize)
-+ exit (1);
-+ close (fd);
-+
-+ /* Next, try to mmap the file at a fixed address which already has
-+ something else allocated at it. If we can, also make sure that
-+ we see the same garbage. */
-+ fd = open ("conftest.mmap", O_RDWR);
-+ if (fd < 0)
-+ exit (1);
-+ data2 = (char *) malloc (2 * pagesize);
-+ if (!data2)
-+ exit (1);
-+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
-+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
-+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
-+ exit (1);
-+ for (i = 0; i < pagesize; ++i)
-+ if (*(data + i) != *(data2 + i))
-+ exit (1);
-+
-+ /* Finally, make sure that changes to the mapped area do not
-+ percolate back to the file as seen by read(). (This is a bug on
-+ some variants of i386 svr4.0.) */
-+ for (i = 0; i < pagesize; ++i)
-+ *(data2 + i) = *(data2 + i) + 1;
-+ data3 = (char *) malloc (pagesize);
-+ if (!data3)
-+ exit (1);
-+ if (read (fd, data3, pagesize) != pagesize)
-+ exit (1);
-+ for (i = 0; i < pagesize; ++i)
-+ if (*(data + i) != *(data3 + i))
-+ exit (1);
-+ close (fd);
-+ exit (0);
-+}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+ { (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_func_mmap_fixed_mapped=yes
-+else
-+ echo "$as_me: program exited with status $ac_status" >&5
-+echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+ac_cv_func_mmap_fixed_mapped=no
-+fi
-+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-+if test $ac_cv_func_mmap_fixed_mapped = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_MMAP 1
-+_ACEOF
-+
-+fi
-+rm -f conftest.mmap
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-+unistd.h values.h sys/param.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-+__argz_count __argz_stringify __argz_next
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+
-+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
-+
-+for ac_func in stpcpy
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+ fi
-+ if test "${ac_cv_func_stpcpy}" = "yes"; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STPCPY 1
-+_ACEOF
-+
-+ fi
-+
-+ if test $ac_cv_header_locale_h = yes; then
-+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-+if test "${am_cv_val_LC_MESSAGES+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. */
-+#include <locale.h>
-+int
-+main ()
-+{
-+return LC_MESSAGES
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ am_cv_val_LC_MESSAGES=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+am_cv_val_LC_MESSAGES=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_LC_MESSAGES 1
-+_ACEOF
-+
-+ fi
-+ fi
-+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
-+ # Check whether --enable-nls or --disable-nls was given.
-+if test "${enable_nls+set}" = set; then
-+ enableval="$enable_nls"
-+ USE_NLS=$enableval
-+else
-+ USE_NLS=yes
-+fi;
-+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
-+echo "${ECHO_T}$USE_NLS" >&6
-+
-+
-+ USE_INCLUDED_LIBINTL=no
-+
-+ if test "$USE_NLS" = "yes"; then
-+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-+
-+# Check whether --with-included-gettext or --without-included-gettext was given.
-+if test "${with_included_gettext+set}" = set; then
-+ withval="$with_included_gettext"
-+ nls_cv_force_use_gnu_gettext=$withval
-+else
-+ nls_cv_force_use_gnu_gettext=no
-+fi;
-+ echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-+echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-+
-+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-+ nls_cv_header_intl=
-+ nls_cv_header_libgt=
-+ CATOBJEXT=
-+
-+ if test "${ac_cv_header_libintl_h+set}" = set; then
-+ echo "$as_me:$LINENO: checking for libintl.h" >&5
-+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-+if test "${ac_cv_header_libintl_h+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking libintl.h usability" >&5
-+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <libintl.h>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking libintl.h presence" >&5
-+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <libintl.h>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for libintl.h" >&5
-+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-+if test "${ac_cv_header_libintl_h+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_cv_header_libintl_h=$ac_header_preproc
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-+
-+fi
-+if test $ac_cv_header_libintl_h = yes; then
-+ echo "$as_me:$LINENO: checking for gettext in libc" >&5
-+echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-+if test "${gt_cv_func_gettext_libc+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. */
-+#include <libintl.h>
-+int
-+main ()
-+{
-+return (int) gettext ("")
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ gt_cv_func_gettext_libc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gt_cv_func_gettext_libc=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-+echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
-+
-+ if test "$gt_cv_func_gettext_libc" != "yes"; then
-+ echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lintl $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char bindtextdomain ();
-+int
-+main ()
-+{
-+bindtextdomain ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_lib_intl_bindtextdomain=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_lib_intl_bindtextdomain=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-+if test $ac_cv_lib_intl_bindtextdomain = yes; then
-+ echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-+echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-+if test "${gt_cv_func_gettext_libintl+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 (int) gettext ("")
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ gt_cv_func_gettext_libintl=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gt_cv_func_gettext_libintl=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-+echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
-+fi
-+
-+ fi
-+
-+ if test "$gt_cv_func_gettext_libc" = "yes" \
-+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_GETTEXT 1
-+_ACEOF
-+
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; 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_path_MSGFMT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case "$MSGFMT" in
-+ /*)
-+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f $ac_dir/$ac_word; then
-+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-+ break
-+ fi
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-+ ;;
-+esac
-+fi
-+MSGFMT="$ac_cv_path_MSGFMT"
-+if test -n "$MSGFMT"; then
-+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
-+echo "${ECHO_T}$MSGFMT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+ if test "$MSGFMT" != "no"; then
-+
-+for ac_func in dcgettext
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
-+set dummy gmsgfmt; 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_path_GMSGFMT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case $GMSGFMT in
-+ [\\/]* | ?:[\\/]*)
-+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-+ ;;
-+esac
-+fi
-+GMSGFMT=$ac_cv_path_GMSGFMT
-+
-+if test -n "$GMSGFMT"; then
-+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-+echo "${ECHO_T}$GMSGFMT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ # Extract the first word of "xgettext", so it can be a program name with args.
-+set dummy xgettext; 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_path_XGETTEXT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case "$XGETTEXT" in
-+ /*)
-+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f $ac_dir/$ac_word; then
-+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-+ break
-+ fi
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-+ ;;
-+esac
-+fi
-+XGETTEXT="$ac_cv_path_XGETTEXT"
-+if test -n "$XGETTEXT"; then
-+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-+echo "${ECHO_T}$XGETTEXT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+int
-+main ()
-+{
-+extern int _nl_msg_cat_cntr;
-+ return _nl_msg_cat_cntr
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ CATOBJEXT=.gmo
-+ DATADIRNAME=share
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+CATOBJEXT=.mo
-+ DATADIRNAME=lib
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ INSTOBJEXT=.mo
-+ fi
-+ fi
-+
-+fi
-+
-+
-+
-+
-+ if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
-+ # Neither gettext nor catgets in included in the C library.
-+ # Fall back on GNU gettext library (assuming it is present).
-+ nls_cv_use_gnu_gettext=yes
-+ fi
-+ fi
-+
-+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
-+ INTLOBJS="\$(GETTOBJS)"
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; 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_path_MSGFMT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case "$MSGFMT" in
-+ /*)
-+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f $ac_dir/$ac_word; then
-+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-+ break
-+ fi
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
-+ ;;
-+esac
-+fi
-+MSGFMT="$ac_cv_path_MSGFMT"
-+if test -n "$MSGFMT"; then
-+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
-+echo "${ECHO_T}$MSGFMT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
-+set dummy gmsgfmt; 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_path_GMSGFMT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case $GMSGFMT in
-+ [\\/]* | ?:[\\/]*)
-+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-+ ;;
-+esac
-+fi
-+GMSGFMT=$ac_cv_path_GMSGFMT
-+
-+if test -n "$GMSGFMT"; then
-+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-+echo "${ECHO_T}$GMSGFMT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ # Extract the first word of "xgettext", so it can be a program name with args.
-+set dummy xgettext; 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_path_XGETTEXT+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ case "$XGETTEXT" in
-+ /*)
-+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-+ ;;
-+ *)
-+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-+ for ac_dir in $PATH; do
-+ test -z "$ac_dir" && ac_dir=.
-+ if test -f $ac_dir/$ac_word; then
-+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-+ break
-+ fi
-+ fi
-+ done
-+ IFS="$ac_save_ifs"
-+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-+ ;;
-+esac
-+fi
-+XGETTEXT="$ac_cv_path_XGETTEXT"
-+if test -n "$XGETTEXT"; then
-+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-+echo "${ECHO_T}$XGETTEXT" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+
-+ USE_INCLUDED_LIBINTL=yes
-+ CATOBJEXT=.gmo
-+ INSTOBJEXT=.mo
-+ DATADIRNAME=share
-+ INTLDEPS='$(top_builddir)/../intl/libintl.a'
-+ INTLLIBS=$INTLDEPS
-+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-+ nls_cv_header_intl=libintl.h
-+ nls_cv_header_libgt=libgettext.h
-+ fi
-+
-+ if test "$XGETTEXT" != ":"; then
-+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-+ : ;
-+ else
-+ echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-+echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
-+ XGETTEXT=":"
-+ fi
-+ fi
-+
-+ # We need to process the po/ directory.
-+ POSUB=po
-+ else
-+ DATADIRNAME=share
-+ nls_cv_header_intl=libintl.h
-+ nls_cv_header_libgt=libgettext.h
-+ fi
-+
-+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
-+ # because some of the sources are only built for this goal.
-+ if test "$PACKAGE" = gettext; then
-+ USE_NLS=yes
-+ USE_INCLUDED_LIBINTL=yes
-+ fi
-+
-+ for lang in $ALL_LINGUAS; do
-+ GMOFILES="$GMOFILES $lang.gmo"
-+ POFILES="$POFILES $lang.po"
-+ done
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+ if test "x$CATOBJEXT" != "x"; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define ENABLE_NLS 1
-+_ACEOF
-+
-+ fi
-+
-+
-+ if test "x$CATOBJEXT" != "x"; then
-+ if test "x$ALL_LINGUAS" = "x"; then
-+ LINGUAS=
-+ else
-+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
-+ NEW_LINGUAS=
-+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
-+ case "$ALL_LINGUAS" in
-+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-+ esac
-+ done
-+ LINGUAS=$NEW_LINGUAS
-+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
-+echo "${ECHO_T}$LINGUAS" >&6
-+ fi
-+
-+ if test -n "$LINGUAS"; then
-+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-+ fi
-+ fi
-+
-+ if test $ac_cv_header_locale_h = yes; then
-+ INCLUDE_LOCALE_H="#include <locale.h>"
-+ else
-+ INCLUDE_LOCALE_H="\
-+/* The system does not provide the header <locale.h>. Take care yourself. */"
-+ fi
-+
-+
-+ if test -f $srcdir/po2tbl.sed.in; then
-+ if test "$CATOBJEXT" = ".cat"; then
-+ if test "${ac_cv_header_linux_version_h+set}" = set; then
-+ echo "$as_me:$LINENO: checking for linux/version.h" >&5
-+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-+if test "${ac_cv_header_linux_version_h+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-+echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <linux/version.h>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-+echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <linux/version.h>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for linux/version.h" >&5
-+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-+if test "${ac_cv_header_linux_version_h+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_cv_header_linux_version_h=$ac_header_preproc
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-+
-+fi
-+if test $ac_cv_header_linux_version_h = yes; then
-+ msgformat=linux
-+else
-+ msgformat=xopen
-+fi
-+
-+
-+
-+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
-+ fi
-+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-+ $srcdir/po2tbl.sed.in > po2tbl.sed
-+ fi
-+
-+ if test "$PACKAGE" = "gettext"; then
-+ GT_NO="#NO#"
-+ GT_YES=
-+ else
-+ GT_NO=
-+ GT_YES="#YES#"
-+ fi
-+
-+
-+
-+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-+
-+
-+ l=
-+
-+
-+ if test -f $srcdir/po/POTFILES.in; then
-+ test -d po || mkdir po
-+ if test "x$srcdir" != "x."; then
-+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-+ posrcprefix="$srcdir/"
-+ else
-+ posrcprefix="../$srcdir/"
-+ fi
-+ else
-+ posrcprefix="../"
-+ fi
-+ rm -f po/POTFILES
-+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-+ < $srcdir/po/POTFILES.in > po/POTFILES
-+ fi
-+
-+
-+# Check for common headers.
-+# FIXME: Seems to me this can cause problems for i386-windows hosts.
-+# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-+
-+
-+
-+
-+
-+for ac_header in stdlib.h string.h strings.h unistd.h time.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+for ac_header in sys/time.h sys/resource.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+for ac_header in fcntl.h fpu_control.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+
-+for ac_header in dlfcn.h errno.h sys/stat.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+
-+
-+for ac_func in getrusage time sigaction __setfpucw
-+do
-+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+echo "$as_me:$LINENO: checking for $ac_func" >&5
-+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_var+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. */
-+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
-+#define $ac_func innocuous_$ac_func
-+
-+/* System header to define __stub macros and hopefully few prototypes,
-+ which can conflict with char $ac_func (); below.
-+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ <limits.h> exists even on freestanding compilers. */
-+
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+
-+#undef $ac_func
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char $ac_func ();
-+/* The GNU C library defines this for functions which it implements
-+ to always fail with ENOSYS. Some functions are actually named
-+ something starting with __ and the normal name is an alias. */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+char (*f) () = $ac_func;
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+int
-+main ()
-+{
-+return f != $ac_func;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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
-+ eval "$as_ac_var=yes"
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+eval "$as_ac_var=no"
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-+if test `eval echo '${'$as_ac_var'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+
-+# Check for socket libraries
-+
-+echo "$as_me:$LINENO: checking for bind in -lsocket" >&5
-+echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6
-+if test "${ac_cv_lib_socket_bind+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char bind ();
-+int
-+main ()
-+{
-+bind ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_lib_socket_bind=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_lib_socket_bind=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5
-+echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6
-+if test $ac_cv_lib_socket_bind = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
-+_ACEOF
-+
-+ LIBS="-lsocket $LIBS"
-+
-+fi
-+
-+
-+echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
-+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any gcc2 internal prototype to avoid an error. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char gethostbyname ();
-+int
-+main ()
-+{
-+gethostbyname ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-+ (eval $ac_link) 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_exeext'
-+ { (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_lib_nsl_gethostbyname=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_lib_nsl_gethostbyname=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
-+if test $ac_cv_lib_nsl_gethostbyname = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL 1
-+_ACEOF
-+
-+ LIBS="-lnsl $LIBS"
-+
-+fi
-+
-+
-+. ${srcdir}/../../bfd/configure.host
-+
-+
-+
-+USE_MAINTAINER_MODE=no
-+# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-+if test "${enable_maintainer_mode+set}" = set; then
-+ enableval="$enable_maintainer_mode"
-+ case "${enableval}" in
-+ yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
-+ no) MAINT="#" ;;
-+ *) { { echo "$as_me:$LINENO: error: \"--enable-maintainer-mode does not take a value\"" >&5
-+echo "$as_me: error: \"--enable-maintainer-mode does not take a value\"" >&2;}
-+ { (exit 1); exit 1; }; }; MAINT="#" ;;
-+esac
-+if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
-+ echo "Setting maintainer mode" 6>&1
-+fi
-+else
-+ MAINT="#"
-+fi;
-+
-+
-+# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
-+if test "${enable_sim_bswap+set}" = set; then
-+ enableval="$enable_sim_bswap"
-+ case "${enableval}" in
-+ yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
-+ no) sim_bswap="-DWITH_BSWAP=0";;
-+ *) { { echo "$as_me:$LINENO: error: \"--enable-sim-bswap does not take a value\"" >&5
-+echo "$as_me: error: \"--enable-sim-bswap does not take a value\"" >&2;}
-+ { (exit 1); exit 1; }; }; sim_bswap="";;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
-+ echo "Setting bswap flags = $sim_bswap" 6>&1
-+fi
-+else
-+ sim_bswap=""
-+fi;
-+
-+
-+# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
-+if test "${enable_sim_cflags+set}" = set; then
-+ enableval="$enable_sim_cflags"
-+ case "${enableval}" in
-+ yes) sim_cflags="-O2 -fomit-frame-pointer";;
-+ trace) { { echo "$as_me:$LINENO: error: \"Please use --enable-sim-debug instead.\"" >&5
-+echo "$as_me: error: \"Please use --enable-sim-debug instead.\"" >&2;}
-+ { (exit 1); exit 1; }; }; sim_cflags="";;
-+ no) sim_cflags="";;
-+ *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
-+ echo "Setting sim cflags = $sim_cflags" 6>&1
-+fi
-+else
-+ sim_cflags=""
-+fi;
-+
-+
-+# Check whether --enable-sim-debug or --disable-sim-debug was given.
-+if test "${enable_sim_debug+set}" = set; then
-+ enableval="$enable_sim_debug"
-+ case "${enableval}" in
-+ yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
-+ no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
-+ *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
-+ echo "Setting sim debug = $sim_debug" 6>&1
-+fi
-+else
-+ sim_debug=""
-+fi;
-+
-+
-+# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
-+if test "${enable_sim_stdio+set}" = set; then
-+ enableval="$enable_sim_stdio"
-+ case "${enableval}" in
-+ yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
-+ no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
-+ *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&5
-+echo "$as_me: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&2;}
-+ { (exit 1); exit 1; }; }; sim_stdio="";;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
-+ echo "Setting stdio flags = $sim_stdio" 6>&1
-+fi
-+else
-+ sim_stdio=""
-+fi;
-+
-+
-+# Check whether --enable-sim-trace or --disable-sim-trace was given.
-+if test "${enable_sim_trace+set}" = set; then
-+ enableval="$enable_sim_trace"
-+ case "${enableval}" in
-+ yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
-+ no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
-+ [-0-9]*)
-+ sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
-+ [a-z]*)
-+ sim_trace=""
-+ for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-+ if test x"$sim_trace" = x; then
-+ sim_trace="-DWITH_TRACE='(TRACE_$x"
-+ else
-+ sim_trace="${sim_trace}|TRACE_$x"
-+ fi
-+ done
-+ sim_trace="$sim_trace)'" ;;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
-+ echo "Setting sim trace = $sim_trace" 6>&1
-+fi
-+else
-+ sim_trace=""
-+fi;
-+
-+
-+# Check whether --enable-sim-profile or --disable-sim-profile was given.
-+if test "${enable_sim_profile+set}" = set; then
-+ enableval="$enable_sim_profile"
-+ case "${enableval}" in
-+ yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
-+ no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
-+ [-0-9]*)
-+ sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
-+ [a-z]*)
-+ sim_profile=""
-+ for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-+ if test x"$sim_profile" = x; then
-+ sim_profile="-DWITH_PROFILE='(PROFILE_$x"
-+ else
-+ sim_profile="${sim_profile}|PROFILE_$x"
-+ fi
-+ done
-+ sim_profile="$sim_profile)'" ;;
-+esac
-+if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
-+ echo "Setting sim profile = $sim_profile" 6>&1
-+fi
-+else
-+ sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
-+fi;
-+
-+
-+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
-+if test "${ac_cv_type_signal+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. */
-+#include <sys/types.h>
-+#include <signal.h>
-+#ifdef signal
-+# undef signal
-+#endif
-+#ifdef __cplusplus
-+extern "C" void (*signal (int, void (*)(int)))(int);
-+#else
-+void (*signal ()) ();
-+#endif
-+
-+int
-+main ()
-+{
-+int i;
-+ ;
-+ 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_type_signal=void
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_type_signal=int
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-+echo "${ECHO_T}$ac_cv_type_signal" >&6
-+
-+cat >>confdefs.h <<_ACEOF
-+#define RETSIGTYPE $ac_cv_type_signal
-+_ACEOF
-+
-+
-+
-+
-+
-+sim_link_files=
-+sim_link_links=
-+
-+sim_link_links=tconfig.h
-+if test -f ${srcdir}/tconfig.in
-+then
-+ sim_link_files=tconfig.in
-+else
-+ sim_link_files=../common/tconfig.in
-+fi
-+
-+# targ-vals.def points to the libc macro description file.
-+case "${target}" in
-+*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
-+esac
-+sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
-+sim_link_links="${sim_link_links} targ-vals.def"
-+
-+
-+
-+for ac_header in unistd.h
-+do
-+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+else
-+ # Is the header compilable?
-+echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_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_header_compiler=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_header_compiler=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+echo "${ECHO_T}$ac_header_compiler" >&6
-+
-+# Is the header present?
-+echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
-+ if test -s conftest.err; then
-+ ac_cpp_err=$ac_c_preproc_warn_flag
-+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-+ else
-+ ac_cpp_err=
-+ fi
-+else
-+ ac_cpp_err=yes
-+fi
-+if test -z "$ac_cpp_err"; then
-+ ac_header_preproc=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+echo "${ECHO_T}$ac_header_preproc" >&6
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ (
-+ cat <<\_ASBOX
-+## ------------------------------------------ ##
-+## Report this to the AC_PACKAGE_NAME lists. ##
-+## ------------------------------------------ ##
-+_ASBOX
-+ ) |
-+ sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+echo "$as_me:$LINENO: checking for $ac_header" >&5
-+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-+if eval "test \"\${$as_ac_Header+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-+
-+fi
-+if test `eval echo '${'$as_ac_Header'}'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+ac_sources="$sim_link_files"
-+ac_dests="$sim_link_links"
-+while test -n "$ac_sources"; do
-+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
-+ ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
-+done
-+ ac_config_links="$ac_config_links $ac_config_links_1"
-+
-+cgen_breaks=""
-+if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
-+cgen_breaks="break cgen_rtx_error";
-+fi
-+
-+ ac_config_files="$ac_config_files Makefile.sim:Makefile.in"
-+
-+ ac_config_files="$ac_config_files Make-common.sim:../common/Make-common.in"
-+
-+ ac_config_files="$ac_config_files .gdbinit:../common/gdbinit.in"
-+
-+ ac_config_commands="$ac_config_commands Makefile"
-+
-+ ac_config_commands="$ac_config_commands stamp-h"
-+
-+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
-+
-+
-+
-+: ${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 links:
-+$config_links
-+
-+Configuration commands:
-+$config_commands
-+
-+Report bugs to <bug-autoconf at gnu.org>."
-+_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
-+for ac_config_target in $ac_config_targets
-+do
-+ case "$ac_config_target" in
-+ # Handling of arguments.
-+ "Makefile.sim" ) CONFIG_FILES="$CONFIG_FILES Makefile.sim:Makefile.in" ;;
-+ "Make-common.sim" ) CONFIG_FILES="$CONFIG_FILES Make-common.sim:../common/Make-common.in" ;;
-+ ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:../common/gdbinit.in" ;;
-+ "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
-+ "Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;
-+ "stamp-h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
-+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
-+ *) { { 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_LINKS+set}" = set || CONFIG_LINKS=$config_links
-+ 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, at SHELL@,$SHELL,;t t
-+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
-+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
-+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-+s, at exec_prefix@,$exec_prefix,;t t
-+s, at prefix@,$prefix,;t t
-+s, at program_transform_name@,$program_transform_name,;t t
-+s, at bindir@,$bindir,;t t
-+s, at sbindir@,$sbindir,;t t
-+s, at libexecdir@,$libexecdir,;t t
-+s, at datadir@,$datadir,;t t
-+s, at sysconfdir@,$sysconfdir,;t t
-+s, at sharedstatedir@,$sharedstatedir,;t t
-+s, at localstatedir@,$localstatedir,;t t
-+s, at libdir@,$libdir,;t t
-+s, at includedir@,$includedir,;t t
-+s, at oldincludedir@,$oldincludedir,;t t
-+s, at infodir@,$infodir,;t t
-+s, at mandir@,$mandir,;t t
-+s, at build_alias@,$build_alias,;t t
-+s, at host_alias@,$host_alias,;t t
-+s, at target_alias@,$target_alias,;t t
-+s, at DEFS@,$DEFS,;t t
-+s, at ECHO_C@,$ECHO_C,;t t
-+s, at ECHO_N@,$ECHO_N,;t t
-+s, at ECHO_T@,$ECHO_T,;t t
-+s, at LIBS@,$LIBS,;t t
-+s, at sim_environment@,$sim_environment,;t t
-+s, at sim_alignment@,$sim_alignment,;t t
-+s, at sim_assert@,$sim_assert,;t t
-+s, at sim_bitsize@,$sim_bitsize,;t t
-+s, at sim_endian@,$sim_endian,;t t
-+s, at sim_hostendian@,$sim_hostendian,;t t
-+s, at sim_float@,$sim_float,;t t
-+s, at sim_scache@,$sim_scache,;t t
-+s, at sim_default_model@,$sim_default_model,;t t
-+s, at sim_hw_cflags@,$sim_hw_cflags,;t t
-+s, at sim_hw_objs@,$sim_hw_objs,;t t
-+s, at sim_hw@,$sim_hw,;t t
-+s, at sim_inline@,$sim_inline,;t t
-+s, at sim_packages@,$sim_packages,;t t
-+s, at sim_regparm@,$sim_regparm,;t t
-+s, at sim_reserved_bits@,$sim_reserved_bits,;t t
-+s, at sim_smp@,$sim_smp,;t t
-+s, at sim_stdcall@,$sim_stdcall,;t t
-+s, at sim_xor_endian@,$sim_xor_endian,;t t
-+s, at WARN_CFLAGS@,$WARN_CFLAGS,;t t
-+s, at WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
-+s, at build@,$build,;t t
-+s, at build_cpu@,$build_cpu,;t t
-+s, at build_vendor@,$build_vendor,;t t
-+s, at build_os@,$build_os,;t t
-+s, at host@,$host,;t t
-+s, at host_cpu@,$host_cpu,;t t
-+s, at host_vendor@,$host_vendor,;t t
-+s, at host_os@,$host_os,;t t
-+s, at target@,$target,;t t
-+s, at target_cpu@,$target_cpu,;t t
-+s, at target_vendor@,$target_vendor,;t t
-+s, at target_os@,$target_os,;t t
-+s, at CC@,$CC,;t t
-+s, at CFLAGS@,$CFLAGS,;t t
-+s, at LDFLAGS@,$LDFLAGS,;t t
-+s, at CPPFLAGS@,$CPPFLAGS,;t t
-+s, at ac_ct_CC@,$ac_ct_CC,;t t
-+s, at EXEEXT@,$EXEEXT,;t t
-+s, at OBJEXT@,$OBJEXT,;t t
-+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
-+s, at CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
-+s, at HDEFINES@,$HDEFINES,;t t
-+s, at AR@,$AR,;t t
-+s, at RANLIB@,$RANLIB,;t t
-+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-+s, at SET_MAKE@,$SET_MAKE,;t t
-+s, at CPP@,$CPP,;t t
-+s, at EGREP@,$EGREP,;t t
-+s, at ALLOCA@,$ALLOCA,;t t
-+s, at USE_NLS@,$USE_NLS,;t t
-+s, at MSGFMT@,$MSGFMT,;t t
-+s, at GMSGFMT@,$GMSGFMT,;t t
-+s, at XGETTEXT@,$XGETTEXT,;t t
-+s, at USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
-+s, at CATALOGS@,$CATALOGS,;t t
-+s, at CATOBJEXT@,$CATOBJEXT,;t t
-+s, at DATADIRNAME@,$DATADIRNAME,;t t
-+s, at GMOFILES@,$GMOFILES,;t t
-+s, at INSTOBJEXT@,$INSTOBJEXT,;t t
-+s, at INTLDEPS@,$INTLDEPS,;t t
-+s, at INTLLIBS@,$INTLLIBS,;t t
-+s, at INTLOBJS@,$INTLOBJS,;t t
-+s, at POFILES@,$POFILES,;t t
-+s, at POSUB@,$POSUB,;t t
-+s, at INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-+s, at GT_NO@,$GT_NO,;t t
-+s, at GT_YES@,$GT_YES,;t t
-+s, at MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-+s, at l@,$l,;t t
-+s, at MAINT@,$MAINT,;t t
-+s, at sim_bswap@,$sim_bswap,;t t
-+s, at sim_cflags@,$sim_cflags,;t t
-+s, at sim_debug@,$sim_debug,;t t
-+s, at sim_stdio@,$sim_stdio,;t t
-+s, at sim_trace@,$sim_trace,;t t
-+s, at sim_profile@,$sim_profile,;t t
-+s, at cgen_breaks@,$cgen_breaks,;t t
-+s, at LIBOBJS@,$LIBOBJS,;t t
-+s, at LTLIBOBJS@,$LTLIBOBJS,;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, at configure_input@,$configure_input,;t t
-+s, at srcdir@,$ac_srcdir,;t t
-+s, at abs_srcdir@,$ac_abs_srcdir,;t t
-+s, at top_srcdir@,$ac_top_srcdir,;t t
-+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-+s, at builddir@,$ac_builddir,;t t
-+s, at abs_builddir@,$ac_abs_builddir,;t t
-+s, at top_builddir@,$ac_top_builddir,;t t
-+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
-+s, at 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
-+
-+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 <<CEOF' >>$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 <<CEOF' >>$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_LINKS section.
-+#
-+
-+for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
-+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+
-+ { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
-+echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
-+
-+ if test ! -r $srcdir/$ac_source; then
-+ { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
-+echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi
-+ rm -f $ac_dest
-+
-+ # Make relative symlinks.
-+ ac_dest_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_dest_dir"
-+ else
-+ as_dir="$ac_dest_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_dest_dir\"" >&5
-+echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
-+ { (exit 1); exit 1; }; }; }
-+
-+ ac_builddir=.
-+
-+if test "$ac_dest_dir" != .; then
-+ ac_dir_suffix=/`echo "$ac_dest_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_dest_dir";;
-+*)
-+ case "$ac_dest_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dest_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 $srcdir in
-+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
-+ *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
-+ esac
-+
-+ # Try a symlink, then a hard link, then a copy.
-+ ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-+ ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
-+ cp -p $srcdir/$ac_source $ac_dest ||
-+ { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
-+echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
-+ { (exit 1); exit 1; }; }
-+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
-+ Makefile ) echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
-+ rm -f Makesim1.tmp Makesim2.tmp Makefile
-+ sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
-+ sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
-+ sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
-+ -e '/^## COMMON_POST_/ r Makesim2.tmp' \
-+ <Makefile.sim >Makefile
-+ rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
-+ ;;
-+ stamp-h ) echo > stamp-h ;;
-+ 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 -Naur gdb-6.5.orig/sim/bfin/configure.ac gdb-6.5/sim/bfin/configure.ac
---- gdb-6.5.orig/sim/bfin/configure.ac 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/configure.ac 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,12 @@
-+dnl Process this file with autoconf to produce a configure script.
-+AC_PREREQ(2.59)dnl
-+AC_INIT(Makefile.in)
-+AC_CONFIG_HEADER(config.h:config.in)
-+
-+sinclude(../common/aclocal.m4)
-+
-+sinclude(../common/common.m4)
-+
-+AC_CHECK_HEADERS(unistd.h)
-+
-+SIM_AC_OUTPUT
-diff -Naur gdb-6.5.orig/sim/bfin/interp.c gdb-6.5/sim/bfin/interp.c
---- gdb-6.5.orig/sim/bfin/interp.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/interp.c 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,651 @@
-+/* Simulator for Analog Devices Blackfin processer.
-+
-+ Copyright (C) 2005 Free Software Foundation, Inc.
-+ Contributed by Analog Devices.
-+
-+ This file is part of simulators.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ Boston, MA 02110-1301, USA. */
-+
-+#include "config.h"
-+
-+#include <signal.h>
-+#ifdef HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
-+
-+#include "sysdep.h"
-+#include "bfd.h"
-+#include "gdb/callback.h"
-+#include "bfin-sim.h"
-+#include "gdb/sim-bfin.h"
-+
-+/* This file is local - if newlib changes, then so should this. */
-+#include "syscall.h"
-+
-+#include <math.h>
-+
-+#ifdef _WIN32
-+#include <float.h> /* Needed for _isnan(). */
-+#define isnan _isnan
-+#endif
-+
-+#ifndef SIGBUS
-+#define SIGBUS SIGSEGV
-+#endif
-+
-+#ifndef SIGQUIT
-+#define SIGQUIT SIGTERM
-+#endif
-+
-+#ifndef SIGTRAP
-+#define SIGTRAP 5
-+#endif
-+
-+/* Define the rate at which the simulator should poll the host
-+ for a quit. */
-+#define POLL_QUIT_INTERVAL 0x60000
-+
-+saved_state_type saved_state;
-+
-+static char **prog_argv;
-+static SIM_OPEN_KIND sim_kind;
-+static char *myname;
-+static int tracing = 0;
-+static host_callback *callback;
-+
-+#if defined(__GO32__) || defined(_WIN32)
-+int sim_memory_size = 19;
-+#else
-+int sim_memory_size = 24;
-+#endif
-+
-+
-+/* Count the number of arguments in an argv. */
-+static int
-+count_argc (char **argv)
-+{
-+ int i;
-+
-+ if (! argv)
-+ return -1;
-+
-+ for (i = 0; argv[i] != NULL; ++i)
-+ continue;
-+ return i;
-+}
-+
-+/* This function exists mainly for the purpose of setting a breakpoint to
-+ catch simulated bus errors when running the simulator under GDB. */
-+
-+void
-+raise_exception (int x)
-+{
-+ saved_state.exception = x;
-+}
-+
-+void
-+raise_buserror ()
-+{
-+ raise_exception (SIGBUS);
-+}
-+
-+static int
-+get_now ()
-+{
-+ return time ((long *) 0);
-+}
-+
-+static int
-+now_persec ()
-+{
-+ return 1;
-+}
-+
-+/* Simulate a monitor trap, put the result into r0 and errno into r1
-+ return offset by which to adjust pc. */
-+
-+void
-+bfin_trap ()
-+{
-+ int reason = DREG (2);
-+ int sys = DREG (0);
-+ bu32 args = DREG (1);
-+
-+ switch (sys)
-+ {
-+ case SYS_exit:
-+ saved_state.exception = SIGQUIT;
-+ DREG (0) = get_long (saved_state.memory, args);
-+ return;
-+ case SYS_open:
-+ {
-+ char *arg0 = (char *)(saved_state.memory + get_long (saved_state.memory, args));
-+ bu32 arg1 = get_long (saved_state.memory, args + 4);
-+ bu32 arg2 = get_long (saved_state.memory, args + 8);
-+ if (strcmp (arg0, ":tt") == 0)
-+ DREG (0) = arg2 == 4 ? 0 : 1;
-+ else
-+ DREG (0) = callback->open (callback, arg0, arg1);
-+ }
-+ return;
-+
-+ case SYS_write:
-+ {
-+ bu32 arg0 = get_long (saved_state.memory, args);
-+ char *arg1 = (char *)(saved_state.memory + get_long (saved_state.memory, args + 4));
-+ bu32 arg2 = get_long (saved_state.memory, args + 8);
-+ DREG (0) = callback->write (callback, arg0, arg1, arg2);
-+ }
-+ return;
-+
-+ case SYS_read:
-+ {
-+ bu32 arg0 = get_long (saved_state.memory, args);
-+ char *arg1 = (char *)(saved_state.memory + get_long (saved_state.memory, args + 4));
-+ bu32 arg2 = get_long (saved_state.memory, args + 8);
-+ DREG (0) = callback->read (callback, arg0, arg1, arg2);
-+ }
-+ return;
-+
-+ case SYS_kill:
-+ printf ("Killing with signal %d\n", get_long (saved_state.memory, args + 4));
-+ raise (SIGABRT);
-+
-+ case SYS_close:
-+ DREG (0) = callback->close (callback, get_long (saved_state.memory, args));
-+ return;
-+ case SYS_argc:
-+ DREG (0) = count_argc (prog_argv);
-+ break;
-+ case SYS_argnlen:
-+ {
-+ bu32 arg0 = get_long (saved_state.memory, args);
-+ if (arg0 < count_argc (prog_argv))
-+ DREG (0) = strlen (prog_argv[arg0]);
-+ else
-+ DREG (0) = -1;
-+ }
-+ return;
-+ case SYS_argn:
-+ {
-+ bu32 arg0 = get_long (saved_state.memory, args);
-+ char *arg1 = (char *)(saved_state.memory + get_long (saved_state.memory, args + 4));
-+ if (arg0 < count_argc (prog_argv))
-+ {
-+ /* Include the termination byte. */
-+ int i = strlen (prog_argv[arg0]) + 1;
-+ DREG (0) = get_long (saved_state.memory, args + 4);
-+ memcpy (arg1, prog_argv[arg0], i);
-+ }
-+ else
-+ DREG (0) = -1;
-+ }
-+ return;
-+ case SYS_time:
-+ DREG (0) = get_now ();
-+ return;
-+ default:
-+ abort ();
-+ }
-+}
-+
-+void
-+control_c (int sig)
-+{
-+ raise_exception (SIGINT);
-+}
-+
-+/* Set the memory size to the power of two provided. */
-+
-+void
-+sim_size (int power)
-+{
-+ saved_state.msize = 1 << power;
-+
-+ sim_memory_size = power;
-+
-+ if (saved_state.memory)
-+ free (saved_state.memory);
-+
-+ saved_state.memory =
-+ (unsigned char *) calloc (64, saved_state.msize / 64);
-+
-+ if (!saved_state.memory)
-+ {
-+ fprintf (stderr,
-+ "Not enough VM for simulation of %d bytes of RAM\n",
-+ saved_state.msize);
-+
-+ saved_state.msize = 1;
-+ saved_state.memory = (unsigned char *) calloc (1, 1);
-+ }
-+}
-+
-+static void
-+init_pointers ()
-+{
-+ if (saved_state.msize != 1 << sim_memory_size)
-+ sim_size (sim_memory_size);
-+}
-+
-+#define MMASKB ((saved_state.msize -1) & ~0)
-+
-+int
-+sim_stop (SIM_DESC sd)
-+{
-+ raise_exception (SIGINT);
-+ return 1;
-+}
-+
-+/* Set by an instruction emulation function if we performed a jump. */
-+int did_jump;
-+
-+/* Execute a single instruction. */
-+
-+static void
-+step_once (SIM_DESC sd)
-+{
-+ bu32 oldpc = PCREG;
-+
-+ if (tracing)
-+ fprintf (stderr, "PC: %08x, insn: %04x\n", PCREG,
-+ get_word (saved_state.memory, PCREG));
-+
-+ did_jump = 0;
-+ interp_insn_bfin (PCREG);
-+
-+ /* @@@ Not sure how the hardware really behaves when the last insn
-+ of a loop is a jump. */
-+ if (!did_jump)
-+ {
-+ if (LC1REG && oldpc == LB1REG && --LC1REG)
-+ PCREG = LT1REG;
-+ else if (LC0REG && oldpc == LB0REG && --LC0REG)
-+ PCREG = LT0REG;
-+ }
-+}
-+
-+void
-+sim_resume (SIM_DESC sd, int step, int siggnal)
-+{
-+ register int insts = 0;
-+
-+ int tick_start = get_now ();
-+ void (*prev) () = signal (SIGINT, control_c);
-+ void (*prev_fpe) () = signal (SIGFPE, SIG_IGN);
-+
-+ init_pointers ();
-+
-+ /* clear exceptions else it will stop */
-+ saved_state.exception = 0;
-+
-+ if(step)
-+ {
-+ while(step && saved_state.exception == 0)
-+ {
-+ /* not clear if this will be > 1. Potential problem area */
-+ step_once(sd);
-+ step--;
-+ }
-+ /* Emulate a hardware single step ... raise an exception */
-+ saved_state.exception = SIGTRAP;
-+ }
-+ else
-+ while (saved_state.exception == 0)
-+ step_once(sd);
-+
-+ saved_state.ticks += get_now () - tick_start;
-+ saved_state.insts += insts;
-+
-+ signal (SIGFPE, prev_fpe);
-+ signal (SIGINT, prev);
-+}
-+
-+int
-+sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
-+{
-+ int i;
-+
-+ init_pointers ();
-+
-+ for (i = 0; i < size; i++)
-+ saved_state.memory[(MMASKB & (addr + i))] = buffer[i];
-+
-+ return size;
-+}
-+
-+int
-+sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
-+{
-+ int i;
-+
-+ init_pointers ();
-+
-+ for (i = 0; i < size; i++)
-+ buffer[i] = saved_state.memory[(MMASKB & (addr + i))];
-+
-+ return size;
-+}
-+
-+int
-+sim_trace (SIM_DESC sd)
-+{
-+ tracing = 1;
-+ sim_resume (sd, 0, 0);
-+ tracing = 0;
-+ return 1;
-+}
-+
-+void
-+sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
-+{
-+ if (saved_state.exception == SIGQUIT)
-+ {
-+ *reason = sim_exited;
-+ *sigrc = DREG (0);
-+ }
-+ else
-+ {
-+ *reason = sim_stopped;
-+ *sigrc = saved_state.exception;
-+ }
-+}
-+
-+void
-+sim_info (SIM_DESC sd, int verbose)
-+{
-+ double timetaken =
-+ (double) saved_state.ticks / (double) now_persec ();
-+
-+ callback->printf_filtered (callback, "\n\n# instructions executed %10d\n",
-+ saved_state.insts);
-+ callback->printf_filtered (callback, "# real time taken %10.4f\n",
-+ timetaken);
-+}
-+
-+static void
-+parse_and_set_memory_size (char *str)
-+{
-+ int n;
-+
-+ n = strtol (str, NULL, 10);
-+ if (n > 0 && n <= 24)
-+ sim_memory_size = n;
-+ else
-+ callback->printf_filtered (callback,
-+ "Bad memory size %d; must be 1 to 24, inclusive\n", n);
-+}
-+
-+SIM_DESC
-+sim_open (SIM_OPEN_KIND kind, host_callback *cb,
-+ struct bfd *abfd, char **argv)
-+{
-+ char **p;
-+
-+ sim_kind = kind;
-+ myname = argv[0];
-+ callback = cb;
-+
-+ for (p = argv + 1; *p != NULL; ++p)
-+ if (isdigit (**p))
-+ parse_and_set_memory_size (*p);
-+
-+ /* fudge our descriptor for now */
-+ return (SIM_DESC) 1;
-+}
-+
-+void
-+sim_close (SIM_DESC sd, int quitting)
-+{
-+ /* Nothing to do. */
-+}
-+
-+SIM_RC
-+sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
-+{
-+ extern bfd *sim_load_file (); /* ??? Don't know where this should live. */
-+ bfd *prog_bfd;
-+
-+ prog_bfd = sim_load_file (sd, myname, callback, prog, abfd,
-+ sim_kind == SIM_OPEN_DEBUG,
-+ 0, sim_write);
-+
-+ /* Set the bfd machine type. */
-+ if (prog_bfd)
-+ saved_state.bfd_mach = bfd_get_mach (prog_bfd);
-+ else if (abfd)
-+ saved_state.bfd_mach = bfd_get_mach (abfd);
-+ else
-+ saved_state.bfd_mach = 0;
-+
-+ if (prog_bfd == NULL)
-+ return SIM_RC_FAIL;
-+ if (abfd == NULL)
-+ bfd_close (prog_bfd);
-+ return SIM_RC_OK;
-+}
-+
-+SIM_RC
-+sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd,
-+ char **argv, char **env)
-+{
-+ /* Clear the registers. */
-+ memset (&saved_state, 0,
-+ (char*) &saved_state.end_of_registers - (char*) &saved_state);
-+
-+ /* Set the PC. */
-+ if (prog_bfd != NULL)
-+ saved_state.pc = bfd_get_start_address (prog_bfd);
-+
-+ SPREG = saved_state.msize;
-+ /* Set the bfd machine type. */
-+ if (prog_bfd != NULL)
-+ saved_state.bfd_mach = bfd_get_mach (prog_bfd);
-+
-+ /* Record the program's arguments. */
-+ prog_argv = argv;
-+
-+ return SIM_RC_OK;
-+}
-+
-+void
-+sim_do_command (SIM_DESC sd, char *cmd)
-+{
-+ char *sms_cmd = "set-memory-size";
-+ int cmdsize;
-+
-+ if (cmd == NULL || *cmd == '\0')
-+ cmd = "help";
-+
-+ cmdsize = strlen (sms_cmd);
-+ if (strncmp (cmd, sms_cmd, cmdsize) == 0
-+ && strchr (" \t", cmd[cmdsize]) != NULL)
-+ parse_and_set_memory_size (cmd + cmdsize + 1);
-+ else if (strcmp (cmd, "help") == 0)
-+ {
-+ (callback->printf_filtered) (callback,
-+ "List of Blackfin simulator commands:\n\n");
-+ (callback->printf_filtered) (callback, "help <n> -- Display this information\n");
-+ (callback->printf_filtered) (callback, "set-memory-size <n> -- Set the number of address bits to use\n");
-+ (callback->printf_filtered) (callback, "\n");
-+ }
-+ else
-+ (callback->printf_filtered) (callback, "Error: \"%s\" is not a valid Blackfin simulator command.\n", cmd);
-+}
-+
-+void
-+sim_set_callbacks (host_callback *p)
-+{
-+ callback = p;
-+}
-+
-+static bu32
-+bfin_extract_unsigned_integer (unsigned char *addr, int len)
-+{
-+ bu32 retval;
-+ unsigned char * p;
-+ unsigned char * startaddr = (unsigned char *)addr;
-+ unsigned char * endaddr = startaddr + len;
-+
-+ retval = 0;
-+
-+ for (p = endaddr; p > startaddr;)
-+ retval = (retval << 8) | *--p;
-+
-+ return retval;
-+}
-+
-+static void
-+bfin_store_unsigned_integer (unsigned char *addr, int len, bu32 val)
-+{
-+ unsigned char *p;
-+ unsigned char *startaddr = addr;
-+ unsigned char *endaddr = startaddr + len;
-+
-+ for (p = startaddr; p < endaddr;)
-+ {
-+ *p++ = val & 0xff;
-+ val >>= 8;
-+ }
-+}
-+
-+int
-+sim_fetch_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
-+{
-+ bu32 value;
-+
-+ init_pointers ();
-+ switch (rn)
-+ {
-+ case SIM_BFIN_R0_REGNUM : value = DREG(0); break;
-+ case SIM_BFIN_R1_REGNUM : value = DREG(1); break;
-+ case SIM_BFIN_R2_REGNUM : value = DREG(2); break;
-+ case SIM_BFIN_R3_REGNUM : value = DREG(3); break;
-+ case SIM_BFIN_R4_REGNUM : value = DREG(4); break;
-+ case SIM_BFIN_R5_REGNUM : value = DREG(5); break;
-+ case SIM_BFIN_R6_REGNUM : value = DREG(6); break;
-+ case SIM_BFIN_R7_REGNUM : value = DREG(7); break;
-+ case SIM_BFIN_P0_REGNUM : value = PREG(0); break;
-+ case SIM_BFIN_P1_REGNUM : value = PREG(1); break;
-+ case SIM_BFIN_P2_REGNUM : value = PREG(2); break;
-+ case SIM_BFIN_P3_REGNUM : value = PREG(3); break;
-+ case SIM_BFIN_P4_REGNUM : value = PREG(4); break;
-+ case SIM_BFIN_P5_REGNUM : value = PREG(5); break;
-+ case SIM_BFIN_SP_REGNUM : value = SPREG; break;
-+ case SIM_BFIN_FP_REGNUM : value = FPREG; break;
-+ case SIM_BFIN_I0_REGNUM : value = IREG(0); break;
-+ case SIM_BFIN_I1_REGNUM : value = IREG(1); break;
-+ case SIM_BFIN_I2_REGNUM : value = IREG(2); break;
-+ case SIM_BFIN_I3_REGNUM : value = IREG(3); break;
-+ case SIM_BFIN_M0_REGNUM : value = MREG(0); break;
-+ case SIM_BFIN_M1_REGNUM : value = MREG(1); break;
-+ case SIM_BFIN_M2_REGNUM : value = MREG(2); break;
-+ case SIM_BFIN_M3_REGNUM : value = MREG(3); break;
-+ case SIM_BFIN_B0_REGNUM : value = BREG(0); break;
-+ case SIM_BFIN_B1_REGNUM : value = BREG(1); break;
-+ case SIM_BFIN_B2_REGNUM : value = BREG(2); break;
-+ case SIM_BFIN_B3_REGNUM : value = BREG(3); break;
-+ case SIM_BFIN_L0_REGNUM : value = LREG(0); break;
-+ case SIM_BFIN_L1_REGNUM : value = LREG(1); break;
-+ case SIM_BFIN_L2_REGNUM : value = LREG(2); break;
-+ case SIM_BFIN_L3_REGNUM : value = LREG(3); break;
-+ case SIM_BFIN_RETS_REGNUM : value = RETSREG; break;
-+ case SIM_BFIN_A0_DOT_X_REGNUM : value = A0XREG; break;
-+ case SIM_BFIN_AO_DOT_W_REGNUM : value = A0WREG; break;
-+ case SIM_BFIN_A1_DOT_X_REGNUM : value = A1XREG; break;
-+ case SIM_BFIN_A1_DOT_W_REGNUM : value = A1WREG; break;
-+ case SIM_BFIN_LC0_REGNUM : value = LC0REG; break;
-+ case SIM_BFIN_LT0_REGNUM : value = LT0REG; break;
-+ case SIM_BFIN_LB0_REGNUM : value = LB0REG; break;
-+ case SIM_BFIN_LC1_REGNUM : value = LC1REG; break;
-+ case SIM_BFIN_LT1_REGNUM : value = LT1REG; break;
-+ case SIM_BFIN_LB1_REGNUM : value = LB1REG; break;
-+ case SIM_BFIN_PC_REGNUM : value = PCREG; break;
-+ case SIM_BFIN_CC_REGNUM : value = CCREG; break;
-+ default :
-+ return 0; // will be an error in gdb
-+ break;
-+ }
-+
-+ bfin_store_unsigned_integer (memory, 4, value);
-+
-+ return -1; // disables size checking in gdb
-+}
-+
-+int
-+sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
-+{
-+ bu32 value;
-+
-+ value = bfin_extract_unsigned_integer (memory, 4);
-+
-+ init_pointers ();
-+ switch (rn)
-+ {
-+ case SIM_BFIN_R0_REGNUM : DREG(0) = value; break;
-+ case SIM_BFIN_R1_REGNUM : DREG(1) = value; break;
-+ case SIM_BFIN_R2_REGNUM : DREG(2) = value; break;
-+ case SIM_BFIN_R3_REGNUM : DREG(3) = value; break;
-+ case SIM_BFIN_R4_REGNUM : DREG(4) = value; break;
-+ case SIM_BFIN_R5_REGNUM : DREG(5) = value; break;
-+ case SIM_BFIN_R6_REGNUM : DREG(6) = value; break;
-+ case SIM_BFIN_R7_REGNUM : DREG(7) = value; break;
-+ case SIM_BFIN_P0_REGNUM : PREG(0) = value; break;
-+ case SIM_BFIN_P1_REGNUM : PREG(1) = value; break;
-+ case SIM_BFIN_P2_REGNUM : PREG(2) = value; break;
-+ case SIM_BFIN_P3_REGNUM : PREG(3) = value; break;
-+ case SIM_BFIN_P4_REGNUM : PREG(4) = value; break;
-+ case SIM_BFIN_P5_REGNUM : PREG(5) = value; break;
-+ case SIM_BFIN_SP_REGNUM : SPREG = value; break;
-+ case SIM_BFIN_FP_REGNUM : FPREG = value; break;
-+ case SIM_BFIN_I0_REGNUM : IREG(0) = value; break;
-+ case SIM_BFIN_I1_REGNUM : IREG(1) = value; break;
-+ case SIM_BFIN_I2_REGNUM : IREG(2) = value; break;
-+ case SIM_BFIN_I3_REGNUM : IREG(3) = value; break;
-+ case SIM_BFIN_M0_REGNUM : MREG(0) = value; break;
-+ case SIM_BFIN_M1_REGNUM : MREG(1) = value; break;
-+ case SIM_BFIN_M2_REGNUM : MREG(2) = value; break;
-+ case SIM_BFIN_M3_REGNUM : MREG(3) = value; break;
-+ case SIM_BFIN_B0_REGNUM : BREG(0) = value; break;
-+ case SIM_BFIN_B1_REGNUM : BREG(1) = value; break;
-+ case SIM_BFIN_B2_REGNUM : BREG(2) = value; break;
-+ case SIM_BFIN_B3_REGNUM : BREG(3) = value; break;
-+ case SIM_BFIN_L0_REGNUM : LREG(0) = value; break;
-+ case SIM_BFIN_L1_REGNUM : LREG(1) = value; break;
-+ case SIM_BFIN_L2_REGNUM : LREG(2) = value; break;
-+ case SIM_BFIN_L3_REGNUM : LREG(3) = value; break;
-+ case SIM_BFIN_RETS_REGNUM : RETSREG = value; break;
-+ case SIM_BFIN_A0_DOT_X_REGNUM : A0XREG = value; break;
-+ case SIM_BFIN_AO_DOT_W_REGNUM : A0WREG = value; break;
-+ case SIM_BFIN_A1_DOT_X_REGNUM : A1XREG = value; break;
-+ case SIM_BFIN_A1_DOT_W_REGNUM : A1WREG = value; break;
-+ case SIM_BFIN_LC0_REGNUM : LC0REG = value; break;
-+ case SIM_BFIN_LT0_REGNUM : LT0REG = value; break;
-+ case SIM_BFIN_LB0_REGNUM : LB0REG = value; break;
-+ case SIM_BFIN_LC1_REGNUM : LC1REG = value; break;
-+ case SIM_BFIN_LT1_REGNUM : LT1REG = value; break;
-+ case SIM_BFIN_LB1_REGNUM : LB1REG = value; break;
-+ case SIM_BFIN_PC_REGNUM : PCREG = value; break;
-+ case SIM_BFIN_CC_REGNUM : CCREG = value; break;
-+ default :
-+ return 0; // will be an error in gdb
-+ break;
-+ }
-+
-+ return -1; // disables size checking in gdb
-+}
-+
-diff -Naur gdb-6.5.orig/sim/bfin/Makefile.in gdb-6.5/sim/bfin/Makefile.in
---- gdb-6.5.orig/sim/bfin/Makefile.in 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/Makefile.in 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,29 @@
-+# Makefile template for Configure for the Blackfin simulator.
-+# Copyright (C) 2005 Free Software Foundation, Inc.
-+# Written by Analog Devices, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+# Boston, MA 02110-1301, USA.
-+
-+## COMMON_PRE_CONFIG_FRAG
-+
-+SIM_OBJS = interp.o bfin-dis.o sim-load.o
-+
-+INCLUDE = bfin-sim.h
-+
-+## COMMON_POST_CONFIG_FRAG
-+
-+interp.o: interp.c $(INCLUDE)
-+bfin-dis.o: bfin-dis.c $(INCLUDE)
-diff -Naur gdb-6.5.orig/sim/bfin/syscall.h gdb-6.5/sim/bfin/syscall.h
---- gdb-6.5.orig/sim/bfin/syscall.h 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.5/sim/bfin/syscall.h 2009-01-22 08:19:21.000000000 +0100
-@@ -0,0 +1,41 @@
-+/* This file is copied from newlib. Do not edit this alone. */
-+
-+#define SYS_exit 1
-+#define SYS_fork 2
-+#define SYS_read 3
-+#define SYS_write 4
-+#define SYS_open 5
-+#define SYS_close 6
-+#define SYS_wait4 7
-+#define SYS_creat 8
-+#define SYS_link 9
-+#define SYS_unlink 10
-+#define SYS_execv 11
-+#define SYS_chdir 12
-+
-+#define SYS_mknod 14
-+#define SYS_chmod 15
-+#define SYS_chown 16
-+
-+#define SYS_lseek 19
-+#define SYS_getpid 20
-+#define SYS_isatty 21
-+#define SYS_fstat 22
-+#define SYS_time 23
-+#define SYS_kill 24
-+
-+#define SYS_stat 38
-+
-+#define SYS_pipe 42
-+
-+#define SYS_execve 59
-+
-+#define SYS_truncate 129
-+#define SYS_ftruncate 130
-+
-+#define SYS_argc 172
-+#define SYS_argnlen 173
-+#define SYS_argn 174
-+
-+#define SYS_utime 201
-+#define SYS_wait 202
-diff -Naur gdb-6.5.orig/sim/configure gdb-6.5/sim/configure
---- gdb-6.5.orig/sim/configure 2006-05-05 19:11:19.000000000 +0200
-+++ gdb-6.5/sim/configure 2009-01-22 08:19:21.000000000 +0100
-@@ -273,6 +273,7 @@
-
- ac_unique_file="Makefile.in"
- ac_subdirs_all="$ac_subdirs_all arm"
-+ac_subdirs_all="$ac_subdirs_all bfin"
- ac_subdirs_all="$ac_subdirs_all cris"
- ac_subdirs_all="$ac_subdirs_all d10v"
- ac_subdirs_all="$ac_subdirs_all frv"
-@@ -3423,6 +3424,13 @@
- testsuite=yes
- common=yes
- ;;
-+ bfin-*-*)
-+
-+
-+subdirs="$subdirs bfin"
-+
-+ common=yes
-+ ;;
- cris-*-* | crisv32-*-*)
-
-
-diff -Naur gdb-6.5.orig/sim/configure.ac gdb-6.5/sim/configure.ac
---- gdb-6.5.orig/sim/configure.ac 2006-05-05 19:11:19.000000000 +0200
-+++ gdb-6.5/sim/configure.ac 2009-01-22 08:19:21.000000000 +0100
-@@ -52,6 +52,10 @@
- testsuite=yes
- common=yes
- ;;
-+ bfin-*-*)
-+ AC_CONFIG_SUBDIRS(bfin)
-+ common=yes
-+ ;;
- cris-*-* | crisv32-*-*)
- AC_CONFIG_SUBDIRS(cris)
- testsuite=yes
diff --git a/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100319.diff b/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100319.diff
deleted file mode 100644
index 3ea7241..0000000
--- a/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100319.diff
+++ /dev/null
@@ -1,532 +0,0 @@
-diff -Naur gdb-7.1.orig/gdb/lm32-tdep.c gdb-7.1/gdb/lm32-tdep.c
---- gdb-7.1.orig/gdb/lm32-tdep.c 2010-01-01 08:31:37.000000000 +0100
-+++ gdb-7.1/gdb/lm32-tdep.c 2010-03-19 03:59:20.000000000 +0100
-@@ -35,7 +35,7 @@
- #include "regcache.h"
- #include "trad-frame.h"
- #include "reggroups.h"
--#include "opcodes/lm32-desc.h"
-+#include "../opcodes/lm32-desc.h"
-
- #include "gdb_string.h"
-
-diff -Naur gdb-7.1.orig/gdb/sparc-tdep.c gdb-7.1/gdb/sparc-tdep.c
---- gdb-7.1.orig/gdb/sparc-tdep.c 2010-01-01 08:31:42.000000000 +0100
-+++ gdb-7.1/gdb/sparc-tdep.c 2010-03-19 03:59:20.000000000 +0100
-@@ -1100,7 +1100,7 @@
- sparc32_store_return_value (struct type *type, struct regcache *regcache,
- const gdb_byte *valbuf)
- {
-- int len = TYPE_LENGTH (type);
-+ size_t len = TYPE_LENGTH (type);
- gdb_byte buf[8];
-
- gdb_assert (!sparc_structure_or_union_p (type));
-diff -Naur gdb-7.1.orig/sim/erc32/configure gdb-7.1/sim/erc32/configure
---- gdb-7.1.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100
-+++ gdb-7.1/sim/erc32/configure 2010-03-19 03:59:20.000000000 +0100
-@@ -591,8 +591,9 @@
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- cgen_breaks
-+READLINE_CFLAGS
-+READLINE_DEPS
- READLINE
--TERMCAP
- REPORT_BUGS_TEXI
- REPORT_BUGS_TO
- PKGVERSION
-@@ -716,6 +717,7 @@
- enable_sim_profile
- with_pkgversion
- with_bugurl
-+with_system_readline
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1358,6 +1360,7 @@
- --with-zlib include zlib support (auto/yes/no) default=auto
- --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
- --with-bugurl=URL Direct users to URL to report a bug
-+ --with-system-readline use installed readline library
-
- Some influential environment variables:
- CC C compiler command
-@@ -2416,7 +2419,6 @@
-
-
-
--
- # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
- # it by inlining the macro's contents.
- # This file contains common code used by all simulators.
-@@ -2916,18 +2918,18 @@
- int
- main ()
- {
--
-+return 0;
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
-+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
--$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-+$as_echo_n "checking whether the C compiler works... " >&6; }
- ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
- # The possible output files:
-@@ -2989,10 +2991,10 @@
- else
- ac_file=''
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
--$as_echo "$ac_file" >&6; }
- if test -z "$ac_file"; then :
-- $as_echo "$as_me: failed program was:" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+$as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-@@ -3000,51 +3002,18 @@
- { as_fn_set_status 77
- as_fn_error "C compiler cannot create executables
- See \`config.log' for more details." "$LINENO" 5; }; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-+$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-+$as_echo "$ac_file" >&6; }
- ac_exeext=$ac_cv_exeext
-
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
--$as_echo_n "checking whether the C compiler works... " >&6; }
--# If not cross compiling, check that we can run a simple program.
--if test "$cross_compiling" != yes; then
-- if { ac_try='./$ac_file'
-- { { case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; }; then
-- cross_compiling=no
-- else
-- if test "$cross_compiling" = maybe; then
-- cross_compiling=yes
-- else
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error "cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." "$LINENO" 5; }
-- fi
-- fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--
--rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
-+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
--$as_echo_n "checking whether we are cross compiling... " >&6; }
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
--$as_echo "$cross_compiling" >&6; }
--
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
- if { { ac_try="$ac_link"
-@@ -3084,6 +3053,63 @@
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+ac_clean_files="$ac_clean_files conftest.out"
-+# Check that the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-+$as_echo_n "checking whether we are cross compiling... " >&6; }
-+if test "$cross_compiling" != yes; then
-+ { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ if { ac_try='./conftest$ac_cv_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
-+ cross_compiling=no
-+ else
-+ if test "$cross_compiling" = maybe; then
-+ cross_compiling=yes
-+ else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." "$LINENO" 5; }
-+ fi
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-+$as_echo "$cross_compiling" >&6; }
-+
-+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-+ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
- $as_echo_n "checking for suffix of object files... " >&6; }
- if test "${ac_cv_objext+set}" = set; then :
-@@ -4532,86 +4558,41 @@
- done
-
-
--# In the Cygwin environment, we need some additional flags.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
--$as_echo_n "checking for cygwin... " >&6; }
--if test "${sim_cv_os_cygwin+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
-
--#ifdef __CYGWIN__
--lose
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "lose" >/dev/null 2>&1; then :
-- sim_cv_os_cygwin=yes
--else
-- sim_cv_os_cygwin=no
-+# Check whether --with-system-readline was given.
-+if test "${with_system_readline+set}" = set; then :
-+ withval=$with_system_readline;
- fi
--rm -f conftest*
-
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
--$as_echo "$sim_cv_os_cygwin" >&6; }
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5
--$as_echo_n "checking for main in -ltermcap... " >&6; }
--if test "${ac_cv_lib_termcap_main+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-ltermcap $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+if test "$with_system_readline" = yes; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
-+$as_echo_n "checking for readline... " >&6; }
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
--
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char add_history ();
- int
- main ()
- {
--return main ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_termcap_main=yes
--else
-- ac_cv_lib_termcap_main=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5
--$as_echo "$ac_cv_lib_termcap_main" >&6; }
--if test "x$ac_cv_lib_termcap_main" = x""yes; then :
-- TERMCAP=-ltermcap
--else
-- TERMCAP=""
--fi
--
--fi
--
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
--$as_echo_n "checking for readline in -lreadline... " >&6; }
--if test "${ac_cv_lib_readline_readline+set}" = set; then :
-- $as_echo_n "(cached) " >&6
-+ READLINE=-lreadline
- else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMCAP $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ LIBS="-lreadline -lncurses $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
- /* Override any GCC internal prototype to avoid an error.
-@@ -4620,33 +4601,39 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char readline ();
-+char add_history ();
- int
- main ()
- {
--return readline ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_readline_readline=yes
-+ READLINE="-lreadline -lncurses"
- else
-- ac_cv_lib_readline_readline=no
-+ as_fn_error "unable to detect readline" "$LINENO" 5
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
--$as_echo "$ac_cv_lib_readline_readline" >&6; }
--if test "x$ac_cv_lib_readline_readline" = x""yes; then :
-- READLINE=-lreadline
--else
-- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ LIBS="$save_LIBS"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
-+$as_echo "$READLINE" >&6; }
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
-+else
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
-
--fi
-+
-+
-
-
- ac_sources="$sim_link_files"
-diff -Naur gdb-7.1.orig/sim/erc32/configure.ac gdb-7.1/sim/erc32/configure.ac
---- gdb-7.1.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
-+++ gdb-7.1/sim/erc32/configure.ac 2010-03-19 03:58:40.000000000 +0100
-@@ -11,27 +11,32 @@
-
- AC_CHECK_HEADERS(stdlib.h)
-
--# In the Cygwin environment, we need some additional flags.
--AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
--[AC_EGREP_CPP(lose, [
--#ifdef __CYGWIN__
--lose
--#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
-+AC_ARG_WITH([system-readline],
-+ [AS_HELP_STRING([--with-system-readline],
-+ [use installed readline library])])
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-+if test "$with_system_readline" = yes; then
-+ AC_MSG_CHECKING([for readline])
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE=-lreadline],
-+ [ LIBS="-lreadline -lncurses $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE="-lreadline -lncurses"],
-+ [AC_MSG_ERROR([unable to detect readline])])
-+ ])
-+ LIBS="$save_LIBS"
-+ AC_MSG_RESULT($READLINE)
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
- else
-- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
--fi
--AC_SUBST(TERMCAP)
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
-- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
- AC_SUBST(READLINE)
-+AC_SUBST(READLINE_DEPS)
-+AC_SUBST(READLINE_CFLAGS)
-+
- SIM_AC_OUTPUT
-diff -Naur gdb-7.1.orig/sim/erc32/erc32.c gdb-7.1/sim/erc32/erc32.c
---- gdb-7.1.orig/sim/erc32/erc32.c 2008-11-11 23:20:54.000000000 +0100
-+++ gdb-7.1/sim/erc32/erc32.c 2010-03-19 03:58:40.000000000 +0100
-@@ -414,7 +414,7 @@
- if (rom8) mec_memcfg &= ~0x20000;
- else mec_memcfg |= 0x20000;
-
-- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
-+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
- mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
-
- if (sparclite_board) {
-diff -Naur gdb-7.1.orig/sim/erc32/Makefile.in gdb-7.1/sim/erc32/Makefile.in
---- gdb-7.1.orig/sim/erc32/Makefile.in 2010-01-01 11:03:28.000000000 +0100
-+++ gdb-7.1/sim/erc32/Makefile.in 2010-03-19 03:58:40.000000000 +0100
-@@ -19,12 +19,12 @@
-
- ## COMMON_PRE_CONFIG_FRAG
-
--TERMCAP_LIB = @TERMCAP@
-+# TERMCAP_LIB = -lncurses
- READLINE_LIB = @READLINE@
-
- SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
- SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
--SIM_EXTRA_ALL = sis
-+SIM_EXTRA_ALL = sis$(EXEEXT)
- SIM_EXTRA_INSTALL = install-sis
- SIM_EXTRA_CLEAN = clean-sis
-
-@@ -38,8 +38,8 @@
- # `sis' doesn't need interf.o.
- SIS_OFILES = exec.o erc32.o func.o help.o float.o
-
--sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-- $(CC) $(ALL_CFLAGS) -o sis \
-+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
- sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
-
- # FIXME: This computes the build host's endianness, doesn't it?
-@@ -52,11 +52,11 @@
-
- # Copy the files into directories where they will be run.
- install-sis: installdirs
-- n=`echo sis | sed '$(program_transform_name)'`; \
-- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
-+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
-+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
-
- clean-sis:
-- rm -f sis end end.h
-+ rm -f sis$(EXEEXT) end end.h
-
- configure:
- @echo "Rebuilding configure..."
-diff -Naur gdb-7.1.orig/sim/h8300/compile.c gdb-7.1/sim/h8300/compile.c
---- gdb-7.1.orig/sim/h8300/compile.c 2009-12-09 06:32:16.000000000 +0100
-+++ gdb-7.1/sim/h8300/compile.c 2010-03-19 03:58:54.000000000 +0100
-@@ -38,6 +38,12 @@
- # define SIGTRAP 5
- #endif
-
-+#ifdef _WIN32
-+#ifndef SIGBUS
-+#define SIGBUS 10
-+#endif
-+#endif
-+
- int debug;
-
- host_callback *sim_callback;
-diff -Naur gdb-7.1.orig/sim/m32c/Makefile.in gdb-7.1/sim/m32c/Makefile.in
---- gdb-7.1.orig/sim/m32c/Makefile.in 2010-01-01 11:03:31.000000000 +0100
-+++ gdb-7.1/sim/m32c/Makefile.in 2010-03-19 03:58:54.000000000 +0100
-@@ -55,7 +55,7 @@
- ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
-
- opc2c : opc2c.o safe-fgets.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
-
- sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
- ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
-@@ -83,8 +83,10 @@
- mem.o : mem.h cpu.h syscalls.h
- misc.o : cpu.h misc.h
- opc2c.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c
- reg.o : cpu.h
- safe-fgets.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c
- srcdest.c : cpu.h mem.h
- syscalls.c : cpu.h mem.h syscalls.h
-
diff --git a/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100812.diff b/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100812.diff
deleted file mode 100644
index 35bcdf8..0000000
--- a/contrib/crossrpms/patches/gdb-7.1-rtems4.10-20100812.diff
+++ /dev/null
@@ -1,622 +0,0 @@
-diff -Naur gdb-7.1.orig/gdb/config.in gdb-7.1/gdb/config.in
---- gdb-7.1.orig/gdb/config.in 2010-01-15 01:34:37.000000000 +0100
-+++ gdb-7.1/gdb/config.in 2010-08-13 04:38:34.066094217 +0200
-@@ -222,6 +222,9 @@
- /* Define if Python 2.6 is being used. */
- #undef HAVE_LIBPYTHON2_6
-
-+/* Define if Python 2.7 is being used. */
-+#undef HAVE_LIBPYTHON2_7
-+
- /* Define if libunwind library is being used. */
- #undef HAVE_LIBUNWIND
-
-diff -Naur gdb-7.1.orig/gdb/configure gdb-7.1/gdb/configure
---- gdb-7.1.orig/gdb/configure 2010-03-15 18:06:12.000000000 +0100
-+++ gdb-7.1/gdb/configure 2010-08-13 04:38:34.071094149 +0200
-@@ -9471,6 +9471,44 @@
- have_libpython=no
- if test "${have_libpython}" = no; then
-
-+ version=python2.7
-+
-+
-+ HAVE_LIBPYTHON2_7=no
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
-+$as_echo_n "checking for ${version}... " >&6; }
-+ save_LIBS=$LIBS
-+ LIBS="$LIBS -l${version}"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include "${version}/Python.h"
-+int
-+main ()
-+{
-+Py_Initialize ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ HAVE_LIBPYTHON2_7=yes
-+ have_libpython=yes
-+else
-+ LIBS=$save_LIBS
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_7" >&5
-+$as_echo "$HAVE_LIBPYTHON2_7" >&6; }
-+
-+ if test "${HAVE_LIBPYTHON2_7}" = yes; then
-+
-+$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
-+
-+ fi
-+ fi
-+ if test "${have_libpython}" = no; then
-+
- version=python2.6
-
-
-diff -Naur gdb-7.1.orig/gdb/configure.ac gdb-7.1/gdb/configure.ac
---- gdb-7.1.orig/gdb/configure.ac 2010-03-15 18:06:12.000000000 +0100
-+++ gdb-7.1/gdb/configure.ac 2010-08-13 04:38:34.072094137 +0200
-@@ -638,6 +638,12 @@
- LIBS="$LIBS ${python_libs}"
- have_libpython=no
- if test "${have_libpython}" = no; then
-+ AC_TRY_LIBPYTHON(python2.7, have_libpython)
-+ if test "${HAVE_LIBPYTHON2_7}" = yes; then
-+ AC_DEFINE(HAVE_LIBPYTHON2_7, 1, [Define if Python 2.7 is being used.])
-+ fi
-+ fi
-+ if test "${have_libpython}" = no; then
- AC_TRY_LIBPYTHON(python2.6, have_libpython)
- if test "${HAVE_LIBPYTHON2_6}" = yes; then
- AC_DEFINE(HAVE_LIBPYTHON2_6, 1, [Define if Python 2.6 is being used.])
-diff -Naur gdb-7.1.orig/gdb/lm32-tdep.c gdb-7.1/gdb/lm32-tdep.c
---- gdb-7.1.orig/gdb/lm32-tdep.c 2010-01-01 08:31:37.000000000 +0100
-+++ gdb-7.1/gdb/lm32-tdep.c 2010-08-13 04:38:34.072094137 +0200
-@@ -35,7 +35,7 @@
- #include "regcache.h"
- #include "trad-frame.h"
- #include "reggroups.h"
--#include "opcodes/lm32-desc.h"
-+#include "../opcodes/lm32-desc.h"
-
- #include "gdb_string.h"
-
-diff -Naur gdb-7.1.orig/gdb/python/python-internal.h gdb-7.1/gdb/python/python-internal.h
---- gdb-7.1.orig/gdb/python/python-internal.h 2010-02-17 15:58:54.000000000 +0100
-+++ gdb-7.1/gdb/python/python-internal.h 2010-08-13 04:38:34.073094077 +0200
-@@ -45,6 +45,9 @@
- #elif HAVE_LIBPYTHON2_6
- #include "python2.6/Python.h"
- #include "python2.6/frameobject.h"
-+#elif HAVE_LIBPYTHON2_7
-+#include "python2.7/Python.h"
-+#include "python2.7/frameobject.h"
- #else
- #error "Unable to find usable Python.h"
- #endif
-diff -Naur gdb-7.1.orig/gdb/sparc-tdep.c gdb-7.1/gdb/sparc-tdep.c
---- gdb-7.1.orig/gdb/sparc-tdep.c 2010-01-01 08:31:42.000000000 +0100
-+++ gdb-7.1/gdb/sparc-tdep.c 2010-08-13 04:38:34.073094077 +0200
-@@ -1100,7 +1100,7 @@
- sparc32_store_return_value (struct type *type, struct regcache *regcache,
- const gdb_byte *valbuf)
- {
-- int len = TYPE_LENGTH (type);
-+ size_t len = TYPE_LENGTH (type);
- gdb_byte buf[8];
-
- gdb_assert (!sparc_structure_or_union_p (type));
-diff -Naur gdb-7.1.orig/sim/erc32/configure gdb-7.1/sim/erc32/configure
---- gdb-7.1.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100
-+++ gdb-7.1/sim/erc32/configure 2010-08-13 04:38:34.087108561 +0200
-@@ -591,8 +591,9 @@
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- cgen_breaks
-+READLINE_CFLAGS
-+READLINE_DEPS
- READLINE
--TERMCAP
- REPORT_BUGS_TEXI
- REPORT_BUGS_TO
- PKGVERSION
-@@ -716,6 +717,7 @@
- enable_sim_profile
- with_pkgversion
- with_bugurl
-+with_system_readline
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1358,6 +1360,7 @@
- --with-zlib include zlib support (auto/yes/no) default=auto
- --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
- --with-bugurl=URL Direct users to URL to report a bug
-+ --with-system-readline use installed readline library
-
- Some influential environment variables:
- CC C compiler command
-@@ -2416,7 +2419,6 @@
-
-
-
--
- # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
- # it by inlining the macro's contents.
- # This file contains common code used by all simulators.
-@@ -2916,18 +2918,18 @@
- int
- main ()
- {
--
-+return 0;
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
-+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
--$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-+$as_echo_n "checking whether the C compiler works... " >&6; }
- ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
- # The possible output files:
-@@ -2989,10 +2991,10 @@
- else
- ac_file=''
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
--$as_echo "$ac_file" >&6; }
- if test -z "$ac_file"; then :
-- $as_echo "$as_me: failed program was:" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+$as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-@@ -3000,51 +3002,18 @@
- { as_fn_set_status 77
- as_fn_error "C compiler cannot create executables
- See \`config.log' for more details." "$LINENO" 5; }; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-+$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-+$as_echo "$ac_file" >&6; }
- ac_exeext=$ac_cv_exeext
-
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
--$as_echo_n "checking whether the C compiler works... " >&6; }
--# If not cross compiling, check that we can run a simple program.
--if test "$cross_compiling" != yes; then
-- if { ac_try='./$ac_file'
-- { { case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; }; then
-- cross_compiling=no
-- else
-- if test "$cross_compiling" = maybe; then
-- cross_compiling=yes
-- else
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error "cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." "$LINENO" 5; }
-- fi
-- fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--
--rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
-+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
--$as_echo_n "checking whether we are cross compiling... " >&6; }
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
--$as_echo "$cross_compiling" >&6; }
--
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
- if { { ac_try="$ac_link"
-@@ -3084,6 +3053,63 @@
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+ac_clean_files="$ac_clean_files conftest.out"
-+# Check that the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-+$as_echo_n "checking whether we are cross compiling... " >&6; }
-+if test "$cross_compiling" != yes; then
-+ { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ if { ac_try='./conftest$ac_cv_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
-+ cross_compiling=no
-+ else
-+ if test "$cross_compiling" = maybe; then
-+ cross_compiling=yes
-+ else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." "$LINENO" 5; }
-+ fi
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-+$as_echo "$cross_compiling" >&6; }
-+
-+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-+ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
- $as_echo_n "checking for suffix of object files... " >&6; }
- if test "${ac_cv_objext+set}" = set; then :
-@@ -4532,86 +4558,41 @@
- done
-
-
--# In the Cygwin environment, we need some additional flags.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
--$as_echo_n "checking for cygwin... " >&6; }
--if test "${sim_cv_os_cygwin+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
-
--#ifdef __CYGWIN__
--lose
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "lose" >/dev/null 2>&1; then :
-- sim_cv_os_cygwin=yes
--else
-- sim_cv_os_cygwin=no
-+# Check whether --with-system-readline was given.
-+if test "${with_system_readline+set}" = set; then :
-+ withval=$with_system_readline;
- fi
--rm -f conftest*
-
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
--$as_echo "$sim_cv_os_cygwin" >&6; }
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5
--$as_echo_n "checking for main in -ltermcap... " >&6; }
--if test "${ac_cv_lib_termcap_main+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-ltermcap $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+if test "$with_system_readline" = yes; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
-+$as_echo_n "checking for readline... " >&6; }
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
--
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char add_history ();
- int
- main ()
- {
--return main ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_termcap_main=yes
--else
-- ac_cv_lib_termcap_main=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5
--$as_echo "$ac_cv_lib_termcap_main" >&6; }
--if test "x$ac_cv_lib_termcap_main" = x""yes; then :
-- TERMCAP=-ltermcap
--else
-- TERMCAP=""
--fi
--
--fi
--
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
--$as_echo_n "checking for readline in -lreadline... " >&6; }
--if test "${ac_cv_lib_readline_readline+set}" = set; then :
-- $as_echo_n "(cached) " >&6
-+ READLINE=-lreadline
- else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMCAP $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ LIBS="-lreadline -lncurses $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
- /* Override any GCC internal prototype to avoid an error.
-@@ -4620,33 +4601,39 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char readline ();
-+char add_history ();
- int
- main ()
- {
--return readline ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_readline_readline=yes
-+ READLINE="-lreadline -lncurses"
- else
-- ac_cv_lib_readline_readline=no
-+ as_fn_error "unable to detect readline" "$LINENO" 5
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
--$as_echo "$ac_cv_lib_readline_readline" >&6; }
--if test "x$ac_cv_lib_readline_readline" = x""yes; then :
-- READLINE=-lreadline
--else
-- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ LIBS="$save_LIBS"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
-+$as_echo "$READLINE" >&6; }
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
-+else
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
-
--fi
-+
-+
-
-
- ac_sources="$sim_link_files"
-diff -Naur gdb-7.1.orig/sim/erc32/configure.ac gdb-7.1/sim/erc32/configure.ac
---- gdb-7.1.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
-+++ gdb-7.1/sim/erc32/configure.ac 2010-08-13 04:38:34.087108561 +0200
-@@ -11,27 +11,32 @@
-
- AC_CHECK_HEADERS(stdlib.h)
-
--# In the Cygwin environment, we need some additional flags.
--AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
--[AC_EGREP_CPP(lose, [
--#ifdef __CYGWIN__
--lose
--#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
-+AC_ARG_WITH([system-readline],
-+ [AS_HELP_STRING([--with-system-readline],
-+ [use installed readline library])])
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-+if test "$with_system_readline" = yes; then
-+ AC_MSG_CHECKING([for readline])
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE=-lreadline],
-+ [ LIBS="-lreadline -lncurses $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE="-lreadline -lncurses"],
-+ [AC_MSG_ERROR([unable to detect readline])])
-+ ])
-+ LIBS="$save_LIBS"
-+ AC_MSG_RESULT($READLINE)
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
- else
-- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
--fi
--AC_SUBST(TERMCAP)
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
-- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
- AC_SUBST(READLINE)
-+AC_SUBST(READLINE_DEPS)
-+AC_SUBST(READLINE_CFLAGS)
-+
- SIM_AC_OUTPUT
-diff -Naur gdb-7.1.orig/sim/erc32/erc32.c gdb-7.1/sim/erc32/erc32.c
---- gdb-7.1.orig/sim/erc32/erc32.c 2008-11-11 23:20:54.000000000 +0100
-+++ gdb-7.1/sim/erc32/erc32.c 2010-08-13 04:38:34.088094136 +0200
-@@ -414,7 +414,7 @@
- if (rom8) mec_memcfg &= ~0x20000;
- else mec_memcfg |= 0x20000;
-
-- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
-+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
- mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
-
- if (sparclite_board) {
-diff -Naur gdb-7.1.orig/sim/erc32/Makefile.in gdb-7.1/sim/erc32/Makefile.in
---- gdb-7.1.orig/sim/erc32/Makefile.in 2010-01-01 11:03:28.000000000 +0100
-+++ gdb-7.1/sim/erc32/Makefile.in 2010-08-13 04:38:34.088094136 +0200
-@@ -19,12 +19,12 @@
-
- ## COMMON_PRE_CONFIG_FRAG
-
--TERMCAP_LIB = @TERMCAP@
-+# TERMCAP_LIB = -lncurses
- READLINE_LIB = @READLINE@
-
- SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
- SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
--SIM_EXTRA_ALL = sis
-+SIM_EXTRA_ALL = sis$(EXEEXT)
- SIM_EXTRA_INSTALL = install-sis
- SIM_EXTRA_CLEAN = clean-sis
-
-@@ -38,8 +38,8 @@
- # `sis' doesn't need interf.o.
- SIS_OFILES = exec.o erc32.o func.o help.o float.o
-
--sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-- $(CC) $(ALL_CFLAGS) -o sis \
-+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
- sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
-
- # FIXME: This computes the build host's endianness, doesn't it?
-@@ -52,11 +52,11 @@
-
- # Copy the files into directories where they will be run.
- install-sis: installdirs
-- n=`echo sis | sed '$(program_transform_name)'`; \
-- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
-+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
-+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
-
- clean-sis:
-- rm -f sis end end.h
-+ rm -f sis$(EXEEXT) end end.h
-
- configure:
- @echo "Rebuilding configure..."
-diff -Naur gdb-7.1.orig/sim/h8300/compile.c gdb-7.1/sim/h8300/compile.c
---- gdb-7.1.orig/sim/h8300/compile.c 2009-12-09 06:32:16.000000000 +0100
-+++ gdb-7.1/sim/h8300/compile.c 2010-08-13 04:38:34.090094053 +0200
-@@ -38,6 +38,12 @@
- # define SIGTRAP 5
- #endif
-
-+#ifdef _WIN32
-+#ifndef SIGBUS
-+#define SIGBUS 10
-+#endif
-+#endif
-+
- int debug;
-
- host_callback *sim_callback;
-diff -Naur gdb-7.1.orig/sim/m32c/Makefile.in gdb-7.1/sim/m32c/Makefile.in
---- gdb-7.1.orig/sim/m32c/Makefile.in 2010-01-01 11:03:31.000000000 +0100
-+++ gdb-7.1/sim/m32c/Makefile.in 2010-08-13 04:38:34.104219008 +0200
-@@ -55,7 +55,7 @@
- ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
-
- opc2c : opc2c.o safe-fgets.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
-
- sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
- ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
-@@ -83,8 +83,10 @@
- mem.o : mem.h cpu.h syscalls.h
- misc.o : cpu.h misc.h
- opc2c.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c
- reg.o : cpu.h
- safe-fgets.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c
- srcdest.c : cpu.h mem.h
- syscalls.c : cpu.h mem.h syscalls.h
-
diff --git a/contrib/crossrpms/patches/gdb-7.2-rtems4.10-20100903.diff b/contrib/crossrpms/patches/gdb-7.2-rtems4.10-20100903.diff
deleted file mode 100644
index e3e0542..0000000
--- a/contrib/crossrpms/patches/gdb-7.2-rtems4.10-20100903.diff
+++ /dev/null
@@ -1,532 +0,0 @@
-diff -Naur gdb-7.2.orig/gdb/lm32-tdep.c gdb-7.2/gdb/lm32-tdep.c
---- gdb-7.2.orig/gdb/lm32-tdep.c 2010-01-01 08:31:37.000000000 +0100
-+++ gdb-7.2/gdb/lm32-tdep.c 2010-09-03 06:31:13.248351984 +0200
-@@ -35,7 +35,7 @@
- #include "regcache.h"
- #include "trad-frame.h"
- #include "reggroups.h"
--#include "opcodes/lm32-desc.h"
-+#include "../opcodes/lm32-desc.h"
-
- #include "gdb_string.h"
-
-diff -Naur gdb-7.2.orig/gdb/sparc-tdep.c gdb-7.2/gdb/sparc-tdep.c
---- gdb-7.2.orig/gdb/sparc-tdep.c 2010-05-05 18:58:59.000000000 +0200
-+++ gdb-7.2/gdb/sparc-tdep.c 2010-09-03 06:31:39.753477822 +0200
-@@ -1105,7 +1105,7 @@
- sparc32_store_return_value (struct type *type, struct regcache *regcache,
- const gdb_byte *valbuf)
- {
-- int len = TYPE_LENGTH (type);
-+ size_t len = TYPE_LENGTH (type);
- gdb_byte buf[8];
-
- gdb_assert (!sparc_structure_or_union_p (type));
-diff -Naur gdb-7.2.orig/sim/erc32/configure gdb-7.2/sim/erc32/configure
---- gdb-7.2.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100
-+++ gdb-7.2/sim/erc32/configure 2010-09-03 06:33:38.106477633 +0200
-@@ -591,8 +591,9 @@
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- cgen_breaks
-+READLINE_CFLAGS
-+READLINE_DEPS
- READLINE
--TERMCAP
- REPORT_BUGS_TEXI
- REPORT_BUGS_TO
- PKGVERSION
-@@ -716,6 +717,7 @@
- enable_sim_profile
- with_pkgversion
- with_bugurl
-+with_system_readline
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1358,6 +1360,7 @@
- --with-zlib include zlib support (auto/yes/no) default=auto
- --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
- --with-bugurl=URL Direct users to URL to report a bug
-+ --with-system-readline use installed readline library
-
- Some influential environment variables:
- CC C compiler command
-@@ -2416,7 +2419,6 @@
-
-
-
--
- # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
- # it by inlining the macro's contents.
- # This file contains common code used by all simulators.
-@@ -2916,18 +2918,18 @@
- int
- main ()
- {
--
-+return 0;
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
-+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
--$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-+$as_echo_n "checking whether the C compiler works... " >&6; }
- ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
- # The possible output files:
-@@ -2989,10 +2991,10 @@
- else
- ac_file=''
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
--$as_echo "$ac_file" >&6; }
- if test -z "$ac_file"; then :
-- $as_echo "$as_me: failed program was:" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+$as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-@@ -3000,51 +3002,18 @@
- { as_fn_set_status 77
- as_fn_error "C compiler cannot create executables
- See \`config.log' for more details." "$LINENO" 5; }; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-+$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-+$as_echo "$ac_file" >&6; }
- ac_exeext=$ac_cv_exeext
-
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
--$as_echo_n "checking whether the C compiler works... " >&6; }
--# If not cross compiling, check that we can run a simple program.
--if test "$cross_compiling" != yes; then
-- if { ac_try='./$ac_file'
-- { { case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; }; then
-- cross_compiling=no
-- else
-- if test "$cross_compiling" = maybe; then
-- cross_compiling=yes
-- else
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error "cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." "$LINENO" 5; }
-- fi
-- fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--
--rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
-+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
--$as_echo_n "checking whether we are cross compiling... " >&6; }
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
--$as_echo "$cross_compiling" >&6; }
--
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
- if { { ac_try="$ac_link"
-@@ -3084,6 +3053,63 @@
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+ac_clean_files="$ac_clean_files conftest.out"
-+# Check that the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-+$as_echo_n "checking whether we are cross compiling... " >&6; }
-+if test "$cross_compiling" != yes; then
-+ { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ if { ac_try='./conftest$ac_cv_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
-+ cross_compiling=no
-+ else
-+ if test "$cross_compiling" = maybe; then
-+ cross_compiling=yes
-+ else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." "$LINENO" 5; }
-+ fi
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-+$as_echo "$cross_compiling" >&6; }
-+
-+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-+ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
- $as_echo_n "checking for suffix of object files... " >&6; }
- if test "${ac_cv_objext+set}" = set; then :
-@@ -4532,86 +4558,41 @@
- done
-
-
--# In the Cygwin environment, we need some additional flags.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
--$as_echo_n "checking for cygwin... " >&6; }
--if test "${sim_cv_os_cygwin+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
-
--#ifdef __CYGWIN__
--lose
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "lose" >/dev/null 2>&1; then :
-- sim_cv_os_cygwin=yes
--else
-- sim_cv_os_cygwin=no
-+# Check whether --with-system-readline was given.
-+if test "${with_system_readline+set}" = set; then :
-+ withval=$with_system_readline;
- fi
--rm -f conftest*
-
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
--$as_echo "$sim_cv_os_cygwin" >&6; }
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5
--$as_echo_n "checking for main in -ltermcap... " >&6; }
--if test "${ac_cv_lib_termcap_main+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-ltermcap $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+if test "$with_system_readline" = yes; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
-+$as_echo_n "checking for readline... " >&6; }
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
--
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char add_history ();
- int
- main ()
- {
--return main ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_termcap_main=yes
--else
-- ac_cv_lib_termcap_main=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5
--$as_echo "$ac_cv_lib_termcap_main" >&6; }
--if test "x$ac_cv_lib_termcap_main" = x""yes; then :
-- TERMCAP=-ltermcap
--else
-- TERMCAP=""
--fi
--
--fi
--
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
--$as_echo_n "checking for readline in -lreadline... " >&6; }
--if test "${ac_cv_lib_readline_readline+set}" = set; then :
-- $as_echo_n "(cached) " >&6
-+ READLINE=-lreadline
- else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMCAP $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ LIBS="-lreadline -lncurses $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
- /* Override any GCC internal prototype to avoid an error.
-@@ -4620,33 +4601,39 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char readline ();
-+char add_history ();
- int
- main ()
- {
--return readline ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_readline_readline=yes
-+ READLINE="-lreadline -lncurses"
- else
-- ac_cv_lib_readline_readline=no
-+ as_fn_error "unable to detect readline" "$LINENO" 5
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
--$as_echo "$ac_cv_lib_readline_readline" >&6; }
--if test "x$ac_cv_lib_readline_readline" = x""yes; then :
-- READLINE=-lreadline
--else
-- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ LIBS="$save_LIBS"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
-+$as_echo "$READLINE" >&6; }
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
-+else
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
-
--fi
-+
-+
-
-
- ac_sources="$sim_link_files"
-diff -Naur gdb-7.2.orig/sim/erc32/configure.ac gdb-7.2/sim/erc32/configure.ac
---- gdb-7.2.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
-+++ gdb-7.2/sim/erc32/configure.ac 2010-09-03 06:33:15.282478080 +0200
-@@ -11,27 +11,32 @@
-
- AC_CHECK_HEADERS(stdlib.h)
-
--# In the Cygwin environment, we need some additional flags.
--AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
--[AC_EGREP_CPP(lose, [
--#ifdef __CYGWIN__
--lose
--#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
-+AC_ARG_WITH([system-readline],
-+ [AS_HELP_STRING([--with-system-readline],
-+ [use installed readline library])])
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-+if test "$with_system_readline" = yes; then
-+ AC_MSG_CHECKING([for readline])
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE=-lreadline],
-+ [ LIBS="-lreadline -lncurses $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE="-lreadline -lncurses"],
-+ [AC_MSG_ERROR([unable to detect readline])])
-+ ])
-+ LIBS="$save_LIBS"
-+ AC_MSG_RESULT($READLINE)
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
- else
-- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
--fi
--AC_SUBST(TERMCAP)
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
-- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
- AC_SUBST(READLINE)
-+AC_SUBST(READLINE_DEPS)
-+AC_SUBST(READLINE_CFLAGS)
-+
- SIM_AC_OUTPUT
-diff -Naur gdb-7.2.orig/sim/erc32/erc32.c gdb-7.2/sim/erc32/erc32.c
---- gdb-7.2.orig/sim/erc32/erc32.c 2010-05-11 16:18:20.000000000 +0200
-+++ gdb-7.2/sim/erc32/erc32.c 2010-09-03 06:32:13.730781311 +0200
-@@ -414,7 +414,7 @@
- if (rom8) mec_memcfg &= ~0x20000;
- else mec_memcfg |= 0x20000;
-
-- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
-+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
- mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
-
- if (sparclite_board) {
-diff -Naur gdb-7.2.orig/sim/erc32/Makefile.in gdb-7.2/sim/erc32/Makefile.in
---- gdb-7.2.orig/sim/erc32/Makefile.in 2010-01-01 11:03:28.000000000 +0100
-+++ gdb-7.2/sim/erc32/Makefile.in 2010-09-03 06:33:01.576353269 +0200
-@@ -19,12 +19,12 @@
-
- ## COMMON_PRE_CONFIG_FRAG
-
--TERMCAP_LIB = @TERMCAP@
-+# TERMCAP_LIB = -lncurses
- READLINE_LIB = @READLINE@
-
- SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
- SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
--SIM_EXTRA_ALL = sis
-+SIM_EXTRA_ALL = sis$(EXEEXT)
- SIM_EXTRA_INSTALL = install-sis
- SIM_EXTRA_CLEAN = clean-sis
-
-@@ -38,8 +38,8 @@
- # `sis' doesn't need interf.o.
- SIS_OFILES = exec.o erc32.o func.o help.o float.o
-
--sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-- $(CC) $(ALL_CFLAGS) -o sis \
-+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
- sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
-
- # FIXME: This computes the build host's endianness, doesn't it?
-@@ -52,11 +52,11 @@
-
- # Copy the files into directories where they will be run.
- install-sis: installdirs
-- n=`echo sis | sed '$(program_transform_name)'`; \
-- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
-+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
-+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
-
- clean-sis:
-- rm -f sis end end.h
-+ rm -f sis$(EXEEXT) end end.h
-
- configure:
- @echo "Rebuilding configure..."
-diff -Naur gdb-7.2.orig/sim/h8300/compile.c gdb-7.2/sim/h8300/compile.c
---- gdb-7.2.orig/sim/h8300/compile.c 2010-04-14 09:38:04.000000000 +0200
-+++ gdb-7.2/sim/h8300/compile.c 2010-09-03 06:32:35.424409014 +0200
-@@ -38,6 +38,12 @@
- # define SIGTRAP 5
- #endif
-
-+#ifdef _WIN32
-+#ifndef SIGBUS
-+#define SIGBUS 10
-+#endif
-+#endif
-+
- int debug;
-
- host_callback *sim_callback;
-diff -Naur gdb-7.2.orig/sim/m32c/Makefile.in gdb-7.2/sim/m32c/Makefile.in
---- gdb-7.2.orig/sim/m32c/Makefile.in 2010-01-01 11:03:31.000000000 +0100
-+++ gdb-7.2/sim/m32c/Makefile.in 2010-09-03 06:32:48.480609447 +0200
-@@ -55,7 +55,7 @@
- ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
-
- opc2c : opc2c.o safe-fgets.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
-
- sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
- ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
-@@ -83,8 +83,10 @@
- mem.o : mem.h cpu.h syscalls.h
- misc.o : cpu.h misc.h
- opc2c.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c
- reg.o : cpu.h
- safe-fgets.o : safe-fgets.h
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c
- srcdest.c : cpu.h mem.h
- syscalls.c : cpu.h mem.h syscalls.h
-
diff --git a/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff b/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff
deleted file mode 100644
index 0a201a5..0000000
--- a/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff
+++ /dev/null
@@ -1,586 +0,0 @@
-diff -Naur gdb-7.3.1.orig/gdb/lm32-tdep.c gdb-7.3.1/gdb/lm32-tdep.c
---- gdb-7.3.1.orig/gdb/lm32-tdep.c 2011-03-18 19:52:30.000000000 +0100
-+++ gdb-7.3.1/gdb/lm32-tdep.c 2011-09-05 05:15:58.049769734 +0200
-@@ -35,7 +35,7 @@
- #include "regcache.h"
- #include "trad-frame.h"
- #include "reggroups.h"
--#include "opcodes/lm32-desc.h"
-+#include "../opcodes/lm32-desc.h"
-
- #include "gdb_string.h"
-
-diff -Naur gdb-7.3.1.orig/gdb/sparc-tdep.c gdb-7.3.1/gdb/sparc-tdep.c
---- gdb-7.3.1.orig/gdb/sparc-tdep.c 2011-03-18 19:52:32.000000000 +0100
-+++ gdb-7.3.1/gdb/sparc-tdep.c 2011-09-05 05:15:58.049769734 +0200
-@@ -1117,7 +1117,7 @@
- sparc32_store_return_value (struct type *type, struct regcache *regcache,
- const gdb_byte *valbuf)
- {
-- int len = TYPE_LENGTH (type);
-+ size_t len = TYPE_LENGTH (type);
- gdb_byte buf[8];
-
- gdb_assert (!sparc_structure_or_union_p (type));
-diff -Naur gdb-7.3.1.orig/sim/common/gentmap.c gdb-7.3.1/sim/common/gentmap.c
---- gdb-7.3.1.orig/sim/common/gentmap.c 2006-11-07 20:29:59.000000000 +0100
-+++ gdb-7.3.1/sim/common/gentmap.c 2011-09-05 05:15:58.064769977 +0200
-@@ -2,6 +2,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
-
- struct tdefs {
- char *symbol;
-diff -Naur gdb-7.3.1.orig/sim/erc32/configure gdb-7.3.1/sim/erc32/configure
---- gdb-7.3.1.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100
-+++ gdb-7.3.1/sim/erc32/configure 2011-09-05 05:15:58.075770156 +0200
-@@ -591,8 +591,9 @@
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- cgen_breaks
-+READLINE_CFLAGS
-+READLINE_DEPS
- READLINE
--TERMCAP
- REPORT_BUGS_TEXI
- REPORT_BUGS_TO
- PKGVERSION
-@@ -716,6 +717,7 @@
- enable_sim_profile
- with_pkgversion
- with_bugurl
-+with_system_readline
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1358,6 +1360,7 @@
- --with-zlib include zlib support (auto/yes/no) default=auto
- --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
- --with-bugurl=URL Direct users to URL to report a bug
-+ --with-system-readline use installed readline library
-
- Some influential environment variables:
- CC C compiler command
-@@ -2416,7 +2419,6 @@
-
-
-
--
- # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
- # it by inlining the macro's contents.
- # This file contains common code used by all simulators.
-@@ -2916,18 +2918,18 @@
- int
- main ()
- {
--
-+return 0;
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
-+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
--$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-+$as_echo_n "checking whether the C compiler works... " >&6; }
- ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
- # The possible output files:
-@@ -2989,10 +2991,10 @@
- else
- ac_file=''
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
--$as_echo "$ac_file" >&6; }
- if test -z "$ac_file"; then :
-- $as_echo "$as_me: failed program was:" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+$as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-@@ -3000,51 +3002,18 @@
- { as_fn_set_status 77
- as_fn_error "C compiler cannot create executables
- See \`config.log' for more details." "$LINENO" 5; }; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-+$as_echo_n "checking for C compiler default output file name... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-+$as_echo "$ac_file" >&6; }
- ac_exeext=$ac_cv_exeext
-
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
--$as_echo_n "checking whether the C compiler works... " >&6; }
--# If not cross compiling, check that we can run a simple program.
--if test "$cross_compiling" != yes; then
-- if { ac_try='./$ac_file'
-- { { case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; }; then
-- cross_compiling=no
-- else
-- if test "$cross_compiling" = maybe; then
-- cross_compiling=yes
-- else
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error "cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." "$LINENO" 5; }
-- fi
-- fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--
--rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
-+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
--# Check that the compiler produces executables we can run. If not, either
--# the compiler is broken, or we cross compile.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
--$as_echo_n "checking whether we are cross compiling... " >&6; }
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
--$as_echo "$cross_compiling" >&6; }
--
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
- if { { ac_try="$ac_link"
-@@ -3084,6 +3053,63 @@
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+ac_clean_files="$ac_clean_files conftest.out"
-+# Check that the compiler produces executables we can run. If not, either
-+# the compiler is broken, or we cross compile.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-+$as_echo_n "checking whether we are cross compiling... " >&6; }
-+if test "$cross_compiling" != yes; then
-+ { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ if { ac_try='./conftest$ac_cv_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
-+ cross_compiling=no
-+ else
-+ if test "$cross_compiling" = maybe; then
-+ cross_compiling=yes
-+ else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run C compiled programs.
-+If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." "$LINENO" 5; }
-+ fi
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-+$as_echo "$cross_compiling" >&6; }
-+
-+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-+ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
- $as_echo_n "checking for suffix of object files... " >&6; }
- if test "${ac_cv_objext+set}" = set; then :
-@@ -4532,86 +4558,41 @@
- done
-
-
--# In the Cygwin environment, we need some additional flags.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
--$as_echo_n "checking for cygwin... " >&6; }
--if test "${sim_cv_os_cygwin+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
-
--#ifdef __CYGWIN__
--lose
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "lose" >/dev/null 2>&1; then :
-- sim_cv_os_cygwin=yes
--else
-- sim_cv_os_cygwin=no
-+# Check whether --with-system-readline was given.
-+if test "${with_system_readline+set}" = set; then :
-+ withval=$with_system_readline;
- fi
--rm -f conftest*
-
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
--$as_echo "$sim_cv_os_cygwin" >&6; }
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5
--$as_echo_n "checking for main in -ltermcap... " >&6; }
--if test "${ac_cv_lib_termcap_main+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-ltermcap $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+if test "$with_system_readline" = yes; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
-+$as_echo_n "checking for readline... " >&6; }
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
--
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char add_history ();
- int
- main ()
- {
--return main ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_termcap_main=yes
--else
-- ac_cv_lib_termcap_main=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5
--$as_echo "$ac_cv_lib_termcap_main" >&6; }
--if test "x$ac_cv_lib_termcap_main" = x""yes; then :
-- TERMCAP=-ltermcap
--else
-- TERMCAP=""
--fi
--
--fi
--
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
--$as_echo_n "checking for readline in -lreadline... " >&6; }
--if test "${ac_cv_lib_readline_readline+set}" = set; then :
-- $as_echo_n "(cached) " >&6
-+ READLINE=-lreadline
- else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMCAP $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ LIBS="-lreadline -lncurses $save_LIBS"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
- /* Override any GCC internal prototype to avoid an error.
-@@ -4620,33 +4601,39 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char readline ();
-+char add_history ();
- int
- main ()
- {
--return readline ();
-+return add_history ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_readline_readline=yes
-+ READLINE="-lreadline -lncurses"
- else
-- ac_cv_lib_readline_readline=no
-+ as_fn_error "unable to detect readline" "$LINENO" 5
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
--$as_echo "$ac_cv_lib_readline_readline" >&6; }
--if test "x$ac_cv_lib_readline_readline" = x""yes; then :
-- READLINE=-lreadline
--else
-- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ LIBS="$save_LIBS"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
-+$as_echo "$READLINE" >&6; }
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
-+else
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
-
--fi
-+
-+
-
-
- ac_sources="$sim_link_files"
-diff -Naur gdb-7.3.1.orig/sim/erc32/configure.ac gdb-7.3.1/sim/erc32/configure.ac
---- gdb-7.3.1.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
-+++ gdb-7.3.1/sim/erc32/configure.ac 2011-09-05 05:15:58.075770156 +0200
-@@ -11,27 +11,32 @@
-
- AC_CHECK_HEADERS(stdlib.h)
-
--# In the Cygwin environment, we need some additional flags.
--AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
--[AC_EGREP_CPP(lose, [
--#ifdef __CYGWIN__
--lose
--#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
-+AC_ARG_WITH([system-readline],
-+ [AS_HELP_STRING([--with-system-readline],
-+ [use installed readline library])])
-
--if test x$sim_cv_os_cygwin = xyes; then
-- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-+if test "$with_system_readline" = yes; then
-+ AC_MSG_CHECKING([for readline])
-+ save_LIBS="$LIBS"
-+ LIBS="-lreadline $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE=-lreadline],
-+ [ LIBS="-lreadline -lncurses $save_LIBS"
-+ AC_LINK_IFELSE([AC_LANG_CALL([],
-+ [add_history])], [READLINE="-lreadline -lncurses"],
-+ [AC_MSG_ERROR([unable to detect readline])])
-+ ])
-+ LIBS="$save_LIBS"
-+ AC_MSG_RESULT($READLINE)
-+ READLINE_DEPS=
-+ READLINE_CFLAGS=
- else
-- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
--fi
--AC_SUBST(TERMCAP)
--
--# We prefer the in-tree readline. Top-level dependencies make sure
--# src/readline (if it's there) is configured before src/sim.
--if test -r ../../readline/Makefile; then
-- READLINE=../../readline/libreadline.a
--else
-- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
-- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
-+ READLINE='../../readline/libreadline.a -lncurses'
-+ READLINE_DEPS='$(READLINE)'
-+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
- fi
- AC_SUBST(READLINE)
-+AC_SUBST(READLINE_DEPS)
-+AC_SUBST(READLINE_CFLAGS)
-+
- SIM_AC_OUTPUT
-diff -Naur gdb-7.3.1.orig/sim/erc32/erc32.c gdb-7.3.1/sim/erc32/erc32.c
---- gdb-7.3.1.orig/sim/erc32/erc32.c 2010-05-11 16:18:20.000000000 +0200
-+++ gdb-7.3.1/sim/erc32/erc32.c 2011-09-05 05:15:58.076770172 +0200
-@@ -414,7 +414,7 @@
- if (rom8) mec_memcfg &= ~0x20000;
- else mec_memcfg |= 0x20000;
-
-- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
-+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
- mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
-
- if (sparclite_board) {
-diff -Naur gdb-7.3.1.orig/sim/erc32/Makefile.in gdb-7.3.1/sim/erc32/Makefile.in
---- gdb-7.3.1.orig/sim/erc32/Makefile.in 2011-01-01 16:33:58.000000000 +0100
-+++ gdb-7.3.1/sim/erc32/Makefile.in 2011-09-05 05:15:58.076770172 +0200
-@@ -19,12 +19,12 @@
-
- ## COMMON_PRE_CONFIG_FRAG
-
--TERMCAP_LIB = @TERMCAP@
-+# TERMCAP_LIB = -lncurses
- READLINE_LIB = @READLINE@
-
- SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
- SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
--SIM_EXTRA_ALL = sis
-+SIM_EXTRA_ALL = sis$(EXEEXT)
- SIM_EXTRA_INSTALL = install-sis
- SIM_EXTRA_CLEAN = clean-sis
-
-@@ -38,8 +38,8 @@
- # `sis' doesn't need interf.o.
- SIS_OFILES = exec.o erc32.o func.o help.o float.o
-
--sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-- $(CC) $(ALL_CFLAGS) -o sis \
-+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
-+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
- sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
-
- # FIXME: This computes the build host's endianness, doesn't it?
-@@ -52,11 +52,11 @@
-
- # Copy the files into directories where they will be run.
- install-sis: installdirs
-- n=`echo sis | sed '$(program_transform_name)'`; \
-- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
-+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
-+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
-
- clean-sis:
-- rm -f sis end end.h
-+ rm -f sis$(EXEEXT) end end.h
-
- configure:
- @echo "Rebuilding configure..."
-diff -Naur gdb-7.3.1.orig/sim/h8300/compile.c gdb-7.3.1/sim/h8300/compile.c
---- gdb-7.3.1.orig/sim/h8300/compile.c 2011-01-11 15:19:32.000000000 +0100
-+++ gdb-7.3.1/sim/h8300/compile.c 2011-09-05 05:15:58.085770319 +0200
-@@ -38,6 +38,12 @@
- # define SIGTRAP 5
- #endif
-
-+#ifdef _WIN32
-+#ifndef SIGBUS
-+#define SIGBUS 10
-+#endif
-+#endif
-+
- int debug;
-
- host_callback *sim_callback;
-diff -Naur gdb-7.3.1.orig/sim/m32c/Makefile.in gdb-7.3.1/sim/m32c/Makefile.in
---- gdb-7.3.1.orig/sim/m32c/Makefile.in 2011-01-01 16:34:01.000000000 +0100
-+++ gdb-7.3.1/sim/m32c/Makefile.in 2011-09-05 05:15:58.098770530 +0200
-@@ -56,7 +56,7 @@
- ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
-
- opc2c : opc2c.o safe-fgets.o
-- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@ $(BUILD_LIBS)
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@ $(BUILD_LIBS)
-
- sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
- ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
-@@ -90,8 +90,8 @@
- r8c.o : cpu.h mem.h misc.h int.h
-
- opc2c.o : opc2c.c safe-fgets.h
-- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/opc2c.c
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c
-
- safe-fgets.o : safe-fgets.c safe-fgets.h
-- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/safe-fgets.c
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c
-
-diff -Naur gdb-7.3.1.orig/sim/ppc/device.c gdb-7.3.1/sim/ppc/device.c
---- gdb-7.3.1.orig/sim/ppc/device.c 2011-02-14 06:14:27.000000000 +0100
-+++ gdb-7.3.1/sim/ppc/device.c 2011-09-05 05:15:58.112770758 +0200
-@@ -1816,7 +1816,7 @@
- /* I/O */
-
- EXTERN_DEVICE\
--(void volatile)
-+(void)
- device_error(device *me,
- const char *fmt,
- ...)
-diff -Naur gdb-7.3.1.orig/sim/ppc/device.h gdb-7.3.1/sim/ppc/device.h
---- gdb-7.3.1.orig/sim/ppc/device.h 2001-12-14 01:22:12.000000000 +0100
-+++ gdb-7.3.1/sim/ppc/device.h 2011-09-05 05:15:58.112770758 +0200
-@@ -727,7 +727,7 @@
- */
-
- EXTERN_DEVICE\
--(void volatile) device_error
-+(void) device_error
- (device *me,
- const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
-diff -Naur gdb-7.3.1.orig/sim/ppc/hw_glue.c gdb-7.3.1/sim/ppc/hw_glue.c
---- gdb-7.3.1.orig/sim/ppc/hw_glue.c 1999-04-16 03:35:09.000000000 +0200
-+++ gdb-7.3.1/sim/ppc/hw_glue.c 2011-09-05 05:15:58.112770758 +0200
-@@ -194,13 +194,13 @@
- if (glue->sizeof_output == 0)
- device_error(me, "at least one reg property size must be nonzero");
- if (glue->sizeof_output % sizeof(unsigned_word) != 0)
-- device_error(me, "reg property size must be %d aligned", sizeof(unsigned_word));
-+ device_error(me, "reg property size must be %zd aligned", sizeof(unsigned_word));
- /* and the address */
- device_address_to_attach_address(device_parent(me),
- &unit.address, &glue->space, &glue->address,
- me);
- if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0)
-- device_error(me, "reg property address must be %d aligned",
-+ device_error(me, "reg property address must be %zd aligned",
- sizeof(unsigned_word) * max_nr_interrupts);
- glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word);
- glue->output = zalloc(glue->sizeof_output);
diff --git a/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110518.diff b/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110518.diff
deleted file mode 100644
index ecced5f..0000000
--- a/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110518.diff
+++ /dev/null
@@ -1,2904 +0,0 @@
-diff -Naur newlib-1.18.0.orig/newlib/ChangeLog newlib-1.18.0-rtems4.10-20110518/newlib/ChangeLog
---- newlib-1.18.0.orig/newlib/ChangeLog 2009-12-17 22:08:04.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/ChangeLog 2011-05-18 14:27:09.025560232 +0200
-@@ -1,3 +1,39 @@
-+2011-05-18 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/time.h: Add bugward-compatibile
-+ CLOCK_THREAD_CPUTIME, CLOCK_PROCESS_CPUTIME.
-+
-+2011-05-16 Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
-+
-+ * libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
-+ CLOCK_PROCESS_CPUTIME.
-+ (CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
-+
-+2011-05-16 Christian Bruel <christian.bruel at st.com>
-+
-+ * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
-+ DBL_DIG.
-+
-+2011-04-19 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/stdint.h: Rework SIZE_MAX.
-+ * libc/sys/rtems/include/limits.h: Rework SSIZE_MAX.
-+
-+2011-01-31 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/crt0.c: Add clock_gettime, gettimeofday,
-+ sched_yield.
-+
-+2011-01-12 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
-+ * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
-+
-+2011-01-07 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/crt0.c: Adjust free() and calloc() to match their
-+ public decls.
-+
- 2009-12-17 Jeff Johnston <jjohnstn at redhat.com>
-
- * NEWS: Update with 1.18.0 info.
-@@ -41,19 +77,19 @@
- * libc/stdlib/atexit.c: Ditto.
- * libc/stdlib/on_exit.c: Ditto.
-
--2009-12-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-+2009-12-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
-- * libc/machine/arm/machine/endian.h: Remove (Conflicts with
-+ * libc/machine/arm/machine/endian.h: Remove (Conflicts with
- libc/include/machine/endian.h)
-
--2009-12-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-+2009-12-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
-
--2009-12-17 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2009-12-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-
-- * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
-+ * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
- * libc/include/sys/stat.h: Use struct timespec st_*tim,
- blksize_t st_blksize, blkcnt_t st_blocks.
- Add st_*time compatibility macros.
-@@ -69,23 +105,23 @@
- and ETOOMANYREFS into general list as they are referenced
- by OpenGroup and needed by RTEMS.
-
--2009-12-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-+2009-12-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
-
--2009-12-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-+2009-12-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-
-- * libc/sys/rtems/machine/_types.h: New (Derived from
-+ * libc/sys/rtems/machine/_types.h: New (Derived from
- machine/_default_types.h).
-- * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
-+ * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
- * libc/sys/rtems/sys/param.h:
-- Update copyright notice from FreeBSD.
-- Remove HZ.
-- Add #include <sys/priority.h>
-- Remove priority handling (moved to sys/priority.h).
-- Remove CLBYTES (Unused, abandoned in BSD).
-+ Update copyright notice from FreeBSD.
-+ Remove HZ.
-+ Add #include <sys/priority.h>
-+ Remove priority handling (moved to sys/priority.h).
-+ Remove CLBYTES (Unused, abandoned in BSD).
- * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD).
-- Remove CIRCLEQ_*.
-+ Remove CIRCLEQ_*.
-
- 2009-12-15 Conny Marco Menebrocker <c-m-m at gmx.de>
-
-@@ -1666,7 +1702,7 @@
-
- * libc/machine/arm/strcpy.c: Add missing comma.
-
--2009-02-26 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2009-02-26 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/machine/lm32/configure.in: Let
- AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s
-@@ -1852,24 +1888,24 @@
- * libc/string/wcstrings.tex: Ditto.
- * libc/string/Makefile.in: Regenerated.
-
--2008-12-12 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-12-12 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/stdio/fputws.c: Fix documentation.
- * libc/stdio/getwchar.c: Ditto.
- * libc/stdio/putwchar.c: Ditto.
-
--2008-12-12 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-12-12 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
- 200112L (SUSv3 compliance).
- Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
-
--2008-12-12 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-12-12 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(),
- _execve(), _exit().
-
--2008-12-12 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-12-12 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * configure.host: Let *rtems* default to c99-formats.
-
-@@ -2019,7 +2055,7 @@
- <linux/dirent.h>.
- * libc/sys/linux/io64.c: Add weak alias for _stat64.
-
--2008-11-27 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-11-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/posix/telldir.c: Use #if !defined() instead of #ifndef
- to fix GCC warning.
-@@ -2191,17 +2227,17 @@
- * libc/unix/collate.c (__collate_err): simplify to remove unnecessary
- strdup() and strlen() calls, also getting rid of a compiler warning.
-
--2008-11-19 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-11-19 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/sys/config.h: Don't put
- __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
-
--2008-11-19 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-11-19 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/posix/runetype.h: Add include of stddef.h and remove
- defining standard types: size_t and wchar_t.
-
--2008-11-19 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2008-11-19 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/pthread.h: Remove prototypes for
- pthread_attr_getcputime and pthread_attr_setcputime which
-@@ -4256,7 +4292,7 @@
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
-
--2007-08-03 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2007-08-03 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/tar.h: New.
-
-@@ -6241,7 +6277,7 @@
- * libc/include/sys/signal.h (sigdelset, sigfillset, sigismember): New macros.
- (sigaddset, sigemptyset): Add return code.
-
--2006-04-13 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2006-04-13 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * acinclude.m4: New _NEWLIB_VERSION.
- * acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION).
-@@ -6730,7 +6766,7 @@
- * libc/sys/linux/sys/stat.h: Change *stat64 prototypes to
- take a pointer to struct stat64 rather than struct stat.
-
--2005-12-16 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-12-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h: Prefer long over int for int32_t.
- Use __have_long32 to set up int32_t.
-@@ -6759,7 +6795,7 @@
- * libc/include/sys/types.h: Remove the ifdef armour around
- standard POSIX types.
-
--2005-12-06 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-12-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/sys/rtems/crt0.c: Add rtems_gxx_key_create,
- rtems_gxx_key_delete, rtems_gxx_getspecific,
-@@ -6838,7 +6874,7 @@
- * libc/sys/linux/sys/unistd.h (readlink, symlink): New
- prototypes.
-
--2005-11-01 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-11-01 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h: Cleanup #if vs. #ifdef.
-
-@@ -7062,11 +7098,11 @@
- * libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
- to ENOMEM on failure.
-
--2005-10-06 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-10-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h: Add [u]int_fast<N>_t types.
-
--2005-10-04 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-10-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h: Move magic to set __have_long* to the
- beginning. Use #if __have* instead of #if defined(__have*).
-@@ -7082,14 +7118,14 @@
- * libc/sys/linux/include/stdint.h: Include <sys/types.h> and
- incorporate Ralf's change below.
-
--2005-10-03 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-10-03 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h:
- Use __INTMAX_TYPE__ to derive intmax_t.
- Use __UINTMAX_TYPE__ to derive uintmax_t.
- Fix minor typo.
-
--2005-09-27 Ralf Corsepius <ralf.corsepius at rtems.org>
-+2005-09-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly
- handling GCC >= 4.
-@@ -7425,16 +7461,16 @@
- * configure.host (newlib_cflags) <cris-*-*, crisv32-*-*>: Add
- -DCOMPACT_CTYPE.
-
--2005-03-06 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-03-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/sys/rtems/include/inttypes.h: New file.
- * libc/sys/rtems/include/stdint.h: Ditto.
-
--2005-03-06 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-03-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/string/memcmp.c: Fix to avoid pointer signedness warning.
-
--2005-03-06 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-03-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/machine/_types.h: New file.
- * libc/include/sys/types.h: Do not check for __rtems__
-@@ -7443,7 +7479,7 @@
- * libc/sys/rtems/machine/_types.h: Removed. Replaced with
- shared header file.
-
--2005-02-25 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-02-25 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add
- L qualifier for these long constants.
-@@ -7459,13 +7495,13 @@
- * libc/time/strftime.c (strftime): Fix '%x' to deal with negative
- years. Fix '%z' to use long, not int.
-
--2005-02-24 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-02-24 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libm/common/s_fpclassify.c: Use __uint32_t instead of int to
- manipulate float values in integer form.
- * libm/common/sf_round.c: Ditto.
-
--2005-02-24 Ralf Corsepious <ralf.corsepius at rtems.org>
-+2005-02-24 Ralf Corsépius <ralf.corsepius at rtems.org>
-
- * libc/include/sys/types.h [__rtems__]: Include new
- header file machine/_types.h.
-@@ -7829,7 +7865,7 @@
- * libc/stdio/fread.c (fread): Fix return value for unbuffered
- fread.
-
--2004-10-25 Ralf Corsepius <corsepiu at faw.uni-ulm.de>
-+2004-10-25 Ralf Corsépius <corsepiu at faw.uni-ulm.de>
-
- * libc/include/machine/setjmp.h: Add AVR support.
- * libc/sys/rtems/crt0.S [__AVR__]: Add __stack.
-@@ -14061,7 +14097,7 @@
-
- * libc/include/sys/unistd.h: Prototype chroot() for RTEMS.
-
--2001-08-29 Ralf Corsepius <corsepiu at faw.uni-ulm.de>
-+2001-08-29 Ralf Corsépius <corsepiu at faw.uni-ulm.de>
-
- * libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S,
- libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c,
-@@ -14738,7 +14774,7 @@
- * libc/sys/linux/sys/utsname.h: Ditto.
- * libc/sys/linux/sys/wait.h: Ditto.
-
--2000-12-08 Ralf Corsepius <corsepiu at faw.uni-ulm.de>
-+2000-12-08 Ralf Corsépius <corsepiu at faw.uni-ulm.de>
-
- * Makefile.am: $(INSTALL), $(INSTALL_DATA), and $(INSTALL_PROGRAM)
- can be a relative path to $(top_srcdir)/install.sh so ensure the
-@@ -15643,7 +15679,7 @@
- * libc/include/stdlib.h: add ptsname, grantpt, unlockpt to cygwin
- section
-
--Sat Oct 2 02:02:00 MEST 1999 Ralf Corsepius <corsepiu at faw.uni-ulm.de>
-+Sat Oct 2 02:02:00 MEST 1999 Ralf Corsépius <corsepiu at faw.uni-ulm.de>
-
- * libc/machine/sh/asm.h: Added __SH4_SINGLE__ to DELAYED_BRANCHES
- * libc/machine/sh/memcpy.S: Fix line wrapping in SL macro
-diff -Naur newlib-1.18.0.orig/newlib/ChangeLog.rtems newlib-1.18.0-rtems4.10-20110518/newlib/ChangeLog.rtems
---- newlib-1.18.0.orig/newlib/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/ChangeLog.rtems 2011-05-18 14:27:09.026560247 +0200
-@@ -0,0 +1,301 @@
-+2011-01-14 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/common/s_ilogb.c, libm/common/s_llround.c,
-+ libm/common/s_log2.c, libm/common/s_lrint.c,
-+ libm/common/s_lround.c, libm/common/s_rint.c,
-+ libm/common/sf_ilogb.c, libm/common/sf_log2.c,
-+ libm/common/sf_rint.c: Import from newlib-cvs.
-+
-+2011-01-14 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/common/fdlibm.h:
-+ Add SAFE_LEFT_SHIFT, SAFE_RIGHT_SHIFT from newlib-cvs.
-+
-+2011-01-07 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/stdio/open_memstream.c: Replace 64 * 1024 with 0x10000 to
-+ avoid integer overflow on h8300.
-+
-+2011-01-05 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/common/s_llrint.c: Back-port from newlib-cvs.
-+
-+2011-01-05 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/stdio/tmpnam.c: Include <stdint.h>.
-+ Use intptr_t instead of _POINTER_INT for improved portability.
-+ * libc/misc/__dprintf.c: Include <stdint.h>
-+ Use intptr_t instead of _POINTER_INT for improved portability.
-+
-+2011-01-05 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/common/s_round.c: Cast const int to __int32_t.
-+
-+2011-01-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * doc/makedoc.c: Add cludge to make makedoc 64bit compliant.
-+
-+2011-01-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libm/math/e_scalb.c: Include <limits.h>.
-+ Don't rely on 65000 being a valid int.
-+
-+2011-01-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/posix/readdir.c: Include <stdint.h>.
-+ Cast to intptr_t instead of int.
-+
-+2011-01-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/string/memccpy.c, libc/string/memchr.c,
-+ libc/string/memcmp.c, libc/string/memcpy.c,
-+ libc/string/memmove.c, libc/string/mempcpy.c,
-+ libc/string/memset.c, libc/string/stpcpy.c,
-+ libc/string/stpncpy.c, libc/string/strcpy.c,
-+ libc/string/strlen.c, libc/string/strncat.c,
-+ libc/string/strncpy.c (UNALIGNED):
-+ Include <stdint.h>.
-+ Cast to intptr_t instead of long.
-+
-+2011-01-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/stdio/open_memstream.c (internal_open_memstream_r):
-+ Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
-+
-+2010-10-05 Eric Blake <eblake at redhat.com>
-+
-+ memmem, strstr, strcasestr: fix bug with long periodic needle
-+ * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
-+ periodic needle having false positive.
-+
-+2010-08-24 Sebastian Huber <sebastian.huber at embedded-brains.de>
-+
-+ * libc/posix/opendir.c: Added missing memory free.
-+
-+2010-08-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ PR 1475/newlib:
-+ * libc/include/stdint.h: Fall back to compute SIZE_MAX based on
-+ __SIZEOF_SIZE_T__ and __CHAR_BIT__ if available.
-+
-+2010-08-04 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/string/strcat.c:
-+ Include <stdint.h>. Use uintptr_t instead of long in ALIGNED.
-+ * libc/string/strchr.c, libc/string/strcmp.c, libc/string/strncmp.c:
-+ Include <stdint.h>. Use uintptr_t instead of long in UNALIGNED.
-+ * libc/include/sys/unistd.h: Activate decls for
-+ getsid, setegid, seteuid.
-+
-+2010-07-08 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags.
-+ * libc/string/index.c, libc/string/rindex.c: Include <string.h>.
-+ * libc/stdlib/putenv_r.c: Include <strings.h>
-+
-+2010-07-06 Corinna Vinschen <corinna at vinschen.de>
-+
-+ * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t.
-+ * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype.
-+
-+2010-06-17 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: Special case for sparc64.
-+
-+2010-04-23 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: Add _mode_t.
-+ * libc/include/sys/types.h: Derive mode_t from _mode_t.
-+
-+2010-04-02 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/sched.h, libc/include/sys/sched.h:
-+ Adopt newlib-cvs's versions.
-+
-+2010-03-25 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/strings.h: New (split-out from string.h).
-+ * libc/include/string.h: Remove bcmp, bcopy, bzero, ffs, index, rindex,
-+ strcasecmp, strncasecmp (Moved to strings.h).
-+ Remove strcmpi, stricmp, strncmpi, strnicmp.
-+ * libc/misc/ffs.c: Use <strings.h> instead of <string.h>.
-+ * libc/string/bcmp.c: Use <strings.h> instead of <string.h>.
-+ * libc/string/bzero.c: Use <strings.h> instead of <string.h>.
-+ * libc/string/rindex.c: Use <strings.h> instead of <string.h>.
-+ * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>.
-+ * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>.
-+
-+2010-03-23 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: Add i386 to 64bit off_t targets.
-+
-+2010-03-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/posix/telldir.c: Adopt newlib-cvs's telldir.c
-+
-+2010-02-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: Use __int64_t for _off_t, fpos_t for
-+ selected targets.
-+
-+2010-02-05 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/posix/telldir.c: Remove bogus nested prototype of lseek().
-+
-+2010-01-11 Sebastian Huber <sebastian.huber at embedded-brains.de>
-+
-+ * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
-+
-+2009-12-18 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/search/db_local.h:
-+ Use __uint32_t instead of u_int (prototype mismatches).
-+ * libc/search/extern.h (__buf_init):
-+ Use __uint32_t instead of int (16 bit target portability).
-+ * libc/search/hash_buf.c: Use ptrdiff_t instead of __uint32_t,
-+ use __uint32_t instead of int (16 bit target portability).
-+ * libc/search/hash.h: Use __uint32_it instead of int
-+ (16 bit target portability).
-+ * libm/common/modfl.c: Add cast to (double*) to avoid GCC warning.
-+ * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit
-+ casts to __uint32_t to avoid overflows on implicit casts.
-+
-+2009-12-18 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ Merger with newlib-1.18.0.
-+
-+2009-10-29 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: Rework.
-+ * libc/sys/rtems/machine/stdint.h: Remove.
-+ * libc/include/inttypes.h:
-+ Rework logic to determine PRI*PTR.
-+ Prefer long64 over longlong64.
-+ * libc/include/machine/_default_types.h:
-+ Sync logic for __int32 with stdint.h (Prefer long over int).
-+ * libc/include/stdint.h:
-+ Remove __SPU__ hack.
-+ Prefer int for int16_t (sync with _default_types.h).
-+ Rework intptr_t determination.
-+
-+2009-10-28 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/_types.h: New.
-+ Add custom time for _ssize_t.
-+ * libc/stdlib/assert.c: Sync with newlib-CVS.
-+ * configure.host: Add -DHAVE_ASSERT_FUNC to newlib_cflags.
-+
-+2009-10-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/sys/pthread.h:
-+ Add pthread_atfork (Mandated by IEEE Std 1003.1-2008).
-+ Add pthread_rwlock_unlock (Formerly missing)
-+
-+2009-10-26 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/sys/signal.h: Sync with newlib-CVS.
-+
-+2009-10-09 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/sys/signal.h: Use pid_t as 1st arg to kill()
-+ (mandated by POSIX).
-+
-+2009-09-22 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD).
-+ Remove CIRCLEQ_*.
-+ * libc/search/hcreate.c: Don't include sys/queue.h.
-+
-+2009-09-18 Christopher Faylor <me+cygwin at cgf.cx>
-+
-+ * libc/include/sys/unistd.h: Declare getpagesize as returning
-+ POSIX-mandated int.
-+
-+2009-09-15 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/stdlib.h: Add posix_memalign.
-+
-+2009-09-11 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure.host (m32c): Remove -D_ABORT_PROVIDED.
-+
-+2009-09-10 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure.host: Add -D_NO_POPEN.
-+ * libc/sys/rtems/crt0.c: Don't provide waitpid unless used.
-+
-+2009-09-09 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure.host: Add -D_NO_WORDEXP.
-+
-+2009-09-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/crt0.c: Add issetugid.
-+
-+2009-09-02 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
-+
-+2009-07-27 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/crt0.c: Add _isatty_r.
-+
-+2009-07-06 Joel Sherrill <joel.sherrill at oarcorp.com>
-+
-+ * libc/include/sys/features.h: Define _UNIX98_THREAD_MUTEX_ATTRIBUTES.
-+
-+2009-05-05 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * configure.host: Remove -DMISSING_SYSCALL_NAMES.
-+
-+2009-03-11 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/stdlib/assert.c: Don't build __assert_func.
-+ * libc/sys/rtems/crt0.c: Add __assert_func.
-+
-+2009-03-09 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/machine/powerpc/times.c: Remove.
-+ * libc/machine/powerpc/Makefile.am: Remove times.c.
-+ * libc/machine/powerpc/Makefile.in: Regenerate.
-+
-+2009-02-24 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/unix/ttyname.c: Sync with newlib-cvs.
-+ * configure.host: Add -DHAVE_BLKSIZE to newlib_cflags.
-+
-+2009-02-22 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/machine/stdint.h: Add __lm32__.
-+ * libc/machine/lm32/configure.in: Set AC_CONFIG_SRC to setjmp.S.
-+ * libc/machine/lm32/configure: Regenerate.
-+
-+2009-02-20 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/unix/Makefile.in: Regenerate.
-+
-+2009-02-20 Craig Howland <howland at LGSInnovations.com> on behalf of
-+ Sebastian Huber <sebastian.huber at embedded-brains.de>
-+
-+ * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid
-+ coupling ttyname_r() and ttyname() due to the latter's large buffer).
-+ * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in
-+ ttyname.c.
-+ * libc/unix/ttyname.h: New file (common size definition for the 2
-+ ttyname*c files that are now split).
-+ * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c.
-+
-+2009-02-16 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/sys/rtems/sys/param.h:
-+ Update copyright notice from FreeBSD.
-+ Remove HZ.
-+ Add #include <sys/priority.h>
-+ Remove priority handling (moved to sys/priority.h).
-+ Remove CLBYTES (Unused, abandoned in BSD).
-+
-+2009-02-06 Ralf Corsépius <ralf.corsepius at rtems.org>
-+
-+ * libc/include/sched.h:
-+ Remove (collides with RTEMS's schedul.h).
-+
-diff -Naur newlib-1.18.0.orig/newlib/configure.host newlib-1.18.0-rtems4.10-20110518/newlib/configure.host
---- newlib-1.18.0.orig/newlib/configure.host 2009-12-10 18:12:11.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/configure.host 2011-05-18 14:27:09.027560262 +0200
-@@ -556,6 +556,7 @@
- *-*-rtems*)
- default_newlib_io_long_long="yes"
- default_newlib_io_c99_formats="yes"
-+ newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
- newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
- # turn off unsupported items in posix directory
- newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN"
-diff -Naur newlib-1.18.0.orig/newlib/doc/makedoc.c newlib-1.18.0-rtems4.10-20110518/newlib/doc/makedoc.c
---- newlib-1.18.0.orig/newlib/doc/makedoc.c 2009-03-25 22:16:04.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/doc/makedoc.c 2011-05-18 14:27:09.027560262 +0200
-@@ -57,7 +57,7 @@
- {
- char *ptr;
- unsigned int write_idx;
-- unsigned int size;
-+ size_t size;
- } string_type;
-
-
-@@ -68,7 +68,7 @@
-
- static void DEFUN(init_string_with_size,(buffer, size),
- string_type *buffer AND
-- unsigned int size )
-+ size_t size )
- {
- buffer->write_idx = 0;
- buffer->size = size;
-@@ -219,8 +219,8 @@
- stinst_type *pc;
- stinst_type sstack[STACK];
- stinst_type *ssp = &sstack[0];
--int istack[STACK];
--int *isp = &istack[0];
-+long istack[STACK];
-+long *isp = &istack[0];
-
- typedef int *word_type;
-
-@@ -270,7 +270,7 @@
- {
- isp++;
- pc++;
-- *isp = (int)(*pc);
-+ *isp = (long)(*pc);
- pc++;
-
- }
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/inttypes.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/inttypes.h
---- newlib-1.18.0.orig/newlib/libc/include/inttypes.h 2009-01-19 23:02:06.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/inttypes.h 2011-05-18 14:27:09.028560277 +0200
-@@ -242,15 +242,17 @@
- #define SCNxMAX __SCNMAX(x)
-
- /* ptr types */
--#if __have_long64
--#define __PRIPTR(x) __STRINGIFY(l##x)
--#define __SCNPTR(x) __STRINGIFY(l##x)
--#elif __have_longlong64
--#define __PRIPTR(x) __STRINGIFY(ll##x)
--#define __SCNPTR(x) __STRINGIFY(ll##x)
-+#if INTPTR_MAX == INT64_MAX
-+#define __PRIPTR(x) __PRI64(x)
-+#define __SCNPTR(x) __SCN64(x)
-+#elif INTPTR_MAX == INT32_MAX
-+#define __PRIPTR(x) __PRI32(x)
-+#define __SCNPTR(x) __SCN32(x)
-+#elif INTPTR_MAX == INT16_MAX
-+#define __PRIPTR(x) __PRI16(x)
-+#define __SCNPTR(x) __SCN16(x)
- #else
--#define __PRIPTR(x) __STRINGIFY(x)
--#define __SCNPTR(x) __STRINGIFY(x)
-+#error cannot determine PRI*PTR
- #endif
-
- #define PRIdPTR __PRIPTR(d)
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/machine/_default_types.h
---- newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h 2008-06-12 00:14:54.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/machine/_default_types.h 2011-05-18 14:27:09.028560277 +0200
-@@ -54,14 +54,14 @@
- #endif
- #endif
-
--#if __EXP(INT_MAX) == 0x7fffffffL
--typedef signed int __int32_t;
--typedef unsigned int __uint32_t;
--#define ___int32_t_defined 1
--#elif __EXP(LONG_MAX) == 0x7fffffffL
-+#if __EXP(LONG_MAX) == 0x7fffffffL
- typedef signed long __int32_t;
- typedef unsigned long __uint32_t;
- #define ___int32_t_defined 1
-+#elif __EXP(INT_MAX) == 0x7fffffffL
-+typedef signed int __int32_t;
-+typedef unsigned int __uint32_t;
-+#define ___int32_t_defined 1
- #elif __EXP(SHRT_MAX) == 0x7fffffffL
- typedef signed short __int32_t;
- typedef unsigned short __uint32_t;
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/sched.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sched.h
---- newlib-1.18.0.orig/newlib/libc/include/sched.h 2007-09-21 23:02:15.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sched.h 2011-05-18 14:27:09.028560277 +0200
-@@ -1,11 +1,94 @@
-+/*
-+ * Written by Joel Sherrill <joel at OARcorp.com>.
-+ *
-+ * 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$
-+ */
-+
- #ifndef _SCHED_H_
- #define _SCHED_H_
-
-+#include <sys/types.h>
-+#include <sys/sched.h>
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-
--#include <sys/sched.h>
-+#if defined(_POSIX_PRIORITY_SCHEDULING)
-+/*
-+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803
-+ */
-+int sched_setparam(
-+ pid_t __pid,
-+ const struct sched_param *__param
-+);
-+
-+/*
-+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800
-+ */
-+int sched_getparam(
-+ pid_t __pid,
-+ struct sched_param *__param
-+);
-+
-+/*
-+ * XBD 13 - Set Scheduling Policy and Scheduling Parameters,
-+ * P1003.1b-2008, p. 1805
-+ */
-+int sched_setscheduler(
-+ pid_t __pid,
-+ int __policy,
-+ const struct sched_param *__param
-+);
-+
-+/*
-+ * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801
-+ */
-+int sched_getscheduler(
-+ pid_t __pid
-+);
-+
-+/*
-+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799
-+ */
-+int sched_get_priority_max(
-+ int __policy
-+);
-+
-+int sched_get_priority_min(
-+ int __policy
-+);
-+
-+/*
-+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802
-+ */
-+int sched_rr_get_interval(
-+ pid_t __pid,
-+ struct timespec *__interval
-+);
-+#endif /* _POSIX_PRIORITY_SCHEDULING */
-+
-+#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING)
-+
-+/*
-+ * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807
-+ */
-+int sched_yield( void );
-+
-+#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */
-
- #ifdef __cplusplus
- }
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/stdint.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/stdint.h
---- newlib-1.18.0.orig/newlib/libc/include/stdint.h 2009-04-24 23:55:07.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/stdint.h 2011-05-18 14:27:09.028560277 +0200
-@@ -33,7 +33,7 @@
- /* Check if "long" is 64bit or 32bit wide */
- #if __STDINT_EXP(LONG_MAX) > 0x7fffffff
- #define __have_long64 1
--#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
-+#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff
- #define __have_long32 1
- #endif
-
-@@ -49,14 +49,14 @@
- #define __int_least8_t_defined 1
- #endif
-
--#if __STDINT_EXP(SHRT_MAX) == 0x7fff
--typedef signed short int16_t;
--typedef unsigned short uint16_t;
--#define __int16_t_defined 1
--#elif __STDINT_EXP(INT_MAX) == 0x7fff
-+#if __STDINT_EXP(INT_MAX) == 0x7fff
- typedef signed int int16_t;
- typedef unsigned int uint16_t;
- #define __int16_t_defined 1
-+#elif __STDINT_EXP(SHRT_MAX) == 0x7fff
-+typedef signed short int16_t;
-+typedef unsigned short uint16_t;
-+#define __int16_t_defined 1
- #elif __STDINT_EXP(SCHAR_MAX) == 0x7fff
- typedef signed char int16_t;
- typedef unsigned char uint16_t;
-@@ -239,6 +239,29 @@
- * GCC doesn't provide an appropriate macro for [u]intptr_t
- * For now, use __PTRDIFF_TYPE__
- */
-+#if defined(__SIZEOF_POINTER__)
-+#if __SIZEOF_POINTER__ == 8
-+ typedef int64_t intptr_t;
-+ typedef uint64_t uintptr_t;
-+#define INTPTR_MAX INT64_MAX
-+#define INTPTR_MIN INT64_MIN
-+#define UINTPTR_MAX UINT64_MAX
-+#elif __SIZEOF_POINTER__ == 4
-+ typedef int32_t intptr_t;
-+ typedef uint32_t uintptr_t;
-+#define INTPTR_MAX INT32_MAX
-+#define INTPTR_MIN INT32_MIN
-+#define UINTPTR_MAX UINT32_MAX
-+#elif __SIZEOF_POINTER__ == 2
-+ typedef int16_t intptr_t;
-+ typedef uint16_t uintptr_t;
-+#define INTPTR_MAX INT16_MAX
-+#define INTPTR_MIN INT16_MIN
-+#define UINTPTR_MAX UINT16_MAX
-+#else
-+#error cannot determine intptr_t
-+#endif
-+#else
- #if defined(__PTRDIFF_TYPE__)
- typedef signed __PTRDIFF_TYPE__ intptr_t;
- typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
-@@ -260,6 +283,7 @@
- #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1)
- #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
- #endif
-+#endif
-
- /* Limits of Specified-Width Integer Types */
-
-@@ -408,6 +432,8 @@
- /* This must match size_t in stddef.h, currently long unsigned int */
- #ifdef __SIZE_MAX__
- #define SIZE_MAX __SIZE_MAX__
-+#elif defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__)
-+#define SIZE_MAX (((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1) * 2 + 1)
- #else
- #define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
- #endif
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/string.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/string.h
---- newlib-1.18.0.orig/newlib/libc/include/string.h 2008-06-18 17:27:27.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/string.h 2011-05-18 14:27:09.028560277 +0200
-@@ -49,18 +49,11 @@
- #ifndef __STRICT_ANSI__
- char *_EXFUN(strtok_r,(char *, const char *, char **));
-
--int _EXFUN(bcmp,(const void *, const void *, size_t));
--void _EXFUN(bcopy,(const void *, void *, size_t));
--void _EXFUN(bzero,(void *, size_t));
--int _EXFUN(ffs,(int));
--char *_EXFUN(index,(const char *, int));
- _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
- _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
- _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t));
--char *_EXFUN(rindex,(const char *, int));
- char *_EXFUN(stpcpy,(char *, const char *));
- char *_EXFUN(stpncpy,(char *, const char *, size_t));
--int _EXFUN(strcasecmp,(const char *, const char *));
- char *_EXFUN(strcasestr,(const char *, const char *));
- char *_EXFUN(strdup,(const char *));
- char *_EXFUN(_strdup_r,(struct _reent *, const char *));
-@@ -69,7 +62,6 @@
- char *_EXFUN(strerror_r,(int, char *, size_t));
- size_t _EXFUN(strlcat,(char *, const char *, size_t));
- size_t _EXFUN(strlcpy,(char *, const char *, size_t));
--int _EXFUN(strncasecmp,(const char *, const char *, size_t));
- size_t _EXFUN(strnlen,(const char *, size_t));
- char *_EXFUN(strsep,(char **, const char *));
- char *_EXFUN(strlwr,(char *));
-@@ -81,20 +73,6 @@
- int _EXFUN(strtosigno, (const char *__name));
- #endif
-
--/* These function names are used on Windows and perhaps other systems. */
--#ifndef strcmpi
--#define strcmpi strcasecmp
--#endif
--#ifndef stricmp
--#define stricmp strcasecmp
--#endif
--#ifndef strncmpi
--#define strncmpi strncasecmp
--#endif
--#ifndef strnicmp
--#define strnicmp strncasecmp
--#endif
--
- #endif /* ! __STRICT_ANSI__ */
-
- #include <sys/string.h>
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/strings.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/strings.h
---- newlib-1.18.0.orig/newlib/libc/include/strings.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/strings.h 2011-05-18 14:27:09.029560292 +0200
-@@ -0,0 +1,44 @@
-+/*
-+ * strings.h
-+ *
-+ * Definitions for string operations.
-+ */
-+
-+#ifndef _STRINGS_H_
-+#define _STRINGS_H_
-+
-+#include "_ansi.h"
-+#include <sys/reent.h>
-+
-+#include <sys/types.h> /* for size_t */
-+#include <locale.h> /* for locale_t */
-+
-+_BEGIN_STD_C
-+
-+#ifndef __STRICT_ANSI__
-+/*
-+ * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004
-+ * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008
-+ */
-+int _EXFUN(bcmp,(const void *, const void *, size_t));
-+void _EXFUN(bcopy,(const void *, void *, size_t));
-+void _EXFUN(bzero,(void *, size_t));
-+char *_EXFUN(index,(const char *, int));
-+char *_EXFUN(rindex,(const char *, int));
-+#endif /* ! __STRICT_ANSI__ */
-+
-+int _EXFUN(ffs,(int));
-+int _EXFUN(strcasecmp,(const char *, const char *));
-+#if 0
-+/* Not implemented */
-+int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t));
-+#endif
-+int _EXFUN(strncasecmp,(const char *, const char *, size_t));
-+#if 0
-+/* Not implemented */
-+int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t));
-+#endif
-+
-+_END_STD_C
-+
-+#endif /* _STRINGS_H_ */
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/features.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/features.h
---- newlib-1.18.0.orig/newlib/libc/include/sys/features.h 2009-07-06 20:59:04.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/features.h 2011-05-18 14:27:09.029560292 +0200
-@@ -33,7 +33,7 @@
- #define _POSIX_VERSION 199309L
- #define _POSIX_ASYNCHRONOUS_IO 1
- #define _POSIX_FSYNC 1
--#define _POSIX_MAPPED_FILES 1
-+/* #define _POSIX_MAPPED_FILES 1 */
- #define _POSIX_MEMLOCK 1
- #define _POSIX_MEMLOCK_RANGE 1
- #define _POSIX_MEMORY_PROTECTION 1
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/sched.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/sched.h
---- newlib-1.18.0.orig/newlib/libc/include/sys/sched.h 2002-06-20 21:51:24.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/sched.h 2011-05-18 14:27:09.029560292 +0200
-@@ -1,7 +1,7 @@
- /*
- * Written by Joel Sherrill <joel at OARcorp.com>.
- *
-- * COPYRIGHT (c) 1989-2000.
-+ * COPYRIGHT (c) 1989-2010.
- * On-Line Applications Research Corporation (OAR).
- *
- * Permission to use, copy, modify, and distribute this software for any
-@@ -14,51 +14,53 @@
- * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
- * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- *
-- * $Id$
-+ * $Id$
- */
-
-
--#ifndef __POSIX_SYS_SCHEDULING_h
--#define __POSIX_SYS_SCHEDULING_h
-+#ifndef _SYS_SCHED_H_
-+#define _SYS_SCHED_H_
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
--#include <sys/unistd.h>
--
--#include <sys/types.h>
--#include <sys/time.h>
--
--/* Scheduling Policies, P1003.1b-1993, p. 250
-- NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */
--
-+/* Scheduling Policies */
-+/* Open Group Specifications Issue 6 */
-+#if defined(__CYGWIN__)
-+#define SCHED_OTHER 3
-+#else
- #define SCHED_OTHER 0
-+#endif
-+
- #define SCHED_FIFO 1
- #define SCHED_RR 2
-
- #if defined(_POSIX_SPORADIC_SERVER)
--#define SCHED_SPORADIC 3
-+#define SCHED_SPORADIC 4
- #endif
-
--/* Scheduling Parameters, P1003.1b-1993, p. 249
-- NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */
-+/* Scheduling Parameters */
-+/* Open Group Specifications Issue 6 */
-
- struct sched_param {
- int sched_priority; /* Process execution scheduling priority */
-
--#if defined(_POSIX_SPORADIC_SERVER)
-- int ss_low_priority; /* Low scheduling priority for sporadic */
-+#if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER)
-+ int sched_ss_low_priority; /* Low scheduling priority for sporadic */
- /* server */
-- struct timespec ss_replenish_period;
-+ struct timespec sched_ss_repl_period;
- /* Replenishment period for sporadic server */
-- struct timespec ss_initial_budget; /* Initial budget for sporadic server */
-+ struct timespec sched_ss_init_budget;
-+ /* Initial budget for sporadic server */
-+ int sched_ss_max_repl; /* Maximum pending replenishments for */
-+ /* sporadic server */
- #endif
- };
-
- #ifdef __cplusplus
- }
--#endif
-+#endif
-
- #endif
- /* end of include file */
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/types.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/types.h
---- newlib-1.18.0.orig/newlib/libc/include/sys/types.h 2009-09-28 18:42:21.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/sys/types.h 2011-05-18 14:27:09.029560292 +0200
-@@ -176,7 +176,11 @@
- #endif
- typedef _ssize_t ssize_t;
-
--#ifndef __CYGWIN__
-+#if defined(__rtems__)
-+typedef _mode_t mode_t;
-+#endif
-+
-+#if !defined(__CYGWIN__) && !defined(__rtems__)
- #ifdef __MS_types__
- typedef char * addr_t;
- typedef int mode_t;
-diff -Naur newlib-1.18.0.orig/newlib/libc/include/time.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/time.h
---- newlib-1.18.0.orig/newlib/libc/include/time.h 2008-10-16 23:53:58.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/include/time.h 2011-05-18 14:27:09.029560292 +0200
-@@ -212,7 +212,11 @@
- the identifier of the CPU_time clock associated with the PROCESS
- making the function call. */
-
-+#if defined(__rtems__) && !defined( __STRICT_ANSI__)
-+/* Don't use: Removed in rtems > 4.10 */
- #define CLOCK_PROCESS_CPUTIME (clockid_t)2
-+#endif
-+#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2
-
- #endif
-
-@@ -222,7 +226,11 @@
- the identifier of the CPU_time clock associated with the THREAD
- making the function call. */
-
-+#if defined(__rtems__) && !defined( __STRICT_ANSI__)
-+/* Don't use: Removed in rtems > 4.10 */
- #define CLOCK_THREAD_CPUTIME (clockid_t)3
-+#endif
-+#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3
-
- #endif
-
-diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/Makefile.am
---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am 2007-05-24 19:33:35.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/Makefile.am 2011-05-18 14:27:09.029560292 +0200
-@@ -10,7 +10,7 @@
-
- AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
-
--lib_a_SOURCES = setjmp.S times.c
-+lib_a_SOURCES = setjmp.S
- lib_a_CCASFLAGS=$(AM_CCASFLAGS)
- lib_a_CFLAGS=$(AM_CFLAGS)
- lib_a_LIBADD = @extra_objs@
-diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/Makefile.in
---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in 2009-10-21 00:44:03.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/Makefile.in 2011-05-18 14:27:09.030560307 +0200
-@@ -51,7 +51,7 @@
- LIBRARIES = $(noinst_LIBRARIES)
- ARFLAGS = cru
- lib_a_AR = $(AR) $(ARFLAGS)
--am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT)
-+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT)
- lib_a_OBJECTS = $(am_lib_a_OBJECTS)
- DEFAULT_INCLUDES = -I. at am__isrc@
- depcomp =
-@@ -173,7 +173,7 @@
- AM_CCASFLAGS = $(INCLUDES)
- noinst_LIBRARIES = lib.a
- AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
--lib_a_SOURCES = setjmp.S times.c
-+lib_a_SOURCES = setjmp.S
- lib_a_CCASFLAGS = $(AM_CCASFLAGS)
- lib_a_CFLAGS = $(AM_CFLAGS)
- lib_a_LIBADD = @extra_objs@
-@@ -184,7 +184,7 @@
- all: all-am
-
- .SUFFIXES:
--.SUFFIXES: .S .c .o .obj
-+.SUFFIXES: .S .o .obj
- am--refresh:
- @:
- $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
-@@ -245,18 +245,6 @@
- lib_a-setjmp.obj: setjmp.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
-
--.c.o:
-- $(COMPILE) -c $<
--
--.c.obj:
-- $(COMPILE) -c `$(CYGPATH_W) '$<'`
--
--lib_a-times.o: times.c
-- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c
--
--lib_a-times.obj: times.c
-- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi`
--
- ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/times.c
---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c 2002-07-22 22:26:51.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/machine/powerpc/times.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,36 +0,0 @@
--/* Time support routines for PowerPC.
-- *
-- * Written by Aldy Hernandez.
-- */
--
--#include <_ansi.h>
--#include <reent.h>
--#include <sys/time.h>
--#include <sys/times.h>
--#include <sys/resource.h>
--
--clock_t
--times (struct tms *tp)
--{
-- struct rusage usage;
-- union {
-- struct rusage r;
-- /* Newlib's rusage has only 2 fields. We need to make room for
-- when we call the system's rusage. This should be enough. */
-- int filler[32];
-- } host_ru;
--
-- getrusage (RUSAGE_SELF, (void *)&host_ru);
--
-- if (tp)
-- {
-- tp->tms_utime = host_ru.r.ru_utime.tv_sec * 1000
-- + host_ru.r.ru_utime.tv_usec;
-- tp->tms_stime = host_ru.r.ru_stime.tv_sec * 1000
-- + host_ru.r.ru_stime.tv_usec;
-- tp->tms_cutime = 0; /* user time, children */
-- tp->tms_cstime = 0; /* system time, children */
-- }
--
-- return tp->tms_utime;
--}
-diff -Naur newlib-1.18.0.orig/newlib/libc/misc/__dprintf.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/misc/__dprintf.c
---- newlib-1.18.0.orig/newlib/libc/misc/__dprintf.c 2008-12-11 18:27:55.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/misc/__dprintf.c 2011-05-18 14:27:09.034560370 +0200
-@@ -5,6 +5,7 @@
- */
-
- #include <_ansi.h>
-+#include <stdint.h>
- #include "ctype.h"
- #include "reent.h"
- #include "string.h"
-@@ -131,7 +132,7 @@
- write_string (unctrl (c));
- break;
- case 'p' :
-- l = (_POINTER_INT) va_arg (args, char *);
-+ l = (intptr_t) va_arg (args, char *);
- print_number (16, 1, l);
- break;
- case 'd' :
-diff -Naur newlib-1.18.0.orig/newlib/libc/misc/ffs.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/misc/ffs.c
---- newlib-1.18.0.orig/newlib/libc/misc/ffs.c 2003-06-06 21:57:51.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/misc/ffs.c 2011-05-18 14:27:09.034560370 +0200
-@@ -24,7 +24,7 @@
-
- No supporting OS subroutines are required. */
-
--#include <_ansi.h>
-+#include <strings.h>
-
- int
- _DEFUN(ffs, (word),
-diff -Naur newlib-1.18.0.orig/newlib/libc/posix/opendir.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/opendir.c
---- newlib-1.18.0.orig/newlib/libc/posix/opendir.c 2003-06-06 21:57:51.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/opendir.c 2011-05-18 14:27:09.034560370 +0200
-@@ -74,6 +74,7 @@
- dirp->dd_len = 512;
-
- if (dirp->dd_buf == NULL) {
-+ free(dirp);
- close (fd);
- return NULL;
- }
-diff -Naur newlib-1.18.0.orig/newlib/libc/posix/readdir.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/readdir.c
---- newlib-1.18.0.orig/newlib/libc/posix/readdir.c 2003-06-06 21:57:51.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/readdir.c 2011-05-18 14:27:09.034560370 +0200
-@@ -37,6 +37,7 @@
- static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90";
- #endif /* LIBC_SCCS and not lint */
-
-+#include <stdint.h>
- #include <dirent.h>
-
- extern int getdents (int fd, void *dp, int count);
-@@ -75,7 +76,7 @@
- continue;
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
-- if ((int)dp & 03) { /* bogus pointer check */
-+ if ((intptr_t)dp & 03) { /* bogus pointer check */
- #ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
- #endif
-diff -Naur newlib-1.18.0.orig/newlib/libc/posix/rewinddir.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/rewinddir.c
---- newlib-1.18.0.orig/newlib/libc/posix/rewinddir.c 2003-06-06 21:57:51.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/rewinddir.c 2011-05-18 14:27:09.035560385 +0200
-@@ -48,7 +48,7 @@
- #ifdef HAVE_DD_LOCK
- __lock_acquire_recursive(dirp->dd_lock);
- #endif
-- _seekdir((dirp), (off_t)0);
-+ _seekdir((dirp), 0L);
- #ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
- #endif
-diff -Naur newlib-1.18.0.orig/newlib/libc/posix/telldir.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/telldir.c
---- newlib-1.18.0.orig/newlib/libc/posix/telldir.c 2008-11-27 22:01:40.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/posix/telldir.c 2011-05-18 14:27:09.035560385 +0200
-@@ -67,7 +67,7 @@
- #define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */
- #define LOCHASH(i) ((i)&(NDIRHASH-1))
-
--static long dd_loccnt; /* Index of entry for sequential readdir's */
-+static long dd_loccnt = 1; /* Index of entry for sequential readdir's */
- static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
- __LOCK_INIT(static, dd_hash_lock);
-
-@@ -119,40 +119,46 @@
- register struct ddloc *lp;
- register struct ddloc **prevlp;
- struct dirent *dp;
-- extern long lseek();
-
- #ifdef HAVE_DD_LOCK
- __lock_acquire(dd_hash_lock);
- #endif
-- prevlp = &dd_hash[LOCHASH(loc)];
-- lp = *prevlp;
-- while (lp != NULL) {
-- if (lp->loc_index == loc)
-- break;
-- prevlp = &lp->loc_next;
-- lp = lp->loc_next;
-- }
-- if (lp == NULL) {
-+ if (loc != 0) {
-+ prevlp = &dd_hash[LOCHASH(loc)];
-+ lp = *prevlp;
-+ while (lp != NULL) {
-+ if (lp->loc_index == loc)
-+ break;
-+ prevlp = &lp->loc_next;
-+ lp = lp->loc_next;
-+ }
-+ if (lp == NULL) {
- #ifdef HAVE_DD_LOCK
-- __lock_release(dd_hash_lock);
-+ __lock_release(dd_hash_lock);
- #endif
-- return;
-- }
-- if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)
-- goto found;
-- (void) lseek(dirp->dd_fd, lp->loc_seek, 0);
-- dirp->dd_seek = lp->loc_seek;
-- dirp->dd_loc = 0;
-- while (dirp->dd_loc < lp->loc_loc) {
-- dp = readdir(dirp);
-- if (dp == NULL)
-- break;
-- }
-+ return;
-+ }
-+ if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)
-+ goto found;
-+ (void) lseek(dirp->dd_fd, lp->loc_seek, 0);
-+ dirp->dd_seek = lp->loc_seek;
-+ dirp->dd_loc = 0;
-+ while (dirp->dd_loc < lp->loc_loc) {
-+ dp = readdir(dirp);
-+ if (dp == NULL)
-+ break;
-+ }
- found:
- #ifdef SINGLEUSE
-- *prevlp = lp->loc_next;
-- free((caddr_t)lp);
-+ *prevlp = lp->loc_next;
-+ free((caddr_t)lp);
- #endif
-+ } else {
-+ // loc 0 means rewinding
-+ (void) lseek(dirp->dd_fd, 0, 0);
-+ dirp->dd_seek = 0;
-+ dirp->dd_loc = 0;
-+ }
- #ifdef HAVE_DD_LOCK
- __lock_release(dd_hash_lock);
- #endif
-@@ -169,26 +175,26 @@
- __lock_acquire(dd_hash_lock);
- #endif
- for (i = 0; i < NDIRHASH; ++i) {
-+ struct ddloc head;
- register struct ddloc *lp;
- register struct ddloc *prevlp;
-+
- lp = dd_hash[i];
-- while (lp != NULL && lp->loc_dirp == dirp) {
-- dd_hash[i] = lp->loc_next;
-- prevlp = lp;
-- free((caddr_t)lp);
-- lp = prevlp->loc_next;
-- }
-- prevlp = lp;
-+ head.loc_next = lp;
-+ prevlp = &head;
- while (lp != NULL) {
-- lp = lp->loc_next;
-- if (lp != NULL && lp->loc_dirp == dirp) {
-- prevlp->loc_next = lp->loc_next;
-+ struct ddloc *nextlp;
-+
-+ nextlp = lp->loc_next;
-+ if (lp->loc_dirp == dirp) {
-+ prevlp->loc_next = nextlp;
- free((caddr_t)lp);
-- lp = prevlp;
- }
- else
- prevlp = lp;
-+ lp = nextlp;
- }
-+ dd_hash[i] = head.loc_next;
- }
- #ifdef HAVE_DD_LOCK
- __lock_release(dd_hash_lock);
-diff -Naur newlib-1.18.0.orig/newlib/libc/search/db_local.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/db_local.h
---- newlib-1.18.0.orig/newlib/libc/search/db_local.h 2002-06-25 01:05:08.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/db_local.h 2011-05-18 14:27:09.035560385 +0200
-@@ -102,11 +102,11 @@
- typedef struct __db {
- DBTYPE type; /* Underlying db type. */
- int (*close)(struct __db *);
-- int (*del)(const struct __db *, const DBT *, u_int);
-- int (*get)(const struct __db *, const DBT *, DBT *, u_int);
-- int (*put)(const struct __db *, DBT *, const DBT *, u_int);
-- int (*seq)(const struct __db *, DBT *, DBT *, u_int);
-- int (*sync)(const struct __db *, u_int);
-+ int (*del)(const struct __db *, const DBT *, __uint32_t);
-+ int (*get)(const struct __db *, const DBT *, DBT *, __uint32_t);
-+ int (*put)(const struct __db *, DBT *, const DBT *, __uint32_t);
-+ int (*seq)(const struct __db *, DBT *, DBT *, __uint32_t);
-+ int (*sync)(const struct __db *, __uint32_t);
- void *internal; /* Access method private. */
- int (*fd)(const struct __db *);
- } DB;
-diff -Naur newlib-1.18.0.orig/newlib/libc/search/extern.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/extern.h
---- newlib-1.18.0.orig/newlib/libc/search/extern.h 2002-06-20 21:51:31.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/extern.h 2011-05-18 14:27:09.035560385 +0200
-@@ -43,7 +43,7 @@
- int __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *,
- int, __uint32_t, SPLIT_RETURN *);
- int __buf_free(HTAB *, int, int);
--void __buf_init(HTAB *, int);
-+void __buf_init(HTAB *, __uint32_t);
- __uint32_t __call_hash(HTAB *, char *, int);
- int __delpair(HTAB *, BUFHEAD *, int);
- int __expand_table(HTAB *);
-diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash_buf.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/hash_buf.c
---- newlib-1.18.0.orig/newlib/libc/search/hash_buf.c 2004-05-26 19:57:10.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/hash_buf.c 2011-05-18 14:27:09.035560385 +0200
-@@ -118,7 +118,7 @@
- int newpage; /* If prev_bp set, indicates a new overflow page. */
- {
- BUFHEAD *bp;
-- __uint32_t is_disk_mask;
-+ ptrdiff_t is_disk_mask;
- int is_disk, segment_ndx;
- SEGMENT segp;
-
-@@ -298,7 +298,7 @@
- extern void
- __buf_init(hashp, nbytes)
- HTAB *hashp;
-- int nbytes;
-+ __uint32_t nbytes;
- {
- BUFHEAD *bfp;
- int npages;
-diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/hash.h
---- newlib-1.18.0.orig/newlib/libc/search/hash.h 2008-07-02 20:38:45.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/search/hash.h 2011-05-18 14:27:09.035560385 +0200
-@@ -82,7 +82,7 @@
-
- /* Hash Table Information */
- typedef struct hashhdr { /* Disk resident portion */
-- int magic; /* Magic NO for hash tables */
-+ __uint32_t magic; /* Magic NO for hash tables */
- int version; /* Version ID */
- __uint32_t lorder; /* Byte Order */
- int bsize; /* Bucket/Page Size */
-@@ -97,7 +97,7 @@
- int high_mask; /* Mask to modulo into entire table */
- int low_mask; /* Mask to modulo into lower half of
- * table */
-- int ffactor; /* Fill factor */
-+ __uint32_t ffactor; /* Fill factor */
- int nkeys; /* Number of keys in hash table */
- int hdrpages; /* Size of table header */
- int h_charkey; /* value of hash(CHARKEY) */
-diff -Naur newlib-1.18.0.orig/newlib/libc/stdio/open_memstream.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdio/open_memstream.c
---- newlib-1.18.0.orig/newlib/libc/stdio/open_memstream.c 2009-02-25 05:00:05.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdio/open_memstream.c 2011-05-18 14:27:09.036560400 +0200
-@@ -330,8 +330,10 @@
- c->max *= sizeof(wchar_t);
- if (c->max < 64)
- c->max = 64;
-- else if (c->max > 64 * 1024)
-- c->max = 64 * 1024;
-+#if (SIZE_MAX >= 0x10000)
-+ else if (c->max > 0x10000)
-+ c->max = 0x10000;
-+#endif
- *size = 0;
- *buf = _malloc_r (ptr, c->max);
- if (!*buf)
-diff -Naur newlib-1.18.0.orig/newlib/libc/stdio/tmpnam.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdio/tmpnam.c
---- newlib-1.18.0.orig/newlib/libc/stdio/tmpnam.c 2004-04-23 22:01:55.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdio/tmpnam.c 2011-05-18 14:27:09.036560400 +0200
-@@ -94,6 +94,7 @@
- #include <_ansi.h>
- #include <reent.h>
- #include <stdio.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <fcntl.h>
-@@ -109,7 +110,7 @@
- char *result _AND
- _CONST char *part1 _AND
- _CONST char *part2 _AND
-- int part3 _AND
-+ intptr_t part3 _AND
- int *part4)
- {
- /* Generate the filename and make sure that there isn't one called
-@@ -183,7 +184,7 @@
- if (filename)
- {
- if (! worker (p, filename, dir, prefix,
-- _getpid_r (p) ^ (int) (_POINTER_INT) p, &p->_inc))
-+ _getpid_r (p) ^ (intptr_t) p, &p->_inc))
- return NULL;
- }
- return filename;
-diff -Naur newlib-1.18.0.orig/newlib/libc/stdlib/putenv_r.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdlib/putenv_r.c
---- newlib-1.18.0.orig/newlib/libc/stdlib/putenv_r.c 2004-11-24 23:34:14.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdlib/putenv_r.c 2011-05-18 14:27:09.036560400 +0200
-@@ -24,6 +24,7 @@
- #include <reent.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <strings.h>
-
- #include "envlock.h"
-
-diff -Naur newlib-1.18.0.orig/newlib/libc/stdlib/strtod.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdlib/strtod.c
---- newlib-1.18.0.orig/newlib/libc/stdlib/strtod.c 2009-12-03 17:11:27.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/stdlib/strtod.c 2011-05-18 14:27:09.036560400 +0200
-@@ -299,15 +299,17 @@
- }
- s0 = s;
- y = z = 0;
-- for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
-- if (nd < 9)
-- y = 10*y + c - '0';
-- else if (nd < 16)
-- z = 10*z + c - '0';
-+ for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) {
-+ if (nd < DBL_DIG + 1) {
-+ if (nd < 9)
-+ y = 10*y + c - '0';
-+ else
-+ z = 10*z + c - '0';
-+ }
-+ }
- nd0 = nd;
- if (strncmp (s, _localeconv_r (ptr)->decimal_point,
-- strlen (_localeconv_r (ptr)->decimal_point)) == 0)
-- {
-+ strlen (_localeconv_r (ptr)->decimal_point)) == 0) {
- decpt = 1;
- c = *(s += strlen (_localeconv_r (ptr)->decimal_point));
- if (!nd) {
-@@ -325,20 +327,28 @@
- have_dig:
- nz++;
- if (c -= '0') {
-- nf += nz;
-- for(i = 1; i < nz; i++)
-- if (nd++ < 9)
-- y *= 10;
-- else if (nd <= DBL_DIG + 1)
-- z *= 10;
-- if (nd++ < 9)
-- y = 10*y + c;
-- else if (nd <= DBL_DIG + 1)
-- z = 10*z + c;
-- nz = 0;
-+ for(i = 1; i < nz; i++) {
-+ if (nd <= DBL_DIG + 1) {
-+ if (nd + i < 10)
-+ y *= 10;
-+ else
-+ z *= 10;
-+ }
- }
-+ if (nd <= DBL_DIG + 1) {
-+ if (nd + i < 10)
-+ y = 10*y + c;
-+ else
-+ z = 10*z + c;
-+ }
-+ if (nd <= DBL_DIG + 1) {
-+ nf += nz;
-+ nd += nz;
-+ }
-+ nz = 0;
- }
- }
-+ }
- dig_done:
- e = 0;
- if (c == 'e' || c == 'E') {
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bcmp.c
---- newlib-1.18.0.orig/newlib/libc/string/bcmp.c 2005-10-28 23:21:07.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bcmp.c 2011-05-18 14:27:09.037560415 +0200
-@@ -6,11 +6,11 @@
- bcmp
-
- ANSI_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
-
- TRAD_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- int bcmp(<[s1]>, <[s2]>, <[n]>)
- const void *<[s1]>;
- const void *<[s2]>;
-@@ -35,7 +35,7 @@
- bcmp ansi pure
- */
-
--#include <string.h>
-+#include <strings.h>
-
- int
- _DEFUN (bcmp, (m1, m2, n),
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcopy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bcopy.c
---- newlib-1.18.0.orig/newlib/libc/string/bcopy.c 2002-05-23 20:46:04.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bcopy.c 2011-05-18 14:27:09.037560415 +0200
-@@ -3,7 +3,7 @@
- <<bcopy>>---copy memory regions
-
- ANSI_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>);
-
- TRAD_SYNOPSIS
-@@ -26,7 +26,7 @@
- bcopy - pure
- */
-
--#include <string.h>
-+#include <strings.h>
-
- void
- _DEFUN (bcopy, (b1, b2, length),
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/bzero.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bzero.c
---- newlib-1.18.0.orig/newlib/libc/string/bzero.c 2002-05-23 20:46:04.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/bzero.c 2011-05-18 14:27:09.037560415 +0200
-@@ -6,11 +6,11 @@
- bzero
-
- ANSI_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- void bzero(void *<[b]>, size_t <[length]>);
-
- TRAD_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- void bzero(<[b]>, <[length]>)
- void *<[b]>;
- size_t <[length]>;
-@@ -30,7 +30,7 @@
- <<bzero>> requires no supporting OS subroutines.
- */
-
--#include <string.h>
-+#include <strings.h>
-
- _VOID
- _DEFUN (bzero, (b, length),
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/index.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/index.c
---- newlib-1.18.0.orig/newlib/libc/string/index.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/index.c 2011-05-18 14:27:09.037560415 +0200
-@@ -10,7 +10,7 @@
- char * index(const char *<[string]>, int <[c]>);
-
- TRAD_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- char * index(<[string]>, <[c]>);
- char *<[string]>;
- int *<[c]>;
-@@ -33,7 +33,8 @@
- index - pure
- */
-
--#include <string.h>
-+#include <strings.h>
-+#include <string.h> /* strchr */
-
- char *
- _DEFUN (index, (s, c),
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memccpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memccpy.c
---- newlib-1.18.0.orig/newlib/libc/string/memccpy.c 2002-07-23 23:38:00.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memccpy.c 2011-05-18 14:27:09.037560415 +0200
-@@ -35,13 +35,14 @@
- */
-
- #include <_ansi.h>
-+#include <stdint.h>
- #include <stddef.h>
- #include <string.h>
- #include <limits.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- /* How many bytes are copied each iteration of the word copy loop. */
- #define LITTLEBLOCKSIZE (sizeof (long))
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memchr.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memchr.c
---- newlib-1.18.0.orig/newlib/libc/string/memchr.c 2008-05-27 01:31:08.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memchr.c 2011-05-18 14:27:09.037560415 +0200
-@@ -38,10 +38,11 @@
-
- #include <_ansi.h>
- #include <string.h>
-+#include <stdint.h>
- #include <limits.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
--#define UNALIGNED(X) ((long)X & (sizeof (long) - 1))
-+#define UNALIGNED(X) ((intptr_t)X & (sizeof (long) - 1))
-
- /* How many bytes are loaded each iteration of the word copy loop. */
- #define LBLOCKSIZE (sizeof (long))
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memcmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memcmp.c
---- newlib-1.18.0.orig/newlib/libc/string/memcmp.c 2005-03-06 21:40:05.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memcmp.c 2011-05-18 14:27:09.037560415 +0200
-@@ -37,11 +37,11 @@
- */
-
- #include <string.h>
--
-+#include <stdint.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- /* How many bytes are copied each iteration of the word copy loop. */
- #define LBLOCKSIZE (sizeof (long))
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memcpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memcpy.c
---- newlib-1.18.0.orig/newlib/libc/string/memcpy.c 2008-12-11 18:27:56.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memcpy.c 2011-05-18 14:27:09.038560431 +0200
-@@ -34,11 +34,12 @@
- */
-
- #include <_ansi.h>
-+#include <stdint.h>
- #include <string.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- /* How many bytes are copied each iteration of the 4X unrolled loop. */
- #define BIGBLOCKSIZE (sizeof (long) << 2)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memmove.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memmove.c
---- newlib-1.18.0.orig/newlib/libc/string/memmove.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memmove.c 2011-05-18 14:27:09.039560447 +0200
-@@ -36,13 +36,14 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
- #include <_ansi.h>
- #include <stddef.h>
- #include <limits.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- /* How many bytes are copied each iteration of the 4X unrolled loop. */
- #define BIGBLOCKSIZE (sizeof (long) << 2)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/mempcpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/mempcpy.c
---- newlib-1.18.0.orig/newlib/libc/string/mempcpy.c 2002-07-23 23:38:00.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/mempcpy.c 2011-05-18 14:27:09.039560447 +0200
-@@ -34,10 +34,11 @@
- #include <stddef.h>
- #include <limits.h>
- #include <string.h>
-+#include <stdint.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
-
- /* How many bytes are copied each iteration of the 4X unrolled loop. */
- #define BIGBLOCKSIZE (sizeof (long) << 2)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/memset.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memset.c
---- newlib-1.18.0.orig/newlib/libc/string/memset.c 2008-05-27 20:44:40.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/memset.c 2011-05-18 14:27:09.039560447 +0200
-@@ -34,9 +34,10 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
-
- #define LBLOCKSIZE (sizeof(long))
--#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
-+#define UNALIGNED(X) ((intptr_t)X & (LBLOCKSIZE - 1))
- #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
-
- _PTR
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/rindex.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/rindex.c
---- newlib-1.18.0.orig/newlib/libc/string/rindex.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/rindex.c 2011-05-18 14:27:09.039560447 +0200
-@@ -10,7 +10,7 @@
- char * rindex(const char *<[string]>, int <[c]>);
-
- TRAD_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- char * rindex(<[string]>, <[c]>);
- char *<[string]>;
- int *<[c]>;
-@@ -33,7 +33,8 @@
- rindex - pure
- */
-
--#include <string.h>
-+#include <strings.h>
-+#include <string.h> /* strchr */
-
- char *
- _DEFUN (rindex, (s, c),
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/stpcpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/stpcpy.c
---- newlib-1.18.0.orig/newlib/libc/string/stpcpy.c 2007-06-28 19:07:23.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/stpcpy.c 2011-05-18 14:27:09.039560447 +0200
-@@ -34,6 +34,7 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
- #include <limits.h>
-
- /*SUPPRESS 560*/
-@@ -41,7 +42,7 @@
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/stpncpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/stpncpy.c
---- newlib-1.18.0.orig/newlib/libc/string/stpncpy.c 2007-06-28 19:07:23.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/stpncpy.c 2011-05-18 14:27:09.039560447 +0200
-@@ -40,6 +40,7 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
- #include <limits.h>
-
- /*SUPPRESS 560*/
-@@ -47,7 +48,7 @@
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcasecmp.c
---- newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c 2009-04-23 20:11:22.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcasecmp.c 2011-05-18 14:27:09.040560463 +0200
-@@ -38,7 +38,7 @@
- strcasecmp
- */
-
--#include <string.h>
-+#include <strings.h>
- #include <ctype.h>
-
- int
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcat.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcat.c
---- newlib-1.18.0.orig/newlib/libc/string/strcat.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcat.c 2011-05-18 14:27:09.040560463 +0200
-@@ -33,12 +33,13 @@
- strcat ansi pure
- */
-
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
- /* Nonzero if X is aligned on a "long" boundary. */
- #define ALIGNED(X) \
-- (((long)X & (sizeof (long) - 1)) == 0)
-+ (((uintptr_t)X & (sizeof (long) - 1)) == 0)
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strchr.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strchr.c
---- newlib-1.18.0.orig/newlib/libc/string/strchr.c 2008-05-22 04:31:46.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strchr.c 2011-05-18 14:27:09.040560463 +0200
-@@ -33,11 +33,12 @@
- strchr ansi pure
- */
-
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
- /* Nonzero if X is not aligned on a "long" boundary. */
--#define UNALIGNED(X) ((long)X & (sizeof (long) - 1))
-+#define UNALIGNED(X) ((uintptr_t)X & (sizeof (long) - 1))
-
- /* How many bytes are loaded each iteration of the word copy loop. */
- #define LBLOCKSIZE (sizeof (long))
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcmp.c
---- newlib-1.18.0.orig/newlib/libc/string/strcmp.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcmp.c 2011-05-18 14:27:09.040560463 +0200
-@@ -35,12 +35,13 @@
- strcmp ansi pure
- */
-
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
-
- /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
- #if LONG_MAX == 2147483647L
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcpy.c
---- newlib-1.18.0.orig/newlib/libc/string/strcpy.c 2007-05-29 23:26:59.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strcpy.c 2011-05-18 14:27:09.040560463 +0200
-@@ -32,6 +32,7 @@
- strcpy ansi pure
- */
-
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
-@@ -40,7 +41,7 @@
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strlen.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strlen.c
---- newlib-1.18.0.orig/newlib/libc/string/strlen.c 2008-05-27 00:56:14.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strlen.c 2011-05-18 14:27:09.040560463 +0200
-@@ -32,11 +32,12 @@
- */
-
- #include <_ansi.h>
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
- #define LBLOCKSIZE (sizeof (long))
--#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
-+#define UNALIGNED(X) ((intptr_t)X & (LBLOCKSIZE - 1))
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncasecmp.c
---- newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c 2009-04-23 20:11:22.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncasecmp.c 2011-05-18 14:27:09.041560478 +0200
-@@ -6,11 +6,11 @@
- strncasecmp
-
- ANSI_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- int strncasecmp(const char *<[a]>, const char * <[b]>, size_t <[length]>);
-
- TRAD_SYNOPSIS
-- #include <string.h>
-+ #include <strings.h>
- int strncasecmp(<[a]>, <[b]>, <[length]>)
- char *<[a]>;
- char *<[b]>;
-@@ -40,7 +40,7 @@
- strncasecmp
- */
-
--#include <string.h>
-+#include <strings.h>
- #include <ctype.h>
-
- int
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncat.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncat.c
---- newlib-1.18.0.orig/newlib/libc/string/strncat.c 2005-10-28 23:21:07.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncat.c 2011-05-18 14:27:09.041560478 +0200
-@@ -42,11 +42,12 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
- #include <limits.h>
-
- /* Nonzero if X is aligned on a "long" boundary. */
- #define ALIGNED(X) \
-- (((long)X & (sizeof (long) - 1)) == 0)
-+ (((intptr_t)X & (sizeof (long) - 1)) == 0)
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncmp.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncmp.c
---- newlib-1.18.0.orig/newlib/libc/string/strncmp.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncmp.c 2011-05-18 14:27:09.041560478 +0200
-@@ -36,12 +36,13 @@
- strncmp ansi pure
- */
-
-+#include <stdint.h>
- #include <string.h>
- #include <limits.h>
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
-
- /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
- #if LONG_MAX == 2147483647L
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncpy.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncpy.c
---- newlib-1.18.0.orig/newlib/libc/string/strncpy.c 2000-02-17 20:39:48.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/strncpy.c 2011-05-18 14:27:09.041560478 +0200
-@@ -38,6 +38,7 @@
- */
-
- #include <string.h>
-+#include <stdint.h>
- #include <limits.h>
-
- /*SUPPRESS 560*/
-@@ -45,7 +46,7 @@
-
- /* Nonzero if either X or Y is not aligned on a "long" boundary. */
- #define UNALIGNED(X, Y) \
-- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
-+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
-
- #if LONG_MAX == 2147483647L
- #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
-diff -Naur newlib-1.18.0.orig/newlib/libc/string/str-two-way.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/str-two-way.h
---- newlib-1.18.0.orig/newlib/libc/string/str-two-way.h 2008-10-02 22:12:34.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/string/str-two-way.h 2011-05-18 14:27:09.040560463 +0200
-@@ -1,5 +1,5 @@
- /* Byte-wise substring search, using the Two-Way algorithm.
-- * Copyright (C) 2008 Eric Blake
-+ * Copyright (C) 2008, 2010 Eric Blake
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-@@ -335,8 +335,8 @@
- a byte out of place, there can be no match until
- after the mismatch. */
- shift = needle_len - period;
-- memory = 0;
- }
-+ memory = 0;
- j += shift;
- continue;
- }
-diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/crt0.c newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/crt0.c
---- newlib-1.18.0.orig/newlib/libc/sys/rtems/crt0.c 2009-12-16 19:28:14.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/crt0.c 2011-05-18 14:27:09.041560478 +0200
-@@ -24,8 +24,8 @@
- /* RTEMS provides some of its own routines including a Malloc family */
- RTEMS_STUB(void *,malloc(size_t s)) { return 0; }
- RTEMS_STUB(void *,realloc(void* p, size_t s)) { return 0; }
--RTEMS_STUB(void, free(void)) { ; }
--RTEMS_STUB(_PTR, calloc(struct _reent *r, size_t s1, size_t s2)) {}
-+RTEMS_STUB(void, free(void* ptr)) { ; }
-+RTEMS_STUB(_PTR, calloc(size_t s1, size_t s2)) {}
-
- #if defined(__GNUC__)
- /*
-@@ -49,6 +49,7 @@
- #endif
-
- /* stubs for functions RTEMS provides */
-+RTEMS_STUB(int, clock_gettime(clockid_t clk_id, struct timespec *tp)) { return -1; }
- RTEMS_STUB(int, close (int fd)) { return -1; }
- RTEMS_STUB(int, dup2(int oldfd, int newfd)) { return -1; }
- RTEMS_STUB(int, fcntl( int fd, int cmd, ... /* arg */ )) { return -1; }
-@@ -56,6 +57,7 @@
- RTEMS_STUB(int, fstat(int fd, struct stat *buf)) { return -1; }
- RTEMS_STUB(int, getdents(int fd, void *dp, int count)) { return -1; }
- RTEMS_STUB(char *, getlogin(void)) { return 0; }
-+RTEMS_STUB(int, gettimeofday(struct timeval *tv, struct timezone *tz)) { return -1; }
- RTEMS_STUB(struct passwd *, getpwnam(const char *name)) { return 0; }
- RTEMS_STUB(struct passwd *, getpwuid(uid_t uid)) { return 0; }
- RTEMS_STUB(uid_t, getuid(void)) { return 0; }
-@@ -65,6 +67,7 @@
- RTEMS_STUB(int, open(const char *pathname, int flags, int mode)) { return -1; }
- RTEMS_STUB(int, pipe(int pipefd[2])) { return -1; }
- RTEMS_STUB(_ssize_t, read(int fd, void *buf, size_t count)) { return -1; }
-+RTEMS_STUB(int, sched_yield(void)) { return -1; }
- RTEMS_STUB(int, sigfillset(sigset_t *set)) { return -1; }
- RTEMS_STUB(int, sigprocmask(int how, const sigset_t *set, sigset_t *oldset)) { return -1; }
- RTEMS_STUB(int, stat(const char *path, struct stat *buf)) { return -1; }
-@@ -95,7 +98,7 @@
- RTEMS_STUB(int, _kill_r (struct _reent *r, int pid, int sig )) { return -1; }
- #if !defined(REENTRANT_SYSCALLS_PROVIDED)
- /* cf. newlib/libc/reent/linkr.c */
--RTEMS_STUB(int, _link_r (struct _reent *, const char *, const char *)) { return -1; }
-+RTEMS_STUB(int, _link_r (struct _reent *r, const char *oldpath, const char *newpath)) { return -1; }
- #endif
- RTEMS_STUB(_off_t, _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence )) { return -1; }
- RTEMS_STUB(int, _open_r (struct _reent *r, const char *buf, int flags, int mode)) { return -1; }
-@@ -103,14 +106,14 @@
- RTEMS_STUB(int, _rename_r (struct _reent *r, const char *a, const char *b)){ return -1; }
- #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED))
- /* cf. newlib/libc/reent/sbrkr.c */
--RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t)) { return -1; }
-+RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t addr)) { return 0; }
- #endif
- RTEMS_STUB(int, _stat_r (struct _reent *r, const char *path, struct stat *buf)) { return -1; }
- RTEMS_STUB(_CLOCK_T_, _times_r (struct _reent *r, struct tms *ptms)) { return -1; }
- RTEMS_STUB(int, _unlink_r (struct _reent *r, const char *path)) { return -1; }
- #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (NO_EXEC))
- /* cf. newlib/libc/reent/execr.c */
--RTEMS_STUB(int, _wait_r (struct _reent *r, int *)) { return -1; }
-+RTEMS_STUB(int, _wait_r (struct _reent *r, int *status)) { return -1; }
- #endif
- RTEMS_STUB(_ssize_t, _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)) { return -1; }
-
-diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/include/limits.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/include/limits.h
---- newlib-1.18.0.orig/newlib/libc/sys/rtems/include/limits.h 2008-11-17 23:05:12.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/include/limits.h 2011-05-18 14:27:09.041560478 +0200
-@@ -78,7 +78,11 @@
- * Invariant values
- */
-
-+#if defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__)
-+#define SSIZE_MAX ((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1)
-+#else /* historic fallback, wrong in most cases */
- #define SSIZE_MAX 32767
-+#endif
-
- /*
- * Maximum Values
-diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/machine/_types.h
---- newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h 2009-12-17 17:10:41.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/machine/_types.h 2011-05-18 14:27:09.042560493 +0200
-@@ -31,4 +31,25 @@
-
- typedef __int32_t blksize_t;
- typedef __int32_t blkcnt_t;
-+
-+/* EXPERIMENTAL: Use 64bit types */
-+#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__)
-+/* Use 64bit types */
-+typedef __int64_t _off_t;
-+#define __off_t_defined 1
-+
-+typedef __int64_t _fpos_t;
-+#define __fpos_t_defined 1
-+#else
-+/* Use 32bit types */
-+typedef __int32_t _off_t;
-+#define __off_t_defined 1
-+
-+typedef __int32_t _fpos_t;
-+#define __fpos_t_defined 1
-+#endif
-+
-+typedef __uint32_t _mode_t;
-+#define __mode_t_defined 1
-+
- #endif
-diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/sys/dirent.h newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/sys/dirent.h
---- newlib-1.18.0.orig/newlib/libc/sys/rtems/sys/dirent.h 2004-01-08 20:25:21.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libc/sys/rtems/sys/dirent.h 2011-05-18 14:27:09.042560493 +0200
-@@ -31,6 +31,10 @@
- void seekdir(DIR *dir, long loc);
- long telldir(DIR *dir);
-
-+#ifdef _COMPILING_NEWLIB
-+void _seekdir(DIR *dir, long offset);
-+#endif
-+
- #include <sys/types.h>
-
- #include <limits.h>
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/fdlibm.h newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/fdlibm.h
---- newlib-1.18.0.orig/newlib/libm/common/fdlibm.h 2009-11-17 23:35:46.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/fdlibm.h 2011-05-18 14:27:09.042560493 +0200
-@@ -361,3 +361,12 @@
- sf_u.word = (i); \
- (d) = sf_u.value; \
- } while (0)
-+
-+/* Macros to avoid undefined behaviour that can arise if the amount
-+ of a shift is exactly equal to the size of the shifted operand. */
-+
-+#define SAFE_LEFT_SHIFT(op,amt) \
-+ (((amt) < 8 * sizeof(op)) ? ((op) << (amt)) : 0)
-+
-+#define SAFE_RIGHT_SHIFT(op,amt) \
-+ (((amt) < 8 * sizeof(op)) ? ((op) >> (amt)) : 0)
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/modfl.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/modfl.c
---- newlib-1.18.0.orig/newlib/libm/common/modfl.c 2009-04-18 00:15:43.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/modfl.c 2011-05-18 14:27:09.042560493 +0200
-@@ -36,7 +36,7 @@
- long double
- modfl (long double x, long double *iptr)
- {
-- return modf(x, iptr);
-+ return modf(x, (double*) iptr);
- }
- #endif
-
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_ilogb.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_ilogb.c
---- newlib-1.18.0.orig/newlib/libm/common/sf_ilogb.c 2001-04-04 15:30:59.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_ilogb.c 2011-05-18 14:27:09.044560523 +0200
-@@ -13,8 +13,8 @@
- * ====================================================
- */
-
--#include "fdlibm.h"
- #include <limits.h>
-+#include "fdlibm.h"
-
- #ifdef __STDC__
- int ilogbf(float x)
-@@ -28,11 +28,14 @@
- GET_FLOAT_WORD(hx,x);
- hx &= 0x7fffffff;
- if(FLT_UWORD_IS_ZERO(hx))
-- return - INT_MAX; /* ilogb(0) = 0x80000001 */
-+ return FP_ILOGB0; /* ilogb(0) = special case error */
- if(FLT_UWORD_IS_SUBNORMAL(hx)) {
- for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1;
- return ix;
- }
-+ #if FP_ILOGBNAN != INT_MAX
-+ else if (FLT_UWORD_IS_NAN(hx)) return FP_ILOGBNAN; /* NAN */
-+ #endif
- else if (!FLT_UWORD_IS_FINITE(hx)) return INT_MAX;
- else return (hx>>23)-127;
- }
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_llrint.c
---- newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c 2009-04-03 19:39:24.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_llrint.c 2011-05-18 14:27:09.044560523 +0200
-@@ -71,7 +71,7 @@
- GET_FLOAT_WORD (i0, t);
- /* Detect the all-zeros representation of plus and
- minus zero, which fails the calculation below. */
-- if ((i0 & ~(1 << 31)) == 0)
-+ if ((i0 & ~((__uint32_t)1 << 31)) == 0)
- return 0;
- j0 = ((i0 >> 23) & 0xff) - 0x7f;
- i0 &= 0x7fffff;
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_log2.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_log2.c
---- newlib-1.18.0.orig/newlib/libm/common/sf_log2.c 2009-03-18 19:11:18.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_log2.c 2011-05-18 14:27:09.044560523 +0200
-@@ -30,7 +30,7 @@
- float x;
- #endif
- {
-- return (logf(x) / (float) M_LOG2_E);
-+ return (logf(x) / (float_t) M_LN2);
- }
-
- #ifdef _DOUBLE_IS_32BITS
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_rint.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_rint.c
---- newlib-1.18.0.orig/newlib/libm/common/sf_rint.c 2001-04-04 15:30:59.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_rint.c 2011-05-18 14:27:09.044560523 +0200
-@@ -57,7 +57,7 @@
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- i>>=1;
-- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
-+ if((i0&i)!=0) i0 = (i0&(~i))|((0x200000)>>j0);
- }
- } else {
- if(!FLT_UWORD_IS_FINITE(ix)) return x+x; /* inf or NaN */
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_round.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_round.c
---- newlib-1.18.0.orig/newlib/libm/common/sf_round.c 2005-02-24 20:02:35.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/sf_round.c 2011-05-18 14:27:09.044560523 +0200
-@@ -38,7 +38,7 @@
- w &= 0x80000000;
- if (exponent_less_127 == -1)
- /* Result is +1.0 or -1.0. */
-- w |= (127 << 23);
-+ w |= ((__uint32_t)127 << 23);
- }
- else
- {
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_ilogb.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_ilogb.c
---- newlib-1.18.0.orig/newlib/libm/common/s_ilogb.c 2003-10-20 20:46:37.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_ilogb.c 2011-05-18 14:27:09.042560493 +0200
-@@ -44,13 +44,24 @@
- RETURNS
-
- <<ilogb>> and <<ilogbf>> return the power of two used to form the
--floating-point argument. If <[val]> is <<0>>, they return <<-
--INT_MAX>> (<<INT_MAX>> is defined in limits.h). If <[val]> is
--infinite, or NaN, they return <<INT_MAX>>.
-+floating-point argument.
-+If <[val]> is <<0>>, they return <<FP_ILOGB0>>.
-+If <[val]> is infinite, they return <<INT_MAX>>.
-+If <[val]> is NaN, they return <<FP_ILOGBNAN>>.
-+(<<FP_ILOGB0>> and <<FP_ILOGBNAN>> are defined in math.h, but in turn are
-+defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be
-+either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or
-+INT_MIN.)
-+
-+ at comment The bugs might not be worth noting, given the mass non-C99/POSIX
-+ at comment behavior of much of the Newlib math library.
-+ at comment BUGS
-+ at comment On errors, errno is not set per C99 and POSIX requirements even if
-+ at comment (math_errhandling & MATH_ERRNO) is non-zero.
-
- PORTABILITY
-- Neither <<ilogb>> nor <<ilogbf>> is required by ANSI C or by
-- the System V Interface Definition (Issue 2). */
-+C99, POSIX
-+*/
-
- /* ilogb(double x)
- * return the binary exponent of non-zero x
-@@ -58,8 +69,8 @@
- * ilogb(inf/NaN) = 0x7fffffff (no signal is raised)
- */
-
--#include "fdlibm.h"
- #include <limits.h>
-+#include "fdlibm.h"
-
- #ifndef _DOUBLE_IS_32BITS
-
-@@ -76,7 +87,7 @@
- hx &= 0x7fffffff;
- if(hx<0x00100000) {
- if((hx|lx)==0)
-- return - INT_MAX; /* ilogb(0) = 0x80000001 */
-+ return FP_ILOGB0; /* ilogb(0) = special case error */
- else /* subnormal x */
- if(hx==0) {
- for (ix = -1043; lx>0; lx<<=1) ix -=1;
-@@ -86,7 +97,10 @@
- return ix;
- }
- else if (hx<0x7ff00000) return (hx>>20)-1023;
-- else return INT_MAX;
-+ #if FP_ILOGBNAN != INT_MAX
-+ else if (hx>0x7ff00000) return FP_ILOGBNAN; /* NAN */
-+ #endif
-+ else return INT_MAX; /* infinite (or, possibly, NAN) */
- }
-
- #endif /* _DOUBLE_IS_32BITS */
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_llrint.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_llrint.c
---- newlib-1.18.0.orig/newlib/libm/common/s_llrint.c 2009-04-03 19:39:24.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_llrint.c 2011-05-18 14:27:09.043560508 +0200
-@@ -61,40 +61,56 @@
-
- /* Extract exponent field. */
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
-+ /* j0 in [-1023,1024] */
-
- if(j0 < 20)
- {
-+ /* j0 in [-1023,19] */
- if(j0 < -1)
- return 0;
- else
- {
-+ /* j0 in [0,19] */
-+ /* shift amt in [0,19] */
- w = TWO52[sx] + x;
- t = w - TWO52[sx];
- GET_HIGH_WORD(i0, t);
- /* Detect the all-zeros representation of plus and
- minus zero, which fails the calculation below. */
-- if ((i0 & ~(1 << 31)) == 0)
-+ if ((i0 & ~((__int32_t)1 << 31)) == 0)
- return 0;
-+ /* After round: j0 in [0,20] */
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
- i0 &= 0x000fffff;
- i0 |= 0x00100000;
-+ /* shift amt in [20,0] */
- result = i0 >> (20 - j0);
- }
- }
- else if (j0 < (int)(8 * sizeof (long long int)) - 1)
- {
-+ /* 64bit return: j0 in [20,62] */
- if (j0 >= 52)
-+ /* 64bit return: j0 in [52,62] */
-+ /* 64bit return: left shift amt in [32,42] */
- result = ((long long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) |
-+ /* 64bit return: right shift amt in [0,10] */
- (i1 << (j0 - 52));
- else
- {
-+ /* 64bit return: j0 in [20,51] */
- w = TWO52[sx] + x;
- t = w - TWO52[sx];
- EXTRACT_WORDS (i0, i1, t);
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
- i0 &= 0x000fffff;
- i0 |= 0x00100000;
-- result = ((long long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
-+ /* After round:
-+ * 64bit return: j0 in [20,52] */
-+ /* 64bit return: left shift amt in [0,32] */
-+ /* ***64bit return: right shift amt in [32,0] */
-+ result = ((long long int) i0 << (j0 - 20))
-+ | SAFE_RIGHT_SHIFT (i1, (52 - j0));
- }
- }
- else
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_llround.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_llround.c
---- newlib-1.18.0.orig/newlib/libm/common/s_llround.c 2009-03-25 20:13:01.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_llround.c 2011-05-18 14:27:09.043560508 +0200
-@@ -31,8 +31,10 @@
- msw &= 0x000fffff;
- msw |= 0x00100000;
-
-+ /* exponent_less_1023 in [-1023,1024] */
- if (exponent_less_1023 < 20)
- {
-+ /* exponent_less_1023 in [-1023,19] */
- if (exponent_less_1023 < 0)
- {
- if (exponent_less_1023 < -1)
-@@ -42,20 +44,34 @@
- }
- else
- {
-+ /* exponent_less_1023 in [0,19] */
-+ /* shift amt in [0,19] */
- msw += 0x80000 >> exponent_less_1023;
-+ /* shift amt in [20,1] */
- result = msw >> (20 - exponent_less_1023);
- }
- }
- else if (exponent_less_1023 < (8 * sizeof (long long int)) - 1)
- {
-+ /* 64bit longlong: exponent_less_1023 in [20,62] */
- if (exponent_less_1023 >= 52)
-- result = ((long long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52));
-+ /* 64bit longlong: exponent_less_1023 in [52,62] */
-+ /* 64bit longlong: shift amt in [32,42] */
-+ result = ((long long int) msw << (exponent_less_1023 - 20))
-+ /* 64bit longlong: shift amt in [0,10] */
-+ | (lsw << (exponent_less_1023 - 52));
- else
- {
-- unsigned int tmp = lsw + (0x80000000 >> (exponent_less_1023 - 20));
-+ /* 64bit longlong: exponent_less_1023 in [20,51] */
-+ unsigned int tmp = lsw
-+ /* 64bit longlong: shift amt in [0,31] */
-+ + (0x80000000 >> (exponent_less_1023 - 20));
- if (tmp < lsw)
- ++msw;
-- result = ((long long int) msw << (exponent_less_1023 - 20)) | (tmp >> (52 - exponent_less_1023));
-+ /* 64bit longlong: shift amt in [0,31] */
-+ result = ((long long int) msw << (exponent_less_1023 - 20))
-+ /* ***64bit longlong: shift amt in [32,1] */
-+ | SAFE_RIGHT_SHIFT (tmp, (52 - exponent_less_1023));
- }
- }
- else
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_log2.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_log2.c
---- newlib-1.18.0.orig/newlib/libm/common/s_log2.c 2009-03-25 20:13:01.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_log2.c 2011-05-18 14:27:09.043560508 +0200
-@@ -34,8 +34,8 @@
- rather are derivatives based on <<log>>. (Accuracy might be slightly off from
- a direct calculation.) In addition to functions, they are also implemented as
- macros defined in math.h:
--. #define log2(x) (log (x) / _M_LOG2_E)
--. #define log2f(x) (logf (x) / (float) _M_LOG2_E)
-+. #define log2(x) (log (x) / _M_LN2)
-+. #define log2f(x) (logf (x) / (float) _M_LN2)
- To use the functions instead, just undefine the macros first.
-
- You can use the (non-ANSI) function <<matherr>> to specify error
-@@ -79,7 +79,7 @@
- double x;
- #endif
- {
-- return (log(x) / M_LOG2_E);
-+ return (log(x) / M_LN2);
- }
-
- #endif /* defined(_DOUBLE_IS_32BITS) */
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_lrint.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_lrint.c
---- newlib-1.18.0.orig/newlib/libm/common/s_lrint.c 2009-04-16 17:39:46.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_lrint.c 2011-05-18 14:27:09.043560508 +0200
-@@ -98,13 +98,17 @@
-
- /* Extract exponent field. */
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
-+ /* j0 in [-1023,1024] */
-
- if(j0 < 20)
- {
-+ /* j0 in [-1023,19] */
- if(j0 < -1)
- return 0;
- else
- {
-+ /* j0 in [0,19] */
-+ /* shift amt in [0,19] */
- w = TWO52[sx] + x;
- t = w - TWO52[sx];
- GET_HIGH_WORD(i0, t);
-@@ -112,26 +116,43 @@
- minus zero, which fails the calculation below. */
- if ((i0 & ~(1L << 31)) == 0)
- return 0;
-+ /* After round: j0 in [0,20] */
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
- i0 &= 0x000fffff;
- i0 |= 0x00100000;
-+ /* shift amt in [20,0] */
- result = i0 >> (20 - j0);
- }
- }
- else if (j0 < (int)(8 * sizeof (long int)) - 1)
- {
-+ /* 32bit return: j0 in [20,30] */
-+ /* 64bit return: j0 in [20,62] */
- if (j0 >= 52)
-+ /* 64bit return: j0 in [52,62] */
-+ /* 64bit return: left shift amt in [32,42] */
- result = ((long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) |
-+ /* 64bit return: right shift amt in [0,10] */
- (i1 << (j0 - 52));
- else
- {
-+ /* 32bit return: j0 in [20,30] */
-+ /* 64bit return: j0 in [20,51] */
- w = TWO52[sx] + x;
- t = w - TWO52[sx];
- EXTRACT_WORDS (i0, i1, t);
- j0 = ((i0 & 0x7ff00000) >> 20) - 1023;
- i0 &= 0x000fffff;
- i0 |= 0x00100000;
-- result = ((long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
-+ /* After round:
-+ * 32bit return: j0 in [20,31];
-+ * 64bit return: j0 in [20,52] */
-+ /* 32bit return: left shift amt in [0,11] */
-+ /* 64bit return: left shift amt in [0,32] */
-+ /* ***32bit return: right shift amt in [32,21] */
-+ /* ***64bit return: right shift amt in [32,0] */
-+ result = ((long int) i0 << (j0 - 20))
-+ | SAFE_RIGHT_SHIFT (i1, (52 - j0));
- }
- }
- else
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_lround.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_lround.c
---- newlib-1.18.0.orig/newlib/libm/common/s_lround.c 2009-03-25 20:13:01.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_lround.c 2011-05-18 14:27:09.043560508 +0200
-@@ -71,9 +71,10 @@
- exponent_less_1023 = ((msw & 0x7ff00000) >> 20) - 1023;
- msw &= 0x000fffff;
- msw |= 0x00100000;
--
-+ /* exponent_less_1023 in [-1023,1024] */
- if (exponent_less_1023 < 20)
- {
-+ /* exponent_less_1023 in [-1023,19] */
- if (exponent_less_1023 < 0)
- {
- if (exponent_less_1023 < -1)
-@@ -83,20 +84,39 @@
- }
- else
- {
-+ /* exponent_less_1023 in [0,19] */
-+ /* shift amt in [0,19] */
- msw += 0x80000 >> exponent_less_1023;
-+ /* shift amt in [20,1] */
- result = msw >> (20 - exponent_less_1023);
- }
- }
- else if (exponent_less_1023 < (8 * sizeof (long int)) - 1)
- {
-+ /* 32bit long: exponent_less_1023 in [20,30] */
-+ /* 64bit long: exponent_less_1023 in [20,62] */
- if (exponent_less_1023 >= 52)
-- result = ((long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52));
-+ /* 64bit long: exponent_less_1023 in [52,62] */
-+ /* 64bit long: shift amt in [32,42] */
-+ result = ((long int) msw << (exponent_less_1023 - 20))
-+ /* 64bit long: shift amt in [0,10] */
-+ | (lsw << (exponent_less_1023 - 52));
- else
- {
-- unsigned int tmp = lsw + (0x80000000 >> (exponent_less_1023 - 20));
-+ /* 32bit long: exponent_less_1023 in [20,30] */
-+ /* 64bit long: exponent_less_1023 in [20,51] */
-+ unsigned int tmp = lsw
-+ /* 32bit long: shift amt in [0,10] */
-+ /* 64bit long: shift amt in [0,31] */
-+ + (0x80000000 >> (exponent_less_1023 - 20));
- if (tmp < lsw)
- ++msw;
-- result = ((long int) msw << (exponent_less_1023 - 20)) | (tmp >> (52 - exponent_less_1023));
-+ /* 32bit long: shift amt in [0,10] */
-+ /* 64bit long: shift amt in [0,31] */
-+ result = ((long int) msw << (exponent_less_1023 - 20))
-+ /* ***32bit long: shift amt in [32,22] */
-+ /* ***64bit long: shift amt in [32,1] */
-+ | SAFE_RIGHT_SHIFT (tmp, (52 - exponent_less_1023));
- }
- }
- else
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_rint.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_rint.c
---- newlib-1.18.0.orig/newlib/libm/common/s_rint.c 2009-03-25 20:13:01.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_rint.c 2011-05-18 14:27:09.043560508 +0200
-@@ -51,6 +51,16 @@
- * rounding mode.
- * Method:
- * Using floating addition.
-+ * Whenever a fraction is present, if the second or any following bit after
-+ * the radix point is set, limit to the second radix point to avoid
-+ * possible double rounding in the TWO52 +- steps (in case guard bits are
-+ * used). Specifically, if have any, chop off bits past the 2nd place and
-+ * set the second place.
-+ * (e.g. 2.0625=0b10.0001 => 0b10.01=2.25;
-+ * 2.3125=0b10.011 => 0b10.01=2.25;
-+ * 1.5625= 0b1.1001 => 0b1.11=1.75;
-+ * 1.9375= 0b1.1111 => 0b1.11=1.75.
-+ * Pseudo-code: if(x.frac & ~0b0.10) x.frac = (x.frac & 0b0.11) | 0b0.01;).
- * Exception:
- * Inexact flag raised if x not equal to rint(x).
- */
-@@ -81,11 +91,11 @@
- double t;
- volatile double w;
- EXTRACT_WORDS(i0,i1,x);
-- sx = (i0>>31)&1;
-- j0 = ((i0>>20)&0x7ff)-0x3ff;
-- if(j0<20) {
-- if(j0<0) {
-- if(((i0&0x7fffffff)|i1)==0) return x;
-+ sx = (i0>>31)&1; /* sign */
-+ j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent */
-+ if(j0<20) { /* no integral bits in LS part */
-+ if(j0<0) { /* x is fractional or 0 */
-+ if(((i0&0x7fffffff)|i1)==0) return x; /* x == 0 */
- i1 |= (i0&0x0fffff);
- i0 &= 0xfffe0000;
- i0 |= ((i1|-i1)>>12)&0x80000;
-@@ -95,13 +105,14 @@
- GET_HIGH_WORD(i0,t);
- SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
-- } else {
-+ } else { /* x has integer and maybe fraction */
- i = (0x000fffff)>>j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- i>>=1;
- if(((i0&i)|i1)!=0) {
-- if(j0==19) i1 = 0x40000000; else
-- i0 = (i0&(~i))|((0x20000)>>j0);
-+ /* 2nd or any later bit after radix is set */
-+ if(j0==19) i1 = 0x80000000; else i1 = 0;
-+ i0 = (i0&(~i))|((0x40000)>>j0);
- }
- }
- } else if (j0>51) {
-@@ -119,6 +130,3 @@
- }
-
- #endif /* _DOUBLE_IS_32BITS */
--
--
--
-diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_round.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_round.c
---- newlib-1.18.0.orig/newlib/libm/common/s_round.c 2009-03-25 20:13:01.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/common/s_round.c 2011-05-18 14:27:09.044560523 +0200
-@@ -68,7 +68,7 @@
- msw &= 0x80000000;
- if (exponent_less_1023 == -1)
- /* Result is +1.0 or -1.0. */
-- msw |= (1023 << 20);
-+ msw |= ((__int32_t)1023 << 20);
- lsw = 0;
- }
- else
-diff -Naur newlib-1.18.0.orig/newlib/libm/math/e_scalb.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/e_scalb.c
---- newlib-1.18.0.orig/newlib/libm/math/e_scalb.c 2000-02-17 20:39:51.000000000 +0100
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/e_scalb.c 2011-05-18 14:27:09.044560523 +0200
-@@ -17,6 +17,7 @@
- * should use scalbn() instead.
- */
-
-+#include <limits.h>
- #include "fdlibm.h"
-
- #ifndef _DOUBLE_IS_32BITS
-@@ -46,8 +47,17 @@
- else return x/(-fn);
- }
- if (rint(fn)!=fn) return (fn-fn)/(fn-fn);
-+#if (INT_MAX < 65000)
-+ if ( fn > (double) INT_MAX) return scalbn(x, INT_MAX);
-+#else
- if ( fn > 65000.0) return scalbn(x, 65000);
-- if (-fn > 65000.0) return scalbn(x,-65000);
-+#endif
-+
-+#if (INT_MIN > -65000)
-+ if (fn < (double) INT_MIN) return scalbn(x,INT_MIN);
-+#else
-+ if (fn < -65000.0) return scalbn(x,-65000);
-+#endif
- return scalbn(x,(int)fn);
- #endif
- }
-diff -Naur newlib-1.18.0.orig/newlib/libm/math/wf_tgamma.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/wf_tgamma.c
---- newlib-1.18.0.orig/newlib/libm/math/wf_tgamma.c 2007-09-04 19:33:10.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/wf_tgamma.c 2011-05-18 14:27:09.045560538 +0200
-@@ -43,3 +43,17 @@
- return y;
- #endif
- }
-+
-+#ifdef _DOUBLE_IS_32BITS
-+
-+#ifdef __STDC__
-+ double tgamma(double x)
-+#else
-+ double tgamma(x)
-+ double x;
-+#endif
-+{
-+ return (double) tgammaf((float) x);
-+}
-+
-+#endif /* defined(_DOUBLE_IS_32BITS) */
-diff -Naur newlib-1.18.0.orig/newlib/libm/math/w_tgamma.c newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/w_tgamma.c
---- newlib-1.18.0.orig/newlib/libm/math/w_tgamma.c 2002-06-07 23:59:56.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/libm/math/w_tgamma.c 2011-05-18 14:27:09.045560538 +0200
-@@ -17,6 +17,8 @@
-
- #include "fdlibm.h"
-
-+#ifndef _DOUBLE_IS_32BITS
-+
- #ifdef __STDC__
- double tgamma(double x)
- #else
-@@ -42,3 +44,5 @@
- return y;
- #endif
- }
-+
-+#endif /* defined(_DOUBLE_IS_32BITS) */
-diff -Naur newlib-1.18.0.orig/newlib/Makefile.am newlib-1.18.0-rtems4.10-20110518/newlib/Makefile.am
---- newlib-1.18.0.orig/newlib/Makefile.am 2009-08-18 23:48:05.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/Makefile.am 2011-05-18 14:27:09.026560247 +0200
-@@ -81,7 +81,7 @@
- libc.a
- endif
-
--noinst_DATA = stmp-targ-include
-+BUILT_SOURCES = stmp-targ-include
-
- toollib_DATA = $(CRT0) $(CRT1)
-
-diff -Naur newlib-1.18.0.orig/newlib/Makefile.in newlib-1.18.0-rtems4.10-20110518/newlib/Makefile.in
---- newlib-1.18.0.orig/newlib/Makefile.in 2009-10-21 00:43:45.000000000 +0200
-+++ newlib-1.18.0-rtems4.10-20110518/newlib/Makefile.in 2011-05-18 14:27:09.026560247 +0200
-@@ -122,7 +122,7 @@
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
--DATA = $(noinst_DATA) $(toollib_DATA)
-+DATA = $(toollib_DATA)
- RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
- AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-@@ -351,7 +351,7 @@
- @USE_LIBTOOL_FALSE at toollib_LIBRARIES = libm.a \
- @USE_LIBTOOL_FALSE@ libc.a
-
--noinst_DATA = stmp-targ-include
-+BUILT_SOURCES = stmp-targ-include
- toollib_DATA = $(CRT0) $(CRT1)
-
- # The functions ldexp, frexp and modf are traditionally supplied in
-@@ -411,7 +411,7 @@
-
- # dejagnu support
- RUNTESTFLAGS =
--all: newlib.h
-+all: $(BUILT_SOURCES) newlib.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
- .SUFFIXES:
-@@ -725,14 +725,16 @@
- done
- check-am:
- $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
--check: check-recursive
-+check: $(BUILT_SOURCES)
-+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
- all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h
- installdirs: installdirs-recursive
- installdirs-am:
- for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
--install: install-recursive
-+install: $(BUILT_SOURCES)
-+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
- install-exec: install-exec-recursive
- install-data: install-data-recursive
- uninstall: uninstall-recursive
-@@ -758,6 +760,7 @@
- maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- clean: clean-recursive
-
- clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \
-@@ -833,8 +836,9 @@
- uninstall-am: uninstall-toollibDATA uninstall-toollibLIBRARIES \
- uninstall-toollibLTLIBRARIES
-
--.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \
-- ctags-recursive install-am install-strip tags-recursive
-+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
-+ check-am ctags-recursive install install-am install-strip \
-+ tags-recursive
-
- .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-DEJAGNU check-am clean \
diff --git a/contrib/crossrpms/rtems4.10/Makefile.am b/contrib/crossrpms/rtems4.10/Makefile.am
deleted file mode 100644
index 2ded05d..0000000
--- a/contrib/crossrpms/rtems4.10/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Id$
-
-SUBDIRS =
-SUBDIRS += arm
-SUBDIRS += avr
-SUBDIRS += bfin
-SUBDIRS += h8300
-SUBDIRS += i386
-SUBDIRS += lm32
-SUBDIRS += m32c
-SUBDIRS += m32r
-SUBDIRS += m68k
-SUBDIRS += mips
-SUBDIRS += mipstx39
-SUBDIRS += powerpc
-SUBDIRS += sh
-SUBDIRS += sparc
diff --git a/contrib/crossrpms/rtems4.10/arm/Makefile.am b/contrib/crossrpms/rtems4.10/arm/Makefile.am
deleted file mode 100644
index 4320677..0000000
--- a/contrib/crossrpms/rtems4.10/arm/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id$
-
-TARGET = arm-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/arm/binutils-sources.add b/contrib/crossrpms/rtems4.10/arm/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/arm/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/arm/gcc-sources.add b/contrib/crossrpms/rtems4.10/arm/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/arm/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/arm/gdb-sources.add b/contrib/crossrpms/rtems4.10/arm/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/arm/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-binutils.spec
deleted file mode 100644
index 820a619..0000000
--- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-arm-rtems4.10-binutils
-Summary: Binutils for target arm-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target arm-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=arm-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/arm-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/arm-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/arm-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/arm-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# arm-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-arm-rtems4.10-binutils
-# Summary: rtems binutils for arm-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-arm-rtems4.10-binutils
-GNU binutils targetting arm-rtems4.10.
-
-%files -n rtems-4.10-arm-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/arm-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/arm-rtems4.10-*
-
-%dir %{_exec_prefix}/arm-rtems4.10
-%dir %{_exec_prefix}/arm-rtems4.10/bin
-%{_exec_prefix}/arm-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/arm-rtems4.10/lib
-%{_exec_prefix}/arm-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec
deleted file mode 100644
index 54eaa7d..0000000
--- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-arm-rtems4.10-gcc
-Summary: arm-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-arm-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-arm-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-arm-rtems4.10-binutils
-Requires: rtems-4.10-arm-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for arm-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=arm-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/arm-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/arm-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/arm-rtems4.10-arm-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/arm-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/arm-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/arm-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/arm-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/arm-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/arm-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/arm-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/arm-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-arm-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-arm-rtems4.10-gcc
-# Summary: GNU cc compiler for arm-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-arm-rtems4.10-binutils
-# Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-arm-rtems4.10-gcc
-GNU cc compiler for arm-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-arm-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-arm-rtems4.10-gcc-libgcc
-Summary: libgcc for arm-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-arm-rtems4.10-gcc-libgcc
-libgcc arm-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-arm-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/arm-rtems4.10-gcc.1*
-%{_mandir}/man1/arm-rtems4.10-cpp.1*
-%{_mandir}/man1/arm-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/arm-rtems4.10-cpp%{_exeext}
-%{_bindir}/arm-rtems4.10-gcc%{_exeext}
-%{_bindir}/arm-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/arm-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/arm-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/arm-rtems4.10
-%dir %{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-arm-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/arm-rtems4.10
-%dir %{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-arm-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-arm-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for arm-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-arm-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-arm-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-arm-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-arm-rtems4.10-gcc-c++
-GCC c++ compiler for arm-rtems4.10.
-
-
-%package -n rtems-4.10-arm-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for arm-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-arm-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-arm-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/arm-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/arm-rtems4.10-c++%{_exeext}
-%{_bindir}/arm-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/arm-rtems4.10
-%dir %{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/arm-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-arm-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/arm-rtems4.10
-%dir %{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/arm-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-arm-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-arm-rtems4.10-newlib
-Summary: C Library (newlib) for arm-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-arm-rtems4.10-newlib
-Newlib C Library for arm-rtems4.10.
-
-%files -n rtems-4.10-arm-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/arm-rtems4.10
-%{_exec_prefix}/arm-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec
deleted file mode 100644
index 421e6ca..0000000
--- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-arm-rtems4.10-gdb
-Summary: Gdb for target arm-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target arm-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=arm-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/arm-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libarm-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# arm-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-arm-rtems4.10-gdb
-# Summary: rtems gdb for arm-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-arm-rtems4.10-gdb
-GNU gdb targetting arm-rtems4.10.
-
-%files -n rtems-4.10-arm-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/arm-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/arm-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/arm-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/avr/Makefile.am b/contrib/crossrpms/rtems4.10/avr/Makefile.am
deleted file mode 100644
index 1e46c34..0000000
--- a/contrib/crossrpms/rtems4.10/avr/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = avr-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS +=
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/avr/binutils-sources.add b/contrib/crossrpms/rtems4.10/avr/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/avr/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/avr/gcc-sources.add b/contrib/crossrpms/rtems4.10/avr/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/avr/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/avr/gdb-sources.add b/contrib/crossrpms/rtems4.10/avr/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/avr/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-binutils.spec
deleted file mode 100644
index 6b36c54..0000000
--- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-avr-rtems4.10-binutils
-Summary: Binutils for target avr-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target avr-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=avr-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/avr-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/avr-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/avr-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/avr-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# avr-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-avr-rtems4.10-binutils
-# Summary: rtems binutils for avr-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-avr-rtems4.10-binutils
-GNU binutils targetting avr-rtems4.10.
-
-%files -n rtems-4.10-avr-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/avr-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/avr-rtems4.10-*
-
-%dir %{_exec_prefix}/avr-rtems4.10
-%dir %{_exec_prefix}/avr-rtems4.10/bin
-%{_exec_prefix}/avr-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/avr-rtems4.10/lib
-%{_exec_prefix}/avr-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec
deleted file mode 100644
index e2dd1e6..0000000
--- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,802 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-avr-rtems4.10-gcc
-Summary: avr-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-avr-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-avr-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-avr-rtems4.10-binutils
-Requires: rtems-4.10-avr-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for avr-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=avr-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/avr-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/avr-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/avr-rtems4.10-avr-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/avr-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/avr-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/avr-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/avr-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/avr-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/avr-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-avr-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-avr-rtems4.10-gcc
-# Summary: GNU cc compiler for avr-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-avr-rtems4.10-binutils
-# Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-avr-rtems4.10-gcc
-GNU cc compiler for avr-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-avr-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-avr-rtems4.10-gcc-libgcc
-Summary: libgcc for avr-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-avr-rtems4.10-gcc-libgcc
-libgcc avr-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-avr-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/avr-rtems4.10-gcc.1*
-%{_mandir}/man1/avr-rtems4.10-cpp.1*
-%{_mandir}/man1/avr-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/avr-rtems4.10-cpp%{_exeext}
-%{_bindir}/avr-rtems4.10-gcc%{_exeext}
-%{_bindir}/avr-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/avr-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/avr-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/avr-rtems4.10
-%dir %{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-avr-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/avr-rtems4.10
-%dir %{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-
-
-
-# ==============================================================
-# rtems-4.10-avr-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-avr-rtems4.10-newlib
-Summary: C Library (newlib) for avr-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-avr-rtems4.10-newlib
-Newlib C Library for avr-rtems4.10.
-
-%files -n rtems-4.10-avr-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/avr-rtems4.10
-%{_exec_prefix}/avr-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec
deleted file mode 100644
index b5264d6..0000000
--- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-avr-rtems4.10-gdb
-Summary: Gdb for target avr-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target avr-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=avr-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/avr-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libavr-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# avr-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-avr-rtems4.10-gdb
-# Summary: rtems gdb for avr-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-avr-rtems4.10-gdb
-GNU gdb targetting avr-rtems4.10.
-
-%files -n rtems-4.10-avr-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/avr-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/avr-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/avr-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/bfin/Makefile.am b/contrib/crossrpms/rtems4.10/bfin/Makefile.am
deleted file mode 100644
index 94c8d29..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = bfin-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.3.1
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS += --disable-infos
diff --git a/contrib/crossrpms/rtems4.10/bfin/binutils-sources.add b/contrib/crossrpms/rtems4.10/bfin/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add b/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add b/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add
deleted file mode 100644
index c309de4..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add
+++ /dev/null
@@ -1,13 +0,0 @@
-BuildRequires: @rpmprefix at bfin-rtems4.10-binutils
-BuildRequires: texinfo
-
-# The bfin simulator silently tries to conditionally build an SDL based GUI,
-# but fails to link correctly
-# Force not building the GUI.
-%{!?suse:BuildConflicts: SDL-devel}
-%{?suse:BuildConflicts: libSDL-devel}
-
-%if "%{gdb_version}" == "7.3.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.3.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.3.1-rtems4.10-20110919.diff
-%endif
diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-binutils.spec
deleted file mode 100644
index a1d8950..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-bfin-rtems4.10-binutils
-Summary: Binutils for target bfin-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target bfin-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=bfin-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/bfin-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/bfin-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/bfin-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/bfin-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# bfin-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-bfin-rtems4.10-binutils
-# Summary: rtems binutils for bfin-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-bfin-rtems4.10-binutils
-GNU binutils targetting bfin-rtems4.10.
-
-%files -n rtems-4.10-bfin-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/bfin-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/bfin-rtems4.10-*
-
-%dir %{_exec_prefix}/bfin-rtems4.10
-%dir %{_exec_prefix}/bfin-rtems4.10/bin
-%{_exec_prefix}/bfin-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/bfin-rtems4.10/lib
-%{_exec_prefix}/bfin-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec
deleted file mode 100644
index 08d003c..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-bfin-rtems4.10-gcc
-Summary: bfin-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-bfin-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-bfin-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-bfin-rtems4.10-binutils
-Requires: rtems-4.10-bfin-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for bfin-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=bfin-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/bfin-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/bfin-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/bfin-rtems4.10-bfin-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/bfin-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/bfin-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/bfin-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/bfin-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/bfin-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/bfin-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/bfin-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/bfin-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-bfin-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-bfin-rtems4.10-gcc
-# Summary: GNU cc compiler for bfin-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-bfin-rtems4.10-binutils
-# Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-bfin-rtems4.10-gcc
-GNU cc compiler for bfin-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-bfin-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-bfin-rtems4.10-gcc-libgcc
-Summary: libgcc for bfin-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-bfin-rtems4.10-gcc-libgcc
-libgcc bfin-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-bfin-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/bfin-rtems4.10-gcc.1*
-%{_mandir}/man1/bfin-rtems4.10-cpp.1*
-%{_mandir}/man1/bfin-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/bfin-rtems4.10-cpp%{_exeext}
-%{_bindir}/bfin-rtems4.10-gcc%{_exeext}
-%{_bindir}/bfin-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/bfin-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/bfin-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/bfin-rtems4.10
-%dir %{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-bfin-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-bfin-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-bfin-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for bfin-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-bfin-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-bfin-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-bfin-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-bfin-rtems4.10-gcc-c++
-GCC c++ compiler for bfin-rtems4.10.
-
-
-%package -n rtems-4.10-bfin-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for bfin-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-bfin-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-bfin-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/bfin-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/bfin-rtems4.10-c++%{_exeext}
-%{_bindir}/bfin-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/bfin-rtems4.10
-%dir %{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/bfin-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-bfin-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/bfin-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-bfin-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-bfin-rtems4.10-newlib
-Summary: C Library (newlib) for bfin-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-bfin-rtems4.10-newlib
-Newlib C Library for bfin-rtems4.10.
-
-%files -n rtems-4.10-bfin-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/bfin-rtems4.10
-%{_exec_prefix}/bfin-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec
deleted file mode 100644
index 83d37da..0000000
--- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,235 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.3.1
-%define gdb_rpmvers %{expand:%(echo 7.3.1 | tr - _)}
-
-Name: rtems-4.10-bfin-rtems4.10-gdb
-Summary: Gdb for target bfin-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-BuildRequires: rtems-4.10-bfin-rtems4.10-binutils
-BuildRequires: texinfo
-
-# The bfin simulator silently tries to conditionally build an SDL based GUI,
-# but fails to link correctly
-# Force not building the GUI.
-%{!?suse:BuildConflicts: SDL-devel}
-%{?suse:BuildConflicts: libSDL-devel}
-
-%if "%{gdb_version}" == "7.3.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.3.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.3.1-rtems4.10-20110919.diff
-%endif
-
-%description
-GDB for target bfin-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=bfin-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/bfin-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
-# Conflict with a native gdb's infos
- rm -rf $RPM_BUILD_ROOT%{_infodir}
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libbfin-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# bfin-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-bfin-rtems4.10-gdb
-# Summary: rtems gdb for bfin-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-bfin-rtems4.10-gdb
-GNU gdb targetting bfin-rtems4.10.
-
-%files -n rtems-4.10-bfin-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/bfin-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/bfin-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/bfin-rtems4.10-*
-
diff --git a/contrib/crossrpms/rtems4.10/binutils.am b/contrib/crossrpms/rtems4.10/binutils.am
deleted file mode 100644
index 6145fd6..0000000
--- a/contrib/crossrpms/rtems4.10/binutils.am
+++ /dev/null
@@ -1,31 +0,0 @@
-EXTRA_DIST += binutils-sources.add
-
-BINUTILS_OPTS =
-
-BINUTILS_SUBPACKAGES = $(top_srcdir)/common/common.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/binutils.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/prep.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/build.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/install.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/rpm-install.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/common/clean.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/target-binutils.add
-BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/base-binutils.add
-
-$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add $(srcdir)/../binutils.am
- cat $(BINUTILS_SUBPACKAGES) | sed \
- -e "/[@]SOURCES[@]/r $(srcdir)/binutils-sources.add" \
- -e "/[@]SOURCES[@]/d" \
- -e "s/[@]BINUTILS_VERS[@]/$(BINUTILS_VERS)/g" \
- -e "s/[@]BINUTILS_PKGVERS[@]/$(BINUTILS_PKGVERS)/g" \
- -e "s/[@]BINUTILS_RPMREL[@]/$(BINUTILS_RPMREL)%{?dist}/g" \
- -e "/--with-sysroot/d" \
- | $(MKSPEC0) > $(TARGET)-binutils.spec.in
-CLEANFILES += $(TARGET)-binutils.spec.in
-
- at rpmprefix@$(TARGET)-binutils.spec: $(TARGET)-binutils.spec.in
- $(MKSPEC) $(TARGET)-binutils.spec.in | $(SPECSTRIP) $(BINUTILS_OPTS) > $@
-CLEANFILES += @rpmprefix@$(TARGET)-binutils.spec
-noinst_DATA += @rpmprefix@$(TARGET)-binutils.spec
-
-EXTRA_DIST += $(BINUTILS_SUBPACKAGES)
diff --git a/contrib/crossrpms/rtems4.10/gcc-prep.add b/contrib/crossrpms/rtems4.10/gcc-prep.add
deleted file mode 100644
index 2c41d2d..0000000
--- a/contrib/crossrpms/rtems4.10/gcc-prep.add
+++ /dev/null
@@ -1,2 +0,0 @@
-echo "RTEMS gcc-%{gcc_version}- at GCC_RPMREL@/newlib-%{newlib_version}- at NEWLIB_RPMREL@" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
diff --git a/contrib/crossrpms/rtems4.10/gcc.am b/contrib/crossrpms/rtems4.10/gcc.am
deleted file mode 100644
index f7dd7a7..0000000
--- a/contrib/crossrpms/rtems4.10/gcc.am
+++ /dev/null
@@ -1,47 +0,0 @@
-EXTRA_DIST += $(srcdir)/../gcc-prep.add
-EXTRA_DIST += $(srcdir)/gcc-sources.add
-
-GCC_OPTS = --languages=c --newlib
-
-GCC_SUBPACKAGES = $(top_srcdir)/common/common.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/gccnewlib.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/prep.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/build.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/install.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/rpm-install.add
-GCC_SUBPACKAGES += $(top_srcdir)/common/clean.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gcc.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gcc.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-c++.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gfortran.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gfortran.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-objc.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-newlib.add
-GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-newlib.add
-
-$(TARGET)-gcc.spec.in: $(GCC_SUBPACKAGES) Makefile.am $(srcdir)/gcc-sources.add $(srcdir)/../gcc-prep.add $(srcdir)/../gcc.am
- cat $(GCC_SUBPACKAGES) \
- | sed \
- -e "/[@]SOURCES[@]/r $(srcdir)/gcc-sources.add" \
- -e "/[@]SOURCES[@]/d" \
- -e "/[@]PREP[@]/r $(srcdir)/../gcc-prep.add" \
- -e "/[@]PREP[@]/d" \
- | sed \
- -e "s/[@]GCC_VERS[@]/$(GCC_VERS)/g" \
- -e "s/[@]GCC_PKGVERS[@]/$(GCC_PKGVERS)/g" \
- -e "s/[@]GCC_RPMREL[@]/$(GCC_RPMREL)%{?dist}/g" \
- -e "s/[@]NEWLIB_VERS[@]/$(NEWLIB_VERS)/g" \
- -e "s/[@]NEWLIB_PKGVERS[@]/$(NEWLIB_PKGVERS)/g" \
- -e "s/[@]NEWLIB_RPMREL[@]/$(NEWLIB_RPMREL)%{?dist}/g" \
- -e "/--with-sysroot/d" \
- -e "/[@]tool_target[@]-sys-root/d" \
- -e "/[@]tool_target[@]-w32api-sys-root/d" \
- | $(MKSPEC0) > $(TARGET)-gcc.spec.in
-CLEANFILES += $(TARGET)-gcc.spec.in
-
- at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
- $(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_OPTS) > $@
-CLEANFILES += @rpmprefix@$(TARGET)-gcc.spec
-noinst_DATA += @rpmprefix@$(TARGET)-gcc.spec
-
-EXTRA_DIST += $(GCC_SUBPACKAGES)
diff --git a/contrib/crossrpms/rtems4.10/gdb.am b/contrib/crossrpms/rtems4.10/gdb.am
deleted file mode 100644
index b90d25e..0000000
--- a/contrib/crossrpms/rtems4.10/gdb.am
+++ /dev/null
@@ -1,31 +0,0 @@
-EXTRA_DIST += gdb-sources.add
-
-GDB_OPTS =
-
-GDB_SUBPACKAGES = $(top_srcdir)/common/common.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/gdb.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/prep.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/build.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/install.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/rpm-install.add
-GDB_SUBPACKAGES += $(top_srcdir)/common/clean.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/target-gdb.add
-GDB_SUBPACKAGES += $(top_srcdir)/gdb/base-gdb.add
-
-$(TARGET)-gdb.spec.in: $(GDB_SUBPACKAGES) Makefile.am $(srcdir)/gdb-sources.add $(srcdir)/../gdb.am
- cat $(GDB_SUBPACKAGES) | sed \
- -e "/[@]SOURCES[@]/r $(srcdir)/gdb-sources.add" \
- -e "/[@]SOURCES[@]/d" \
- -e "s/[@]GDB_VERS[@]/$(GDB_VERS)/g" \
- -e "s/[@]GDB_PKGVERS[@]/$(GDB_PKGVERS)/g" \
- -e "s/[@]GDB_RPMREL[@]/$(GDB_RPMREL)%{?dist}/g" \
- -e "/--with-sysroot/d" \
- | $(MKSPEC0) > $(TARGET)-gdb.spec.in
-CLEANFILES += $(TARGET)-gdb.spec.in
-
- at rpmprefix@$(TARGET)-gdb.spec: $(TARGET)-gdb.spec.in
- $(MKSPEC) $(TARGET)-gdb.spec.in | $(SPECSTRIP) $(GDB_OPTS) > $@
-CLEANFILES += @rpmprefix@$(TARGET)-gdb.spec
-noinst_DATA += @rpmprefix@$(TARGET)-gdb.spec
-
-EXTRA_DIST += $(GDB_SUBPACKAGES)
diff --git a/contrib/crossrpms/rtems4.10/h8300/Makefile.am b/contrib/crossrpms/rtems4.10/h8300/Makefile.am
deleted file mode 100644
index 9b4a082..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = h8300-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/h8300/binutils-sources.add b/contrib/crossrpms/rtems4.10/h8300/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add b/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/h8300/gdb-sources.add b/contrib/crossrpms/rtems4.10/h8300/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-binutils.spec
deleted file mode 100644
index 3eb51b3..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-h8300-rtems4.10-binutils
-Summary: Binutils for target h8300-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target h8300-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=h8300-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/h8300-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/h8300-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/h8300-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/h8300-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# h8300-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-h8300-rtems4.10-binutils
-# Summary: rtems binutils for h8300-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-h8300-rtems4.10-binutils
-GNU binutils targetting h8300-rtems4.10.
-
-%files -n rtems-4.10-h8300-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/h8300-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/h8300-rtems4.10-*
-
-%dir %{_exec_prefix}/h8300-rtems4.10
-%dir %{_exec_prefix}/h8300-rtems4.10/bin
-%{_exec_prefix}/h8300-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/h8300-rtems4.10/lib
-%{_exec_prefix}/h8300-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec
deleted file mode 100644
index 4a9a635..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-h8300-rtems4.10-gcc
-Summary: h8300-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-h8300-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-h8300-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-h8300-rtems4.10-binutils
-Requires: rtems-4.10-h8300-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for h8300-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=h8300-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/h8300-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/h8300-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/h8300-rtems4.10-h8300-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/h8300-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/h8300-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/h8300-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/h8300-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/h8300-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/h8300-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/h8300-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/h8300-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-h8300-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-h8300-rtems4.10-gcc
-# Summary: GNU cc compiler for h8300-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-h8300-rtems4.10-binutils
-# Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-h8300-rtems4.10-gcc
-GNU cc compiler for h8300-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-h8300-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-h8300-rtems4.10-gcc-libgcc
-Summary: libgcc for h8300-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-h8300-rtems4.10-gcc-libgcc
-libgcc h8300-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-h8300-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/h8300-rtems4.10-gcc.1*
-%{_mandir}/man1/h8300-rtems4.10-cpp.1*
-%{_mandir}/man1/h8300-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/h8300-rtems4.10-cpp%{_exeext}
-%{_bindir}/h8300-rtems4.10-gcc%{_exeext}
-%{_bindir}/h8300-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/h8300-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/h8300-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/h8300-rtems4.10
-%dir %{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-h8300-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-h8300-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-h8300-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for h8300-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-h8300-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-h8300-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-h8300-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-h8300-rtems4.10-gcc-c++
-GCC c++ compiler for h8300-rtems4.10.
-
-
-%package -n rtems-4.10-h8300-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for h8300-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-h8300-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-h8300-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/h8300-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/h8300-rtems4.10-c++%{_exeext}
-%{_bindir}/h8300-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/h8300-rtems4.10
-%dir %{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/h8300-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-h8300-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/h8300-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-h8300-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-h8300-rtems4.10-newlib
-Summary: C Library (newlib) for h8300-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-h8300-rtems4.10-newlib
-Newlib C Library for h8300-rtems4.10.
-
-%files -n rtems-4.10-h8300-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/h8300-rtems4.10
-%{_exec_prefix}/h8300-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec
deleted file mode 100644
index 6a6d842..0000000
--- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,287 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-h8300-rtems4.10-gdb
-Summary: Gdb for target h8300-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-%ifos mingw mingw32
-# Mingw lacks functions required by the h8300 simulator
-%define build_sim --disable-sim
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target h8300-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=h8300-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/h8300-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libh8300-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# h8300-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-h8300-rtems4.10-gdb
-# Summary: rtems gdb for h8300-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-h8300-rtems4.10-gdb
-GNU gdb targetting h8300-rtems4.10.
-
-%files -n rtems-4.10-h8300-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/h8300-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/h8300-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/h8300-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/i386/Makefile.am b/contrib/crossrpms/rtems4.10/i386/Makefile.am
deleted file mode 100644
index e4e6f85..0000000
--- a/contrib/crossrpms/rtems4.10/i386/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = i386-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/i386/binutils-sources.add b/contrib/crossrpms/rtems4.10/i386/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/i386/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/i386/gcc-sources.add b/contrib/crossrpms/rtems4.10/i386/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/i386/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/i386/gdb-sources.add b/contrib/crossrpms/rtems4.10/i386/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/i386/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-binutils.spec
deleted file mode 100644
index 801d125..0000000
--- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-i386-rtems4.10-binutils
-Summary: Binutils for target i386-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target i386-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=i386-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# i386-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-i386-rtems4.10-binutils
-# Summary: rtems binutils for i386-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-i386-rtems4.10-binutils
-GNU binutils targetting i386-rtems4.10.
-
-%files -n rtems-4.10-i386-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/i386-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/i386-rtems4.10-*
-
-%dir %{_exec_prefix}/i386-rtems4.10
-%dir %{_exec_prefix}/i386-rtems4.10/bin
-%{_exec_prefix}/i386-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/i386-rtems4.10/lib
-%{_exec_prefix}/i386-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec
deleted file mode 100644
index bb44e4b..0000000
--- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-i386-rtems4.10-gcc
-Summary: i386-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-i386-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-i386-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-i386-rtems4.10-binutils
-Requires: rtems-4.10-i386-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for i386-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=i386-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/i386-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/i386-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/i386-rtems4.10-i386-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/i386-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/i386-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/i386-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/i386-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-i386-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-i386-rtems4.10-gcc
-# Summary: GNU cc compiler for i386-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-i386-rtems4.10-binutils
-# Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-i386-rtems4.10-gcc
-GNU cc compiler for i386-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-i386-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-i386-rtems4.10-gcc-libgcc
-Summary: libgcc for i386-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-i386-rtems4.10-gcc-libgcc
-libgcc i386-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-i386-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/i386-rtems4.10-gcc.1*
-%{_mandir}/man1/i386-rtems4.10-cpp.1*
-%{_mandir}/man1/i386-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/i386-rtems4.10-cpp%{_exeext}
-%{_bindir}/i386-rtems4.10-gcc%{_exeext}
-%{_bindir}/i386-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/i386-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/i386-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/i386-rtems4.10
-%dir %{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-i386-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/i386-rtems4.10
-%dir %{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-i386-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-i386-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for i386-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-i386-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-i386-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-i386-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-i386-rtems4.10-gcc-c++
-GCC c++ compiler for i386-rtems4.10.
-
-
-%package -n rtems-4.10-i386-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for i386-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-i386-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-i386-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/i386-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/i386-rtems4.10-c++%{_exeext}
-%{_bindir}/i386-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/i386-rtems4.10
-%dir %{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/i386-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-i386-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/i386-rtems4.10
-%dir %{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/i386-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-i386-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-i386-rtems4.10-newlib
-Summary: C Library (newlib) for i386-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-i386-rtems4.10-newlib
-Newlib C Library for i386-rtems4.10.
-
-%files -n rtems-4.10-i386-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/i386-rtems4.10
-%{_exec_prefix}/i386-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec
deleted file mode 100644
index e8c9584..0000000
--- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-i386-rtems4.10-gdb
-Summary: Gdb for target i386-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target i386-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=i386-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/i386-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libi386-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# i386-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-i386-rtems4.10-gdb
-# Summary: rtems gdb for i386-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-i386-rtems4.10-gdb
-GNU gdb targetting i386-rtems4.10.
-
-%files -n rtems-4.10-i386-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/i386-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/i386-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/i386-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/lm32/Makefile.am b/contrib/crossrpms/rtems4.10/lm32/Makefile.am
deleted file mode 100644
index 4f1f477..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = lm32-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/lm32/binutils-sources.add b/contrib/crossrpms/rtems4.10/lm32/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add b/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/lm32/gdb-sources.add b/contrib/crossrpms/rtems4.10/lm32/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-binutils.spec
deleted file mode 100644
index b5d9305..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-lm32-rtems4.10-binutils
-Summary: Binutils for target lm32-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target lm32-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=lm32-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/lm32-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/lm32-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/lm32-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/lm32-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# lm32-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-lm32-rtems4.10-binutils
-# Summary: rtems binutils for lm32-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-lm32-rtems4.10-binutils
-GNU binutils targetting lm32-rtems4.10.
-
-%files -n rtems-4.10-lm32-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/lm32-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/lm32-rtems4.10-*
-
-%dir %{_exec_prefix}/lm32-rtems4.10
-%dir %{_exec_prefix}/lm32-rtems4.10/bin
-%{_exec_prefix}/lm32-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/lm32-rtems4.10/lib
-%{_exec_prefix}/lm32-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec
deleted file mode 100644
index d479984..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-lm32-rtems4.10-gcc
-Summary: lm32-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-lm32-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-lm32-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-lm32-rtems4.10-binutils
-Requires: rtems-4.10-lm32-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for lm32-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=lm32-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/lm32-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/lm32-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/lm32-rtems4.10-lm32-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/lm32-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/lm32-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/lm32-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/lm32-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/lm32-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/lm32-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/lm32-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/lm32-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-lm32-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-lm32-rtems4.10-gcc
-# Summary: GNU cc compiler for lm32-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-lm32-rtems4.10-binutils
-# Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-lm32-rtems4.10-gcc
-GNU cc compiler for lm32-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-lm32-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-lm32-rtems4.10-gcc-libgcc
-Summary: libgcc for lm32-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-lm32-rtems4.10-gcc-libgcc
-libgcc lm32-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-lm32-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/lm32-rtems4.10-gcc.1*
-%{_mandir}/man1/lm32-rtems4.10-cpp.1*
-%{_mandir}/man1/lm32-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/lm32-rtems4.10-cpp%{_exeext}
-%{_bindir}/lm32-rtems4.10-gcc%{_exeext}
-%{_bindir}/lm32-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/lm32-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/lm32-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/lm32-rtems4.10
-%dir %{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-lm32-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-lm32-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-lm32-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for lm32-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-lm32-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-lm32-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-lm32-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-lm32-rtems4.10-gcc-c++
-GCC c++ compiler for lm32-rtems4.10.
-
-
-%package -n rtems-4.10-lm32-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for lm32-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-lm32-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-lm32-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/lm32-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/lm32-rtems4.10-c++%{_exeext}
-%{_bindir}/lm32-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/lm32-rtems4.10
-%dir %{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/lm32-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-lm32-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/lm32-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-lm32-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-lm32-rtems4.10-newlib
-Summary: C Library (newlib) for lm32-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-lm32-rtems4.10-newlib
-Newlib C Library for lm32-rtems4.10.
-
-%files -n rtems-4.10-lm32-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/lm32-rtems4.10
-%{_exec_prefix}/lm32-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec
deleted file mode 100644
index f9ac6c0..0000000
--- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,287 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-lm32-rtems4.10-gdb
-Summary: Gdb for target lm32-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-%ifos mingw mingw32
-# Mingw lacks functions required by the lm32 simulator
-%define build_sim --disable-sim
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target lm32-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=lm32-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/lm32-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/liblm32-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# lm32-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-lm32-rtems4.10-gdb
-# Summary: rtems gdb for lm32-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-lm32-rtems4.10-gdb
-GNU gdb targetting lm32-rtems4.10.
-
-%files -n rtems-4.10-lm32-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/lm32-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/lm32-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/lm32-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/m32c/Makefile.am b/contrib/crossrpms/rtems4.10/m32c/Makefile.am
deleted file mode 100644
index a081892..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = m32c-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS +=
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/m32c/binutils-sources.add b/contrib/crossrpms/rtems4.10/m32c/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add b/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/m32c/gdb-sources.add b/contrib/crossrpms/rtems4.10/m32c/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-binutils.spec
deleted file mode 100644
index c46edc2..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-m32c-rtems4.10-binutils
-Summary: Binutils for target m32c-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target m32c-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=m32c-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32c-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32c-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32c-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32c-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m32c-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-m32c-rtems4.10-binutils
-# Summary: rtems binutils for m32c-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-m32c-rtems4.10-binutils
-GNU binutils targetting m32c-rtems4.10.
-
-%files -n rtems-4.10-m32c-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32c-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m32c-rtems4.10-*
-
-%dir %{_exec_prefix}/m32c-rtems4.10
-%dir %{_exec_prefix}/m32c-rtems4.10/bin
-%{_exec_prefix}/m32c-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/m32c-rtems4.10/lib
-%{_exec_prefix}/m32c-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec
deleted file mode 100644
index f583ce0..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,803 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-m32c-rtems4.10-gcc
-Summary: m32c-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-m32c-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-m32c-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-m32c-rtems4.10-binutils
-Requires: rtems-4.10-m32c-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for m32c-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=m32c-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/m32c-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/m32c-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/m32c-rtems4.10-m32c-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/m32c-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/m32c-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/m32c-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/m32c-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m32c-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32c-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m32c-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32c-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-m32c-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-m32c-rtems4.10-gcc
-# Summary: GNU cc compiler for m32c-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-m32c-rtems4.10-binutils
-# Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-m32c-rtems4.10-gcc
-GNU cc compiler for m32c-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-m32c-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-m32c-rtems4.10-gcc-libgcc
-Summary: libgcc for m32c-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-m32c-rtems4.10-gcc-libgcc
-libgcc m32c-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-m32c-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32c-rtems4.10-gcc.1*
-%{_mandir}/man1/m32c-rtems4.10-cpp.1*
-%{_mandir}/man1/m32c-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/m32c-rtems4.10-cpp%{_exeext}
-%{_bindir}/m32c-rtems4.10-gcc%{_exeext}
-%{_bindir}/m32c-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/m32c-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/m32c-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/m32c-rtems4.10
-%dir %{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/m32c-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-m32c-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/m32c-rtems4.10
-%dir %{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/m32c-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-
-
-
-# ==============================================================
-# rtems-4.10-m32c-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-m32c-rtems4.10-newlib
-Summary: C Library (newlib) for m32c-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-m32c-rtems4.10-newlib
-Newlib C Library for m32c-rtems4.10.
-
-%files -n rtems-4.10-m32c-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/m32c-rtems4.10
-%{_exec_prefix}/m32c-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec
deleted file mode 100644
index 47d6a13..0000000
--- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,287 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-m32c-rtems4.10-gdb
-Summary: Gdb for target m32c-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-%ifos mingw mingw32
-# Mingw lacks functions required by the m32c simulator
-%define build_sim --disable-sim
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target m32c-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=m32c-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/m32c-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm32c-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m32c-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-m32c-rtems4.10-gdb
-# Summary: rtems gdb for m32c-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-m32c-rtems4.10-gdb
-GNU gdb targetting m32c-rtems4.10.
-
-%files -n rtems-4.10-m32c-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/m32c-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32c-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m32c-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/m32r/Makefile.am b/contrib/crossrpms/rtems4.10/m32r/Makefile.am
deleted file mode 100644
index 238ece6..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = m32r-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS +=
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/m32r/binutils-sources.add b/contrib/crossrpms/rtems4.10/m32r/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add b/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/m32r/gdb-sources.add b/contrib/crossrpms/rtems4.10/m32r/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-binutils.spec
deleted file mode 100644
index 8ce1f18..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-m32r-rtems4.10-binutils
-Summary: Binutils for target m32r-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target m32r-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=m32r-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32r-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32r-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32r-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m32r-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m32r-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-m32r-rtems4.10-binutils
-# Summary: rtems binutils for m32r-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-m32r-rtems4.10-binutils
-GNU binutils targetting m32r-rtems4.10.
-
-%files -n rtems-4.10-m32r-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32r-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m32r-rtems4.10-*
-
-%dir %{_exec_prefix}/m32r-rtems4.10
-%dir %{_exec_prefix}/m32r-rtems4.10/bin
-%{_exec_prefix}/m32r-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/m32r-rtems4.10/lib
-%{_exec_prefix}/m32r-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec
deleted file mode 100644
index a2395b7..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,803 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-m32r-rtems4.10-gcc
-Summary: m32r-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-m32r-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-m32r-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-m32r-rtems4.10-binutils
-Requires: rtems-4.10-m32r-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for m32r-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=m32r-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/m32r-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/m32r-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/m32r-rtems4.10-m32r-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/m32r-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/m32r-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/m32r-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/m32r-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m32r-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32r-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m32r-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m32r-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-m32r-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-m32r-rtems4.10-gcc
-# Summary: GNU cc compiler for m32r-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-m32r-rtems4.10-binutils
-# Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-m32r-rtems4.10-gcc
-GNU cc compiler for m32r-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-m32r-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-m32r-rtems4.10-gcc-libgcc
-Summary: libgcc for m32r-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-m32r-rtems4.10-gcc-libgcc
-libgcc m32r-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-m32r-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32r-rtems4.10-gcc.1*
-%{_mandir}/man1/m32r-rtems4.10-cpp.1*
-%{_mandir}/man1/m32r-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/m32r-rtems4.10-cpp%{_exeext}
-%{_bindir}/m32r-rtems4.10-gcc%{_exeext}
-%{_bindir}/m32r-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/m32r-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/m32r-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/m32r-rtems4.10
-%dir %{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/m32r-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-m32r-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/m32r-rtems4.10
-%dir %{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/m32r-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-
-
-
-# ==============================================================
-# rtems-4.10-m32r-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-m32r-rtems4.10-newlib
-Summary: C Library (newlib) for m32r-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-m32r-rtems4.10-newlib
-Newlib C Library for m32r-rtems4.10.
-
-%files -n rtems-4.10-m32r-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/m32r-rtems4.10
-%{_exec_prefix}/m32r-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec
deleted file mode 100644
index 3213569..0000000
--- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-m32r-rtems4.10-gdb
-Summary: Gdb for target m32r-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target m32r-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=m32r-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/m32r-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm32r-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m32r-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-m32r-rtems4.10-gdb
-# Summary: rtems gdb for m32r-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-m32r-rtems4.10-gdb
-GNU gdb targetting m32r-rtems4.10.
-
-%files -n rtems-4.10-m32r-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/m32r-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m32r-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m32r-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/m68k/Makefile.am b/contrib/crossrpms/rtems4.10/m68k/Makefile.am
deleted file mode 100644
index cac4400..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = m68k-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/m68k/binutils-sources.add b/contrib/crossrpms/rtems4.10/m68k/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add b/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/m68k/gdb-sources.add b/contrib/crossrpms/rtems4.10/m68k/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-binutils.spec
deleted file mode 100644
index 0243f11..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-m68k-rtems4.10-binutils
-Summary: Binutils for target m68k-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target m68k-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=m68k-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m68k-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m68k-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m68k-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/m68k-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m68k-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-m68k-rtems4.10-binutils
-# Summary: rtems binutils for m68k-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-m68k-rtems4.10-binutils
-GNU binutils targetting m68k-rtems4.10.
-
-%files -n rtems-4.10-m68k-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m68k-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m68k-rtems4.10-*
-
-%dir %{_exec_prefix}/m68k-rtems4.10
-%dir %{_exec_prefix}/m68k-rtems4.10/bin
-%{_exec_prefix}/m68k-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/m68k-rtems4.10/lib
-%{_exec_prefix}/m68k-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec
deleted file mode 100644
index 1673a8c..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-m68k-rtems4.10-gcc
-Summary: m68k-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-m68k-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-m68k-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-m68k-rtems4.10-binutils
-Requires: rtems-4.10-m68k-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for m68k-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=m68k-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/m68k-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/m68k-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/m68k-rtems4.10-m68k-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/m68k-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/m68k-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/m68k-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/m68k-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m68k-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m68k-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/m68k-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/m68k-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-m68k-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-m68k-rtems4.10-gcc
-# Summary: GNU cc compiler for m68k-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-m68k-rtems4.10-binutils
-# Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-m68k-rtems4.10-gcc
-GNU cc compiler for m68k-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-m68k-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-m68k-rtems4.10-gcc-libgcc
-Summary: libgcc for m68k-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-m68k-rtems4.10-gcc-libgcc
-libgcc m68k-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-m68k-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m68k-rtems4.10-gcc.1*
-%{_mandir}/man1/m68k-rtems4.10-cpp.1*
-%{_mandir}/man1/m68k-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/m68k-rtems4.10-cpp%{_exeext}
-%{_bindir}/m68k-rtems4.10-gcc%{_exeext}
-%{_bindir}/m68k-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/m68k-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/m68k-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/m68k-rtems4.10
-%dir %{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-m68k-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-m68k-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-m68k-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for m68k-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-m68k-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-m68k-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-m68k-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-m68k-rtems4.10-gcc-c++
-GCC c++ compiler for m68k-rtems4.10.
-
-
-%package -n rtems-4.10-m68k-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for m68k-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-m68k-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-m68k-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m68k-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/m68k-rtems4.10-c++%{_exeext}
-%{_bindir}/m68k-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/m68k-rtems4.10
-%dir %{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/m68k-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-m68k-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/m68k-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-m68k-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-m68k-rtems4.10-newlib
-Summary: C Library (newlib) for m68k-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-m68k-rtems4.10-newlib
-Newlib C Library for m68k-rtems4.10.
-
-%files -n rtems-4.10-m68k-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/m68k-rtems4.10
-%{_exec_prefix}/m68k-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec
deleted file mode 100644
index 2708f30..0000000
--- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-m68k-rtems4.10-gdb
-Summary: Gdb for target m68k-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target m68k-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=m68k-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/m68k-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm68k-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# m68k-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-m68k-rtems4.10-gdb
-# Summary: rtems gdb for m68k-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-m68k-rtems4.10-gdb
-GNU gdb targetting m68k-rtems4.10.
-
-%files -n rtems-4.10-m68k-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/m68k-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/m68k-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/m68k-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/mips/Makefile.am b/contrib/crossrpms/rtems4.10/mips/Makefile.am
deleted file mode 100644
index 41e2db7..0000000
--- a/contrib/crossrpms/rtems4.10/mips/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = mips-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/mips/binutils-sources.add b/contrib/crossrpms/rtems4.10/mips/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/mips/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/mips/gcc-sources.add b/contrib/crossrpms/rtems4.10/mips/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/mips/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/mips/gdb-sources.add b/contrib/crossrpms/rtems4.10/mips/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/mips/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-binutils.spec
deleted file mode 100644
index c98a9d8..0000000
--- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-mips-rtems4.10-binutils
-Summary: Binutils for target mips-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target mips-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=mips-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/mips-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/mips-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/mips-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/mips-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# mips-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-mips-rtems4.10-binutils
-# Summary: rtems binutils for mips-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-mips-rtems4.10-binutils
-GNU binutils targetting mips-rtems4.10.
-
-%files -n rtems-4.10-mips-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/mips-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/mips-rtems4.10-*
-
-%dir %{_exec_prefix}/mips-rtems4.10
-%dir %{_exec_prefix}/mips-rtems4.10/bin
-%{_exec_prefix}/mips-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/mips-rtems4.10/lib
-%{_exec_prefix}/mips-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec
deleted file mode 100644
index 437d137..0000000
--- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-mips-rtems4.10-gcc
-Summary: mips-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-mips-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-mips-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-mips-rtems4.10-binutils
-Requires: rtems-4.10-mips-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for mips-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=mips-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/mips-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.10-mips-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/mips-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/mips-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/mips-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/mips-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/mips-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-mips-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-mips-rtems4.10-gcc
-# Summary: GNU cc compiler for mips-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-mips-rtems4.10-binutils
-# Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-mips-rtems4.10-gcc
-GNU cc compiler for mips-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-mips-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-mips-rtems4.10-gcc-libgcc
-Summary: libgcc for mips-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-mips-rtems4.10-gcc-libgcc
-libgcc mips-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-mips-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/mips-rtems4.10-gcc.1*
-%{_mandir}/man1/mips-rtems4.10-cpp.1*
-%{_mandir}/man1/mips-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/mips-rtems4.10-cpp%{_exeext}
-%{_bindir}/mips-rtems4.10-gcc%{_exeext}
-%{_bindir}/mips-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/mips-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/mips-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/mips-rtems4.10
-%dir %{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-mips-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/mips-rtems4.10
-%dir %{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-mips-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-mips-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for mips-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-mips-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-mips-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-mips-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-mips-rtems4.10-gcc-c++
-GCC c++ compiler for mips-rtems4.10.
-
-
-%package -n rtems-4.10-mips-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for mips-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-mips-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-mips-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/mips-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/mips-rtems4.10-c++%{_exeext}
-%{_bindir}/mips-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/mips-rtems4.10
-%dir %{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/mips-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-mips-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/mips-rtems4.10
-%dir %{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/mips-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-mips-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-mips-rtems4.10-newlib
-Summary: C Library (newlib) for mips-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-mips-rtems4.10-newlib
-Newlib C Library for mips-rtems4.10.
-
-%files -n rtems-4.10-mips-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/mips-rtems4.10
-%{_exec_prefix}/mips-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec
deleted file mode 100644
index caa2ac3..0000000
--- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-mips-rtems4.10-gdb
-Summary: Gdb for target mips-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target mips-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=mips-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/mips-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmips-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# mips-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-mips-rtems4.10-gdb
-# Summary: rtems gdb for mips-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-mips-rtems4.10-gdb
-GNU gdb targetting mips-rtems4.10.
-
-%files -n rtems-4.10-mips-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/mips-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/mips-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/mips-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am b/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am
deleted file mode 100644
index ec9cbd1..0000000
--- a/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Id$
-
-TARGET = mipstx39-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-# We only want a gdb with a tx39 simulator in it. We share the other tools
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/mipstx39/gdb-sources.add b/contrib/crossrpms/rtems4.10/mipstx39/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/mipstx39/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec
deleted file mode 100644
index 3d9df4f..0000000
--- a/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,287 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-mipstx39-rtems4.10-gdb
-Summary: Gdb for target mipstx39-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-%ifos mingw mingw32
-# Mingw lacks functions required by the mipstx39 simulator
-%define build_sim --disable-sim
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target mipstx39-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=mipstx39-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/mipstx39-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmipstx39-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# mipstx39-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-mipstx39-rtems4.10-gdb
-# Summary: rtems gdb for mipstx39-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-mipstx39-rtems4.10-gdb
-GNU gdb targetting mipstx39-rtems4.10.
-
-%files -n rtems-4.10-mipstx39-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/mipstx39-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/mipstx39-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/mipstx39-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am
deleted file mode 100644
index 6303913..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = powerpc-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/powerpc/binutils-sources.add b/contrib/crossrpms/rtems4.10/powerpc/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add b/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/powerpc/gdb-sources.add b/contrib/crossrpms/rtems4.10/powerpc/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-binutils.spec
deleted file mode 100644
index ba0778a..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-powerpc-rtems4.10-binutils
-Summary: Binutils for target powerpc-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target powerpc-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=powerpc-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/powerpc-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/powerpc-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/powerpc-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/powerpc-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# powerpc-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-powerpc-rtems4.10-binutils
-# Summary: rtems binutils for powerpc-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-powerpc-rtems4.10-binutils
-GNU binutils targetting powerpc-rtems4.10.
-
-%files -n rtems-4.10-powerpc-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/powerpc-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/powerpc-rtems4.10-*
-
-%dir %{_exec_prefix}/powerpc-rtems4.10
-%dir %{_exec_prefix}/powerpc-rtems4.10/bin
-%{_exec_prefix}/powerpc-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/powerpc-rtems4.10/lib
-%{_exec_prefix}/powerpc-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec
deleted file mode 100644
index dbf1738..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-powerpc-rtems4.10-gcc
-Summary: powerpc-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-powerpc-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-powerpc-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-powerpc-rtems4.10-binutils
-Requires: rtems-4.10-powerpc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for powerpc-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=powerpc-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/powerpc-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/powerpc-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/powerpc-rtems4.10-powerpc-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/powerpc-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/powerpc-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/powerpc-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/powerpc-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/powerpc-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/powerpc-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/powerpc-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/powerpc-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-powerpc-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-powerpc-rtems4.10-gcc
-# Summary: GNU cc compiler for powerpc-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-powerpc-rtems4.10-binutils
-# Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-powerpc-rtems4.10-gcc
-GNU cc compiler for powerpc-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-powerpc-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-powerpc-rtems4.10-gcc-libgcc
-Summary: libgcc for powerpc-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-powerpc-rtems4.10-gcc-libgcc
-libgcc powerpc-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-powerpc-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/powerpc-rtems4.10-gcc.1*
-%{_mandir}/man1/powerpc-rtems4.10-cpp.1*
-%{_mandir}/man1/powerpc-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/powerpc-rtems4.10-cpp%{_exeext}
-%{_bindir}/powerpc-rtems4.10-gcc%{_exeext}
-%{_bindir}/powerpc-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/powerpc-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/powerpc-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/powerpc-rtems4.10
-%dir %{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-powerpc-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-powerpc-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-powerpc-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for powerpc-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-powerpc-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-powerpc-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-powerpc-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-powerpc-rtems4.10-gcc-c++
-GCC c++ compiler for powerpc-rtems4.10.
-
-
-%package -n rtems-4.10-powerpc-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for powerpc-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-powerpc-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-powerpc-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/powerpc-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/powerpc-rtems4.10-c++%{_exeext}
-%{_bindir}/powerpc-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/powerpc-rtems4.10
-%dir %{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/powerpc-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-powerpc-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/powerpc-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-powerpc-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-powerpc-rtems4.10-newlib
-Summary: C Library (newlib) for powerpc-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-powerpc-rtems4.10-newlib
-Newlib C Library for powerpc-rtems4.10.
-
-%files -n rtems-4.10-powerpc-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/powerpc-rtems4.10
-%{_exec_prefix}/powerpc-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec
deleted file mode 100644
index 5f8f40b..0000000
--- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,288 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-powerpc-rtems4.10-gdb
-Summary: Gdb for target powerpc-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%if "%{_build}" != "%{_host}"
-# psim doesn't support Cdn-X
-%global build_sim --disable-sim
-%else
-%global build_sim --enable-sim --enable-sim-trace
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target powerpc-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=powerpc-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/powerpc-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libpowerpc-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# powerpc-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-powerpc-rtems4.10-gdb
-# Summary: rtems gdb for powerpc-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-powerpc-rtems4.10-gdb
-GNU gdb targetting powerpc-rtems4.10.
-
-%files -n rtems-4.10-powerpc-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/powerpc-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/powerpc-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/powerpc-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/sh/Makefile.am b/contrib/crossrpms/rtems4.10/sh/Makefile.am
deleted file mode 100644
index c8026c2..0000000
--- a/contrib/crossrpms/rtems4.10/sh/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = sh-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/sh/binutils-sources.add b/contrib/crossrpms/rtems4.10/sh/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/sh/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/sh/gcc-sources.add b/contrib/crossrpms/rtems4.10/sh/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/sh/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/sh/gdb-sources.add b/contrib/crossrpms/rtems4.10/sh/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/sh/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-binutils.spec
deleted file mode 100644
index a421bff..0000000
--- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-sh-rtems4.10-binutils
-Summary: Binutils for target sh-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target sh-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=sh-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sh-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sh-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sh-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sh-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# sh-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-sh-rtems4.10-binutils
-# Summary: rtems binutils for sh-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-sh-rtems4.10-binutils
-GNU binutils targetting sh-rtems4.10.
-
-%files -n rtems-4.10-sh-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sh-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/sh-rtems4.10-*
-
-%dir %{_exec_prefix}/sh-rtems4.10
-%dir %{_exec_prefix}/sh-rtems4.10/bin
-%{_exec_prefix}/sh-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/sh-rtems4.10/lib
-%{_exec_prefix}/sh-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec
deleted file mode 100644
index 3a887c1..0000000
--- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-sh-rtems4.10-gcc
-Summary: sh-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-sh-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-sh-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-sh-rtems4.10-binutils
-Requires: rtems-4.10-sh-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for sh-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=sh-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/sh-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/sh-rtems4.10-sh-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/sh-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/sh-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/sh-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sh-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sh-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sh-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-sh-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-sh-rtems4.10-gcc
-# Summary: GNU cc compiler for sh-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-sh-rtems4.10-binutils
-# Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-sh-rtems4.10-gcc
-GNU cc compiler for sh-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-sh-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-sh-rtems4.10-gcc-libgcc
-Summary: libgcc for sh-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-sh-rtems4.10-gcc-libgcc
-libgcc sh-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-sh-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sh-rtems4.10-gcc.1*
-%{_mandir}/man1/sh-rtems4.10-cpp.1*
-%{_mandir}/man1/sh-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/sh-rtems4.10-cpp%{_exeext}
-%{_bindir}/sh-rtems4.10-gcc%{_exeext}
-%{_bindir}/sh-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/sh-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/sh-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/sh-rtems4.10
-%dir %{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-sh-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/sh-rtems4.10
-%dir %{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-sh-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-sh-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for sh-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-sh-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-sh-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-sh-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-sh-rtems4.10-gcc-c++
-GCC c++ compiler for sh-rtems4.10.
-
-
-%package -n rtems-4.10-sh-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for sh-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-sh-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-sh-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sh-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/sh-rtems4.10-c++%{_exeext}
-%{_bindir}/sh-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/sh-rtems4.10
-%dir %{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/sh-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-sh-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/sh-rtems4.10
-%dir %{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/sh-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-sh-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-sh-rtems4.10-newlib
-Summary: C Library (newlib) for sh-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-sh-rtems4.10-newlib
-Newlib C Library for sh-rtems4.10.
-
-%files -n rtems-4.10-sh-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/sh-rtems4.10
-%{_exec_prefix}/sh-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec
deleted file mode 100644
index ee7a661..0000000
--- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-sh-rtems4.10-gdb
-Summary: Gdb for target sh-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target sh-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=sh-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/sh-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsh-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# sh-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-sh-rtems4.10-gdb
-# Summary: rtems gdb for sh-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-sh-rtems4.10-gdb
-GNU gdb targetting sh-rtems4.10.
-
-%files -n rtems-4.10-sh-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/sh-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sh-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/sh-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/rtems4.10/sparc/Makefile.am b/contrib/crossrpms/rtems4.10/sparc/Makefile.am
deleted file mode 100644
index 4f3360a..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-TARGET = sparc-rtems4.10
-
-include $(top_srcdir)/mkspec.am
-
-BINUTILS_VERS = 2.20.1
-BINUTILS_PKGVERS = $(BINUTILS_VERS)
-BINUTILS_RPMREL = 3
-include ../binutils.am
-BINUTILS_OPTS +=
-
-GCC_VERS = 4.4.6
-GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 4
-NEWLIB_VERS = 1.18.0
-NEWLIB_PKGVERS = $(NEWLIB_VERS)
-NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23`
-include ../gcc.am
-GCC_OPTS += --languages=cxx
-
-GDB_VERS = 7.2
-GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2
-include ../gdb.am
-GDB_OPTS +=
diff --git a/contrib/crossrpms/rtems4.10/sparc/binutils-sources.add b/contrib/crossrpms/rtems4.10/sparc/binutils-sources.add
deleted file mode 100644
index 807927d..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/binutils-sources.add
+++ /dev/null
@@ -1,2 +0,0 @@
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
diff --git a/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add b/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add
deleted file mode 100644
index 3ec3b39..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add
+++ /dev/null
@@ -1,41 +0,0 @@
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if %build_cxx
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%endif
-%if %build_fortran
-Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 2}
-
-%endif
-%if %build_gcj
-Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 3}
-
-%endif
-%if %build_gnat
-Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 4}
-
-%endif
-%if %build_objc
-Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
-%{?_without_sources:NoSource: 5}
-
-%endif
-%if %build_newlib
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-%endif
diff --git a/contrib/crossrpms/rtems4.10/sparc/gdb-sources.add b/contrib/crossrpms/rtems4.10/sparc/gdb-sources.add
deleted file mode 100644
index fe3618d..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/gdb-sources.add
+++ /dev/null
@@ -1,9 +0,0 @@
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-binutils.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-binutils.spec
deleted file mode 100644
index 176cfc5..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-binutils.spec
+++ /dev/null
@@ -1,268 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define binutils_pkgvers 2.20.1
-%define binutils_version 2.20.1
-%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
-
-Name: rtems-4.10-sparc-rtems4.10-binutils
-Summary: Binutils for target sparc-rtems4.10
-Group: Development/Tools
-Version: %{binutils_rpmvers}
-Release: 3%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/binutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%if "%{binutils_version}" >= "2.18"
-# Bug in bfd: Doesn't build without texinfo installed
-BuildRequires: texinfo >= 4.2
-%else
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-%endif
-BuildRequires: flex
-BuildRequires: bison
-
-Requires: rtems-4.10-binutils-common
-
-Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.20.1-rtems4.10-20100826.diff
-
-%description
-Cross binutils for target sparc-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd binutils-%{binutils_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../binutils-%{binutils_pkgvers}/configure \
- --build=%_build --host=%_host \
- --target=sparc-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- make prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
- install-info
-
-# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# binutils does not install share/locale, however it uses it
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# manpages without corresponding tools
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sparc-rtems4.10-dlltool%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.10-dlltool*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sparc-rtems4.10-nlmconv%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.10-nlmconv*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sparc-rtems4.10-windres%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.10-windres*
- fi
- if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/sparc-rtems4.10-windmc%{_exeext}; then
- rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.10-windmc*
- fi
-
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# sparc-rtems4.10-binutils
-# ==============================================================
-# %package -n rtems-4.10-sparc-rtems4.10-binutils
-# Summary: rtems binutils for sparc-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-binutils-common
-# %endif
-
-%description -n rtems-4.10-sparc-rtems4.10-binutils
-GNU binutils targetting sparc-rtems4.10.
-
-%files -n rtems-4.10-sparc-rtems4.10-binutils
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_datarootdir}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sparc-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/sparc-rtems4.10-*
-
-%dir %{_exec_prefix}/sparc-rtems4.10
-%dir %{_exec_prefix}/sparc-rtems4.10/bin
-%{_exec_prefix}/sparc-rtems4.10/bin/*
-
-%dir %{_exec_prefix}/sparc-rtems4.10/lib
-%{_exec_prefix}/sparc-rtems4.10/lib/ldscripts
-# ==============================================================
-# rtems-4.10-binutils-common
-# ==============================================================
-%package -n rtems-4.10-binutils-common
-Summary: Base package for RTEMS binutils
-Group: Development/Tools
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-binutils-common
-
-RTEMS is an open source operating system for embedded systems.
-
-This is the base for binutils regardless of target CPU.
-
-%post -n rtems-4.10-binutils-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-
-%preun -n rtems-4.10-binutils-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
-fi
-
-%files -n rtems-4.10-binutils-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/as.info*
-%{_infodir}/bfd.info*
-%{_infodir}/binutils.info*
-%{_infodir}/ld.info*
-%{_infodir}/standards.info*
-%{_infodir}/gprof.info*
-
-%dir %{_prefix}/share
-%dir %{_prefix}/share/locale
-
diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec
deleted file mode 100644
index 4ac8621..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec
+++ /dev/null
@@ -1,874 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-
-%define gcc_pkgvers 4.4.6
-%define gcc_version 4.4.6
-%define gcc_rpmvers %{expand:%(echo "4.4.6" | tr - _ )}
-
-%define newlib_pkgvers 1.18.0
-%define newlib_version 1.18.0
-
-Name: rtems-4.10-sparc-rtems4.10-gcc
-Summary: sparc-rtems4.10 gcc
-
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-Release: 4%{?dist}
-License: GPL
-URL: http://gcc.gnu.org
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define _use_internal_dependency_generator 0
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-# FIXME: Disable lto for now, to avoid dependencies on libelf
-%bcond_with lto
-
-# FIXME: Disable python gdb scripts
-# ATM, no idea how to package them
-%bcond_with pygdb
-
-# FIXME: Disable GCC-plugin
-# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
-%bcond_with plugin
-
-# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
-# Should be applicable to gcc >= 4.5.0
-%bcond_with gcc_stdint
-
-# versions of libraries, we conditionally bundle if necessary
-%global mpc_version 0.8.1
-%global mpfr_version 2.4.2
-%global gmp_version 4.3.2
-%global libelf_version 0.8.13
-
-# versions of libraries these distros are known to ship
-%if 0%{?fc16}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc15}
-%global mpc_provided 0.8.3
-%global mpfr_provided 3.0.0
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?fc14}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el6}
-%global mpc_provided %{nil}
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?el5}
-%global mpc_provided %{nil}
-%global mpfr_provided %{nil}
-%global gmp_provided 4.1.4
-%endif
-
-%if 0%{?suse12_1}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.1
-%global gmp_provided 5.0.2
-%endif
-
-%if 0%{?suse11_3}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.2
-%endif
-
-%if 0%{?suse11_4}
-%global mpc_provided 0.8.2
-%global mpfr_provided 3.0.0
-%global gmp_provided 5.0.1
-%endif
-
-%if 0%{?cygwin}
-%global mpc_provided 0.8
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.1
-%endif
-
-%if 0%{?mingw32}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.1
-%global gmp_provided 4.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.2.0"
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%define gmp_required 4.1
-%define mpfr_required 2.3.1
-%endif
-
-%if "%{gcc_version}" >= "4.3.3"
-%define cloog_required 0.15
-%endif
-
-%if "%{gcc_version}" >= "4.4.0"
-%define mpfr_required 2.3.2
-%endif
-
-%if "%{gcc_version}" >= "4.5.0"
-%define mpc_required 0.8
-%if %{with lto}
-%define libelf_required 0.8.12
-%endif
-%endif
-
-%if %{defined mpc_required}
-%if "%{mpc_provided}" >= "%{mpc_required}"
-%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
-%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpc-devel >= %{mpc_required}
-%endif
-%else
-%define _build_mpc 1
-%define gmp_required 4.2
-%endif
-%endif
-
-%if %{defined gmp_required}
-%if "%{gmp_provided}" >= "%{gmp_required}"
-BuildRequires: gmp-devel >= %{gmp_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}gmp-devel >= %{gmp_required}
-%endif
-%else
-%define _build_gmp 1
-%endif
-%endif
-
-%if %{defined libelf_required}
-%if "%{libelf_provided}" >= "%{libelf_required}"
-BuildRequires: libelf-devel >= %{libelf_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required}
-%endif
-%else
-%define _build_libelf 1
-%endif
-%endif
-
-
-%if %{defined cloog_required}
-%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
-%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
-%endif
-
-
-%if %{defined mpfr_required}
-%if "%{mpfr_provided}" >= "%{mpfr_required}"
-BuildRequires: mpfr-devel >= %{mpfr_required}
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
-%endif
-%else
-%define _build_mpfr 1
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-sparc-rtems4.10-gcc = %{gcc_rpmvers}
-%endif
-
-# Not strictly required, but patches may introduce a need to use them.
-# For reasons of simplicity, always require them.
-BuildRequires: flex bison
-
-BuildRequires: texinfo >= 4.2
-BuildRequires: rtems-4.10-sparc-rtems4.10-binutils
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-sparc-rtems4.10-binutils
-Requires: rtems-4.10-sparc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
-Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-
-%if "%{gcc_version}" >= "4.5.0"
-BuildRequires: zlib-devel
-%if "%{_build}" != "%{_host}"
-BuildRequires: %{_host_rpmprefix}zlib-devel
-%endif
-%else
-%endif
-
-%global _gcclibdir %{_prefix}/lib
-
-%if "%{gcc_version}" == "4.4.6"
-Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 0}
-
-%if "%{gcc_version}" == "4.4.6"
-Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
-Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff
-%endif
-%{?_without_sources:NoSource: 1}
-
-%if "%{newlib_version}" == "1.18.0"
-Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
-Patch50: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.18.0-rtems4.10-20110518.diff
-%endif
-%{?_without_sources:NoSource: 50}
-
-%if 0%{?_build_mpfr}
-Source60: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%endif
-
-%if 0%{?_build_mpc}
-Source61: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%endif
-
-%if 0%{?_build_gmp}
-Source62: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%endif
-
-%if 0%{?_build_libelf}
-Source63: http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
-%endif
-
-%description
-Cross gcc for sparc-rtems4.10.
-
-%prep
-%setup -c -T -n %{name}-%{version}
-
-%setup -q -T -D -n %{name}-%{version} -a0
-cd gcc-%{gcc_pkgvers}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-%setup -q -T -D -n %{name}-%{version} -a1
-cd gcc-%{gcc_pkgvers}
-%{?PATCH1:%patch1 -p1}
-cd ..
-
-
-
-
-
-%if %{with gcc_stdint}
-sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
-%endif
-
-%setup -q -T -D -n %{name}-%{version} -a50
-cd newlib-%{newlib_version}
-%{?PATCH50:%patch50 -p1}
-cd ..
- # Copy the C library into gcc's source tree
- ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
-%if %{with gcc_stdint}
- rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
-%endif
- # Make sure not to be using GPL'ed sources
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
- rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
-
-%if 0%{?_build_mpfr}
-%setup -q -T -D -n %{name}-%{version} -a60
-%{?PATCH60:%patch60 -p1}
- # Build mpfr one-tree style
- ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
-%endif
-
-%if 0%{?_build_mpc}
-%setup -q -T -D -n %{name}-%{version} -a61
-%{?PATCH61:%patch61 -p1}
- # Build mpc one-tree style
- ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
-%endif
-
-%if 0%{?_build_gmp}
-%setup -q -T -D -n %{name}-%{version} -a62
-%{?PATCH62:%patch62 -p1}
- # Build gmp one-tree style
- ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
-%endif
-
-%if 0%{?_build_libelf}
-%setup -q -T -D -n %{name}-%{version} -a63
-%{?PATCH63:%patch63 -p1}
- # Build libelf one-tree style
- ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
-%endif
-
-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
-
-
- # Fix timestamps
- cd gcc-%{gcc_pkgvers}
- contrib/gcc_update --touch
- cd ..
-%build
- mkdir -p build
-
- cd build
-
- languages="c"
- languages="$languages,c++"
- export PATH="%{_bindir}:${PATH}"
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
- CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
-%else
-# gcc is not ready to be compiled with -std=gnu99
- CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
-%endif
- ../gcc-%{gcc_pkgvers}/configure \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_gcclibdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
- --build=%_build --host=%_host \
- --target=sparc-rtems4.10 \
- --disable-libstdcxx-pch \
- --with-gnu-as --with-gnu-ld --verbose \
- --with-newlib \
- --with-system-zlib \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --enable-version-specific-runtime-libs \
- --enable-threads \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
- %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
- --enable-newlib-io-c99-formats \
- --enable-languages="$languages"
-
-%if "%_host" != "%_build"
- # Bug in gcc-3.2.1:
- # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
- mkdir -p gcc/include
- cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
-%endif
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
-
- make DESTDIR=$RPM_BUILD_ROOT install
- cd ..
-
- cd build/sparc-rtems4.10/newlib
- make DESTDIR=$RPM_BUILD_ROOT install-info
- cd ../../..
-
-%if "%{gcc_version}" <= "4.1.2"
-# Misplaced header file
- if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
- mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
- $RPM_BUILD_ROOT%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include/
- fi
-%endif
-
- # host library
-%if "%{gcc_version}" >= "4.2.0"
- # libiberty doesn't honor --libdir, but always installs to a
- # magically guessed _libdir
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
-%else
- # libiberty installs to --libdir=...
- rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
-%endif
-
- # We use the version from binutils
- rm -f $RPM_BUILD_ROOT%{_bindir}/sparc-rtems4.10-c++filt%{_exeext}
-
-
- # We don't ship info/dir
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
- # We don't want libffi's man-pages
- rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
-
- # Bug in gcc-3.4.0pre
- rm -f $RPM_BUILD_ROOT%{_bindir}/sparc-rtems4.10-sparc-rtems4.10-gcjh%{_exeext}
-
- # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
- # the fixinclude-install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/install-tools
- rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/install-tools
-
- # Bug in gcc > 4.1.0: Installs an unused, empty directory
- if test -d ${RPM_BUILD_ROOT}%{_prefix}/sparc-rtems4.10/include/bits; then
- rmdir ${RPM_BUILD_ROOT}%{_prefix}/sparc-rtems4.10/include/bits
- fi
-
- # gcc >= 4.5.0: installs weird libstdc++ python bindings.
-%if ! %{with pygdb}
- if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
- fi
-%endif
-
- # Collect multilib subdirectories
- multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
-
- echo "%defattr(-,root,root,-)" > build/files.newlib
- TGTDIR="%{_exec_prefix}/sparc-rtems4.10/lib"
- for i in $multilibs; do
- case $i in
- \.) echo "%dir ${TGTDIR}" >> build/files.newlib
- ;;
- *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib
- ;;
- esac
- done
-
- rm -f dirs ;
- echo "%defattr(-,root,root,-)" >> dirs
- TGTDIR="%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}"
- for i in $multilibs; do
- case $i in
- \.) ;; # ignore, handled elsewhere
- *) echo "%dir ${TGTDIR}/$i" >> dirs
- ;;
- esac
- done
-
- # Collect files to go into different packages
- cp dirs build/files.gcc
- cp dirs build/files.gfortran
- cp dirs build/files.objc
- cp dirs build/files.gcj
- cp dirs build/files.g++
-
- TGTDIR="%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
- *f771) ;;
- *f951) ;;
- *cc1) ;;
- *cc1obj) ;;
- *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
- *collect2) ;;
- *libobjc*) echo "$i" >> build/files.objc ;;
- *include/objc*) ;;
- *include/g++*);;
- *include/c++*);;
- *include-fixed/*);;
- *finclude/*);;
- *adainclude*);;
- *adalib*);;
- *gnat1);;
- *jc1) ;;
- *jvgenmain) ;;
- */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
- %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
- %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
- */libstdc++.*) echo "$i" >> build/files.g++ ;;
- */libsupc++.*) echo "$i" >> build/files.g++ ;;
- *) echo "$i" >> build/files.gcc ;;
- esac
- done
-
- TGTDIR="%{_exec_prefix}/sparc-rtems4.10/lib"
- f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
- for i in $f; do
- case $i in
- *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
- *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
-# all other files belong to newlib
- *) echo "$i" >> build/files.newlib ;;
- esac
- done
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sparc-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sparc-rtems4.10/'} | %__find_provides
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
-
-cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-#!/bin/sh
-grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/sparc-rtems4.10/(lib|include|sys-root)' \
- %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/sparc-rtems4.10/'} | %__find_requires
-EOF
-chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
-
-%ifnarch noarch
-# Extract %%__debug_install_post into debug_install_post~
-cat << \EOF > debug_install_post~
-%__debug_install_post
-EOF
-
-# Generate customized debug_install_post script
-cat debug_install_post~ | while read a x y; do
-case $a in
-# Prevent find-debuginfo.sh* from trying to handle foreign binaries
-*/find-debuginfo.sh)
- b=$(basename $a)
- sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
-< debug_install_post~ > debug_install_post
-%define __debug_install_post . ./debug_install_post
-
-%endif
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# rtems-4.10-sparc-rtems4.10-gcc
-# ==============================================================
-# %package -n rtems-4.10-sparc-rtems4.10-gcc
-# Summary: GNU cc compiler for sparc-rtems4.10
-# Group: Development/Tools
-# Version: %{gcc_rpmvers}
-# Requires: rtems-4.10-sparc-rtems4.10-binutils
-# Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-# License: GPL
-
-# %if %build_infos
-# Requires: rtems-4.10-gcc-common
-# %endif
-
-%description -n rtems-4.10-sparc-rtems4.10-gcc
-GNU cc compiler for sparc-rtems4.10.
-
-# ==============================================================
-# rtems-4.10-sparc-rtems4.10-gcc-libgcc
-# ==============================================================
-%package -n rtems-4.10-sparc-rtems4.10-gcc-libgcc
-Summary: libgcc for sparc-rtems4.10-gcc
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist}
-License: GPL
-
-%description -n rtems-4.10-sparc-rtems4.10-gcc-libgcc
-libgcc sparc-rtems4.10-gcc.
-
-
-%files -n rtems-4.10-sparc-rtems4.10-gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sparc-rtems4.10-gcc.1*
-%{_mandir}/man1/sparc-rtems4.10-cpp.1*
-%{_mandir}/man1/sparc-rtems4.10-gcov.1*
-
-%dir %{_bindir}
-%{_bindir}/sparc-rtems4.10-cpp%{_exeext}
-%{_bindir}/sparc-rtems4.10-gcc%{_exeext}
-%{_bindir}/sparc-rtems4.10-gcc-%{gcc_version}%{_exeext}
-%{_bindir}/sparc-rtems4.10-gcov%{_exeext}
-%if "%{gcc_version}" < "4.6.0"
-%{_bindir}/sparc-rtems4.10-gccbug
-%endif
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/sparc-rtems4.10
-%dir %{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/cc1%{_exeext}
-%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/collect2%{_exeext}
-%if "%{gcc_version}" >= "4.5.0"
-%{?with_lto:%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/lto%{_exeext}}
-%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/lto-wrapper%{_exeext}
-%endif
-
-%files -n rtems-4.10-sparc-rtems4.10-gcc-libgcc -f build/files.gcc
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include
-
-%if "%{gcc_version}" > "4.0.3"
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include/ssp
-%endif
-
-%if "%{gcc_version}" >= "4.3.0"
-%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include-fixed
-%endif
-
-# ==============================================================
-# rtems-4.10-gcc-common
-# ==============================================================
-%package -n rtems-4.10-gcc-common
-Summary: Base package for rtems gcc and newlib C Library
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-gcc-common
-GCC files that are shared by all targets.
-
-%files -n rtems-4.10-gcc-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/cpp.info*
-%{_infodir}/cppinternals.info*
-%{_infodir}/gcc.info*
-%{_infodir}/gccint.info*
-%{_infodir}/gccinstall.info*
-
-%dir %{_mandir}
-%dir %{_mandir}/man7
-%{_mandir}/man7/fsf-funding.7*
-%{_mandir}/man7/gfdl.7*
-%{_mandir}/man7/gpl.7*
-
-%post -n rtems-4.10-gcc-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-
-%preun -n rtems-4.10-gcc-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
-fi
-
-# ==============================================================
-# rtems-4.10-sparc-rtems4.10-gcc-c++
-# ==============================================================
-%package -n rtems-4.10-sparc-rtems4.10-gcc-c++
-Summary: GCC c++ compiler for sparc-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-License: GPL
-Requires: rtems-4.10-sparc-rtems4.10-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
-
-%if "%{_build}" != "%{_host}"
-BuildRequires: rtems-4.10-sparc-rtems4.10-gcc-c++ = %{gcc_rpmvers}
-%endif
-
-Requires: rtems-4.10-gcc-common
-Requires: rtems-4.10-sparc-rtems4.10-gcc = %{gcc_rpmvers}-%{release}
-
-%description -n rtems-4.10-sparc-rtems4.10-gcc-c++
-GCC c++ compiler for sparc-rtems4.10.
-
-
-%package -n rtems-4.10-sparc-rtems4.10-gcc-libstdc++
-Summary: libstdc++ for sparc-rtems4.10
-Group: Development/Tools
-Version: %{gcc_rpmvers}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: GPL
-
-%description -n rtems-4.10-sparc-rtems4.10-gcc-libstdc++
-%{summary}
-
-
-%files -n rtems-4.10-sparc-rtems4.10-gcc-c++
-%defattr(-,root,root)
-%dir %{_prefix}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sparc-rtems4.10-g++.1*
-
-%dir %{_bindir}
-%{_bindir}/sparc-rtems4.10-c++%{_exeext}
-%{_bindir}/sparc-rtems4.10-g++%{_exeext}
-
-%dir %{_libexecdir}
-%dir %{_libexecdir}/gcc
-%dir %{_libexecdir}/gcc/sparc-rtems4.10
-%dir %{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}
-%{_libexecdir}/gcc/sparc-rtems4.10/%{gcc_version}/cc1plus%{_exeext}
-
-
-%files -n rtems-4.10-sparc-rtems4.10-gcc-libstdc++ -f build/files.g++
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_gcclibdir}
-%dir %{_gcclibdir}/gcc
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}
-%dir %{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include
-%{_gcclibdir}/gcc/sparc-rtems4.10/%{gcc_version}/include/c++
-
-
-
-# ==============================================================
-# rtems-4.10-sparc-rtems4.10-newlib
-# ==============================================================
-%package -n rtems-4.10-sparc-rtems4.10-newlib
-Summary: C Library (newlib) for sparc-rtems4.10
-Group: Development/Tools
-License: Distributable
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-Requires: rtems-4.10-newlib-common
-
-%description -n rtems-4.10-sparc-rtems4.10-newlib
-Newlib C Library for sparc-rtems4.10.
-
-%files -n rtems-4.10-sparc-rtems4.10-newlib -f build/files.newlib
-%defattr(-,root,root)
-%dir %{_exec_prefix}
-%dir %{_exec_prefix}/sparc-rtems4.10
-%{_exec_prefix}/sparc-rtems4.10/include
-
-# ==============================================================
-# rtems-4.10-newlib-common
-# ==============================================================
-%package -n rtems-4.10-newlib-common
-Summary: Base package for RTEMS newlib C Library
-Group: Development/Tools
-Version: %{newlib_version}
-Release: 27%{?dist}
-%{?_with_noarch_subpackages:BuildArch: noarch}
-License: Distributable
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n rtems-4.10-newlib-common
-newlib files that are shared by all targets.
-
-%files -n rtems-4.10-newlib-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/libc.info*
-%{_infodir}/libm.info*
-
-%post -n rtems-4.10-newlib-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-
-%preun -n rtems-4.10-newlib-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
-fi
-
diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec
deleted file mode 100644
index 05a2e1d..0000000
--- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec
+++ /dev/null
@@ -1,287 +0,0 @@
-#
-# Please send bugfixes or comments to
-# http://www.rtems.org/bugzilla
-#
-
-%define _prefix /opt/rtems-4.10
-%define _exec_prefix %{_prefix}
-%define _bindir %{_exec_prefix}/bin
-%define _sbindir %{_exec_prefix}/sbin
-%define _libexecdir %{_exec_prefix}/libexec
-%define _datarootdir %{_prefix}/share
-%define _datadir %{_datarootdir}
-%define _sysconfdir %{_prefix}/etc
-%define _sharedstatedir %{_prefix}/com
-%define _localstatedir %{_prefix}/var
-%define _includedir %{_prefix}/include
-%define _libdir %{_exec_prefix}/%{_lib}
-%define _mandir %{_datarootdir}/man
-%define _infodir %{_datarootdir}/info
-%define _localedir %{_datarootdir}/locale
-
-%ifos cygwin cygwin32 mingw mingw32
-%define _exeext .exe
-%define debug_package %{nil}
-%define _libdir %{_exec_prefix}/lib
-%else
-%define _exeext %{nil}
-%endif
-
-%ifos cygwin cygwin32
-%define optflags -O3 -pipe -march=i486 -funroll-loops
-%endif
-
-%ifos mingw mingw32
-%if %{defined _mingw32_cflags}
-%define optflags %{_mingw32_cflags}
-%else
-%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
-%endif
-%endif
-
-%if "%{_build}" != "%{_host}"
-%define _host_rpmprefix %{_host}-
-%else
-%define _host_rpmprefix %{nil}
-%endif
-
-%define gdb_version 7.2
-%define gdb_rpmvers %{expand:%(echo 7.2 | tr - _)}
-
-Name: rtems-4.10-sparc-rtems4.10-gdb
-Summary: Gdb for target sparc-rtems4.10
-Group: Development/Tools
-Version: %{gdb_rpmvers}
-Release: 2%{?dist}
-License: GPL/LGPL
-URL: http://sources.redhat.com/gdb
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: %{_host_rpmprefix}gcc
-
-%global build_sim --enable-sim
-
-# Whether to build against system readline
-# Default: yes
-%bcond_without system_readline
-
-# Whether to build python support
-%if "%{_build}" != "%{_host}"
-# Can't build python Cdn-X
-%bcond_with python
-%else
-%bcond_without python
-%endif
-%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
-
-%global build_sim --enable-sim --enable-sim-trace
-%ifos mingw mingw32
-# Mingw lacks functions required by the sparc simulator
-%define build_sim --disable-sim
-%endif
-
-# suse
-%if "%{?suse}" >= "10.3"
-BuildRequires: libexpat-devel
-%else
-# Fedora/CentOS/Cygwin/MinGW
-BuildRequires: %{_host_rpmprefix}expat-devel
-%endif
-
-%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
-BuildRequires: %{_host_rpmprefix}ncurses-devel
-
-# Required for building the infos
-BuildRequires: /sbin/install-info
-BuildRequires: texinfo >= 4.2
-Requires: rtems-4.10-gdb-common
-
-%if "%{gdb_version}" == "7.2"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.2-rtems4.10-20100903.diff
-%endif
-%if "%{gdb_version}" == "7.1"
-Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.1.tar.bz2
-Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.1-rtems4.10-20100812.diff
-%endif
-
-
-%description
-GDB for target sparc-rtems4.10
-%prep
-%setup -q -c -T -n %{name}-%{version}
-
-%setup -q -D -T -n %{name}-%{version} -a0
-cd gdb-%{gdb_version}
-%{?PATCH0:%patch0 -p1}
-cd ..
-
-# Force using a system-provided libreadline
-%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
-%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$RPM_OPT_FLAGS" \
- ../gdb-%{gdb_version}/configure \
- --build=%_build --host=%_host \
- --target=sparc-rtems4.10 \
- --verbose --disable-nls \
- --without-included-gettext \
- --disable-win32-registry \
- --disable-werror \
- %{build_sim} \
- %{?with_system_readline:--with-system-readline} \
- --with-expat \
- %{?with_python:--with-python}%{!?with_python:--without-python} \
- --with-gdb-datadir=%{_datadir}/sparc-rtems4.10-gdb \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
-
- make %{?_smp_mflags} all
- make info
- cd ..
-
-%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $RPM_BUILD_ROOT
-
- cd build
- make DESTDIR=$RPM_BUILD_ROOT install
-
- rm -f $RPM_BUILD_ROOT%{_infodir}/dir
- touch $RPM_BUILD_ROOT%{_infodir}/dir
-
-# These come from other packages
- rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
- rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
-
-# We don't ship host files
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
-
-# host library, installed to a bogus directory
- rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsparc-rtems4.10-sim.a
-
-# Bug in gdb-7.0, bogusly installs linux-only files
- somethinguseful=0
- for f in ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/syscalls/*.xml; do
- case $f in
- *linux.xml) rm -f $f;;
- *.xml) somethinguseful=1;;
- esac
- done
- if test $somethinguseful -eq 0; then
- rm -rf "${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/syscalls"
- fi
-
-%if "{gdb_version}" >= "7.3"
-%if ! %{with python}
-# gdb-7.3 doesn't honor --without-python correctly
- rm -rf ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/python
-%endif
-%endif
- cd ..
-
-# Extract %%__os_install_post into os_install_post~
-cat << \EOF > os_install_post~
-%__os_install_post
-EOF
-
-# Generate customized brp-*scripts
-cat os_install_post~ | while read a x y; do
-case $a in
-# Prevent brp-strip* from trying to handle foreign binaries
-*/brp-strip*)
- b=$(basename $a)
- sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
- chmod a+x $b
- ;;
-# Fix up brp-compress to handle %%_prefix != /usr
-*/brp-compress*)
- b=$(basename $a)
- sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
- chmod a+x $b
- ;;
-esac
-done
-
-sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
- -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post
-%define __os_install_post . ./os_install_post
-
-%clean
- rm -rf $RPM_BUILD_ROOT
-
-# ==============================================================
-# sparc-rtems4.10-gdb
-# ==============================================================
-# %package -n rtems-4.10-sparc-rtems4.10-gdb
-# Summary: rtems gdb for sparc-rtems4.10
-# Group: Development/Tools
-# %if %build_infos
-# Requires: rtems-4.10-gdb-common
-# %endif
-
-%description -n rtems-4.10-sparc-rtems4.10-gdb
-GNU gdb targetting sparc-rtems4.10.
-
-%files -n rtems-4.10-sparc-rtems4.10-gdb
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-%{?with_python:%{_datadir}/sparc-rtems4.10-gdb}
-
-%dir %{_mandir}
-%dir %{_mandir}/man1
-%{_mandir}/man1/sparc-rtems4.10-*.1*
-
-%dir %{_bindir}
-%{_bindir}/sparc-rtems4.10-*
-
-# ==============================================================
-# rtems-4.10-gdb-common
-# ==============================================================
-%package -n rtems-4.10-gdb-common
-Summary: Base package for RTEMS gdbs
-Group: Development/Tools
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-%{?_with_noarch_subpackages:BuildArch: noarch}
-
-%description -n rtems-4.10-gdb-common
-
-GDB files shared by all targets.
-
-%post -n rtems-4.10-gdb-common
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-
-%preun -n rtems-4.10-gdb-common
-if [ $1 -eq 0 ]; then
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
- /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
-fi
-
-%files -n rtems-4.10-gdb-common
-%defattr(-,root,root)
-%dir %{_prefix}
-%dir %{_prefix}/share
-
-%dir %{_infodir}
-%ghost %{_infodir}/dir
-%{_infodir}/gdb.info*
-
-%{_infodir}/gdbint.info*
-%{_infodir}/stabs.info*
-%{_infodir}/annotate.info*
-
diff --git a/contrib/crossrpms/specstrip b/contrib/crossrpms/specstrip
deleted file mode 100755
index b61e741..0000000
--- a/contrib/crossrpms/specstrip
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/usr/bin/perl -w
-
-
-# Helper script to strip unused parts out of crossrpms's rpm.specs
-#
-# Usage: specstrip < infile > outfile
-
-
-# Copyright (C) 2005,2006,2010 Ralf Corsépius, Ulm, Germany,
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# For a copy of the GNU General Public License, visit
-# http://www.gnu.org or write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# $Id$
-
-use Getopt::Long;
-
-use strict;
-
-my $newlib = 0;
-my $infos = 0;
-my $prefix = '/usr';
-
-my $verbose = 0;
-my @languages = ();
-my %options = ();
-
-GetOptions(
- \%options,
- 'prefix=s' => \$prefix,
- 'enable-infos' => sub { $options{infos} = 1 },
- 'disable-infos' => sub { $options{infos} = 0 },
- 'newlib!',
- 'languages=s' => \@languages,
- 'verbose+' => \$verbose
-) or die( "failed to GetOptions" );
-
-if ( !defined($options{infos}) )
-{ # User did not override, use defaults
- if ( $prefix =~ m/^\/usr$/ ) {
- $infos = 0;
- } elsif ( $prefix =~ m/^\/usr\/local$/ ) {
- $infos = 0;
- } else {
- $infos = 1;
- }
-} else {
- $infos = int($options{infos});
-}
-
-if ( defined($options{newlib}) )
-{
- $newlib = $options{newlib};
-} else {
- $newlib = 0;
-}
-
-if ( $verbose ) {
- print STDERR "INFOS : $infos\n";
- print STDERR "PREFIX : $prefix\n";
-}
-
-my %langs;
-
-foreach ( split(/,/,join(',', at languages)) ){
- $langs{$_} = 1;
-}
-
-my @npatterns = (
- "(\"%\{_prefix\}\" (!=|==) \"/usr\")",
-
- "(%build_cxx)",
- "(%build_gnat)",
- "(%build_objc)",
- "(%build_gcj)",
- "(%build_libgcj)",
- "(%build_fortran)",
- "(%build_newlib)",
- "(%build_infos)"
-);
-
-my @ppatterns = (
-);
-
-push @ppatterns, "(\"%\{_prefix\}\" " . (("$prefix" eq '/usr') ? '!=' : '==' ) . " \"/usr\")";
-
-push @ppatterns, "(%build_gnat " . ( ($langs{gnat}) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_cxx " . ( ($langs{cxx}) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_objc " . ( ($langs{objc}) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_gcj " . ( ($langs{gcj}) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_libgcj " . ( ($langs{libgcj}) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_fortran " . ( ($langs{fortran}) ? "==" : "!=" ) . " 0)";
-
-push @ppatterns, "(%build_newlib " . ( ($newlib) ? "==" : "!=" ) . " 0)";
-push @ppatterns, "(%build_infos " . ( ($infos) ? "==" : "!=" ) . " 0)";
-
-my $npat = join('|', at npatterns);
-my $ppat = join('|', at ppatterns);
-
-if ( $verbose > 1 ) {
- print STDERR "PPAT: ", $ppat, "\n";
- print STDERR "NPAT: ", $npat, "\n";
-}
-
-my @buffer0 = <> ;
-
-my @buffer2 ;
-
-my @condstack ;
-
- at condstack = ();
-push @condstack,'<>';
-foreach (@buffer0)
-{
- chomp $_;
- if ( /^%if(os|)\s+(.*)$/ )
- {
- push @condstack,"<$2>";
- if ( $condstack[$#condstack] =~ m/$npat/ ) {
- # transform unary conditionals into binary conditionals
- if ( $condstack[$#condstack] =~/.*<(%[a-zA-Z_0-9]+)>.*/ ) {
- $condstack[$#condstack] = "<$1 != 0>";
- }
- } else {
- push @buffer2, { state => join('', at condstack), line => "$_" };
- }
- } elsif ( /^%else.*$/ )
- {
- my %ops = (
- "!=" => "==",
- "==" => "!="
- );
-
- if ( $condstack[$#condstack] =~/.*<(.*) (!=|==) (.*)>.*/ ) {
- $condstack[$#condstack] = "<$1 " . $ops{$2} . " $3>";
- if ( $condstack[$#condstack] =~ m/$npat/ ) {
- } else {
- push @buffer2, { state => join('', at condstack), line => "$_" };
- }
- } else {
- push @buffer2, { state => join('', at condstack), line => "$_" };
- }
- } elsif ( /^%endif.*$/ )
- {
- if ( $condstack[$#condstack] =~ m/$npat/ ) {
- } else {
- push @buffer2, { state => join('', at condstack), line => "$_" };
- }
- pop @condstack;
- } else {
- push @buffer2, { state => join('', at condstack), line => "$_" };
- }
-}
-
-my @buffer3;
-foreach my $i ( @buffer2 )
-{
- print STDERR "STATE:", $i->{state}, " LINE:", $i->{line}, "\n" if $verbose > 1;
- if ( $i->{state} =~ m/($ppat)/ ) {
- } else {
- push @buffer3, $i->{line};
- }
-}
-
-#foreach my $line ( @buffer3 )
-#{
-# print STDERR "L:<$line>\n";
-#}
-
-my @buffer4;
- at condstack = ();
-push @condstack, "<>";
-foreach my $line ( @buffer3 )
-{
-# print STDERR "READ:{", $line, "}\n";
- if ( $line =~/^%if\s+"([a-zA-Z_0-9\.\-]+)"\s+==\s+"([a-zA-Z_0-9\.\-]+)"\s*$/ )
- {
- if ( "$1" eq "$2" ) {
- push @condstack,"<TRUE:$1 == $2>";
- } else {
- push @condstack,"<FALSE:$1 == $2>";
- }
- } elsif ( $line =~/^%if\s+"([a-zA-Z_0-9\.\-]+)"\s+!=\s+"([a-zA-Z_0-9\.\-]+)"\s*$/ )
- {
- if ( "$1" ne "$2" ) {
- push @condstack,"<TRUE:$1 != $2>";
- } else {
- push @condstack,"<FALSE:$1 != $2>";
- }
- } elsif ( $line =~/^%if\s+(.*)\s*$/ )
- {
- my $exp = $1;
- if ( $condstack[$#condstack] =~ m/<FALSE:.*\s*>$/ ) {
- push @condstack,"<FALSE:$exp>";
- } else {
- push @condstack,"<IFOT:$exp>";
- push @buffer4, "$line\n";
- }
- } elsif ( $line =~/^%if((os|narch)\s+.*)\s*$/ )
- {
- my $exp = $1;
- if ( $condstack[$#condstack] =~ m/<FALSE:(.*)\s*>$/ ) {
- push @condstack,"<FALSE:$exp>";
- } else {
- push @condstack,"<IFOT:$exp>";
- push @buffer4, "$line\n";
- }
- } elsif ( $line =~ /^%else\s*$/ ) {
- if ( $condstack[$#condstack] =~ m/<TRUE:(.*)\s*>$/ ) {
- $condstack[$#condstack] = "<FALSE:$1>";
- } elsif ( $condstack[$#condstack] =~ m/<FALSE:(.*)\s*>$/ ) {
- $condstack[$#condstack] = "<TRUE:$1>";
- } else {
- push @buffer4, "$line\n";
- }
- } elsif ( $line =~ /^%endif\s*$/ ) {
-
- if ( $condstack[$#condstack] =~ m/<TRUE:.*>$/ ) {
-# print STDERR "ENDIF: TRUE\n";
- } elsif ( $condstack[$#condstack] =~ m/<FALSE:.*>$/ ) {
-# print STDERR "ENDIF: FALSE\n";
- } else {
- push @buffer4, "%endif\n";
- }
-# print STDERR "POP: $line\n";
- pop @condstack;
- } else {
-# print STDERR "CATCH $condstack[$#condstack]:$line\n";
- if ( $condstack[$#condstack] =~ m/<TRUE:.*>$/ ) {
- push @buffer4, "$line\n";
- } elsif ( $condstack[$#condstack] =~ m/<FALSE:.*>$/ ) {
- } else {
- push @buffer4, "$line\n";
- }
- }
-
-# print STDERR @condstack, "LINE: $line\n";
-}
-
-print STDOUT @buffer4;
More information about the vc
mailing list