diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2016-06-23 12:30:46 -0600 |
---|---|---|
committer | Rob Savoye <rob.savoye@linaro.org> | 2016-06-23 12:30:46 -0600 |
commit | 679a5ff13d7336dbe7a4adaa1dd48be97ed1d79c (patch) | |
tree | 0682b9ceffb71df13c9a183d1952e7b2449eca84 | |
parent | 7597d5cebee12824de773945fa0061fb37a94c42 (diff) |
231 files changed, 1 insertions, 26513 deletions
diff --git a/COPYING b/COPYING deleted file mode 100644 index 4432540..0000000 --- a/COPYING +++ /dev/null @@ -1,676 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - 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 -state 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 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program 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, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU 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 Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. - @@ -1,281 +1 @@ - README - -Cbuildv2 is a bourne shell rewrite of the existing cbuild system as -used by Linaro. While being oriented to the Linaro way of doing -things, Cbuildv2 should be usable by others by just reconfiguring. - -Configuring Cbuildv2: ---------------------- - While it is possible to run Cbuildv2 from it's source tree, this -isn't recommended. The best practice is to create a new build -directory, and configure Cbuildv2 in that directory. That makes it -easy to change branches, or even delete subdirectories. There -are defaults for all paths, which is to create them under the same -directory configure is run in. - - There are several directories that Cbuildv2 needs. These are the -following: - - * local snapshots - This is where all the downloaded sources get - stored. The default is the current directory under snapshots. - * local build - This is where all the executables get built. The - default is to have builds go in a top level directory which is the - full hostname of the build machine. Under this a directory is - created for the target architecture. - * remote snapshots - This is where remote tarballs are stored. This - currently defaults to cbuild.validation.linaro.org, which is - accessible via HTTP to the general public. - - If configure is executed without any parameters. the defaults are -used. It is also possible to change those values at configure -time. For example: - -$CBUILD-PATH/configure ---with-local-snapshots=$CBUILD_PATH/snapshots ---with-local-builds=$CBUILD-PATH/destdir ---with-remote-snapshots=cbuild@toolchain64.lab:/home/cbuild/var/snapshots/ - - This changes the 3 primary paths, including changing the remote host -to use rsync or ssh to download tarballs instead of HTTP. You can -execute ./configure --help to get the full list of configure time -parameters. - - The configure process produces a host.conf file, with the default -settings. This file is read by cbuildv2 at runtime, so it's possible to -change the values and rerun cbuild2.sh to use the new values. Each -toolchain component also has a config file. The default version is -copied at build time to the build tree. It is also possible to edit -this file, usually called something like gcc.conf, to change the -toolchain component specific values used when configuring the -component. - - You can see what values were used to configure each component by -looking in the top of the config.log file, which is produced at -configure time. For example: - - head ${hostname}/${target}/${component}/config.log - -Default Behaviours: ------------------- - There are several behaviours that may not be obvious, so they're -documented here. One relates to GCC builds. When built natively, GCC -only builds itself once, and is fully functional. When cross -compiling, this works differently. A fully functional GCC can't be -built without a sysroot, so a minimum compiler is built to build the C -library. This is called stage1. This is then used to compiler the C -library. One this library is installed, then stage2 of GCC can be -built. - - When building an entire toolchain using the 'all' option to --build, -all components are built in the correct order, including both GCC -stages. It is possible to specify building only GCC, in this case the -stage1 configure flags are used if the C library isn't installed. If -the C library is installed, then the stage2 flags are used. A message -is displayed to document the automatic configure decision. - -Specifying the source works like this: -------------------------------------- -It's possible to specify a full tarball name, minus the compression -part, which will be found dynamically. If the word 'tar' appears in -the suppplied name, it's only looked for on the remote directory. If -the name is a URL for bzr, sv, http, or git, the the source are -instead checked out from a remote repository instead with the -appropriate source code control system. - -It's also possible to specify an 'alias', ie ... 'gcc-4.8' instead. In -this case, the remote snapshot directory is checked first. If the name -is not unique, but matches are found, and error is generated. If the -name isn't found at all, then a URL for the source repository is -extracted from the sources.conf file, and the code is checkout out. - -There are a few ways if listing the files to see what is -available. There ar two primary remote directories where files that -can be downloaded are stored. These are 'snapshots' or -'infrastructure'. Infrastructure is usualy only installed once per -host, and contains the other packages needed to build GCC, like -gmp. Snapshots is the primary location of all source tarballs. To list -all the available snapshots, you can do this" - - "cbuild2.sh --list snapshots". - -You can also run cbuildv2 with the --interactive options, which will -display a subset of all the packages that matches the supplied -string. To build a specific component, use the --build option to -cbuildv2. the --target option is also used for cross builds. For -example: - -"cbuild2.sh --target arm-none-linux-gnueabihf gcc-linaro-4.8.2013.07-1" - -This would fetch the source tarball for this release, build anything -it needs to compile, the binutils for example, and then build these -sources. You can also specify a URL to a source repository -instead. For example: - -"cbuild2.sh --target arm-none-linux-gnueabihf git://git.linaro.org/toolchain/eglibc.git" - -To build an entire cross toolchain, the simplest way is to let -cbuildv2 control all the steps. Although it is also possible to do each -step separately. To build the full toolchain, do this: - -"cbuild2.sh --target arm-none-linux-gnueabihf --build all" - ---------------------------------------------------------------------- -Older NOTES - -x86_64-none-linux-gnu -arm-none-linux-gnueabi -arm-none-linux-gnueabihf -armeb-none-linux-gnueabihf -aarch64-none-linux-gnu -aarch64-none-elf -aarch64_be-none-elf -aarch64_be-none-linux-gnu - -Toolchain Components - * gcc (gcc, g++, objc, fortran) - * gas - * ld (gold) - * libc (newlib,eglibc,glibc) - * dependant libs (gmp, mpc, mpfr, libelf) - -Build with stock Ubuntu toolchains - * Linaro GCC Maintenance (currently Linaro GCC 4.7) - * FSF GCC Previous (currently FSF GCC 4.7) - * FSF GCC Current (currently FSF GCC 4.8) - -Build with trunk/master - * Linaro GCC Development (currently Linaro GCC 4.8) - * FSF GCC Trunk (currently FSF GCC 4.9) - -Variables - * build machine toolchain versions of all components (gcc, gas, ld, libc) - * configure options - -Features: ---------- - * Build with downloaded binaries or build them all locally - * Has default configuration for all components - * All info recorded into an SQL database - * Ability to mix & match all toolchain components - * Test locally or remotely - * Queue jobs for LAVA - * Lists possible versions and components for build - -cbuild2 command line arguments: -------------------------------- - * --build (architecture for the build machine, default native) - * --target (architecture for the target machine, default native) - * --snapshots XXX (URL of remote host or local directory) - * --libc {newlib,eglibc,glibc} (C library to use) - * --list {gcc,binutils,libc} (list possible values for component versions) - * --set {gcc,binutils,libc,latest}=XXX (change config file setting) - * --binutils (binutils version to use, default $PATH) - * --gcc (gcc version to use, default $PATH) - * --config XXX (alternate config file) - * --clean (clean a previous build, default is to start where it left off) - * --dispatch (run on LAVA build farm, probably remote) - * --sysroot XXX (specify path to alternate sysroot) - - -General ideas -------------- -Use a shell script as config file, ala *.conf and set global -variables or custom functions. A good naming convention to avoid -collisions is important. It should be able to be download from a -remote host. - -Rather than Makefiles, it should use bourne shell scripts for more -functionality. Both Android and Chromium use this technique. - -Each project that needs to be built should have a file that lists it's -major build time dependancies. There should be defaults for all -targets, but values can be overridden with local config files. The -config data could also potentially live in a database. The config data -is recorded into the database for each build and test run. - -Cross building G++ is complex, there is a stage 1 build of the -compiler, which is only used to build the C library. Then the C -library is compiled. After that G++ can be built. - -Analysis --------- - -The main goal is to have the appropriate data accessible to support -charting it in various ways to assist in better understanding of the -quality of each toolchain component. This will assist developers in -determining if their changes improve or degrade the component's -quality. This will also allow others to get an overview of each -component's quality, which will support product releases and -management planning. - - * Plot a test run of a specific version of a component across all - supported platforms - * Plot a test case of a component across all supported platforms - * Plot a test case of a component across a list of versions - * Plot a component's PASS percentage across all supported platforms - * Plot a component's PASS percentage across all supported platforms - and several versions. - * Plot a component's FAIL percentage across all supported platforms - * Plot a component's FAIL percentage across all supported platforms - and several versions. - * Plot all test states as a percentage of total test results - * Plot all test states of the actual totals for each - * -CoreMark - * Compiler and version - * Operating Speed in Mhz - * CoreMark/Mhz - * CoreMark - * CoreMark/Core - * Parallel Execution - * EEMBC - -EEMBC - * TODO - -Spec CPU 2000 - * CINT - * Benchmark - * Reference Time - * Base Runtime - * Base Ratio - * Runtime - * Ratio - * CFP - * Benchmark - * Reference Time - * Base Runtime - * Base Ratio - * Runtime - * Ratio - -Spec CPU 2006 - * Benchmark - * Base Seconds - * Base Ratio - * Peak Seconds - * Peak Ratio - -Notes on Bourne Shell Scripting -------------------------------- - - These scripts use a few techniques in many places that relate to -shell functions. One is heavy use of bourne shell functions to reduce -duplication, and make the code better organized. Any string echo'd by -a function becomes it's return value. Bourne shell supports 2 types of -return values though. One is the string returned by the function. This -is used whenever the called function returns data. This is captured by -the normal shell commands like this: values="`call_function $1`". The -other type of return value is a single integer. Much like system -calls, these scripts all return 0 for success, and 1 for errors. This -enables the calling function to trap errors, and handle them in a -clean fashion. - - A few good habits to mention, always enclose a sub shell execution -in double quotes. If the returned string contains spaces, this -preserves the data, otherwise it'll get truncated. - - Another good habit is to always prepend a character when doing -string comparisons. If one of the two strings is undefined, the script -will abort. So always using "test x${foo} = xbar" prevents that. - +This project has been reamed and moved to: https://git.linaro.org/toolchain/abe.git diff --git a/bench/create-tables.sql b/bench/create-tables.sql deleted file mode 100644 index 81d86d2..0000000 --- a/bench/create-tables.sql +++ /dev/null @@ -1,185 +0,0 @@ --- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64) --- --- Host: localhost Database: benchmark --- ------------------------------------------------------ --- Server version 5.5.31-0ubuntu0.12.04.1 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `benchrun` --- - -DROP TABLE IF EXISTS `benchrun`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `benchrun` ( - `date` datetime NOT NULL, - `benchmark` varchar(30) NOT NULL, - `base_result` float NOT NULL, - `status` enum('IDLE','RUNNING','DONE') NOT NULL, - `target_arch` varchar(72) NOT NULL, - `build_arch` varchar(72) NOT NULL, - `build_machine` varchar(72) NOT NULL, - `build_os` varchar(72) NOT NULL, - `codename` varchar(72) NOT NULL, - `enabled_cores` int(3) NOT NULL, - `enabled_chips` int(3) NOT NULL, - `cores_per_chip` int(3) NOT NULL, - `threads_per_core` int(3) NOT NULL, - `build_gcc` varchar(72) NOT NULL, - `target_gcc` varchar(72) NOT NULL, - `binutils_version` varchar(72) NOT NULL, - `libc_version` varchar(72) NOT NULL, - `peak_result` int(6) NOT NULL, - `ram` int(11) NOT NULL, - `benchrun` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `benchrun` --- - -LOCK TABLES `benchrun` WRITE; -/*!40000 ALTER TABLE `benchrun` DISABLE KEYS */; -/*!40000 ALTER TABLE `benchrun` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `coremark` --- - -DROP TABLE IF EXISTS `coremark`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `coremark` ( - `compiler_version` varchar(72) NOT NULL, - `os_speed_mhz` int(6) NOT NULL, - `coremark_mhz` int(6) NOT NULL, - `coremark_core` float NOT NULL, - `parallel_execucution` float NOT NULL, - `eembc` float NOT NULL, - `coremark` int(6) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `coremark` --- - -LOCK TABLES `coremark` WRITE; -/*!40000 ALTER TABLE `coremark` DISABLE KEYS */; -/*!40000 ALTER TABLE `coremark` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `eembc` --- - -DROP TABLE IF EXISTS `eembc`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `eembc` ( - `fixme1` int(11) NOT NULL, - `fixme2` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `eembc` --- - -LOCK TABLES `eembc` WRITE; -/*!40000 ALTER TABLE `eembc` DISABLE KEYS */; -/*!40000 ALTER TABLE `eembc` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spec_2000` --- - -DROP TABLE IF EXISTS `spec_2000`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spec_2000` ( - `test` enum('CINT','CFP') NOT NULL, - `benchmark` varchar(72) NOT NULL, - `reference_time` time NOT NULL, - `base_runtime` int(11) NOT NULL, - `base_ratio` float NOT NULL, - `runtime` int(11) NOT NULL, - `ratio` float NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spec_2000` --- - -LOCK TABLES `spec_2000` WRITE; -/*!40000 ALTER TABLE `spec_2000` DISABLE KEYS */; -/*!40000 ALTER TABLE `spec_2000` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spec_2006` --- - -DROP TABLE IF EXISTS `spec_2006`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spec_2006` ( - `benchmark` varchar(72) NOT NULL, - `base_seconds` int(11) NOT NULL, - `base_ratio` float NOT NULL, - `peak_seconds` int(11) NOT NULL, - `peak_ratio` float NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spec_2006` --- -CREATE TABLE `tabulate` ( - `testname` varchar(72) NOT NULL, - `version` varchar(72) NOT NULL, - `klass` varchar(6) NOT NULL, - `variant` varchar(72) NOT NULL, - `subname` varchar(72) NOT NULL, - `nsamples` int(11) NOT NULL, - `min` float NOT NULL, - `max` float NOT NULL, - `best` float NOT NULL, - `span` float NOT NULL, - `mean` float NOT NULL, - `std` float NOT NULL, - `median` float NOT NULL, - `benchrun` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -LOCK TABLES `spec_2006` WRITE; -/*!40000 ALTER TABLE `spec_2006` DISABLE KEYS */; -/*!40000 ALTER TABLE `spec_2006` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2013-05-17 13:33:36 diff --git a/bench/host2sql.sh b/bench/host2sql.sh deleted file mode 100755 index 1aa7b48..0000000 --- a/bench/host2sql.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh - -# -# The EEMBC and Coremark benchmarks write a 'host.txt' file, which contains the -# information we need to document this benchmark run. -# - -# These are required to access the database -user="USER" -passwd="PASSWD" -benchrun=0 -tmpdir="/tmp" - -if test x"$1" != x; then - hostdir=$1 - hostfile=${hostdir}/host.txt -else - hostdir=${PWD} - hostfile=${hostdir}/host.txt -fi - -if test ! -e ${hostfile} -a ! -e ${hostdir}/benchmarks.txt; then - echo "ERROR: no data to parse!" - exit 1 -fi - -build_machine="`basename ${hostdir}| sed -e 's:^.*-::'`" - -# Check the environment for the database access information -if test x"${CBUILD_DBUSER}" != x; then - user="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - passwd="${CBUILD_DBPASSWD}" -fi - -# Get an index number, which is just one more than the total number of testruns -benchrun="`mysql -uroot -pfu=br --local benchmark -e 'select count(*) from benchrun;' | tail -1 | tr -d '\n'`" -benchrun="`expr ${benchrun} + 1`" - -date="`grep -A1 '^date:' ${hostfile} | tail -1`" - -benchmark="EEMBC" -base_result= -status= # enum('IDLE','RUNNING','DONE') -enabled_cores= -cores_per_chip= -threads_per_core= -target_arch="`grep "configured for a target of" ${hostfile} | sed -e 's/^.*\`//' -e 's/.\.//'`" -build_arch="`grep -A1 '^uname:' ${hostfile} | tail -1 | cut -d ' ' -f 14`" -build_os="`grep -A1 '^uname:' ${hostfile} | tail -1 | cut -d ' ' -f 3-4`" -enabled_chips="`grep '^processor' ${hostfile} | wc -l`" -codename="`grep '^Codename' ${hostfile} | cut -f 2`" -build_gcc="`grep -A1 '^gcc:' ${hostfile} | tail -1 | cut -d ' ' -f 2`" -binutils_version="`grep -A1 '^as:' ${hostfile} | tail -1 | cut -d ' ' -f 2`" -libc_version="`grep -A1 '^ldd:' ${hostfile} | tail -1 | cut -d ' ' -f 2-4`" -peak_result= -ram="`grep '^Mem:' ${hostfile} | cut -d ' ' -f 8`" -target_gcc="`grep mkdir ${hostdir}/toplevel.txt | head -1 | cut -d ' ' -f 3`" - -dump() -{ - echo "Date benchmark run: ${date}" - echo "Benchmark is: ${benchmark}" - echo "Base Result: ${base_result}" - echo "Status: ${status}" - echo "Target architcture: ${target_arch}" - echo "Build architecture: ${build_arch}" - echo "Build machine: ${build_machine}" - echo "Build os: ${build_os}" - echo "Codename: ${codename}" - echo "Enabled Cores are: ${enabled_cores}" - echo "Enabled chips are: ${enabled_chips}" - echo "Core per chip are: ${cores_per_chip}" - echo "Threads per Core are: ${threads_per_core}" - echo "GCC used for build is: ${build_gcc}" - echo "Target GCC version is: ${target_gcc}" - echo "Binutils used for build is: ${binutils_version}" - echo "Libc used for build is: ${libc_version}" - echo "Peak Result is: ${peak_result}" - echo "RAM: ${ram}" - echo "benchrun: ${benchrun}" -} - -# Produce an SQL formatted text file to import the data for this -# benchmark run. This function only accesses the global data from -# parsing the ${hostfile} file. -sql() -{ - outfile="${tmpdir}/host.sql" - rm -f ${outfile} - - if test x"${target_arch}" = x; then - echo "ERROR: Couldn't get host config info for ${hostfile}" - exit - fi - # Add header comment incase we ever have to edit this file manually - echo "# date | benchmark | base_result | status | target_arch | build_arch | build_machine | build_os | codename | enabled_cores | enabled_chips | cores_per_chip | threads_per_core | gcc_version | binutils_version | libc_version | peak_result | ram" > ${outfile} - - echo -n "INSERT INTO benchrun VALUES " >> ${outfile} - - echo -n "('${date}'" >> ${outfile} - echo -n ",'${benchmark}'" >> ${outfile} - echo -n ",'${base_result}'" >> ${outfile} - echo -n ",'${status}'" >> ${outfile} - echo -n ",'${target_arch}'" >> ${outfile} - echo -n ",'${build_arch}'" >> ${outfile} - echo -n ",'${build_machine}'" >> ${outfile} - echo -n ",'${build_os}'" >> ${outfile} - echo -n ",'${codename}'" >> ${outfile} - echo -n ",'${enabled_cores}'" >> ${outfile} - echo -n ",'${enabled_chips}'" >> ${outfile} - echo -n ",'${cores_per_chip}'" >> ${outfile} - echo -n ",'${threads_per_core}'" >> ${outfile} - echo -n ",'${build_gcc}'" >> ${outfile} - echo -n ",'${target_gcc}'" >> ${outfile} - echo -n ",'${binutils_version}'" >> ${outfile} - echo -n ",'${libc_version}'" >> ${outfile} - echo -n ",'${peak_result}'" >> ${outfile} - echo -n ",'${ram}'" >> ${outfile} - echo -n ",'${benchrun}'" >> ${outfile} - - echo ");" >> ${outfile} -} - -dump -sql - -# Write the data into the benchmark.benchrun table -mysql -u${user} -p${passwd} --local benchmark < /${tmpdir}/host.sql diff --git a/bench/make-benchdata.sh b/bench/make-benchdata.sh deleted file mode 100755 index 23742d0..0000000 --- a/bench/make-benchdata.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# -# This script executes a series of SQL calls to our testing -# database, and makes a data file for gnuplot. -# - -# These are required to access the database -user="USER" -passwd="PASSWD" -tmpdir="/tmp" - -# Check the environment for the database access information -if test x"${CBUILD_DBUSER}" != x; then - user="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - passwd="${CBUILD_DBPASSWD}" -fi - -# Create the output file -rm -f ${outfile} - -# Extract the list of arc supported for these results -benchmarks=`mysql -u${user} -p${passwd} --local -e "SELECT DISTINCT(testname) FROM benchmark.tabulate" | sed -e 's/testname//' | tr '[:upper:]' '[:lower:]'` - -# Get rid of the embedded newlines -benchmarks=`echo ${benchmarks} | tr -d '\n'` - -echo -n "Processing data " -for i in ${benchmarks}; do - rm -f $i.*.data - echo -n " $i..." - runs=`mysql -u${user} -p${passwd} --local -e "SELECT DISTINCT(benchrun) FROM benchmark.tabulate WHERE testname='$i'" | sed -e 's/benchrun//'` - for j in ${runs}; do - binfo=`mysql -u${user} -p${passwd} --local -e "SELECT date,target_arch,build_arch,build_machine,build_os,codename,build_gcc,target_gcc,binutils_version,libc_version FROM benchmark.benchrun WHERE benchrun='$j'" | tail -1 | tr -d '\n'` - # Split the query result into fields - date="`echo ${binfo} | cut -d ' ' -f 1-2 | cut -d ' ' -f 1`" - target_arch=`echo ${binfo} | cut -d ' ' -f 3` - build_arch=`echo ${binfo} | cut -d ' ' -f 4` - build_machine=`echo ${binfo} | cut -d ' ' -f 5` - build_os=`echo ${binfo} | cut -d ' ' -f 6-7 | cut -d ' ' -f 1` - codename=`echo ${binfo} | cut -d ' ' -f 8` - build_gcc=`echo ${binfo} | cut -d ' ' -f 9` - target_gcc=`echo ${binfo} | cut -d ' ' -f 10` - binutils_version=`echo ${binfo} | cut -d ' ' -f 11` - libc_version=`echo ${binfo} | cut -d ' ' -f 12-14` - - bdata=`mysql -u${user} -p${passwd} --local -e "SELECT version,variant,min,max,best,span,mean,std,median,benchrun FROM benchmark.tabulate WHERE testname='$i' AND benchrun='$j'" | tail -1` - - # Get rid of the embedded newlines - bdata=`echo ${bdata} | tr -d '\n'` - - # Split the query result into fields - version=`echo ${bdata} | cut -d ' ' -f 1` - variant=`echo ${bdata} | cut -d ' ' -f 2` - min=`echo ${bdata} | cut -d ' ' -f 3` - max=`echo ${bdata} | cut -d ' ' -f 4` - best=`echo ${bdata} | cut -d ' ' -f 5` - span=`echo ${bdata} | cut -d ' ' -f 6` - mean=`echo ${bdata} | cut -d ' ' -f 7` - std=`echo ${bdata} | cut -d ' ' -f 8` - median=`echo ${bdata} | cut -d ' ' -f 9` - benchrun=`echo ${bdata} | cut -d ' ' -f 10` - - # Do some filtering as some of the data is way out of range from a bad - # benchmark run. This screws up accurate graphing. - if test x"$i" = x"eembc"; then - # test runs that had problems produce bad data, so here we filter out - # anything wildly out of range - value="`echo ${best} | sed -e 's:\.[0-9]*::'`" - if test ${value} -gt 20 -o ${value} -lt 0; then - echo "WARNING: ${best} is out of range for EEMBC!" - continue; - fi - # here we filter out other bad parsing data. sometimes if a field is - # missing, things get out of order, and the target_gcc being wrong is - # a good clue this data is bogus - if test `echo ${target_gcc} | grep -c gcc` -eq 0; then - echo "WARNING: ${target_gcc} is invalid!" - continue; - fi - fi - if test x"$i" = x"denbench"; then - value="`echo ${best} | sed -e 's:\.[0-9]*::'`" - #echo "FIXME: Denbench ${value}" - if test ${value} -gt 20 -o ${value} -lt 9; then - echo "WARNING: ${value} is out of range for Denbench!" - continue; - fi - fi - if test x"$i" = x"spec2000"; then - value="`echo ${best} | sed -e 's:\.[0-9]*::'`" - if test ${value} -lt 300; then - echo "WARNING: ${value} is out of range for Spec2000!" - continue; - fi - fi - if test x"$i" = x"coremark"; then - value="`echo ${best} | sed -e 's:\.[0-9]*::'`" - if test ${value} -gt 2800; then - echo "WARNING: ${value} is out of range for Coremark!" - continue; - fi - fi - # Write the data line - touch $i.${build_machine}.data - # Don't add any gcc-binary results - if test `echo ${target_gcc} | grep -c 'gcc-binary'` -eq 0; then - gcc_version="`echo ${target_gcc} | sed -e 's:gcc-linaro-::'`" - echo "${date} ${gcc_version} ${variant} ${min} ${max} ${best} ${span} ${mean} ${std} ${median} ${build_machine}" >> $i.${build_machine}.data - fi - done -done - -# Sort the data by version number -for k in $i.*.data; do - mv -f $k /tmp/tmp.data - sort -V -k 2 /tmp/tmp.data > $k - rm /tmp/tmp.data -done diff --git a/bench/make-datafiles.sh b/bench/make-datafiles.sh deleted file mode 100644 index 87422e9..0000000 --- a/bench/make-datafiles.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# -# This script executes a series of SQL calls to our benchmark -# database, and makes a data file for gnuplot. -# -if test $# -eq 0; then - echo "ERROR: no benchrun numbers specified!" - exit -fi - -user="USER" -passwd="PASSWD" -benchrun=0 -tmpdir="/tmp" -outfile="benchrun.data" - -# Check the environment for the database access information -if test x"${CBUILD_DBUSER}" != x; then - user="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - passwd="${CBUILD_DBPASSWD}" -fi - -# Create the output file -rm -f ${outfile} - -# Add a header to make the file human readable -echo "# FIXME: " > ${outfile} - -for benchrun in $*; do - # Get the build info - binfo=`mysql -u${user} -p${passwd} --local -e "SELECT tool,arch,date,version FROM dejagnu.benchruns WHERE benchrun=${benchrun}" | tail -1` - - # Get rid of the embedded newlines - binfo=`echo $binfo | tr -d '\n'` - - # Split the query result into fields - tool=`echo ${binfo} | cut -d ' ' -f 1` - arch=`echo ${binfo} | cut -d ' ' -f 2` - - # Write the data line - echo "${date} " >> ${outfile} -done - -# Extract the list of architectures supported for these results -arches="`cat benchrun.data | grep -v '#' | cut -d ' ' -f 4 | sort | uniq`" -# echo "Architectures for this set of results: ${arches}" - -# Make a separate data file for each architecture so gnuplot can keep them organized -for i in ${arches}; do - grep $i benchrun.data | sort -n > $i.data -done - -rm benchrun.data diff --git a/bench/plot-bench.sh b/bench/plot-bench.sh deleted file mode 100755 index 02586d2..0000000 --- a/bench/plot-bench.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# NOTE: because this script uses arrays, it needs to be run using 'bash'. not 'dash' - -if test "$#" -eq 0; then - echo "Need to supply a graph name!" - name="eembc" -else - name=$1 -fi - -# lines dots steps errorbars xerrorbar xyerrorlines -# points impulses fsteps errorlines xerrorlines yerrorbars -# linespoints labels histeps financebars xyerrorbars yerrorlines -# vectors -# or -# boxes candlesticks image circles -# boxerrorbars filledcurves rgbimage ellipses -# boxxyerrorbars histograms rgbalpha pm3d -# boxplot - -# specify a different line style -itype="" -type="with lines" - -#echo "plot "\'eembc.data\'" using (\$7) title "\'Min\'" lt rgb "\'green\'" ${type}, '' using (\$8) title "\'Max\'" lt rgb "\'red\'" ${type}, '' using (\$11) title "\'Best\'" lt rgb "\'cyan\'" ${type}" >> gnuplot.cmd -#plot "\'eembc.data\'" using (\$4) title "\' Min\'" lt rgb "\'red\'" ${type}, '' using (\$5) title "\'Max\'" lt rgb "\'green\'" ${type}" - -# setup aarray of colors, since the number of data files varies -declare -a colors=('red' 'green' 'cyan' 'blue' 'purple' 'brown' 'coral' 'aqua') - -# We could get these from the database, but right now this script isn't setup -# for dirct MySQL access -benchmarks="eembc coremark denbench eembc_office spec2000" -variants="o3-neon o3-arm o3-armv6 o3-vfpv3" -machines="cortexa9r1 armv5r2 x86_64r1 cortexa8r1 cortexa9hfr1 armv6r1" - -for i in ${benchmarks}; do - cindex=0 - rm -f gnuplot-$i.cmd - for j in ${machines}; do - if test -f $i.$j.data; then - if test ${cindex} -eq 0; then - cat <<EOF >gnuplot-$i.cmd -set boxwidth 0.9 relative -set style data histograms -set style histogram cluster -set style fill solid 1.0 border lt -1 -set autoscale x -set autoscale y -set title "$i Benchmark Results" -set ylabel "Count" -set xlabel "Architecture" - -# Rotate the X axis labels 90 degrees, so they all fit -set xtics border in scale 1,0.5 nomirror rotate by -90 offset character 0, 0, 0 - -# Out the key in out of the way -set key left top - -set term png size 1900,1024 -set output "benchrun.png" - -set xlabel "gcc-linaro releases" - -set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" -#set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" - -EOF - echo -n "plot \"$i.$j.data\" using (\$6):xtic(2) title \"$j\" lt rgb \"${colors[$cindex]}\" ${type}" >> gnuplot-$i.cmd - - else - echo -n ", \"$i.$j.data\" using (\$6):xtic(1) title \"$j\" lt rgb \"${colors[$cindex]}\" ${type}" >> gnuplot-$i.cmd - fi -# gnuplot gnuplot-$i.cmd & - cindex=`expr $cindex + 1` - fi - done - echo "" >> gnuplot-$i.cmd - echo "set term x11 persist" >> gnuplot-$i.cmd - echo "replot" >> gnuplot-$i.cmd -done diff --git a/bench/run2sql.sh b/bench/run2sql.sh deleted file mode 100755 index bec4e59..0000000 --- a/bench/run2sql.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -# -# This script converts the data in a *-run.txt file, and then imports it into -# a database. -# - -# If there is an argument, process just the one file, otherwise process all -# the *-run.txt files in the directory. -if test x"$1" != x; then - benchrun=$1 -fi - -if test x"$2" != x; then - files="$2" -else - files="`ls *-run.txt`" -fi - -# These are required to access the database -user="USER" -passwd="PASSWD" -benchrun=0 -tmpdir="/tmp" - -# Check the environment for the database access information -if test x"${CBUILD_DBUSER}" != x; then - user="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - passwd="${CBUILD_DBPASSWD}" -fi - -if test x"${benchrun}" = x; then - benchrun="`mysql -uroot -pfu=br --local benchmark -e 'select count(*) from benchrun;' | tail -1 | tr -d '\n'`" -fi - -for runfile in ${files}; do - # The coremark run file is in a different format. - if test x"${runfile}" = x"coremark-o3-neon-run.txt"; then - continue; - fi - if test `grep -c '^Run' ${runfile}` -eq 0; then - echo "WARNING: no run data in ${runfile}" - continue; - fi - # Get the sections within the run file with the data we want - run1="`grep -n 'Run 1' ${runfile} | cut -d ':' -f 1`" - run2="`grep -n 'Run 2' ${runfile} | cut -d ':' -f 1`" - run3="`grep -n 'Run 3' ${runfile} | cut -d ':' -f 1`" - run4="`grep -n 'Run 4' ${runfile} | cut -d ':' -f 1`" - run5="`grep -n 'Run 5' ${runfile} | cut -d ':' -f 1`" - - # Seperate each set of fields - - # delete all the tmp files that may be left over from a previus run - rm -f run?.tmp - - # Split up the run file into separate temp files, one per run - echo "Splitting the run file data into seperate temp files" - sed -e "1,${run1} d" -e "${run2},$ d" ${runfile} > ${tmpdir}/run1.tmp - sed -e "1,${run2} d" -e "${run3},$ d" ${runfile} > ${tmpdir}/run2.tmp - sed -e "1,${run3} d" -e "${run4},$ d" ${runfile} > ${tmpdir}/run3.tmp - sed -e "1,${run4} d" -e "${run5},$ d" ${runfile} > ${tmpdir}/run4.tmp - sed -e "1,${run5} d" ${runfile} > ${tmpdir}/run5.tmp - - # The run files are just test files with fields delimited bt a TAB character. - # MySQL can import these directly, so no more data massaging is necessary. - echo "Adding the run file data into the benchmark.eembc table" - mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${tmpdir}/run1.tmp' INTO TABLE benchmark.eembc FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" - mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${tmpdir}/run2.tmp' INTO TABLE benchmark.eembc FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" - mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${tmpdir}/run3.tmp' INTO TABLE benchmark.eembc FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" - mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${tmpdir}/run4.tmp' INTO TABLE benchmark.eembc FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" - mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${tmpdir}/run5.tmp' INTO TABLE benchmark.eembc FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" -done diff --git a/bench/tab2sql.sh b/bench/tab2sql.sh deleted file mode 100755 index 5c051f3..0000000 --- a/bench/tab2sql.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# -# This script converts the data in a tabulated benchmark.txt file, and then -# imports it into a database. -# - -if test x"$1" != x; then - infile="$1/benchmarks.txt" -else - infile="./benchmarks.txt" -fi - -if test x"$2" != x; then - benchrun=$2 -fi - -if test x"${benchrun}" = x; then - benchrun="`mysql -uroot -pfu=br --local benchmark -e 'select count(*) from benchrun;' | tail -1 | tr -d '\n'`" -fi - -# These are required to access the database -user="USER" -passwd="PASSWD" -tmpdir="/tmp" -outfile="${tmpdir}/bench.tmp" - -# Check the environment for the database access information -if test x"${CBUILD_DBUSER}" != x; then - user="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - passwd="${CBUILD_DBPASSWD}" -fi - -# The benchmark.txt files are just test files with fields delimited by a -# TAB character. MySQL can import these directly, so no more data massaging -# is necessary. - -rm -f ${outfile} -grep -v "testname" ${infile} >> ${outfile} - -echo "Adding the benchmark file data into the benchmark.tabulate table" -mysql -u${user} -p${passwd} --local benchmark -e "LOAD DATA LOCAL INFILE '${outfile}' INTO TABLE benchmark.tabulate FIELDS TERMINATED BY '\t' SET benchrun = '${benchrun}';" diff --git a/cbuild2.sh b/cbuild2.sh deleted file mode 100755 index 42fd0cb..0000000 --- a/cbuild2.sh +++ /dev/null @@ -1,1011 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -usage() -{ - # Format this section with 75 columns. - cat << EOF - ${cbuild2} [''| [--timeout <value>] - [[--build [<package> --stage {1|2}]|all] - |[--checkout <package>|all]] - [--ccache] [--check] [--enable {bootstrap|gerrit}] - [--disable {install|update|make_docs|building}] [--dryrun] [--dump] - [--fetch <url>] [--force] [--host <host_triple>] [--help] - [--list] [--march <march>] [--manifest <manifest_file>] - [--parallel] [--release] [--set {libc}={glibc|eglibc|newlib}] - [--set {languages}={c|c++|fortran|go|lto|objc|java|ada}] - [--set {cflags|ldflags|runtestflgs|makeflags}=XXX] - [--set {package}={toolchain|gdb|sysroot}] - [--snapshots <url>] [--target <target_triple>] [--usage] - [--interactive] - [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib} - =<id|snapshot|url>]] - -EOF - return 0 -} - -help() -{ - # Format this section with 75 columns. - cat << EOF -NAME - - ${cbuild2} - the Linaro Toolchain Build Framework. - -SYNOPSIS - -EOF - usage - cat << EOF -KEY - - [--foo] Optional switch - [<foo>] Optional user specified field - <foo> Non-optional user specified field. - {foo|bar|bat} Non-optional choice field. - [{foo|bar|bat}] Optional choice field. - [foo] Optional field - [''] Optional Empty field - -DESCRIPTION - - ${cbuild2} is a toolchain build framework. The primary purpose of - ${cbuild2} is to unify the method used to build cross, native, and - Canadian-cross GNU toolchains. - -PRECONDITIONS - - Autoconf (configure) must be run in order to construct the build - directory and host.conf file before it is valid to run ${cbuild2}. - -OPTIONS - - '' Specifying no options will display synopsis information. - - --build {<package>|all} - - <package> - To build a package version that corresponds to an - identifier in sources.conf do --build <sources.conf - identifier>, e.g., --build gcc.git. - - To build a package version that corresponds to a - snapshot archive do --build <snapshot fragment>, - e.g., --build gcc-linaro-4.7-2014.01. - - NOTE: to build GCC stage1 or stage2 use the --stage - flag, as described below, along with --build gcc, - e.g. --build gcc --stage 2. - - all - Build the entire toolchain and populate the - sysroot. - - --ccache Use ccache when building packages. - - --check - Run make check on packages. For cross builds this will run - the tests on native hardware. - - --checkout <package>[~branch][@revision]|all - - <package>[~branch][@revision] - This will checkout the package designated by the - <package> source.conf identifier with an optional - branch and/or revision designation. - - all - This will checkout all of the sources for a - complete build as specified by the config/ .conf - files. - - --disable {install} - - install - Disable the make install stage of packages, which - is enabled by default. - - update - Don't update source repositories before building. - - make_docs - Don't make the toolchain package documentation. - - building - Don't build anything. This is only useful when - using --tarbin, --tarsrc, --tarballs. - This is a debugging aid for developers, as it - assumes everything built correctly... - - --dryrun Run as much of ${cbuild2} as possible without doing any - actual configuration, building, or installing. - - --dump Dump configuration file information for this build. - - --enable {bootstrap} - - bootstrap - Enable gcc bootstrapping, which is disabled by - default. - - gerrit - Enable posting comments to Gerrit on the build - progress. - - --fetch <url> - - Fetch the specified URL into the snapshots directory. - - --force Force download packages and force rebuild packages. - - --help|-h Display this usage information. - - --host <host_triple> - - Set the host triple. This represents the machine where - the packages being built will run. For a cross toolchain - build this would represent where the compiler is run. - - --infrastructure Download and install the infrastructure libraries. - - --interactive Interactively select packages from the snapshots file. - - --list List the available snapshots or configured repositories. - - --march <march> - - Specify <march> to be the default target architecture for a - specific toolchain, overriding the default. Example: - - --target arm-linux-gnueabihf --march armv8-a - - Note: There is no cross-checking to make sure that the passed - --target value is compatible with the passed --march value. - - --manifest <manifest_file> - - Source the <manifest_file> to override the default - configuration. This is used to reproduce an identical - toolchain build from manifest files generated by a previous - build. - - --parallel Set the make flags for parallel builds. - - --prefix Set an alternate value for the prefix used to configure. - - --release <name> - The build system will package the resulting toolchain as a - release with the 'name' prefix. - - --set {libc}={glibc|eglibc|newlib} - - The default value is stored in lib/global.sh. This - setting overrides the default. Specifying a libc - other than newlib on baremetal targets is an error. - - --set {cflags|ldflags|runtestflags|makeflags}=XXX - This overrides the default values used for CFLAGS, - LDFLAGS, RUNTESTFLAGS, and MAKEFLAGS. - - --set {package}={toolchain|gdb|sysroot} - This limits the default set of packages to the specified set. - This only applies to the --tarbin, --tarsrc, and --tarballs - command lines options, and are primarily to be only used by - developers. - - --set {labguages}={c|c++|fortran|go|lto|objc|java|ada} - This changes the default set of GCC front ends that get built. - The default set for most platforms is c, c++, go, fortran, - and lto. - - --snapshots /path/to/alternative/local_snapshots/directory - Use an alternative path to a local snapshots directory. - - --stage {1|2} - If --build <*gcc*> is passed, then --stage {1|2} will cause - stage1 or stage2 of gcc to be built. If --build <*gcc*> is - not passed then --stage {1|2} does nothing. - - --tarball - Build source and binary tarballs after a successful build. - - --tarsrc - Build source tarballs after a successful build. - - --tarbin - Build binary tarballs after a successful build. - - --target [<target_triple>|''] - - This sets the target triple. The GNU target triple - represents where the binaries built by the toolchain will - execute. - - '' - Build the toolchain native to the hardware that - ${cbuild2} is running on. - - <target_triple> - - x86_64-none-linux-gnu - arm-none-linux-gnueabi - arm-none-linux-gnueabihf - armeb-none-linux-gnueabihf - aarch64-none-linux-gnu - aarch64-none-elf - aarch64_be-none-elf - aarch64_be-none-linux-gnu - - If <target_triple> is not the same as the hardware - that ${cbuild2} is running on then build the - toolchain as a cross toolchain. - - --timeout <timeout_value> - - Use <timeout_value> as the timeout value for wget when - fetching snapshot packages. - - --usage Display synopsis information. - - [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib}=<id|snapshot|url>] - - This option specifies a particular version of a package - that might differ from the default version in the - package config files. - - For a specific package use a version tag that matches a - setting in a sources.conf file, a snapshots identifier, - or a direct repository URL. - - Examples: - - # Matches an identifier in sources.conf: - glibc=glibc.git - - # Matches a tar snapshot in md5sums: - glibc=eglibc-linaro-2.17-2013.07 - - # Direct URL: - glibc=git://sourceware.org/git/glibc.git - -EXAMPLES - - Build a Linux cross toolchain: - - ${cbuild2} --target arm-none-linux-gnueabihf --build all - - Build a Linux cross toolchain with glibc as the clibrary: - - ${cbuild2} --target arm-none-linux-gnueabihf --set libc=glibc --build all - - Build a bare metal toolchain: - - ${cbuild2} --target aarch64-none-elf --build all - -PRECONDITION FILES - - ~/.cbuildrc ${cbuild2} user specific configuration file - - host.conf Generated by configure from host.conf.in. - -CBUILD GENERATED FILES AND DIRECTORIES - - builds/ All builds are stored here. - - snapshots/ Package sources are stored here. - - snapshots/infrastructure Infrastructure (non-distributed) sources are stored - here. - - snapshots/md5sums The snapshots file of maintained package tarballs. - -AUTHOR - Rob Savoye <rob.savoye@linaro.org> - Ryan S. Arnold <ryan.arnold@linaro.org> - -EOF - return 0 -} - -# If there are no command options output the usage message. -if test $# -lt 1; then - echo "Usage:" - usage - echo "Run \"${cbuild2} --help\" for detailed usage information." - exit 1 -fi - -if test "`echo $* | grep -c -- -help`" -gt 0; then - help - exit 0 -fi - -# load the configure file produced by configure -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -else - echo "ERROR: no host.conf file! Did you run configure?" 1>&2 - exit 1 -fi - -# load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" - -. "${topdir}/lib/common.sh" || exit 1 - -# this is used to launch builds of dependant components -command_line_arguments=$* - -# -# These functions actually do something -# - -# Determine whether the clibrary setting passed as $1 is compatible with the -# designated target. -crosscheck_clibrary_target() -{ - local test_clibrary=$1 - local test_target=$2 - case ${test_target} in - arm*-eabi|aarch64*-*elf|*-mingw32) - # Bare metal targets only support newlib. - if test x"${test_clibrary}" != x"newlib"; then - error "${test_target} is only compatible with newlib." - return 1 - fi - ;; - *) - # No specified target, or non-baremetal targets. - ;; - esac - return 0 -} - -set_package() -{ - local package="`echo $1 | cut -d '=' -f 1`" - local setting="`echo $* | cut -d '=' -f 2-3`" - - case ${package} in - languages|la*) - with_languages="${setting}" - notice "Setting list of languages to build to ${setting}" - return 0 - ;; - packages|pa*) - with_packages="${setting}" - notice "Setting list of packages to build to ${setting}" - return 0 - ;; - runtestflags|ru*) - override_runtestflags="${setting}" - notice "Overriding ${setting} to RUNTESTFLAGS" - return 0 - ;; - makeflags|ma*) -# override_makeflags="${setting}" - set make_flags="${make_flags} ${setting}" - notice "Overriding ${setting} to MAKEFLAGS" - return 0 - ;; - ldflags|ld*) - override_ldflags="${setting}" - notice "Overriding ${setting} to LDFLAGS" - return 0 - ;; - cflags|cf*) - override_cflags="${setting}" - notice "Overriding ${setting} to CFLAGS" - return 0 - ;; - libc) - # Range check user input against supported C libraries. - case ${setting} in - glibc|eglibc|newlib) - - # Verify that the user specified libc is compatible with - # the user specified target. - crosscheck_clibrary_target ${setting} ${target} - if test $? -gt 0; then - return 1 - fi - - clibrary="${setting}" - notice "Using '${setting}' as the C library as directed by \"--set libc=${setting}\"." - return 0 - ;; - *) - error "'${setting}' is an unsupported libc option." - ;; - esac - ;; - *) - error "'${package}' is not a supported package for --set." - ;; - esac - - return 1 -} - -build_failure() -{ - local time="`expr ${SECONDS} / 60`" - error "Build process failed after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 1 - fi - exit 1 -} - -build_success() -{ - local time="`expr ${SECONDS} / 60`" - notice "Build process succeeded after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 0 - fi - - return 0 -} - -test_success() -{ - local time="`expr ${SECONDS} / 60`" - notice "Test run completed after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 6 - fi - - return 0 -} - -# Switches that require a following directive need to make sure they don't -# parse the -- of the following switch. -check_directive() -{ - switch="$1" - long="$2" - short="$3" - directive="$4" - - if test `echo ${switch} | grep -c "\-${short}.*=" ` -gt 0; then - error "A '=' is invalid after --${long}. A space is expected between the switch and the directive." - elif test x"$directive" = x; then - error "--${long} requires a directive. See --usage for details.' " - build_failure - elif test `echo ${directive} | egrep -c "^\-+"` -gt 0; then - error "--${long} requires a directive. ${cbuild2} found the next -- switch. See --usage for details.' " - else - return 0 - fi - build_failure -} - -# This gets a list from a remote server of the available tarballs. We use HTTP -# instead of SSH so it's more accessible to those behind nasty firewalls. -# base - already checkout out source trees -# snapshots - tarballs of various source snapshots -# prebuilt - prebuilt executables -get_list() -{ - echo "Get version list for $1..." - - # http://cbuild.validation.linaro.org/snapshots - case $1 in - testcode|t*) - testcode="`grep testcode ${local_snapshots}/testcode/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" - echo "${testcode}" - ;; - snapshots|s*) - snapshots="`egrep -v "\.asc|\.diff|\.txt|xdelta|base|infrastructure|testcode" ${local_snapshots}/md5sums | cut -d ' ' -f 3`" - echo "${snapshots}" - ;; - infrastructure|i*) - infrastructure="`grep infrastructure ${local_snapshots}/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" - echo "${infrastructure}" - ;; - esac - return 0 -} - -# Get some info on the build system -# $1 - If specified, it's the hostname of the remote system -get_build_machine_info() -{ - if test x"$1" = x; then - cpus="`getconf _NPROCESSORS_ONLN`" - libc="`getconf GNU_LIBC_VERSION`" - kernel="`uname -r`" - build_arch="`uname -p`" - hostname="`uname -n`" - distribution="`lsb_release -sc`" - else - # FIXME: this assumes the user has their ssh keys setup to the point - # where the don't need a password but is secure. - echo "Getting config info from $1" - cpus="`ssh $1 getconf _NPROCESSORS_ONLN`" - libc="`ssh $1 getconf GNU_LIBC_VERSION`" - kernel="`ssh $1 uname -r`" - build_arch="`ssh $1 uname -p`" - hostname="`ssh $1 uname -n`" - distribution="`ssh $1 lsb_release -sc`" - fi -} - -# Takes no arguments. Dumps all the important config data -dump() -{ - # These variables are always determined dynamically at run time - echo "Target is: ${target}" - echo "GCC is: ${gcc}" - echo "GCC version: ${gcc_version}" - echo "Sysroot is: ${sysroots}" - echo "C library is: ${clibrary}" - - # These variables have default values which we don't care about - echo "Binutils is: ${binutils}" - echo "Config file is: ${configfile}" - echo "Snapshot URL is: ${local_snapshots}" - echo "DB User name is: ${dbuser}" - echo "DB Password is: ${dbpasswd}" - - echo "Build # cpus is: ${cpus}" - echo "Kernel: ${kernel}" - echo "Build Arch: ${build_arch}" - echo "Hostname: ${hostname}" - echo "Distribution: ${distribution}" - - echo "Bootstrap ${bootstrap}" - echo "Gerrit ${gerrit}" - echo "Install ${install}" - echo "Source Update ${supdate}" - echo "Make Documentation ${make_docs}" - - if test x"${default_march}" != x; then - echo "Default march ${default_march}" - fi -} - -export PATH="${local_builds}/destdir/${build}/bin:$PATH" - -# do_ switches are commands that should be executed after processing all -# other switches. -do_dump= -do_checkout= -do_build= -do_build_stage=stage2 - -# Process the multiple command line arguments -while test $# -gt 0; do - # Get a URL for the source code for this toolchain component. The - # URL can be either for a source tarball, or a checkout via svn, bzr, - # or git - case "$1" in - --bu*|-bu*) # build - check_directive $1 build bu $2 - - # Save and process this after all other elements have been processed. - do_build="$2" - - # Shift off the 'all' or the package identifier. - shift - ;; - --check|-check) - runtests=yes - ;; - --checkout*|-checkout*) - check_directive $1 checkout "checkout" $2 - # Save and process this after all other elements have been processed. - do_checkout="$2" - - # Shift off the 'all' or the package identifier. - shift - ;; - --march*|-march*) - check_directive $1 march "march" $2 - default_march=$2 - shift - ;; - --host|-h*) - host=$2 - shift - ;; - --manifest*|-m*) - check_directive $1 manifest "m" $2 - # source a manifest file if there is one - if test -f $2 ; then - . $2 - fi - echo $gcc_version - ;; - # download and install the infrastructure libraries GCC depends on - --inf*|infrastructure) - infrastructure - ;; - --pr*|--prefix*) - check_directive $1 prefix "pr" $2 - prefix=$2 - shift - ;; - --sy*) # sysroot - set_sysroot ${url} - shift - ;; - --ccache|-cc*) - use_ccache=yes - ;; - --clean|-cl*) - clean_build ${url} - shift - ;; - --config) - set_config ${url} - shift - ;; - --db-user) - set_dbuser ${url} - shift - ;; - --db-passwd) - set_dbpasswd ${url} - shift - ;; - --dry*|-dry*) - dryrun=yes - ;; - --dump) - do_dump=yes - #dump ${url} - #shift - ;; - --fetch|-d) - fetch ${url} - shift - ;; - --force|-f) - force=yes - ;; - --interactive|-i) - interactive=yes - ;; - --list|-l) - get_list $2 - shift - ;; - --nodepends|-n) # nodepends - nodepends=yes - ;; - --parallel|-par*) # parallel - parallel=yes - ;; - --rel*|-rel*) - check_directive $1 release "rel" $2 - release=$2 - shift - ;; - --set*|-set*) - check_directive $1 set "set" $2 - - # Test if --target follows the --set command put --set and it's - # directive on to the back of the inputs. This is because clibrary - # validity depends on the target. - if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then - # Push $1 and $2 onto the back of the inputs for later processing. - set -- $@ $1 $2 - # Shift off them off the front. - shift 2; - continue; - fi - - set_package $2 - if test $? -gt 0; then - # The failure particular reason is output within the - # set_package function. - build_failure - fi - shift - ;; - --snap*|-snap*) - check_directive $1 snapshots snap $2 - local_snapshots=$2 - shift - ;; - --sta*|-sta*) - check_directive $1 stage sta $2 - if test x"$2" != x"2" -a x"$2" != x"1"; then - error "--stage requires a 2 or 1 directive." - build_failure - fi - do_build_stage="stage$2" - shift - ;; - --tarball*|-tarba*) - tarsrc=yes - tarbin=yes - ;; - --tarbin*|-tarbi*) - tarbin=yes - ;; - --tarsrc*|-tars*) - tarsrc=yes - ;; - --targ*|-targ*) # target - check_directive $1 target targ $2 - - target=$2 - sysroots=${sysroots}/${target} - - # Certain targets only make sense using newlib as the default - # clibrary. Override the normal default in lib/global.sh. The - # user might try to override this with --set libc={glibc|eglibc} - # or {glibc|eglibc}=<foo> but that will be caught elsewhere. - case ${target} in - arm*-eabi*|arm*-elf|aarch64*-*elf|*-mingw32) - clibrary="newlib" - ;; - *) - ;; - esac - shift - ;; - --testcode|te*) - testcode - ;; - --time*|-time*) - check_directive $1 timeout "time" $2 - if test $2 -lt 11; then - wget_timeout=$2 - else - # FIXME: Range check for non-numerical values. - wget_timeout=10 - fi - shift - ;; - # These steps are disabled by default but are sometimes useful. - --enable*|--disable*) - case "$1" in - --enable*) - check_directive $1 "enable" "enable" $2 - value="yes" - ;; - --disable*) - check_directive $1 "disable" "disable" $2 - value="no" - ;; - *) - error "Internal failure. Should never happen." - build_failure - ;; - esac - - case $2 in - bootstrap) - bootstrap="${value}" - ;; - gerrit) - gerrit="${value}" - # Initialize settings for gerrit - gerrit_info $HOME - if test x"${gerrit_branch}" != x; then - gcc_version="gcc.git~${gerrit_branch}@${gerrit_revision}" - fi - ;; - alltests) - alltests="${value}" - ;; - install) - install="${value}" - ;; - building) - building="${value}" - ;; - parallel) - parallel="$value" - ;; - schroot_test) - schroot_test="${value}" - ;; - update) - supdate="${value}" - ;; - - make_docs) - make_docs="${value}" - ;; - *) - error "$2 not recognized as a valid $1 directive." - build_failure - ;; - esac - shift - ;; - --merge*) - check_directive $1 merge merge $2 - merge_branch $2 - shift - ;; - --merge-diff*) - check_directive $1 "merge-diff" "merge-diff" $2 - merge_diff $2 - shift - ;; - --clobber) - clobber=yes - ;; - --help|-h|--h) - help - exit 0 - ;; - --usage) - echo "Usage:" - usage - echo "Run \"${cbuild2} --help\" for detailed usage information." - exit 0 - ;; - *) - if test `echo $1 | grep -c =` -gt 0; then - name="`echo $1 | cut -d '=' -f 1`" - value="`echo $1 | cut -d '=' -f 2`" - case ${name} in - b*|binutils) - binutils_version="`echo ${value}`" - ;; - gc*|gcc) - gcc_version="${value}" - ;; - gm*|gmp) - gmp_version="${value}" - ;; - gd*|gdb) - gdb_version="${value}" - ;; - mpf*|mpfr) - mpfr_version="${value}" - ;; - mpc) - mpc_version="${value}" - ;; - eglibc|glibc|newlib) - # Test if --target follows one of these clibrary set - # commands. If so, put $1 onto the back of the inputs. - # This is because clibrary validity depends on the target. - if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then - # Push $1 onto the back of the inputs for later processing. - set -- $@ $1 - # Shift it off the front. - shift - continue; - fi - - # Only allow valid combinations of target and clibrary. - crosscheck_clibrary_target ${name} ${target} - if test $? -gt 0; then - build_failure - fi - # Continue to process individually. - case ${name} in - eglibc) - clibrary="eglibc" - eglibc_version="${value}" - ;; - glibc) - clibrary="glibc" - glibc_version="${value}" - ;; - n*|newlib) - clibrary="newlib" - newlib_version="${value}" - ;; - *) - ;; - esac - ;; - *) - ;; - esac - else - error "$1: Command not recognized." - build_failure - fi - ;; - esac - if test $# -gt 0; then - shift - fi -done - -# if test x"${tarbin}" = x"yes" -o x"${tarsrc}" = x"yes"; then -# warning "No testsuite will be run when building tarballs!" -# runtests=no -# fi - -timeout_save=${wget_timeout} -wget_timeout=10 -# Get the md5sums file, which is used later to get the URL for remote files -fetch md5sums -wget_timeout=${timeout_save} - -if test ! -z ${do_dump}; then - dump -fi - -if test ! -z ${do_checkout}; then - if test x"${do_checkout}" != x"all"; then - url="`get_source ${do_checkout}`" - if test $? -gt 0; then - error "Couldn't find the source for ${do_checkout}" - build_failure - fi - - checkout ${url} - if test $? -gt 0; then - error "--checkout ${url} failed." - build_failure - fi - else - checkout_all - if test $? -gt 0; then - error "--checkout all failed." - build_failure - fi - fi -fi - -if test ! -z ${do_build}; then - if test x"${do_build}" != x"all"; then - gitinfo="`get_source ${do_build}`" - if test x"${gitinfo}" = x; then - error "Couldn't find the source for ${do_build}" - build_failure - else - build_param= - # If we're just building gcc then we need to pick a 'stage'. - # The user might have specified a stage so we use that if - # it's set. - if test `echo ${do_build} | grep -c "gcc"` -gt 0; then - build_param=${do_build_stage} - fi - build ${gitinfo}${build_param:+ ${build_param}} - if test $? -gt 0; then - error "Building ${gitinfo} failed." - build_failure - fi - fi - else - buildingall=yes - build_all - if test $? -gt 0; then - error "Build all failed." - build_failure - fi - fi -fi - -time="`expr ${SECONDS} / 60`" -if test ! -z ${do_build}; then - notice "Complete build process took ${time} minutes" -elif test ! -z ${do_checkout}; then - notice "Complete checkout process took ${time} minutes" -fi -exit 0 diff --git a/config.guess b/config.guess deleted file mode 100755 index d622a44..0000000 --- a/config.guess +++ /dev/null @@ -1,1530 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# 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 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -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` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.rpath b/config.rpath deleted file mode 100755 index 17298f2..0000000 --- a/config.rpath +++ /dev/null @@ -1,672 +0,0 @@ -#! /bin/sh -# Output a system dependent set of variables, describing how to set the -# run time search path of shared libraries in an executable. -# -# Copyright 1996-2010 Free Software Foundation, Inc. -# Taken from GNU libtool, 2001 -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld -# should be set by the caller. -# -# The set of defined variables is at the end of this script. - -# Known limitations: -# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer -# than 256 bytes, otherwise the compiler driver will dump core. The only -# known workaround is to choose shorter directory names for the build -# directory and/or the installation directory. - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -shrext=.so - -host="$1" -host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -# Code taken from libtool.m4's _LT_CC_BASENAME. - -for cc_temp in $CC""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` - -# Code taken from libtool.m4's _LT_COMPILER_PIC. - -wl= -if test "$GCC" = yes; then - wl='-Wl,' -else - case "$host_os" in - aix*) - wl='-Wl,' - ;; - darwin*) - case $cc_basename in - xlc*) - wl='-Wl,' - ;; - esac - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' - ;; - irix5* | irix6* | nonstopux*) - wl='-Wl,' - ;; - newsos6) - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - ecc*) - wl='-Wl,' - ;; - icc* | ifort*) - wl='-Wl,' - ;; - lf95*) - wl='-Wl,' - ;; - pgcc | pgf77 | pgf90) - wl='-Wl,' - ;; - ccc*) - wl='-Wl,' - ;; - como) - wl='-lopt=' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - wl='-Wl,' - ;; - esac - ;; - esac - ;; - osf3* | osf4* | osf5*) - wl='-Wl,' - ;; - rdos*) - ;; - solaris*) - wl='-Wl,' - ;; - sunos4*) - wl='-Qoption ld ' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - wl='-Wl,' - ;; - sysv4*MP*) - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - wl='-Wl,' - ;; - unicos*) - wl='-Wl,' - ;; - uts4*) - ;; - esac -fi - -# Code taken from libtool.m4's _LT_LINKER_SHLIBS. - -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no - -case "$host_os" in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - case "$host_os" in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - fi - ;; - amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we cannot use - # them. - ld_shlibs=no - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - netbsd*) - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - hardcode_direct=yes - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - esac - if test "$ld_shlibs" = no; then - hardcode_libdir_flag_spec= - fi -else - case "$host_os" in - aix3*) - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - fi - hardcode_direct=yes - hardcode_libdir_separator=':' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - fi - # Begin _LT_AC_SYS_LIBPATH_AIX. - echo 'int main () { return 0; }' > conftest.c - ${CC} ${LDFLAGS} conftest.c -o conftest - aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - fi - if test -z "$aix_libpath"; then - aix_libpath="/usr/lib:/lib" - fi - rm -f conftest.c conftest - # End _LT_AC_SYS_LIBPATH_AIX. - if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - else - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - fi - fi - ;; - amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - bsdi[45]*) - ;; - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - libext=lib - ;; - darwin* | rhapsody*) - hardcode_direct=no - if test "$GCC" = yes ; then - : - else - case $cc_basename in - xlc*) - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - dgux*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - freebsd1*) - ld_shlibs=no - ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) - hardcode_direct=yes - hardcode_minus_L=yes - ;; - freebsd* | dragonfly*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - hpux9*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - hpux10*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - ;; - *) - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - netbsd*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - newsos6) - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - else - case "$host_os" in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - osf3*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) - if test "$GCC" = yes; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - # Both cc and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - solaris*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - sunos4*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - sysv4) - case $host_vendor in - sni) - hardcode_direct=yes # is this really true??? - ;; - siemens) - hardcode_direct=no - ;; - motorola) - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - ;; - sysv4.3*) - ;; - sysv4*MP*) - if test -d /usr/nec; then - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - ;; - sysv5* | sco3.2v5* | sco5v6*) - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - ;; - uts4*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - *) - ld_shlibs=no - ;; - esac -fi - -# Check dynamic linker characteristics -# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. -# Unlike libtool.m4, here we don't care about _all_ names of the library, but -# only about the one the linker finds when passed -lNAME. This is the last -# element of library_names_spec in libtool.m4, or possibly two of them if the -# linker has special search rules. -library_names_spec= # the last element of library_names_spec in libtool.m4 -libname_spec='lib$name' -case "$host_os" in - aix3*) - library_names_spec='$libname.a' - ;; - aix[4-9]*) - library_names_spec='$libname$shrext' - ;; - amigaos*) - library_names_spec='$libname.a' - ;; - beos*) - library_names_spec='$libname$shrext' - ;; - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; - cygwin* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; - darwin* | rhapsody*) - shrext=.dylib - library_names_spec='$libname$shrext' - ;; - dgux*) - library_names_spec='$libname$shrext' - ;; - freebsd1*) - ;; - freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac - ;; - gnu*) - library_names_spec='$libname$shrext' - ;; - hpux9* | hpux10* | hpux11*) - case $host_cpu in - ia64*) - shrext=.so - ;; - hppa*64*) - shrext=.sl - ;; - *) - shrext=.sl - ;; - esac - library_names_spec='$libname$shrext' - ;; - interix[3-9]*) - library_names_spec='$libname$shrext' - ;; - irix5* | irix6* | nonstopux*) - library_names_spec='$libname$shrext' - case "$host_os" in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; - *) libsuff= shlibsuff= ;; - esac - ;; - esac - ;; - linux*oldld* | linux*aout* | linux*coff*) - ;; - linux* | k*bsd*-gnu) - library_names_spec='$libname$shrext' - ;; - knetbsd*-gnu) - library_names_spec='$libname$shrext' - ;; - netbsd*) - library_names_spec='$libname$shrext' - ;; - newsos6) - library_names_spec='$libname$shrext' - ;; - nto-qnx*) - library_names_spec='$libname$shrext' - ;; - openbsd*) - library_names_spec='$libname$shrext$versuffix' - ;; - os2*) - libname_spec='$name' - shrext=.dll - library_names_spec='$libname.a' - ;; - osf3* | osf4* | osf5*) - library_names_spec='$libname$shrext' - ;; - rdos*) - ;; - solaris*) - library_names_spec='$libname$shrext' - ;; - sunos4*) - library_names_spec='$libname$shrext$versuffix' - ;; - sysv4 | sysv4.3*) - library_names_spec='$libname$shrext' - ;; - sysv4*MP*) - library_names_spec='$libname$shrext' - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - library_names_spec='$libname$shrext' - ;; - uts4*) - library_names_spec='$libname$shrext' - ;; -esac - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` -shlibext=`echo "$shrext" | sed -e 's,^\.,,'` -escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` - -LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF - -# How to pass a linker flag through the compiler. -wl="$escaped_wl" - -# Static library suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally "so"). -shlibext="$shlibext" - -# Format of library name prefix. -libname_spec="$escaped_libname_spec" - -# Library names that the linker finds when passed -lNAME. -library_names_spec="$escaped_library_names_spec" - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="$hardcode_libdir_separator" - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct="$hardcode_direct" - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L="$hardcode_minus_L" - -EOF diff --git a/config.sub b/config.sub deleted file mode 100755 index c894da4..0000000 --- a/config.sub +++ /dev/null @@ -1,1773 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i386-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config/binutils.conf b/config/binutils.conf deleted file mode 100644 index 22661da..0000000 --- a/config/binutils.conf +++ /dev/null @@ -1,54 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -# This is the latest version of this toolchain component -#latest="binutils.git~binutils-2_24-branch" -latest="binutils-gdb.git/linaro_binutils-2_24-branch" - -# Example of a tarball that extracts to a directory name that differs from -# the tarball name. -#latest="binutils-linaro-2.23.2-2013.06.tar.bz2" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="objdump" - -# If yes, only static linking will be used -static_link="yes" - -# This is a list of default flags always supplied to configure - -# binutils configure doesn't work under dash, which is the default shell on some -# distributions. -default_configure_flags="--enable-lto --enable-plugins --disable-werror CPPFLAGS=-UFORTIFY_SOURCE${default_march:+ --with-arch=${default_march}}" -default_makeflags="all-bfd all-gas all-ld all-gprof all-binutils" - -if test x"${build}" != x"${target}"; then - # The sysroot path depends on the C library version. - tag="sysroot-${libc_version}-${target}" - # FIXME: Check the sysroot path when the libc_version is bogus. -# default_configure_flags="${default_configure_flags} --with-sysroot=/opt/linaro/${tag}" - default_configure_flags="${default_configure_flags} --with-sysroot=${sysroots}/${target}" -# default_configure_flags="${default_configure_flags} --with-sysroot=/" -# case ${target} in -# aarch64*) -# ;; -# *) -# default_configure_flags="${default_configure_flags} --enable-gold" -# ;; -# esac -else - case ${target} in - aarch64*|arm*) - default_configure_flags="${default_configure_flags} --with-sysroot=/" - ;; - *) - default_configure_flags="${default_configure_flags} --with-sysroot=/" - ;; - esac -fi - -# This is a list of default flags always supplied to "make check". -# --xml produces XML files suitable for importing into a MySQL -runtest_flags="" - diff --git a/config/boards/README b/config/boards/README deleted file mode 100644 index c444f5c..0000000 --- a/config/boards/README +++ /dev/null @@ -1,39 +0,0 @@ -These are the config files DejaGnu uses to access the Linaro build -farm. When the DEJAGNU environment variables is set to -cbuild2/config/linaro.exp, then cbuild2/config/boards is prefixed to -the directory lookup paths. The top level sub directory is the shorter -nodename of the system's hostname, for example tcwgbuild01. - -In each of these sub directories, are the baseboard files used to tell -the testing framework how to access the target platform. Currently all -of our targets we can SSH to, which makes these files very simple. All -each file has to do is specify the hostname of the target. All the -real work is handled by the 'arm-linux' baseboard support in DejaGnu. - -If you want to use your local build farm, then create the hostname -directory (ie... 'myfoo`), and in the 'myfoo' sub directory, change -the hostname in the appropriate config file. If you want to create a -new target, just copy 'arm-chromebook', and edit the hostname -setting. Ports are specified in the hostname setting using ':' and -then the port number. To change which targets DejaGnu tries to use, -edit the 'config/linaro.exp', and change the target_list. The names in -the target list are used to lookup the proper board file, so if the -'barfood' target is in the list 'set target_list { barfood }', then -the board file 'config/board/$nodename/barfoo.exp' is used to get the -hostname of the target. - -Current build machines in the Linaro build farm are: -x86_64: tcwgbuild01-tcwgbuild06 -i686: tcwgbuild01-tcwgbuild06 (in a chroot) - -SSH access to these machines from outside the TCWG subnet is: -validation.linaro.org port ports 41001-41006 - -Chromebooks: -armv7: tcwgchromebook01-tcwgchromebook06 - -SSH access to these chromebooks from outside the TCWG subnet is: -validation.linaro.org port ports 40001-40006 - -You need to have a valid Linaro account to have SSH access to these -machines. diff --git a/config/boards/arm-qemu.exp b/config/boards/arm-qemu.exp deleted file mode 100644 index 25d4990..0000000 --- a/config/boards/arm-qemu.exp +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright (C) 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# DejaGnu 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 DejaGnu; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - -# Load the generic configuration for this board. This will define a basic -# set of routines used to communicate with the board. -load_generic_config "sim" - -# No multilib flags needed by default. -process_multilib_options "" - -if { [board_info $board obj_format] == "pe" } { - set additional_options "-Wl,-oformat,pe-arm-little,--image-base,0" - # set_board_info uses_underscores 1 -} else { - set additional_options "" -} - -# basic-sim.exp is a basic description for the standard Cygnus simulator. -load_base_board_description "basic-sim" - -# set library path environment variable for qemu -set env(QEMU_LD_PREFIX) $sysroot - -# The name of the directory in the build tree where the simulator lives. -setup_sim arm - -# When testing GCC in tree, the libgloss spec files aren't in a known location, -# so we have to find them in the sysroot. FIXME: this may change in the near -# future, but for now it works. -set compiler "[find_gcc]" -set ret [local_exec "$compiler --print-sysroot" "" "" $timeout] -if { [lindex $ret 0] == 0 } { - set sysroot "[lindex $ret 1]" - # Strip the CR or LF off the end of the line as returned by GCC - regsub -all "\[\n\r\]+" $sysroot "" sysroot -} -set specdir "$sysroot/usr/lib" - -# The basic set of flags needed to build "hello world" for this -# board. This board uses libgloss and newlib. - -# For bare metal we use libgloss, but for linux hosts this is wrong. -if { [ istarget "arm*-none-*"] } { - set_board_info cflags "-specs=$specdir/rdimon.specs" - set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $additional_options" -} else { - set_board_info ldflags "-static" -} - -# This board doesn't use a linker script. -set_board_info ldscript "" - -# The simulator doesn't return exit statuses and we need to indicate this. -#set_board_info needs_status_wrapper 1 - -# Used by a few gcc.c-torture testcases to delimit how large the stack can -# be. -#set_board_info gcc,stack_size 16384 - -# No support for signals. -set_board_info gdb,nosignals 1 - -# More time is needed to compile PlumHall tests -set_board_info gcc,timeout 800 - -# Make this variable go away, we don't need it. -unset additional_options diff --git a/config/boards/aus-colo-01.exp b/config/boards/aus-colo-01.exp deleted file mode 100644 index e693498..0000000 --- a/config/boards/aus-colo-01.exp +++ /dev/null @@ -1,7 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname r1-a10.aus-colo.linaro.org -set_board_info name r1-a10 -set_board_info username buildslave -#set_board_info rsh_opts "-o ProxyCommand="ssh aus-colo.linaro.org nc -q0 r1-a10 %p" - diff --git a/config/boards/aus-colo-02.exp b/config/boards/aus-colo-02.exp deleted file mode 100644 index 7e57095..0000000 --- a/config/boards/aus-colo-02.exp +++ /dev/null @@ -1,7 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname r1-a11.aus-colo.linaro.org -set_board_info name r1-a11 -set_board_info username buildslave -#set_board_info rsh_opts "-o ProxyCommand="ssh aus-colo.linaro.org nc -q0 r1-a11 %p" - diff --git a/config/boards/chrome1-01.exp b/config/boards/chrome1-01.exp deleted file mode 100644 index 30c812e..0000000 --- a/config/boards/chrome1-01.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname 69.15.127.226 -set_board_info name chrome1-01 -set_board_info port 8129 diff --git a/config/boards/dragon-01.exp b/config/boards/dragon-01.exp deleted file mode 100644 index 9d481d0..0000000 --- a/config/boards/dragon-01.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname 69.15.127.226 -set_board_info name dragon-01 -set_board_info port 8128 diff --git a/config/boards/lava.json b/config/boards/lava.json deleted file mode 100644 index 6b2a970..0000000 --- a/config/boards/lava.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "actions": [ - { - "command": "deploy_linaro_image", - "parameters": { - "hwpack": "http://releases.linaro.org/14.04/ubuntu/arndale/hwpack_linaro-arndale_20140417-630_armhf_supported.tar.gz", - "rootfs": "http://people.linaro.org/~maxim.kuvyrkov/tcwg-test-armhf-trusty.tgz" - } - }, - { - "command": "lava_test_shell", - "parameters": { - "testdef_repos": [ - { - "git-repo": "http://git.linaro.org/git/lava-team/hacking-session.git", - "parameters": { - "PUB_KEY": "ssh-dss AAAAB3NzaC1kc3MAAACBAJySXHGb8CgqFeN8KLAsmJEx3XhtSAwIsPM3+4n/n+w3athh1PD7dYbmksz2wNrXTJ4Atj17R+IWLvCQ3qnDh+oiOwRLVRXV4uKGqsVxjmSXQqeDAZLcJXtZnepxNLkLZe342LI3Q2FWlwSqsvNA/XVA4vBP/ckQD8EQt+BLAg+pAAAAFQC2kcFr+teo4UVl4BSLb/ELpLCF3wAAAIA3de8nXOOPQt5PziSfdrIcM/6LZVwwxBbbNCc8uh88TAeKe3kaQkXc8wB0VcYOhagBknwoPrZpcE+qeimYTUUCWPkR2r5diQvo+X25Ofq5Dz9799h1olIcnxSlcKZGBYYpOkz2c4bi8BbI9ZMfkrO45paEP7sUh1H8ag3ALJi8BgAAAIBghwYeqI4C7H4dnGigB/4VaOSFSeKZkUEvieEIAnxgUrn6N2PuU4ym/oRAahDme5Zp5RUBncme0ru/BeCvZpv2Uy4Qa8uKiCVRz4+adBl7SXMnIIpWO6oAeWngSa8z8iVjqBLkaGfK0kgNcKIyJgICc6hCbNyaAyGITQj1dx75eg== maxim.kuvyrkov@linaro.org" - }, - "testdef": "hacking-session-debian.yaml" - } - ], - "timeout": 18000 - } - }, - { - "command": "submit_results", - "parameters": { - "server": "http://validation.linaro.org/RPC2/", - "stream": "/anonymous/maxim-kuvyrkov/" - } - } - ], - "device_type": "arndale", - "job_name": "tcwg-testing", - "logging_level": "DEBUG", - "timeout": 18000 -} diff --git a/config/boards/schroot-ssh.exp b/config/boards/schroot-ssh.exp deleted file mode 100644 index 37d171e..0000000 --- a/config/boards/schroot-ssh.exp +++ /dev/null @@ -1,8 +0,0 @@ -global env -if {[info exists env(SCHROOT_PORT)]} { - set_board_info rsh_prog "/usr/bin/ssh -o Port=[getenv SCHROOT_PORT] -o StrictHostKeyChecking=no" - set_board_info rcp_prog "/usr/bin/scp -o Port=[getenv SCHROOT_PORT] -o StrictHostKeyChecking=no" -} -if {[info exists env(SCHROOT_SHARED_DIR)]} { - set_board_info shared_dir "[getenv SCHROOT_SHARED_DIR]" -} diff --git a/config/boards/tcwg-common.exp b/config/boards/tcwg-common.exp deleted file mode 100644 index c3bbe46..0000000 --- a/config/boards/tcwg-common.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_generic_config schroot-ssh - -set_board_info rsh_prog /usr/bin/ssh -set_board_info rcp_prog /usr/bin/scp -#set_board_info username buildslave -set_board_info gcc,timeout 100000 -set_board_info ldflags "-static -lpthread -ldl" diff --git a/config/boards/tcwg-ex40-01/a15.exp b/config/boards/tcwg-ex40-01/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-01/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-01/a8.exp b/config/boards/tcwg-ex40-01/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-01/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-01/a9.exp b/config/boards/tcwg-ex40-01/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-01/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-01/aarch64.exp b/config/boards/tcwg-ex40-01/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-01/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-01/tcwgblack.exp b/config/boards/tcwg-ex40-01/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-01/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-01/tcwgbuild.exp b/config/boards/tcwg-ex40-01/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-01/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-01/tcwgfoundation.exp b/config/boards/tcwg-ex40-01/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-01/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-02/a15.exp b/config/boards/tcwg-ex40-02/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-02/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/a8.exp b/config/boards/tcwg-ex40-02/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-02/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/a9.exp b/config/boards/tcwg-ex40-02/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-02/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/aarch64.exp b/config/boards/tcwg-ex40-02/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-02/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/tcwgblack.exp b/config/boards/tcwg-ex40-02/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-02/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-02/tcwgbuild.exp b/config/boards/tcwg-ex40-02/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/a15.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/a8.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/a9.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/aarch64.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgblack.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgbuild.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgfoundation.exp b/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-02/tcwgbuild01/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-02/tcwgfoundation.exp b/config/boards/tcwg-ex40-02/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-02/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-03/a15.exp b/config/boards/tcwg-ex40-03/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-03/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-03/a8.exp b/config/boards/tcwg-ex40-03/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-03/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-03/a9.exp b/config/boards/tcwg-ex40-03/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-03/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-03/aarch64.exp b/config/boards/tcwg-ex40-03/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-03/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-03/tcwgblack.exp b/config/boards/tcwg-ex40-03/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-03/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-03/tcwgbuild.exp b/config/boards/tcwg-ex40-03/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-03/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-03/tcwgfoundation.exp b/config/boards/tcwg-ex40-03/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-03/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-04/a15.exp b/config/boards/tcwg-ex40-04/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-04/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-04/a8.exp b/config/boards/tcwg-ex40-04/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-04/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-04/a9.exp b/config/boards/tcwg-ex40-04/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-04/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-04/aarch64.exp b/config/boards/tcwg-ex40-04/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-04/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-04/tcwgblack.exp b/config/boards/tcwg-ex40-04/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-04/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-04/tcwgbuild.exp b/config/boards/tcwg-ex40-04/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-04/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-04/tcwgfoundation.exp b/config/boards/tcwg-ex40-04/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-04/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-05/a15.exp b/config/boards/tcwg-ex40-05/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-05/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-05/a8.exp b/config/boards/tcwg-ex40-05/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-05/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-05/a9.exp b/config/boards/tcwg-ex40-05/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-05/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-05/aarch64.exp b/config/boards/tcwg-ex40-05/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-05/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-05/tcwgblack.exp b/config/boards/tcwg-ex40-05/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-05/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-05/tcwgbuild.exp b/config/boards/tcwg-ex40-05/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-05/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-05/tcwgfoundation.exp b/config/boards/tcwg-ex40-05/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-05/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-06/a15.exp b/config/boards/tcwg-ex40-06/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-06/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-06/a8.exp b/config/boards/tcwg-ex40-06/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-06/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-06/a9.exp b/config/boards/tcwg-ex40-06/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-06/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-06/aarch64.exp b/config/boards/tcwg-ex40-06/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-06/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-06/tcwgblack.exp b/config/boards/tcwg-ex40-06/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-06/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-06/tcwgbuild.exp b/config/boards/tcwg-ex40-06/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-06/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-06/tcwgfoundation.exp b/config/boards/tcwg-ex40-06/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-06/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-07/a15.exp b/config/boards/tcwg-ex40-07/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-07/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-07/a8.exp b/config/boards/tcwg-ex40-07/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-07/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-07/a9.exp b/config/boards/tcwg-ex40-07/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-07/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-07/aarch64.exp b/config/boards/tcwg-ex40-07/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-07/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-07/tcwgblack.exp b/config/boards/tcwg-ex40-07/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-07/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-07/tcwgbuild.exp b/config/boards/tcwg-ex40-07/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-07/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-07/tcwgfoundation.exp b/config/boards/tcwg-ex40-07/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-07/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-08/a15.exp b/config/boards/tcwg-ex40-08/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-08/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-08/a8.exp b/config/boards/tcwg-ex40-08/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-08/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-08/a9.exp b/config/boards/tcwg-ex40-08/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-08/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-08/aarch64.exp b/config/boards/tcwg-ex40-08/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-08/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-08/tcwgblack.exp b/config/boards/tcwg-ex40-08/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-08/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-08/tcwgbuild.exp b/config/boards/tcwg-ex40-08/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-08/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-08/tcwgfoundation.exp b/config/boards/tcwg-ex40-08/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-08/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-ex40-09/a15.exp b/config/boards/tcwg-ex40-09/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwg-ex40-09/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-09/a8.exp b/config/boards/tcwg-ex40-09/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwg-ex40-09/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-09/a9.exp b/config/boards/tcwg-ex40-09/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwg-ex40-09/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-09/aarch64.exp b/config/boards/tcwg-ex40-09/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwg-ex40-09/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwg-ex40-09/tcwgblack.exp b/config/boards/tcwg-ex40-09/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwg-ex40-09/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwg-ex40-09/tcwgbuild.exp b/config/boards/tcwg-ex40-09/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwg-ex40-09/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwg-ex40-09/tcwgfoundation.exp b/config/boards/tcwg-ex40-09/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwg-ex40-09/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwg-schroot.exp b/config/boards/tcwg-schroot.exp deleted file mode 100644 index 713102e..0000000 --- a/config/boards/tcwg-schroot.exp +++ /dev/null @@ -1,9 +0,0 @@ -load_generic_config unix -load_generic_config schroot-ssh - -set_board_info rsh_prog /usr/bin/ssh -set_board_info rcp_prog /usr/bin/scp -set_board_info username buildslave -set_board_info timeout 1000 -set_board_info gcc,timeout 1000 -set timeout 1000 diff --git a/config/boards/tcwgapm.exp b/config/boards/tcwgapm.exp deleted file mode 100644 index d50fa9f..0000000 --- a/config/boards/tcwgapm.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwg-apm-04 diff --git a/config/boards/tcwgbuild01/a15.exp b/config/boards/tcwgbuild01/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild01/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild01/a8.exp b/config/boards/tcwgbuild01/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild01/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild01/a9.exp b/config/boards/tcwgbuild01/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild01/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild01/aarch64.exp b/config/boards/tcwgbuild01/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild01/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild01/tcwgblack.exp b/config/boards/tcwgbuild01/tcwgblack.exp deleted file mode 100644 index 0ef7351..0000000 --- a/config/boards/tcwgbuild01/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack01 diff --git a/config/boards/tcwgbuild01/tcwgbuild.exp b/config/boards/tcwgbuild01/tcwgbuild.exp deleted file mode 100644 index 528de46..0000000 --- a/config/boards/tcwgbuild01/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild02 diff --git a/config/boards/tcwgbuild01/tcwgfoundation.exp b/config/boards/tcwgbuild01/tcwgfoundation.exp deleted file mode 100644 index f0baac5..0000000 --- a/config/boards/tcwgbuild01/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation01 diff --git a/config/boards/tcwgbuild02/a15.exp b/config/boards/tcwgbuild02/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild02/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild02/a8.exp b/config/boards/tcwgbuild02/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild02/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild02/a9.exp b/config/boards/tcwgbuild02/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild02/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild02/aarch64.exp b/config/boards/tcwgbuild02/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild02/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild02/tcwgblack.exp b/config/boards/tcwgbuild02/tcwgblack.exp deleted file mode 100644 index 07bf69e..0000000 --- a/config/boards/tcwgbuild02/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack02 diff --git a/config/boards/tcwgbuild02/tcwgbuild.exp b/config/boards/tcwgbuild02/tcwgbuild.exp deleted file mode 100644 index 53bf017..0000000 --- a/config/boards/tcwgbuild02/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild03 diff --git a/config/boards/tcwgbuild02/tcwgfoundation.exp b/config/boards/tcwgbuild02/tcwgfoundation.exp deleted file mode 100644 index fc54921..0000000 --- a/config/boards/tcwgbuild02/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation02 diff --git a/config/boards/tcwgbuild03/a15.exp b/config/boards/tcwgbuild03/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild03/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild03/a8.exp b/config/boards/tcwgbuild03/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild03/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild03/a9.exp b/config/boards/tcwgbuild03/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild03/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild03/aarch64.exp b/config/boards/tcwgbuild03/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild03/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild03/tcwgblack.exp b/config/boards/tcwgbuild03/tcwgblack.exp deleted file mode 100644 index 97d857a..0000000 --- a/config/boards/tcwgbuild03/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack03 diff --git a/config/boards/tcwgbuild03/tcwgbuild.exp b/config/boards/tcwgbuild03/tcwgbuild.exp deleted file mode 100644 index bf1eb10..0000000 --- a/config/boards/tcwgbuild03/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild04 diff --git a/config/boards/tcwgbuild03/tcwgfoundation.exp b/config/boards/tcwgbuild03/tcwgfoundation.exp deleted file mode 100644 index bb221d6..0000000 --- a/config/boards/tcwgbuild03/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation03 diff --git a/config/boards/tcwgbuild04/a15.exp b/config/boards/tcwgbuild04/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild04/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild04/a8.exp b/config/boards/tcwgbuild04/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild04/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild04/a9.exp b/config/boards/tcwgbuild04/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild04/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild04/aarch64.exp b/config/boards/tcwgbuild04/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild04/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild04/tcwgblack.exp b/config/boards/tcwgbuild04/tcwgblack.exp deleted file mode 100644 index 1632450..0000000 --- a/config/boards/tcwgbuild04/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack04 diff --git a/config/boards/tcwgbuild04/tcwgbuild.exp b/config/boards/tcwgbuild04/tcwgbuild.exp deleted file mode 100644 index 5f39f55..0000000 --- a/config/boards/tcwgbuild04/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild05 diff --git a/config/boards/tcwgbuild04/tcwgfoundation.exp b/config/boards/tcwgbuild04/tcwgfoundation.exp deleted file mode 100644 index 4362480..0000000 --- a/config/boards/tcwgbuild04/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation04 diff --git a/config/boards/tcwgbuild05/a15.exp b/config/boards/tcwgbuild05/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild05/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild05/a8.exp b/config/boards/tcwgbuild05/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild05/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild05/a9.exp b/config/boards/tcwgbuild05/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild05/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild05/aarch64.exp b/config/boards/tcwgbuild05/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild05/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild05/tcwgblack.exp b/config/boards/tcwgbuild05/tcwgblack.exp deleted file mode 100644 index 1eca3bc..0000000 --- a/config/boards/tcwgbuild05/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack05 diff --git a/config/boards/tcwgbuild05/tcwgbuild.exp b/config/boards/tcwgbuild05/tcwgbuild.exp deleted file mode 100644 index 7364b7c..0000000 --- a/config/boards/tcwgbuild05/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild06 diff --git a/config/boards/tcwgbuild05/tcwgfoundation.exp b/config/boards/tcwgbuild05/tcwgfoundation.exp deleted file mode 100644 index 7075e03..0000000 --- a/config/boards/tcwgbuild05/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation05 diff --git a/config/boards/tcwgbuild06/a15.exp b/config/boards/tcwgbuild06/a15.exp deleted file mode 100644 index 52c1e1c..0000000 --- a/config/boards/tcwgbuild06/a15.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc0f"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild06/a8.exp b/config/boards/tcwgbuild06/a8.exp deleted file mode 100644 index d23519c..0000000 --- a/config/boards/tcwgbuild06/a8.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc08"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild06/a9.exp b/config/boards/tcwgbuild06/a9.exp deleted file mode 100644 index d57bc69..0000000 --- a/config/boards/tcwgbuild06/a9.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild06/aarch64.exp b/config/boards/tcwgbuild06/aarch64.exp deleted file mode 100644 index 64e85e9..0000000 --- a/config/boards/tcwgbuild06/aarch64.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix -load_lib "dmucs.exp" - -set slave [gethost "toolchain64" "0x000"] -verbose "Slave is: $slave" -set_board_info hostname $slave - - diff --git a/config/boards/tcwgbuild06/tcwgblack.exp b/config/boards/tcwgbuild06/tcwgblack.exp deleted file mode 100644 index c00ed17..0000000 --- a/config/boards/tcwgbuild06/tcwgblack.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack06 diff --git a/config/boards/tcwgbuild06/tcwgbuild.exp b/config/boards/tcwgbuild06/tcwgbuild.exp deleted file mode 100644 index 42016e5..0000000 --- a/config/boards/tcwgbuild06/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild01 diff --git a/config/boards/tcwgbuild06/tcwgfoundation.exp b/config/boards/tcwgbuild06/tcwgfoundation.exp deleted file mode 100644 index dea522b..0000000 --- a/config/boards/tcwgbuild06/tcwgfoundation.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgfoundation-common - -set_board_info hostname tcwgfoundation06 diff --git a/config/boards/tcwgchrome2.exp b/config/boards/tcwgchrome2.exp deleted file mode 100644 index ec8a94f..0000000 --- a/config/boards/tcwgchrome2.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwg-chrome2-01 diff --git a/config/boards/tcwgcommon.exp b/config/boards/tcwgcommon.exp deleted file mode 100644 index 7df74b3..0000000 --- a/config/boards/tcwgcommon.exp +++ /dev/null @@ -1,17 +0,0 @@ -load_generic_config unix - -set RSH ssh -set RCP scp - -set_board_info rsh_prog /usr/bin/ssh -set_board_info rcp_prog /usr/bin/scp -#set_board_info username buildslave -set_board_info timeout 1000 -set_board_info gcc,timeout 100000 - -# If we statically link test cases, some components fail to link -# without specifying a few libraries. -if {[istarget arm*-none-eabi]} { - set_board_info ldflags "-static -lpthread -ldl" -} -set timeout 1000 diff --git a/config/boards/tcwgd01.exp b/config/boards/tcwgd01.exp deleted file mode 100644 index 6cf038f..0000000 --- a/config/boards/tcwgd01.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwg-d01-03 diff --git a/config/boards/tcwgfoundation-common.exp b/config/boards/tcwgfoundation-common.exp deleted file mode 100644 index 41132b4..0000000 --- a/config/boards/tcwgfoundation-common.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config unix - -set_board_info rsh_prog /usr/bin/ssh -set_board_info rcp_prog /usr/bin/scp -set_board_info port 8022 - -#set_board_info username buildslave -set_board_info gcc,timeout 100000 diff --git a/config/boards/tcwglava.exp b/config/boards/tcwglava.exp deleted file mode 100644 index dd76abe..0000000 --- a/config/boards/tcwglava.exp +++ /dev/null @@ -1,10 +0,0 @@ -load_generic_config schroot-ssh -load_generic_config unix - -set_board_info rsh_prog /usr/bin/ssh -set_board_info rcp_prog /usr/bin/scp -#set_board_info username buildslave -set_board_info gcc,timeout 100000 - -set_board_info hostname @LAVA_BOARD@ -set_board_info lava_json /home/maxim-kuvyrkov/src/cbuild2/config/boards/lava.json diff --git a/config/boards/tcwgrob/a9.exp b/config/boards/tcwgrob/a9.exp deleted file mode 100644 index 7e7c12c..0000000 --- a/config/boards/tcwgrob/a9.exp +++ /dev/null @@ -1,7 +0,0 @@ -load_generic_config tcwgcommon -load_lib "dmucs.exp" - -set slave [gethost "localhost" "0xc09"] -verbose "Slave is: $slave" -set_board_info hostname $slave - diff --git a/config/boards/tcwgrob/arm-chromebook.exp b/config/boards/tcwgrob/arm-chromebook.exp deleted file mode 100644 index 0ce1ae1..0000000 --- a/config/boards/tcwgrob/arm-chromebook.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_generic_config fastssh -set_board_info protocol fastssh -set_board_info gcc,timeout 100000 -set_board_info needs_status_wrapper 1 -set_board_info hostname chromebook diff --git a/config/boards/tcwgrob/arm-odroidU2.exp b/config/boards/tcwgrob/arm-odroidU2.exp deleted file mode 100644 index 5b016d4..0000000 --- a/config/boards/tcwgrob/arm-odroidU2.exp +++ /dev/null @@ -1,12 +0,0 @@ -# Config file for a Hardkernel Odroid U2 board - -load_generic_config fastssh - -set_board_info hostname arm-odroidU2 - -set_board_info protocol fastssh -# Enable ControlMaster and ControlPath -set_board_info rsh_opts "-o ControlMaster=auto -o ControlPath=\"/tmp/cbuild-%u@%h:[pid]\" -o ControlPersist=6h" - -#set_board_info username buildslave -set_board_info gcc,timeout 100000 diff --git a/config/boards/tcwgrob/arm-odroidXU.exp b/config/boards/tcwgrob/arm-odroidXU.exp deleted file mode 100644 index 23fec2f..0000000 --- a/config/boards/tcwgrob/arm-odroidXU.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config "tcwgcommon" - -set_board_info hostname odroidXU diff --git a/config/boards/tcwgrob/chrome1-01.exp b/config/boards/tcwgrob/chrome1-01.exp deleted file mode 100644 index d1ab60c..0000000 --- a/config/boards/tcwgrob/chrome1-01.exp +++ /dev/null @@ -1,4 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname 10.0.1.129 -set_board_info name chrome1-01 diff --git a/config/boards/tcwgrob/dragon-01.exp b/config/boards/tcwgrob/dragon-01.exp deleted file mode 100644 index 7fbf065..0000000 --- a/config/boards/tcwgrob/dragon-01.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname dragon-01 diff --git a/config/boards/tcwgrob/tcwgapm.exp b/config/boards/tcwgrob/tcwgapm.exp deleted file mode 100644 index 84af11a..0000000 --- a/config/boards/tcwgrob/tcwgapm.exp +++ /dev/null @@ -1,7 +0,0 @@ -load_generic_config arm-linux - -set_board_info protocol ssh -set_board_info hostname lab.validation.linaro.org -set_board_info name tcwg-apm-04 -set_board_info port 41045 -set_board_info ldflags "-static" diff --git a/config/boards/tcwgrob/tcwgblack.exp b/config/boards/tcwgrob/tcwgblack.exp deleted file mode 100644 index 73d878b..0000000 --- a/config/boards/tcwgrob/tcwgblack.exp +++ /dev/null @@ -1,8 +0,0 @@ -# Config file for a Hardkernel Odroid U2 board - -load_generic_config tcwgcommon - -set_board_info hostname tcwgblack06 - -#set_board_info username buildslave -set_board_info gcc,timeout 100000 diff --git a/config/boards/tcwgrob/tcwgchromebook.exp b/config/boards/tcwgrob/tcwgchromebook.exp deleted file mode 100644 index 202846b..0000000 --- a/config/boards/tcwgrob/tcwgchromebook.exp +++ /dev/null @@ -1,8 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname lab.validation.linaro.org -set_board_info name tcwg-chrome2-01 -set_board_info port 41043 -set_board_info gcc,timeout 100000 - -set timeout 1000 diff --git a/config/boards/tcwgrob/tcwgd01.exp b/config/boards/tcwgrob/tcwgd01.exp deleted file mode 100644 index 35435b9..0000000 --- a/config/boards/tcwgrob/tcwgd01.exp +++ /dev/null @@ -1,11 +0,0 @@ -load_generic_config arm-linux - -set_board_info protocol ssh -set_board_info hostname lab.validation.linaro.org -set_board_info name tcwg-d01-03 -set_board_info port 41044 -set_board_info gcc,timeout 1000 - -set_board_info ldflags "-static" - -set timeout 1000 diff --git a/config/boards/toolchain64/tcwgbuild.exp b/config/boards/toolchain64/tcwgbuild.exp deleted file mode 100644 index 7364b7c..0000000 --- a/config/boards/toolchain64/tcwgbuild.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_generic_config tcwgcommon - -set_board_info hostname tcwgbuild06 diff --git a/config/boards/v8model.exp b/config/boards/v8model.exp deleted file mode 100644 index 4ecbf84..0000000 --- a/config/boards/v8model.exp +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# DejaGnu 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 DejaGnu; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - -load_generic_config "aarch64-fv8" - -# Use the ARM Foundation Model for the armv8 -set_board_info protocol v8model - -# This is the model itself. It's bit brain dead in that it only can be executed with a -# full absolute path, and can be installed anywhere in the file system. -if {[info exists env(FOUNDATION_MODEL)]} { - set_board_info model "$env(FOUNDATION_MODEL)" -} else { - error "Set FOUNDATION_MODEL in your environment to execute remote tests!" -} - -if {[info exists env(SYSROOT_UNDER_TEST)]} { - set specdir "$env(SYSROOT_UNDER_TEST)/usr/lib" -} - -set_board_info cflags "-specs=${specdir}/aem-ve.specs [libgloss_include_flags]" -set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]" - -# Can't pass arguments to the program. -set_board_info noargs 1 - -# No support for signals. -set_board_info gdb,nosignals 1 - -# The simulator doesn't return exit statuses and we need to indicate this. -set_board_info needs_status_wrapper 1 - -# We are on a very slow simulator :-) -set_board_info slow_simulator 1 diff --git a/config/cloog-parma.conf b/config/cloog-parma.conf deleted file mode 100644 index 8168be8..0000000 --- a/config/cloog-parma.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="polylib" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-cloog-prefix=${PWD}/${hostname}/${build}/depends --with-gmp-prefix=${PWD}/${hostname}/${build}/depends --with-ppl-prefix=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/cloog-polylib.conf b/config/cloog-polylib.conf deleted file mode 100644 index 389e7ba..0000000 --- a/config/cloog-polylib.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="polylib" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-cloog-prefix=${PWD}/${hostname}/${build}/depends --with-gmp-prefix=${PWD}/${hostname}/${build}/depends --with-polylib-prefix=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/cloog-ppl.conf b/config/cloog-ppl.conf deleted file mode 100644 index 61be745..0000000 --- a/config/cloog-ppl.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="ppl" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp=${PWD}/${hostname}/${build}/depends --with-ppl=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/cloog.conf b/config/cloog.conf deleted file mode 100644 index 3a689c0..0000000 --- a/config/cloog.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="ppl" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp-prefix=${PWD}/${hostname}/${build}/depends --with-isl-prefix=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/dejagnu.conf b/config/dejagnu.conf deleted file mode 100644 index 4430f26..0000000 --- a/config/dejagnu.conf +++ /dev/null @@ -1,12 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -# This is the latest version of this toolchain component -latest="dejagnu.git/linaro" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="runtest" - -runtest_flags="" - diff --git a/config/eembc.conf b/config/eembc.conf deleted file mode 100644 index 83f8062..0000000 --- a/config/eembc.conf +++ /dev/null @@ -1,20 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -# eembc does not have a configure script -configure="no" - -#eembc build has a race condition, don't try to parallelize -default_makeflags="build -j 1 " -if test x"${build}" != x"${target}"; then - default_makeflags="${default_makeflags} CROSS_COMPILE=${target}-" -fi - -#command to run the benchmark -benchcmd="make -C ${builddir} -s rerun COMPILER_FLAGS='-O3 -mfpu=neon -mcpu=native -DNDEBUG -DHOST_EXAMPLE_CODE=1'" - -#number of times to run the benchmark -benchcount="5" - -#pattern to find all relative logs, relative to build directory -benchlog="*/gcc_{size,time}.log" diff --git a/config/eglibc.conf b/config/eglibc.conf deleted file mode 100644 index ab9bbd3..0000000 --- a/config/eglibc.conf +++ /dev/null @@ -1,22 +0,0 @@ -# This is a list of packages that must be installed on the build machine -# depends="gcc linux" -depends="linux" - -# This is the latest version of this toolchain component -#latest="eglibc.git" -latest="eglibc.git/linaro_eglibc-2_19" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libc." - -# eglibc won't produce a static library if GCC is configured to be statically. -# A static iconv_prog wants libgcc_eh, which is only created wth a dynamically -# built GCC. -# If yes, only static linking will be used -static_link=no - -# This is a list of default flags always supplied to configure -default_configure_flags="--enable-obsolete-rpc --disable-profile --without-gd --without-cvs --enable-obsolete-rpc --enable-add-ons=nptl,ports --disable-build-nscd --with-headers=${sysroots}/usr/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes libc_cv_ctors_header=yes --enable-multi-arch --enable-profile" - -default_makeflags="PARALLELMFLAGS=\"-j ${cpus}\"" diff --git a/config/ffmpeg.conf b/config/ffmpeg.conf deleted file mode 100644 index 113a8b3..0000000 --- a/config/ffmpeg.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="2.0.1" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libavcodec." - -# This is a list of default flags always supplied to configure -default_configure_flags="--cross-prefix=${target}- --enable-cross-compile --target-os=linux --arch=arm5te --ld=${target}-ld --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-everything --disable-filters --disable-avfilter " - -# If yes, only static linking will be used -static_link=no - diff --git a/config/gcc.conf b/config/gcc.conf deleted file mode 100644 index 45576c6..0000000 --- a/config/gcc.conf +++ /dev/null @@ -1,202 +0,0 @@ -# This is a list of other components need to build this component -depends="gmp mpfr mpc linux binutils" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="gcc" - -# The current branch of the existing GCC release. -latest="gcc.git~linaro-4.9-branch" -#latest="gcc.git@b41f589a6433970d79049618327a51b66754545c" -# The current HEAD in the master branch, which will become the next release. -#latest="gcc.git" - -# If yes, only static linking will be used -static_link="no" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-bugurl=https://bugs.linaro.org --with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap${default_march:+ --with-arch=${default_march}}" - -# --with-pkgversion=${USER} -# --with-as=${local_builds}/bin/${target}-as --with-ld=${local_builds}/bin/${target}-ld - -# Disable the Graphite loop optimizer as it's being depreciated -default_configure_flags="${default_configure_flags} --with-cloog=no --with-ppl=no --with-isl=no" - -# nls is used for DNS -default_configure_flags="${default_configure_flags} --disable-nls" - -# enable multiarch -default_configure_flags="${default_configure_flags} --enable-multiarch --disable-multilib" - -# C99 is the latest standard, and has improved numerics support, so we want it -# http://en.wikipedia.org/wiki/C99 -default_configure_flags="${default_configure_flags} --enable-c99" - -# libssp does stack protection -#default_configure_flags="${default_configure_flags} --enable-libssp" - -# Used by fortran -# http://gcc.gnu.org/onlinedocs/libquadmath/ -# default_configure_flags="${default_configure_flags} --disable-libquadmath" - -# Transactional Memory, used for threading -# http://gcc.gnu.org/wiki/TransactionalMemory -#default_configure_flags="${default_configure_flags} --disable-libitm" - -# Libatomic is a synchronization library -# http://www.hpl.hp.com/research/linux/atomic_ops/ -#default_configure_flags="${default_configure_flags} --disable-libatomic" - -if test `echo ${target} | grep -c aarch64` -eq 1 -a `echo ${gcc_version} | grep -c gcc-linaro-4\.7` -eq 1; then - error "GCC 4.7 does not support aarch64!" - exit 1 -fi - -# Default set of languages to build. If building binary tarballs, we don't build all the -# front ends. -if test x"${tarbin}" != xyes; then - languages="c,c++,fortran,lto" -else - languages="c,c++,fortran,lto" -fi - -default_makeflags="MAKEINFOFLAGS=--force" - -# For a cross build, we need the target as part of the name for to find the correct. -# assembler and linker. We also disable bootstrapping for cross builds -if test x"${build}" != x"${target}"; then - # stage1_flags are used to build the initial C compiler, which is used to compile - # the C library. We disable most everything, as the second GCC build will be - # able to use the C library built with the first GCC build. - stage1_flags="--disable-libssp --disable-libquadmath --disable-threads --without-headers --with-newlib --disable-libmudflap --disable-bootstrap --disable-decimal-float --disable-libgomp --disable-libatomic --disable-libsanitizer --disable-plugins --disable-libitm MAKEINFO=echo --enable-languages=c --with-sysroot=${local_builds}/sysroot-${target} --disable-shared --with-glibc-version=2.18" - - # Add platform specific flags - case ${target} in - arm-*linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb" - need_qemu=yes - ;; - arm-*linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" - need_qemu=no - ;; - armeb-*linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib" - need_qemu=yes - ;; - armeb-*linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib" - need_qemu=yes - ;; - # bare metal targets don't support threads. - arm*-elf|arm*-eabi*) - default_configure_flags="${default_configure_flags} --enable-threads=no" - need_qemu=yes - languages="c,c++,lto" - ;; - aarch64*-*elf) - # Gfortran doesn't cross configure, just native - default_configure_flags="${default_configure_flags} --with-arch=armv8-a" # LDFLAGS_FOR_TARGET=-static - languages="c,c++,lto" - need_qemu=yes - ;; - aarch64*-linux-gnu) - default_configure_flags="${default_configure_flags} --with-arch=armv8-a" # LDFLAGS_FOR_TARGET=-static - need_qemu=yes - ;; - *-mingw32) - languages="c,c++" - default_configure_flags="${default_configure_flags} --enable-languages=${languages} --disable-plugins" - # Cygwin doesn't support GCC plugins -# default_configure_flags="`echo ${default_configure_flags} | sed -e 's:--enable-plugin ::`" - need_qemu=no - ;; - *) - default_configure_flags="${default_configure_flags}" - need_qemu=no - ;; - esac - - case ${clibrary} in - eglibc) - if test "`echo ${eglibc_version} | grep -c '/'`" -gt 0; then - libc_version="`echo ${eglibc_version} | cut -d '/' -f 2`" - else - libc_version="${eglibc_version}" - fi - ;; - glibc) - libc_version="${glibc_version}" - ;; - newlib) - # bare metal targets don't support threads. - default_configure_flags="${default_configure_flags} --disable-threads --with-newlib" - libc_version="${newlib_version}" - ;; - *) - fixme "\${clibrary} not specified by the time libc_version is being set." - ;; - esac - - # bootstrapping is handled by Jenkins now. - if test x"${with_languages}" != x"default"; then - languages="${with_languages}" - fi - # The sysroot path depends on the C library version. - if test x"${tarbin}" = xyes; then - local sysroot="/opt/linaro/sysroot-${libc_version}-${target}" - else - local sysroot="${local_builds}/sysroot-${target}" - fi - stage2_flags="--with-build-sysroot=${sysroots} --enable-lto --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=${sysroot} --enable-languages=${languages} -enable-fix-cortex-a53-835769" - - if test x"${release}" = x; then - stage2_flags="${stage2_flags} --enable-checking=yes" - else - stage2_flags="${stage2_flags} --enable-checking=release" - fi - -# native builds are easy, so build almost everything -else - if test x"${with_languages}" != x"default"; then - languages="${with_languages}" - else - languages="c,c++,go,objc,fortran" - fi - default_configure_flags="${default_configure_flags} --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --enable-languages=${languages}" - # Native compilers are bootstrapped by default, but sometimes the extra time isn't - # desired. - if test x"${bootstrap}" = x"yes"; then - default_configure_flags="${default_configure_flags} --enable-bootstrap" - else - default_configure_flags="${default_configure_flags} --disable-bootstrap" - fi - case ${target} in - arm*-none-linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb " - ;; - arm*-linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" - ;; - arm*-eabi | aarch64*-*elf) - #default_configure_flags="${default_configure_flags}" - ;; - aarch64*-linux-gnu) - #default_configure_flags="${default_configure_flags}" - ;; - x86-pc-linux-gnu) - default_configure_flags="${default_configure_flags} --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions" - ;; - x86_64*-linux-gnu) -# default_configure_flags="${default_configure_flags}" - ;; - *) - ;; - esac - stage2_flags="" -fi - -# This is a list of default flags always supplied to "make check". -runtest_flags="" - diff --git a/config/gdb.conf b/config/gdb.conf deleted file mode 100644 index 7e491fe..0000000 --- a/config/gdb.conf +++ /dev/null @@ -1,43 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -latest="binutils-gdb.git~linaro_gdb-7.8-branch" - -# If yes, only static linking will be used -static_link=yes - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gnu-ld --enable-plugins --enable-tui" -default_makeflags="all-gdb" - -# Currently the GDB server can only be built native. -if test x"${build}" != x"${target}"; then - case ${host} in - *-mingw32) - default_configure_flags="`echo ${default_configure_flags} | sed -e 's:--enable-tui ::`" - ;; - *linux*) - default_configure_flags="${default_configure_flags} --disable-sim" - ;; - esac - case ${target} in - arm*-linux-gnueabi) - #default_configure_flags="${default_configure_flags} --enable-gdbserver" - ;; - arm*-*elf) - default_configure_flags="${default_configure_flags} --enable-sim" - ;; - aarch64*-*elf) - default_configure_flags="${default_configure_flags} --enable-sim" - ;; - aarch64*-linux-gnu) - #default_configure_flags="${default_configure_flags} --enable-gdbserver" - ;; - *) - ;; - esac -fi - -# This is a list of default flags always supplied to "make check". -runtest_flags="-a" - diff --git a/config/gdbserver.conf b/config/gdbserver.conf deleted file mode 100644 index f9d1696..0000000 --- a/config/gdbserver.conf +++ /dev/null @@ -1,12 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -latest="binutils-gdb.git/gdb_7_6-branch" - -# If yes, only static linking will be used -static_link=yes - -default_configure_flags="LDFLAGS=-static" - -# This is a list of default flags always supplied to "make check". -runtest_flags="" diff --git a/config/gdk-pixbuf.conf b/config/gdk-pixbuf.conf deleted file mode 100644 index 71cd20c..0000000 --- a/config/gdk-pixbuf.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="2.28.2" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libgdk-pixbuf." - -# This is a list of default flags always supplied to configure -default_configure_flags="--without-libtiff --without-libjpeg" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/glib.conf b/config/glib.conf deleted file mode 100644 index 8d8cc53..0000000 --- a/config/glib.conf +++ /dev/null @@ -1,28 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="2.36.4" -#latest="glibc.git/release/2.17" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libglib." - -# This is a list of default flags always supplied to configure -default_configure_flags="--disable-modular-tests --disable-dependency-tracking --cache-file=/tmp/glib.cache" - -# If yes, only static linking will be used -static_link=yes - -# Glib needs a subset of the total config options to be set for the tests -# that can't be cross configured. This file gets produced when this config -# file is sourced. -if test ! -e /tmp/glib.cache; then - cat <<EOF > /tmp/glib.cache - glib_cv_stack_grows=no - glib_cv_uscore=yes - ac_cv_func_posix_getpwuid_r=yes - ac_cv_func_posix_getgrgid_r=yes -EOF -fi diff --git a/config/glibc.conf b/config/glibc.conf deleted file mode 100644 index eb82997..0000000 --- a/config/glibc.conf +++ /dev/null @@ -1,11 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -latest="glibc.git~linaro/2.20/master" - -# If yes, only static linking will be used -static_link=no - -default_configure_flags="--disable-profile --without-gd --enable-obsolete-rpc --with-headers=${sysroots}/usr/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes libc_cv_ctors_header=yes --enable-multi-arch" - -default_makeflags="PARALLELMFLAGS=\"-j ${cpus}\"" diff --git a/config/gmp.conf b/config/gmp.conf deleted file mode 100644 index be6ef98..0000000 --- a/config/gmp.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="5.1.3" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libgmp." - -# This is a list of default flags always supplied to configure -default_configure_flags="--enable-cxx --enable-fft" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/infrastructure.conf b/config/infrastructure.conf deleted file mode 100644 index a9c95b2..0000000 --- a/config/infrastructure.conf +++ /dev/null @@ -1,6 +0,0 @@ -# These need to be built and installed in the order they are listed. -depends="gmp mpfr mpc dejagnu" # installjammer make - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/isl.conf b/config/isl.conf deleted file mode 100644 index d9db1c7..0000000 --- a/config/isl.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="gmp" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp-prefix=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/libelf.conf b/config/libelf.conf deleted file mode 100644 index a852a08..0000000 --- a/config/libelf.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="0.8.13" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libelf." - -# This is a list of default flags always supplied to configure -default_configure_flags="" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/linaro.exp b/config/linaro.exp deleted file mode 100644 index e853fa1..0000000 --- a/config/linaro.exp +++ /dev/null @@ -1,97 +0,0 @@ -# The master configuration file should be here - -set sysroot /opt/linaro/sysroot-linaro_eglibc-2_18-aarch64-linux-gnu -set besysroot /opt/linaro/sysroot-linaro_eglibc-2_18-aarch64_be-linux-gnu - -set newlib sysroot-newlib.git~linaro_newlib-branch-aarch64-none-elf/ -set benewlib sysroot-newlib.git~linaro_newlib-branch-aarch64_be-none-elf/ - -global env -if {[info exists env(PREFIX_UNDER_TEST)]} { - set prefix "$env(PREFIX_UNDER_TEST)" - set flags "" - if {[info exists env(FLAGS_UNDER_TEST)]} { - set flags "$env(FLAGS_UNDER_TEST)" - } - if {[info exists env(SYSROOT_UNDER_TEST)]} { - set flags "${flags} --sysroot=$env(SYSROOT_UNDER_TEST)" - } - - set GCC_UNDER_TEST "[set prefix]gcc $flags" - set GXX_UNDER_TEST "[set prefix]g++ $flags" - set GFORTRAN_UNDER_TEST "[set prefix]gfortran $flags" - set OBJC_UNDER_TEST "[set prefix]gcc $flags" - set GOC_UNDER_TEST "[set prefix]goc $flags" - set GNAT_UNDER_TEST "[set prefix]gnat $flags" -} - -set myname [get_local_hostname] - -case "$myname" in { - { localhost } { - set target_list { unix } - } -} - -case "$target_triplet" in { - { "arm-*linux-gnueabi*"} { - case "$myname" in { - { tcwgrob* ripple* darkstar* } { -# set target_list { tcwgchromebook } -# set target_list { tcwgd01 } -# set target_list { chrome1-01 } - set target_list { dragon-01 } - } - { tcwgbuild* toolchain64 tcwg-ex40-* } { - set target_list { dragon-d01 } - } - { tcwgchromebook* tcwg-d01-* tcwg-chrome2-* } { - set target_list { unix } - } - } - } - { "arm-*eabi" } { - global SIM - # CPU and sysroot are set through the environment - set SIM "qemu-arm" - set target_list { "arm-qemu" } - } - { "armeb-*" } { - global SIM - # CPU and sysroot are set through the environment - set SIM "qemu-armeb" - set target_list { "arm-qemu" } - } - { "aarch64*-none-elf*" } { - set target_list { "v8model" } - set env(FOUNDATION_MODEL) "/linaro/foundation-model/Foundation_v8pkg/Foundation_v8" - } - { "aarch64-*linux-gnu" } { - case "$myname" in { - { tcwgrob tcwgbuild* toolchain64 tcwg-ex40* } { - set target_list { aus-colo-01 } - } - { tcwg-apm-* } { - set target_list { unix } - } - } - } - { "x86_64-*linux-gnu" "i686-*linux-gnu" } { - case "$myname" in { - { tcwgrob tcwgbuild* toolchain64 tcwg-ex40-* } { - set target_list { unix } - } - } - } - { "*linux-gnu*" } { - case "$myname" in { - { tcwgrob tcwgbuild* toolchain64 tcwg-ex40-* } { - set target_list { tcwgbuild tcwg-ex40 } - set board_info(tcwgbuild,remote_sim) "qemu-[lindex [split $target_triplet -] 0]-static -cpu any -L /sysroot" - } - } - } - default { - puts "No target hardware for $target_triplet" - } -} diff --git a/config/linux.conf b/config/linux.conf deleted file mode 100644 index bdbc7d3..0000000 --- a/config/linux.conf +++ /dev/null @@ -1,35 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -# This is a list of default flags always supplied to configure -default_configure_flags="" - -# binutils configure doesn't work under dash, which is the default shell on some -# distributions, so we force it to be bash. - -# This is the latest version of this toolchain component, which is a tarball -latest="linux-linaro-3.17-2014.10" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="" - -if test x"${build}" != x"${target}"; then - # Add platform specific flags - case ${target} in - arm*-*) - default_makeflags="headers_install ARCH=arm INSTALL_HDR_PATH=${sysroots}/usr" - ;; - aarch64*-*) - default_makeflags="headers_install ARCH=arm64 INSTALL_HDR_PATH=${sysroots}/usr" - ;; - x86_64*-*) - default_makeflags="headers_install ARCH=x86_64 INSTALL_HDR_PATH=${sysroots}/usr" - ;; - i686*-*|i585*-*) - default_makeflags="headers_install ARCH=i686 INSTALL_HDR_PATH=${sysroots}/usr" - ;; - *) - ;; - esac -fi diff --git a/config/llvm.conf b/config/llvm.conf deleted file mode 100644 index 71c8788..0000000 --- a/config/llvm.conf +++ /dev/null @@ -1,10 +0,0 @@ -# This is a list of packages that must be installed on the build machine -# depends="isl cloog mpfr mpc" -depends="" - -# This is a list of default flags always supplied to configure -default_configure_flags="" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/make.conf b/config/make.conf deleted file mode 100644 index d4e407c..0000000 --- a/config/make.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="4.0" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="make" - -# This is a list of default flags always supplied to configure -default_configure_flags="" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/mpc.conf b/config/mpc.conf deleted file mode 100644 index cb0207f..0000000 --- a/config/mpc.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="1.0.1" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libmpc." - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host}" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/mpfr.conf b/config/mpfr.conf deleted file mode 100644 index 728133a..0000000 --- a/config/mpfr.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="3.1.2" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libmpfr." - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp=${local_builds}/destdir/${host}" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/newlib.conf b/config/newlib.conf deleted file mode 100644 index 8d3ccc8..0000000 --- a/config/newlib.conf +++ /dev/null @@ -1,15 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -latest="newlib.git~linaro_newlib-branch" - -# The --with-newlib flag may seem weird for newlib build. Newlib has -# top level configure/Makefile above newlib, and without this flag it -# won't configure and build newlib. -# This is a list of default flags always supplied to configure -# Without -nostdlib, newlib won't configure. -default_configure_flags="--with-newlib LDFLAGS=-nostdlib --enable-newlib-multithread --enable-newlib-io-pos-args --enable-newlib-io-c99-formats --enable-newlib-io-long-long --enable-newlib-io-long-double" -#default_makeflags="install-rdimon" - -# If yes, only static linking will be used -static_link=yes diff --git a/config/ppl.conf b/config/ppl.conf deleted file mode 100644 index 6aa8041..0000000 --- a/config/ppl.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of other components need to build this component -depends="gmp" - -# This is a list of default flags always supplied to configure -default_configure_flags="--with-gmp=${PWD}/${hostname}/${build}/depends" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/qemu.conf b/config/qemu.conf deleted file mode 100644 index d6ee10d..0000000 --- a/config/qemu.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This is a list of packages that must be installed on the build machine -depends="" - -# This is a list of default flags always supplied to configure -default_configure_flags="--target-list=arm-linux-user,armeb-linux-user,aarch64-linux-user --disable-zlib-test --static --disable-werror" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/qt-everywhere-opensource-src.conf b/config/qt-everywhere-opensource-src.conf deleted file mode 100644 index b06059a..0000000 --- a/config/qt-everywhere-opensource-src.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="5.11" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libQTCore." - -# This is a list of default flags always supplied to configure -default_configure_flags="-opensource -no-glib -no-opengl -no-openssl -qt-libpng -qt-libjpeg -qt-zlib -no-gif -confirm-license -xplatform qws/linux-arm-gnueabi-g++" - -# If yes, only static linking will be used -static_link=yes - diff --git a/config/schroot-master/.gitignore b/config/schroot-master/.gitignore deleted file mode 100644 index aa1ec1e..0000000 --- a/config/schroot-master/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.tgz diff --git a/config/schroot-master/chroot.d/.gitignore b/config/schroot-master/chroot.d/.gitignore deleted file mode 100644 index 5991303..0000000 --- a/config/schroot-master/chroot.d/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tcwg-test-* diff --git a/config/schroot-master/tcwg-schroot-farm.sh b/config/schroot-master/tcwg-schroot-farm.sh deleted file mode 100755 index 5b6541c..0000000 --- a/config/schroot-master/tcwg-schroot-farm.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -#set -x - -master="$(dirname $0)" -test_schroot="$master/../../scripts/test-schroot.sh" - -tcwgbuild_archs=( - aarch64-linux-gnu - arm-linux-gnueabihf - i686-linux-gnu - x86_64-linux-gnu -) - -# Generate chroots for all supported targets on tcwgbuild01 ... -pids="" -set -e -for a in "${tcwgbuild_archs[@]}"; do - true & - #eval $test_schroot -g -c $master -a $a maxim@tcwgbuild01 & - pids="$pids $!" -done -set +e -wait $pids - -ssh_opts="-o ConnectTimeout=5" - -#cmd1="true" -cmd1="ssh $ssh_opts \$m sudo apt-get install -y schroot" -#cmd1="ssh $ssh_opts \$m sudo rm -f /etc/schroot/chroot.d/tcwg-test-\\\* /var/chroots/tcwg-test-\\\*" -#cmd1="echo \$m; ssh $ssh_opts \$m bash -c \\\"schroot -l --all-sessions \| grep -e tcwg-test \\\"" -#cmd1="echo \$m; ssh $ssh_opts \$m bash -c \\\"schroot -l --all-sessions \| grep -e tcwg-test \| xargs -i@ sudo schroot -e -c @\\\"" - -#cmd2="true" -cmd2="($test_schroot -c $master -a \$a -o \"$ssh_opts\" \$m && echo \$m:\$a: OK) || echo \$m:\$a: ERROR" - -# ... then copy them to all other tcwgbuildXX machines. -pids="" -for m in $(for i in `seq 1 6`; do echo maxim@tcwgbuild0$i; done); do - eval $cmd1 & - pids="$pids $!" - for a in i686-linux-gnu x86_64-linux-gnu; do - eval $cmd2 & - pids="$pids $!" - done -done -# Copy ARMv7 hard-fp and soft-fp chroots to all D01s and chromebooks. -for m in $(for i in `seq 1 3`; do echo linaro@tcwg-d01-0$i; done) $(for i in `seq 1 8`; do echo linaro@tcwgchromebook0$i; done); do - eval $cmd1 & - pids="$pids $!" - for a in arm-linux-gnueabihf; do - eval $cmd2 & - pids="$pids $!" - done -done -# Copy Aarch64 and ARM 32-bit chroots to APM boards. -for m in $(for i in `seq 1 3`; do echo linaro@tcwg-apm-0$i; done); do - eval $cmd1 & - pids="$pids $!" - for a in aarch64-linux-gnu arm-linux-gnueabihf; do - eval $cmd2 & - pids="$pids $!" - done -done - -wait $pids -echo ALL DONE diff --git a/config/schroot-master/tcwg-test/copyfiles b/config/schroot-master/tcwg-test/copyfiles deleted file mode 100644 index 22b2961..0000000 --- a/config/schroot-master/tcwg-test/copyfiles +++ /dev/null @@ -1,4 +0,0 @@ -# Files to copy into the chroot from the host system. -# -# <source and destination> -/etc/resolv.conf diff --git a/config/schroot-master/tcwg-test/fstab b/config/schroot-master/tcwg-test/fstab deleted file mode 100644 index d611f9d..0000000 --- a/config/schroot-master/tcwg-test/fstab +++ /dev/null @@ -1,25 +0,0 @@ -# fstab: static file system information for chroots. -# Note that the mount point will be prefixed by the chroot path -# (CHROOT_PATH) -# -# <file system> <mount point> <type> <options> <dump> <pass> -/proc /proc none rw,bind 0 0 -/sys /sys none rw,bind 0 0 - -tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0 -none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0 -none /run/shm tmpfs rw,nosuid,nodev 0 0 - -/dev /dev none rw,bind 0 0 -/dev/pts /dev/pts none rw,bind 0 0 -#/home /home none rw,bind 0 0 -#/tmp /tmp none rw,bind 0 0 - -# It may be desirable to have access to /run, especially if you wish -# to run additional services in the chroot. However, note that this -# may potentially cause undesirable behaviour on upgrades, such as -# killing services on the host. -#/run /run none rw,bind 0 0 -#/run/lock /run/lock none rw,bind 0 0 -#/dev/shm /dev/shm none rw,bind 0 0 -#/run/shm /run/shm none rw,bind 0 0 diff --git a/config/schroot-master/tcwg-test/nssdatabases b/config/schroot-master/tcwg-test/nssdatabases deleted file mode 100644 index 722a451..0000000 --- a/config/schroot-master/tcwg-test/nssdatabases +++ /dev/null @@ -1,11 +0,0 @@ -# System databases to copy into the chroot from the host system. -# -# <database name> -passwd -shadow -group -gshadow -services -protocols -networks -hosts diff --git a/config/sources.conf b/config/sources.conf deleted file mode 100644 index 9d755bd..0000000 --- a/config/sources.conf +++ /dev/null @@ -1,58 +0,0 @@ -# -# This is a table of URLs for checking out development sources. -# NOTE: use spaces instead of TABs -# - -dejagnu.git http://git.linaro.org/git/toolchain/dejagnu.git -kernel http://git.linaro.org/git/kernel/linux-linaro-stable.git -linux-linaro http://git.linaro.org/git/kernel/linux-linaro-stable.git - -# GCC -gcc-4.6 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch -gcc-4.7 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch -gcc-4.8 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch -gcc-aarch64-4.7 svn://gcc.gnu.org/svn/gcc/branches/ARM/aarch64-4.7-branch -gcc-embedded-4.6 svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_6-branch -gcc-google-4.6 svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6 -#gcc svn://gcc.gnu.org/svn/gcc/trunk -gcc.git http://git.linaro.org/git/toolchain/gcc.git -cbuild2.git http://git.linaro.org/git/toolchain/cbuild2.git -#gcc.git http://staging.git.linaro.org/git/toolchain/gcc.git - -#gcc-linaro-4.7 lp:gcc-linaro/4.7 -gcc-linaro-4.6 lp:gcc-linaro/4.6 -gdb-linaro-7.6 lp:gdb-linaro/7.6 -gdb-linaro-7.5 lp:gdb-linaro/7.5 -clang http://llvm.org/svn/llvm-project/cfe/trunk -cfe http://llvm.org/svn/llvm-project/cfe/trunk - -# Binutils -binutils.git http://git.linaro.org/git/toolchain/binutils.git -binutils-gdb.git http://git.linaro.org/git/toolchain/binutils-gdb.git -gdb.git http://git.linaro.org/git/toolchain/gdb.git - -# Libraries -llvm http://llvm.org/svn/llvm-project/llvm/trunk -eglibc.git http://git.linaro.org/git/toolchain/eglibc.git -glibc.git http://git.linaro.org/git/toolchain/glibc.git -newlib.git http://git.linaro.org/git/toolchain/newlib.git -libgloss.git http://git.linaro.org/git/toolchain/newlib.git -cortex-strings lp:cortex-strings -libav.git http://git.libav.org/libav.git -libffi.git http://github.com/atgreen/libffi.git - -crosstool-ng-linaro lp:~linaro-toolchain-dev/crosstool-ng/linaro - -boot-wrapper.git http://git.linaro.org/arm/models/boot-wrapper.git - -bitbake.git git://git.openembedded.org/bitbake -llvm-test-suite http://llvm.org/svn/llvm-project/test-suite/trunk - -meta-linaro.git http://git.linaro.org/openembedded/meta-linaro.git -openembedded-core.git git://git.openembedded.org/openembedded-core -valgrind svn://svn.valgrind.org/valgrind/trunk -qemu.git git://git.qemu.org/qemu.git -qemu-linaro.git http://git.linaro.org/qemu/qemu-linaro.git - -#Benchmarks -eembc.git ssh://somehost/somepath/eembc.git diff --git a/config/zlib.conf b/config/zlib.conf deleted file mode 100644 index b9a00e8..0000000 --- a/config/zlib.conf +++ /dev/null @@ -1,16 +0,0 @@ -# This is a list of other components need to build this component -depends="" - -# This is the latest version of this toolchain component -latest="1.2.8" - -# This is a file that gets installed that is used to determine if the toolchain -# component is already installed. -installs="libz." - -# This is a list of default flags always supplied to configure -default_configure_flags="" - -# If yes, only static linking will be used -static_link=yes - diff --git a/configure b/configure deleted file mode 100755 index 0dda4c2..0000000 --- a/configure +++ /dev/null @@ -1,5400 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cbuild 2.0dev. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# 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'" - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cbuild' -PACKAGE_TARNAME='cbuild' -PACKAGE_VERSION='2.0dev' -PACKAGE_STRING='cbuild 2.0dev' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_unique_file="cbuild2.sh" -ac_subst_vars='LTLIBOBJS -LIBOBJS -NEWWORKDIR -MAKEINFO -DEJAGNU -LIBTOOL -AUTOMAKE -AUTOCONF -ENABLE_PARALLEL -ENABLE_SOURCE_UPDATE -ENABLE_SCHROOT_TEST -ENABLE_MAKE_DOCS -ENABLE_INSTALL -ENABLE_ALLTESTS -ENABLE_BOOTSTRAP -ENABLE_SSH -WITH_LANGUAGES -REMOTE_SNAPSHOTS -LOCAL_BUILDS -GIT_REFERENCE_DIR -LOCAL_SNAPSHOTS -SYSROOTS -CBUILD_PATH -SOURCES_CONF -FILESERVER -CBUILD_TOP -BUILDDATE -CCRYPT -AUTOGEN -BISON -FLEX -BASH -LSBCXX -LSBCC -CCACHE -WGET -DISTRIBUTION -HOSTNAME -BUILDHOST -BUILD_ARCH -KERNEL -LIBC -CORES -CPUS -DBHOST -DBPASSWD -DBUSER -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -ac_ct_CXX -CXXFLAGS -CXX -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_dbuser -with_dbpasswd -with_dbhost -with_toplevel -with_fileserver -with_sources_conf -with_sysroot -with_local_snapshots -with_git_reference_dir -with_local_builds -with_remote_snapshots -with_languages -enable_ssh -enable_bootstrap -enable_alltests -enable_install -enable_make_docs -enable_schroot_test -enable_source_update -enable_parallel -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CXX -CXXFLAGS -CCC' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cbuild 2.0dev to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/cbuild] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cbuild 2.0dev:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-ssh If you have SSH access to remote build host - --enable-bootstrap If you want to do bootstrap by default - --enable-alltests If you want to run all tests by default - --enable-install If you want to install by default - --enable-make-docs If you want to enable making package documentation - --enable-schroot-test If you want to used schroot-based testing by default - --enable-source-update If you want to update sources by default - --enable-parallel If you want to build with make -j<number of CPUs> by - default - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-dbuser set the user name for the database - --with-dbpasswd set the user password for the database - --with-dbhost set the database hostname - --with-toplevel - --with-fileserver the remote file server hostname - --with-sources-conf - --with-sysroot - --with-local-snapshots Where downloaded tarballs are stored - --with-git-reference-dir - Where reference git repos are stored, see git-clone - --reference - --with-local-builds - --with-remote-snapshots - --with-languages List of languages for the compiler - -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> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - CXX C++ compiler command - CXXFLAGS C++ compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cbuild configure 2.0dev -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cbuild $as_me 2.0dev, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - 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. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -missing= -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# 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 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: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $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 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "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 - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - 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 ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test x"${CC}" = x -a x"${CXX}" = x; then - as_fn_error $? "You need 'gcc' and 'g++' to fully run cbuild!" "$LINENO" 5 - missing="${missing} gcc" -fi -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 - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_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 - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -DBUSER=${dbuser} - -DBPASSWD=${dbpasswd} - -DBHOST=${dbhost} - - -CPUS="`getconf _NPROCESSORS_ONLN`" - -CORES="`grep cores /proc/cpuinfo | tail -1 | cut -d ' ' -f 3`" - -LIBC="`getconf GNU_LIBC_VERSION`" - -KERNEL="`uname -r`" - -BUILDHOST="`${srcdir}/config.guess`" -BUILD_ARCH="`uname -m`" - - -HOSTNAME="`uname -n`" - -DISTRIBUTION="`lsb_release -sc`" - - -# Extract the first word of "wget", so it can be a program name with args. -set dummy wget; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_WGET+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $WGET in - [\\/]* | ?:[\\/]*) - ac_cv_path_WGET="$WGET" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -WGET=$ac_cv_path_WGET -if test -n "$WGET"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 -$as_echo "$WGET" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -if test x"${WGET}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'wget' to fully run cbuild!" >&5 -$as_echo "$as_me: WARNING: You need 'wget' to fully run cbuild!" >&2;} - missing="${missing} wget" -fi - -# Extract the first word of "ccache", so it can be a program name with args. -set dummy ccache; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CCACHE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CCACHE in - [\\/]* | ?:[\\/]*) - ac_cv_path_CCACHE="$CCACHE" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -CCACHE=$ac_cv_path_CCACHE -if test -n "$CCACHE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 -$as_echo "$CCACHE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -# Extract the first word of "lsbcc", so it can be a program name with args. -set dummy lsbcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LSBCC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LSBCC in - [\\/]* | ?:[\\/]*) - ac_cv_path_LSBCC="$LSBCC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LSBCC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LSBCC=$ac_cv_path_LSBCC -if test -n "$LSBCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LSBCC" >&5 -$as_echo "$LSBCC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "lsbc++", so it can be a program name with args. -set dummy lsbc++; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LSBCXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LSBCXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_LSBCXX="$LSBCXX" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LSBCXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LSBCXX=$ac_cv_path_LSBCXX -if test -n "$LSBCXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LSBCXX" >&5 -$as_echo "$LSBCXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${LSBCC}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'lsbcc' and 'lsbc++' to produce binary releases!" >&5 -$as_echo "$as_me: WARNING: You need 'lsbcc' and 'lsbc++' to produce binary releases!" >&2;} -# missing="${missing} lsbcc" -fi - - - -# Extract the first word of "bash", so it can be a program name with args. -set dummy bash; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BASH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BASH in - [\\/]* | ?:[\\/]*) - ac_cv_path_BASH="$BASH" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -BASH=$ac_cv_path_BASH -if test -n "$BASH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 -$as_echo "$BASH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -if test x"${BASH}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need Bash to run configure properly!" >&5 -$as_echo "$as_me: WARNING: You need Bash to run configure properly!" >&2;} - missing="${missing} bash" -fi - -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_FLEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $FLEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_FLEX="$FLEX" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -FLEX=$ac_cv_path_FLEX -if test -n "$FLEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 -$as_echo "$FLEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${FLEX}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'flex' to run configure GCC properly!" >&5 -$as_echo "$as_me: WARNING: You need 'flex' to run configure GCC properly!" >&2;} - missing="${missing} flex" -fi - -# Extract the first word of "bison", so it can be a program name with args. -set dummy bison; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BISON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BISON in - [\\/]* | ?:[\\/]*) - ac_cv_path_BISON="$BISON" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -BISON=$ac_cv_path_BISON -if test -n "$BISON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 -$as_echo "$BISON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${BISON}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'bison' to run configure GCC properly!" >&5 -$as_echo "$as_me: WARNING: You need 'bison' to run configure GCC properly!" >&2;} - missing="${missing} bison" -fi - -# Extract the first word of "autogen", so it can be a program name with args. -set dummy autogen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AUTOGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $AUTOGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_AUTOGEN="$AUTOGEN" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AUTOGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -AUTOGEN=$ac_cv_path_AUTOGEN -if test -n "$AUTOGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOGEN" >&5 -$as_echo "$AUTOGEN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${AUTOGEN}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'autogen' to run configure for GCC properly!" >&5 -$as_echo "$as_me: WARNING: You need 'autogen' to run configure for GCC properly!" >&2;} - missing="${missing} autogen" -fi - -# Extract the first word of "ccrypt", so it can be a program name with args. -set dummy ccrypt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CCRYPT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CCRYPT in - [\\/]* | ?:[\\/]*) - ac_cv_path_CCRYPT="$CCRYPT" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CCRYPT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -CCRYPT=$ac_cv_path_CCRYPT -if test -n "$CCRYPT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCRYPT" >&5 -$as_echo "$CCRYPT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${CCRYPT}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'ccrypt' to run benchmarks, this can be ignored for builds" >&5 -$as_echo "$as_me: WARNING: You need 'ccrypt' to run benchmarks, this can be ignored for builds" >&2;} - missing="${missing} ccrypt" -fi - -#AC_CHECK_LIB(ncurses, doupdate) -#if test x${ac_cv_lib_ncurses_doupdate} != x"yes"; then -# AC_MSG_WARN([You need 'libncurses' to run configure for GDB properly!]) -# missing="${missing} libncurses5-dev" -#fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 -$as_echo_n "checking for gzread in -lz... " >&6; } -if ${ac_cv_lib_z_gzread+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $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 gzread (); -int -main () -{ -return gzread (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_gzread=yes -else - ac_cv_lib_z_gzread=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_z_gzread" >&5 -$as_echo "$ac_cv_lib_z_gzread" >&6; } -if test "x$ac_cv_lib_z_gzread" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -fi - - -# Versions of Make before 4.0 have a bug which breaks eglibc builds when -# using parallel jobs. -#makeversion="`make --version | head -1 | tr -d '.' | cut -d ' ' -f 3`" -#MAKEVERSION="${makeversion}" -#AC_SUBST(MAKEVERSION) -#if test ${makeversion} -lt 400; then -# AC_MSG_WARN([Make 4.0 is missing, which is required]) -#fi - -#packages="git-svn bzr-fastimport svn-all-fast-exp libncurses5-dev texinfo" -packages="texinfo gawk" - -### Debian packages ### -dpkg="`which dpkg 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - # add Ubuntu specific packages - if test x"${BUILD_ARCH}" != xaarch64; then - packages="${packages} gcc-multilib g++-multilib libncurses5-dev" - fi - for i in ${packages}; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $i is installed" >&5 -$as_echo_n "checking if $i is installed... " >&6; } - #exists=`dpkg --get-selections | grep -c "^$i\[[:space:]\]*install"` - exists="`dpkg -l $i | tail -1| cut -d ' ' -f 1`" - if test x"${exists}" != x'ii'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, install $i" >&5 -$as_echo "no, install $i" >&6; } - missing="${missing} $i" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - done - -### RPM Packages ### -else -yum="`which yum 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - packages="${packages} ncurses-devel" - for i in ${packages}; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $i is installed" >&5 -$as_echo_n "checking if $i is installed... " >&6; } - exists="`rpm -q -a $i| grep -c $i`" - if test ${exists} -eq 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, install $i" >&5 -$as_echo "no, install $i" >&6; } - missing="${missing} $i" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - done - -### Arch Packages ### -else -pacman="`which pacman 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - for i in ${packages}; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $i is installed" >&5 -$as_echo_n "checking if $i is installed... " >&6; } - exists="`pacman -Qs ${i} | wc -l`" - if test ${exists} -eq 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, install $i" >&5 -$as_echo "no, install $i" >&6; } - missing="${missing} $i" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - done - -### Unknown Packages ### -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown package management system" >&5 -$as_echo "$as_me: WARNING: Unknown package management system" >&2;} -fi # Arch -fi # RPM -fi # Debian - - -BUILDDATE="`date +%Y%m%d`" - - - -# Check whether --with-dbuser was given. -if test "${with_dbuser+set}" = set; then : - withval=$with_dbuser; dbuser=${withval} ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The database user name is stored in an unencrypted text file which could be considered a security risk!" >&5 -$as_echo "$as_me: WARNING: The database user name is stored in an unencrypted text file which could be considered a security risk!" >&2;} -else - dbuser='default' -fi - - - -# Check whether --with-dbpasswd was given. -if test "${with_dbpasswd+set}" = set; then : - withval=$with_dbpasswd; dbpasswd=${withval} ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It's a bad idea to set the database password as it's stored in an unencrypted text file!" >&5 -$as_echo "$as_me: WARNING: It's a bad idea to set the database password as it's stored in an unencrypted text file!" >&2;} -else - dbpasswd='default' -fi - - - -# Check whether --with-dbhost was given. -if test "${with_dbhost+set}" = set; then : - withval=$with_dbhost; dbhost=${withval} ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The database hostname is stored in an unencrypted text file which could be considered a security risk!" >&5 -$as_echo "$as_me: WARNING: The database hostname is stored in an unencrypted text file which could be considered a security risk!" >&2;} -else - dbhost='localhost' -fi - - - -# Check whether --with-toplevel was given. -if test "${with_toplevel+set}" = set; then : - withval=$with_toplevel; CBUILD_TOP=${withval} -else - CBUILD_TOP="${PWD}" -fi - - - -if test ! -d ${CBUILD_TOP}; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${CBUILD_TOP} does not exist so creating directory!" >&5 -$as_echo "$as_me: WARNING: ${CBUILD_TOP} does not exist so creating directory!" >&2;} - mkdir -p ${CBUILD_TOP} -fi - -# The various Jenkins jobs copy log files and rest results to a remote file -# server for storage and comparison. For the TCWG, this has been 'toolchain64'. - -# Check whether --with-fileserver was given. -if test "${with_fileserver+set}" = set; then : - withval=$with_fileserver; FILESERVER=${withval} -else - FILESERVER='abe.tcwglab.linaro.org' -fi - - - - -# Check whether --with-sources-conf was given. -if test "${with_sources_conf+set}" = set; then : - withval=$with_sources_conf; SOURCES_CONF=${withval} -else - SOURCES_CONF="${srcdir}/config/sources.conf" -fi - - - -CBUILD_PATH=$(readlink -f ${srcdir}) - - - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; SYSROOTS=${withval} -else - SYSROOTS="${CBUILD_TOP}"/sysroots -fi - - - -if test x"${target}" != x"${build}"; then - if test ! -d ${SYSROOTS}; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${SYSROOTS} does not exist so creating directory!" >&5 -$as_echo "$as_me: WARNING: ${SYSROOTS} does not exist so creating directory!" >&2;} - mkdir -p ${SYSROOTS} - fi -fi - - -# Check whether --with-local-snapshots was given. -if test "${with_local_snapshots+set}" = set; then : - withval=$with_local_snapshots; LOCAL_SNAPSHOTS=${withval} -else - LOCAL_SNAPSHOTS="${CBUILD_TOP}/snapshots" -fi - - - -if test ! -d ${LOCAL_SNAPSHOTS}; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${LOCAL_SNAPSHOTS} does not exist so creating directory!" >&5 -$as_echo "$as_me: WARNING: ${LOCAL_SNAPSHOTS} does not exist so creating directory!" >&2;} - mkdir -p ${LOCAL_SNAPSHOTS} -fi - - -# Check whether --with-git-reference-dir was given. -if test "${with_git_reference_dir+set}" = set; then : - withval=$with_git_reference_dir; GIT_REFERENCE_DIR=${withval} -else - GIT_REFERENCE_DIR="" -fi - - - - -# Check whether --with-local-builds was given. -if test "${with_local_builds+set}" = set; then : - withval=$with_local_builds; LOCAL_BUILDS=${withval} -else - LOCAL_BUILDS="${CBUILD_TOP}/builds" -fi - - - -if test ! -d ${LOCAL_BUILDS}; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${LOCAL_BUILDS} does not exist so creating directory!" >&5 -$as_echo "$as_me: WARNING: ${LOCAL_BUILDS} does not exist so creating directory!" >&2;} - mkdir -p ${LOCAL_BUILDS} -fi - - -# Check whether --with-remote-snapshots was given. -if test "${with_remote_snapshots+set}" = set; then : - withval=$with_remote_snapshots; REMOTE_SNAPSHOTS=${withval} -else - REMOTE_SNAPSHOTS="http://${FILESERVER}/snapshots" -fi - - - -echo "" -{ $as_echo "$as_me:${as_lineno-$LINENO}: Downloaded snapshots will be stored in: ${LOCAL_SNAPSHOTS}" >&5 -$as_echo "$as_me: Downloaded snapshots will be stored in: ${LOCAL_SNAPSHOTS}" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: My builds will be installed in: ${LOCAL_BUILDS}" >&5 -$as_echo "$as_me: My builds will be installed in: ${LOCAL_BUILDS}" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Sysroots will be installed in: ${SYSROOTS}" >&5 -$as_echo "$as_me: Sysroots will be installed in: ${SYSROOTS}" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Remote snapshots will be fetched from: ${REMOTE_SNAPSHOTS}" >&5 -$as_echo "$as_me: Remote snapshots will be fetched from: ${REMOTE_SNAPSHOTS}" >&6;} -echo "" - - -# Check whether --with-languages was given. -if test "${with_languages+set}" = set; then : - withval=$with_languages; WITH_LANGUAGES=${withval} -else - WITH_LANGUAGES='default' -fi - - - -# Check whether --enable-ssh was given. -if test "${enable_ssh+set}" = set; then : - enableval=$enable_ssh; case "${enableval}" in - yes) ENABLE_SSH=yes ;; - no) ENABLE_SSH=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-ssh option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-ssh option" >&2;} ;; -esac -else - ENABLE_SSH=no -fi - - - -# Check whether --enable-bootstrap was given. -if test "${enable_bootstrap+set}" = set; then : - enableval=$enable_bootstrap; case "${enableval}" in - yes) ENABLE_BOOTSTRAP=yes ;; - no) ENABLE_BOOTSTRAP=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-bootstrap option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-bootstrap option" >&2;} ;; -esac -else - ENABLE_BOOTSTRAP=no -fi - - - -# Check whether --enable-alltests was given. -if test "${enable_alltests+set}" = set; then : - enableval=$enable_alltests; case "${enableval}" in - yes) ENABLE_ALLTESTS=yes ;; - no) ENABLE_ALLTESTS=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-alltests option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-alltests option" >&2;} ;; -esac -else - ENABLE_ALLTESTS=no -fi - - - -# Check whether --enable-install was given. -if test "${enable_install+set}" = set; then : - enableval=$enable_install; case "${enableval}" in - yes) ENABLE_INSTALL=yes ;; - no) ENABLE_INSTALL=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-install option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-install option" >&2;} ;; -esac -else - ENABLE_INSTALL=yes -fi - - - -# Check whether --enable-make-docs was given. -if test "${enable_make_docs+set}" = set; then : - enableval=$enable_make_docs; case "${enableval}" in - yes) ENABLE_MAKE_DOCS=yes ;; - no) ENABLE_MAKE_DOCS=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-make-docs option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-make-docs option" >&2;} ;; -esac -else - ENABLE_MAKE_DOCS=yes -fi - - - -# Check whether --enable-schroot-test was given. -if test "${enable_schroot_test+set}" = set; then : - enableval=$enable_schroot_test; case "${enableval}" in - yes) ENABLE_SCHROOT_TEST=yes ;; - no) ENABLE_SCHROOT_TEST=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-schroot-test option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-schroot-test option" >&2;} ;; -esac -else - ENABLE_SCHROOT_TEST=no -fi - - - -# Check whether --enable-source-update was given. -if test "${enable_source_update+set}" = set; then : - enableval=$enable_source_update; case "${enableval}" in - yes) ENABLE_SOURCE_UPDATE=yes ;; - no) ENABLE_SOURCE_UPDATE=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-source-update option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-source-update option" >&2;} ;; -esac -else - ENABLE_SOURCE_UPDATE=yes -fi - - - -# Check whether --enable-parallel was given. -if test "${enable_parallel+set}" = set; then : - enableval=$enable_parallel; case "${enableval}" in - yes) ENABLE_PARALLEL=yes ;; - no) ENABLE_PARALLEL=no ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-parallel option" >&5 -$as_echo "$as_me: WARNING: bad value ${enableval} for enable-parallel option" >&2;} ;; -esac -else - ENABLE_PARALLEL=yes -fi - - - - -for ac_prog in autoconf -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AUTOCONF+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AUTOCONF"; then - ac_cv_prog_AUTOCONF="$AUTOCONF" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AUTOCONF="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AUTOCONF=$ac_cv_prog_AUTOCONF -if test -n "$AUTOCONF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 -$as_echo "$AUTOCONF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AUTOCONF" && break -done - -for ac_prog in automake -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AUTOMAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AUTOMAKE"; then - ac_cv_prog_AUTOMAKE="$AUTOMAKE" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AUTOMAKE="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AUTOMAKE=$ac_cv_prog_AUTOMAKE -if test -n "$AUTOMAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOMAKE" >&5 -$as_echo "$AUTOMAKE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AUTOMAKE" && break -done - -for ac_prog in libtool -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIBTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIBTOOL"; then - ac_cv_prog_LIBTOOL="$LIBTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIBTOOL="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIBTOOL=$ac_cv_prog_LIBTOOL -if test -n "$LIBTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBTOOL" >&5 -$as_echo "$LIBTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LIBTOOL" && break -done - -if test x"${AUTOCONF}" = x -o x"${AUTOMAKE}" = x -o x"${LIBTOOL}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You should install autoconf, automake, and libtool" >&5 -$as_echo "$as_me: WARNING: You should install autoconf, automake, and libtool" >&2;} -fi - -# Extract the first word of "runtest", so it can be a program name with args. -set dummy runtest; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DEJAGNU+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DEJAGNU in - [\\/]* | ?:[\\/]*) - ac_cv_path_DEJAGNU="$DEJAGNU" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DEJAGNU="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -DEJAGNU=$ac_cv_path_DEJAGNU -if test -n "$DEJAGNU"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEJAGNU" >&5 -$as_echo "$DEJAGNU" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${DEJAGNU}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You should install dejagnu so you can run tests" >&5 -$as_echo "$as_me: WARNING: You should install dejagnu so you can run tests" >&2;} - missing="${missing} dejagnu" -fi - -# Extract the first word of "makeinfo", so it can be a program name with args. -set dummy makeinfo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MAKEINFO+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAKEINFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_MAKEINFO="$MAKEINFO" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -MAKEINFO=$ac_cv_path_MAKEINFO -if test -n "$MAKEINFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 -$as_echo "$MAKEINFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Texinfo 5 can't process the gcc texinfo files until they are fixed, -# so we have to disable it for Ubuntu 14.04 "trusty". -if test `lsb_release -i -s` = "Ubuntu"; then - texversion="`dpkg-query -W -f='\${Version}' texinfo | cut -d '.' -f 1`" - if test "${texversion}" -gt 4; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: On Ubuntu Trusty systems, you may need to upgrade to have a working version of makeinfo" >&5 -$as_echo "$as_me: WARNING: On Ubuntu Trusty systems, you may need to upgrade to have a working version of makeinfo" >&2;} - fi -fi - - -# Extract the first word of "git-new-workdir", so it can be a program name with args. -set dummy git-new-workdir; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NEWWORKDIR+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NEWWORKDIR in - [\\/]* | ?:[\\/]*) - ac_cv_path_NEWWORKDIR="$NEWWORKDIR" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NEWWORKDIR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NEWWORKDIR=$ac_cv_path_NEWWORKDIR -if test -n "$NEWWORKDIR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEWWORKDIR" >&5 -$as_echo "$NEWWORKDIR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"${NEWWORKDIR}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need to install git-new-workdir to use GIT!" >&5 -$as_echo "$as_me: WARNING: You need to install git-new-workdir to use GIT!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: copy /usr/share/doc/git/contrib/workdir/git-new-workdir to /usr/local/bin and then make it executable" >&5 -$as_echo "$as_me: copy /usr/share/doc/git/contrib/workdir/git-new-workdir to /usr/local/bin and then make it executable" >&6;} - missing="${missing} git-new-workdir" -fi - - -# A symbolic link needs to be made in this directory -#if test -w /opt/linaro -eq 0; then -# AC_MSG_WARN([/opt/linaro is not writable!]) -#fi - -ac_config_files="$ac_config_files host.conf" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cbuild $as_me 2.0dev, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cbuild config.status 2.0dev -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "host.conf") CONFIG_FILES="$CONFIG_FILES host.conf" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -if test x"${missing}" != x; then - as_fn_error $? "You need to install these packages: ${missing}" "$LINENO" 5 -fi - -rm -f Makefile -cat<<EOF > Makefile -check: - ${srcdir}/testsuite/test.sh -EOF - -# Local Variables: -# c-basic-offset: 2 -# tab-width: 2 -# indent-tabs-mode: nil -# End: - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index dff00fe..0000000 --- a/configure.ac +++ /dev/null @@ -1,459 +0,0 @@ -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -dnl -dnl This script configures the build machine to have what it needs to -dnl build and test a GNU toolchain. -dnl - -AC_PREREQ(2.59c) -AC_INIT(cbuild, 2.0dev) -AC_CONFIG_SRCDIR([cbuild2.sh]) -dnl AC_CONFIG_HEADERS([config.h]) -dnl AC_CONFIG_MACRO_DIR([macros]) - -dnl -------------------------------------------------------- -dnl Figure out development tool stuff -dnl -------------------------------------------------------- -missing= -AC_PROG_CC -AC_PROG_CXX -if test x"${CC}" = x -a x"${CXX}" = x; then - AC_MSG_ERROR([You need 'gcc' and 'g++' to fully run cbuild!]) - missing="${missing} gcc" -fi -AC_PROG_INSTALL -dnl AC_CANONICAL_BUILD -dnl AC_CANONICAL_HOST - -dnl Get and store often used information on this build machine -DBUSER=${dbuser} -AC_SUBST(DBUSER) -DBPASSWD=${dbpasswd} -AC_SUBST(DBPASSWD) -DBHOST=${dbhost} -AC_SUBST(DBHOST) - -CPUS="`getconf _NPROCESSORS_ONLN`" -AC_SUBST(CPUS) -CORES="`grep cores /proc/cpuinfo | tail -1 | cut -d ' ' -f 3`" -AC_SUBST(CORES) -LIBC="`getconf GNU_LIBC_VERSION`" -AC_SUBST(LIBC) -KERNEL="`uname -r`" -AC_SUBST(KERNEL) -BUILDHOST="`${srcdir}/config.guess`" -BUILD_ARCH="`uname -m`" -AC_SUBST(BUILD_ARCH) -AC_SUBST(BUILDHOST) -HOSTNAME="`uname -n`" -AC_SUBST(HOSTNAME) -DISTRIBUTION="`lsb_release -sc`" -AC_SUBST(DISTRIBUTION) - -AC_PATH_PROG(WGET, wget) -AC_SUBST(WGET) -if test x"${WGET}" = x; then - AC_MSG_WARN([You need 'wget' to fully run cbuild!]) - missing="${missing} wget" -fi - -AC_PATH_PROG(CCACHE, ccache) - -AC_PATH_PROG(LSBCC, lsbcc) -AC_PATH_PROG(LSBCXX, lsbc++) -if test x"${LSBCC}" = x; then - AC_MSG_WARN([You need 'lsbcc' and 'lsbc++' to produce binary releases!]) -# missing="${missing} lsbcc" -fi -AC_SUBST(LSBCC) -AC_SUBST(LSBCXX) - -dnl AC_PATH_PROG(GITBZR, git-bzr) -AC_PATH_PROG(BASH, bash) -AC_SUBST(BASH) -if test x"${BASH}" = x; then - AC_MSG_WARN([You need Bash to run configure properly!]) - missing="${missing} bash" -fi - -AC_PATH_PROG(FLEX, flex) -if test x"${FLEX}" = x; then - AC_MSG_WARN([You need 'flex' to run configure GCC properly!]) - missing="${missing} flex" -fi - -AC_PATH_PROG(BISON, bison) -if test x"${BISON}" = x; then - AC_MSG_WARN([You need 'bison' to run configure GCC properly!]) - missing="${missing} bison" -fi - -AC_PATH_PROG(AUTOGEN, autogen) -if test x"${AUTOGEN}" = x; then - AC_MSG_WARN([You need 'autogen' to run configure for GCC properly!]) - missing="${missing} autogen" -fi - -AC_PATH_PROG(CCRYPT, ccrypt) -if test x"${CCRYPT}" = x; then - AC_MSG_WARN([You need 'ccrypt' to run benchmarks, this can be ignored for builds]) - missing="${missing} ccrypt" -fi - -dnl Building GDB requires ncurses and termcap -#AC_CHECK_LIB(ncurses, doupdate) -#if test x${ac_cv_lib_ncurses_doupdate} != x"yes"; then -# AC_MSG_WARN([You need 'libncurses' to run configure for GDB properly!]) -# missing="${missing} libncurses5-dev" -#fi -AC_CHECK_LIB(z, gzread) - -# Versions of Make before 4.0 have a bug which breaks eglibc builds when -# using parallel jobs. -#makeversion="`make --version | head -1 | tr -d '.' | cut -d ' ' -f 3`" -#MAKEVERSION="${makeversion}" -#AC_SUBST(MAKEVERSION) -#if test ${makeversion} -lt 400; then -# AC_MSG_WARN([Make 4.0 is missing, which is required]) -#fi - -dnl Look for packages that do not have executables, so we are forced -dnl to ask the packaging system if they are installed. This is more -dnl reliable and portble than using pkg-config. -#packages="git-svn bzr-fastimport svn-all-fast-exp libncurses5-dev texinfo" -packages="texinfo gawk" - -### Debian packages ### -dpkg="`which dpkg 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - # add Ubuntu specific packages - if test x"${BUILD_ARCH}" != xaarch64; then - packages="${packages} gcc-multilib g++-multilib libncurses5-dev" - fi - for i in ${packages}; do - AC_MSG_CHECKING([if $i is installed]) - #exists=`dpkg --get-selections | grep -c "^$i\[[:space:]\]*install"` - exists="`dpkg -l $i | tail -1| cut -d ' ' -f 1`" - if test x"${exists}" != x'ii'; then - AC_MSG_RESULT([no, install $i]) - missing="${missing} $i" - else - AC_MSG_RESULT([yes]) - fi - done - -### RPM Packages ### -else -yum="`which yum 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - packages="${packages} ncurses-devel" - for i in ${packages}; do - AC_MSG_CHECKING([if $i is installed]) - exists="`rpm -q -a $i| grep -c $i`" - if test ${exists} -eq 0; then - AC_MSG_RESULT([no, install $i]) - missing="${missing} $i" - else - AC_MSG_RESULT([yes]) - fi - done - -### Arch Packages ### -else -pacman="`which pacman 2> /dev/null`" -result=$? -if test ${result} -eq 0; then - for i in ${packages}; do - AC_MSG_CHECKING([if $i is installed]) - exists="`pacman -Qs ${i} | wc -l`" - if test ${exists} -eq 0; then - AC_MSG_RESULT([no, install $i]) - missing="${missing} $i" - else - AC_MSG_RESULT([yes]) - fi - done - -### Unknown Packages ### -else - AC_MSG_WARN([Unknown package management system]) -fi # Arch -fi # RPM -fi # Debian - -dnl FIXME: Look for git-svn and git-bzr, bzr-fastimport svn-all-fast-export - -dnl Get build date for helping us debugging -BUILDDATE="`date +%Y%m%d`" -AC_SUBST(BUILDDATE) - -dnl While it's a bad idea to store the database access information in an unencrypted -dnl text file, this is useful for cbuild2 development itself. This option should never -dnl be used in a production environment. The default is read-only access. You can also -dnl set DBUSER and DBPASSWD in your environment, but that's also a possible security -dnl risk. -AC_ARG_WITH(dbuser, - AC_HELP_STRING([--with-dbuser], [set the user name for the database]), - dbuser=${withval} ; AC_MSG_WARN([The database user name is stored in an unencrypted text file which could be considered a security risk!]), - dbuser='default') - -AC_ARG_WITH(dbpasswd, - AC_HELP_STRING([--with-dbpasswd], [set the user password for the database]), - dbpasswd=${withval} ; AC_MSG_WARN([It's a bad idea to set the database password as it's stored in an unencrypted text file!]), - dbpasswd='default') - -AC_ARG_WITH(dbhost, - AC_HELP_STRING([--with-dbhost], [set the database hostname]), - dbhost=${withval} ; AC_MSG_WARN([The database hostname is stored in an unencrypted text file which could be considered a security risk!]), - dbhost='localhost') - -dnl The top of the cbuild tree -AC_ARG_WITH(toplevel, - AC_HELP_STRING([--with-toplevel], []), - CBUILD_TOP=${withval}, - CBUILD_TOP="${PWD}") -AC_SUBST(CBUILD_TOP) - -if test ! -d ${CBUILD_TOP}; then - AC_MSG_WARN([${CBUILD_TOP} does not exist so creating directory!]) - mkdir -p ${CBUILD_TOP} -fi - -# The various Jenkins jobs copy log files and rest results to a remote file -# server for storage and comparison. For the TCWG, this has been 'toolchain64'. -AC_ARG_WITH(fileserver, - AC_HELP_STRING([--with-fileserver], [the remote file server hostname]), - FILESERVER=${withval}, - FILESERVER='abe.tcwglab.linaro.org') -AC_SUBST(FILESERVER) - -AC_ARG_WITH(sources-conf, - AC_HELP_STRING([--with-sources-conf], []), - SOURCES_CONF=${withval}, - SOURCES_CONF="${srcdir}/config/sources.conf") -AC_SUBST(SOURCES_CONF) - -CBUILD_PATH=$(readlink -f ${srcdir}) -AC_SUBST(CBUILD_PATH) - -dnl The top of the cbuild tree -AC_ARG_WITH(sysroot, - AC_HELP_STRING([--with-sysroot], []), - SYSROOTS=${withval}, - SYSROOTS="${CBUILD_TOP}"/sysroots) -AC_SUBST(SYSROOTS) - -if test x"${target}" != x"${build}"; then - if test ! -d ${SYSROOTS}; then - AC_MSG_WARN(${SYSROOTS} does not exist so creating directory!) - mkdir -p ${SYSROOTS} - fi -fi - -dnl The local directory where snapshots are stored -AC_ARG_WITH(local-snapshots, - AC_HELP_STRING([--with-local-snapshots], [Where downloaded tarballs are stored]), - LOCAL_SNAPSHOTS=${withval}, - LOCAL_SNAPSHOTS="${CBUILD_TOP}/snapshots") -AC_SUBST(LOCAL_SNAPSHOTS) - -if test ! -d ${LOCAL_SNAPSHOTS}; then - AC_MSG_WARN(${LOCAL_SNAPSHOTS} does not exist so creating directory!) - mkdir -p ${LOCAL_SNAPSHOTS} -fi - -dnl The local directory where reference git repos are stored -AC_ARG_WITH(git-reference-dir, - AC_HELP_STRING([--with-git-reference-dir], [Where reference git repos are stored, see git-clone --reference]), - GIT_REFERENCE_DIR=${withval}, - GIT_REFERENCE_DIR="") -AC_SUBST(GIT_REFERENCE_DIR) - -dnl The top directory for make install, also where all the components we build live -AC_ARG_WITH(local-builds, - AC_HELP_STRING([--with-local-builds], []), - LOCAL_BUILDS=${withval}, - LOCAL_BUILDS="${CBUILD_TOP}/builds") -AC_SUBST(LOCAL_BUILDS) - -if test ! -d ${LOCAL_BUILDS}; then - AC_MSG_WARN(${LOCAL_BUILDS} does not exist so creating directory!) - mkdir -p ${LOCAL_BUILDS} -fi - -dnl A URL to the remote directory where snapshots are stored -AC_ARG_WITH(remote-snapshots, - AC_HELP_STRING([--with-remote-snapshots], []), - REMOTE_SNAPSHOTS=${withval}, - REMOTE_SNAPSHOTS="http://${FILESERVER}/snapshots") -AC_SUBST(REMOTE_SNAPSHOTS) - -dnl Display the default paths so the user does not need to look in the host.conf file. -echo "" -AC_MSG_NOTICE([Downloaded snapshots will be stored in: ${LOCAL_SNAPSHOTS}]) -AC_MSG_NOTICE([My builds will be installed in: ${LOCAL_BUILDS}]) -AC_MSG_NOTICE([Sysroots will be installed in: ${SYSROOTS}]) -AC_MSG_NOTICE([Remote snapshots will be fetched from: ${REMOTE_SNAPSHOTS}]) -echo "" - -AC_ARG_WITH(languages, - AC_HELP_STRING([--with-languages], [List of languages for the compiler]), - WITH_LANGUAGES=${withval}, - WITH_LANGUAGES='default') -AC_SUBST(WITH_LANGUAGES) - -dnl if you have SSH access to the remote machine -AC_ARG_ENABLE(ssh, AC_HELP_STRING([--enable-ssh], [If you have SSH access to remote build host]), -[case "${enableval}" in - yes) ENABLE_SSH=yes ;; - no) ENABLE_SSH=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-ssh option]) ;; -esac], ENABLE_SSH=no) -AC_SUBST(ENABLE_SSH) - -dnl if you want to do bootstrap by default -AC_ARG_ENABLE(bootstrap, AC_HELP_STRING([--enable-bootstrap], [If you want to do bootstrap by default]), -[case "${enableval}" in - yes) ENABLE_BOOTSTRAP=yes ;; - no) ENABLE_BOOTSTRAP=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-bootstrap option]) ;; -esac], ENABLE_BOOTSTRAP=no) -AC_SUBST(ENABLE_BOOTSTRAP) - -dnl if you want to run all tests by default -AC_ARG_ENABLE(alltests, AC_HELP_STRING([--enable-alltests], [If you want to run all tests by default]), -[case "${enableval}" in - yes) ENABLE_ALLTESTS=yes ;; - no) ENABLE_ALLTESTS=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-alltests option]) ;; -esac], ENABLE_ALLTESTS=no) -AC_SUBST(ENABLE_ALLTESTS) - -dnl if you want to install by default -AC_ARG_ENABLE(install, AC_HELP_STRING([--enable-install], [If you want to install by default]), -[case "${enableval}" in - yes) ENABLE_INSTALL=yes ;; - no) ENABLE_INSTALL=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-install option]) ;; -esac], ENABLE_INSTALL=yes) -AC_SUBST(ENABLE_INSTALL) - -dnl if you want to disable the building of the package documents. -AC_ARG_ENABLE(make-docs, AC_HELP_STRING([--enable-make-docs], [If you want to enable making package documentation]), -[case "${enableval}" in - yes) ENABLE_MAKE_DOCS=yes ;; - no) ENABLE_MAKE_DOCS=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-make-docs option]) ;; -esac], ENABLE_MAKE_DOCS=yes) -AC_SUBST(ENABLE_MAKE_DOCS) - -dnl if you want to enable schroot-based testing by default -AC_ARG_ENABLE(schroot-test, AC_HELP_STRING([--enable-schroot-test], [If you want to used schroot-based testing by default]), -[case "${enableval}" in - yes) ENABLE_SCHROOT_TEST=yes ;; - no) ENABLE_SCHROOT_TEST=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-schroot-test option]) ;; -esac], ENABLE_SCHROOT_TEST=no) -AC_SUBST(ENABLE_SCHROOT_TEST) - -dnl if you want to update sources by default -AC_ARG_ENABLE(source-update, AC_HELP_STRING([--enable-source-update], [If you want to update sources by default]), -[case "${enableval}" in - yes) ENABLE_SOURCE_UPDATE=yes ;; - no) ENABLE_SOURCE_UPDATE=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-source-update option]) ;; -esac], ENABLE_SOURCE_UPDATE=yes) -AC_SUBST(ENABLE_SOURCE_UPDATE) - -dnl if you want to update sources by default -AC_ARG_ENABLE(parallel, AC_HELP_STRING([--enable-parallel], [If you want to build with make -j<number of CPUs> by default]), -[case "${enableval}" in - yes) ENABLE_PARALLEL=yes ;; - no) ENABLE_PARALLEL=no ;; - *) AC_MSG_WARN([bad value ${enableval} for enable-parallel option]) ;; -esac], ENABLE_PARALLEL=yes) -AC_SUBST(ENABLE_PARALLEL) - -dnl AC_ARG_WITH(snapshots, -dnl AC_HELP_STRING([--with-snapshots], []), -dnl snapshots=${withval}, -dnl snapshots='cbuild') - -dnl Since the configure script is actually checked in, a developer -dnl does not need to have the GNU Autotools installed. However, -dnl installing these is a good idea anyway. -dnl AC_MSG_NOTICE([These are needed by everything to rebuild configure scripts and Makefiles]) -AC_CHECK_PROGS(AUTOCONF,autoconf) -AC_CHECK_PROGS(AUTOMAKE,automake) -AC_CHECK_PROGS(LIBTOOL,libtool) -if test x"${AUTOCONF}" = x -o x"${AUTOMAKE}" = x -o x"${LIBTOOL}" = x; then - AC_MSG_WARN([You should install autoconf, automake, and libtool]) -fi - -dnl DejaGnu is used for testing -AC_PATH_PROG(DEJAGNU,runtest) -if test x"${DEJAGNU}" = x; then - AC_MSG_WARN([You should install dejagnu so you can run tests]) - missing="${missing} dejagnu" -fi - -AC_PATH_PROG(MAKEINFO,makeinfo) -# Texinfo 5 can't process the gcc texinfo files until they are fixed, -# so we have to disable it for Ubuntu 14.04 "trusty". -if test `lsb_release -i -s` = "Ubuntu"; then - texversion="`dpkg-query -W -f='\${Version}' texinfo | cut -d '.' -f 1`" - if test "${texversion}" -gt 4; then -dnl MAKEINFO="echo" - AC_MSG_WARN([On Ubuntu Trusty systems, you may need to upgrade to have a working version of makeinfo]) - fi -fi -AC_SUBST(MAKEINFO) - -AC_PATH_PROG(NEWWORKDIR,git-new-workdir) - if test x"${NEWWORKDIR}" = x; then - AC_MSG_WARN([You need to install git-new-workdir to use GIT!]) - AC_MSG_NOTICE([copy /usr/share/doc/git/contrib/workdir/git-new-workdir to /usr/local/bin and then make it executable]) - missing="${missing} git-new-workdir" -fi -AC_SUBST(NEWWORKDIR) - -# A symbolic link needs to be made in this directory -#if test -w /opt/linaro -eq 0; then -# AC_MSG_WARN([/opt/linaro is not writable!]) -#fi - -AC_OUTPUT(host.conf) - -if test x"${missing}" != x; then - AC_MSG_ERROR([You need to install these packages: ${missing}]) -fi - -rm -f Makefile -cat<<EOF > Makefile -check: - ${srcdir}/testsuite/test.sh -EOF - -# Local Variables: -# c-basic-offset: 2 -# tab-width: 2 -# indent-tabs-mode: nil -# End: - diff --git a/host.conf.in b/host.conf.in deleted file mode 100644 index a04255a..0000000 --- a/host.conf.in +++ /dev/null @@ -1,47 +0,0 @@ -# This stores often used information on this build system - -dbuser=@DBUSER@ -dbpasswd=@DBPASSWD@ -dbhost=@DBPASSWD@ - -local_snapshots=@LOCAL_SNAPSHOTS@ -git_reference_dir=@GIT_REFERENCE_DIR@ -remote_snapshots=@REMOTE_SNAPSHOTS@ -cbuild_top=@CBUILD_TOP@ -cbuild_path=@CBUILD_PATH@ - -sources_conf=@SOURCES_CONF@ - -# This is where the components we build go, ie... make install -local_builds=@LOCAL_BUILDS@ - -# This is a sysroot to a pre-compiled C library -sysroots=@SYSROOTS@ - -# config values for the build machine -cpus=@CPUS@ -kernel=@KERNEL@ -build_arch=@BUILD_ARCH@ -build=@BUILDHOST@ -hostname=@HOSTNAME@ -distribution=@DISTRIBUTION@ - -# various configure time flags -with_languages=@WITH_LANGUAGES@ -enable_ssh=@ENABLE_SSH@ -bootstrap=@ENABLE_BOOTSTRAP@ -alltests=@ENABLE_ALLTESTS@ -install=@ENABLE_INSTALL@ -schroot_test=@ENABLE_SCHROOT_TEST@ -make_docs=@ENABLE_MAKE_DOCS@ -supdate=@ENABLE_SOURCE_UPDATE@ -parallel=@ENABLE_PARALLEL@ -makeversion=@MAKEVERSION@ - -wget_bin=@WGET@ -bash_shell=@BASH@ -LSBCC=@LSBCC@ -LSBCXX=@LSBCXX@ -MAKEINFO=@MAKEINFO@ -CCRYPT=@CCRYPT@ -NEWWORKDIR=@NEWWORKDIR@ diff --git a/install-sh b/install-sh deleted file mode 100755 index dd97db7..0000000 --- a/install-sh +++ /dev/null @@ -1,322 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2004-09-10.20 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit 0;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit 0;; - - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac -done - -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - else - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit; } -done - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/jenkins.sh b/jenkins.sh deleted file mode 100755 index 57cc203..0000000 --- a/jenkins.sh +++ /dev/null @@ -1,360 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - - -usage() -{ - # Format this section with 75 columns. - cat << EOF - jenkins.sh [--help] [-s snapshot dir] [g git reference dir] [cbuildv2 path] [w workspace] -EOF - return 0 -} - -if test $# -lt 1; then - echo "ERROR: No options for build!" - usage -# exit -fi - -# load commonly used functions -which_dir="`which $0`" -topdir="`dirname ${which_dir}`" - -# This is where all the builds go -if test x"${WORKSPACE}" = x; then - WORKSPACE="`pwd`" -fi -user_workspace="${WORKSPACE}" - -# The files in this directory are shared across all platforms -shared="${HOME}/workspace/shared" - -# This is where all the git repositories live -user_git_repo="--with-git-reference-dir=${shared}/snapshots" - -# set default values for options to make life easier -user_snapshots="${user_workspace}/snapshots" - -# The release version string, usually a date -releasestr= - -# This is a string of optional extra arguments to pass to cbuild at runtime -user_options="" - -OPTS="`getopt -o s:g:c:w:o:f:t:h -l snapshots:gitrepo:cbuild:workspace:options:fileserver:target:help -- "$@"`" -while test $# -gt 0; do - echo 1 = "$1" - case $1 in - -s|--snapshots) user_snapshots=$2 ;; - -g|--gitrepo) user_git_repo=$2 ;; - -c|--cbuild) cbuild_dir=$2 ;; - -t|--target) target=$2 ;; - -w|--workspace) user_workspace=$2 ;; - -o|--options) user_options=$2 ;; - -f|--fileserver) fileserver=$2 ;; - -r|--runtests) runtest="true" ;; - -h|--help) usage ;; - esac - shift -done - -# Test the config parameters from the Jenkins Build Now page - -# See if we're supposed to build a source tarball -if test x"${tarsrc}" = xtrue -o "`echo $user_options | grep -c -- --tarsrc`" -gt 0; then - tars="--tarsrc" -fi - -# See if we're supposed to build a binary tarball -if test x"${tarbin}" = xtrue -o "`echo $user_options | grep -c -- --tarbin`" -gt 0; then - tars="${tars} --tarbin " -fi - -# Set the release string if specefied -if ! test x"${release}" = xsnapshot -o x"${release}"; then - releasestr="--release ${release}" -fi -if test "`echo $user_options | grep -c -- --release`" -gt 0; then - release="`echo $user_options | grep -o -- "--release [a-zA-Z0-9]* " | cut -d ' ' -f 2`" - releasestr="--release ${release}" -fi - -# This is an optional directory for the master copy of the git repositories. -if test x"${user_git_repo}" = x; then - user_git_repo="--with-git-reference-dir=${shared}/snapshots" -fi - -# Get the versions of dependant components to use -changes="" -if test x"${gmp_snapshot}" != x"latest" -a x"${gmp_snapshot}" != x; then - change="${change} gmp=${gmp_snapshot}" -fi -if test x"${mpc_snapshot}" != x"latest" -a x"${mpc_snapshot}" != x; then - change="${change} mpc=${mpc_snapshot}" -fi -if test x"${mpfr_snapshot}" != x"latest" -a x"${mpfr_snapshot}" != x; then - change="${change} mpfr=${mpfr_snapshot}" -fi - -# Get the version of GCC we're supposed to build -if test x"${gcc_branch}" != x"latest" -a x"${gcc_branch}" != x; then - change="${change} gcc=${gcc_branch}" - branch="`echo ${gcc_branch} | cut -d '~' -f 2 | sed -e 's:\.tar\.xz::'`" -else - branch= -fi - -if test x"${binutils_snapshot}" != x"latest" -a x"${binutils_snapshot}" != x; then - change="${change} binutils=${binutils_snapshot}" -fi -if test x"${linux_snapshot}" != x"latest" -a x"${linux_snapshot}" != x; then - change="${change} linux-${linux_snapshot}" -fi - -# if runtests is true, then run make check after the build completes -if test x"${runtests}" = xtrue; then - check=--check -fi - -if test x"${target}" != x"native" -a x"${target}" != x; then - platform="--target ${target}" -fi - -if test x"${libc}" != x; then - # ELF based targets are bare metal only - case ${target} in - arm*-none-*) - change="${change} --set libc=newlib" - ;; - *) - change="${change} --set libc=${libc}" - ;; - esac -fi - -# This is the top level directory where builds go. -if test x"${user_workspace}" = x; then - user_workspace="${WORKSPACE}" -fi - -# Create a build directory -if test ! -d ${user_workspace}/_build; then - mkdir -p ${user_workspace}/_build -fi - -# Use the newly created build directory -pushd ${user_workspace}/_build - -# Configure Cbuildv2 itself. Force the use of bash instead of the Ubuntu -# default of dash as some configure scripts go into an infinite loop with -# dash. Not good... -export CONFIG_SHELL="/bin/bash" -if test x"${debug}" = x"true"; then - export CONFIG_SHELL="/bin/bash -x" -fi - -if test x"${cbuild_dir}" = x; then - cbuild_dir=${topdir} -fi -$CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots --with-fileserver=${fileserver} - -# load commonly used varibles set by configure -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -fi - -# This is the top level directory for the cbuild2 sources. -#cbuild_dir="${cbuild_path}" - -# Delete the previous test result files to avoid problems. -find ${user_workspace} -name \*.sum -exec rm {} \; 2>&1 > /dev/null - -# For cross build. For cross builds we build a native GCC, and then use -# that to compile the cross compiler to bootstrap. Since it's just -# used to build the cross compiler, we don't bother to run 'make check'. -if test x"${bootstrap}" = xtrue; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --parallel ${change} --bootstrap --build all -fi - -# Now we build the cross compiler, for a native compiler this becomes -# the stage2 bootstrap build. -$CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --parallel ${check} ${tars} ${releasestr} ${platform} ${change} --timeout 100 --build all - -# If cbuild2 returned an error, make jenkins see this as a build failure -if test $? -gt 0; then - exit 1 -fi - -# Create the BUILD-INFO file for Jenkins. -cat << EOF > ${user_workspace}/BUILD-INFO.txt -Format-Version: 0.5 - -Files-Pattern: * -License-Type: open -EOF - -if test x"${tars}" = x; then - # date="`${gcc} --version | head -1 | cut -d ' ' -f 4 | tr -d ')'`" - date="`date +%Y%m%d`" -else - date=${release} -fi - -# Setup the remote directory for tcwgweb -if test x"${target}" = x"native"; then - gcc="`find ${user_workspace} -name \*-gcc`" -else - gcc="`find ${user_workspace} -name ${target}-gcc`" -fi - -# If we can't find GCC, our build failed, so don't continue -if test x"${gcc}" = x; then - exit 1 -fi - -version="`${gcc} --version | head -1 | cut -d ' ' -f 5`" -if test x"${version}" = x"(experimental)" ; then - version=4.10 -fi -# bversion="`${target}-ld --version | head -1 | cut -d ' ' -f 5 | cut -d '.' -f 1-3`" -distro="`lsb_release -c -s`" -arch="`uname -m`" - -# Non matrix builds use node_selector, but matrix builds use NODE_NAME -if test x"${node_selector}" != x; then - node="`echo ${node_selector} | tr '-' '_'`" - job=${JOB_NAME} -else - node="`echo ${NODE_NAME} | tr '-' '_'`" - job="`echo ${JOB_NAME} | cut -d '/' -f 1`" -fi - -# This is the remote directory for tcwgweb where all test results and log -# files get copied too. - -# These fields are enabled by the buikd-user-vars plugin. -if test x"${BUILD_USER_FIRST_NAME}" != x; then - requestor="-${BUILD_USER_FIRST_NAME}" -fi -if test x"${BUILD_USER_LAST_NAME}" != x; then - requestor="${requestor}.${BUILD_USER_LAST_NAME}" -fi - -echo "Build by ${requestor} on ${NODE_NAME} for branch ${branch}" - -manifest="`find ${user_workspace} -name manifest.txt`" -if test x"${manifest}" != x; then - echo "node=${node}" >> ${manifest} - echo "requestor=${requestor}" >> ${manifest} - revision="`grep 'gcc_revision=' ${manifest} | cut -d '=' -f 2 | tr -s ' '`" - if test x"${revision}" != x; then - revision="-${revision}" - fi - if test x"${BUILD_USER_ID}" != x; then - echo "email=${BUILD_USER_ID}" >> ${manifest} - fi - echo "build_url=${BUILD_URL}" >> ${manifest} -else - echo "ERROR: No manifest file, build probably failed!" -fi - -# This becomes the path on the remote file server -if test x"${runtests}" = xtrue; then - basedir="/work/logs" - dir="gcc-linaro-${version}/${branch}${revision}/${arch}.${target}-${job}${BUILD_NUMBER}" - ssh ${fileserver} mkdir -p ${basedir}/${dir} - if test x"${manifest}" != x; then - scp ${manifest} ${fileserver}:${basedir}/${dir}/ - fi - -# If 'make check' works, we get .sum files with the results. These we -# convert to JUNIT format, which is what Jenkins wants it's results -# in. We then cat them to the console, as that seems to be the only -# way to get the results into Jenkins. -#if test x"${sums}" != x; then -# for i in ${sums}; do -# name="`basename $i`" -# ${cbuild_dir}/sum2junit.sh $i $user_workspace/${name}.junit -# cp $i ${user_workspace}/results/${dir} -# done -# junits="`find ${user_workspace} -name *.junit`" -# if test x"${junits}" = x; then -# echo "Bummer, no junit files yet..." -# fi -#else -# echo "Bummer, no test results yet..." -#fi -#touch $user_workspace/*.junit -fi - -# Find all the test result files. -sums="`find ${user_workspace} -name *.sum`" - -# Canadian Crosses are a win32 hosted cross toolchain built on a Linux -# machine. -if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${platform} --build all - distro="`lsb_release -sc`" - # Ubuntu Lucid uses an older version of Mingw32 - if test x"${distro}" = x"lucid"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all - else - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all - fi -fi - -# This setups all the files needed by tcwgweb -if test x"${sums}" != x -o x"${runtests}" != x"true"; then - if test x"${sums}" != x; then - test_logs="" - for s in ${sums}; do - test_logs="$test_logs ${s%.sum}.log" - done - scp ${sums} $test_logs ${fileserver}:${basedir}/${dir}/ - - # Copy over the logs from make check, which we need to find testcase errors. - checks="`find ${user_workspace} -name check\*.log`" - scp ${checks} ${fileserver}:${basedir}/${dir}/ - - # Copy over the build logs - logs="`find ${user_workspace} -name make\*.log`" - scp ${logs} ${fileserver}:${basedir}/${dir}/ - ssh ${fileserver} xz ${basedir}/${dir}/\*.sum ${basedir}/${dir}/\*.log - scp ${cbuild_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh - ssh ${fileserver} /tmp/tcwgweb$$.sh --email --base ${basedir}/${dir} - ssh ${fileserver} rm -f /tmp/tcwgweb$$.sh - - echo "Sent test results" - fi - if test x"${tarsrc}" = xtrue -a x"${release}" != x; then - allfiles="`ls ${shared}/snapshots/*${release}*.xz`" - srcfiles="`echo ${allfiles} | egrep -v "arm|aarch"`" - scp ${srcfiles} ${fileserver}:/home/cbuild/var/snapshots/ - rm -f ${srcfiles} - fi - - if test x"${tarbin}" = xtrue -a x"${release}" != x; then - allfiles="`ls ${shared}/snapshots/*${release}*.xz`" - binfiles="`echo ${allfiles} | egrep "arm|aarch"`" - scp ${binfiles} ${fileserver}:/work/space/binaries/ - rm -f ${binfiles} - fi - -fi - diff --git a/lib/benchmark.sh b/lib/benchmark.sh deleted file mode 100644 index 5f0625e..0000000 --- a/lib/benchmark.sh +++ /dev/null @@ -1,115 +0,0 @@ -bench_run () -{ - local builddir="`get_builddir $1`" - - local tool="`get_toolname $1`" - local runlog="${builddir}/run-${tool}.log" - local cmd="`grep ^benchcmd= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" - local count="`grep ^benchcount= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" - - if test x"${cmd}" = x; then - error "No benchcmd for ${tool}" - return 1 - fi - if test x"${count}" = x; then - warning "No benchcount for ${tool}, defaulting to 5" - count=5 - fi - - dryrun "rm -f ${runlog}" - if test $? -gt 0; then - error "Failed to delete old runlog ${runlog}" - return 1 - fi - - for i in `seq 1 "${count}"`; do - dryrun "eval \"${cmd}\" 2>&1 | tee -a ${runlog}" - if test $? -gt 0; then - error "${cmd} failed" - return 1 - fi - dryrun "echo -e \"\nRun $i::\" | tee -a ${runlog}" - bench_log "${tool}" "${runlog}" "${builddir}" - if test $? -gt 0; then - error "Logging failed for ${tool}" - return 1 - fi - dryrun "echo -e \"\n\" | tee -a ${runlog}" - done - - return 0 -} - -bench_log () -{ - local tool="$1" - local out_log="$2" - local builddir="$3" - - local in_log="`grep ^benchlog= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" - if test x"${in_log}" = x; then - error "No benchlog in ${1}.conf" - return 1 - fi - - for log in ${in_log}; do - dryrun "cat ${builddir}/${log} | tee -a ${out_log}" - if test $? -gt 0; then - error "Could not tee log ${log} to ${out_log}" - return 1 - fi - done - - return 0 -} - -dump_host_info () -{ - echo "GCCVERSION=`${CROSS_COMPILE}gcc --version | head -n1`" - echo "GXXVERSION=`${CROSS_COMPILE}g++ --version | head -n1`" - echo "DATE=`date +%Y-%m-%d`" - echo "ARCH=`uname -m`" - echo "CPU=`grep -E "^(model name|Processor)" /proc/cpuinfo | head -n1 | tr -s [:space:] | awk -F: '{print $2;}'`" - echo "OS=`lsb_release -sd`" - echo "TOPDIR=`pwd`" - echo "date:`date --rfc-3339=seconds -u`" - echo - echo "uname:`uname -a`" - echo - echo lsb_release: - lsb_release -a - echo - echo /proc/version: - cat /proc/version - echo - echo "gcc: `dpkg -s gcc | grep ^Version`" - gcc --version - echo "as: `dpkg -s binutils | grep ^Version`" - as --version - echo - echo ldd: - ldd --version - echo - echo free: - free - echo - echo ulimit: - bash -c "ulimit -a" - echo - echo cpuinfo: - cat /proc/cpuinfo - echo gdb: - dpkg -s gdb | grep ^Version - gdb --version - echo gcc-binary: - #$(PWD)/$(@D)/gcc-binary/bin/gcc --version || true - echo - echo libc6: - dpkg -s libc6 | grep ^Version - echo PATH: - echo $PATH - echo - echo cpufreq-info: - echo `cpufreq-info` - echo - } diff --git a/lib/checkout.sh b/lib/checkout.sh deleted file mode 100644 index ad09779..0000000 --- a/lib/checkout.sh +++ /dev/null @@ -1,550 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# -# This does a checkout from a source code repository -# - -# It's optional to use git-bzr-ng or git-svn to work on the remote sources, -# but we also want to work with the native source code control system. -usegit=no - -# This is used by cbuild2.sh --checkout all but not by --build -checkout_infrastructure() -{ - trace "$*" - - source_config infrastructure - - if test x"${depends}" = x; then - error "No dependencies listed for infrastructure libraries!" - return 1 - fi - - # This shouldn't happen, but it's nice for regression verification. - if test ! -e ${local_snapshots}/md5sums; then - error "Missing ${local_snapshots}/md5sums file needed for infrastructure libraries." - return 1 - fi - - # We have to grep each dependency separately to preserve the order, as - # some libraries depend on other libraries being bult first. Egrep - # unfortunately sorts the files, which screws up the order. - local files="`grep ^latest= ${topdir}/config/dejagnu.conf | cut -d '\"' -f 2`" - for i in ${depends}; do - files="${files} `grep /$i ${local_snapshots}/md5sums | cut -d ' ' -f3 | uniq`" - done - - - for i in ${files}; do - local name="`echo $i | sed -e 's:\.tar\..*::' -e 's:infrastructure/::' -e 's:testcode/::'`" - local gitinfo= - gitinfo="`get_source ${name}`" - if test -z "${gitinfo}"; then - error "No matching source found for \"${name}\"." - return 1 - fi - - # Some infrastructure packages (like dejagnu) come from a git repo. - local service= - service="`get_git_service ${gitinfo}`" - if test x"${service}" != x; then - local checkout_ret= - checkout ${gitinfo} - checkout_ret=$? - if test ${checkout_ret} -gt 0; then - error "Failed checkout out of ${name}." - return 1 - fi - else - fetch ${gitinfo} - if test $? -gt 0; then - error "Couldn't fetch tarball ${gitinfo}" - return 1 - fi - extract ${gitinfo} - if test $? -gt 0; then - error "Couldn't extract tarball ${gitinfo}" - return 1 - fi - fi - done - return 0 -} - -# This is similar to make_all except it _just_ gathers sources trees and does -# nothing else. -checkout_all() -{ - local packages= - packages="linux binutils libc gcc gdb" - - # See if specific component versions were specified at runtime - if test x"${gcc_version}" = x; then - gcc_version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - fi - if test x"${binutils_version}" = x; then - binutils_version="`grep ^latest= ${topdir}/config/binutils.conf | cut -d '\"' -f 2`" - fi - if test x"${eglibc_version}" = x; then - eglibc_version="`grep ^latest= ${topdir}/config/eglibc.conf | cut -d '\"' -f 2`" - fi - if test x"${newlib_version}" = x; then - newlib_version="`grep ^latest= ${topdir}/config/newlib.conf | cut -d '\"' -f 2`" - fi - if test x"${glibc_version}" = x; then - glibc_version="`grep ^latest= ${topdir}/config/glibc.conf | cut -d '\"' -f 2`" - fi - if test x"${gdb_version}" = x; then - gdb_version="`grep ^latest= ${topdir}/config/gdb.conf | cut -d '\"' -f 2`" - fi - if test x"${linux_version}" = x; then - linux_version="`grep ^latest= ${topdir}/config/linux.conf | cut -d '\"' -f 2`" - fi - - checkout_infrastructure - if test $? -gt 0; then - return 1 - fi - - for i in ${packages}; do - local package= - case $i in - gdb) - package=${gdb_version} - ;; - binutils) - package=${binutils_version} - ;; - gcc) - package=${gcc_version} - ;; - linux) - package=${linux_version} - ;; - libc) - if test x"${clibrary}" = x"eglibc"; then - package=${eglibc_version} - elif test x"${clibrary}" = x"glibc"; then - package=${glibc_version} - elif test x"${clibrary}" = x"newlib"; then - package=${newlib_version} - else - error "\${clibrary}=${clibrary} not supported." - return 1 - fi - ;; - *) - ;; - esac - - local gitinfo="`get_source ${package}`" - local checkout_ret= - checkout ${gitinfo} - checkout_ret=$? - - if test ${checkout_ret} -gt 0; then - error "Failed checkout out of $i." - return 1 - fi - done - - # Since we just checked out all the sources, disable updating them again. - supdate=no - - notice "Checkout all took ${SECONDS} seconds" - - return 0 -} - -# Try hard to get git command succeed. Retry up to 10 times. -# $@ - arguments passed directly to "git". -git_robust() -{ - local try=1 - - while [ "$try" -lt "10" ]; do - try="$(($try+1))" - git "$@" && break - done -} - -# This gets the source tree from a remote host -# $1 - This should be a service:// qualified URL. If you just -# have a git identifier call get_URL first. -checkout() -{ - trace "$*" - - if test x"$1" = x; then - error "No URL given!" - return 1 - fi - - local service= - service="`get_git_service $1`" - if test x"${service}" = x ; then - error "A proper url is required. Call get_URL first." - return 1 - fi - - local repo= - repo="`get_git_repo $1`" - - local tool= - tool="`get_toolname $1`" - local url= - url="`get_git_url $1`" - local branch= - branch="`get_git_branch $1`" - local revision= - revision="`get_git_revision $1`" - local srcdir= - srcdir="`get_srcdir $1`" - - case $1 in - svn*) - local trunk="`echo $1 |grep -c trunk`" - if test ${trunk} -gt 0; then - local dir="`dirname $1`" - local dir="`basename ${dir}`/trunk" - fi - if test x"${force}" = xyes; then - #rm -fr ${local_snapshots}/${dir} - echo "Removing existing sources for ${srcdir}" - fi - if test x"${usegit}" = xyes; then - local out="`git svn clone $1 ${srcdir}`" - else - if test -e ${srcdir}/.svn; then - (cd ${srcdir} && svn update) - # Extract the revision number from the update message - local revision="`echo ${out} | sed -e 's:.*At revision ::' -e 's:\.::'`" - else - svn checkout $1 ${srcdir} - fi - fi - ;; - git*|http*|ssh*) - #FIXME: This is an unreliable way to parse the repo directory. - local repodir="`echo ${srcdir} | cut -d '~' -f 1 | cut -d '@' -f 1`" - - if test x"${revision}" != x"" -a x"${branch}" != x""; then - warning "You've specified both a branch \"${branch}\" and a commit \"${revision}\"." - warning "Git considers a commit as implicitly on a branch.\nOnly the commit will be used." - fi - - # If the master branch doesn't exist, clone it. If it exists, - # update the sources. - if test ! -d ${repodir}; then - local git_reference_opt - if [ x"$git_reference_dir" != x"" -a \ - -d "$git_reference_dir/$(basename $repodir)" ]; then - local git_reference_opt="--reference $git_reference_dir/$(basename $repodir)" - fi - notice "Cloning $1 in ${srcdir}" - dryrun "git_robust clone $git_reference_opt ${url} ${repodir}" - fi - if test ! -d ${srcdir}; then - # By definition a git commit resides on a branch. Therefore specifying a - # branch AND a commit is redundant and potentially contradictory. For this - # reason we only consider the commit if both are present. - if test x"${revision}" != x""; then - notice "Checking out revision for ${tool} in ${srcdir}" - dryrun "${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${revision}" - if test $? -gt 0; then - error "Revision ${revision} likely doesn't exist in git repo ${repo}!" - return 1 - fi - # git checkout of a commit leaves the head in detached state so we need to - # give the current checkout a name. Use -B so that it's only created if - # it doesn't exist already. - dryrun "(cd ${srcdir} && git checkout -B local_${revision})" - else - if test x"${branch}" != x""; then - # Sometimes, after removing a srcdir and re-running, the branch - # you're trying to checkout will already be a named branch in the - # repodir, so we have to delete it so that the new checkout will - # get the latest, updated branch source. - notice "Checking for existing named branch ${branch} in ${repodir}" - - # Don't test this for dryrun because repodir probably won't exist. - if test x"${dryrun}" = no; then - local existing_branch=`(cd ${repodir} && git branch -a | grep -c "^.*[[:space:]]\{1,\}${branch}")` - if test ${existing_branch} -gt 0; then - notice "Removing previously named branch ${branch} from ${repodir}" - dryrun "(cd ${repodir} && git branch -D ${branch})" - fi - fi - fi - - notice "Checking out ${branch:+branch ${branch}}${branch-master branch} for ${tool} in ${srcdir}" - dryrun "${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${branch}" - if test $? -gt 0; then - error "Branch ${branch} likely doesn't exist in git repo ${repo}!" - return 1 - fi - fi - # dryrun "git_robust clone --local ${local_snapshots}/${repo} ${srcdir}" - # dryrun "(cd ${srcdir} && git checkout ${branch})" - elif test x"${supdate}" = xyes; then - # Some packages allow the build to modify the source directory and - # that might screw up cbuild2's state so we restore a pristine branch. - notice "Updating sources for ${tool} in ${srcdir}" - dryrun "(cd ${repodir} && git stash --all)" - dryrun "(cd ${repodir} && git reset --hard)" - dryrun "(cd ${repodir} && git_robust pull)" - # Update branch directory (which maybe the same as repo - # directory) - dryrun "(cd ${srcdir} && git stash --all)" - dryrun "(cd ${srcdir} && git reset --hard)" - if test x"${revision}" != x""; then - # No need to pull. A commit is a single moment in time - # and doesn't change. - dryrun "(cd ${srcdir} && git checkout local_${revision})" - else - # Make sure we are on the correct branch. - # This is a no-op if $branch is empty and it - # just gets master. - dryrun "(cd ${srcdir} && git checkout ${branch})" - dryrun "(cd ${srcdir} && git_robust pull)" - fi - fi - ;; - *) - ;; - esac - - if test $? -gt 0; then - error "Couldn't checkout $1 !" - return 1 - fi - - return 0 -} - -# This pushes a source tree up to a remote host. For bzr and git, any changes -# that should be uploaded to the remote source repository need to be commit()'d -# first. For svn and cvs, this push does a commit instead. -# $1 - The URL to push to, same as used for checkout -# $2 - The optional host to push to -# $3 - The optional branch to push to -push () -{ - if test x"$1" = x; then - error "No URL given!" - return 1 - fi - if test x"$2" = x; then - warning "No host given, so using origin" - local repo="origin" - fi - - # bzr uses slashes in it's path names, so convert them so we - # can use the for accessing the source directory. - local url="`echo $1 | sed -e 's:/:_:'`" - local dir="`basename ${url} |sed -e 's/^.*://'`" - - # We use git for our copy by importing from the other systems - case $1 in - bzr*|lp*) - if test x"${usegit}" = xyes; then - #out="`git-bzr push $1 ${local_snapshots}/${dir}`" - echo "FIXME: shouldn't be here!" - else - if test -e ${local_snapshots}/${dir}/.bzr; then - #out="`(cd ${local_snapshots}/${dir} && bzr push)`" - notice "Pushing ${dir} upstream..." - notice "bzr push ${url}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - fi - ;; - svn*) - local trunk="`echo $1 |grep -c trunk`" - if test ${trunk} -gt 0; then - local dir="`dirname $1`" - local dir="`basename ${dir}`/trunk" - fi - if test x"${usegit}" = xyes; then - #out="`git svn push $1 ${local_snapshots}/${dir}`" - echo "FIXME: shouldn't be here!" - else - if test -e ${local_snapshots}/${dir}/.svn; then - #out="`(cd ${local_snapshots}/${dir} && svn commit`" - notice "Pushing ${dir} upstream" - notice "svn commit ${url}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - fi - ;; - git*|ssh*) - if test x"$3" = x; then - warning "No branch given, so using master or trunk" - local branch="master" - fi - if test -e ${local_snapshots}/${dir}/.git; then - #out="`(cd ${local_snapshots}/${dir} && git push ${repo} ${branch}`" - notice "Pushing ${dir} upstream" - notice "git push ${repo} ${branch}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - ;; - *) - ;; - esac - - return 0 -} - -# This commits a change to a source tree. For bzr and git, this only -# modifies the local source tree, and push() must be executed to actually -# upload the changes to the remote source tree. For svn and cvs, the -# commit modifies the remote sources at the same time. -# $1 - The URL used for checkout() -# $2 - the file or directory to commit -commit () -{ - # bzr uses slashes in it's path names, so convert them so we - # can use the for accessing the source directory. - local url="`echo $1 | sed -e 's:/:_:'`" - local dir="`basename ${url} |sed -e 's/^.*://'`" - - # We use git for our copy by importing from the other systems - case $1 in - bzr*|lp*) - if test x"${usegit}" = xyes; then - #out="`git-bzr push $1 ${local_snapshots}/${dir}`" - echo "FIXME: shouldn't be here!" - else - if test x"$2" = x; then - warning "No file given, so commiting all" - local files="" - else - local files="$2" - fi - if test -e ${local_snapshots}/${dir}/.bzr; then - #out="`(cd ${local_snapshots}/${dir} && bzr commit --file ${local_snapshots}/${dir}/commitmsg.txt ${files}`" - notice "Committing ${dir} to local repository..." - notice "bzr commit -m \"`cat ${local_snapshots}/${dir}/commitmsg.txt`\" ${files}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - fi - ;; - svn*) - local trunk="`echo $1 |grep -c trunk`" - if test ${trunk} -gt 0; then - local dir="`dirname $1`" - local dir="`basename ${dir}`/trunk" - fi - if test x"$2" = x; then - warning "No file given, so commiting all" - local files="" - else - local files="$2" - fi - if test x"${usegit}" = xyes; then - #out="`git svn push $1 ${local_snapshots}/${dir}`" - echo "FIXME: shouldn't be here!" - else - if test -e ${local_snapshots}/${dir}/.svn; then - #out="`(cd ${local_snapshots}/${dir} && svn commit --file ${local_snapshots}/${dir}/commitmsg.txt ${files}`" - notice "Committing ${files} to remote repository" - notice "svn commit -m \"`cat ${local_snapshots}/${dir}/commitmsg.txt`\" ${files}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - fi - ;; - git*|ssh*) - if test x"$2" = x; then - warning "No files given, so commiting all" - local files="-a" - else - local files="$2" - fi - if test -e ${local_snapshots}/${dir}/.git; then - #out="`(cd ${local_snapshots}/${dir} && git commit --file ${local_snapshots}/${dir}/commitmsg.txt ${files}`" - notice "Committing ${files} to local repository..." - notice "git commit -m \"`cat ${local_snapshots}/${dir}/commitmsg.txt`\" ${files}" - else - error "${local_snapshots}/${dir} doesn't exist!" - return 1 - fi - ;; - *) - ;; - esac - - return 0 -} - -# Create a new tag in a repository -# $1 - The URL used for checkout() -# $2 - the tag name -tag() -{ - error "unimplemented" -} - -# Change the active branch. -# FIXME: for now, this only supports git. -# -# $1 - The toolchain component to use, which looks like this: -# gcc.git/linaro-4.8-branch@123456 -# Which breaks down as gcc.git is the component name. Anything after a slash -# is the branch. Anything after a '@' is a GIT commit hash ID. -change_branch() -{ - trace "$*" - - local dir="`normalize_path $1`" - local version="`basename $1`" - local branch="`echo $1 | cut -d '/' -f 2`" - - local srcdir="`get_srcdir $1`" - if test "`echo $1 | grep -c '@'`" -gt 0; then - local revision="`echo $1 | cut -d '@' -f 2`" - else - local revision="" - fi - - if test ! -d ${srcdir}/${branch}; then - dryrun "${NEWWORKDIR} ${local_snapshots}/${version} ${local_snapshots}/${version}-${branch} ${branch}" - else - if test x"${supdate}" = xyes; then - if test x"${branch}" = x; then - dryrun "(cd ${local_snapshots}/${version} && git_robust pull origin master)" - else - dryrun "(cd ${local_snapshots}/${version}-${branch} && git_robust pull origin ${branch})" - fi - fi - fi - - return 0 -} - diff --git a/lib/common.sh b/lib/common.sh deleted file mode 100644 index 5adc94e..0000000 --- a/lib/common.sh +++ /dev/null @@ -1,770 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -set -o pipefail - -# source all the library functions -. "${topdir}/lib/globals.sh" || exit 1 -. "${topdir}/lib/fetch.sh" || exit 1 -. "${topdir}/lib/configure.sh" || exit 1 -. "${topdir}/lib/release.sh" || exit 1 -. "${topdir}/lib/checkout.sh" || exit 1 -. "${topdir}/lib/depend.sh" || exit 1 -. "${topdir}/lib/make.sh" || exit 1 -. "${topdir}/lib/merge.sh" || exit 1 -. "${topdir}/lib/package.sh" || exit 1 -. "${topdir}/lib/testcode.sh" || exit 1 -. "${topdir}/lib/git-parser.sh" || exit 1 -. "${topdir}/lib/stamp.sh" || exit 1 -. "${topdir}/lib/gerrit.sh" || exit 1 - -# -# All the set* functions set global variables used by the other functions. -# This way there can be some error recovery and handing. -# - -set_config() -{ - echo "Set config file to $1..." - configfile="$1" -} - -set_dbuser() -{ - echo "Setting MySQL user to $1..." - dbuser="$1" -} - -set_dbpasswd() -{ - echo "Setting MySQL password to $1..." - dbpasswd="$1" -} - -# if --dryrun is passed to cbuild2.sh, then commands are echoed instead of -# of executed. -dryrun() -{ - if test x"${dryrun}" = xyes; then - echo "DRYRUN: $1" 1>&2 - else - if test x"${interactive}" = x"yes"; then - notice "About to execute $1" - notice "Hit any key to continue: " - read answer - return $? - fi - echo "RUN: $1" - eval $1 - return $? - fi - - return 0 -} - -trace() -{ - echo "TRACE(#${BASH_LINENO}): ${FUNCNAME[1]} ($*)" 1>&2 - -} - -fixme() -{ - echo "FIXME(#${BASH_LINENO}): ${FUNCNAME[1]} ($*)" 1>&2 - -} - -error() -{ - echo "ERROR (#${BASH_LINENO}): ${FUNCNAME[1]} ($1)" 1>&2 - return 1 -} - -warning() -{ - if test "${verbose}" -gt 0; then - echo "WARNING: $1" 1>&2 - fi -} - -notice() -{ - if test "${verbose}" -gt 0; then - echo "NOTE: $1" 1>&2 - fi -} - -# Get the URL to checkout out development sources. -# -# $1 - The toolchain component identifier. -# -# Returns a string that represents the full URL for an svn, lp, or git service -# that matches the identifier in the sources.conf file. -# -# [Optional] Return a branch and revision number for git if tagged -# onto the identifier. e.g., get_URL repo.git~multi/slash/branch@12345 -# will return a matching url in sources.conf such as: -# -# http://staging.linaro.org/git/toolchain/repo.git~multi/slash/branch@12345 -# -# If get_URL is passed an identifier that already contains a URL it will fail. -# -get_URL() -{ -# trace "$*" - - if test "`echo $1 | grep -c "\.tar.*$"`" -gt 0; then - error "not supported for .tar.* files." - return 1 - fi - - # It makes no sense to call get_URL if you already have the URL. - local service= - service="`get_git_service $1`" - if test x"${service}" != x; then - error "Input already contains a url." - return 1 - fi - - # Use the git parser functions to retrieve information about the - # input parameters. The git parser will always return the 'repo' - # for an identifier as long as it follows some semblance of sanity. - local node= - node="`get_git_repo $1`" - - # Optional elements for git repositories. - local branch= - branch="`get_git_branch $1`" - local revision= - revision="`get_git_revision $1`" - - local srcs="${sources_conf}" - if test -e ${srcs}; then - if test "`grep -c "^${node}" ${srcs}`" -gt 1; then - error "Need unique component and version to get URL!" - return 1 - fi - # We don't want to match on partial matches - # (hence looking for a trailing space or \t). - if test "`grep -c "^${node} " ${srcs}`" -lt 1 -a "`grep -Pc "^${node}\t" ${srcs}`" -lt 1; then - error "Component \"${node}\" not found in ${srcs} file!" - return 1 - fi - local url="`grep "^${node}" ${srcs} | sed -e 's:^.*[ \t]::'`" - echo "${url}${branch:+~${branch}}${revision:+@${revision}}" - - return 0 - else - error "No config file for repository sources!" - fi - - return 1 -} - -# display a list of matching URLS we know about. This is how you can see the -# correct name to pass to get_URL(). -# -# $1 - The name of the toolchain component, partial strings ok -list_URL() -{ -# trace "$*" - - local srcs="${sources_conf}" - if test -e ${srcs}; then - notice "Supported source repositories for $1 are:" -# sed -e 's:\t.*::' -e 's: .*::' -e 's:^:\t:' ${srcs} | grep $1 - local url="`grep $1 ${srcs} | tr -s ' ' | cut -d ' ' -f 2`" - for i in ${url}; do - echo " $i" 1>&2 - done - return 0 - else - error "No config file for sources!" - return 1 - fi - - return 0 -} - -# This takes a URL and turns it into a name suitable for the build -# directory name. -# $1 - the path to fixup -normalize_path() -{ -# FIXME: ban non-service or tarball inputs. - - local process= - if test "`echo $1 | egrep -c "^git://|^http://|^ssh://"`" -lt 1 -a "`echo $1 | grep -c "\.git"`" -gt 0; then - # If the input is an identifier (not a service) then process \.git - # identifiers as git URLs - process="`get_URL $1`" - else - process=$1 - fi - - local branch="" - case ${process} in - lp*) - local node="`echo ${process} | sed -e 's@lp:@@' -e 's:/:_:'`" - ;; - bzr*) - local node="`echo ${process} | sed -e 's:^.*branch/::'`" - local node="`echo ${node} | sed -e 's:/:_:'`" - ;; - git*|http*|ssh*) - if test "`echo ${process} | grep -c "\.tar"`" -gt 0 -o "`echo ${process} | grep -c "\.tgz"`" -gt 0; then - local node="`basename ${process} | sed -e 's:\.tar.*::' -e 's:\.tgz$::'`" - else - local node= - node="`get_git_repo ${process}`" - - local branch= - branch="`get_git_branch ${process}`" - - # Multi-path branches should have forward slashes replaced with dashes. - branch="`echo ${branch} | sed 's:/:-:g'`" - - local revision= - revision="`get_git_revision ${process}`" - fi - ;; - svn*) - local node="`echo ${process} | sed -e 's@^.*/svn/@@'`" - local node="`basename ${node}`" - ;; - *.tar.*) - local node="`echo ${process} | sed -e 's:\.tar.*::' -e 's:\+git:@:' -e 's:\.git/:.git-:'`" - ;; - *) - fixme "normalize_path should only be called with a URL or a tarball name, not a sources.conf identifier." - # FIXME: This shouldn't be handled here. - local node="`echo ${process} | sed -e 's:\.tar.*::' -e 's:\+git:@:' -e 's:\.git/:.git-:'`" - ;; - esac - - echo ${node}${branch:+~${branch}}${revision:+@${revision}} - - return 0 -} - -# Extract the build directory from the URL of the source tree as it -# varies depending on which source code control system is used. -# -# $1 - The full URL to the source tree as returned by get_URL() -get_builddir() -{ - # We should be more strict but this works with identifiers - # as well because we might be passed a tar file. - local dir="`normalize_path $1`" - - if test x"$2" = x"libgloss"; then - echo "${local_builds}/${host}/${target}/${dir}/${target}/libgloss" - else - echo "${local_builds}/${host}/${target}/${dir}${2:+-$2}" - fi - - return 0 -} - -get_config() -{ - conf="`get_toolname $1`.conf" - if test $? -gt 0; then - return 1 - fi - if test -e ${topdir}/config/${conf}; then - echo "${topdir}/config/${conf}" - return 0 - else - tool="`echo ${tool} | sed -e 's:-linaro::'`" - if test -e ${topdir}/config/${conf}; then - echo "${topdir}/config/${conf}" - return 0 - fi - fi - error "Couldn't find ${topdir}/config/${conf}" - - return 1 -} - -# Extract the name of the toolchain component being built - -# Source a bourne shell config file so we can access its variables. -# -# $1 - the tool component that the config file needs to be sourced -source_config() -{ - # clear the existing values so we can avoid inheriting config setting - # from previously sourced config files. - depends="" - installs="" - latest="" - default_configure_flags="" - runtest_flags="" - stage1_flags="" - stage2_flags="" - - conf="`get_config $1`" - if test $? -eq 0; then - . "${conf}" - return 0 - else - return 1 - fi -} - -read_config() -{ - conf="`get_config $1`" - if test $? -gt 0; then - return 1 - else - local value="`export ${2}= && . ${conf} && set -o posix && set | grep \"^${2}=\" | sed \"s:^[^=]\+=\(.*\):\1:\" | sed \"s:^'\(.*\)'$:\1:\"`" - local retval=$? - echo "${value}" - return ${retval} - fi -} - -# Extract the name of the toolchain component being built -# $1 - The full URL to the source tree as returned by get_URL(), or the -# tarball name. -get_toolname() -{ -# trace "$*" - - if test x"$1" = x; then - error "No toolchain component name argument!" - return 1 - fi - - local tool= - tool="`get_git_tool $1`" - - # binutils and gdb are special. They share a repository and the tool is - # designated by the branch. - if test x"${tool}" = x"binutils-gdb"; then - local branch= - branch="`get_git_branch $1`" - tool="`echo ${branch} | sed -e 's:.*binutils.*:binutils:' -e 's:.*gdb.*:gdb:'`" - fi - - echo ${tool} - return 0 -} - -# This look at a remote repository for source tarball -# -# $1 - The file to look for, which should be unique or we get too many results -# -# returns ${snapshot} -find_snapshot() -{ - if test x"$1" = x; then - error "find_snapshot() called without an argument!" - return 1 - fi - - local dir="`dirname $1`/" - if test x"${dir}" = x"."; then - dir="" - fi - - #rm -f ${local_snapshots}/md5sums - #fetch_http md5sums - #fetch_rsync ${remote_snapshots}/md5sums - - # Search for the snapshot in the md5sum file, and filter out anything we don't want. - snapshot="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.diff|\.txt|xdelta" | cut -d ' ' -f 3`" - if test x"${snapshot}" != x; then - if test `echo "${snapshot}" | grep -c $1` -gt 1; then - warning "Too many results for $1!" - echo "${snapshot}" - return 1 - fi - echo "${snapshot}" - return 0 - fi - -# snapshot="`grep $1 ${local_snapshots}/${dir}md5sums | cut -d ' ' -f 3`" - if test x"${snapshot}" = x; then - warning "No results for $1!" - return 1 - fi - if test `echo "${snapshot}" | grep -c $1` -gt 1; then - warning "Too many results for $1!" - echo "${snapshot}" - return 1 - fi - - echo ${snapshot} - return 0 -} - -# Get the full path or URL to checkout or download sources of a toolchain -# component. -# This is the kitchen sink of function. -# -# $1 - -# binutils, gcc, glibc, newlib, etc... -# -# returns ${url} as a string with either a single string that is the tarball -# name, or a URL that can be used by git. The fields are as returned by -# get_URL(), which is 'git url' and optionally 'git branch' 'git revision'. -get_source() -{ -# trace "$*" - - if test x"$1" = x; then - error "get_source() called without an argument!" - return 1 - fi - - local url= - # If a full URL or git repo identifier isn't passed as an argument, - # assume we want a tarball snapshot - if test `echo $1 | egrep -c "^svn|^git|^http|^ssh|^bzr|^lp|\.git"` -eq 0; then - local snapshot - snapshot=`find_snapshot $1` - if test $? -gt 0; then - if test x"${interactive}" = x"yes"; then - # TODO: Add a testcase for this leg, conditional on - # interactive. - echo "Pick a unique snapshot name from this list: " 1>&2 - for i in ${snapshot}; do - echo " $i" 1>&2 - done - read answer - local url - url="`find_snapshot ${answer}`" - local ssret=$? - echo "${url}" - return ${ssret} - else - if test x"${snapshot}" != x; then - # It's possible that the value passed in to get_sources - # didn't match any known snapshots OR there were too many - # matches. Check <package>.conf:latest to see if there's a - # matching snapshot. - if test x"${latest}" != x; then - local url - url=`find_snapshot ${latest}` - local ssret=$? - echo "${url}" - return ${ssret} - fi - # Technically 'notice' and 'get_URL' already suppress without - # verbose being set but no reason to do unnecessary work. - if test "${verbose}" -gt 0; then - notice "Pick a unique snapshot name from this list and try again: " - for i in ${snapshot}; do - echo " $i" 1>&2 - done - list_URL $1 - fi - return 1 - fi - fi - else - echo ${snapshot} - return 0 - fi - else - # This leg captures direct urls that don't start or end in .git. - # This include svn directories and git identifiers that start with http://. - if test `echo $1 | egrep -c "\.git"` -eq 0 -a `echo $1 | egrep -c "^git"` -eq 0; then - #if test `echo $1 | egrep -c "\.git"` -eq 0; then - local url=$1 - echo "${url}" - return 0 - fi - fi - - # If a full URL isn't passed as an argment, get one for the - # toolchain component from the sources.conf file. - # If passed a full URL, use that to checkout the sources - if test x"${url}" = x; then - - local service= - service="`get_git_service $1`" - - # This might be a full URL or just an identifier. Use the - # service field to determine this. - local gitinfo= - if test x"${service}" = x; then - # Just an identifier, so get the full git info. - local gitinfo="`get_URL $1`" - if test x"${gitinfo}" = x; then - error "$1 not a valid sources.conf identifier." - return 1; - fi - else - # Full URL - local gitinfo="$1" - fi - - local url= - local url_ret= - url="`get_git_url ${gitinfo}`" - url_ret=$? - local branch= - branch="`get_git_branch ${gitinfo}`" - local revision= - revision="`get_git_revision ${gitinfo}`" - -# -# local url="`echo ${gitinfo} | cut -d ' ' -f 1`" -# if test `echo ${gitinfo} | wc -w` -gt 1; then -# local branch="`echo ${gitinfo} | cut -d ' ' -f 2`" -# else -# branch= -# fi -# if test `echo ${gitinfo} | wc -w` -gt 2; then -# local revision="`echo ${gitinfo} | cut -d ' ' -f 3`" -# fi - - #if test $? -gt 0; then - if test ${url_ret} -gt 0; then - if test x"${interactive}" = x"yes"; then - notice "Pick a unique URL (by identifier) from this list: " - list_URL $3 - for i in ${url}; do - echo "\t$i" 1>&2 - done - read answer - local url="`get_URL ${answer}`" - fi - # else - # notice "Pick a unique URL from this list: " - # for i in ${url}; do - # echo " $i" 1>&2 - # done - fi - fi - - # We aren't guaranteed a match even after snapshots and sources.conf have - # been checked. - if test x"${url}" = x; then - return 1 - fi - - echo "${url}${branch:+~${branch}}${revision:+@${revision}}" - - return 0 -} - -# Get the proper source directory -# $1 - The component name, which is one of the following: -# -# A git, http, ssh, svn, lp URL -# A repository identifier mapping an entry in sources.conf -# A tarball -# -# Returns the fully qualified srcdir -get_srcdir() -{ -# trace "$*" - - if test `echo $1 | grep -c "\.tar"` -gt 0; then - # tarballs have no branch or revision - local dir="`echo $1 | sed -e 's:\.tar.*::'`" - else - local process=$1 - - # The git parser will return results for all valid services. - local service= - service="`get_git_service ${process}`" - - # The git parser functions are most reliable when called with - # a full URL and this verifies that a repo identifier has a - # valid sources.conf entry. - if test x"${service}" = x; then - local process= - process="`get_URL $1`" - if test $? -gt 0; then - error "get_srcdir called with invalid input." - return 1 - fi - fi - - local tool= - tool="`get_toolname ${process}`" - - local repo= - repo="`get_git_repo ${process}`" - - local branch= - branch="`get_git_branch ${process}`" - - # Multi-path branches should have / replaces with dashes. - branch="`echo ${branch} | sed 's:/:-:g'`" - - local revision= - revision="`get_git_revision ${process}`" - - local dir=${repo}${branch:+~${branch}}${revision:+@${revision}} - fi - - local srcdir="${local_snapshots}/${dir}" - - # Some components have non-standard directory layouts. - case ${tool} in - gcc*) -# FIXME: How does this work with current g.l.o gcc sources? - - # The Linaro gcc git branches are git repositories converted from - # bzr so they have goofy directory layouts which include the branch - # as a directory inside the source directory. - local newdir="`echo ${srcdir} | sed -e 's:\.git-linaro::' | tr '.' '_'`" - local newdir="`basename ${newdir}`" - # If the top level file doesn't yet exist then the user is asking - # where to put the source. If it does exist then they're asking - # where the actual source is located. - if test ! -e ${srcdir}/config.sub; then - # Fixme! - if test -e ${srcdir}/${newdir}${revision}/config.sub; then - local srcdir="${srcdir}/${newdir}${revision}" - fi - fi - ;; - eglibc*) - # Eglibc has no top level configure script, it's in the libc - # subdirectory. - if test -d "${srcdir}/libc"; then - # If the directory already exists the caller wants to know - # where the sources are. - local srcdir="${srcdir}/libc" - fi - # Else if the directory does not yet exist the caller wants to know - # where to put the eglibc sources. - ;; - *) - ;; - esac - - if test x"$2" = x"libgloss"; then - local srcdir="${srcdir}/libgloss" - fi - - echo ${srcdir} - - return 0 -} - -# Parse a version string and produce a release version string suitable -# for the LINARO-VERSION file. -create_release_version() -{ -# trace "$*" - - local version=$1 - local branch= - local revision= - - if test x"${release}" = x; then - # extract the branch from the version - if test "`echo $1 | grep -c "\.git/"`" -gt 0; then - local branch="~`echo ${version} | cut -d '/' -f 2 | cut -d '@' -f 1`" - fi - - local srcdir="`get_srcdir ${version}`" - if test -d "${srcdir}/.git" -o -e "${srcdir}/.gitignore"; then - local revision="@`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - fi - - local date="`date +%Y%m%d`" - - # return the version string array - local rtag="${branch}${revision}-${date}" - # when 'linaro' is part of the branch name, we get a duplicate - # identifier, which we remove to be less confusing, as the tag name - # is long enough as it is... - local rtag="`echo ${rtag} | sed -e 's:-linaro~linaro:~linaro:'`" - else - local version="`echo $1 | sed -e 's:[a-z\./-]*::' -e 's:-branch::' -e 's:^_::' | tr '_' '.' `" - if test x"${version}" = x; then - local version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - local version="`echo ${version} | sed -e 's:[a-z\./-]*::' -e 's:-branch::'`" - fi - local rtag="${version}-${release}" - fi - - echo ${rtag} - - return 0 -} - - -# Parse a version string and produced the proper output fields. This is -# used when naming releases for both directories, tarballs, and -# internal version numbers. The version string looks like -# 'gcc.git/gcc-4.8-branch' or 'gcc-linaro-4.8-2013.09' -# -# returns "version~branch@revision" -create_release_tag() -{ -# trace "$*" - - local version=$1 - local branch= - local revision= - - local rtag="`get_git_tag $1`" - - local name="`echo ${version} | cut -d '/' -f 1 | cut -d '~' -f 1 | sed -e 's:\.git:-linaro:' -e 's:\.tar.*::' -e 's:-[0-9][0-9][0-9][0-9]\.[0-9][0-9].*::'`" - - if test x"${release}" = x; then - # extract the branch from the version - local srcdir="`get_srcdir ${version}`" - if test -d "${srcdir}/.git" -o -e "${srcdir}/.gitignore"; then - local revision="@`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - fi - - local date="`date +%Y%m%d`" - - # return the version string array - local rtag="${rtag}${revision}-${date}" - else - local version="`echo $1 | sed -e 's:[a-z\./-]*::' -e 's:-branch::' -e 's:^_::' | tr '_' '.' `" - local tool="`get_toolname $1`" - if test x"${version}" = x; then - local version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - local version="`echo ${version} | sed -e 's:[a-z\./-]*::' -e 's:-branch::'`" - fi - local rtag="${name}-${version}-${release}" - # For a release, we don't need the .git~ identifier. - local rtag="`echo ${rtag} | sed -e 's:\.git~:-:'`" - - fi - - echo ${rtag} - - return 0 -} - -# Get the SHA-1 for the latest commit to the git repository -#get_git_revision() -#{ -# trace "$*" -# -# local srcdir=$1 -# local revision="`cd ${srcdir} && git log -n 1 | head -1 | cut -d ' ' -f 2`" -# -# echo ${revision} -# return 0 -#} diff --git a/lib/configure.sh b/lib/configure.sh deleted file mode 100755 index d93e51c..0000000 --- a/lib/configure.sh +++ /dev/null @@ -1,305 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Configure a source directory -# $1 - the directory to configure -# $2 - [OPTIONAL] which gcc stage to build -configure_build() -{ - trace "$*" - - local gitinfo="`get_source $1`" - - local tool="`get_toolname ${gitinfo}`" - - # Linux isn't a build project, we only need the headers via the existing - # Makefile, so there is nothing to configure. - if test x"${tool}" = x"linux"; then - return 0 - fi - # The git parser functions shall return valid results for all - # services, especially once we have a URL. - - local url="`get_git_url ${gitinfo}`" - local tag="`get_git_tag ${gitinfo}`" - local srcdir="`get_srcdir ${gitinfo} ${2:+$2}`" - local stamp="`get_stamp_name configure ${gitinfo} ${2:+$2}`" - local builddir="`get_builddir ${gitinfo} ${2:+$2}`" - - # Don't look for the stamp in the builddir because it's in builddir's - # parent directory. - local stampdir="`dirname ${builddir}`" - - local ret= - check_stamp "${stampdir}" ${stamp} ${srcdir} configure ${force} - ret=$? - if test $ret -eq 0; then - return 0 - elif test $ret -eq 255; then - # This means that the compare file ${srcdir} is not present. - return 1 - fi - - if test ! -d "${builddir}"; then - notice "The build directory '${builddir}' doesn't exist, so creating it" - # Zlib has to be built in it's source directory. -# if test x"${tool}" = x"zlib"; then -# dryrun "ln -s ${srcdir} ${builddir}" -# else - dryrun "mkdir -p \"${builddir}\"" -# fi - fi - - local configure="`grep ^configure= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" - if test x"${configure}" = x; then - configure="yes" - fi - if test ! -f "${srcdir}/configure" -a x"${dryrun}" != x"yes" -a x"${configure}" != xno; then - warning "No configure script in ${srcdir}!" - # not all packages commit their configure script, so if it has autogen, - # then run that to create the configure script. - if test -f ${srcdir}/autogen.sh; then - (cd ${srcdir} && ./autogen.sh) - fi - if test ! -f "${srcdir}/configure"; then - error "No configure script in ${srcdir}!" - return 1 - fi - fi - - # If a target architecture isn't specified, then it's a native build -# if test x"${target}" = x; then -# target=${build} -# host=${build} -# else - # FIXME: this won't work yet when doing a Canadian Cross. -# host=${build} -# fi - - # Load the default config file for this component if it exists. - local default_configure_flags="" - local stage1_flags="" - local stage2_flags="" - local opts="" - if test x"$2" = x"gdbserver"; then - local toolname="gdbserver" - else - local toolname="${tool}" - fi - if test -e "${topdir}/config/${toolname}.conf"; then - . "${topdir}/config/${toolname}.conf" - # if there is a local config file in the build directory, allow - # it to override the default settings - # unset these two variables to avoid problems later - if test -e "${builddir}/${toolname}.conf" -a ${builddir}/${toolname}.conf -nt ${topdir}/config/${toolname}.conf; then - . "${builddir}/${toolname}.conf" - notice "Local ${toolname}.conf overriding defaults" - else - # Since there is no local config file, make one using the - # default, and then add the target architecture so it doesn't - # have to be supplied for future reconfigures. - echo "target=${target}" > ${builddir}/${toolname}.conf - cat ${topdir}/config/${toolname}.conf >> ${builddir}/${toolname}.conf - fi - else - error "No ${topdir}/config/${tool}.conf file for ${tool}." - exit 1 - fi - - - # See if this component depends on other components. They then need to be - # built first. - if test x"${depends}"; then - for i in "${depends}"; do - # remove the current build component from the command line arguments - # so we can replace it with the dependent component name. - local args="`echo ${command_line_arguments} | sed -e 's@$1@@'`" - done - fi - - - # Force static linking unless dynamic linking is specified - local static="`grep ^static_link= ${topdir}/config/${tool}.conf | cut -d '=' -f 2 | tr -d '\"'`" - if test x"${static}" = x"yes" -o x"${tarbin}" = x"yes"; then - if test "`echo ${tool} | grep -c glibc`" -eq 0; then - local opts="--disable-shared --enable-static" - fi - fi - - # prefix is the root everything gets installed under. - if test x"${prefix}" = x; then - local prefix="${local_builds}/destdir/${host}" - fi - - # The release string is usually the date as well, but in YYYY.MM format. - # For snapshots we add the day field as well. - if test x"${release}" = x; then - local date="`date "+%Y.%m"`" - else - local date="${release}" - fi - - if test x"${override_cflags}" != x -a x"${tool}" != x"eglibc"; then - local opts="${opts} CFLAGS=\"${override_cflags}\" CXXFLAGS=\"${override_cflags}\"" - fi - - # GCC and the binutils are the only toolchain components that need the - # --target option set, as they generate code for the target, not the host. - case ${tool} in - # zlib) - # # zlib doesn't support most standard configure options - # local opts="--prefix=${sysroots}/usr" - # ;; - newlib*|libgloss*) - local opts="${opts} --build=${build} --host=${target} --target=${target} --prefix=${sysroots}/usr CC=${target}-gcc" - ;; - *libc) - local opts="${opts} --build=${build} --host=${target} --target=${target} --prefix=/usr" - dryrun "(mkdir -p ${sysroots}/usr/lib)" - ;; - gcc*) - # Force a complete reconfigure, as we changed the flags. We could do a - # make distclean, but this builds faster, as not all files have to be - # recompiled. -# find ${builddir} -name Makefile -o -name config.status -o -name config.cache -exec rm {} \; -# if test -e ${builddir}/Makefile; then -# make ${make_flags} -C ${builddir} distclean -i -k -# fi - if test x"${build}" != x"${target}"; then - if test x"$2" != x; then - case $2 in - stage1*) - notice "Building stage 1 of GCC" - local opts="${opts} ${stage1_flags}" - ;; - stage2*) - notice "Building stage 2 of GCC" - local opts="${opts} ${stage2_flags}" - # Only add the Linaro bug and version strings for - # Linaro branches. - if test "`echo ${gcc_version} | grep -ic linaro`" -gt 0; then - local opts="${opts} --with-bugurl=\"https://bugs.linaro.org\" --with-pkgversion=\"Linaro GCC ${date}\"" - fi - ;; - gdbserver) - notice "Building gdbserver for the target" - local srcdir="${srcdir}/gdbserver" - ;; - bootstrap*) - notice "Building bootstrapped GCC" - local opts="${opts} --enable-bootstrap" - ;; - *) - if test -e ${sysroots}/usr/include/stdio.h; then - notice "Building with stage 2 flags, sysroot found!" - local opts="${opts} ${stage2_flags}" - else - warning "Building with stage 1 flags, no sysroot found" - local opts="${opts} ${stage1_flags}" - fi - ;; - esac - else - if test -e ${sysroots}/usr/include/stdio.h; then - notice "Building with stage 2 flags, sysroot found!" - local opts="${opts} ${stage2_flags}" - else - warning "Building with stage 1 flags, no sysroot found" - local opts="${opts} ${stage1_flags}" - fi - fi - else - local opts="${opts} ${stage2_flags}" - fi - local version="`echo $1 | sed -e 's#[a-zA-Z\+/:@.]*-##' -e 's:\.tar.*::'`" - local opts="${opts} --build=${build} --host=${host} --target=${target} --prefix=${prefix}" - ;; - binutils) - local opts="${opts} --build=${build} --host=${host} --target=${target} --prefix=${prefix}" - ;; - gdb*) - local opts="${opts} --with-bugurl=\"https://bugs.launchpad.net/gcc-linaro\" --with-pkgversion=\"Linaro GDB ${date}\"" - if test x"$2" = x"gdbserver"; then - local opts="${opts} --build=${build} --host=${target} --prefix=${prefix}" - local srcdir="${srcdir}/gdb/gdbserver" - else - local opts="${opts} --build=${build} --host=${host} --target=${target} --prefix=${prefix}" - fi - dryrun "mkdir -p ${builddir}" - ;; - # These are only built for the host - dejagnu|gmp|mpc|mpfr|isl|ppl|cloog|qt-everywhere-opensource-src|ffmpeg) - local opts="${opts} --build=${build} --host=${host} --prefix=${prefix}" - ;; - *) - local opts="${opts} --build=${build} --host=${host} --target=${target} --prefix=${sysroots}/usr" - ;; - esac - - if test -e ${builddir}/config.status -a x"${tool}" != x"gcc" -a x"${force}" = xno; then - warning "${buildir} already configured!" - else - export PATH="${local_builds}/${host}/bin:$PATH" - # Don't stop on CONFIG_SHELL if it's set in the environment. - if test x"${CONFIG_SHELL}" = x; then - export CONFIG_SHELL=${bash_shell} - fi - # In release mode, use default pkgversion for GCC. -# if test x"${release}" != x;then -# case ${tool} in -# gcc*) -# default_configure_flags=`echo "${default_configure_flags}" | sed -e 's/--with-pkgversion=.* //'` -# ;; -# esac -# fi - - # zlib can only be configured in the source tree, and doesn't like any of the - # stadard GNU configure options -# if test x"${tool}" = x"zlib"; then -# dryrun "(cd ${builddir} && ${CONFIG_SHELL} ./configure --prefix=${prefix})" -# else - if test x"${configure}" = xyes; then - dryrun "(cd ${builddir} && ${CONFIG_SHELL} ${srcdir}/configure SHELL=${bash_shell} ${default_configure_flags} ${opts})" - if test $? -gt 0; then - error "Configure of $1 failed." - return $? - fi - else - dryrun "rsync -a --exclude=.git/ ${srcdir}/ ${builddir}" - if test $? -gt 0; then - error "Copy of $1 failed (rsync -a ${srcdir} ${builddir})" - return $? - fi - fi -# fi - - # unset this to avoid problems later - unset default_configure_flags - unset opts - unset stage1_flags - unset stage2_flags - fi - - notice "Done configuring ${gitinfo}" - - #touch ${stampdir}/${stamp} - create_stamp "${stampdir}" "${stamp}" - - return 0 -} - diff --git a/lib/depend.sh b/lib/depend.sh deleted file mode 100755 index 90c0966..0000000 --- a/lib/depend.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# -# Build the dependencies needed to build the toolchain -# - -# This takes a toolchain component and returns the fuly qualified package names to -# this toolchain component requires to configure and build. These other components -# are limited to packages built by Linaro. -# -# $1 - find the toolchain components to build to satisfiy necessary dependencies. -dependencies() -{ - trace "$*" - - # Don't process any dependencies in the conf file. - if test x"${nodepends}" = xyes; then - warning "Dependencies for $1 disabled!" - return 0 - fi - - if test x"${depends}" = x; then - local tool=`get_toolname $1` - local depends="`grep ^latest= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" - source_config ${tool} - fi - - if test x"${depends}" != x; then - for i in ${depends}; do - local version="" - case $i in - b*|binutils) - version="${binutils_version}" - ;; - gm*|gmp) - version="${gmp_version}" - ;; - gc*|gcc) - version="${gcc_version}" - ;; - mpf*|mpfr) - version="${mpfr_version}" - ;; - mpc) - version="${mpc_version}" - ;; - eglibc) - version="${eglibc_version}" - ;; - glibc) - version="${glibc_version}" - ;; - n*|newlib) - version="${newlib_version}" - ;; - *) - ;; - esac - if test x"${version}" = x; then - version="`grep ^latest= ${topdir}/config/$i.conf | cut -d '\"' -f 2`" - fi - installed $i - if test $? -gt 0; then - notice "Need component ${tool}-${version}" - local components="${components} ${tool}-${version}" - fi - done - depends="" - version="" - return $? - fi - - echo "${components}" - return 1 -} - -# $1 - the toolchain component to see if it's already installed -installed() -{ - trace "$*" - - if test x"${tool}" = x; then - local tool=`get_toolname $1` - fi - source_config ${tool} - - if test ! -d ${local_builds}/lib -a ! ${local_builds}/bin; then - error "no existing installation in ${local_builds}!" - return 1 - fi - - if test x"${installs}" != x; then - # It the installed file is a library, then we have to look for both - # static and shared versions. - if test "`echo ${installs} | grep -c '^lib'`" -gt 0; then - if test -e ${local_builds}/lib/${installs}so -o -e ${local_builds}/lib/${installs}a; then - notice "${tool} already installed" - return 0 - fi - else - if test -e ${local_builds}/bin/${installs} -o -e ${local_builds}/bin/${target}-${installs} -o ${local_builds}/bin/${installs}.exe; then - notice "${tool} already installed" - return 0 - else - warning "${tool} not installed." - return 1 - fi - fi - else - warning "No install dependency specified" - return 1 - fi - - return 1 -} - -# These are the latest copies of the infrastructure files required to -# fully build GCC in all it's glory. While it is possible to pass -# --disable-* options at configure time to GCC, these are use for -# good reason, so we download, build and install them. -infrastructure() -{ - trace "$*" - - rm -f ${local_snapshots}/infrastructure/ChangeLog - fetch_http infrastructure/ChangeLog - - source_config infrastructure - - if test x"${depends}" = x; then - error "No dependencies listed for infrastructure libraries!" - return 1 - fi - - # This shouldn't happen, but it's nice for regression verification. - if test ! -e ${local_snapshots}/md5sums; then - error "Missing ${local_snapshots}/md5sums file needed for infrastructure libraries." - return 1 - fi - - # We have to grep each dependency separately to preserve the order, as - # some libraries depend on other libraries being bult first. Egrep - # unfortunately sorts the files, which screws up the order. - local files="`grep ^latest= ${topdir}/config/dejagnu.conf | cut -d '\"' -f 2`" - for i in ${depends}; do - files="${files} `grep /$i ${local_snapshots}/md5sums | cut -d ' ' -f3 | uniq`" - done - - # Store the current value so we can reset it ater we're done. - local nodep=${nodepends} - - # Turn off dependency checking, as everything is handled here. - nodepends=yes - local buildret= - for i in ${files}; do - local name="`echo $i | sed -e 's:\.tar\..*::' -e 's:infrastructure/::' -e 's:testcode/::'`" - if test "`echo $i | grep -c /linux`" -eq 1 -a x"${build}" = x"${target}"; then - continue - fi - # if make 4.0 is already installed, we don't need to build it everytime. - if test $i = "make" -a "${makeversion}" = "4.0"; then - continue - fi - build ${name} - buildret=$? - if test ${buildret} -gt 0; then - error "Building ${name} failed." - return 1 - fi - done - - # Reset to the stored value - nodepends=${nodep} -} - diff --git a/lib/diff.sh b/lib/diff.sh deleted file mode 100644 index 9465736..0000000 --- a/lib/diff.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# -# diffall dir1 dir2 -# Takes a two directories and compares the sum files -difftwodirs () -{ - local prev="$1" - local next="$2" - - # Don't diff it's already been done - if test -e $next/testsuite-diff.txt; then - return 0 - fi - - echo "Diffing: ${prev} against ${next}..." - local resultsdir="${local_builds}/test-results" - - local pversion="`echo ${prev} | grep -o "test-results/cbuild[0-9a-z]*" | grep -o "cbuild[0-9a-z]*"`" - local nversion="`echo ${next} | grep -o "test-results/cbuild[0-9a-z]*" | grep -o "cbuild[0-9a-z]*"`" - - diffdir="${resultsdir}/diffof-${pversion}-${nversion}" - mkdir -p ${diffdir} - unxz -f ${prev}/*.sum.xz - unxz -f ${next}/*.sum.xz - for i in gcc gdb glibc egibc newlib binutils; do - if test -e ${prev}/$i.sum -a -e ${next}/$i.sum; then - diff -U 0 ${prev}/$i.sum ${next}/$i.sum 2>&1 | egrep '^[+-]PASS|^[+-]FAIL|^[+-]XPASS|^[+-]XFAIL' 2>&1 | sort -k 2 2>&1 > ${diffdir}/diff-$i.txt - if test -s ${diffdir}/diff-$i.txt; then - echo "Comparison between:" > ${diffdir}/$i-test-results.txt - echo " ${prev}/$i.sum and" >> ${diffdir}/$i-test-results.txt - echo " ${next}/$i.sum" >> ${diffdir}/$i-test-results.txt - fi - if test `grep -c ^\+PASS ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${diffdir}/$i-test-results.txt - echo "Tests that were failing that now PASS" >> ${diffdir}/$i-test-results.txt - echo "-------------------------------------" >> ${diffdir}/$i-test-results.txt - grep ^\+PASS ${diffdir}/diff-$i.txt >> ${diffdir}/$i-test-results.txt - fi - if test `grep -c ^\+FAIL ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${diffdir}/$i-test-results.txt - echo "Tests that were passing that now FAIL" >> ${diffdir}/$i-test-results.txt - echo "-------------------------------------" >> ${diffdir}/$i-test-results.txt - grep ^\+FAIL ${diffdir}/diff-$i.txt >> ${diffdir}/$i-test-results.txt - fi - if test `grep -c ^\+XPASS ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${diffdir}/$i-test-results.txt - echo "Tests that were expected failures that now PASS" >> ${diffdir}/$i-test-results.txt - echo "-----------------------------------------------" >> ${diffdir}/$i-test-results.txt - grep ^\+XPASS ${diffdir}/diff-$i.txt >> ${diffdir}/$i-test-results.txt - fi - if test `grep -c ^\+UN ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${diffdir}/$i-test-results.txt - echo "Tests that have problems" >> ${diffdir}/$i-test-results.txt - echo "------------------------" >> ${diffdir}/$i-test-results.txt - grep ^\+UN ${diffdir}/diff-$i.txt >> ${diffdir}/$i-test-results.txt - fi - if test -e ${diffdir}/$i-test-results.txt; then - mailto "[TEST] $i had regressions between ${prev} and ${next}!" ${diffdir}/$i-test-results.txt - else - mailto "[TEST] $i had ZERO regressions between ${prev} and ${next}!" - fi - fi - done - -# rm -fr ${diffdir} - local incr=`expr ${incr} + 1` - - xz -f ${prev}/*.sum - xz -f ${next}/*.sum -} - -# -# diffall "list" -# Takes a list of directories and compares them one by one in sequence. -diffall () -{ - local count="`echo $1| wc -w`" - if test ${count} -gt 0; then - declare -a foo=($1) - local incr=0 - while test ${incr} -lt ${count}; do - local next=`expr ${incr} + 1` - if test ${next} = ${count}; then - return 0 - fi - - difftwodirs ${foo[${incr}]} ${foo[${next}]} - local incr=`expr ${incr} + 1` - done - fi -} - - -# This produces the test file, who's header needs to look like this: -# -# Difference in testsuite results between: -# gcc-linaro-4.8-2014.01 build i686-precise-cbuild461-oort8-i686r1 -# and the one before it: -# gcc-linaro-4.8-2013.12 build i686-precise-cbuild461-oort2-i686r1 - -# ------ -testfile() -{ - - orig="`echo $1 | grep -o "[a-z]*-linaro[0-9\.\-]*"`" - next="`echo $2 | grep -o "[a-z]*-linaro[0-9\.\-]*"`" - origdir="`basename $1`" - nextdir="`basename $2`" - - cat <<EOF > ${diffdir}/testsuite-diff.txt -Difference in testsuite results between: - ${orig} build ${origdir} -and the one before it: - ${next} build ${nextdir} - ------- -EOF - - cat ${diffdir}/diff.txt >> ${diffdir}/testsuite-diff.txt - cp ${diffdir}/testsuite-diff.txt $1 - cp ${diffdir}/testsuite-diff.txt $2 -} - -# $1 - the subject for the email -# $2 - the body of the email -# $3 - optional user to send email to -mailto() -{ - if test x"${email}" = xyes; then - echo "Mailing test results!" - mail -s "$1" tcwg-test-results@gnashdev.org < $2 - if test x"$3" != x; then - mail -s "$1" $3 < $2 - fi - else - echo "$1" - echo "===================== $1 ================" - cat $2 - fi -} diff --git a/lib/fetch.sh b/lib/fetch.sh deleted file mode 100755 index ad954fd..0000000 --- a/lib/fetch.sh +++ /dev/null @@ -1,336 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Fetch a file from a remote machine -fetch() -{ -# trace "$*" - - if test x"$1" = x; then - error "No file name specified to fetch!" - return 1 - else - local file="`basename $1`" - fi - -# if test x"${supdate}" = xno; then -# warning "Updating files disabled by user, not downloading $1" -# return 0 -# fi - - # The md5sums file is a special case as it's used to find all - # the other names of the tarballs for remote downloading. - if test x"$1" = x"md5sums"; then - # Move the existing file to force a fresh copy to be downloaded. - # Otherwise this file can get stale, and new tarballs not found. - if test -f ${local_snapshots}/md5sums; then - mv -f ${local_snapshots}/md5sums ${local_snapshots}/md5sums.bak - fi - fetch_http md5sums - if test ! -s ${local_snapshots}/md5sums; then - cp -f ${local_snapshots}/md5sums.bak ${local_snapshots}/md5sums - fi - return $? - fi - - # This will be ${local_snapshots} or ${local_snapshots}/infrastructure. - local srcdir= - srcdir="`get_srcdir $1`" - - local stamp= - stamp="`get_stamp_name fetch $1`" - - # Fetch stamps go into srcdir's parent directory. - local stampdir="`dirname ${srcdir}`" - - # We can grab the full file name by searching for it in the md5sums file. - # This is better than guessing, which we do anyway if for some reason the - # file isn't listed in the md5sums file. This might be prepended with the - # 'infrastructure/' directory name if it's an infrastructure file. - local md5file="`grep ${file} ${local_snapshots}/md5sums | cut -d ' ' -f 3`" - if test x"${md5file}" = x; then - error "${file} not in md5sum!" - return 1 - fi - - if test -e "${local_snapshots}/${md5file}"; then - local ret= - # If the tarball hasn't changed, then don't fetch anything - check_stamp "${stampdir}" ${stamp} ${local_snapshots}/${md5file} fetch ${force} - ret=$? - if test $ret -eq 0; then - return 0 - elif test $ret -eq 255; then - # The compare file ${local_snapshots}/${md5file} is not there. - return 1 - fi - else - notice "${local_snapshots}/${md5file} does not exist. Downloading." - fi - - # FIXME: Stash the md5sum for this tarball in the build directory. Compare - # the current one we just got with the stored one to determine if we should - # download it. - if test x"$2" = x; then - local protocol=http - else - local protocol=$2 - fi - - local getfile="${md5file}" - # download the file - fetch_${protocol} ${getfile} - if test $? -gt 0; then - warning "couldn't fetch $1, trying xdelta3 instead" - local getfile=${file}.tar.xdelta3.xz - fetch_${protocol} ${file} - if test $? -gt 0; then - warning "couldn't fetch ${getfile}, trying .bz2 instead" - local getfile=${file}.tar.bz2 - fetch_${protocol} ${getfile} - if test $? -gt 0; then - error "couldn't fetch ${getfile}" - return 1 - fi - fi - return 1 - fi - - dryrun "check_md5sum ${getfile}" -# if test $? -gt 0; then -# return 1 -# fi - - create_stamp "${stampdir}" "${stamp}" - - return 0 -} - -fetch_http() -{ -# trace "$*" - - local getfile=$1 - local dir="`dirname $1`/" - if test x"${dir}" = x"./"; then - local dir="" - else - if test ! -d ${local_snapshots}/${dir}; then - mkdir -p ${local_snapshots}/${dir} - fi - fi - - if test ! -e ${local_snapshots}/${getfile} -o x"${force}" = xyes; then - notice "Downloading ${getfile} to ${local_snapshots}" - if test x"${wget_bin}" != x; then - # --continue --progress=bar - # NOTE: the timeout is short, and we only try twice to access the - # remote host. This is to improve performance when offline, or - # the remote host is offline. - dryrun "${wget_bin} ${wget_quiet:+-q} --timeout=${wget_timeout}${wget_progress_style:+ --progress=${wget_progress_style}} --tries=2 --directory-prefix=${local_snapshots}/${dir} ${remote_snapshots}/${getfile}" - if test x"${dryrun}" != xyes -a ! -s ${local_snapshots}/${getfile}; then - warning "downloaded file ${getfile} has zero data!" - return 1 - fi - fi - else - # We don't want this message for md5sums, since it's so often - # downloaded. - if test x"${getfile}" != x"md5sums"; then - notice "${getfile} already exists in ${local_snapshots}" - fi - fi - return 0 -} - -fetch_scp() -{ - error "unimplemented" -} - -fetch_rsync() -{ - local getfile="`basename $1`" - - dryrun "${rsync_bin} $1 ${local_snapshots}" - if test ! -e ${local_snapshots}/${getfile}; then - warning "${getfile} didn't download via rsync!" - return 1 - fi - - return 0 -} - -check_md5sum() -{ -# trace "$*" - - if test ! -e ${local_snapshots}/md5sums; then - fetch_http md5sums - if test $? -gt 0; then - error "couldn't fetch md5sums" - return 1 - fi - fi - - local dir="`dirname $1`/" - if test x"${dir}" = x"."; then - local dir="" - fi - - # Drop the file name from .tar to the end to keep grep happy - local getfile=`echo ${1}` - - newsum="`md5sum ${local_snapshots}/$1 | cut -d ' ' -f 1`" - oldsum="`grep ${getfile} ${local_snapshots}/md5sums | cut -d ' ' -f 1`" - # if there isn't an entry in the md5sum file, we're probably downloading - # something else that's less critical. - if test x"${oldsum}" = x; then - warning "No md5sum entry for $1!" - return 0 - fi - - if test x"${oldsum}" = x"${newsum}"; then - notice "md5sums matched" - local builddir="`get_builddir $1`" - rm -f ${builddir}/md5sum - echo "${newsum} > ${builddir}/md5sum" - return 0 - else - error "md5sums don't match!" - if test x"${force}" = x"yes"; then - return 0 - else - return 1 - fi - fi - - return 0 -} - -# decompress and untar a fetched tarball -extract() -{ -# trace "$*" - - local extractor= - local taropt= - - if test `echo $1 | egrep -c "\.gz|\.bz2|\.xz"` -eq 0; then - local file="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.txt" | cut -d ' ' -f 3 | cut -d '/' -f 2`" - else - local file="`echo $1 | cut -d '/' -f 2`" - fi - - local srcdir= - srcdir="`get_srcdir $1`" - - local stamp= - stamp="`get_stamp_name extract $1`" - - # Extract stamps go into srcdir - local stampdir="`dirname ${srcdir}`" - - # Name of the downloaded tarball. - local tarball="`dirname ${srcdir}`/${file}" - - local ret= - # If the tarball hasn't changed, then we don't need to extract anything. - check_stamp "${stampdir}" ${stamp} ${tarball} extract ${force} - ret=$? - if test $ret -eq 0; then - return 0 - elif test $ret -eq 255; then - # the ${tarball} isn't present. - return 1 - fi - - # Figure out how to decompress a tarball - case "${file}" in - *.xz) - local extractor="xz -d " - local taropt="J" - ;; - *.bz*) - local extractor="bzip2 -d " - local taropt="j" - ;; - *.gz) - local extractor="gunzip " - local taropt="x" - ;; - *) ;; - esac - - if test -d ${srcdir} -a x"${force}" = xno; then - notice "${srcdir} already exists. Removing to extract newer version!" - dryrun "rm -rf ${srcdir}" - fi - - local taropts="${taropt}xf" - notice "Extracting ${srcdir} from ${tarball}." - dryrun "tar ${taropts} ${tarball} -C `dirname ${srcdir}`" - - # FIXME: this is hopefully a temporary hack for tarballs where the - # directory name versions doesn't match the tarball version. This means - # it's missing the -linaro-VERSION.YYYY.MM part. - local name="`echo ${file} | sed -e 's:.tar\..*::'`" - - # dryrun has to skip this step otherwise execution will always drop into - # this leg. - if test x"${dryrun}" != xyes -a ! -d ${srcdir}; then - local dir2="`echo ${name} | sed -e 's:-linaro::' -e 's:-201[0-9\.\-]*::'`" - if test ! -d ${srcdir}; then - dir2="`dirname ${srcdir}`/${dir2}" - warning "${tarball} didn't extract to ${srcdir} as expected!" - notice "Making a symbolic link from ${dir2} to ${srcdir}!" - dryrun "ln -sf ${dir2} ${srcdir}" - else - error "${srcdir} already exists!" - return 1 - fi - fi - - create_stamp "${stampdir}" "${stamp}" - return 0 -} - -# This updates an existing checked out source tree -update_source() -{ - # Figure out which DCCS it uses - dccs= - if test -f .git; then - dccs="git pull" - fi - if test -f .bzr; then - dccs="bzr pull" - fi - if test -f .svn; then - dccs="svn update" - fi - if test x"${dccs}" != x; then - echo "Update sources with: ${dccs}" - else - echo "ERROR: can't determine DCCS!" - return - fi - - # update the source - (cd $1 && ${dccs}) -} diff --git a/lib/gerrit.sh b/lib/gerrit.sh deleted file mode 100644 index 410aaaa..0000000 --- a/lib/gerrit.sh +++ /dev/null @@ -1,286 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# These functions are roughly based on the python script the LAVA team uses. That script -# is available at: -# https://git.linaro.org/lava-team/lava-ci.git/blob_plain/HEAD:/lava-project-ci.py - -# https://review.openstack.org/Documentation/cmd-index.html - - # ssh -p 29418 robert.savoye@git.linaro.org gerrit version - # this uses the git commit SHA-1 - # ssh -p 29418 robert.savoye@git.linaro.org gerrit review --code-review 0 -m "foo" a87c53e83236364fe9bc7d5ffdbf3c307c64707d - # ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/cbuild2 --code-review 0 -m "foobar" a87c53e83236364fe9bc7d5ffdbf3c307c64707d - # ssh -p 29418 robert.savoye@git.linaro.org gerrit query --current-patch-set gcc status:open limit:1 --format JSON - -# The number used for code reviews looks like this, it's passed as a string to -# these functions: -# -2 Do not submit -# -1 I would prefer that you didn't submit this -# 0 No score -# +1 Looks good to me, but someone else must approve -# +2 Looks good to me, approved - - -# ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/cbuild2 --code-review "+2" -m "foobar" 55957eaff3d80d854062544dea6fc0eedcbf9247 --submit - - # local revision="@`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - -# These extract_gerrit_* functions get needed information from a .gitreview file. - -# Extract info we need. For a Gerrit triggered build, info is in -# environment variables. Otherwise we scrap a gitreview file for -# the requireed information. -gerrit_info() -{ - local srcdir=$1 - extract_gerrit_host ${srcdir} - extract_gerrit_port ${srcdir} - extract_gerrit_project ${srcdir} - extract_gerrit_username ${srcdir} - - # These only come from Gerrit triggers - gerrit_branch="${GERRIT_TOPIC}" - gerrit_revision="${GERRIT_PATCHSET_REVISION}" - gerrit_change_subject="${GERRIT_CHANGE_SUBJECT}" - gerrit_change_id="${GERRIT_CHANGE_ID}" - gerrit_change_number="${GERRIT_CHANGE_NUMBER}" - gerrit_event_type="${GERRIT_EVENT_TYPE}" - jenkins_job_name="${JOB_NAME}" - jenkins_job_url="${JOB_URL}" - - # Query the Gerrit server - gerrit_query gcc -} - -extract_gerrit_host() -{ - if test x"${GERRIT_HOST}" != x; then - gerrit_host="${GERRIT_HOST}" - else - local srcdir=$1 - - if test -e ${srcdir}/.gitreview; then - local review=${srcdir}/.gitreview - else - if test -e ${HOME}/.gitreview; then - local review=${HOME}/.gitreview - else - error "No ${srcdir}/.gitreview file!" - return 1 - fi - fi - - gerrit_host="`grep host= ${review} | cut -d '=' -f 2`" - fi - - return 0 -} - -extract_gerrit_project() -{ - if test x"${GERRIT_PROJECT}" != x; then - gerrit_project="${GERRIT_PROJECT}" - else - local srcdir=$1 - - if test -e ${srcdir}/.gitreview; then - local review=${srcdir}/.gitreview - else - if test -e ${HOME}/.gitreview; then - local review=${HOME}/.gitreview - else - error "No ${srcdir}/.gitreview file!" - return 1 - fi - fi - - gerrit_project="`grep "project=" ${review} | cut -d '=' -f 2`" - fi - - return 0 -} - -extract_gerrit_port() -{ - if test x"${GERRIT_PORT}" != x; then - gerrit_port="${GERRIT_PORT}" - else - local srcdir=$1 - - if test -e ${srcdir}/.gitreview; then - local review=${srcdir}/.gitreview - else - if test -e ${HOME}/.gitreview; then - local review=${HOME}/.gitreview - else - error "No ${srcdir}/.gitreview file!" - return 1 - fi - fi - - gerrit_port="`grep "port=" ${review} | cut -d '=' -f 2`" - fi - - return 0 -} - -extract_gerrit_username() -{ - local srcdir=$1 - if test -e ${srcdir}/.gitreview; then - local review=${srcdir}/.gitreview - gerrit_username="`grep "username=" ${review} | cut -d '=' -f 2`" - fi - if test x"${gerrit_username}" = x; then - if test -e ${HOME}/.gitreview; then - local review=${HOME}/.gitreview - gerrit_username="`grep "username=" ${review} | cut -d '=' -f 2`" - else - error "No ${srcdir}/.gitreview file!" - fi - fi - if test x"${gerrit_username}" != x; then - gerrit_username="${GERRIT_PATCHSET_UPLOADER_EMAIL}" - fi - - gerrit_branch="${GERRIT_TOPIC}" - gerrit_revision="${GERRIT_PATCHSET_REVISION}" - -} - -add_gerrit_comment () -{ - trace "$*" - - local revision="$1" - local message="`cat $2`" - local code="${3:-0}" - - ssh -p ${gerrit_port} ${gerrit_username}@${gerrit_host} gerrit review --code-review ${code} --message \"${message}\" ${revision} - - return 0 -} - -submit_gerrit() -{ - local message="`cat $1`" - local code="${2:-0}" - local revision="${3:-}" - notice "ssh -p ${gerrit_port} ${gerrit_host} gerrit review --code-review ${code} --message \"${message}\" --submit ${revision}" - - return 0 -} - -# $1 - the version of the toolname -# $2 - the build status, 0 success, 1 failure, 2 no regressions, 3 regressions -# $3 - the file of test results, if any -gerrit_build_status() -{ - if test x"${gerrit}" != xyes; then - return 0 - fi - local srcdir="`get_srcdir $1`" - local status="$2" - local resultsfile="${3:-}" - local revision="`get_git_revision ${srcdir}`" - local msgfile="${local_builds}/${host}/${target}/test-results.txt" - local code="0" - - # Initialize setting for gerrit if not done so already - if test x"${gerrit_username}" = x; then - gerrit_info ${rcdir} - fi - - declare -a statusmsg=("Build was Successful" "Build Failed!" "No Test Failures" "Found Test Failures" "No Regressions found" "Found regressions" "Test run completed") - - rm -f ${msgfile} - cat<<EOF > ${msgfile} -Your patch is being reviewed. The build step has completed with a status of: ${statusmsg[${status}]} Build at: ${jenkins_job_url}" - -EOF - -#http://cbuild.validation.linaro.org/logs/gcc-linaro-5.0.0/ - - add_gerrit_comment ${revision} ${msgfile} ${code} - if test $? -gt 0; then - error "Couldn't add Gerrit comment!" - rm -f ${msgfile} - return 1 - fi - - if test x"${resultsfile}" != x; then - cat ${resultsfile} >> ${msgfile} - fi - - return 0 -} - -# $1 - the key word to look for -# $2 - The query return string in JSON format to seaarch through -gerrit_extract_keyword() -{ - local keyword="$1" - local query="$2" - - local answer="`echo ${query} | grep -o ${keyword}\\":\\"[A-Za-z0-9\ ]*\\" | tr -d '\\"' | cut -d ':' -f 2`" - - echo ${answer} - return 0 -} - -# $1 the array of records -gerrit_get_record() -{ - local pattern="$1" - local records="$2" - local count="${#records[*]}" - for i in `seq 0 34`; do - if test `echo ${records[$i]} | grep -c ${pattern}` -gt 0; then - echo "${records[$i]}" - return 0 - fi - done -} - -# $1 - the toolchain component to query -# $2 - the status to query, default to all open patches -gerrit_query() -{ - local tool=$1 - local status=${2:-status:open} - - # ssh -p 29418 robert.savoye@git.linaro.org gerrit query --current-patch-set ${tool} status:open limit:1 --format JSON - gerrit_username=robert.savoye - ssh -q -x -p ${gerrit_port} ${gerrit_username}@${gerrit_host} gerrit query --current-patch-set ${tool} ${status} --format JSON > /tmp/query$$.txt - local i=0 - declare -a records - while read line - do - records[$i]="echo ${line} | tr -d '\n'" - local i=`expr $i + 1` - done < /tmp/query$$.txt - rm -f /tmp/query$$.txt - - local record="`gerrit_get_record 73e60b77b497f699d8a2a818e2ecaa7ca57e5d1d "${records}"`" - - local revision="`gerrit_extract_keyword "revision" "${records[33]}"`" - - return 0; -} - diff --git a/lib/git-parser.sh b/lib/git-parser.sh deleted file mode 100644 index 7c446a5..0000000 --- a/lib/git-parser.sh +++ /dev/null @@ -1,495 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# NOTICE: This service is most reliable when passed a full URL (including -# service identifier, e.g., lp:, svn://, http://, git://). -# -# The get_git_<part> functions all operate on the same premise: -# -# When given a string that represents a git url or git repository -# identifier (plus branch and/or revision information) they will -# parse the URL for the requested part. -# -# Forms: -# -# get_git_service -# The valid git services are: 'git', 'http' and 'ssh'. -# -# get_git_user -# Valid usernames are: 'username' and 'multi.part.username". -# -# get_git_repo -# The name of the respository including the '.git' suffix. -# -# get_git_tool -# The same as 'repo' but minus the '.git' suffix. -# -# get_git_url -# The full url of the repository, minus branch and/or revision -# information. This is valid for passing to git. -# -# get_git_branch -# The branch designation that follows the repository, e.g., -# binutils.git/branch -# -# get_git_tag -# Return a sanitized string of repository concatenated with optional -# branch and revision information. The branch name has all '/' -# characters converted to '-' characters. -# -# WARNING: A git tag is not parseable by the git parser. It's a one -# way translation to be used for naming entities only. -# -# For example, calling get_git_tag with the following: -# git://foo.com/repo.git~multi/slash/branch -# Will return the following: -# repo.git~multi-slash-branch as the 'tag'. -# -# get_git_revision -# The revision designation that follows the repository, e.g., -# binutils.git@12345 -# -# Note: cbuild allows <repo>.git/branch@revision even though -# when a revision is present, the 'branch' is only used -# in path names, since a revision implies a branch already. -# -# Calling convention: -# -# Because the get_git_<part> functions return a string in stdout -# they must be called in a subshell using the following convention: -# -# local out= -# out="`get_git_<part> <input_string>`" -# if test $? -gt 1; then -# # Parser detected malformed input. Depending on what -# # you expect, this might or might-not be an error. -# elif test x"${out}" = x; then -# # Parser didn't parse the requested part because -# # it probably wasn't in the string OR the input -# # is malformed. -# fi -# -# Return Value -# stdout: Returns the requested string (if parsed) -# $?: Returns the error status code -# stderr: If $? != 0 then this contains information about -# malformed input. -# -# Input String: -# Valid inputs: -# [{git|http}://[<username>@]{<url.foo>|127.0.0.1}/path/]<repo>.git[/<branch>][@<revision] -# -# A full git url with branch and revision information, e.g., -# -# http://firstname.lastname@staging.git.linaro.org/git/toolchain/gcc.git/linaro_4.9_branch@12345 -# -# A git repo identifier with branch and revision information: -# -# gcc.git/linaro_4.9_branch@12345 -# -# Examples: -# -# For examples please see testsuite/git-parser-tests.sh -# - -# This is the internal unified parser function. -# DO NOT USE THIS FUNCTION DIRECTLY. -# Use the get_git_<part> functions. -git_parser() -{ - local part=$1 - local in=$2 - - local service= - local revision= - local numfields= - local numats= - local user= - local url= - local tool= - local repo= - local branch= - - # Set to '1' if something in ${in} is malformed. - local err=0 - - local service="`echo "${in}" | sed -n ' s#\(^git\)://.*#\1#p; s#\(^ssh\)://.*#\1#p; s#\(^http\)://.*#\1#p; s#\(^svn\)://.*#\1#p; s#\(^lp\):[/]*.*#\1#p'`" - - # An http service with /svn in the url is actually an svn service. - if test x"${service}" = x"http" -a "`echo ${in} | egrep -c "\/svn"`" -gt 0; then - service="svn" - fi - - # Do this early because this is called often and we don't need all that - # other parsing in this case. - if test x"${part}" = x"service"; then - # An http service with .git in the url is actually a git service. - if test x"${service}" = x"http" -a "`echo ${in} | egrep -c "\.git"`" -gt 0; then - service="git" - # An ssh service is actually a git service. - elif test x"${service}" = x"ssh"; then - service="git" - fi - echo ${service} - return 0 - fi - - # Just bail out early if this is a launch pad service. - if test x"${service}" = x"lp"; then - case ${part} in - repo) - local repo="" - repo="`echo ${in} | sed -e "s#lp:[/]*##" -e 's:/.*::'`" - echo "${repo}" - ;; - branch) - local hastilde="`echo "${in}" | grep -c '\~'`" - local hasslash="`echo "${in}" | grep -c '\/'`" - if test ${hastilde} -gt 0; then - # Grab everything to the right of the ~ - branch="`echo ${in} | sed -e 's:.*~\(.*\):\1:'`" - elif test ${hasslash} -gt 0; then - branch="`basename ${in}`" - fi - echo ${branch} - # otherwise there's no branch. - ;; - url) - echo "${in}" - ;; - tool) - # Strip service information and any trailing branch information. - local tool="`echo ${in} | sed -e 's/lp://' -e 's:/.*::'`" - # Strip superflous -linaro tags - local tool="`echo ${tool} | sed -e 's:-linaro.*::'`" - echo ${tool} - ;; - *) - ;; - esac - return 0 - fi - - # Just bail out early if this is an svn service. - # This _should_ capture http://<foo>/svn - if test x"${service}" = x"svn"; then - case ${part} in - repo|tool) - # Strip any trailing branch information. - local repo="`echo ${in} | sed -e 's:-[0-9].*::' -e 's:/trunk::'`" - repo="`basename ${repo}`" - echo "${repo}" - ;; - url) - echo "${in}" - ;; - *) - ;; - esac - return 0 - fi - - # This is tarball and it is unique - if test "`echo ${in} | egrep -c "\.tar"`" -gt 0; then - case ${part} in - repo) - local repo="" - repo="`basename ${in}`" - repo="`echo ${repo} | sed -e 's:-[0-9].*::'`" - echo "${repo}" - ;; - url) - echo "${in}" - ;; - tool) - # Strip any trailing branch information. - local tool="`echo ${in} | sed -e 's:-[0-9].*::'`" - # Strip off any -linaro tags. - tool="`echo ${tool} | sed -e 's:-linaro.*::'`" - # Strip service information. - tool="`basename ${tool}`" - echo ${tool} - ;; - tag) - local tag= - tag="`echo ${in} | sed -e 's:\.tar.*::' -e 's:-[0-9][0-9][0-9][0-9]\.[0-9][0-9].*::'`" - echo ${tag} - ;; - *) - ;; - esac - return 0 - fi - - # This will only find a username if it follows the <service>:// - # and precedes the first / in the url. Yes you could - # get away with http://www<user>@.foo.com/. - local user="`echo "${in}" | sed -n "s;^${service}://\([^/]*\)@.*;\1;p"`" - - # This will only find a revision if it is a sequence of - # alphanumerical characters following the last @ in the line. - local revision="`echo "${in}" | sed -n 's/.*@\([[:alnum:]]*$\)/\1/p'`" - - local hasdotgit="`echo "${in}" | grep -c "\.git"`" - local hastilde="`echo "${in}" | grep -c '\~'`" - - # Strip out the <service>::// part. - local noservice="`echo "${in}" | sed -e "s#^${service}://##"`" - - local secondbase= - if test ${hasdotgit} -gt 0; then - local secondbase="`echo "${noservice}" | sed -e 's#.*\([/].*.git\)#\1#' -e 's#^/##' -e 's#@[[:alnum:]|@]*$##'`" - local repo="`echo ${secondbase} | sed -e 's#\(.*\.git\).*#\1#' -e 's#.*/##'`" - - if test ${hastilde} -gt 0; then - local branch="`echo "${secondbase}" | sed -n 's#.*~\(.*\)$#\1#p'`" - if test "`echo ${branch} | grep -c "^/"`" -gt 0; then - error "Malformed input. Superfluous / after ~. Stripping." - err=1 - local branch="`echo "${branch}" | sed -e 's#^/##'`" - fi - else - local branch="`echo ${secondbase} | sed -e 's#.*\.git##' -e 's#^[/]##' -e 's#@[[:alnum:]|@]*$##'`" - fi - elif test ${hastilde} -gt 0 -a ${hasdotgit} -lt 1; then - # If the service is part of the designator then we have to strip - # up to the leading / - if test x"${service}" != x; then - local secondbase="`echo "${noservice}" | sed -e "s#[^/]*/##"`" - else - # Otherwise we process it as if the repo is the leftmost - # element. - local secondbase=${in} - fi - - # We've already processed the revision so strip that (and any trailing - # @ symbols) off. - local secondbase="`echo "${secondbase}" | sed -e 's#@[[:alnum:]|@]*$##'`" - - local branch="`echo "${secondbase}" | sed -n 's#.*~\(.*\)$#\1#p'`" - - if test "`echo ${branch} | grep -c "^/"`" -gt 0; then - error "Malformed input. Superfluous / after ~. Stripping." - err=1 - local branch="`echo "${branch}" | sed -e 's#^/##'`" - fi - - local repo="`echo ${secondbase} | sed -e 's#\(.*\)~.*#\1#' -e 's#.*/##'`" - - # Strip trailing trash introduced by erroneous inputs. - local repo="`echo ${repo} | sed -e 's#[[:punct:]]*$##'`" - else # no .git and no tilde for branches - # Strip off any trailing @<foo> sequences, even erroneous ones. - local secondbase="`echo "${noservice}" | sed -e "s#[^/]*/##" -e 's#@[[:alnum:]|@]*$##'`" - - # If there's not <repo>.git then we can't possibly determine what's - # a branch vs. what's part of the url vs. what's a repository. We - # can only assume it's a repository. - local branch= - - # The repo name is the content right of the rightmost / - local repo="`echo ${secondbase} | sed 's#.*/##'`" - fi - - # Strip trailing trash from the branch left by erroneous inputs. - local branch="`echo ${branch} | sed -e 's#[[:punct:]]*$##'`" - - # The url is everything to the left of, and including the repo name itself. - # Don't pick up any possibly superfluous @<blah> information, and filter - # out any tildes. - #local url="`echo ${in} | sed -n "s#\(.*${repo}\).*#\1#p" | sed -e 's#@[[:alnum:]|@]*$##'`" - local url="`echo ${in} | sed -n "s#\(.*${repo}\).*#\1#p"`" - - # Strip trailing @ symbols from the url. - local url="`echo ${url} | sed -e 's#@[[:alnum:]|@]*$##'`" - - # Strip trailing trash from the url, except leave the http|git:// - if test x"`echo ${url} | grep -e "^${service}://"`" != x; then - local url="`echo ${url} | sed -e "s#^${service}://##"`" - local url="`echo ${url} | sed -e 's#[[:punct:]]*$##'`" - local url="${service}://${url}" - else - # If http|git:// isn't the last thing on the line - # just clean up the trailing trash. - local url="`echo ${url} | sed -e 's#[[:punct:]]*$##'`" - fi - - if test x"${repo}" != x; then - tool="`echo ${repo} | sed -e "s#\.git##"`" - fi - - local validats=0 - if test x"${revision}" != x; then - validats="`expr ${validats} + 1`" - fi - if test x"${user}" != x; then - validats="`expr ${validats} + 1`" - fi - - local numats=0 - # This counts the number of fields separated by the @ symbols - numats=`echo ${in} | awk -F "@" '{ print NF }'` - # Minus one is the number of @ symbols. - numats="`expr ${numats} - 1`" - if test ${numats} -gt ${validats}; then - superfluousats="`expr ${numats} - ${validats}`" - error "Malformed input. Found ${superfluousats} superfluous '@' symbols. NUMATS: ${numats} VALIDATS: ${validats}" - err=1 - fi - - if test x"${url}" = x; then - error "Malformed input. No url found." - err=1 - elif test x"${repo}" = x; then - error "Malformed input. No repo found." - err=1 - fi - - case ${part} in - service) - echo "${service}" - ;; - user) - echo "${user}" - ;; - tool) - # Strip off any -linaro tags. - tool="`echo ${tool} | sed -e 's:-linaro.*::'`" - echo "${tool}" - ;; - url) - echo "${url}" - ;; - repo) - echo "${repo}" - ;; - branch) - echo "${branch}" - ;; - revision) - echo "${revision}" - ;; - *) - error "Unknown part '${part}' requested from input string." - err=1 - ;; - esac - return ${err} -} - -get_git_service() -{ - local in=$1 - local out= - local ret= - out="`git_parser service ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_user() -{ - local in=$1 - local out= - local ret= - out="`git_parser user ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_url() -{ - local in=$1 - local out= - local ret= - out="`git_parser url ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_tool() -{ - local in=$1 - local out= - local ret= - out="`git_parser tool ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_repo() -{ - local in=$1 - local out= - local ret= - out="`git_parser repo ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_branch() -{ - local in=$1 - local out= - local ret= - out="`git_parser branch ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_revision() -{ - local in=$1 - local out= - local ret= - out="`git_parser revision ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -get_git_tag() -{ - local in=$1 - local ret= - local out= - local repo= - local branch= - local revision= - repo="`git_parser repo ${in}`" - ret=$? - if test x"${repo}" = x; then - error "repository name required for meaningful response." - return ${ret} - fi - - branch="`get_git_branch ${in}`" - - # Multi-path branches should have forward slashes replaced with dashes. - branch="`echo ${branch} | sed 's:/:-:g'`" - - revision="`git_parser revision ${in}`" - echo "${repo}${branch:+~${branch}}${revision:+@${revision}}" - return 0 -} diff --git a/lib/globals.sh b/lib/globals.sh deleted file mode 100644 index d50bdb6..0000000 --- a/lib/globals.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# These store all the data used for this test run that can be overwritten by -# command line options. - -# Start by assuming it's a native build -build="${build}" -host="${build}" -target="${host}" - -gcc="`which gcc`" -host_gcc_version="`${gcc} -v 2>&1 | tail -1`" -binutils="default" -# This is the default clibrary and can be overridden on the command line. -clibrary="eglibc" -snapshots="default" -configfile="default" -dbuser="default" -dbpasswd="default" - -# Don't set this unless you need to modify it. -default_march= - -manifest= - -# The prefix for installing the toolchain -prefix= - -# The default timeout. If you're on a wireless network this -# might not be sufficient and can be overridden at the command -# line. -wget_timeout=10 -wget_quiet= -# Try something like "dot:mega" -wget_progress_style= - -# This doesn't do any real work, just prints the configure options and make commands -dryrun=no - -# -launchpad_id= -svn_id= - -# config values for the build machine -libc_version= -kernel= -build_arch=${build_arch:+${build_arch}} -hostname= -distribution= - -# These are options flags to pass to make, usually just -j N as set by --parallel -make_flags= - -# These can be changed by environment variables -if test x"${SNAPSHOTS_URL}" != x -o x"${CBUILD_SNAPSHOTS}" != x; then - snapshots="${SNAPSHOTS_URL}" -fi -if test x"${CBUILD_DBUSER}" != x; then - dbuser="${CBUILD_DBUSER}" -fi -if test x"${CBUILD_DBPASSWD}" != x; then - dbpasswd="${CBUILD_DBPASSWD}" -fi - -clobber=no -force=no -interactive=no -nodepends=no -verbose=1 -network="" -runtests=no -ccache=no -gerrit=no - -release="" -with_packages="toolchain,sysroot,gdb" -building=yes - -override_cflags= -override_ldflags= -override_runtestflags= - -if test x"${BUILD_NUMBER}" = x; then - export BUILD_NUMBER=${RANDOM} -fi - -gerrit_host="review.linaro.org" -gerrit_port="29418" -gerrit_username="" -gerrit_project="" -gerrit_branch="" -gerrit_revision="" -gerrit_change_subject="" -gerrit_change_id="" -gerrit_change_number="" -gerrit_event_type="" -jenkins_job_name="" -jenkins_job_url="" - -# source a user specific config file for commonly used configure options. -# These overide any of the above values. -if test -e ~/.cbuildrc; then - . ~/.cbuildrc -fi - diff --git a/lib/make.sh b/lib/make.sh deleted file mode 100755 index 0d600ae..0000000 --- a/lib/make.sh +++ /dev/null @@ -1,839 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# This performs all the steps to build a full cross toolchain -build_all() -{ - trace "$*" - - # Turn off dependency checking, as everything is handled here - nodepends=yes - - # Specify the components, in order to get a full toolchain build - if test x"${target}" != x"${build}"; then - local builds="infrastructure linux binutils stage1 libc stage2 gdb" - if test "`echo ${target} | grep -c -- -none-`" -eq 0; then - local builds="${builds} gdbserver" - fi - notice "Buildall: Building \"${builds}\" for cross target ${target}." - else - local builds="infrastructure linux binutils stage2 gdb" # native build - notice "Buildall: Building \"${builds}\" for native target ${target}." - fi - - # See if specific component versions were specified at runtime - if test x"${gcc_version}" = x; then - gcc_version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - fi - if test x"${binutils_version}" = x; then - binutils_version="`grep ^latest= ${topdir}/config/binutils.conf | cut -d '\"' -f 2`" - fi - if test x"${eglibc_version}" = x; then - eglibc_version="`grep ^latest= ${topdir}/config/eglibc.conf | cut -d '\"' -f 2`" - fi - if test x"${newlib_version}" = x; then - newlib_version="`grep ^latest= ${topdir}/config/newlib.conf | cut -d '\"' -f 2`" - libgloss_version="`grep ^latest= ${topdir}/config/newlib.conf | cut -d '\"' -f 2`" - fi - if test x"${glibc_version}" = x; then - glibc_version="`grep ^latest= ${topdir}/config/glibc.conf | cut -d '\"' -f 2`" - fi - - if test x"${gdb_version}" = x; then - gdb_version="`grep ^latest= ${topdir}/config/gdb.conf | cut -d '\"' -f 2`" - fi - - if test x"${linux_version}" = x; then - linux_version="`grep ^latest= ${topdir}/config/linux.conf | cut -d '\"' -f 2`" - fi - - # cross builds need to build a minimal C compiler, which after compiling - # the C library, can then be reconfigured to be fully functional. - - local build_all_ret= - - # Checkout all the sources - checkout_all - - # build each component - for i in ${builds}; do - notice "Building all, current component $i" - # If an interactive build, stop betweeen each step so we can - # check the build and config options. - if test x"${interactive}" = x"yes"; then - echo "Hit any key to continue..." - read answer - fi - case $i in - infrastructure) - infrastructure - build_all_ret=$? - ;; - # Build stage 1 of GCC, which is a limited C compiler used to compile - # the C library. - libc) - if test x"${clibrary}" = x"eglibc"; then - build ${eglibc_version} - elif test x"${clibrary}" = x"glibc"; then - build ${glibc_version} - elif test x"${clibrary}" = x"newlib"; then - build ${newlib_version} - build ${newlib_version} libgloss - else - error "\${clibrary}=${clibrary} not supported." - return 1 - fi - build_all_ret=$? - ;; - stage1) - build ${gcc_version} stage1 - build_all_ret=$? - # Don't create the sysroot if the clibrary build didn't succeed. - if test ${build_all_ret} -lt 1; then - # If we don't install the sysroot, link to the one we built so - # we can use the GCC we just built. - # FIXME: if ${dryrun} ${target}-gcc doesn't exist so this will error. - local sysroot="`${target}-gcc -print-sysroot`" - if test ! -d ${sysroot}; then - dryrun "mkdir -p /opt/linaro" - dryrun "ln -sfnT ${cbuild_top}/sysroots/${target} ${sysroot}" - fi - fi - ;; - # Build stage 2 of GCC, which is the actual and fully functional compiler - stage2) - build ${gcc_version} stage2 - build_all_ret=$? - ;; - gdb) - build ${gdb_version} - build_all_ret=$? - ;; - gdbserver) - build ${gdb_version} gdbserver - build_all_ret=$? - ;; - linux) - build ${linux_version} - build_all_ret=$? - ;; - # Build anything not GCC or infrastructure - *) - build ${binutils_version} - build_all_ret=$? - ;; - esac - #if test $? -gt 0; then - if test ${build_all_ret} -gt 0; then - error "Failed building $i." - return 1 - fi - done - - manifest ${local_builds}/${host}/${target}/manifest.txt - - # Notify that the build completed successfully - build_success - - if test x"${gerrit}" = xyes -a x"${runtests}" = xyes; then - local sumsfile="/tmp/sums$$.txt" - local sums="`find ${local_builds}/${host}/${target} -name \*.sum`" - for i in ${sums}; do - local lineno="`grep -n -- "Summary" $i | grep -o "[0-9]*"`" - local lineno="`expr ${lineno} - 2`" - sed -e "1,${lineno}d" $i >> ${sumsfile} - local status="`grep -c unexpected $i`" - if test ${status} -gt 0; then - local hits="yes" - fi - done - if test x"${hits}" = xyes; then - gerrit_build_status ${gcc_version} 3 ${sumsfile} - else - gerrit_build_status ${gcc_version} 2 - fi - fi - rm -f ${sumsfile} - - if test x"${runtests}" = xyes; then - notice "Testing components" - buildingall=no - make_check ${binutils_version} - make_check ${gcc_version} stage2 - make_check ${gdb_version} - fi - - # Notify that the test run completed successfully - test_success - - if test x"${tarsrc}" = x"yes"; then - if test "`echo ${with_packages} | grep -c toolchain`" -gt 0; then - release_binutils_src - release_gcc_src - fi - if test "`echo ${with_packages} | grep -c gdb`" -gt 0; then - release_gdb_src - fi - fi - - if test x"${tarbin}" = x"yes"; then - # Delete any previous release files - # First delete the symbolic links first, so we don't delete the - # actual files - dryrun "rm -fr /tmp/linaro.*/*-tmp /tmp/linaro.*/runtime*" - dryrun "rm -f /tmp/linaro.*/*" - # delete temp files from making the release - dryrun "rm -fr /tmp/linaro.*" - - if test "`echo ${with_packages} | grep -c toolchain`" -gt 0; then - if test x"${clibrary}" != x"newlib"; then - binary_runtime - fi - binary_toolchain - fi - if test "`echo ${with_packages} | grep -c sysroot`" -gt 0; then - binary_sysroot - fi -# if test "`echo ${with_packages} | grep -c gdb`" -gt 0; then -# binary_gdb -# fi - notice "Packaging took ${SECONDS} seconds" - if test x"${runtests}" = xyes; then - test_binary_toolchain - notice "Testing packaging took ${SECONDS} seconds" - fi - fi - - return 0 -} - -build() -{ - trace "$*" - - # gitinfo contains the service://url~branch@revision - local gitinfo="`get_source $1`" - if test -z "${gitinfo}"; then - error "No matching source found for \"$1\"." - return 1 - fi - - # The git parser functions shall return valid results for all - # services, especially once we have a URL. - - # tag is a sanitized string that's only used for naming and information - # because it can't be reparsed by the parser (since '/' characters are - # converted to '-' characters in branch names. - local tag= - tag="`get_git_tag ${gitinfo}`" - - local srcdir="`get_srcdir ${gitinfo} ${2:+$2}`" - - local stamp= - stamp="`get_stamp_name build ${gitinfo} ${2:+$2}`" - - local builddir="`get_builddir ${gitinfo} ${2:+$2}`" - - # The stamp is in the buildir's parent directory. - local stampdir="`dirname ${builddir}`" - - notice "Building ${tag}${2:+ $2}" - - # If this is a native build, we always checkout/fetch. If it is a - # cross-build we only checkout/fetch if this is stage1 - if test x"${target}" = x"${build}" \ - -o "${target}" != x"${build}" -a x"$2" != x"stage2"; then - if test `echo ${gitinfo} | egrep -c "^bzr|^svn|^git|^ssh|^lp|^http|^git|\.git"` -gt 0; then - # Don't update the compiler sources between stage1 and stage2 builds if this - # is a cross build. - notice "Checking out ${tag}${2:+ $2}" - checkout ${gitinfo} ${2:+$2} - if test $? -gt 0; then - warning "Sources not updated, network error!" - fi - else - # Don't update the compiler sources between stage1 and stage2 builds if this - # is a cross build. - fetch ${gitinfo} - if test $? -gt 0; then - error "Couldn't fetch tarball ${gitinfo}" - return 1 - fi - extract ${gitinfo} - if test $? -gt 0; then - error "Couldn't extract tarball ${gitinfo}" - return 1 - fi - fi - fi - - # We don't need to build if the srcdir has not changed! We check the - # build stamp against the timestamp of the srcdir. - local ret= - check_stamp "${stampdir}" ${stamp} ${srcdir} build ${force} - ret=$? - if test $ret -eq 0; then - if test x"${runtests}" != xyes; then - return 0 - fi - elif test $ret -eq 255; then - # Don't proceed if the srcdir isn't present. What's the point? - return 1 - warning "no source dir for the stamp!" - fi - - if test x"${building}" != xno; then - notice "Configuring ${tag}${2:+ $2}" - configure_build ${gitinfo} $2 - if test $? -gt 0; then - error "Configure of $1 failed!" - return $? - fi - - # Clean the build directories when forced - if test x"${force}" = xyes; then - make_clean ${gitinfo} $2 - if test $? -gt 0; then - return 1 - fi - fi - - # Finally compile and install the libaries - make_all ${gitinfo} $2 - if test $? -gt 0; then - return 1 - fi - - # Build the documentation, unless it has been disabled at the command line. - if test x"${make_docs}" = xyes; then - make_docs ${gitinfo} $2 - if test $? -gt 0; then - return 1 - fi - else - notice "Skipping make docs as requested (check host.conf)." - fi - - # Install, unless it has been disabled at the command line. - if test x"${install}" = xyes; then - make_install ${gitinfo} $2 - if test $? -gt 0; then - return 1 - fi - else - notice "Skipping make install as requested (check host.conf)." - fi - - # See if we can compile and link a simple test case. - if test x"$2" = x"stage2" -a x"${clibrary}" != x"newlib"; then - dryrun "(hello_world)" - if test $? -gt 0; then - error "Hello World test failed for ${gitinfo}..." - return 1 - else - notice "Hello World test succeeded for ${gitinfo}..." - fi - fi - - create_stamp "${stampdir}" "${stamp}" - - notice "Done building ${tag}${2:+ $2}, took ${SECONDS} seconds" - - # For cross testing, we need to build a C library with our freshly built - # compiler, so any tests that get executed on the target can be fully linked. - fi - - if test x"${runtests}" = xyes -a x"${tool}" != x"eglibc" -a x"${tarbin}" != xyes; then - if test x"$2" != x"stage1" -a x"$2" != x"gdbserver"; then - if test x"${buildingall}" = xno; then - notice "Starting test run for ${tag}${2:+ $2}" - make_check ${gitinfo}${2:+ $2} - if test $? -gt 0; then - return 1 - fi - fi - fi - fi - - return 0 -} - -make_all() -{ - trace "$*" - - local tool="`get_toolname $1`" - - # Linux isn't a build project, we only need the headers via the existing - # Makefile, so there is nothing to compile. - if test x"${tool}" = x"linux"; then - local srcdir="`get_srcdir $1 ${2:+$2}`" - if test `echo ${target} | grep -c aarch64` -gt 0; then - dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm64 INSTALL_HDR_PATH=${sysroots}/usr" - elif test `echo ${target} | grep -c i.86` -gt 0; then - dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=i386 INSTALL_HDR_PATH=${sysroots}/usr" - elif test `echo ${target} | grep -c x86_64` -gt 0; then - dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=x86_64 INSTALL_HDR_PATH=${sysroots}/usr" - elif test `echo ${target} | grep -c arm` -gt 0; then - dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm INSTALL_HDR_PATH=${sysroots}/usr" - else - warning "Unknown arch for make headers_install!" - return 1 - fi - if test $? != "0"; then - warning "Make headers_install failed!" - return 1 - fi - return 0 - fi - - # FIXME: This should be a URL - local builddir="`get_builddir $1 ${2:+$2}`" - notice "Making all in ${builddir}" - - if test x"${parallel}" = x"yes" -a "`echo ${tool} | grep -c glibc`" -eq 0; then - local make_flags="${make_flags} -j ${cpus}" - fi - - # Use pipes instead of /tmp for temporary files. - if test x"${override_cflags}" != x -a x"${tool}" != x"eglibc"; then - local make_flags="${make_flags} CFLAGS_FOR_BUILD=\"-pipe -g -O2\" CFLAGS=\"${override_cflags}\" CXXFLAGS=\"${override_cflags}\" CXXFLAGS_FOR_BUILD=\"-pipe -g -O2\"" - else - local make_flags="${make_flags} CFLAGS_FOR_BUILD=\"-pipe -g -O2\" CXXFLAGS_FOR_BUILD=\"-pipe -g -O2\"" - fi - - if test x"${override_ldflags}" != x; then - local make_flags="${make_flags} LDFLAGS=\"${override_ldflags}\"" - fi - - if test x"${use_ccache}" = xyes -a x"${build}" = x"${host}"; then - local make_flags="${make_flags} CC='ccache gcc' CXX='ccache g++'" - fi - - # All tarballs are statically linked - if test x"${tarbin}" = x"yes"; then - local make_flags="${make_flags} LDFLAGS_FOR_BUILD=\"-static-libgcc\" -C ${builddir}" - fi - - # Some components require extra flags to make: we put them at the end so that config files can override - local default_makeflags="`read_config $1 default_makeflags`" - - if test x"${tool}" = x"gdb" -a x"$2" == x"gdbserver"; then - default_makeflags="gdbserver CFLAGS=--sysroot=${local_builds}/sysroot-${target}" - fi - - if test x"${default_makeflags}" != x; then - local make_flags="${make_flags} ${default_makeflags}" - fi - - if test x"${CONFIG_SHELL}" = x; then - export CONFIG_SHELL=${bash_shell} - fi - - if test x"${make_docs}" != xyes; then - local make_flags="${make_flags} BUILD_INFO=\"\" MAKEINFO=echo" - fi - local makeret= - # GDB and Binutils share the same top level files, so we have to explicitly build - # one or the other, or we get duplicates. - local logfile="${builddir}/make-${tool}.log" - dryrun "make SHELL=${bash_shell} -w -C ${builddir} ${make_flags} 2>&1 | tee ${logfile}" - local makeret=$? - -# local errors="`dryrun \"egrep '[Ff]atal error:|configure: error:|Error' ${logfile}\"`" -# if test x"${errors}" != x -a ${makeret} -gt 0; then -# if test "`echo ${errors} | egrep -c "ignored"`" -eq 0; then -# error "Couldn't build ${tool}: ${errors}" -# exit 1 -# fi -# fi - - # Make sure the make.log file is in place before grepping or the -gt - # statement is ill formed. There is not make.log in a dryrun. -# if test -e "${builddir}/make-${tool}.log"; then -# if test `grep -c "configure-target-libgcc.*ERROR" ${logfile}` -gt 0; then -# error "libgcc wouldn't compile! Usually this means you don't have a sysroot installed!" -# fi -# fi - if test ${makeret} -gt 0; then - warning "Make had failures!" - return 1 - fi - - return 0 -} - -# Print path to dynamic linker in sysroot -# $1 -- sysroot path -find_dynamic_linker() -{ - local sysroots="$1" - local dynamic_linker c_library_version - - # Programmatically determine the embedded glibc version number for - # this version of the clibrary. - c_library_version="`${sysroots}/usr/bin/ldd --version | head -n 1 | sed -e "s/.* //"`" - dynamic_linker="`find ${sysroots} -type f -name ld-${c_library_version}.so`" - if [ -z "$dynamic_linker" ]; then - error "Couldn't find dynamic linker ld-${c_library_version}.so in ${sysroots}" - exit 1 - fi - echo "$dynamic_linker" -} - -make_install() -{ - trace "$*" - - if test x"${parallel}" = x"yes" -a "`echo ${tool} | grep -c glibc`" -eq 0; then - local make_flags="${make_flags} -j $((2*${cpus}))" - fi - - local tool="`get_toolname $1`" - if test x"${tool}" = x"linux"; then - return 0 - fi - - - # Use LSB to produce more portable binary releases. - if test x"${LSBCC}" != x -a x"${LSBCXX}" != x -a x"${tarbin}" = x"yes"; then - case ${tool} in - binutils|gdb|gcc) - export LSB_SHAREDLIBPATH=${builddir} - local make_flags="${make_flags} CC=${LSBCC} CXX=${LSBCXX}" - ;; - *) - ;; - esac - fi - - local builddir="`get_builddir $1 ${2:+$2}`" - notice "Making install in ${builddir}" - - if test "`echo ${tool} | grep -c glibc`" -gt 0; then - local make_flags=" install_root=${sysroots} ${make_flags} LDFLAGS=-static-libgcc PARALLELMFLAGS=\"-j ${cpus}\"" - fi - - if test x"${override_ldflags}" != x; then - local make_flags="${make_flags} LDFLAGS=\"${override_ldflags}\"" - fi - - # NOTE: $make_flags is dropped, as newlib's 'make install' doesn't - # like parallel jobs. We also change tooldir, so the headers and libraries - # get install in the right place in our non-multilib'd sysroot. - if test x"${tool}" = x"newlib"; then - # as newlib supports multilibs, we force the install directory to build - # a single sysroot for now. FIXME: we should not disable multilibs! - local make_flags=" tooldir=${sysroots}/usr/" - if test x"$2" = x"libgloss"; then - local make_flags="${make_flags} install-rdimon" - if test `echo ${target} | grep -c aarch64` -gt 0; then - local builddir="${builddir}/aarch64" - else - local builddir="${builddir}/arm" - fi - fi - fi - - if test x"${make_docs}" != xyes; then - export BUILD_INFO="" - fi - - # Don't stop on CONFIG_SHELL if it's set in the environment. - if test x"${CONFIG_SHELL}" = x; then - export CONFIG_SHELL=${bash_shell} - fi - - local default_makeflags="`read_config $1 default_makeflags | sed -e 's:\ball-:install-:g'`" - if test x"${tool}" = x"gdb" ; then - if test x"$2" != x"gdbserver" ; then - dryrun "make install-gdb ${make_flags} ${default_makeflags} -i -k -w -C ${builddir} 2>&1 | tee ${builddir}/install.log" - else - dryrun "make install ${make_flags} -i -k -w -C ${builddir} 2>&1 | tee ${builddir}/install.log" - fi - else - dryrun "make install ${make_flags} ${default_makeflags} -i -k -w -C ${builddir} 2>&1 | tee ${builddir}/install.log" - fi - if test $? != "0"; then - warning "Make install failed!" - return 1 - fi - - if test x"${tool}" = x"gcc"; then - local libs="`find ${builddir}/${target} -name \*.so\* -o -name \*.a`" - if test ! -e ${sysroots}/usr/lib; then - dryrun "mkdir -p ${sysroots}/usr/lib/" - fi - dryrun "rsync -av ${libs} ${sysroots}/usr/lib/" - fi - - if test "`echo ${tool} | grep -c glibc`" -gt 0 -a "`echo ${target} | grep -c aarch64`" -gt 0; then - local dynamic_linker - dynamic_linker="$(find_dynamic_linker "$sysroots")" - local dynamic_linker_name="`basename ${dynamic_linker}`" - - # aarch64 is 64 bit, so doesn't populate sysroot/lib, which unfortunately other - # things look for shared libraries in. - dryrun "rsync -a ${sysroots}/lib/ ${sysroots}/lib64/" - dryrun "rm -rf ${sysroots}/lib" - dryrun "ln -sfnT ${sysroots}/lib64 ${sysroots}/lib" -# dryrun "(mv ${sysroots}/lib/ld-linux-aarch64.so.1 ${sysroots}/lib/ld-linux-aarch64.so.1.symlink)" - dryrun "(rm -f ${sysroots}/lib/ld-linux-aarch64.so.1)" - dryrun "ln -sfnT ${dynamic_linker_name} ${sysroots}/lib64/ld-linux-aarch64.so.1" - fi - - # FIXME: this is a seriously ugly hack required for building Canadian Crosses. - # Basically the gcc/auto-host.h produced when configuring GCC stage2 has a - # conflict as sys/types.h defines a typedef for caddr_t, and autoheader screws - # up, and then tries to redefine caddr_t yet again. We modify the installed - # types.h instead of the one in the source tree to be a tiny bit less ugly. - if test "`echo ${tool} | grep -c glibc`" -gt 0 -a `echo ${host} | grep -c mingw` -eq 1; then - sed -i -e '/typedef __caddr_t caddr_t/d' ${sysroots}/usr/include/sys/types.h - fi - - return 0 -} - -# Run the testsuite for the component. By default, this runs the testsuite -# using the freshly built executables in the build tree. It' also possible -# to run the testsuite on installed tools, so we can test out binary releases. -# For binutils, use check-DEJAGNU. -# For GCC, use check-gcc-c, check-gcc-c++, or check-gcc-fortran -# GMP uses check-mini-gmp, MPC and MPFR appear to only test with the freshly built -# components. -# -# $1 - The component to test -make_check_installed() -{ - trace "$*" - - local tool="`get_toolname $1`" - if test x"${builddir}" = x; then - local builddir="`get_builddir $1 ${2:+$2}`" - fi - notice "Making check in ${builddir}" - - # TODO: - # extract binary tarball - # If build tree exists, then 'make check' there. - # if no build tree, untar the matching source release, configure it, and - # then run 'make check'. - - local tests="" - case $1 in - binutils*) - # these - local builddir="`get_builddir ${binutils_version} ${2:+$2}`" - dryrun "make -C ${builddir}/gas check-DEJAGNU RUNTESTFLAGS=${runtest_flags} ${make_flags} -w -i -k 2>&1 | tee ${builddir}/check-binutils.log" - dryrun "make -C ${builddir}/ld check-DEJAGNU RUNTESTFLAGS=${runtest_flags} ${make_flags} -w -i -k 2>&1 | tee -a ${builddir}/check-binutils.log" - ;; - gcc*) - local builddir="`get_builddir ${gcc_version} ${2:+$2}`" - for i in "c c++"; do - dryrun "make -C ${builddir} check-gcc=$i RUNTESTFLAGS=${runtest_flags} ${make_flags} -w -i -k 2>&1 | tee -a ${builddir}/check-$i.log" - done - ;; - *libc*) - ;; - newlib*) - ;; - gdb*) - ;; - *) - ;; - esac - - return 0 -} - -# Run the testsuite for the component. By default, this runs the testsuite -# using the freshly built executables in the build tree. It' also possible -# $1 - The component to test -# $2 - If set to anything, installed tools are used' -make_check() -{ - trace "$*" - - local tool="`get_toolname $1`" - local builddir="`get_builddir $1 ${2:+$2}`" - - # Some tests cause problems, so don't run them all unless - # --enable alltests is specified at runtime. - local ignore="dejagnu gmp mpc mpfr make eglibc linux" - for i in ${ignore}; do - if test x"${tool}" = x$i -a x"${alltests}" != xyes; then - return 0 - fi - done - notice "Making check in ${builddir}" - -# if test x"$2" != x; then -# make_check_installed -# return 0 -# fi - - # Use pipes instead of /tmp for temporary files. - if test x"${override_cflags}" != x -a x"$2" != x"stage2"; then - local make_flags="${make_flags} CFLAGS_FOR_BUILD=\"${override_cflags}\" CXXFLAGS_FOR_BUILD=\"${override_cflags}\"" - else - local make_flags="${make_flags} CFLAGS_FOR_BUILD=-\"-pipe\" CXXFLAGS_FOR_BUILD=\"-pipe\"" - fi - - if test x"${override_ldflags}" != x; then - local make_flags="${make_flags} LDFLAGS_FOR_BUILD=\"${override_ldflags}\"" - fi - - if test x"${override_runtestflags}" != x; then - local make_flags="${make_flags} RUNTESTFLAGS=\"${override_runtestflags}\"" - fi - - if test x"${parallel}" = x"yes"; then - local make_flags="${make_flags} -j ${cpus}" - fi - - # load the config file for Linaro build farms - export DEJAGNU=${topdir}/config/linaro.exp - - local checklog="${builddir}/check-${tool}.log" - if test x"${build}" = x"${target}" -a x"${tarbin}" != x"yes"; then - dryrun "make check RUNTESTFLAGS=\"${runtest_flags}\" ${make_flags} -w -i -k -C ${builddir} 2>&1 | tee ${checklog}" - else - case ${tool} in - binutils) - local dirs="/binutils /ld /gas" - local check_targets="check-DEJAGNU" - ;; - gdb) - local dirs="/gdb" - local check_targets="check-gdb" - ;; -# gcc) -# local dirs="/gcc" -# local check_targets="check-gcc check-c++ check-gfortran check-go check-target-libstdc++-v3 check-target-libgomp" -# ;; - *) - local dirs="/" - local check_targets="check" - ;; - esac - - for i in ${dirs}; do - dryrun "make ${check_targets} SYSROOT_UNDER_TEST=${sysroots} PREFIX_UNDER_TEST=\"${local_builds}/destdir/${host}/bin/${target}-\" RUNTESTFLAGS=\"${runtest_flags}\" ${make_flags} -w -i -k -C ${builddir}$i 2>&1 | tee ${checklog}" - done - fi - - return 0 -} - -make_clean() -{ - trace "$*" - - builddir="`get_builddir $1 ${2:+$2}`" - notice "Making clean in ${builddir}" - - if test x"$2" = "dist"; then - dryrun "make distclean ${make_flags} -w -i -k -C ${builddir}" - else - dryrun "make clean ${make_flags} -w -i -k -C ${builddir}" - fi - if test $? != "0"; then - warning "Make clean failed!" - #return 1 - fi - - return 0 -} - -make_docs() -{ - trace "$*" - - local builddir="`get_builddir $1 ${2:+$2}`" - - notice "Making docs in ${builddir}" - - case $1 in - *binutils*) - # the diststuff target isn't supported by all the subdirectories, - # so we build both all targets and ignore the error. - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir}/bfd diststuff install-man install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir}/ld diststuff install-man install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir}/gas diststuff install-man install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir}/gprof diststuff install-man install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - return $? - ;; - *gdb*) - dryrun "make SHELL=${bash_shell} ${make_flags} -i -k -w -C ${builddir}/gdb diststuff install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - return $? - ;; - *gcc*) - #dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} doc html info man 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -i -k -w -C ${builddir} install-html install-info 2>&1 | tee -a ${builddir}/makedoc.log" - return $? - ;; - *linux*|*dejagnu*|*gmp*|*mpc*|*mpfr*|*newlib*|*make*) - # the regular make install handles all the docs. - ;; - *libc*) # including eglibc - #dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} info dvi pdf html 2>&1 | tee -a ${builddir}/makedoc.log" - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} info html 2>&1 | tee -a ${builddir}/makedoc.log" - return $? - ;; - *) - dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} info man 2>&1 | tee -a ${builddir}/makedoc.log" - return $? - ;; - esac - - return 0 -} - -# See if we can link a simple executable -hello_world() -{ - trace "$*" - - if test ! -e /tmp/hello.cpp; then - # Create the usual Hello World! test case - cat <<EOF > /tmp/hello.cpp -#include <iostream> -int -main(int argc, char *argv[]) -{ - std::cout << "Hello World!" << std::endl; -} -EOF - fi - - # See if a test case compiles to a fully linked executable. Since - # our sysroot isn't installed in it's final destination, pass in - # the path to the freshly built sysroot. - if test x"${build}" != x"${target}"; then - dryrun "${target}-g++ --sysroot=${sysroots} -o /tmp/hi /tmp/hello.cpp" - if test -e /tmp/hi; then - rm -f /tmp/hi - else - return 1 - fi - fi - - return 0 -} - diff --git a/lib/merge.sh b/lib/merge.sh deleted file mode 100644 index 83fadc9..0000000 --- a/lib/merge.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# FIXME: this is a hack while in development. These need to be configurable -trunk_top=/linaro/src/gnu/gcc/trunk -merge_top=/linaro/src/linaro/merges -bzr_top=/linaro/src/linaro/merges/bzr-branches - -# $1 - The version number to diff -merge_diff() -{ - # cleanup leftover files - notice "Making a diff from merge-r$1" - rm -f ${bzr_top}/merge-$1.diff.txt - diff -ruNp -x '*.patch' -x '*.svn' -x '*~' -x '*.bzr' -x '*.rej' -x '*.orig' -x '*.edited' -x '*diff.txt' -x '*.log' -x 'x' -x '*merge-left*' -x '*merge-right*' -x "*.working" -x '*/.gitignore' 4.8-branch ${merge_top}/merge-r$1 > ${bzr_top}/merge-r$1.diff.txt - - # revert the bzr source tree so we get a clean patch - notice "Reverting previous changes" - (cd ${bzr_top}/merge-r$1 && bzr revert) - - notice "Patching ${bzr_top}/merge-r$1" - patch --force --directory ${bzr_top}/merge-r$1 -p1 < ${bzr_top}/merge-r$1.diff.txt - - add="`grep '^A' ${merge_top}/merge-r$1/merge.log | cut -d ' ' -f 5`" - for i in ${add}; do - notice "Adding $i to ${merge_top}/merge-r$1" - cp ${merge_top}/merge-r$1/$i ${bzr_top}/merge-r$1/$i - bzr add ${bzr_top}/merge-r$1/$i - done -} - -# $1 - The version number to merge -merge_prep() -{ - if test ! -e ${merge_top}/merge-r$1; then -# svn checkout svn+ssh://${svn_id}@gcc.gnu.org/svn/gcc/branches/linaro/gcc-$i-branch $1-branch -# fi - - # svn checkout svn+ssh://${gccsvn_id}@gcc.gnu.org/svn/gcc/branches/gcc-$1-branch $1-branch - notice "Cloning source tree into branch merge-r$1" - cp -r ${merge_top}/4.8-branch ${merge_top}/merge-r$1 - fi - -# bzr branch lp:gcc-linaro/4.8 merge-$1 -} - -# $1 - revision in trunk -# $2 - branch to get revision from -# -merge_branch() -{ - # make sure the branch exists - merge_prep $1 - - notice "Merging revision from trunk: $1" - - if test ! -e ${merge_top}/merge-r$1/merge.log; then - #conflicts="`svn merge --accept postpone -c $1 /linaro/src/gnu/gcc/trunk`" - (cd ${merge_top}/merge-r$1 && svn merge --accept postpone -c $1 ${trunk_top} 2>&1 | tee ${merge_top}/merge-r$1/merge.log) - fi - - notice "Looking for merge conflicts..." - #conflicts="`svn status | grep "^C"`" - conflicts="`grep "^C" ${merge_top}/merge-r$1/merge.log | sed -e 's:^C *: :' | tr -d '\n'`" - notice "Conflicts: ${conflicts}" - - for i in ${conflicts}; do - notice "Resolving conflict: $i" - year="`date +%Y`" - month="`date +%m`" - day="`date +%d`" - - # If no email address is in ~/.cbuildrc, create one - if test x"${email}" = x; then - email="${LOGNAME}@`hostname`" - fi - if test x"${fullname}" = x; then - fullname="`grep ^${LOGNAME} /etc/passwd | cut -d ':' -f 5 | sed -e 's:,*::g'`" - fi - # reset the list - problems="" - - # Delete the old files - rm -f ${merge_top}/merge-r$1/problems.txt - rm -f ${merge_top}/merge-r$1/merge.patch - # We don't want to edit the ChangeLog, merges go in ChangeLog.linaro. - # Start by making a new ChangeLog entry for this merge, and append - # the entry from trunk for the commit, followed by the rest of the - # ChangeLog.linaro file. - if test `echo $i | grep -c ChangeLog` -eq 1; then - echo "${year}-${month}-${day} ${fullname} <${email}>" > ${merge_top}/merge-r$1/header.patch - echo "" >> ${merge_top}/merge-r$1/header.patch - # some of these echoes have embedded TABs - echo " Backport from trunk $1" >> ${merge_top}/merge-r$1/header.patch - - # We can't do a normal patch operation, as it always has problems. So - # munge the raw patch to the text equivalent, where we manually add - # it to the top of the ChangeLog.linaro file. - if test ! -e ${merge_top}/merge-r$1/diff.txt; then - svn diff -c $1 ${trunk_top}/$i 2>&1 > ${merge_top}/merge-r$1/diff.txt - fi - grep "^\+" ${merge_top}/merge-r$1/diff.txt | sed -e 's:^\+::' | grep -v "revision" 2>&1 > ${merge_top}/merge-r$1/body.patch - # So this mess is because if the last commit is by he same person as - # the previous one, it puts it at the end of the mergke patch, instead - # of under the backport - author="`grep -n ".*<.*@.*>" ${merge_top}/merge-r$1/body.patch | cut -d ':' -f 1 | tail -1`" - if test x"${author}" = x; then - author=0 - fi - if test ${author} -gt 1; then - author="`tail -2 ${merge_top}/merge-r$1/body.patch`" - lines="`wc -l ${merge_top}/merge-r$1/body.patch | cut -d ' ' -f 1`" - keep="`expr ${lines} - 2`" - cat ${merge_top}/merge-r$1/header.patch > ${merge_top}/merge-r$1/merge.patch - echo " ${author}" >> ${merge_top}/merge-r$1/merge.patch - sed -e "${keep},${lines}d" ${merge_top}/merge-r$1/body.patch >> ${merge_top}/merge-r$1/merge.patch - head -n ${keep} ${merge_top}/merge-r$1/body.patch >> ${merge_top}/merge-r$1/merge.patch - else - cat ${merge_top}/merge-r$1/header.patch > ${merge_top}/merge-r$1/merge.patch - echo -n " " >> ${merge_top}/merge-r$1/merge.patch - cat ${merge_top}/merge-r$1/body.patch >> ${merge_top}/merge-r$1/merge.patch - fi - mv ${merge_top}/merge-r$1/$i.linaro ${merge_top}/merge-r$1/$i.linaro.orig - cat ${merge_top}/merge-r$1/merge.patch > ${merge_top}/merge-r$1/$i.linaro - cat ${merge_top}/merge-r$1/$i.linaro.orig >> ${merge_top}/merge-r$1/$i.linaro - # cleanup generated files - rm -f `find ${merge_top}/merge-r$1 -name \*.merge-right.\* -o -name \*.merge-left.\* -o -name \*.working -o -name \*.rej -o -name \*.orig` - rm -f ${merge_top}/merge-r$1/*.patch ${merge_top}/merge-r$1/diff.txt - # We can now revert the ChangeLog that was conflicted, as the entry - # is in the proper ChangeLong.linaro file. - (cd ${merge_top}/merge-r$1 && svn revert $i) - else - problems=" ${problems} $i" - echo "${merge_top}/merge-r$1/$i" >> ${merge_top}/merge-r$1/problems.txt - fi - done - - if test x"${problems}" != x; then - error "Unresolved conflicts: ${problems}" - else - notice "No conflicts left to resolve" - fi -} - -# $1 - the revision to commit -merge_bzr_commit() -{ - notice "Commiting changes for revision $1" - (cd ${bzr_top}/merge-r$1 && bzr commit -m "Backport from trunk r$1") - - notice "Pushing changes for revision $1 to lunchpad" - (cd ${bzr_top}/merge-r$1 && bzr push lp:~${launchpad_id}/gcc-linaro/4.8-merge-$1) -} - -# $1 - revision in trunk -merge_patch() -{ - echo $1 - - svn diff -c $1 > $i.patch -} diff --git a/lib/package.sh b/lib/package.sh deleted file mode 100644 index df111b9..0000000 --- a/lib/package.sh +++ /dev/null @@ -1,549 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# This script contains functions for building binary packages. - -build_deb() -{ - trace "$*" - - warning "unimplemented" -} - -build_rpm() -{ - trace "$*" - - warning "unimplemented" -} - -# This removes files that don't go into a release, primarily stuff left -# over from development. -# -# $1 - the top level path to files to cleanup for a source release -sanitize() -{ - trace "$*" - - # the files left from random file editors we don't want. - local edits="`find $1/ -name \*~ -o -name \.\#\* -o -name \*.bak -o -name x`" - - pushd ./ >/dev/null - cd $1 - if test "`git status | grep -c "nothing to commit, working directory clean"`" -gt 0; then - error "uncommited files in $1! Commit files before releasing." - #return 1 - fi - popd >/dev/null - - if test x"${edits}" != x; then - rm -fr ${edits} - fi - - return 0 -} - -# The runtime libraries are produced during dynamic builds of gcc, libgcc, -# listdc++, and gfortran. -binary_runtime() -{ - trace "$*" - -# local version="`${target}-gcc --version | head -1 | cut -d ' ' -f 3`" - local version="`${target}-gcc --version | grep -o " [0-9]\.[0-9]" | tr -d ' ' | head -n 1`" - - # no expicit release tag supplied, so create one. - if test x"${release}" = x; then - if test x"${gcc_version}" = x; then - local gcc_version="~`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - fi - - if test `echo ${gcc_version} | grep -c "\.git/"`; then - local branch="`basename ${gcc_version}`" - else - if test `echo ${gcc_version} | grep -c "\.git"`; then - local branch= - fi - fi - - local builddir="`get_builddir ${gcc_version} stage2`" - local srcdir="`get_srcdir ${gcc_version}`" - - local date="`date +%Y%m%d`" - if test -d ${srcdir}/.gito -o -e ${srcdir}/.gitignore; then - local revision="@`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - fi - if test `echo ${gcc_version} | grep -c "\.git/"`; then - local version="`echo ${gcc_version} | cut -d '/' -f 1 | sed -e 's:\.git:-linaro:'`-${version}" - fi - local tag="`echo runtime-${version}~${revision}-${target}-${date} | sed -e 's:-none-:-:' -e 's:-unknown-:-:'`" - else - # use an explicit tag for the release name - local tag="`echo runtime-linaro-gcc${version}-${release}-${target}`" - fi - - local destdir="/tmp/linaro.$$/${tag}" - - dryrun "mkdir -p ${destdir}/lib/${target} ${destdir}/usr/lib/${target}" - - # Get the binary libraries. aarch64 uses /lib64, arm uses /lib, s we use a wildcard - # to get either. - dryrun "rsync -av ${local_builds}/destdir/${host}/${target}/lib*/libgcc* ${destdir}/lib/${target}/" - - dryrun "rsync -av ${local_builds}/destdir/${host}/${target}/lib*/libstdc++* ${destdir}/usr/lib/${target}/" - - # make the tarball from the tree we just created. - notice "Making binary tarball for runtime libraries, please wait..." - dryrun "tar Jcf ${local_snapshots}/${tag}.tar.xz --directory /tmp/linaro.$$ ${tag}" - - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz | sed -e 's:${local_snapshots}/::' > ${local_snapshots}/${tag}.tar.xz.asc" - - return 0 -} - -binary_gdb() -{ - trace "$*" - - local version="`${target}-gdb --version | head -1 | grep -o " [0-9\.][0-9].*\." | tr -d ')'`" - local tag="`create_release_tag ${gdb_version} | sed -e 's:binutils-::'`" - local builddir="`get_builddir ${gdb_version}`" - local destdir="/tmp/linaro.$$/${tag}-tmp" - local prefix="${local_builds}/destdir/${host}" - - local gdb_static="`grep ^static_link= ${topdir}/config/gdb.conf | cut -d '\"' -f 2`" - -# if test x"${gdb_static}" = x"yes"; then -# fi - - # Use LSB to produce more portable binary releases. - if test x"${LSBCC}" != x -a x"${LSBCXX}" != x; then - local make_flags="${make_flags} CC=${LSBCC} CXX=${LSBCXX}" - fi - - rm ${builddir}/gdb/gdb - - local make_flags="${make_flags}" - # install in alternate directory so it's easier to build the tarball - dryrun "make all ${make_flags} DESTDIR=${destdir} -w -C ${builddir}" - dryrun "make install ${make_flags} DESTDIR=${destdir} -w -C ${builddir}" - dryrun "make install ${make_flags} DESTDIR=${destdir} -w -C ${builddir}/gdb/gdbserver" - dryrun "ln -sfnT ${destdir}/${prefix} /tmp/linaro.$$/${tag}" - - local abbrev="`echo ${host}_${target} | sed -e 's:none-::' -e 's:unknown-::'`" - - # make the tarball from the tree we just created. - notice "Making binary tarball for GDB, please wait..." - dryrun "tar Jcfh ${local_snapshots}/${tag}-${abbrev}.tar.xz --directory=/tmp/linaro.$$ ${tag}" - - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}-${abbrev}.tar.xz | sed -e 's:${local_snapshots}/::' > ${local_snapshots}/${tag}-${abbrev}.tar.xz.asc" - - return 0 -} - -# Produce a binary toolchain tarball -# For daily builds produced by Jenkins, we use -# `date +%Y%m%d`-${BUILD_NUMBER}-${GIT_REVISION} -# e.g artifact_20130906-12-245f0869.tar.xz -binary_toolchain() -{ - trace "$*" - - local version="`${target}-gcc --version | grep -o " [0-9]\.[0-9]" | tr -d ' ' | head -n 1`" - - # no expicit release tag supplied, so create one. - if test x"${release}" = x; then - if test x"${gcc_version}" = x; then - local gcc_version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2`" - fi - if test `echo ${gcc_version} | grep -c "\.git/"`; then - local branch="`basename ${gcc_version}`" - else - if test `echo ${gcc_version} | grep -c "\.git"`; then - local branch= - fi - fi - - local date="`date +%Y%m%d`" - local srcdir="`get_srcdir ${gcc_version}`" - - if test -d ${srcdir}/.git -o -e ${srcdir}/.gitignore; then - local revision="git`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - fi - if test x"${host}" != x"${build}"; then - local tag="`echo gcc-linaro-${version}~${revision}-i686-mingw32_${target}-${date} | sed -e 's:-none-:-:' -e 's:-unknown-:-:'`" - else - local tag="`echo gcc-linaro-${version}~${revision}-${build_arch}_${target}-${date} | sed -e 's:-none-:-:' -e 's:-unknown-:-:'`" - fi - else - # use an explicit tag for the release name - if test x"${host}" != x"${build}"; then - local tag="`echo gcc-linaro-${version}-${release}-i686-mingw32_${target} | sed -e 's:-none-:-:' -e 's:-unknown-:-:'`" - else - local tag="`echo gcc-linaro-${version}-${release}-${build_arch}_${target} | sed -e 's:-none-:-:' -e 's:-unknown-:-:'`" - fi - - fi - - local destdir="/tmp/linaro.$$/${tag}" - dryrun "mkdir -p /tmp/linaro.$$" - - # The manifest file records the versions of all of the components used to - # build toolchain. - manifest ${local_builds}/${host}/${target}/manifest.txt - -# local installdir="`find ${destdir} -name ${target}-nm`" -# local installdir="`dirname ${installdir} | sed -e 's:/bin::'`" - dryrun "ln -sfnT ${local_builds}/destdir/${host} ${destdir}" - - # make the tarball from the tree we just created. - notice "Making binary tarball for toolchain, please wait..." - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz --directory=/tmp/linaro.$$ ${exclude} ${tag}" - - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz | sed -e 's:${local_snapshots}/::' > ${local_snapshots}/${tag}.tar.xz.asc" - - return 0 -} - -binary_sysroot() -{ - trace "$*" - - local version="`${target}-gcc --version | grep -o " [0-9]\.[0-9]" | tr -d ' ' | head -n 1`" - - # no expicit release tag supplied, so create one. - if test x"${release}" = x; then - if test x"${clibrary}" = x"newlib"; then - if test x"${newlb_version}" = x; then - local libc_version="`grep ^latest= ${topdir}/config/newlib.conf | cut -d '=' -f 2 | cut -d '/' -f 1 | tr -d '\"'`" - else - local libc_version="`echo ${newlib_version} | cut -d '/' -f 1`" - fi - local srcdir="`get_srcdir ${libc_version}`" - elif test x"${clibrary}" = x"glibc"; then - if test x"${glibc_version}" = x; then - local libc_version="`grep ^latest= ${topdir}/config/glibc.conf | cut -d '/' -f 2 | tr -d '\"'`" - local srcdir="`get_srcdir ${libc_version}`" - local libc_version="glibc-linaro-`grep VERSION ${local_snapshots}/${libc_version}/libc/version.h | tr -d '\"' | cut -d ' ' -f 3`" - else - local libc_version="`echo ${glibc_version} | cut -d '/' -f 1`" - local srcdir="`get_srcdir ${libc_version}`" - local libc_version="glibc-linaro-`grep VERSION ${local_snapshots}/${libc_version}/libc/version.h | tr -d '\"' | cut -d ' ' -f 3`" - fi - else - if test x"${eglibc_version}" = x; then - local libc_version="`grep ^latest= ${topdir}/config/eglibc.conf | cut -d '/' -f 2 | tr -d '\"'`" - local srcdir="`get_srcdir ${libc_version}`" - local libc_version="eglibc-linaro-`grep VERSION ${local_snapshots}/${libc_version}/libc/version.h | tr -d '\"' | cut -d ' ' -f 3`" - else - local libc_version="`echo ${eglibc_version} | cut -d '/' -f 1`" - local srcdir="`get_srcdir ${libc_version}`" - local libc_version="eglibc-linaro-`grep VERSION ${local_snapshots}/${libc_version}/libc/version.h | tr -d '\"' | cut -d ' ' -f 3`" - fi - fi - - local builddir="`get_builddir ${libc_version}`" - - # if test "`echo $1 | grep -c '@'`" -gt 0; then - # local commit="@`echo $1 | cut -d '@' -f 2`" - # else - # local commit="" - # fi - local version="`${target}-gcc --version | grep -o " [0-9]\.[0-9]" | tr -d ' ' | head -n 1`" - date="`date +%Y%m%d`" - if test -d ${srcdir}/.git -o -e ${srcdir}/.gitignore; then - local revision="`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - else - revision="${BUILD_NUMBER}" - fi - local tag="`echo sysroot-${libc_version}-${revision}-${target}-${date}-gcc_${version} | sed -e 's:\.git:-linaro:' -e 's:-none-:-:' -e 's:-unknown-:-:'`" - else - local tag="sysroot-linaro-${clibrary}-gcc${version}-${release}-${target}" - fi - -# dryrun "cp -fr ${cbuild_top}/sysroots/${target} ${destdir}" - local destdir="/tmp/linaro.$$/${tag}" - dryrun "mkdir -p /tmp/linaro.$$" - dryrun "ln -sfnT ${cbuild_top}/sysroots/${target} ${destdir}" - - # Generate the install script - sysroot_install_script ${destdir} - - notice "Making binary tarball for sysroot, please wait..." - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz --directory=/tmp/linaro.$$ ${tag}" - - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz > ${local_snapshots}/${tag}.tar.xz.asc" - return 0 -} - -# Create a manifest file that lists all the versions of the other components -# used for this build. -manifest() -{ - trace "$*" - - if test x"$1" = x; then - local outfile=${local_builds}/${host}/${target}/manifest.txt - else - local outfile=$1 - fi - - if test x"${gmp_version}" = x; then - local gmp_version="`grep ^latest= ${topdir}/config/gmp.conf | cut -d '\"' -f 2`" - fi - - if test x"${mpc_version}" = x; then - local mpc_version="`grep ^latest= ${topdir}/config/mpc.conf | cut -d '\"' -f 2`" - fi - - if test x"${mpfr_version}" = x; then - local mpfr_version="`grep ^latest= ${topdir}/config/mpfr.conf | cut -d '\"' -f 2`" - fi - - if test x"${gdb_version}" = x; then - local gdb_version="`grep ^latest= ${topdir}/config/gdb.conf | cut -d '\"' -f 2`" - fi - local gcc_branch="`echo ${gcc_version} | cut -d '~' -f 2`" - - local srcdir="`get_srcdir ${gcc_version}`" - local gcc_versionnum="`${target}-gcc --version | grep -o " [0-9]\.[0-9]\.[0-9]" | tr -d ' ' | head -n 1`" - local gcc_revision="`get_git_revision ${srcdir}`" - - local srcdir="`get_srcdir ${gdb_version}`" - local gdb_revision="`get_git_revision ${srcdir}`" - - if test x"${dejagnu_version}" = x; then - local dejagnu_version="`grep ^latest= ${topdir}/config/dejagnu.conf | cut -d '\"' -f 2`" - fi - local srcdir="`get_srcdir ${dejagnu_version}`" - local dejagnu_revision="`get_git_revision ${srcdir}`" - - if test x"${linux_version}" = x; then - local linux_version="`grep ^latest= ${topdir}/config/linux.conf | cut -d '\"' -f 2`" - fi - - if test x"${binutils_version}" = x; then - local binutils_version="`grep ^latest= ${topdir}/config/binutils.conf | cut -d '\"' -f 2`" - fi - local srcdir="`get_srcdir ${binutils_version}`" - local binutils_revision=="`get_git_revision ${srcdir}`" - - local cbuild_revision="`get_git_revision ${cbuild_path}`" - - rm -f ${outfile} - cat >> ${outfile} <<EOF -# Build machine data -build=${build} -host=${host} -target=${target} -kernel=${kernel} -hostname=${hostname} -distribution=${distribution} -host_gcc="${host_gcc_version}" - -# Component versions -gmp_version=${gmp_version} -mpc_version=${mpc_version} -mpfr_version=${mpfr_version} -gcc_branch=${gcc_branch} -gcc_version=${gcc_versionnum} -gcc_revision=${gcc_revision} -binutils_version=${binutils_version} -binutils_revision=${binutils_revision} -dejagnu_version=${dejagnu_version} -dejagnu_revsion=${dejagnu_revision} -gdb_version=${gdb_version} -gdb_revsion=${gdb_revision} -linux_version=${linux_version} - -# Cbuild revision used -cbuild_revision=${cbuild_revision} - -EOF - - # Gerrit info, if triggered - if test x"${gerrit}" = xyes; then - cat >> ${outfile} <<EOF -gerrit_branch=${gerrit_branch} -gerrit_revision=${gerrit_revision} - -EOF - fi - - case ${clibrary} in - glibc) - local srcdir="`get_srcdir ${glibc_version}`" - if test x"${glibc_version}" = x; then - glibc_version="`grep ^latest= ${topdir}/config/glibc.conf | cut -d '\"' -f 2`" - fi - local glibc_revision="`cd ${srcdir} && git log | head -1 | cut -d ' ' -f 2`" - - echo "glibc_version=${glibc_version}" >> ${outfile} - echo "glibc_revision=${glibc_revision}" >> ${outfile} - ;; - newlib) - local srcdir="`get_srcdir ${newlib_version}`" - if test x"${newlib_version}" = x; then - newlib_version="`grep ^latest= ${topdir}/config/newlib.conf | cut -d '\"' -f 2`" - fi - local newlib_revision="`cd ${srcdir} && git log | head -1 | cut -d ' ' -f 2`" - - echo "newlib_version=${newlib_version}" >> ${outfile} - echo "newlib_revision=${newlib_revision}" >> ${outfile} - ;; - eglibc|*) - local srcdir="`get_srcdir ${eglibc_version}`" - if test x"${eglibc_version}" = x; then - eglibc_version="`grep ^latest= ${topdir}/config/eglibc.conf | cut -d '\"' -f 2`" - fi - local eglibc_revision="`cd ${srcdir} && git log | head -1 | cut -d ' ' -f 2`" - - echo "eglibc_version=${eglibc_version}" >> ${outfile} - echo "eglibc_revision=${eglibc_revision}" >> ${outfile} - ;; - esac - - local srcdir="`get_srcdir ${gcc_version}`" - echo "---------------------------------------------" >> ${outfile} - cd ${srcdir} && git log -n 1 >> ${outfile} -} - -# Build a source tarball -# $1 - the version to use, usually something like 2013.07-2 -binutils_src_tarball() -{ - trace "$*" - - local version="`${target}-ld --version | head -1 | cut -d ' ' -f 5 | cut -d '.' -f 1-3`" - - # See if specific component versions were specified at runtime - if test x"${binutils_version}" = x; then - local binutils_version="binutils-`grep ^latest= ${topdir}/config/binutils.conf | cut -d '\"' -f 2`" - fi - - local dir="`normalize_path ${binutils_version}`" - local srcdir="`get_srcdir ${binutils_version}`" - local builddir="`get_builddir ${binutils_version}`" - local branch="`echo ${binutils_version} | cut -d '/' -f 2`" - - # clean up files that don't go into a release, often left over from development - if test -d ${srcdir}; then - sanitize ${srcdir} - fi - - # from /linaro/snapshots/binutils.git/src-release: do-proto-toplev target - # Take out texinfo from a few places. - local dirs="`find ${srcdir} -name Makefile.in`" - for d in ${dirs}; do - sed -i -e '/^all\.normal: /s/\all-texinfo //' -e '/^install-texinfo /d' $d - done - - # Create .gmo files from .po files. - for f in `find . -name '*.po' -type f -print`; do - dryrun "msgfmt -o `echo $f | sed -e 's/\.po$/.gmo/'` $f" - done - - if test x"${release}" != x; then - local date="`date +%Y%m%d`" - if test "`echo $1 | grep -c '@'`" -gt 0; then - local revision="`echo $1 | cut -d '@' -f 2`" - fi - if test -d ${srcdir}/.git; then - local binutils_version="${dir}-${date}" - local revision="-`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" - local exclude="--exclude .git" - else - local binutils_version="`echo ${binutils_version} | sed -e "s:-2.*:-${date}:"`" - fi - local date="`date +%Y%m%d`" - local tag="${binutils_version}-linaro${revision}-${date}" - else - local tag="binutils-linaro-${version}-${release}" - fi - - dryrun "ln -s ${srcdir} /tmp/${tag}" - -# from /linaro/snapshots/binutils-2.23.2/src-release -# -# NOTE: No double quotes in the below. It is used within shell script -# as VER="$(VER)" - - if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' binutils/configure.in >/dev/null 2>&1; then - sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; - elif grep AM_INIT_AUTOMAKE binutils/configure.in >/dev/null 2>&1; then - sed < binutils/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; - elif test -f binutils/version.in; then - head -1 binutils/version.in; - elif grep VERSION binutils/Makefile.in > /dev/null 2>&1; then - sed < binutils/Makefile.in -n 's/^VERSION *= *//p'; - else - echo VERSION; - fi - - # Cleanup any temp files. - #find ${srcdir} -name \*~ -o -name .\#\* -exec rm {} \; - - notice "Making source tarball for GCC, please wait..." - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz ${exclude} --directory=/tmp ${tag}/)" - - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz > ${local_snapshots}/${tag}.tar.xz.asc" - # We don't need the symbolic link anymore. - dryrun "rm -f /tmp/${tag}" - - return 0 -} - -# This installs a binary tarball produced by cbuild2, and runs make check -test_binary_toolchain() -{ - # Binaries get installed here if possible - if test ! -w /opt/linaro; then - error "/opt/linaro is not writable!" - return 1 - fi - - # Untar everything in the install directory - for i in ${local_snapshots}/*-x86_64*.xz; do - tar Jxvf $i --directory=/opt/linaro - done - - local sysroot="`find /opt/linaro -name INSTALL-SYSROOT.sh`" - local sysroot="`dirname ${sysroot}`" - -# local version="`${target}-gcc --version | grep -o " [0-9]\.[0-9]" | tr -d ' '`" -# local tag="sysroot-linaro-${clibrary}-gcc${version}-${release}-${target}" - - pushd ${sysroot} && sh ./INSTALL-SYSROOT.sh && popd - - # Put the installed toolchain first in the path so it gets picked up by make check. - local compiler="`find /opt/linaro -name ${target}-gcc`" - local compiler="`dirname ${compiler}`" - export PATH="${compiler}:$PATH" - - # test GCC using the build we just completed, since we need access to the test cases. - make_clean ${binutils_version} - make_check ${binutils_version} - - make_clean ${gcc_version} stage2 - make_check ${gcc_version} stage2 -} diff --git a/lib/release.sh b/lib/release.sh deleted file mode 100755 index 7c23626..0000000 --- a/lib/release.sh +++ /dev/null @@ -1,370 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# -# This makes a a release tarball Linaro style. Note that this does NOT -# test building the soure, nor do it run any tests. it just packages -# everything necesary for the release. -# - -# Regenerate the MD5SUMS file -regenerate_checksums() -{ - trace "$*" - - local reldir=$1 - - local tag="`basename $1`" - - cat <<EOF > ${reldir}/MD5SUMS -# This file contains the MD5 checksums of the files in the -# ${tag}.tar.xz tarball. -# -# Besides verifying that all files in the tarball were correctly expanded, -# it also can be used to determine if any files have changed since the -# tarball was expanded or to verify that a patchfile was correctly applied. -# -# Suggested usage: -# md5sum -c MD5SUMS | grep -v "OK$" -EOF - - find ${reldir}/ -type f | grep -v MD5SUMS | LC_ALL=C sort > /tmp/md5sums.$$ - xargs md5sum < /tmp/md5sums.$$ 2>&1 | grep -v "\.git" | sed -e "s:${reldir}/::" >> ${reldir}/MD5SUMS - rm -f /tmp/md5sums.$$ - -# for i in `cat /tmp/md5sums`; do -# md5sum $i 2>&1 | sed -e 's:/tmp/::' >> ${reldir}/MD5SUMS -# done - return 0 -} - -# GPG sign the tarball -sign_tarball() -{ - trace "$*" - -# ssh -t cbuild@toolchain64 gpg --no-use-agent -q --yes --passphrase-file /home/cbuild/.config/cbuild/password --armor --sign --detach-sig --default-key cbuild "/home/cbuild/var/snapshots/gcc-linaro-${release}.tar.xz" scp cbuild@toolchain64:/home/cbuild/var/snapshots/gcc-linaro-${release}.tar.xz.asc $REL_DIR - - return 0 -} - -release_binutils_src() -{ - # See if specific component versions were specified at runtime - if test x"${binutils_version}" = x; then - local binutils_version="`grep ^latest= ${topdir}/config/binutils.conf | cut -d '\"' -f 2` | tr -d '\"'" - fi - - local srcdir="`get_srcdir ${binutils_version}`" - local builddir="`get_builddir ${binutils_version}`" - # The new combined repository for binutils has GDB too, so we strip that off. - local tag="`create_release_tag ${binutils_version} | sed -e 's:-gdb::' -e 's:-binutils::'`" - - dryrun "mkdir -p /tmp/linaro.$$" - local destdir="/tmp/linaro.$$/${tag}" - - # make a link with the correct name for the tarball's source directory - dryrun "ln -sfnT ${srcdir} ${destdir}" - - # Update the Binutils version - if test x"${release}" = x;then - edit_changelogs ${destdir}/binutils ${tag} - else - edit_changelogs ${destdir}/binutils ${release} - fi - - # Create .gmo files from .po files. - for i in `find ${srcdir} -name '*.po' -type f -print`; do - dryrun "msgfmt -o `echo $i | sed -e 's/\.po$/.gmo/'` $i" - done - - # Copy all the info files and man pages into the release directory - local docs="`find ${builddir}/ -name \*.info -o -name \*.1 -o -name \*.7 | sed -e "s:${builddir}/::"`" - for i in ${docs}; do - dryrun "cp -f ${builddir}/$i ${destdir}/$i" - done - - dryrun "regenerate_checksums ${destdir}" - - # Remove extra files left over from any development hacking - sanitize ${srcdir} - - local exclude="--exclude-vcs --exclude .gitignore --exclude .cvsignore --exclude .libs --exclude ${target}" - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz ${exclude} --directory=/tmp/linaro.$$ ${tag}/" - - # Make the md5sum file for this tarball - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz > ${local_snapshots}/${tag}.tar.xz.asc" - - return 0 -} - -# From: https://wiki.linaro.org/WorkingGroups/ToolChain/GCC/ReleaseProcess -# The output file name looks like this: gcc-linaro-4.8-2013.11.tar.xz. -# The date is set by the --release option to Cbuildv2. This function is -# only called with --tarsrc or --tarball. -release_gcc_src() -{ - trace "$*" - - # See if specific component versions were specified at runtime - if test x"${gcc_version}" = x; then - local gcc_version="`grep ^latest= ${topdir}/config/gcc.conf | cut -d '\"' -f 2` | tr -d '\"'" - fi - local srcdir="`get_srcdir ${gcc_version}`" - local builddir="`get_builddir ${gcc_version} stage2`" - local tag="`create_release_tag ${gcc_version} | sed -e 's:[-~]linaro-::' | tr '~' '-'`" - local destdir="/tmp/linaro.$$/${tag}" - - dryrun "mkdir -p /tmp/linaro.$$" - dryrun "ln -sfnT ${srcdir} ${destdir}" - - if test -d ${destdir}; then - if test x"${release}" = x;then - edit_changelogs ${destdir}/gcc ${tag} - else - edit_changelogs ${destdir}/gcc ${release} - fi - # Remove extra files left over from any development hacking - sanitize ${destdir} - fi - - dryrun "regenerate_checksums ${destdir}" - - # Install the docs - install_gcc_docs ${destdir} ${builddir} - - local exclude="--exclude-vcs --exclude .gitignore --exclude .cvsignore --exclude .libs" - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz ${exclude} --directory=/tmp/linaro.$$ ${tag}" - - # Make the md5sum file for this tarball - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz > ${local_snapshots}/${tag}.tar.xz.asc" - - # Clean up doc files created during the build - rm -fr ${destdir}/INSTALL ${destdir}/MD5SUMS ${destdir}/gcc/doc/*.1 ${destdir}/gcc/doc/*.7 - - return 0 -} - -# At release time, we build additional docs. We do this after the main GCC -# sources have been tarred, and append these to the tarball to avoid contaminating -# the source directory. -# $1 - -install_gcc_docs() -{ - trace "$*" - - local destdir=$1 - local srcdir=$1 - local builddir=$2 - - # the GCC script needs these two values to work. - SOURCEDIR=${srcdir}/gcc/doc - DESTDIR=${destdir}/INSTALL - dryrun ". ${srcdir}/gcc/doc/install.texi2html" - - # Create .gmo files from .po files. - for i in `find ${destdir} -name '*.po' -type f -print`; do - dryrun "msgfmt -o `echo $i | sed -e 's/\.po$/.gmo/'` $i" - done - - # Make a man alias instead of copying the entire man page for G++ - if test ! -e ${builddir}/g++.1; then - dryrun "echo ".so man1/gcc.1" > ${destdir}/gcc/doc/g++.1" - fi - - # Copy all the info files and man pages into the release directory - local docs="`find ${builddir}/ -name \*.info -o -name \*.1 -o -name \*.7 | sed -e "s:${builddir}/::"`" - for i in ${docs}; do - if test `echo $i | grep -c "\.so\.1"` -eq 0; then - dryrun "cp -fv ${builddir}/$i ${destdir}/gcc/doc" - fi - done - -# dryrun "rm -fr ${destdir}/${target}" - - return 0 -} - -# Edit the ChangeLog.linaro file for this release -# $1 - the destination directory for the release files -# $2 - the tag or release string -edit_changelogs() -{ - trace "$*" - - local destdir="$1" - local basedir="`dirname $1`" - - # Update the GCC version, which should look like "4.8-${release}/" - local tool="`basename $1`" -# local version="`echo $1 | grep -o "[0-9]\.[0-9]-[0-9\.]*"`" - local version="`echo $1 | grep -o "[0-9]\.[0-9].*/" | tr -d '/'`" - if test -d ${destdir}; then - rm -f ${destdir}/LINARO-VERSION - echo "${version}" > ${destdir}/LINARO-VERSION - else - warning "${destdir} doesn't exist!" - fi - - # Jenkins sets these to the name of the requestor. If not set, then we - # use git, otherwise we wind up with buildslave@locahost. - if test x"${BUILD_USER_FIRST_NAME}" = x -a x"${BUILD_USER_LAST_NAME}" = x -a x"${BUILD_USER_ID}" = x; then - local fullname="`git config user.name`" - local email="`git config user.email`" - else - local fullname="${BUILD_USER_FIRST_NAME}.${BUILD_USER_LAST_NAME}" - local email="${BUILD_USER_ID}" - fi - - local date="`date +%Y-%m-%d`" - - # Get all the ChangeLog files. - local clogs="`find ${basedir}/ -name ChangeLog`" - - # For a dryrun, don't actually edit any ChangeLog files. - if test x"${dryrun}" = x"no"; then - local verstr="`echo "${tool}" | tr "[:lower:]" "[:upper:]"` Linaro ${version}" - for i in ${clogs}; do - # Don't do anything if the entry has already been updated. - if test -e $i.linaro; then - if test "`grep -c "${version}" $i.linaro`" -eq 1; then - continue - fi - mv $i.linaro /tmp/ - else - touch /tmp/ChangeLog.linaro - fi - echo "${date} ${fullname} <${email}>" >> $i.linaro - echo "" >> $i.linaro - echo " ${verstr} released." >> $i.linaro - echo "" >> $i.linaro - cat /tmp/ChangeLog.linaro >> $i.linaro - rm -f /tmp/ChangeLog.linaro - done - fi -} - -# From: https://wiki.linaro.org/WorkingGroups/ToolChain/GDB/ReleaseProcess -# $1 - file name-version to grab from source code control. -release_gdb_src() -{ - trace "$*" - - # See if specific component versions were specified at runtime - if test x"${gdb_version}" = x; then - local gdb_version="`grep ^latest= ${topdir}/config/gdb.conf | cut -d '\"' -f 2` | tr -d '\"'" - fi - local srcdir="`get_srcdir ${gdb_version}`" - # The new combined repository for GDB has Binutils too, so we strip that off. - local tag="`create_release_tag ${gdb_version} | sed -e 's:binutils-::'`" - local destdir="/tmp/linaro.$$/${tag}" - - # make a link with the correct name for the tarball's source directory - dryrun "mkdir -p /tmp/linaro.$$" - dryrun "ln -sfnT ${srcdir} ${destdir}" - - # Update the GDB version - if test x"${release}" = x;then - edit_changelogs ${destdir}/gdb ${tag} - else - edit_changelogs ${destdir}/gdb ${release} - fi - -# dryrun "regenerate_checksums ${destdir}" - - # Remove extra files left over from any development hacking - sanitize ${destdir} - - local exclude="--exclude-vcs --exclude .gitignore --exclude .cvsignore --exclude .libs" - dryrun "tar Jcfh ${local_snapshots}/${tag}.tar.xz ${exclude} --directory=/tmp/linaro.$$ ${tag}/" - - # Make the md5sum file for this tarball - rm -f ${local_snapshots}/${tag}.tar.xz.asc - dryrun "md5sum ${local_snapshots}/${tag}.tar.xz > ${local_snapshots}/${tag}.tar.xz.asc" - - return 0 -} - -release_newlib() -{ - # First, checkout all the sources, or grab a snapshot - error "unimplemented" -} - -release_eglibc() -{ - # First, checkout all the sources, or grab a snapshot - error "unimplemented" -} - -release_glibc() -{ - # First, checkout all the sources, or grab a snapshot - error "unimplemented" -} - -release_qemu() -{ - # First, checkout all the sources, or grab a snapshot - error "unimplemented" -} - -tag_release() -{ - if test x"$1" = x; then - local dccs=git - else - local dccs = $1 - fi - error "release TAGging unimplemented" -} - -# $1 - The release ttee directory to put the script in for packaging. -sysroot_install_script() -{ - trace "$*" - - local script=$1/INSTALL-SYSROOT.sh - local tag="`basename $1`" - - local sysroot="`${target}-gcc -print-sysroot`" - if test ! -e ${script}; then - cat <<EOF > ${script} -#!/bin/sh - -# make the top level directory -if test ! -d /opt/linaro/; then - echo "This script will install this sysroot in /opt/linaro. Write permission" - echo "to /opt is required. The files will stay where they are, only a symbolic" - echo "is created, which can be changed to swap sysroots at compile time." - echo "" -- echo "Continue ? Hit any key..." - read answer - - mkdir -p /opt/linaro -fi - -# If it doesn't already exist, link to the sysroot path GCC will be using -ln -sf \${PWD} ${sysroot} -EOF - fi - - return 0 -} diff --git a/lib/stamp.sh b/lib/stamp.sh deleted file mode 100644 index 054ddbb..0000000 --- a/lib/stamp.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Given a git url or a tarball name, this function will return a stamp name. -# -# $1: Stamp type: configure, build, extract, fetch. -# $2: File URL or tarball name. -# $3: Special suffix, e.g., "stage1" or "stage2" -# -get_stamp_name() -{ - local stamptype=$1 - local git_or_tar=$2 - local suffix=$3 - - local validstamp="`echo ${stamptype} | egrep -c "^configure$|^build$|^extract$|^fetch$"`" - if test ${validstamp} -lt 1; then - error "Invalid stamp type selected." - return 1 - fi - - local name_fragment= - if test "`echo "${git_or_tar}" | grep -c "\.tar"`" -gt 0; then - # Strip the .tar.* from the archive file to get the stamp name. - name_fragment="`echo "${git_or_tar}" | sed -e 's:\.tar.*::'`" - # Strip any preceding directory information, - # e.g., infrastructure/gmp-2.1.2.tar.xz -> gmp-2.1.2 - name_fragment="`basename ${name_fragment}`" - else - name_fragment="`get_git_tag ${git_or_tar}`" - if test x"${name_fragment}" = x; then - error "Couldn't determine stamp name." - return 1 - fi - fi - - #local stamp_name="stamp-${stamptype}-${name_fragment}${suffix:+-${suffix}}" - local stamp_name="${name_fragment}${suffix:+-${suffix}}-${stamptype}.stamp" - echo "${stamp_name}" - return 0 -} - -# $1 Stamp Location -# $2 Stamp Name -# -create_stamp() -{ - local stamp_loc=$1 - local stamp_name=$2 - local ret= - - # Strip trailing slashes from the location directory. - stamp_loc="`echo ${stamp_loc} | sed 's#/*$##'`" - - if test ! -d "${stamp_loc}"; then - notice "'${stamp_loc}' doesn't exist, creating it." - dryrun "mkdir -p \"${stamp_loc}\"" - fi - - local full_stamp_path= - full_stamp_path="${stamp_loc}/${stamp_name}" - - dryrun "touch \"${full_stamp_path}\"" - ret=$? - notice "Creating stamp ${full_stamp_path} (`stat -c %Y ${full_stamp_path}`)" - return ${ret} -} - -# -# $1 Stamp Location -# $2 Stamp Name -# $3 File to compare stamp against -# $4 Force -# -# If stamp file is newer than the compare file return 0 -# If stamp file is NOT newer than the compare file return 1 -# If stamp file does not exist return 1 -# -# Return Value: -# -# 1 - If the test_stamp function returns 1 then regenerate the stamp -# after processing. -# -# 0 - Otherwise the test_stamp function returns 0 which means that -# you should not proceed with processing. -# -# 255 - There is an error condition during stamp generation. This is -# a bug in cbuild2 or the filesystem. -# -check_stamp() -{ - local stamp_loc=$1 - local stamp_name=$2 - local compare_file=$3 - local stamp_type=$4 - local local_force=$5 - - if test ! -e "${compare_file}" -a x"${dryrun}" != xyes; then - fixme "Compare file '${compare_file}' does not exist." - return 255 - fi - - # Strip trailing slashes from the location directory. - stamp_loc="`echo ${stamp_loc} | sed 's#/*$##'`" - - # stamp_type is only used for an informational message and we want to make - # the resultant message grammatically correct. - if test x"${stamp_type}" = x"configure"; then - stamp_type="configur" - fi - - if test x"${dryrun}" = xyes; then - notice "--dryrun is being used${stamp_type:+, ${stamp_type}ing..}." - return 1 - fi - - notice "Checking for ${stamp_loc}/${stamp_name}" - if test ${compare_file} -nt ${stamp_loc}/${stamp_name} -o x"${local_force}" = xyes; then - if test ! -e "${stamp_loc}/${stamp_name}"; then - notice "${stamp_loc}/${stamp_name} does not yet exist${stamp_type:+, ${stamp_type}ing..}." - elif test x"${local_force}" = xyes; then - notice "--force is being used${stamp_type:+, ${stamp_type}ing..}." - else - notice "${compare_file} (`stat -c %Y ${compare_file}`) is newer than ${stamp_loc}/${stamp_name} (`stat -c %Y ${stamp_loc}/${stamp_name}`)${stamp_type:+, ${stamp_type}ing..}." - fi - return 1 - else - notice "${stamp_loc}/${stamp_name} (`stat -c %Y ${stamp_loc}/${stamp_name}`) is newer than ${compare_file} (`stat -c %Y ${compare_file}`). Nothing to be done." - fi - return 0 -} diff --git a/lib/testcode.sh b/lib/testcode.sh deleted file mode 100644 index 3d56b90..0000000 --- a/lib/testcode.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Build other comonly used projects as an additional test of the toolchain - -testcode() -{ - rm -f ${local_snapshots}/testcode/ChangeLog - fetch_http testcode/ChangeLog - - if test -f ${local_snapshots}/md5sums; then - files="`grep testcode ${local_snapshots}/md5sums | cut -d ' ' -f3`" - for i in ${files}; do - build $i - if test $? -gt 0; then - error "Couldn't build $i!" - return 1 - fi - done - fi - -} - diff --git a/runbenchmark.sh b/runbenchmark.sh deleted file mode 100755 index c1ef8c2..0000000 --- a/runbenchmark.sh +++ /dev/null @@ -1,276 +0,0 @@ -#!/bin/bash - -# load the configure file produced by configure -if test -e "`dirname $0`/host.conf"; then - . "`dirname $0`/host.conf" -else - echo "WARNING: no host.conf file! Did you run configure?" 1>&2 -fi - -# load commonly used functions -script="`which $0`" -topdir="`dirname ${script}`" -app="`basename $0`" - -. "${topdir}/lib/common.sh" || exit 1 -. "${topdir}/lib/benchmark.sh" || exit 1 - -usage() -{ - # Format this section with 75 columns. - cat << EOF - ${app} [-b, --build] - [-r, --run] - [-c, --clean] - [-x, --extract] - [-l, --list-of-benchmarks=benchmark1,benchmark2..] - [-t, --gcc-binary-tarball=tarball] - [-d, --dir-to-build=directory] - [ --extract-dir=directory] - [-C, --additional-cflags] - [-L, --aditional-lflags] - [ --controlled] -EOF - return 0 -} - -setup_cpu() -{ - sudo cpufreq-set -g performance - for p in `(ps ax --format='%p' | tail -n +2)`; do - sudo taskset -a -p 0x1 $p 2>&1; - done -} - -restore_cpu() -{ - for p in `(ps ax --format='%p' | tail -n +2)`; do - sudo taskset -a -p 0xFFFFFFFF $p 2>&1; - done - sudo cpufreq-set -g conservative -} - -help() -{ - # Format this section with 75 columns. - cat << EOF - NAME - - ${app} - the Linaro Toolchain Becnhmarking Framework. - - SYNOPSIS - -EOF - usage - cat << EOF - -DESCRIPTION - - ${app} is a toolchain benchmarking framework. - -PRECONDITIONS - - FIXME - -OPTIONS - - -b, --build - Just build the benchmarks. Default behavior is - to extract, clean, build and run the benchmark list. - - -r, --run - Just run the benchmarks. Default behavior is - to extract, clean, build and run the benchmark list. - - -c, --clean - Just clean the benchmarks. Default behavior is - to extract, clean, build and run the benchmark list. - - -x, --extract - Just extract the benchmarks. Default behavior is - to extract, clean, build and run the benchmark list. - - -l, --list-of-benchmarks=benchmark1,benchmark2.. - Specify the list of benchmarks to run, - - -p, --gcc-binary-path=path - Spevify the precompiled gcc path to use for - compiling benchmarks. - - -d, --dir-to-build=directory - Specify the path of directory in which bennchrks - should be placed and executed. - - --extract-dir=directory - Specify the path of directory from which benchmarks - should be extracted. - - -C, --additional-cflags - Additional CFLAGS for compiling benchmarks. - - -L, --aditional-lflags - Additional LFLAGS for linking benchmarks. - - --controlled - Minimise sources of noise during run - E.G. Shuts down unneeded services, shunts remaining - services to a second CPU, shuts down network. - -EXAMPLES - - Clean, build and run eembc without extracting: - - runbenchmark.sh -l=eembc -c -b -r - - Run spec2k in a controlled way: - - runbenchmark.sh -l=spec2k --controlled - - -PRECONDITION FILES - -AUTHOR - Kugan Vivekanandarajah <kuganv@linaro.org> - Bernard Ogden <bernie.ogden@linaro.org> - -EOF - return 0 -} - -extract=false -clean=false -build=false -run=false -build_pgo=false -controlled=false - -while : -do - case $1 in - -h | --help | -\?) - help - exit 0 - ;; - --controlled) - controlled=true - shift - ;; - -x | --extract) - extract=true - shift - ;; - -b | --build) - clean=true - extract=true - build=true - shift - ;; - -c | --clean) - extract=true - clean=true - shift - ;; - -r | --run) - extract=true - clean=true - build=true - run=true - shift - ;; - -l=* | --list=*) - list=${1#*=} - shift - ;; - -C=* | --additional-cflags=*) - XCFLAGS=${1#*=} - shift - ;; - -L=* | --aditional-lflags=*) - XLFLAGS=${1#*=} - shift - ;; - --pgo) - build_pgo=true - shift - ;; - --file=*) - file=${1#*=} # Delete everything up till "=" - shift - ;; - -x=* | --extract-dir==*) - SRC_PATH=${1#*=} - shift - ;; - --) # End of all options - shift - break - ;; - -*) - warning "Unknown option (ignored): $1" >&2 - shift - ;; - *) # no more options. Stop while loop - break - ;; - esac -done - -if test x"$list" = x; then - error "Benchmark list is empty" - exit 1 -fi -if test x"$list" = xall; then - list=coremark,gmpbench,gnugo,skiabench,denbench,eembc,spec2k,libavbench,eembc_office,nbench -fi - -$extract || $clean || $build || $run || { extract=true;clean=true;build=true;run=true; } - -#Cribbed from cbuild2.sh -#TODO: Push this change back to last merge? Not really needed if I submit generated patches. -# But may still be worth it for my sanity. -make_docs=no -install=no - -#TODO How does primary cbuild2 do this? -dump_host_info > host.txt -#fetch md5sums - -for b in ${list//,/ }; -do - if $extract; then - echo "Extract benchmark $b" - url="`get_source $b`" - if test $? -gt 0; then - error "Couldn't find the source for ${do_checkout}" - build_failure - fi - checkout ${url} - if test $? -gt 0; then - error "--checkout ${url} failed." - build_failure - fi - fi - -#TODO is this actually doing anything when we started from fresh checkout? -#TODO clean seems to need to run as part of 'build', fix that up so that I can run it (if I can't already) - #if $clean; then - # echo "Clean benchmark $b" - # make_clean $b || exit - #fi - - #TODO Delete the PGO part unless we find a benchmark that actually uses it - if $build; then - if $build_pgo; then - echo "Build benchmark $b with pgo" - build_with_pgo $ctx || exit - else - echo "Build benchmark $b" - build $b || exit - fi - fi - - if $run; then - echo "Run benchmark $b" - bench_run $b $controlled || exit - fi -done diff --git a/scripts/Backport.job b/scripts/Backport.job deleted file mode 100755 index 645ff24..0000000 --- a/scripts/Backport.job +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -cbuild_dir="${WORKSPACE}/cbuildv2" -user_snapshots="${WORKSPACE}/snapshots" -shared="/home/buildslave/workspace/shared/" -snapshots_ref="${shared}/snapshots" -export CONFIG_SHELL="/bin/bash" - -cat << EOF > ${WORKSPACE}/BUILD-INFO.txt -Format-Version: 0.5 - -Files-Pattern: * -License-Type: open -EOF - -rm -fr ${WORKSPACE} -mkdir -p ${WORKSPACE}/_build -cd ${WORKSPACE}/_build - -$CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${snapshots_ref} --with-fileserver=148.251.136.42 - -$CONFIG_SHELL -x ${cbuild_dir}/test-backport.sh --fileserver=148.251.136.42 --target ${target} ${gcc_branch} - -# force a failure of cbuild2 has build problems. -if test $? -gt 0; then - exit 1 -fi diff --git a/scripts/BuildFarm.job b/scripts/BuildFarm.job deleted file mode 100755 index 95d103f..0000000 --- a/scripts/BuildFarm.job +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -cat << EOF > ${WORKSPACE}/BUILD-INFO.txt -Format-Version: 0.5 - -Files-Pattern: * -License-Type: open -EOF - -export runtests=true - -export CONFIG_SHELL="/bin/bash" -shared="/home/buildslave/workspace/shared/" -cbuild_dir="${WORKSPACE}/cbuildv2" -user_snapshots="${WORKSPACE}/snapshots" -snapshots_ref="${shared}/snapshots" - -rm -fr ${WORKSPACE}/_build -mkdir -p ${WORKSPACE}/_build - -cd ${WORKSPACE}/_build -$CONFIG_SHELL ${cbuild_dir}/configure --disable update --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots -$CONFIG_SHELL -x ${cbuild_dir}/jenkins.sh ${release} - -# force a failure of cbuild2 has build problems. -if test $? -gt 0; then - exit 1 -fi diff --git a/scripts/MakeRelease.job b/scripts/MakeRelease.job deleted file mode 100755 index 915c42b..0000000 --- a/scripts/MakeRelease.job +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/bash - -# Set defaults -export CONFIG_SHELL="/bin/bash" -target="" -tarsrc="" -tarbin="" -check="" -nocheck="no" -fileserver="abe.tcwglab.linaro.org" -user_workspace="${WORKSPACE:-/home/buildslave/workspace}" - -OPTS="`getopt -o t:f:bs:w:nh -l target::fileserver:tarbin:tarsrc:workspace:help`" -while test $# -gt 0; do - echo 1 = "$1" - case $1 in - -w|--workspace) user_workspace=$2 ;; - -s|--tarsrc) tarsrc=yes ;; - -b|--tarbin) tarbin=yes ;; - -t|--target) target=$2 ;; - -f|--fileserver) fileserver=$2 ;; - -n|--nocheck) nocheck=yes ;; - -h|--help) usage ;; - --) break ;; - esac - shift -done - -if test x"${target}" != x"native" -a x"${target}" != x; then - platform="--target ${target}" -fi - -shared="/home/buildslave/workspace/shared/" -cbuild_dir="${user_workspace}/cbuildv2" -user_snapshots="${user_workspace}/snapshots" - -if test -e ${user_workspace}; then - cat << EOF > ${user_workspace}/BUILD-INFO.txt -Format-Version: 0.5 - -Files-Pattern: * -License-Type: open -EOF -fi - -# Create a build directory -if test ! -d ${user_workspace}/_build; then - mkdir -p ${user_workspace}/_build -else - rm -fr ${user_workspace}/_build/* ${user_workspace}/_build/sysroots/* -fi - -# Use the newly created build directory -cd ${user_workspace}/_build - -if ! test -e host.conf; then - $CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} \ - --with-git-reference-dir=${shared}/snapshots --with-fileserver=${fileserver} -fi - -gcc_source="gcc-linaro-${version}-${release}.tar.xz" - -if test x"${runtests}" = xtrue; then - check=--check -else - check="" -fi - -# Build a toolchain, run the tests, and the create a source release as a tarball -if test x"${tarsrc}" = x"yes"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} \ - --tarsrc ${check} gcc=${gcc_source} ${platform} -build all -fi - -# Build a binary release tarball, then run the tests on the installed binaries -if test x"${tarbin}" = x"yes"; then - # Canadian cross builds require a Linux hosted crfoss compiler first - if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} ${check} gcc=${gcc_source} ${platform} --build all - host="--host i686-w64-mingw32" - else - host="" - fi - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} --tarbin ${check} gcc=${gcc_source} ${platform} ${host} --build all -fi - -# force a failure if cbuild2 has build problems. -if test $? -gt 0; then - exit 1 -fi - -# If not running the testsuites, just exit. -if test x"${nocheck}" = xyes; then - exit 0 -fi - -# Copy the source build test results and tarballs to the fileserver -bases="/work/cbuildv2/baselines/${release}/${target}" -snaps="/home/cbuild/var/snapshots/" -if test x"${tarsrc}" = x"yes"; then - manifest="`find ${user_workspace} -name manifest.txt`" - scp ${manifest} ${fileserver}:${bases}/ - if test x"${check}" != x; then - sums="`find ${user_workspace} -name \*.sum`" - logs="`find ${user_workspace} -name \*.log`" - if test x"${sums}" != x; then - ssh ${fileserver} "mkdir -p ${bases}" - xz ${sums} ${logs} - sums="`echo ${sums} | sed -e 's/\.sum/\.sum.xz/g'`" - logs="`echo ${logs} | sed -e 's/\.log/\.log.xz/g'`" - scp ${sums} ${logs} ${fileserver}:${bases}/ - else - echo "ERROR: No test results were found!" - fi - fi - tarballs="`find ${user_snapshots} -name \*${release}\*.{xz,asc}`" - if test x"${tarballs}" != x; then - scp ${tarballs} ${fileserver}:${snaps}/ - # make a local copy that other jobs can access - cp ${tarballs} ${shared}/snapshots/ - else - echo "ERROR: No source tarballs were found!" - fi -fi - -# Copy the binary test results to the fileserver -binaries="/work/space/binaries/${release}/${target}" -if test x"${tarbin}" = xyes; then - manifest="`find ${user_workspace} -name manifest.txt`" - ssh ${fileserver} "if test ! -d ${binaries}; then mkdir -p ${binaries}; fi" - scp ${manifest} ${fileserver}:${binaries}/ - scp ${user_snapshots}/*.xz ${user_snapshots}/*.asc ${fileserver}:${binaries}/ - if test x"${check}" != x; then - sums="`find ${user_workspace} -name \*.sum`" - logs="`find ${user_workspace} -name \*.log`" - if test x"${sums}" != x; then - xz ${sums} ${logs} - sums="`echo ${sums} | sed -e 's/\.sum/\.sum.xz/g'`" - logs="`echo ${logs} | sed -e 's/\.log/\.log.xz/g'`" - ssh ${fileserver} "mkdir -p ${binaries}/" - scp ${sums} ${fileserver}:${binaries}/ - else - echo "ERROR: No test results were found!" - fi - - # Diff the two directories - scp ${cbuild_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh - out="`ssh ${fileserver} "if test -e ${bases}; then echo YES; else echo NO; fi"`" - if test x"${out}" = x"YES"; then - out="`ssh ${fileserver} /tmp/tcwgweb$$.sh --email --tdir ${bases} ${binaries}; fi`" - if test "`echo ${out} | grep -c REGRESSIONS`"; then - exit 1 - fi - fi - fi -fi - -exit 0 diff --git a/scripts/slave.sh b/scripts/slave.sh deleted file mode 100644 index 21ce7b1..0000000 --- a/scripts/slave.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Update all the packages we need -apt-get update - -# Optionally use a package list from another machine of the same distribution and type -# apt-get install `cat /tmp/packages.lst` -apt-get build-dep gcc gdb -packages="texinfo git-core build-essential openssh-server openjdk-6-jre-headless iptables flex bison autogen autoconf automake libtool dejagnu lsyncd gawk gcc-multilib g++-multilib libncurses5-dev lsb ccrypt nagios-nrpe-server sendmail git" -if test `uname -m | egrep -c "x86_64|i686"` -gt 0; - packages="${packages} qemu mingw-w64" -fi - -apt-get install ${packages} - -# Move git-new-workdir to someplace so we can use it. -cp /usr/share/doc/git/contrib/workdir/git-new-workdir /usr/local/bin/ -chmod a+x /usr/local/bin/git-new-workdir - -# Add the user we use for all Jenkins builds -adduser buildslave -mkdir -p /opt/linaro /linaro/shared/snapshots -chown -R buildslave:buildslave /linaro/ -chown -R buildslave:buildslave /opt/ - -# Update hosts so we can find this machine via HTTP -echo "88.98.47.97 abe.tcwglab.linaro.org" >> /etc/hosts - -# Setup default SSH config so builds can use SSH to access the targets for testing. This -# is setup for external access to the TCWG build farm, which go through a proxy, and is -# unnecessary for a build machine in the TCWG internal subnet, although this version can -# be used there as well. -mkdir -p /home/buildslave/.ssh/ -cp ssh-config.txt /home/buildslave/.ssh/ - -# You then need to copy /home/buildslave/.ssh/id_* from an existing slave -# to the new one - -# If running make 3.81, you may have to upgrade to make 4.0, as there is a -# bug effecting eglibc. - -# You also need to install the ARM Fastmodel for AARCH64 big-endian testing. This -# lives in /linaro/foundation-model on all existing machines, so can just be -# copied to the same location. - -# Qualcom Snapdragon - -login as linaro linaro - -# Remove the desktop packahes, we don't need them and that leaves 728M -# of free disk space -# Remove gnome -dpkg -l | grep "^ii.*gnome" | cut -d ' ' -f 3 > xx -apt-get remove `cat xx` -rm xx -# Remove Unity -dpkg -l | grep "^ii.*unity" | cut -d ' ' -f 3 > xx -apt-get remove `cat xx` -apt-get clean all -apt-get update diff --git a/scripts/ssh-config.txt b/scripts/ssh-config.txt deleted file mode 100644 index 3f07509..0000000 --- a/scripts/ssh-config.txt +++ /dev/null @@ -1,223 +0,0 @@ -Host toolchain64 - HostName lab.validation.linaro.org - Port 24001 - -Host tcwg-chrome2-01 - HostName lab.validation.linaro.org - Port 41043 - -Host tcwg-chrome2-02 - HostName lab.validation.linaro.org - Port 41044 - -Host tcwg-apm-01 - HostName lab.validation.linaro.org - Port 41037 - -Host tcwg-apm-02 - HostName lab.validation.linaro.org - Port 41038 - -Host tcwg-apm-03 - HostName lab.validation.linaro.org - Port 41039 - -Host tcwg-apm-04 - HostName lab.validation.linaro.org - Port 41045 - -Host tcwg-d01-01 - HostName lab.validation.linaro.org - Port 41040 - -Host tcwg-d01-02 - HostName lab.validation.linaro.org - Port 41041 - -Host tcwg-d01-03 - HostName lab.validation.linaro.org - Port 41042 - -Host tcwg-d01-04 - HostName lab.validation.linaro.org - Port 41049 - -Host tcwgblack01 - HostName lab.validation.linaro.org - Port 41007 - -Host tcwgblack02 - HostName lab.validation.linaro.org - Port 41008 - -Host tcwgblack03 - HostName lab.validation.linaro.org - Port 41009 - -Host tcwgblack04 - HostName lab.validation.linaro.org - Port 41010 - -Host tcwgblack05 - HostName lab.validation.linaro.org - Port 41011 - -Host tcwgblack06 - HostName lab.validation.linaro.org - Port 41012 - -Host tcwgblack07 - HostName lab.validation.linaro.org - Port 41013 - -Host tcwgblack08 - HostName lab.validation.linaro.org - Port 41014 - -Host tcwgblack09 - HostName lab.validation.linaro.org - Port 41015 - -Host tcwgblack10 - HostName lab.validation.linaro.org - Port 41016 - -Host tcwgblack11 - HostName lab.validation.linaro.org - Port 41017 - -Host tcwgblack12 - HostName lab.validation.linaro.org - Port 41018 - -Host tcwgblack13 - HostName lab.validation.linaro.org - Port 41019 - -Host tcwgblack14 - HostName lab.validation.linaro.org - Port 41020 - -Host tcwgblack15 - HostName lab.validation.linaro.org - Port 41021 - -Host tcwgblack16 - HostName lab.validation.linaro.org - Port 41022 - -Host tcwgblack17 - HostName lab.validation.linaro.org - Port 41023 - -Host tcwgblack18 - HostName lab.validation.linaro.org - Port 41024 - -Host tcwgblack19 - HostName lab.validation.linaro.org - Port 41025 - -Host tcwgblack20 - HostName lab.validation.linaro.org - Port 41026 - -Host tcwgblack21 - HostName lab.validation.linaro.org - Port 41027 - -Host tcwgblack22 - HostName lab.validation.linaro.org - Port 41027 - -Host tcwgblack23 - HostName lab.validation.linaro.org - Port 41028 - -Host tcwgblack24 - HostName lab.validation.linaro.org - Port 41029 - -Host tcwgblack25 - HostName lab.validation.linaro.org - Port 41030 - -Host tcwgblack26 - HostName lab.validation.linaro.org - Port 41031 - -Host tcwgblack27 - HostName lab.validation.linaro.org - Port 41032 - -Host tcwgchromebook01 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40001 - -Host tcwgchromebook02 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40002 - -Host tcwgchromebook03 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40003 - -Host tcwgchromebook04 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40004 - -Host tcwgchromebook05 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40005 - -Host tcwgchromebook06 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40006 - -Host tcwgchromebook07 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40007 - -Host tcwgchromebook08 - HostName lab.validation.linaro.org - StrictHostKeyChecking no - Port 40008 - -Host tcwgbuild01 - HostName lab.validation.linaro.org - Port 41001 - -Host tcwgbuild02 - HostName lab.validation.linaro.org - Port 41002 - -Host tcwgbuild03 - HostName lab.validation.linaro.org - Port 41003 - -Host tcwgbuild04 - HostName lab.validation.linaro.org - Port 41004 - -Host tcwgbuild05 - HostName lab.validation.linaro.org - Port 41005 - -Host tcwgbuild06 - HostName lab.validation.linaro.org - Port 41006 - -Host * - ForwardAgent yes - ForwardX11 yes - ControlMaster auto - ControlPath /tmp/ssh-%u-%r@%h:%p - StrictHostKeyChecking no -# ControlPersist yes diff --git a/scripts/test-schroot.sh b/scripts/test-schroot.sh deleted file mode 100755 index b260856..0000000 --- a/scripts/test-schroot.sh +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/bash - -set -e - -arch="native" -begin_session=false -schroot_master="" -shared_dir="" -board_exp="" -finish_session=false -gen_schroot=false -sysroot="" -ssh_master=false -target_ssh_opts="" -host_ssh_opts="" -multilib_path="lib" - -while getopts "a:bc:d:e:fgh:l:mo:p:qv" OPTION; do - case $OPTION in - a) arch=$OPTARG ;; - b) begin_session=true ;; - c) schroot_master="$OPTARG" ;; - d) shared_dir=$OPTARG ;; - e) board_exp="$OPTARG" ;; - f) finish_session=true ;; - g) gen_schroot=true ;; - h) multilib_path="$OPTARG" ;; - l) sysroot=$OPTARG ;; - m) ssh_master=true ;; - o) target_ssh_opts="$OPTARG" ;; - p) host_ssh_opts="$OPTARG" ;; - q) exec > /dev/null ;; - v) set -x ;; - esac -done -shift $((OPTIND-1)) - -target="${1%:*}" -port="${1#*:}" - -triplet_to_deb_arch() -{ - set -e - case "$1" in - aarch64-*linux-gnu) echo arm64 ;; - arm-*linux-gnueabi*) echo armhf ;; - i686-*linux-gnu) echo i386 ;; - x86_64-*linux-gnu) echo amd64 ;; - *) return 1 ;; - esac -} - -triplet_to_deb_dist() -{ - set -e - case "$arch" in - aarch64-*linux-gnu) echo trusty ;; - arm-*linux-gnueabi*) echo trusty ;; - i686-*linux-gnu) echo trusty ;; - x86_64-*linux-gnu) echo trusty ;; - *) return 1 ;; - esac -} - -if [ -z "$target" ]; then - echo ERROR: no target specified - exit 1 -fi - -if [ -z "$port" ]; then - port="22" -fi - -use_qemu=false -if ! triplet_to_deb_arch "$arch" >/dev/null 2>&1; then - use_qemu=true - arch="native" -fi - -if [ "x$arch" = "xnative" ]; then - cpu="$(ssh $target uname -m)" - case "$cpu" in - aarch64) arch=aarch64-linux-gnu ;; - armv7l) arch=arm-linux-gnueabihf ;; - armv7*) arch=arm-linux-gnueabi ;; - i686) arch=i686-linux-gnu ;; - x86_64) arch=x86_64-linux-gnu ;; - *) - echo "ERROR: unrecognized native target $cpu" - exit 1 - ;; - esac -fi - -if [ "x$board_exp" != "x" ] ; then - lava_json="$(grep "^set_board_info lava_json " $board_exp | sed -e "s/^set_board_info lava_json //")" - if [ "x$lava_json" != "x" ] && $begin_session; then - job_id="$(lava-tool submit-job http://maxim-kuvyrkov@validation.linaro.org/RPC2/ "$lava_json" | sed -e "s/submitted as job id: //")" - while sleep 60; do - if lava-tool job-output -o - http://maxim-kuvyrkov@validation.linaro.org/RPC2/ $job_id | grep "^Hacking session active" >/dev/null; then - lava_ssh_opts="$(lava-tool job-output -o - http://maxim-kuvyrkov@validation.linaro.org/RPC2/ $job_id | grep -a "^Please connect to" | sed -e "s/.* ssh \(.*\) \([^ ]*\) (.*$/\1/")" - lava_target="$(lava-tool job-output -o - http://maxim-kuvyrkov@validation.linaro.org/RPC2/ $job_id | grep -a "^Please connect to" | sed -e "s/.* ssh \(.*\) \([^ ]*\) (.*$/\2/")" - sed -i -e "s/^set_board_info hostname .*/set_board_info hostname $lava_target/" "$board_exp" - echo "set_board_info lava_ssh_opts \"$lava_ssh_opts\"" >> "$board_exp" - echo "set_board_info lava_job_id $job_id" >> "$board_exp" - - target="$lava_target" - target_ssh_opts="$target_ssh_opts $lava_ssh_opts" - break - fi - done - fi -fi - -deb_arch="$(triplet_to_deb_arch $arch)" -deb_dist="$(triplet_to_deb_dist $arch)" - -schroot_id=tcwg-test-$deb_arch-$deb_dist - -schroot="ssh $target_ssh_opts $target schroot -r -c session:tcwg-test-$port -d / -u root --" -rsh_opts="$target_ssh_opts -o Port=$port -o StrictHostKeyChecking=no" -rsh="ssh $rsh_opts" -user="$(ssh $target_ssh_opts $target echo \$USER)" -home="$(ssh $target_ssh_opts $target pwd)" - -if $gen_schroot; then - chroot=/tmp/$schroot_id.$$ - - # Make sure machine in the lab agree on what time it is. - ssh $target_ssh_opts $target \ - sudo ntpdate pool.ntp.org >/dev/null 2>&1 || true - - ssh $target_ssh_opts $target \ - sudo rm -rf $chroot - ssh $target_ssh_opts $target \ - sudo debootstrap \ - --arch=$deb_arch \ - --variant=minbase \ - --include=iptables,openssh-server,rsync,sshfs \ - --foreign \ - $deb_dist $chroot - # Copy qemu binaries to handle foreign schroots. - ssh $target_ssh_opts $target \ - sudo cp /usr/bin/qemu-\*-static $chroot/usr/bin/ || true - ssh $target_ssh_opts $target \ - sudo chroot $chroot ./debootstrap/debootstrap --second-stage & - pid=$! - while sleep 10; do - if ! ssh $target_ssh_opts $target ps -e -o cmd= | grep -v "grep\|ssh" | grep "./debootstrap/debootstrap --second-stage" >/dev/null; then - kill $pid || true - break - fi - done - - case "$deb_arch" in - amd64) extra_packages="qemu-user-static" ;; - *) extra_packages="" ;; - esac - - if ! [ -z "$extra_packages" ]; then - case "$deb_arch" in - amd64) deb_mirror="http://archive.ubuntu.com/ubuntu/" ;; - *) deb_mirror="http://ports.ubuntu.com/ubuntu-ports/" ;; - esac - ssh $target_ssh_opts $target \ - sudo chroot $chroot bash -c "\"for i in '' -updates -security -backports; do for j in '' -src; do echo deb\\\$j $deb_mirror $deb_dist\\\$i main restricted universe multiverse >> /etc/apt/sources.list; done; done\"" - ssh $target_ssh_opts $target \ - sudo chroot $chroot apt-get update - ssh $target_ssh_opts $target \ - sudo chroot $chroot apt-get install -y "$extra_packages" - fi - - if [ "$(echo "$extra_packages" | grep -c qemu-user-static)" = "0" ]; then - ssh $target_ssh_opts $target \ - sudo rm -f $chroot/usr/bin/qemu-\*-static - fi - - ssh $target_ssh_opts $target \ - sudo mkdir -p /var/chroots/ - ssh $target_ssh_opts $target \ - sudo bash -c "\"cd $chroot && tar --one-file-system -czf /var/chroots/$schroot_id.tgz .\"" - - ssh $target_ssh_opts $target \ - sudo rm -rf $chroot - - ssh $target_ssh_opts $target \ - sudo bash -c "\"cat > /etc/schroot/chroot.d/$schroot_id\"" <<EOF -[$schroot_id] -type=file -file=/var/chroots/$schroot_id.tgz -groups=buildslave,users -root-groups=buildslave,users -profile=tcwg-test -EOF - - if ! [ -z "$schroot_master" ]; then - scp $target_ssh_opts $target:/var/chroots/$schroot_id.tgz $schroot_master/ - mkdir -p $schroot_master/chroot.d/ - scp $target_ssh_opts $target:/etc/schroot/chroot.d/$schroot_id $schroot_master/chroot.d/ - fi -fi - -if ! [ -z "$schroot_master" ]; then - # Make sure machine in the lab agree on what time it is. - ssh $target_ssh_opts $target \ - sudo ntpdate pool.ntp.org >/dev/null 2>&1 || true - - ssh $target_ssh_opts $target \ - sudo mkdir -p /var/chroots/ - - cat $schroot_master/$schroot_id.tgz | ssh $target_ssh_opts $target \ - sudo bash -c "\"cat > /var/chroots/$schroot_id.tgz\"" - cat $schroot_master/chroot.d/$schroot_id | ssh $target_ssh_opts $target \ - sudo bash -c "\"cat > /etc/schroot/chroot.d/$schroot_id\"" - - (cd $schroot_master && tar -c tcwg-test/ | ssh $target_ssh_opts $target \ - sudo bash -c "\"cd /etc/schroot && rm -rf tcwg-test && tar -x && chown -R root:root tcwg-test/\"") -fi - -if $begin_session; then - ssh $target_ssh_opts $target schroot -b -c chroot:$schroot_id -n tcwg-test-$port -d / - # Set ssh port - $schroot sed -i -e "\"s/^Port 22/Port $port/\"" /etc/ssh/sshd_config - # Run as root - $schroot sed -i -e "\"s/^UsePrivilegeSeparation yes/UsePrivilegeSeparation no/\"" /etc/ssh/sshd_config - # Increase number of incoming connections from 10 to 256 - $schroot sed -i -e "\"/.*MaxStartups.*/d\"" -e "\"/.*MaxSesssions.*/d\"" /etc/ssh/sshd_config - $schroot bash -c "\"echo \\\"MaxStartups 256\\\" >> /etc/ssh/sshd_config\"" - $schroot bash -c "\"echo \\\"MaxSessions 256\\\" >> /etc/ssh/sshd_config\"" - $schroot sed -i -e "'/check_for_upstart [0-9]/d'" /etc/init.d/ssh - $schroot /etc/init.d/ssh start - # Crouton needs firewall rule. - $schroot iptables -I INPUT -p tcp --dport $port -j ACCEPT || true - # Debian (but not Ubuntu) has wrong permissions on /bin/fusermount. - $schroot chmod +x /bin/fusermount || true - - $schroot mkdir -p /root/.ssh - ssh $target_ssh_opts $target cat .ssh/authorized_keys | $schroot bash -c "'cat > /root/.ssh/authorized_keys'" - $schroot chmod 0600 /root/.ssh/authorized_keys - - $rsh root@$target rsync -a /root/ $home/ - $rsh root@$target chown -R $user $home/ - - echo $target:$port started schroot: $rsh $target -fi - -if ! [ -z "$shared_dir" ]; then - # Generate a one-time key to allow ssh back to host. - ssh-keygen -t rsa -N "" -C "test-schroot.$$" -f ~/.ssh/id_rsa-test-schroot.$$ - echo >> ~/.ssh/authorized_keys - cat ~/.ssh/id_rsa-test-schroot.$$.pub >> ~/.ssh/authorized_keys - scp $rsh_opts ~/.ssh/id_rsa-test-schroot.$$ $target:.ssh/ - - $rsh root@$target mkdir -p "$shared_dir" - $rsh root@$target chown -R $user "$shared_dir" - - $rsh root@$target rm -f /etc/mtab - $rsh root@$target ln -s /proc/mounts /etc/mtab - tmp_ssh_port="$(($port-10000))" - host_ssh_port="$(grep "^Port" /etc/ssh/sshd_config | sed -e "s/^Port //")" - test -z "$host_ssh_port" && host_ssh_port="22" - # Establish port forwarding - $rsh -fN -S none -R $tmp_ssh_port:127.0.0.1:$host_ssh_port $target - $rsh $target sshfs -o ssh_command="ssh -o Port=$tmp_ssh_port -o IdentityFile=$home/.ssh/id_rsa-test-schroot.$$ -o StrictHostKeyChecking=no $host_ssh_opts" "$USER@127.0.0.1:$shared_dir" "$shared_dir" - - # Remove temporary key and delete extra empty lines at the end of file. - sed -i -e "/.*test-schroot\.$$\$/d" -e '/^$/N;/\n$/D' ~/.ssh/authorized_keys - rm ~/.ssh/id_rsa-test-schroot.$$* - - echo $target:$port shared directory $shared_dir -fi - -if ! [ -z "$sysroot" ]; then - rsync -az -e "$rsh" $sysroot/ root@$target:/sysroot/ - - if ! $use_qemu; then - # Make sure that sysroot libraries are searched before any other. - $rsh root@$target "cat > /etc/ld.so.conf.new" <<EOF -/$multilib_path -/usr/$multilib_path -EOF - $rsh root@$target "cat /etc/ld.so.conf >> /etc/ld.so.conf.new" - $rsh root@$target "mv /etc/ld.so.conf.new /etc/ld.so.conf && rsync -a --exclude=/sysroot /sysroot/ / && ldconfig" - else - # Remove /etc/ld.so.cache to workaround QEMU problem for targets with - # different endianness (i.e., /etc/ld.so.cache is endian-dependent). - $rsh root@$target "rm /etc/ld.so.cache" - # Cleanup runaway QEMU processes that ran for more than 2 minutes. - $rsh -f $target bash -c "\"while sleep 30; do ps uxf | sed -e \\\"s/ \+/ /g\\\" | cut -d\\\" \\\" -f 2,10- | grep \\\"^[0-9]\+ [0-9]*2:[0-9]\+ ._ qemu-\\\" | cut -d\\\" \\\" -f 1 | xargs -r kill -9; done\"" - fi - echo $target:$port installed sysroot $sysroot -fi - -if $ssh_master; then - $rsh -fMN $target -fi - -if $finish_session; then - $schroot iptables -I INPUT -p tcp --dport $port -j REJECT || true - $schroot /etc/init.d/ssh stop || true - ssh $target_ssh_opts $target schroot -e -c session:tcwg-test-$port - echo $target:$port finished session -fi - -if [ "x$board_exp" != "x" ] ; then - lava_job_id="$(grep "^set_board_info lava_job_id " $board_exp | sed -e "s/^set_board_info lava_job_id //")" - if [ "x$lava_job_id" != "x" ] && $finish_session; then - lava-tool cancel-job http://maxim-kuvyrkov@validation.linaro.org/RPC2/ $lava_job_id - fi -fi diff --git a/sum2junit.sh b/sum2junit.sh deleted file mode 100755 index 02fd40c..0000000 --- a/sum2junit.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# -# This script converts a DejaGnu .sum file into a Junit copatible -# XML file. -# - -if test x"$1" = x; then - outfile="/tmp/testrun.xml" - infile="/tmp/testrun.sum" -else - outfile=`echo $1 | sed -e 's/\.sum.*/.junit/'` - infile=$1 -fi - -# Where to put the output file -if test x"$2" != x; then - outfile=$2 -else - outfile="/tmp/${outfile}" -fi - -if test ! -e ${infile}; then - echo "ERROR: no input file specified!" - exit -fi - -# If compressed, uncompress it -type="`file ${infile}`" -count=`echo ${type} | grep -c "XZ compressed data"` -if test ${count} -gt 0; then - catprog="xzcat" - decomp="xz -d" - comp="xz" -else - count=`echo ${type} | grep -c "XZ compressed data"` - if test ${count} -gt 0; then - catprog="gzcat" - decomp="gzip" - comp="gunzip" - else - catprog="cat" - fi -fi - -# -#${decomp} ${infile} -#infile="`echo ${infile} | sed -e 's:\.xz::' -e 's:\.gz::'`" -tool="`grep "tests ===" ${infile} | tr -s ' ' | cut -d ' ' -f 2`" - -# Get the counts for tests that didn't work properly -skipped="`egrep -c '^UNRESOLVED|^UNTESTED|^UNSUPPORTED' ${infile}`" -if test x"${skipped}" = x; then - skipped=0 -fi - -# The total of successful results are PASS and XFAIL -passes="`egrep -c '^PASS|XFAIL' ${infile}`" -if test x"${passes}" = x; then - passes=0 -fi - -# The total of failed results are FAIL and XPASS -failures="`egrep -c '^XFAIL|XPASS' ${infile}`" -if test x"${failures}" = x; then - failures=0 -fi - -# Calculate the total number of test cases -total="`expr ${passes} + ${failures}`" -total="`expr ${total} + ${skipped}`" - -cat <<EOF > ${outfile} -<?xml version="1.0"?> - -<testsuites> -<testsuite name="DejaGnu" tests="${total}" failures="${failures}" skipped="${skipped}"> - -EOF - -# Reduce the size of the file to be parsed to improve performance. Junit -# ignores sucessful test results, so we only grab the failures and test -# case problem results. -tmpfile="${infile}.tmp" -rm -f ${tmpfile} -egrep 'XPASS|FAIL|UNTESTED|UNSUPPORTED|UNRESOLVED' ${infile} > ${tmpfile} - -while read line -do - echo -n "." - result="`echo ${line} | cut -d ' ' -f 1 | tr -d ':'`" - name="`echo ${line} | cut -d ' ' -f 2`" - message="`echo ${line} | cut -d ' ' -f 3-50 | tr -d '\"><;:\[\]^\\&?@'`" - - echo " <testcase name=\"${name}\" classname=\"${tool}-${result}\">" >> ${outfile} - case "${result}" in - UNSUPPORTED|UNTESTED|UNRESOLVED) - if test x"${message}" != x; then - echo -n " <skipped message=\"${message}" >> ${outfile} - else - echo -n " <skipped type=\"${result}" >> ${outfile} - fi - ;; - XPASS|XFAIL) - echo -n " <failure message=\"${message}" >> ${outfile} - ;; - *) - echo -n " <failure message=\"${message}" >> ${outfile} - esac - echo "\"/>" >> ${outfile} - - echo " </testcase>" >> ${outfile} -done < ${tmpfile} -rm -f ${tmpfile} - -# Write the closing tag for the test results -echo "</testsuite>" >> ${outfile} -echo "</testsuites>" >> ${outfile} - -# compress the file again -#${comp} ${infile} - diff --git a/tcwgweb.sh b/tcwgweb.sh deleted file mode 100755 index 41fa19c..0000000 --- a/tcwgweb.sh +++ /dev/null @@ -1,314 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# load the configure file produced by configure -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -fi - -# load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" - -. "${topdir}/lib/common.sh" || exit 1 - -# Globals shared between email and gerrit notifications -returncode="0" -returnstr="ALLGOOD" -resultsfile="/tmp/test-results$$.txt" - -usage() -{ - cat << EOF ---email : Send email of the validation results ---tdir dir1 dir2 : Compare the test results in 2 subdirectories -EOF - return 0 -} - -# $1 - the check.log file to scan -scancheck () -{ - if ! test -e $1; then -# echo "ERROR: $1 doesn't exist!" - return 1 - fi - - # If there are no errors, just return - if test "`egrep -c "^gcc: error: |^collect2: error: | undefined reference to | Download to .* failed, ssh: connect to host " $1`" -eq 0; then - return 0 - fi - - local build="`basename $1`" - local build="`basename ${build}`" - - # These are the errors we want to scan for - declare -a errors=("^gcc: error:" "^collect2: error:" " undefined reference to" "Download to .* failed, ssh: connect to host") - # These are the pretty print version for users for each error above - declare -a errmsg=("compile error" "linker error" "undefined symbols" "target connectivity") - rm -f /tmp/mail$$.txt - echo "Testsuite build failures found in ${build}" > /tmp/mail$$.txt - echo "" >> /tmp/mail$$.txt - echo "Check build log: http://abe.tcwglab.linaro.org/$1.xz" >> /tmp/mail$$.txt - echo "" >> /tmp/mail$$.txt - local i=0 - while test $i -lt ${#errors[@]}; do - local count="`grep -c "${errors[$i]}" $1`" - if test ${count} -gt 0; then - echo "# of ${errmsg[$i]}: ${count}" >> /tmp/mail$$.txt - fi - i="`expr $i + 1`" - done - - mailto "Testsuite build failures in ${build}!" /tmp/mail$$.txt - - rm /tmp/mail$$.txt -} - -# $1 - the current directory to use when comparing against the baseline -diffbaseline () -{ - source $1/manifest.txt - - local baselines="/work/cbuildv2/baselines" - local tool="`echo $2 | cut -d '-' -f 1`" - local tool="`basename ${tool}`" - local version="`echo $2 | grep -o "[0-9]\.[0-9]*" | head -1`" - local dir="${baselines}/${tool}-${version}/" - - difftwodirs ${dir}/$1 $2 -} - -# -# diffall dir1 dir2 -# Takes a two directories and compares the sum files -difftwodirs () -{ - local prev=$1 - local next=$2 - - if test -d ${prev}; then - if ! test -e ${prev}/gcc.sum.xz; then - echo "WARNING: ${prev} has no test results!" - return 0 - fi - else - echo "WARNING:${prev} doesn't exist!" - return 0 - fi - - # Don't diff it's already been done - if test -e $next/testsuite-diff.txt; then - return 0 - fi - - echo "Diffing: ${prev} against ${next}..." - - local gcc_version="`grep 'gcc_version=' ${next}/manifest.txt | cut -d '=' -f 2`" - if test x"${gcc_version}" = x"gcc.git"; then - local gcc_branch="gcc.git~master" - else - local gcc_branch="${gcc_version}" - fi - local binutils_version="`grep 'binutils_version=' ${next}/manifest.txt | cut -d '=' -f 2`" - local binutils_revision="`grep 'binutils_revision=' ${next}/manifest.txt | cut -d '=' -f 2`" - local cversion="`grep 'gcc_revision=' ${next}/manifest.txt | cut -d '=' -f 2`" - if test -e ${prev}/manifest.txt; then - local pversion="`grep 'gcc_revision=' ${prev}/manifest.txt | cut -d '=' -f 2`" - else - local pversion=${cversion} - fi - local toplevel="`dirname ${prev}`" - -# diffdir="/tmp/diffof-${gcc_version}" - diffdir="/tmp/diffof-${pversion}-${cversion}" - mkdir -p ${diffdir} - local files="`ls ${prev}/*.sum.xz | wc -l`" - if test ${files} -gt 0; then - unxz ${prev}/*.sum.xz - fi - unxz ${next}/*.sum.xz - unxz ${next}/check*.log.xz - # FIXME: LD and gfortran has problems in the testsuite, so it's temporarily not - # analyzed for errors. - local regressions=0 - touch ${resultsfile} - echo "Comparison of ${gcc_branch} between:" >> ${resultsfile} - echo " ${prev} and" >> ${resultsfile} - echo " ${next}" >> ${resultsfile} - echo " " >> ${resultsfile} - for i in gcc g\+\+ libstdc++ gas gdb glibc egibc newlib binutils libatomic libgomp libitm; do - if test -e ${prev}/$i.sum -a -e ${next}/$i.sum; then - sort ${prev}/$i.sum -o ${prev}/$i-sort.sum - sort ${next}/$i.sum -o ${next}/$i-sort.sum - diff -U 0 ${prev}/$i-sort.sum ${next}/$i-sort.sum 2>&1 | egrep '^[+-]PASS|^[-]FAIL|^[+-]XPASS|^[+-]XFAIL' 2>&1 | sort -k 2 2>&1 > ${diffdir}/diff-$i.txt - rm ${prev}/$i-sort.sum ${next}/$i-sort.sum - if test -s ${diffdir}/diff-$i.txt; then - if test `grep -c ^\+PASS ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${resultsfile} - echo "Tests that were failing that now PASS" >> ${resultsfile} - echo "-------------------------------------" >> ${resultsfile} - grep ^\+PASS ${diffdir}/diff-$i.txt >> ${resultsfile} - local regressions=1 - fi - if test `grep -c ^\+FAIL ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${resultsfile} - echo "Tests that were passing that now FAIL" >> ${resultsfile} - echo "-------------------------------------" >> ${resultsfile} - grep ^\+FAIL ${diffdir}/diff-$i.txt >> ${resultsfile} - local regressions=1 - fi - if test `grep -c ^\+XPASS ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${resultsfile} - echo "Tests that were expected failures that now PASS" >> ${resultsfile} - echo "-----------------------------------------------" >> ${resultsfile} - grep ^\+XPASS ${diffdir}/diff-$i.txt >> ${resultsfile} - local regressions=1 - fi - if test `grep -c ^\+UN ${diffdir}/diff-$i.txt` -gt 0; then - echo "" >> ${resultsfile} - echo "Tests that have problems" >> ${resultsfile} - echo "------------------------" >> ${resultsfile} - grep ^\+UN ${diffdir}/diff-$i.txt >> ${resultsfile} - local regressions=1 - fi - echo "" >> ${resultsfile} - grep "^# of " ${next}/$i.sum >> ${resultsfile} - echo "" >> ${resultsfile} - local userid="`grep 'email=' ${next}/manifest.txt | cut -d '=' -f 2`" - if test ${regressions} -gt 0; then - echo "$i had regressions between ${pversion} and ${cversion}!" >> ${resultsfile} -# echo "" >> ${resultsfile} - returncode="1" - returnstr="REGRESSIONS" - fi - else - echo "$i had no regressions" >> ${resultsfile} - fi - fi - - # Scan the check log for testsuite build errors - scancheck ${next}/check-$i.log.xz - done - - local wwwpath="/logs/gcc-linaro-${gcc_version}/`echo ${next} | sed -e 's:/work::' -e 's:/space::'`" - echo "Build logs: http://abe.tcwglab.linaro.org${wwwpath}/" >> ${resultsfile} - echo "" >> ${resultsfile} - local lineno="`grep -n -- "----" ${prev}/manifest.txt | grep -o "[0-9]*"`" - if test x"${lineno}" != x; then - sed -e "1,${lineno}d" ${prev}/manifest.txt >> ${resultsfile} - echo "" >> ${resultsfile} - fi - - mailto "Test results for ${gcc_branch}" ${resultsfile} ${userid} - - rm -fr ${diffdir} - local incr=`expr ${incr} + 1` - - # Not all subdirectories have uncompressed sum files - local files="`ls ${prev}/*.sum | wc -l`" - if test ${files} -gt 0; then - xz ${prev}/*.sum - fi - local files="`ls ${next}/*.sum | wc -l`" - if test ${files} -gt 0; then - xz ${next}/*.sum - fi - echo ${returnstr} -} - -# -# diffall "list" -# Takes a list of directories and compares them one by one in sequence. -diffall () -{ - local count="`echo $1| wc -w`" - if test ${count} -gt 0; then - declare -a foo=($1) - local incr=0 - while test ${incr} -lt ${count}; do - local next=`expr ${incr} + 1` - if test ${next} = ${count}; then - return 0 - fi - - difftwodirs ${foo[${incr}]} ${foo[${next}]} - local incr=`expr ${incr} + 1` - done - fi -} - - -# This produces the test file, who's header needs to look like this: -# -# Difference in testsuite results between: -# gcc-linaro-4.8-2014.01 build i686-precise-cbuild461-oort8-i686r1 -# and the one before it: -# gcc-linaro-4.8-2013.12 build i686-precise-cbuild461-oort2-i686r1 - -# ------ -testfile() -{ - - orig="`echo $1 | grep -o "[a-z]*-linaro[0-9\.\-]*"`" - next="`echo $2 | grep -o "[a-z]*-linaro[0-9\.\-]*"`" - origdir="`basename $1`" - nextdir="`basename $2`" - - cat <<EOF > ${diffdir}/testsuite-diff.txt -Difference in testsuite results between: - ${orig} build ${origdir} -and the one before it: - ${next} build ${nextdir} - ------- -EOF - - cat ${diffdir}/diff.txt >> ${diffdir}/testsuite-diff.txt - cp ${diffdir}/testsuite-diff.txt $1 - cp ${diffdir}/testsuite-diff.txt $2 -} - -# ---------------------------------------------------------------------- -# Start to actually do something - -if test $# -eq 0; then - usage -fi - -OPTS="`getopt -o etb:h -l email:tdir:help:branch -- "$@"`" -while test $# -gt 0; do - echo 1 = "$1" - case $1 in - -e|--email) email=yes ;; - -b|--branch) branch=$2 ;; - -t|--tdir) difftwodirs "$2" "$3" - shift ; shift ;; - -h|--help) usage ;; - --) break ;; - esac - shift -done - -srcdir="linaro/shared/snapshots/gcc.git" -gerrit_info ${srcdir} -gerrit_build_status ${srcdir} 0 ${resultsfile} - -rm -fr ${resultsfile} -# cat ${resultsfile} diff --git a/test-backport.sh b/test-backport.sh deleted file mode 100755 index 4dadb36..0000000 --- a/test-backport.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# To run, this script takes arguments in the same format as cbuild2.sh. The two -# arguments it needs is the target archicture to build, and the gcc backport -# branch name. Example: -# $PATH/test-backport.sh --target arm-linux-gnueabihf gcc.git~4.9-backport-209419 -usage() -{ - # Format this section with 75 columns. - cat << EOF - test-backport.sh [--help] [f|--fileserver remote file server] --target triplet branch -EOF - return 0 -} - -if test $# -lt 2; then - echo "ERROR: No branches to build!" - usage - exit -fi - -# load commonly used functions -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -else - echo "Error: this script needs to be run from a configured Cbuild2 tree!" 1>&2 -fi -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" - -repo="gcc.git" -fileserver="" -branch="" - -OPTS="`getopt -o s:r:f:w:o:t:g:h -l target:fileserver:help:snapshots:repo:workspace:options -- "$@"`" -while test $# -gt 0; do - echo 1 = "$1" - case $1 in - -s|--snapshots) local_snapshots=$2 ;; - -f|--fileserver) fileserver=$2 ;; - -r|--repo) repo=$2 ;; - -w|--workspace) user_workspace=$2 ;; - -o|--options) user_options=$2 ;; - -t|--target) target=$2 ;; - -h|--help) usage ;; - *) branch=$1;; - --) break ;; - esac - shift -done - -if test "`echo ${branch} | grep -c gcc.git`" -gt 0; then - branch="`echo ${branch} | sed -e 's:gcc.git~::'`" -fi - -if test x"${git_reference_dir}" != x; then - srcdir="${git_reference_dir}/${branch}" -else - git_reference_dir="${local_snapshots}" - srcdir="${local_snapshots}/${branch}" -fi - -rm -fr ${srcdir} -git-new-workdir ${git_reference_dir}/${repo} ${srcdir} ${branch} - -# Get the last two revisions -declare -a revisions=(`cd ${srcdir} && git log -n 2 | grep ^commit | cut -d ' ' -f 2`) - -# Force GCC to not build the docs -export BUILD_INFO="" - -resultsdir="/tmp/cbuild-${target}@" -i=0 -while test $i -lt ${#revisions[@]}; do - bash -x ${topdir}/cbuild2.sh --disable update --check --target ${target} gcc=gcc.git@${revisions[$i]} --build all --disable make_docs - if test $? -gt 0; then - echo "ERROR: Cbuild2 failed!" - exit 1 - fi - sums="`find ${local_builds}/${build}/${target} -name \*.sum`" - logs="`echo ${sums} | sed 's/\.sum/.log/g'`" - manifest="`find ${local_builds}/${build}/${target} -name manifest.txt`" - if test x"${sums}" != x; then - mkdir -p ${resultsdir}${revisions[$i]} - cp -f ${sums} ${logs} ${manifest} ${resultsdir}${revisions[$i]}/ - # We don't need these files leftover from the DejaGnu testsuite - # itself. - xz -f ${resultsdir}${revisions[$i]}/*.{sum,log} - rm -f ${resultsdir}${revisions[$i]}/{x,xXx,testrun}.* - fi - mv ${manifest} ${manifest}.${revisions[$i]} - i="`expr $i + 1`" -done - -# Test results and logs optionally get copied to this fileserver. -if test x"${fileserver}" != x; then - # Get a list of all files that need to be copied - basedir="/work/logs" - dir="gcc-linaro-${version}/${branch}${revision}/${arch}.${target}-${job}${BUILD_NUMBER}" - ssh ${fileserver} mkdir -p ${basedir}/${dir} - # Compress and copy all files from the first build - xz ${resultsdir}${revisions[0]}/*.sum ${resultsdir}${revisions[0]}/*.log - scp ${resultsdir}${revisions[0]}/* ${fileserver}:${basedir}/${dir}/ - -# Compress and copy all files from the second build - xz ${resultsdir}${revisions[1]}/*.sum ${resultsdir}${revisions[1]}/*.log - scp ${resultsdir}${revisions[1]}/* ${fileserver}:${basedir}/${dir}/ -fi - -# Diff the two directories -/bin/bash -x ${topdir}/tcwgweb.sh --email --tdir ${resultsdir}${revisions[0]} ${resultsdir}${revisions[1]} diff --git a/test.sh b/test.sh deleted file mode 100755 index e1d5f97..0000000 --- a/test.sh +++ /dev/null @@ -1,641 +0,0 @@ -#!/bin/bash - -testcbuild2="`basename $0`" -topdir=`dirname $0` -cbuild_path=`readlink -f ${topdir}` -export cbuild_path - -# Source common.sh for some common utilities. -. ${cbuild_path}/lib/common.sh || exit 1 - -# We use a tmp/ directory for the builddir in order that we don't pollute the -# srcdir or an existing builddir. -tmpdir=`mktemp -d /tmp/cbuild2.$$.XXX` -if test "$?" -gt 0; then - error "mktemp of ${tmpdir} failed." - exit 1 -fi - -# Log files for cbuild test runs are dumped here. -testlogs=${tmpdir}/testlogs -mkdir -p ${testlogs} -if test "$?" -gt 0; then - error "couldn't create '${testlogs}' directory." - exit 1 -fi - -runintmpdir= -# If the current working directory has a host.conf in it we assume it's an -# existing build dir, otherwise we're in the srcdir so we need to run -# configure in the tmpdir and run the tests from there. -if test ! -e "${PWD}/host.conf"; then - (cd ${tmpdir} && ${cbuild_path}/configure --with-sources-conf=${cbuild_path}/testsuite/test_sources.conf) - runintmpdir=yes -else - # copy the md5sums file from the existing snapshots directory to the new local_snapshots directory. - - # Override $local_snapshots so that the local_snapshots directory of an - # existing build is not moved or damaged. This affects all called - # instances of cbuild2.sh below. - export local_snapshots="${tmpdir}/snapshots" - out="`mkdir -p ${local_snapshots}`" - if test "$?" -gt 0; then - error "couldn't create '${local_snapshots}' directory." - exit 1 - fi - # Override the existing sources_conf setting in host.conf. - export sources_conf=${cbuild_path}testsuite/test_sources.conf -fi - -export wget_quiet=yes - -usage() -{ - echo " ${testcbuild2} [--debug|-v]" - echo " [--md5sums <path/to/alternative/snapshots/md5sums>]" - echo "" - echo " ${testcbuild2} is the cbuild2 frontend command conformance test." - echo "" - echo " ${testcbuild2} should be run from the source directory." -} - -passes=0 - -pass() -{ - local testlineno=$1 - if test x"${debug}" = x"yes"; then - echo -n "($testlineno) " 1>&2 - fi - echo "PASS: '$2'" - passes="`expr ${passes} + 1`" -} - -failures=0 -fail() -{ - local testlineno=$1 - if test x"${debug}" = x"yes"; then - echo -n "($testlineno) " 1>&2 - fi - echo "FAIL: '$2'" - failures="`expr ${failures} + 1`" -} - -totals() -{ - echo "" - echo "Total test results:" - echo " Passes: ${passes}" - echo " Failures: ${failures}" -} - - - -cbtest() -{ - local testlineno=$1 - if test x"${debug}" = x"yes"; then - echo "($testlineno) out: $2" 1>&2 - fi - - case "$2" in - *$3*) - pass ${testlineno} "$4" - ;; - *) - fail ${testlineno} "$4" - ;; - esac - - if test x"${debug}" = x"yes"; then - echo "-----------" 1>&2 - fi -} - -m5sums= -debug= -while test $# -gt 0; do - case "$1" in - --h*|-h) - usage - exit 1 - ;; - --deb*|-deb|-v) - debug="yes" - ;; - --md5*|-md5*) - if test `echo $1 | grep -c "\-md5.*="` -gt 0; then - error "A '=' is invalid after --md5sums. A space is expected." - exit 1; - fi - if test -z $2; then - error "--md5sums requires a path to an md5sums file." - exit 1; - fi - md5sums=$2 - if test ! -e "$md5sums"; then - error "Path to md5sums is invalid." - exit 1; - fi - echo "Copying ${md5sums} to ${local_snapshots} for snapshots file." - cp ${md5sums} ${local_snapshots} - ;; - *) - ;; - esac - - if test $# -gt 0; then - shift - fi -done - -test_failure() -{ - local testlineno=$BASH_LINENO - local cb_commands=$1 - local match=$2 - local out= - - out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" - cbtest ${testlineno} "${out}" "ERROR ${match}" "ERROR ${cb_commands}" -} - -test_pass() -{ - local testlineno=$BASH_LINENO - local cb_commands=$1 - local match=$2 - local out= - - # Continue to search for error so we don't get false positives. - out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" - cbtest ${testlineno} "${out}" "${match}" "VALID ${cb_commands}" -} - -test_config_default() -{ - local feature="$1" - local feature_match="$2" - local skip_match="$3" - local perform_match="$4" - - # If we're running in an existing build directory we don't know WHAT the - # user has set as the default so we set it to 'yes' explicity, and preserve - # the original. - indir=${PWD} - if test x"${runintmpdir}" != x""; then - indir=${tmpdir} - fi - cp ${indir}/host.conf ${indir}/host.conf.orig - trap "cp ${indir}/host.conf.orig ${indir}/host.conf" EXIT - - sed -i -e "s/^${feature}=.*/${feature}=yes/" "${indir}/host.conf" - - # The default. - cb_commands="--dump" - match="${feature_match} *yes" - test_pass "${cb_commands}" "${match}" - - cb_commands="--dump --disable ${feature}" - match="${feature_match} *no" - test_pass "${cb_commands}" "${match}" - - # Change the configured default to 'no' - sed -i -e "s/${feature}=.*/${feature}=no/" "${indir}/host.conf" - - # Verify that it's now 'no' - cb_commands="--dump" - match="${feature_match} *no" - test_pass "${cb_commands}" "${match}" - - # Verify that 'enable ${feature}' now works. - cb_commands="--dump --enable ${feature}" - match="${feature_match} *yes" - test_pass "${cb_commands}" "${match}" - - mv ${indir}/host.conf.orig ${indir}/host.conf - trap - EXIT - - # Let's make sure the stage is actually skipped. - # --force makes sure we run through to the stage even - # if the builddir builds stamps are new. - cb_commands="--dryrun --force --target arm-none-linux-gnueabihf --disable ${feature} --build all" - test_pass "${cb_commands}" "${skip_match}" - - # Let's make sure the stage is actually NOT skipped. - # --force makes sure we run through to the stage even - # if the builddir builds stamps are new. - cb_commands="--dryrun --force --target arm-none-linux-gnueabihf --enable ${feature} --build all" - test_pass "${cb_commands}" "${perform_match}" -} - -cb_commands="--dry-run" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dry" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="-dry" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dr" -match="Command not recognized" -test_failure "${cb_commands}" "${match}" - -cb_commands="-dr" -match="Command not recognized" -test_failure "${cb_commands}" "${match}" - -cb_commands="--drnasdfa" -match="Command not recognized" -test_failure "${cb_commands}" "${match}" - -# Test for expected failure for removed deprecated feature --dostep. -cb_commands="--dostep" -match="Command not recognized" -test_failure "${cb_commands}" "${match}" - -cb_commands="--target=foo" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--target" -match="target requires a directive" -test_failure "${cb_commands}" "${match}" - -cb_commands="--timeout" -match="timeout requires a directive" -test_failure "${cb_commands}" "${match}" - -cb_commands="--timeout=foo" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--timeout 25" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--target foo" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--build=all" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--dryrun --build --foobar" -match="found the next" -test_failure "${cb_commands}" "${match}" - -cb_commands="--dryrun --build" -match="requires a directive" -test_failure "${cb_commands}" "${match}" - -cb_commands="--checkout" -match="requires a directive" -test_failure "${cb_commands}" "${match}" - -cb_commands="--checkout=all" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--checkout --all" -match="found the next" -test_failure "${cb_commands}" "${match}" - -cb_commands="--checkout --foo" -match="found the next" -test_failure "${cb_commands}" "${match}" - -cb_commands="--dryrun --checkout all" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun --checkout gcc.git" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun --target arm-none-linux-gnueabihf --checkout glibc.git" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun --target arm-none-linux-gnueabihf --checkout=glibc.git" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--dryrun --target arm-none-linux-gnueabihf --checkout all" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--set=libc=glibc" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--set" -match="requires a directive" -test_failure "${cb_commands}" "${match}" - -cb_commands="--release=foobar" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--release" -match="requires a directive" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -libc="foo" -cb_commands="--target ${target} --set libc=${libc}" -match="set_package" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -libc="eglibc" -cb_commands="--target ${target} --set libc=${libc}" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -libc="glibc" -cb_commands="--target ${target} --set libc=${libc}" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target}" -match='' -test_pass "${cb_commands}" "${match}" - -target="aarch64-none-elf" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='newlib' -test_pass "${cb_commands}" "${match}" - -target="armeb-none-linux-gnueabihf" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='eglibc' -test_pass "${cb_commands}" "${match}" - -target="armeb-linux-gnueabihf" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='eglibc' -test_pass "${cb_commands}" "${match}" - -target="armeb-none-linux-gnueabi" -cb_commands="--target ${target} --dump" -match='eglibc' -test_pass "${cb_commands}" "${match}" - -target="armeb-linux-gnueabi" -cb_commands="--target ${target} --dump" -match='eglibc' -test_pass "${cb_commands}" "${match}" - -target="armeb-none-linux-gnueabi" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='eglibc' -test_pass "${cb_commands}" "${match}" - -target="armeb-none-eabi" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='newlib' -test_pass "${cb_commands}" "${match}" - -target="arm-none-eabi" -# A baremetal target should pick the right clibrary (newlib) -cb_commands="--target ${target} --dump" -match='newlib' -test_pass "${cb_commands}" "${match}" - -target="aarch64-none-elf" -libc="newlib" -cb_commands="--target ${target} --set libc=${libc}" -match='' -test_pass "${cb_commands}" "${match}" - -# Verify that setting glibc=glibc.git will fail for baremetal. -cb_commands="--dryrun --target aarch64-none-elf glibc=glibc.git" -match='crosscheck_clibrary_target' -test_failure "${cb_commands}" "${match}" - -# Verify that glibc=glibc.git will fail when se before the target -# for baremetal. -cb_commands="--dryrun glibc=glibc.git --target aarch64-none-elf" -match='crosscheck_clibrary_target' -test_failure "${cb_commands}" "${match}" - -cb_commands="--snapshots" -match='requires a directive' -test_failure "${cb_commands}" "${match}" - -cb_commands="--stage" -match='requires a directive' -test_failure "${cb_commands}" "${match}" - -cb_commands="--stage a" -match='stage requires a 2 or 1 directive' -test_failure "${cb_commands}" "${match}" - -cb_commands="--stage 3" -match='stage requires a 2 or 1 directive' -test_failure "${cb_commands}" "${match}" - -cb_commands="--stage 3" -match='stage requires a 2 or 1 directive' -test_failure "${cb_commands}" "${match}" - - -cb_commands="--snapshots --sooboo" -match='found the next' -test_failure "${cb_commands}" "${match}" - -cb_commands="--snapshots=foo/bar --build all" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--dryrun --snapshots ${local_snapshots} --build all" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun --build gcc.git" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dryrun --build asdflkajsdflkajsfdlasfdlaksfdlkaj.git" -match="Couldn't find the source for" -test_failure "${cb_commands}" "${match}" - -# This tests that --build can go before --target and --target is still processed correctly. -cb_commands="--dryrun --build all --target arm-none-linux-gnueabihf --dump" -match='arm-none-linux-gnueabihf' -test_pass "${cb_commands}" "${match}" - -# This tests that --checkout can go before --target and --target is still processed correctly. -cb_commands="--dryrun --checkout all --target arm-none-linux-gnueabihf --dump" -match='arm-none-linux-gnueabihf' -test_pass "${cb_commands}" "${match}" - -test_config_default make_docs 'Make Documentation' 'Skipping make docs' 'Making docs in' -test_config_default install 'Install' 'Skipping make install' 'Making install in' - -# The default. -cb_commands="--dump" -match='Bootstrap no' -test_pass "${cb_commands}" "${match}" - -cb_commands="--enable bootstrap --dump" -match='Bootstrap yes' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dump" -match='Install yes' -test_pass "${cb_commands}" "${match}" - -cb_commands="--disable install --dump" -match='Install no' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dump" -match='Source Update yes' -test_pass "${cb_commands}" "${match}" - -cb_commands="--disable update --dump" -match='Source Update no' -test_pass "${cb_commands}" "${match}" - -# Test dump ordering. --target processing is immediate, so --dump -# should work before or after --target. -cb_commands="--target arm-linux-gnueabihf --dump" -match='Target is\: arm-linux-gnueabihf' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dump --target arm-linux-gnueabihf" -match='Target is\: arm-linux-gnueabihf' -test_pass "${cb_commands}" "${match}" - -# This tests that --checkout and --build can be run together. -cb_commands="--dryrun --target arm-none-linux-gnueabihf --checkout all --build all" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="--set" -match='requires a directive' -test_failure "${cb_commands}" "${match}" - -cb_commands="--set --foobar" -match='found the next' -test_failure "${cb_commands}" "${match}" - -cb_commands="--set=libc=glibc" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - -cb_commands="--set gcc=meh" -match="'gcc' is not a supported package" -test_failure "${cb_commands}" "${match}" - -cb_commands="--set libc=glibc" -match='' -test_pass "${cb_commands}" "${match}" - -cb_commands="glibc=glibc.git" -match='' -test_pass "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} glibc=glibc.git" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} eglibc=eglibc.git" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} newlib=newlib.git" -match='' -test_pass "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} --set libc=glibc" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--set libc=glibc --target ${target}" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--set libc=newlibv --target ${target}" -match='' -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} --set libc=newlib" -match='' -test_pass "${cb_commands}" "${match}" - -# The same as previous but with other commands mixed in. -target="aarch64-none-elf" -cb_commands="--set libc=glibc --dry-run --build all --target ${target}" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -# The same as previous but with other commands mixed in. -target="arm-none-linux-gnueabihf" -cb_commands="--set libc=glibc --dry-run --build all --target ${target}" -match='' -test_pass "${cb_commands}" "${match}" - -# This one's a bit different because it doesn't work by putting the phrase to -# be grepped in 'match'... yet. -cb_commands="--dryrun --build gcc.git --stage 2" -testlineno="`expr $LINENO + 1`" -out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep -c " build.*gcc.*stage2")`" -if test ${out} -gt 0; then - pass ${testlineno} "VALID: --dryrun --build gcc.git --stage 2" -else - fail ${testlineno} "VALID: --dryrun --build gcc.git --stage 2" -fi - -cb_commands="--dry-run --target arm-none-linux-gnueabihf --march armv8-a --dump" -match='Default march armv8-a' -test_pass "${cb_commands}" "${match}" - -cb_commands="--dry-run --target arm-none-linux-gnueabihf --march=armv8-a --dump" -match="A space is expected" -test_failure "${cb_commands}" "${match}" - - -# If the tests pass successfully clean up /tmp/<tmpdir> but only if the -# directory name is conformant. We don't want to accidentally remove /tmp. -if test x"${tmpdir}" = x"/tmp"; then - echo "" - echo "\n${local_snapshots} doesn't conform to /tmp/<tmpdir>/snapshots. Not safe to remove." -elif test -d "${tmpdir}/snapshots" -a ${failures} -lt 1; then - echo "" - echo "${testcbuild2} finished with no unexpected failures. Removing ${tmpdir}" - rm -rf ${tmpdir} -fi - -# ---------------------------------------------------------------------------------- -# print the total of test results -totals - -exit 0 diff --git a/testsuite/builddir-tests.sh b/testsuite/builddir-tests.sh deleted file mode 100644 index 10af1e1..0000000 --- a/testsuite/builddir-tests.sh +++ /dev/null @@ -1,99 +0,0 @@ -# tests for the get_builddir function - -echo "============= get_builddir() tests ================" - -in="gdb-7.6~20121001+git3e2e76a.tar" -out="`get_builddir ${in}`" -#if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gdb-7.6~20121001+git3e2e76a"; then -# pass "get_builddir: tarball uncompressed old git" -#else -# fail "get_builddir: tarball uncompressed old git" -# fixme "${in} returned ${out}" -#fi - -in="gcc-linaro-4.8-2013.06-1.tar.xz" -out="`get_builddir ${in}`" -if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc-linaro-4.8-2013.06-1"; then - pass "get_builddir: tarball compressed" -else - fail "get_builddir: tarball compressed" - fixme "${in} returned ${out}" -fi - -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -out="`get_builddir ${in}`" -if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc-4_7-branch"; then - pass "get_builddir: svn branch" -else - fail "get_builddir: svn branch" - fixme "${in} returned ${out}" -fi - -in="lp:gdb-linaro/7.5" -out="`get_builddir ${in}`" -if test ${out} = "${local_builds}/x86_64-unknown-linux-gnu/x86_64-linux-gnu/gdb-linaro_7.5"; then - pass "get_builddir: bzr branch" -else - fail "get_builddir: bzr branch" - fixme "${in} returned ${out}" -fi - -in="git://git.linaro.org/toolchain/binutils.git" -out="`get_builddir ${in}~binutils-2_18-branch@654321`" -match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch@654321" -if test x"${out}" = x"${match}"; then - pass "get_builddir: git repository with branch and commit" -else - fail "get_builddir: git repository with branch and commit" - fixme "${in} returned '${out}' expected '${match}'" -fi - -in="git://git.linaro.org/toolchain/binutils.git" -out="`get_builddir ${in}~binutils-2_18-branch/foo/bar@654321`" -match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch-foo-bar@654321" -if test x"${out}" = x"${match}"; then - pass "get_builddir: git repository with branch and commit" -else - fail "get_builddir: git repository with branch and commit" - fixme "${in} returned '${out}' expected '${match}'" -fi - - -in="git://git.linaro.org/toolchain/binutils.git" -out="`get_builddir ${in}/binutils-2_18-branch@654321`" -match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch@654321" -if test x"${out}" = x"${match}"; then - pass "get_builddir: git repository with branch and commit" -else - fail "get_builddir: git repository with branch and commit" - fixme "${in} returned '${out}' expected '${match}'" -fi - -in="git://git.linaro.org/toolchain/binutils.git" -out="`get_builddir ${in}/binutils-2_18-branch/foo/bar@654321`" -if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch-foo-bar@654321"; then - pass "get_builddir: git repository with branch and commit" -else - fail "get_builddir: git repository with branch and commit" - fixme "${in} returned ${out}" -fi - - - -in="gcc.git/linaro-4.8-branch" -out="`get_builddir ${in}`" -if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc.git~linaro-4.8-branch"; then - pass "get_builddir: git repository with branch, no URL" -else - fail "get_builddir: git repository with branch, no URL" - fixme "get_builddir returned ${out}" -fi - -in="infrastructure/gmp-5.1.2.tar.xz" -out="`get_builddir ${in}`" -if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/infrastructure/gmp-5.1.2"; then - pass "get_builddir: tarball in subdirectory" -else - fail "get_builddir: tarball in subdirectory" - fixme "${in} returned ${out}" -fi diff --git a/testsuite/gerrit-tests.sh b/testsuite/gerrit-tests.sh deleted file mode 100755 index c860e31..0000000 --- a/testsuite/gerrit-tests.sh +++ /dev/null @@ -1,74 +0,0 @@ -# tests for the gerrit REST API functions - -echo "============= gerrit() tests ================" - -review="/tmp/.gitreview" -cat <<EOF > ${review} -[gerrit] - host=review.linaro.org - port=29418 - project=toolchain/cbuild2 - -[gitreview] - username=buildslave -EOF - -srcdir="/tmp" - -# FIXME: Note these following test cases only PASS if you have the source -# directories created already. -if test -d ${srcdir}; then - fail_state=fail -else - fail_state=untested -fi - -out="`extract_gerrit_host ${srcdir}`" -if test x"${out}" = x"review.linaro.org"; then - pass extract_gerrit_host"" -else - ${fail_state} "extract_gerrit_host" - fixme "extract_gerrit_host returned ${out}" -fi - -out="`extract_gerrit_project ${srcdir}`" -if test x"${out}" = x"toolchain/cbuild2"; then - pass extract_gerrit_project"" -else - ${fail_state} "extract_gerrit_project" - fixme "extract_gerrit_project returned ${out}" -fi - -out="`extract_gerrit_username ${srcdir}`" -if test x"${out}" = x"buildslave"; then - pass extract_gerrit_project"" -else - ${fail_state} "extract_gerrit_project" - fixme "extract_gerrit_project returned ${out}" -fi - -out="`extract_gerrit_port ${srcdir}`" -if test x"${out}" = x"29418"; then - pass "extract_gerrit_port" -else - ${fail_state} "extract_gerrit_port" - fixme "extract_gerrit_port returned ${out}" -fi - -rm -f ${review} - -# FIXME: Note these following test cases only PASS if you have the source -# directories created already. -#srcdir="${local_snapshots}/gcc.git" -srcdir="/linaro/shared/snapshots/gcc.git" -if test -d ${srcdir}; then - out="`get_git_revision ${srcdir}`" - out="`echo ${out} | grep -o [a-z0-9]\*`" - if test x"${out}" != x; then - pass "get_git_revision" - else - ${fail_state} "get_git_revision" - fixme "get_git_revision returned ${out}" - fi -fi - diff --git a/testsuite/git-parser-tests.sh b/testsuite/git-parser-tests.sh deleted file mode 100644 index 70d5f63..0000000 --- a/testsuite/git-parser-tests.sh +++ /dev/null @@ -1,1066 +0,0 @@ -git_parser_fixme() -{ - local buglineno=$1 - if test x"${debug}" = x"yes"; then - shift - echo "(${buglineno}): $*" - fi -} - -# tests for the get_<part>() functions that are part of the git string parser. - -get_git_foo() -{ - local in="$1" - local out= - local ret= - out="`git_parser foo ${in}`" - ret=$? - echo "${out}" - return ${ret} -} - -test_parser() -{ - local buglineno=$BASH_LINENO - local feature="$1" - local in="$2" - local match="$3" - local errmatch="$4" - local ret= - local out= - if test x"${debug}" = x"yes"; then - out="`get_git_${feature} ${in}`" - else - out="`get_git_${feature} ${in} 2>/dev/null`" - fi - ret=$? - - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - if test x"${out}" = x"${match}"; then - pass "get_git_${feature} ${in} expected '${match}'" - else - fail "get_git_${feature} ${in} expected '${match}'" - git_parser_fixme "${buglineno}" "'get_git_${feature} ${in}' expected '${match}' but returned '${out}'" - fi - - if test x"${errmatch}" != x; then - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - - if test x"${errmatch}" = x"${ret}"; then - pass "get_git_${feature} ${in} expected return value '${errmatch}'" - else - fail "'get_git_${feature} ${in}' expected return value '${errmatch}'" - git_parser_fixme "${buglineno}" "'get_git_${feature} ${in}' expected '${errmatch}' but returned '${ret}'" - fi - fi - - # Always return ret. An individual test might have 'passed', as-in it - # returned the expected result, but we still might want to check if there - # was an error in parsing. - return ${ret} -} - -echo "============= git_parser() tests ================" - -errmatch=0 -in="gcc.git/linaro-4.8-branch" -match='linaro-4.8-branch' -test_parser branch "${in}" "${match}" "${errmatch}" -match='gcc.git' -test_parser repo "${in}" "${match}" "${errmatch}" - -# No expected errors. -errmatch=0 -for transport in git ssh http; do - in="${transport}://address.com/directory/repo.git" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match='git' - test_parser service "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - match='repo' - test_parser tool "${in}" "${match}" "${errmatch}" - match="${transport}://address.com/directory/repo.git" - test_parser url "${in}" "${match}" "${errmatch}" - match='' - test_parser revision "${in}" "${match}" "${errmatch}" -done - -# Minor variation with a different service -in="http://address.com/directory/repo.git" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" - -# Minor variation with a different service -in="gcc-svn-4.8" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='gcc-svn-4.8' -test_parser repo "${in}" "${match}" "${errmatch}" -match='gcc-svn-4.8' -test_parser url "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -# We can't really know this this shouldn't be -svn-4.8 -# without having a service identifier! -match='gcc-svn-4.8' -test_parser tool "${in}" "${match}" "${errmatch}" - -# Minor variation with a different service -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -match='svn' -test_parser service "${in}" "${match}" "${errmatch}" - -# Minor variation with a different service -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -match='svn' -test_parser service "${in}" "${match}" "${errmatch}" -match="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -test_parser url "${in}" "${match}" "${errmatch}" -match='gcc' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='gcc' -test_parser tool "${in}" "${match}" "${errmatch}" - -# Minor variation with a different service -in="lp:cortex-strings" -match='lp' -test_parser service "${in}" "${match}" "${errmatch}" -match='lp:cortex-strings' -test_parser url "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="lp:cortex-strings/foo" -match='lp' -test_parser service "${in}" "${match}" "${errmatch}" -match='lp:cortex-strings/foo' -test_parser url "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='foo' -test_parser branch "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser tool "${in}" "${match}" "${errmatch}" - -# Minor variation with a different service -in="cortex-strings" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser url "${in}" "${match}" "${errmatch}" -match='cortex-strings' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" - -for transport in git ssh http; do - errmatch=0 - in="${transport}://address.com/directory/repo.git/branch" - match='branch' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test with ~ style branch designation - in="${transport}://address.com/directory/repo.git~branch" - match='branch' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test with ~ style branch designation. Introduce a type and look - # for correct output but error condition. - in="${transport}://address.com/directory/repo.git~/branch" - match='branch' - errmatch=1 - test_parser branch "${in}" "${match}" "${errmatch}" - - errmatch=0 - - # Test multi-/ branches with ~ style branch designation - in="${transport}://address.com/directory/repo.git~branch/name/foo" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test multi-/ branches with / style branch designation - in="${transport}://address.com/directory/repo.git/branch/name/foo" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test with not .git suffix and ~ style branch designation - in="${transport}://address.com/directory/repo~branch" - match='branch' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test with not .git suffix and ~ style branch designation with multi-/ branches. - in="${transport}://address.com/directory/repo~branch/name/foo" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - - # Test with not .git suffix and ~ style branch designation - # KNOWN LIMITATION. This can't know that 'branch' is a branch - # and repo is a repo. So it will report erroneously. - in="${transport}://address.com/directory/repo/branch" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='branch' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Test multi-/ branches with ~ style branch designation with revisions. - in="${transport}://address.com/directory/repo.git~branch/name/foo@1234567" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - - # Test multi-/ branches with ~ style branch designation with revisions. - in="${transport}://address.com/directory/repo.git~branch/name/foo@1234567" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - - # Test multi-/ branches with / style branch designation with revisions. - in="${transport}://address.com/directory/repo.git/branch/name/foo@1234567" - match='branch/name/foo' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - - # Test multi-/ branches with / style branch designation with revisions - # and no .git suffix on the repo. This will be bogus because we can't - # know about this situation. - in="${transport}://address.com/directory/repo/branch/name/foo@1234567" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='foo' - test_parser repo "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - - # Test single name branches with ~ style branch designation with revisions. - in="${transport}://address.com/directory/repo.git~branch@1234567" - match='branch' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Test single name branches with / style branch designation with revisions. - in="${transport}://address.com/directory/repo.git/branch@1234567" - match='branch' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Test single name branches with / style branch designation with - # revisions but no .git suffixed repo. We can't know this! - in="${transport}://address.com/directory/repo/branch@1234567" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='branch' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Test .git suffixed repo with revisions. - in="${transport}://address.com/directory/repo.git@1234567" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - match='repo' - test_parser tool "${in}" "${match}" "${errmatch}" - - # Test .git suffixed repo with revisions and empty ~ branch. - in="${transport}://address.com/directory/repo.git~@1234567" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - - # Test .git suffixed repo with revisions and empty / branch. - in="${transport}://address.com/directory/repo.git/@1234567" - match='' - test_parser branch "${in}" "${match}" "${errmatch}" - match='1234567' - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Introduce 'user@' - in="${transport}://user@address.com/directory/repo.git/branch" - match='user' - test_parser user "${in}" "${match}" "${errmatch}" - - # Introduce 'user.name@' - in="${transport}://user.name@address.com/directory/repo.git/branch" - match='user.name' - test_parser user "${in}" "${match}" "${errmatch}" - - # Start adding in superfluous @ symbols - errmatch=1 - in="${transport}://user@address.com/directory@/repo.git/branch@1234567" - match="user" - test_parser user "${in}" "${match}" "${errmatch}" - match="branch" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match="repo.git" - test_parser repo "${in}" "${match}" "${errmatch}" - match="${transport}://user@address.com/directory@/repo.git" - test_parser url "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and / branch. - in="${transport}://address.com/directory@/repo.git/branch@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="branch" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match="repo.git" - test_parser repo "${in}" "${match}" "${errmatch}" - match="${transport}://address.com/directory@/repo.git" - test_parser url "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and multi-/ / branch. - in="${transport}://address.com/directory@/repo.git/branch/name/foo@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="branch/name/foo" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match="repo.git" - test_parser repo "${in}" "${match}" "${errmatch}" - match="${transport}://address.com/directory@/repo.git" - test_parser url "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and ~ branch. - in="${transport}://address.com/directory@/repo.git~branch@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="branch" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo.git' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and non .git suffixed repo. - in="${transport}://address.com/directory@/repo@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and ~ branch and non .git suffixed repo. - in="${transport}://address.com/directory@/repo~branch@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="branch" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo' - test_parser repo "${in}" "${match}" "${errmatch}" - - # Superfluous @ symbols but no 'user' and ~ branch and non .git suffixed repo and multi-/ branches. - in="${transport}://address.com/directory@/repo~branch/name/foo@1234567" - match='' - test_parser user "${in}" "${match}" "${errmatch}" - match="branch/name/foo" - test_parser branch "${in}" "${match}" "${errmatch}" - match="1234567" - test_parser revision "${in}" "${match}" "${errmatch}" - match='repo' - test_parser repo "${in}" "${match}" "${errmatch}" -done - -# This one will bail early even though it's malformed so the error case won't be set. -errmatch=0 -in="http://firstname.lastname@address.com/directory@/repo.git/branch" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -errmatch=1 -match='firstname.lastname' -test_parser user "${in}" "${match}" "${errmatch}" - -# No repo! This will use the non .git suffixed code path. -in="http://firstname.lastname@address.com/directory/@1234567" -errmatch=0 -match='http' -test_parser service "${in}" "${match}" "${errmatch}" -errmatch=1 -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=0 -# This will assume that 'directory' is the repository. -in="http://firstname.lastname@address.com/directory~@1234567" -match='directory' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=1 -# No repo! -in="http://firstname.lastname@address.com/directory/~@1234567" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" - -# Trailing trash and no valid repo! -in="http://firstname.lastname@address.com/directory///~@1234567" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=1 -# Trailing trash (extra tildes) and no valid repo! -in="http://firstname.lastname@address.com/directory///~~@1234567" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" - -errmatch=1 -# Trailing trash (extra tildes) and no valid repo! -in="http://firstname.lastname@address.com/directory///~~@@1234567" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match="http://firstname.lastname@address.com/directory" -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=0 -# Trash but we have a valid repo and revision. -in="http://firstname.lastname@address.com/directory/repo.git~~@1234567" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" - -# Trash but we have a valid repo and revision. -errmatch=0 -in="http://firstname.lastname@address.com/directory/repo.git///~~@1234567" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@address.com/directory/repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=0 -# We can't tell that this is an erroneous case so it shouldn't error. -in="http://git.address.com/directory/repo.git/branch~uhoh@1234567" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://git.address.com/directory/repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" - -# because it takes the ~ leg of the .git branch. There is no 'right' -# way to handle this and we can't detect it. -match='uhoh' -test_parser branch "${in}" "${match}" "${errmatch}" - -# This detects 'directory' as the repo but there are too many @ -# chars so this generates an error. -errmatch=1 -in="http://firstname.lastname@address.com/directory@@@@1234567" -errmatch=0 -match='http' -test_parser service "${in}" "${match}" "${errmatch}" -errmatch=1 -match='directory' -test_parser repo "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match="http://firstname.lastname@address.com/directory" -test_parser url "${in}" "${match}" "${errmatch}" - -in="http://address.com/directory/@@@@1234567" -match='http://address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" -# Because of the trailing slash we can't interpret this as a repo. -match='' -test_parser repo "${in}" "${match}" "${errmatch}" - -# Superfluous @ so this will generate errors. -in="http://address.com/directory/////@@@@1234567" -match='http://address.com/directory' -test_parser url "${in}" "${match}" "${errmatch}" - - -# Superfluous @ so this will generate errors. -in='http://firstname.lastname@address.com/direc@tory/' -match='http://firstname.lastname@address.com/direc@tory' -test_parser url "${in}" "${match}" "${errmatch}" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -errmatch=0 -# This is a bit messed up but it's not an error. -in="http://foo@1234567" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='foo' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='http://foo' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=1 -# No repo so this will generate an error -in="http://@1234567" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http://' -test_parser url "${in}" "${match}" "${errmatch}" - -in="http:///@1234567" -match='http://' -test_parser url "${in}" "${match}" "${errmatch}" - -in="http://////~~@1234567" -match='http://' -test_parser url "${in}" "${match}" "${errmatch}" - -in="http://////~~~~@@@@@1234567" -match='http://' -test_parser url "${in}" "${match}" "${errmatch}" -match='' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" - - -errmatch=0 -in="http://repo.git@1234567" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - - -in="http://repo.git/branch@12334677" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='branch' -test_parser branch "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="http://repo.git~branch@12334677" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='branch' -test_parser branch "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="http://repo.git~multi/part/branch@12334677" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='multi/part/branch' -test_parser branch "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="http://repo.git~multi/part/branch/@12334677" -match='http://repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='multi/part/branch' -test_parser branch "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" - -# Try it with numeric urls. -in="http://firstname.lastname@127.0.0.1/directory/repo.git" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='firstname.lastname' -test_parser user "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" -match='http://firstname.lastname@127.0.0.1/directory/repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch= -in="repo.git/funky_branch-name@12334677" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='funky_branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - -in="repo.git~funky/branch-name@12334677" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='funky/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - - -errmatch= -in="repo/funky_branch-name@12334677" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='funky_branch-name' -test_parser repo "${in}" "${match}" "${errmatch}" -match='funky_branch-name' -test_parser tool "${in}" "${match}" "${errmatch}" -# Unfortunately this is the case because 'funky_branch-name' -# is parsed as the repo. -match='repo/funky_branch-name' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch= -in="repo~funky/branch-name@1234567" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='funky/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" - -errmatch= -in="repo@12334677" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" -match='repo' -test_parser url "${in}" "${match}" "${errmatch}" - - -errmatch= -in="repo.git/multi/part/branch-name@12334677" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='' -test_parser user "${in}" "${match}" "${errmatch}" -match='12334677' -test_parser revision "${in}" "${match}" "${errmatch}" -match='multi/part/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='repo' -test_parser tool "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - -in="repo/multi/part/branch-name@12334677" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -# The unfortunate situation when there's not .git -match='branch-name' -test_parser repo "${in}" "${match}" "${errmatch}" - -errmatch=1 -in="repo/multi/pa@rt/branch-name@12334677" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -# The unfortunate situation when there's not .git -match='branch-name' -test_parser repo "${in}" "${match}" "${errmatch}" - -#totals; exit 1 - -errmatch= -in="repo.git@123/34677" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -errmatch=1 -in="repo.git//@123/34677" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser url "${in}" "${match}" "${errmatch}" - -in="repo.git//~~~@@@123/34677" -match='repo.git' -test_parser url "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -# This will fail.. but this is getting ridiculous. -#test_parser $BASH_LINENO branch "${in}" "${match}" "${errmatch}" - - -errmatch=1 -in="re@po.git@1234567" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='re@po.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" - -in="re@po.git@1234567" -match='' -test_parser user "${in}" "${match}" "${errmatch}" - -in="re@po.git@123@4567" -match='4567' -test_parser revision "${in}" "${match}" "${errmatch}" - -errmatch= - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234567" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" -match='user.name' -test_parser user "${in}" "${match}" "${errmatch}" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234~67" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -# Screwy but true. -match='67' -test_parser branch "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234#67" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolch#ain/repo.git@1234567" -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234@67" -match='67' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234@67" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='67' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo@1234567" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo@12345@67" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" -match='http' -test_parser service "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git/multi/part/branch-name@12345@67" -match='repo.git' -test_parser repo "${in}" "${match}" "${errmatch}" -match='git' -test_parser service "${in}" "${match}" "${errmatch}" -match='multi/part/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo/multi/part/branch-name@12345@67" -match='branch-name' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo~multi/part/branch-name@12345@67" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" -match='multi/part/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -# This should error as it has an superfluous @ in the revision. -# It will give a bogus revision. -errmatch=1 -match='67' -test_parser revision "${in}" "${match}" "${errmatch}" -errmatch= -match='http://user.name@git.linaro.org/git/toolchain/repo' -test_parser url "${in}" "${match}" "${errmatch}" - - -in="http://user.name@git.linaro.org/git/toolchain/repo~multi/part/branch-name@12345@" -# This should error as it has an superfluous @ in the revision. -# It will give a bogus revision. -errmatch=1 -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo~multi/part/branch-name@" -# This should error as it has an superfluous @ in the revision. -# It will give a bogus revision. -errmatch=1 -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo~multi/part/branch-name@@@@" -# This should error as it has an superfluous @ in the revision. -# It will give a bogus revision. -errmatch=1 -match='' -test_parser revision "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo~multi/part/branch-name@@@@1234567" -# This should error as it has an superfluous @ in the revision. -# It will give a bogus revision. -errmatch=1 -match='1234567' -test_parser revision "${in}" "${match}" "${errmatch}" - -# The following tests all have a superflous / after the ~ -errmatch=1 -# This will strip the superflous / in between ~ and multi -in="http://user.name@git.linaro.org/git/toolchain/repo~/multi/part/branch-name@12345@67" -match='repo' -test_parser repo "${in}" "${match}" "${errmatch}" -match='multi/part/branch-name' -test_parser branch "${in}" "${match}" "${errmatch}" -match='http://user.name@git.linaro.org/git/toolchain/repo' -test_parser url "${in}" "${match}" "${errmatch}" - -errmatch=0 -# This will strip the superflous / in between ~ and multi -in="infrastructure/mpc-1.0.1.tar.gz" -match='mpc' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='infrastructure/mpc-1.0.1.tar.gz' -test_parser url "${in}" "${match}" "${errmatch}" -match='mpc' -test_parser tag "${in}" "${match}" "${errmatch}" - -errmatch=0 -in="http://user.name@git.linaro.org/git/toolchain/repo.git~multi/part/branch-name@1234567" -match='repo.git~multi-part-branch-name@1234567' -test_parser tag "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git/multi/part/branch-name@1234567" -match='repo.git~multi-part-branch-name@1234567' -test_parser tag "${in}" "${match}" "${errmatch}" - -in="http://user.name@git.linaro.org/git/toolchain/repo.git@1234567" -match='repo.git@1234567' -test_parser tag "${in}" "${match}" "${errmatch}" - -for transport in git ssh http; do - errmatch= - in="${transport}://git.savannah.gnu.org/dejagnu.git~linaro" - match='dejagnu.git' - test_parser repo "${in}" "${match}" "${errmatch}" - - match='linaro' - test_parser branch "${in}" "${match}" "${errmatch}" - - errmatch=0 - in="${transport}://git.linaro.org/toolchain/binutils-gdb.git/gdb_7_6-branch" - match='binutils-gdb' - test_parser tool "${in}" "${match}" "${errmatch}" -done - -errmatch=0 -# This will strip the superflous / in between ~ and multi -in="infrastructure/linux-linaro-3.11-rc6-2013.08.tar.bz2" -match='linux' -test_parser tool "${in}" "${match}" "${errmatch}" - -errmatch=0 -in="http://cbuild.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" -match='gdb' -test_parser repo "${in}" "${match}" "${errmatch}" - -# This is just goofy, and if the system doesn't know the service it's -# just going to guess. -in="gcc-linaro-4.6" -match='' -test_parser service "${in}" "${match}" "${errmatch}" -match='gcc-linaro-4.6' -test_parser url "${in}" "${match}" "${errmatch}" -match='gcc-linaro-4.6' -test_parser repo "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" - -in="lp:gcc-linaro/4.6" -match='lp' -test_parser service "${in}" "${match}" "${errmatch}" -match='lp:gcc-linaro/4.6' -test_parser url "${in}" "${match}" "${errmatch}" -match='gcc-linaro' -test_parser repo "${in}" "${match}" "${errmatch}" -match='gcc' -test_parser tool "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='4.6' -test_parser branch "${in}" "${match}" "${errmatch}" - - -in="http://llvm.org/svn/llvm-project/cfe/trunk" -match='svn' -test_parser service "${in}" "${match}" "${errmatch}" -match='http://llvm.org/svn/llvm-project/cfe/trunk' -test_parser url "${in}" "${match}" "${errmatch}" -match='cfe' -test_parser repo "${in}" "${match}" "${errmatch}" -match='cfe' -test_parser tool "${in}" "${match}" "${errmatch}" -match='' -test_parser revision "${in}" "${match}" "${errmatch}" -match='' -test_parser branch "${in}" "${match}" "${errmatch}" - -for transport in git ssh http; do - in="${transport}://git.linaro.org/toolchain/binutils-gdb.git~linaro_binutils-2_24-branch" - match='binutils-gdb' - test_parser tool "${in}" "${match}" "${errmatch}" -done - -in="git://git.linaro.org/toolchain/binutils-gdb.git/linaro_binutils-2_24-branch" -match='binutils-gdb' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="binutils-gdb.git~linaro_binutils-2_24-branch" -match='binutils-gdb' -test_parser tool "${in}" "${match}" "${errmatch}" - -in="binutils-gdb.git/linaro_binutils-2_24-branch" -match='binutils-gdb' -test_parser tool "${in}" "${match}" "${errmatch}" diff --git a/testsuite/normalize-tests.sh b/testsuite/normalize-tests.sh deleted file mode 100644 index e15fba1..0000000 --- a/testsuite/normalize-tests.sh +++ /dev/null @@ -1,130 +0,0 @@ -# Tests for the normalize_path function - -echo "============= normalize_path() tests ================" - -in="gdb-7.6~20121001+git3e2e76a.tar.bz2" -out="`normalize_path ${in}`" -if test x"${out}" = x"gdb-7.6~20121001@3e2e76a"; then - pass "normalize_path: tarball old git format" -else - fail "normalize_path: tarball old git format" - fixme "${in} returned ${out}" -fi - -for transport in git ssh http; do - in="${transport}://git.linaro.org/toolchain/binutils.git" - out="`normalize_path ${in}`" - if test x"${out}" = x"binutils.git"; then - pass "normalize_path: git repository (${transport})" - else - fail "normalize_path: git repository (${transport})" - fixme "${in} returned ${out}" - fi - - out="`normalize_path binutils.git/binutils-2_18-branch`" - match="binutils.git~binutils-2_18-branch" - if test x"${out}" = x"${match}"; then - pass "normalize_path: git repository with branch (${transport})" - else - fail "normalize_path: git repository with branch (${transport})" - fixme "${in} returned ${out}" - fi - - testing="normalize_path: git repository with ~ branch and commit (${transport})" - out="`normalize_path ${in}~binutils-2_18-branch@123456`" - if test x"${out}" = x"binutils.git~binutils-2_18-branch@123456"; then - pass "${testing}" - else - fail "${testing}" - fixme "${in} returned ${out}" - fi - - testing="normalize_path: git repository with ~ and multi-/ branch and commit (${transport})" - out="`normalize_path ${in}~binutils-2_18-branch/foo/bar@123456`" - match="binutils.git~binutils-2_18-branch-foo-bar@123456" - if test x"${out}" = x"${match}"; then - pass "${testing}" - else - fail "${testing}" - fixme "${in} returned ${out}" - fi -done - -testing="normalize_path: git repository with ~ branch" -in="gcc.git/linaro-4.8-branch" -out="`normalize_path ${in}`" -if test x"${out}" = x"gcc.git~linaro-4.8-branch"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -for transport in git ssh http; do - testing="normalize_path: full git (${transport}) url with ~ branch" - in="${transport}://staging.git.linaro.org/git/toolchain/gcc.git/linaro-4.8-branch" - out="`normalize_path ${in}`" - if test x"${out}" = x"gcc.git~linaro-4.8-branch"; then - pass "${testing}" - else - fail "${testing}" - fixme "${in} returned ${out}" - fi -done - -in="gdb-7.6~20121001+git3e2e76a.tar" -out="`normalize_path ${in}`" -if test x"${out}" = x"gdb-7.6~20121001@3e2e76a"; then - pass "normalize_path: tarball uncompressed" -else - fail "normalize_path: tarball uncompressed" - fixme "${in} returned ${out}" -fi - -in="http://cbuild.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" -out="`normalize_path ${in}`" -if test x"${out}" = x"gcc-linaro-4.8-2013.06-1"; then - pass "normalize_path: tarball compressed" -else - fail "normalize_path: tarball compressed" - fixme "${in} should produce ${out}" -fi - -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -out="`normalize_path ${in}`" -if test x"${out}" = x"gcc-4_7-branch"; then - pass "normalize_path: svn repository" -else - fail "normalize_path: svn repository" - fixme "${in} should produce ${out}" -fi - -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -out="`normalize_path ${in}@123456`" -if test x"${out}" = x"gcc-4_7-branch@123456"; then - pass "normalize_path: svn repository with revision" -else - fail "normalize_path: svn repository with revision" - fixme "${in} should produce ${out}" -fi - -in="lp:gdb-linaro/7.5" -out="`normalize_path ${in}`" -if test x"${out}" = x"gdb-linaro_7.5"; then - pass "normalize_path: bzr branch" -else - fail "normalize_path: bzr branch" - fixme "${in} returned ${out}" -fi - -in="binutils-gdb.git/gdb_7_6-branch" -out="`normalize_path ${in}`" -match="binutils-gdb.git~gdb_7_6-branch" -if test x"${out}" = x"${match}"; then - pass "normalize_path: new binutils-gdb repository" -else - fail "normalize_path: new binutils-gdb repository" - fixme "${in} returned ${out} but expected ${match}" -fi - - diff --git a/testsuite/srcdir-tests.sh b/testsuite/srcdir-tests.sh deleted file mode 100644 index 53c1e34..0000000 --- a/testsuite/srcdir-tests.sh +++ /dev/null @@ -1,255 +0,0 @@ -# tests for the get_srcdir() function - -echo "============= get_srcdir() tests ================" - -# FIXME: Note these following test cases only PASS if you have the source -# directories created already. -if test -d ${local_snapshots}/gcc.git; then - in="git://git@staging.git.linaro.org/toolchain/gcc.git" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc.git"; then - pass "get_srcdir: git repository" - else - fail "get_srcdir: git repository" - fixme "get_srcdir returned ${out}" - fi - - in="gcc.git" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc.git"; then - pass "get_srcdir: git repository no path" - else - fail "get_srcdir: git repository no path" - fixme "get_srcdir returned ${out}" - fi -else - untested "get_srcdir: git repository" -fi - - -if test -d ${local_snapshots}/gcc.git-linaro-4.8-branch; then - in="gcc.git/linaro-4.8-branch" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc.git-linaro-4.8-branch/gcc-4_8-branch"; then - pass "get_srcdir: git repository with branch" - else - fail "get_srcdir: git repository with branch" - fixme "get_srcdir returned ${out}" - fi - - in="git://git@staging.git.linaro.org/toolchain/gcc.git/linaro-4.8-branch" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc.git-linaro-4.8-branch/gcc-4_8-branch"; then - pass "get_srcdir: git repository URL with branch" - else - fail "get_srcdir: git repository URL with branch" - fixme "get_srcdir returned ${out}" - fi - -else - untested "get_srcdir: git repository with branch" -fi - -if test -d ${local_snapshots}/gcc.git-linaro-4.8-branch@123456; then - in="git://git@git.linaro.org/toolchain/gcc.git/linaro-4.8-branch@123456" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc.git-linaro-4.8-branch@123456/gcc-4_8-branch"; then - pass "get_srcdir: git repository with branch and commit" - else - fail "get_srcdir: git repository with branch and commit" - fixme "get_srcdir returned ${out}" - fi -else - untested "get_srcdir: git repository with branch and commit" -fi - -if test -d ${local_snapshots}/gcc-linaro-4.8-2013.06-1; then - in="gcc-linaro-4.8-2013.06-1.tar.xz" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc-linaro-4.8-2013.06-1"; then - pass "get_srcdir: with tarball and full path" - else - fail "get_srcdir: with tarball and full path" - fixme "get_srcdir returned ${out}" - fi -else - untested "get_srcdir: with tarball and full path" -fi - -in="infrastructure/gmp-5.1.2.tar.xz" -out="`get_srcdir $in | grep -v TRACE`" -if test x"${out}" = x"${local_snapshots}/infrastructure/gmp-5.1.2"; then - pass "get_srcdir: with tarball in subdirectory" -else - fail "get_srcdir: with tarball in subdirectory" - fixme "get_srcdir returned ${out}" -fi - -if test -d ${local_snapshots}/gcc-linaro-4.7-2013.09; then - in="gcc-linaro-4.7-2013.09.tar.bz2" - out="`get_srcdir $in | grep -v TRACE`" - if test x"${out}" = x"${local_snapshots}/gcc-linaro-4.7-2013.09"; then - pass "get_srcdir: with tarball" - else - fail "get_srcdir: with tarball" - fixme "get_srcdir returned ${out}" - fi -else - untested "get_srcdir: with tarball" -fi - -echo "============= additional get_srcdir () tests ================" -# Some of these are redundant with those in srcdir_tests but since -# already have cbuild2.git checked out we might as well test them here. -testing="get_srcdir: <repo>.git" -in="cbuild2.git" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git@<revision>" -in="cbuild2.git@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git/<branch>" -in="cbuild2.git/branch" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git/<branch>@<revision>" -in="cbuild2.git/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git~<branch>@<revision>" -in="cbuild2.git~branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git/<multi/part/branch>@<revision>" -in="cbuild2.git/multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git~<multi/part/branch>@<revision>" -in="cbuild2.git~multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - - -# -testing="get_srcdir: invalid identifier shouldn't return anything." -in="cbuild2~multi/part/branch@12345" -out="`get_srcdir $in 2>/dev/null`" -if test x"${out}" = x""; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>~<multi/part/branch>@<revision>" -in="git://git.linaro.org/people/rsavoye/cbuild2~multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2~multi-part-branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: <repo>.git~<multi/part/branch>@<revision>" -in="cbuild2.git~multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: http://<user>@<url>/<repo>.git" -in="http://git@staging.git.linaro.org/git/toolchain/cbuild2.git" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: http://<user>@<url>/<repo>.git@<revision>" -in="http://git@staging.git.linaro.org/git/toolchain/cbuild2.git@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: eglibc special case" -in="eglibc.git~multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/eglibc.git~multi-part-branch@12345"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -mkdir -p "${local_snapshots}/eglibc.git~multi-part-branch@12345/libc" -testing="get_srcdir: eglibc special case once /libc directory exists" -in="eglibc.git~multi/part/branch@12345" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/eglibc.git~multi-part-branch@12345/libc"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi - -testing="get_srcdir: launchpad URL." -in="lp:cortex-strings" -out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cortex-strings"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_srcdir returned ${out}" -fi diff --git a/testsuite/stamp-tests.sh b/testsuite/stamp-tests.sh deleted file mode 100644 index e76f48c..0000000 --- a/testsuite/stamp-tests.sh +++ /dev/null @@ -1,287 +0,0 @@ -#!/bin/bash -stamp_fixme() -{ - local buglineno=$1 - if test x"${debug}" = x"yes"; then - shift - echo "(${buglineno}): $*" - fi -} - -echo "============= get_stamp_name() tests ================" - -test_get_stamp_name() -{ - local buglineno=$BASH_LINENO - local feature="get" - local in="$1" - local match="$2" - local errmatch="$3" - local ret= - local out= - - if test x"${debug}" = x"yes"; then - out="`${feature}_stamp_name ${in}`" - else - out="`${feature}_stamp_name ${in} 2>/dev/null`" - fi - ret=$? - - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - if test x"${out}" = x"${match}"; then - pass "${feature}_stamp_name ${in} expected '${match}'" - else - fail "${feature}_stamp_name ${in} expected '${match}'" - stamp_fixme "${buglineno}" "'${feature}_stamp_name ${in}' expected '${match}' but returned '${out}'" - fi - - if test x"${errmatch}" != x; then - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - - if test x"${errmatch}" = x"${ret}"; then - pass "${feature}_stamp_name ${in} expected return value '${errmatch}'" - else - fail "'${feature}_stamp_name ${in}' expected return value '${errmatch}'" - stamp_fixme "${buglineno}" "'${feature}_stamp_name ${in}' expected '${errmatch}' but returned '${ret}'" - fi - fi - - # Always return ret. An individual test might have 'passed', as-in it - # returned the expected result, but we still might want to check if there - # was an error with the stamps. - return ${ret} -} - -errmatch=0 -in="configure gcc.git" -match="gcc.git-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure infrastructure/mpc-1.0.1.tar.xz" -match="mpc-1.0.1-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git stage2" -match="gcc.git-stage2-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git~bzr/custom_branch" -match="gcc.git~bzr-custom_branch-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git~bzr/custom_branch stage2" -match="gcc.git~bzr-custom_branch-stage2-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git@1234567" -match="gcc.git@1234567-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git@1234567 stage2" -match="gcc.git@1234567-stage2-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git~bzr/custom_branch@1234567" -match="gcc.git~bzr-custom_branch@1234567-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc.git~bzr/custom_branch@1234567 stage2" -match="gcc.git~bzr-custom_branch@1234567-stage2-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="configure gcc-4.8-foo-bar_fiddle.diddle.tar.bz2" -match="gcc-4.8-foo-bar_fiddle.diddle-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="build infrastructure/linux-linaro-3.11-rc6-2013.08.tar.bz2" -match="linux-linaro-3.11-rc6-2013.08-build.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -errmatch=0 -in="configure http://staging.git.linaro.org/git/toolchain/gcc.git" -match="gcc.git-configure.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - - -in="build gcc.git" -match="gcc.git-build.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="fetch mpc.1.4.tar.gz" -match="mpc.1.4-fetch.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -in="extract mpc.1.4.tar.gz" -match="mpc.1.4-extract.stamp" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -errmatch=1 -in="bogusstamp gcc.git" -match="" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -# Partial match of a valid stamp SHOULDN'T match. -errmatch=1 -in="buildfoo gcc.git" -match="" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -# Partial match of a valid stamp SHOULDN'T match. -errmatch=1 -in="foobuild gcc.git" -match="" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -# Partial match of a valid stamp SHOULDN'T match. -errmatch=1 -in="build http://@revision" -match="" -test_get_stamp_name "${in}" "${match}" "${errmatch}" - -echo "============= check_stamp () and create_stamp () tests ================" - -# Only test these outside of an active build tree since they write -# to the ${local_builds} directory. - -test_check_stamp() -{ - local buglineno=$BASH_LINENO - local feature="check" - local testing="$1" - local in="$2" - local match="$3" - local ret= - local out= - - if test x"${debug}" = x"yes"; then - out="`${feature}_stamp ${in}`" - else - out="`${feature}_stamp ${in} 2>/dev/null`" - fi - ret=$? - - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - - if test x"${match}" = x"${ret}"; then - pass "${feature}_stamp: ${testing} expected return value '${match}'" - else - fail "'${feature}_stamp: ${testing}' expected return value '${match}'" - stamp_fixme "${buglineno}" "'${feature}_stamp ${in}' expected '${match}' but returned '${ret}'" - fi - - # Always return ret. An individual test might have 'passed', as-in it - # returned the expected result, but we still might want to check if there - # was an error with the stamps. - return ${ret} -} - -test_create_stamp() -{ - local buglineno=$BASH_LINENO - local feature="create" - local testing="$1" - local in="$2" - local match="$3" - local ret= - local out= - - if test x"${debug}" = x"yes"; then - out="`${feature}_stamp ${in}`" - else - out="`${feature}_stamp ${in} 2>/dev/null`" - fi - ret=$? - - if test x"${debug}" = x"yes"; then - echo -n "($buglineno) " 1>&2 - fi - - if test x"${match}" = x"${ret}"; then - pass "${feature}_stamp: ${testing} expected return value '${match}'" - else - fail "'${feature}_stamp: ${testing}' expected return value '${match}'" - stamp_fixme "${buglineno}" "'${feature}_stamp ${in}' expected '${match}' but returned '${ret}'" - fi - - # Always return ret. An individual test might have 'passed', as-in it - # returned the expected result, but we still might want to check if there - # was an error with the stamps. - return ${ret} -} - - -stamp_name="`get_stamp_name configure gcc.git~bzr/custom_branch@1234567 stage2`" -testing="check_stamp: no existing stamp." -check_dir="${local_snapshots}/stamp_checkdir" -if test -d ${local_builds} -a ! -e "${PWD}/host.conf"; then - if test x"${stamp_name}" = x; then - echo "get_stamp_name failed prior to check_stamp tests." - exit 1 - fi - - # A fake temporary gcc.git directory used for testing. - mkdir -p ${check_dir} - # We need time between when we create the directory and when we create - # the stamp so that the modifications times differ. - sleep 1 - - in="${local_builds} ${stamp_name} ${check_dir} configure no" - ret=1 - test_check_stamp "${testing}" "${in}" "${ret}" -else - untested "${testing}" -fi - -if test -d ${local_builds} -a ! -e "${PWD}/host.conf"; then - testing="create_stamp: Create a new stamp: ${local_builds}/${stamp_name}" - in="${local_builds} ${stamp_name}" - ret=0 - test_create_stamp "${testing}" "${in}" "${ret}" -else - testing="create_stamp: Create a new stamp." - untested "${testing}" -fi - -testing="check_stamp: Check a just created stamp." -if test -d ${local_builds} -a ! -e "${PWD}/host.conf"; then - in="${local_builds} ${stamp_name} ${check_dir} configure no" - ret=0 - test_check_stamp "${testing}" "${in}" "${ret}" -else - untested "${testing}" -fi - -testing="check_stamp: Check a newer compare file." -if test -d ${local_builds} -a ! -e "${PWD}/host.conf"; then - - # This should update the time stamp on the ${check_dir}. - rmdir ${check_dir}/ - - # We need time between when the stamp was created and when we modify the - # check dir so so that the modifications times differ. - sleep 1 - - mkdir -p ${check_dir} - - in="${local_builds} ${stamp_name} ${check_dir} configure no" - ret=1 - test_check_stamp "${testing}" "${in}" "${ret}" -else - untested "${testing}" -fi - -testing="check_stamp: Check a bogus check file." -if test -d ${local_builds} -a ! -e "${PWD}/host.conf"; then - - in="${local_builds} ${stamp_name} ${local_builds}/bogusfile configure no" - ret=255 - test_check_stamp "${testing}" "${in}" "${ret}" -else - untested "${testing}" -fi diff --git a/testsuite/test.sh b/testsuite/test.sh deleted file mode 100755 index fae408d..0000000 --- a/testsuite/test.sh +++ /dev/null @@ -1,1557 +0,0 @@ -#!/bin/bash - -# common.sh loads all the files of library functions. -if test x"`echo \`dirname "$0"\` | sed 's:^\./::'`" != x"testsuite"; then - echo "WARNING: Should be run from top cbuild2 dir" > /dev/stderr - topdir="`readlink -e \`dirname $0\`/..`" -else - topdir=$PWD -fi - -# configure generates host.conf from host.conf.in. -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" - . "${topdir}/lib/common.sh" || exit 1 -else - build="`sh ${topdir}/config.guess`" - . "${topdir}/lib/common.sh" || exit 1 - warning "no host.conf file! Synthesizing a framework for testing." - - remote_snapshots=http://cbuild.validation.linaro.org/snapshots - wget_bin=/usr/bin/wget - sources_conf=${topdir}/testsuite/test_sources.conf -fi -echo "Testsuite using ${sources_conf}" - -# Use wget -q in the testsuite -wget_quiet=yes - -# We always override $local_snapshots so that we don't damage or move the -# local_snapshots directory of an existing build. -local_cbuild_tmp="`mktemp -d /tmp/cbuild2.$$.XXX`" -local_snapshots="${local_cbuild_tmp}/snapshots" - -# If this isn't being run in an existing build dir, create one in our -# temp directory. -if test ! -d "${local_builds}"; then - local_builds="${local_cbuild_tmp}/builds" - out="`mkdir -p ${local_builds}`" - if test "$?" -gt 1; then - error "Couldn't create local_builds dir ${local_builds}" - exit 1 - fi -fi - -# Let's make sure that the snapshots portion of the directory is created before -# we use it just to be safe. -out="`mkdir -p ${local_snapshots}`" -if test "$?" -gt 1; then - error "Couldn't create local_snapshots dir ${local_snapshots}" - exit 1 -fi - -# Let's make sure that the build portion of the directory is created before -# we use it just to be safe. -out="`mkdir -p ${local_snapshots}`" - - -# Since we're testing, we don't load the host.conf file, instead -# we create false values that stay consistent. -cbuild_top=/build/cbuild2/test -hostname=test.foobar.org -target=x86_64-linux-gnu - -if test x"$1" = x"-v"; then - debug=yes -fi - -fixme() -{ - if test x"${debug}" = x"yes"; then - echo "($BASH_LINENO): $*" 1>&2 - fi -} - -passes=0 -pass() -{ - echo "PASS: $1" - passes="`expr ${passes} + 1`" -} - -xpasses=0 -xpass() -{ - echo "XPASS: $1" - xpasses="`expr ${xpasses} + 1`" -} - -untested=0 -untested() -{ - echo "UNTESTED: $1" - untested="`expr ${untested} + 1`" -} - -failures=0 -fail() -{ - echo "FAIL: $1" - failures="`expr ${failures} + 1`" -} - -xfailures=0 -xfail() -{ - echo "XFAIL: $1" - xfailures="`expr ${xfailures} + 1`" -} - -totals() -{ - echo "" - echo "Total test results:" - echo " Passes: ${passes}" - echo " Failures: ${failures}" - if test ${xfailures} -gt 0; then - echo " Expected Failures: ${xfailures}" - fi - if test ${untested} -gt 0; then - echo " Untested: ${untested}" - fi -} - -# -# common.sh tests -# -# Pretty much everything uses the git parser so test it first. -. "${topdir}/testsuite/git-parser-tests.sh" -. "${topdir}/testsuite/stamp-tests.sh" -. "${topdir}/testsuite/normalize-tests.sh" -. "${topdir}/testsuite/builddir-tests.sh" - -# ---------------------------------------------------------------------------------- - -echo "============= get_toolname() tests ================" - -testing="get_toolname: uncompressed tarball" -in="http://cbuild.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" -out="`get_toolname ${in}`" -if test ${out} = "gdb"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -testing="get_toolname: compressed tarball" -in="http://cbuild.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" -out="`get_toolname ${in}`" -if test ${out} = "gcc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -testing="get_toolname: svn branch" -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -out="`get_toolname ${in}`" -if test ${out} = "gcc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -testing="get_toolname: bzr <repo> -linaro/<branch>" -in="lp:gdb-linaro/7.5" -out="`get_toolname ${in}`" -if test ${out} = "gdb"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>[no .git suffix]" -in="git://git.linaro.org/toolchain/binutils" -out="`get_toolname ${in}`" -if test ${out} = "binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>[no .git suffix]/<branch> isn't supported." -in="git://git.linaro.org/toolchain/binutils/branch" -out="`get_toolname ${in}`" -if test ${out} != "binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>[no .git suffix]/<branch>@<revision> isn't supported." -in="git://git.linaro.org/toolchain/binutils/branch@12345" -out="`get_toolname ${in}`" -if test ${out} != "binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>[no .git suffix]@<revision>." -# This works, but please don't do this. -in="git://git.linaro.org/toolchain/binutils@12345" -out="`get_toolname ${in}`" -match="binutils" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} but expected ${match}" -fi - -# ---------------------------------------------------------------------------------- -# Test git:// git combinations -testing="get_toolname: git://<repo>.git" -in="git://git.linaro.org/toolchain/binutils.git" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>.git/<branch>" -in="git://git.linaro.org/toolchain/binutils.git/2.4-branch" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>.git/<branch>@<revision>" -in="git://git.linaro.org/toolchain/binutils.git/2.4-branch@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: git://<repo>.git@<revision>" -in="git://git.linaro.org/toolchain/binutils.git@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi -# ---------------------------------------------------------------------------------- -# Test http:// git combinations -testing="get_toolname: http://<repo>.git" -in="http://staging.git.linaro.org/git/toolchain/binutils.git" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<repo>.git/<branch>" -in="http://staging.git.linaro.org/git/toolchain/binutils.git/2.4-branch" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<repo>.git/<branch>@<revision>" -in="http://staging.git.linaro.org/git/toolchain/binutils.git/2.4-branch@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<repo>.git@<revision>" -in="http://staging.git.linaro.org/git/toolchain/binutils.git@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -# Test http://<user>@ git combinations -testing="get_toolname: http://<user>@<repo>.git" -in="http://git@staging.git.linaro.org/git/toolchain/binutils.git" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<user>@<repo>.git/<branch>" -in="http://git@staging.git.linaro.org/git/toolchain/binutils.git/2.4-branch" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<user>@<repo>.git/<branch>@<revision>" -in="http://git@staging.git.linaro.org/git/toolchain/binutils.git/2.4-branch@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: http://<user>@<repo>.git@<revision>" -in="http://git@staging.git.linaro.org/git/toolchain/binutils.git@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"binutils"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -testing="get_toolname: sources.conf identifier <repo>.git" -in="eglibc.git" -out="`get_toolname ${in}`" -if test x"${out}" = x"eglibc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: sources.conf identifier <repo>.git/<branch>" -in="eglibc.git/linaro_eglibc-2_18" -out="`get_toolname ${in}`" -if test x"${out}" = x"eglibc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: sources.conf identifier <repo>.git/<branch>@<revision>" -in="eglibc.git/linaro_eglibc-2_18@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"eglibc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: sources.conf identifier <repo>.git@<revision>" -in="eglibc.git@12345" -out="`get_toolname ${in}`" -if test x"${out}" = x"eglibc"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="get_toolname: combined binutils-gdb repository with gdb branch" -in="binutils-gdb.git/gdb_7_6-branch" -out="`get_toolname ${in}`" -match="gdb" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} expected ${match}" -fi - -testing="get_toolname: combined binutils-gdb repository with binutils branch" -in="binutils-gdb.git/binutils-2_24" -out="`get_toolname ${in}`" -match="binutils" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} but expected ${match}" -fi - -# The special casing for binutils-gdb.git was failing in this one. -testing="get_toolname: combined binutils-gdb repository with linaro binutils branch" -in="binutils-gdb.git/linaro_binutils-2_24_branch" -out="`get_toolname ${in}`" -match="binutils" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} but expected ${match}" -fi - - - -testing="get_toolname: svn archive with /trunk trailing designator" -in="http://llvm.org/svn/llvm-project/cfe/trunk" -out="`get_toolname ${in}`" -match="cfe" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} but expected ${match}" -fi - -testing="get_toolname: linaro linux repository" -in="http://git.linaro.org/kernel/linux-linaro-tracking.git~linux-linaro" -out="`get_toolname ${in}`" -match="linux" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out} but expected ${match}" -fi - -# ---------------------------------------------------------------------------------- -echo "============= fetch() tests ================" -out="`fetch md5sums 2>/dev/null`" -if test $? -eq 0; then - pass "fetch md5sums" -else - fail "fetch md5sums" -fi - -# Fetching again to test the .bak functionality. -out="`fetch md5sums 2>/dev/null`" -if test $? -eq 0; then - pass "fetch md5sums" -else - fail "fetch md5sums" -fi - -if test ! -e "${local_snapshots}/md5sums"; then - fail "Did not find ${local_snapshots}/md5sums" - echo "md5sums needed for snapshots, get_URL, and get_sources tests. Check your network connectivity." 1>&2 - exit 1; -else - pass "Found ${local_snapshots}/md5sums" -fi - -if test ! -e "${local_snapshots}/md5sums.bak"; then - fail "Did not find ${local_snapshots}/md5sums.bak" -else - pass "Found ${local_snapshots}/md5sums.bak" -fi -# ---------------------------------------------------------------------------------- -echo "============= find_snapshot() tests ================" - -testing="find_snapshot: not unique tarball name" -out="`find_snapshot gcc 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "find_snapshot returned ${out}" -fi - -testing="find_snapshot: unique tarball name" -out="`find_snapshot gcc-linaro-4.8-2013.08`" -if test $? -eq 0; then - pass "${testing}" -else - fail "${testing}" - fixme "find_snapshot returned ${out}" -fi - -testing="find_snapshot: unknown tarball name" -out="`find_snapshot gcc-linaro-4.8-2013.06XXX 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "find_snapshot returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -echo "============= get_URL() tests ================" - -# This will dump an error to stderr, so squelch it. -testing="get_URL: non unique identifier shouldn't match in sources.conf." -out="`get_URL gcc 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: unmatching snapshot not found in sources.conf file" -out="`get_URL gcc-linaro-4.8-2013.06-1 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: git URL where sources.conf has a tab" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL gcc_tab.git`" - if test x"`echo ${out}`" = x"http://staging.git.linaro.org/git/toolchain/gcc.git"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: nomatch.git@<revision> shouldn't have a corresponding sources.conf url." -if test ! -e "${PWD}/host.conf"; then - out="`get_URL nomatch.git@12345 2>/dev/null`" - if test x"${out}" = x""; then - pass "${testing}" - else - fail "${testing}" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -echo "============= get_URL() tests with erroneous service:// inputs ================" - -testing="get_URL: Input contains an lp: service." -out="`get_URL lp:cortex-strings 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: Input contains a git:// service." -out="`get_URL git://git.linaro.org/toolchain/eglibc.git 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: Input contains an http:// service." -out="`get_URL http://staging.git.linaro.org/git/toolchain/eglibc.git 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: Input contains an svn:// service." -out="`get_URL svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -echo "============= get_URL() [git|http]:// tests ================" -testing="get_URL: sources.conf <repo>.git identifier should match git://<url>/<repo>.git" -out="`get_URL glibc.git`" -if test x"`echo ${out} | cut -d ' ' -f 1`" = x"http://git.linaro.org/git/toolchain/glibc.git"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git/<branch> identifier should match" -out="`get_URL glibc.git/branch`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~branch"; then - pass "${testing} http://<url>/<repo>.git" -else - fail "${testing} http://<url>/<repo>.git" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git/<multi/part/branch> identifier should match" -out="`get_URL glibc.git/multi/part/branch`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~multi/part/branch"; then - pass "${testing} http://<url>/<repo>.git/multi/part/branch" -else - fail "${testing} http://<url>/<repo>.git/multi/part/branch" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git~<branch> identifier should match" -out="`get_URL glibc.git~branch`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~branch"; then - pass "${testing} http://<url>/<repo>.git~branch" -else - fail "${testing} http://<url>/<repo>.git~branch" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git~<multi/part/branch> identifier should match" -out="`get_URL glibc.git~multi/part/branch`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~multi/part/branch"; then - pass "${testing} http://<url>/<repo>.git~multi/part/branch" -else - fail "${testing} http://<url>/<repo>.git~multi/part/branch" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git/<branch>@<revision> identifier should match" -out="`get_URL glibc.git/branch@12345`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~branch@12345"; then - pass "${testing} http://<url>/<repo>.git/<branch>@<revision>" -else - fail "${testing} http://<url>/<repo>.git/<branch>@<revision>" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git/<mulit/part/branch>@<revision> identifier should match" -out="`get_URL glibc.git/multi/part/branch@12345`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~multi/part/branch@12345"; then - pass "${testing} http://<url>/<repo>.git/<multi/part/branch>@<revision>" -else - fail "${testing} http://<url>/<repo>.git/<multi/part/branch>@<revision>" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git~<branch>@<revision> identifier should match" -out="`get_URL glibc.git~branch@12345`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~branch@12345"; then - pass "${testing} http://<url>/<repo>.git~<branch>@<revision>" -else - fail "${testing} http://<url>/<repo>.git~<branch>@<revision>" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git~<mulit/part/branch>@<revision> identifier should match" -out="`get_URL glibc.git~multi/part/branch@12345`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git~multi/part/branch@12345"; then - pass "${testing} http://<url>/<repo>.git~<multi/part/branch>@<revision>" -else - fail "${testing} http://<url>/<repo>.git~<multi/part/branch>@<revision>" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git@<revision> identifier should match" -out="`get_URL glibc.git@12345`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/glibc.git@12345"; then - pass "${testing} http://<url>/<repo>.git@<revision>" -else - fail "${testing} http://<url>/<repo>.git@<revision>" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: sources.conf <repo>.git identifier should match http://<url>/<repo>.git" -out="`get_URL gcc.git`" -if test x"`echo ${out}`" = x"http://git.linaro.org/git/toolchain/gcc.git"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: Don't match partial match of <repo>[spaces] to sources.conf identifier." -out="`get_URL "eglibc" 2>/dev/null`" -if test x"`echo ${out}`" = x; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -testing="get_URL: Don't match partial match of <repo>[\t] to sources.conf identifier." -out="`get_URL "gcc_tab" 2>/dev/null`" -if test x"`echo ${out}`" = x; then - pass "${testing}" -else - fail "${testing}" - fixme "get_URL returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -echo "============= get_URL() http://git@ tests ================" - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git identifier should match http://git@<url>/<repo>.git" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL git_gcc.git`" - if test x"`echo ${out}`" = x"http://git@staging.git.linaro.org/git/toolchain/gcc.git"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git/<branch> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL git_gcc.git/branch`" - if test x"`echo ${out}`" = x"http://git@staging.git.linaro.org/git/toolchain/gcc.git~branch"; then - pass "${testing} http://git@<url>/<repo>.git~<branch>" - else - fail "${testing} http://git@<url>/<repo>.git~<branch>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://git@<url>/<repo>.git" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git/<branch>@<revision> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL git_gcc.git/branch@12345`" - if test x"`echo ${out} | cut -d ' ' -f 1`" = x"http://git@staging.git.linaro.org/git/toolchain/gcc.git~branch@12345"; then - pass "${testing} http://git@<url>/<repo>.git~<branch>@<revision>" - else - fail "${testing} http://git@<url>/<repo>.git~<branch>@<revision>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://git@<url>/<repo>.git" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git@<revision> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL git_gcc.git@12345`" - if test x"`echo ${out}`" = x"http://git@staging.git.linaro.org/git/toolchain/gcc.git@12345"; then - pass "${testing} http://git@<url>/<repo>.git@<revision>" - else - fail "${testing} http://git@<url>/<repo>.git@<revision>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://git@<url>/<repo>.git" -fi - -# ---------------------------------------------------------------------------------- -echo "============= get_URL() http://user.name@ tests ================" -# We do these these tests to make sure that 'http://git@' -# isn't hardcoded in the scripts. - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git identifier should match http://user.name@<url>/<repo>.git" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL user_gcc.git`" - if test x"`echo ${out}`" = x"http://user.name@staging.git.linaro.org/git/toolchain/gcc.git"; then - pass "${testing} http://<user.name>@<url>/<repo>.git" - else - fail "${testing} http://<user.name>@<url>/<repo>.git" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git/<branch> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL user_gcc.git/branch`" - if test x"`echo ${out}`" = x"http://user.name@staging.git.linaro.org/git/toolchain/gcc.git~branch"; then - pass "${testing} http://user.name@<url>/<repo>.git~<branch>" - else - fail "${testing} http://user.name@<url>/<repo>.git~<branch>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://user.name@<url>/<repo>.git" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git/<branch>@<revision> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL user_gcc.git/branch@12345`" - if test x"`echo ${out} | cut -d ' ' -f 1`" = x"http://user.name@staging.git.linaro.org/git/toolchain/gcc.git~branch@12345"; then - pass "${testing} http://user.name@<url>/<repo>.git~<branch>@<revision>" - else - fail "${testing} http://user.name@<url>/<repo>.git~<branch>@<revision>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://username@<url>/<repo>.git" -fi - -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf <repo>.git@<revision> identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL user_gcc.git@12345`" - if test x"`echo ${out}`" = x"http://user.name@staging.git.linaro.org/git/toolchain/gcc.git@12345"; then - pass "${testing} http://user.name@<url>/<repo>.git@<revision>" - else - fail "${testing} http://user.name@<url>/<repo>.git@<revision>" - fixme "get_URL returned ${out}" - fi -else - untested "${testing} http://username@<url>/<repo>.git" -fi - -echo "============= get_URL() svn and lp tests ================" -# The regular sources.conf won't have this entry. -testing="get_URL: sources.conf svn identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL gcc-svn-4.8`" - if test x"`echo ${out}`" = x"svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -testing="get_URL: sources.conf launchpad identifier should match" -if test ! -e "${PWD}/host.conf"; then - out="`get_URL cortex-strings`" - if test x"`echo ${out}`" = x"lp:cortex-strings"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_URL returned ${out}" - fi -else - untested "${testing}" -fi - -# ---------------------------------------------------------------------------------- -# -# Test package building - -# dryrun=yes -# #gcc_version=linaro-4.8-2013.09 -# gcc_version=git://git.linaro.org/toolchain/gcc.git/fsf-gcc-4_8-branch - -# out="`binary_toolchain 2>&1 | tee xx |grep "DRYRUN:.*Jcvf"`" - -# date="`date +%Y%m%d`" -# tarname="`echo $out | cut -d ' ' -f 9`" -# destdir="`echo $out | cut -d ' ' -f 10`" -# match="${local_snapshots}/gcc.git-${target}-${host}-${date}" - -# if test "`echo ${tarname} | grep -c ${match}`" -eq 1; then -# pass "binary_toolchain: git repository" -# else -# fail "binary_toolchain: git repository" -# fixme "get_URL returned ${out}" -# fi - -# #binutils_version=linaro-4.8-2013.09 -# binutils_version=git://git.linaro.org/toolchain/binutils.git -# out="`binary_sysroot 2>&1 | tee xx |grep "DRYRUN:.*Jcvf"`" -# tarname="`echo $out | cut -d ' ' -f 9`" -# destdir="`echo $out | cut -d ' ' -f 10`" -# match="${local_snapshots}/sysroot-eglibc-linaro-2.18-2013.09-${target}-${date}" -# echo "${tarname}" -# echo "${match}" -# if test "`echo ${tarname} | grep -c ${match}`" -eq 1; then -# pass "binary_toolchain: git repository" -# else -# fail "binary_toolchain: git repository" -# fixme "get_URL returned ${out}" -# fi -# dryrun=no - -echo "============= get_source() tests ================" -# TODO Test ${sources_conf} for ${in} for relevant tests. -# Mark tests as untested if the expected match isn't in sources_conf. -# This might be due to running testsuite in a builddir rather than a -# source dir. - -# get_sources might, at times peak at latest for a hint if it can't find -# things. Keep it unset unless you want to test a specific code leg. -saved_latest=${latest} -latest='' - -# Test get_source with a variety of inputs -testing="get_source: unknown repository" -in="somethingbogus" -out="`get_source ${in} 2>&1`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned \"${out}\"" -fi - -testing="get_source: empty url" -in='' -out="`get_source ${in} 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned \"${out}\"" -fi - -testing="get_source: git repository" -in="eglibc.git" -out="`get_source ${in}`" -if test x"${out}" = x"http://git.linaro.org/git/toolchain/eglibc.git"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: git repository with / branch" -in="eglibc.git/linaro_eglibc-2_17" -out="`get_source ${in}`" -if test x"${out}" = x"http://git.linaro.org/git/toolchain/eglibc.git~linaro_eglibc-2_17"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: git repository with / branch and commit" -in="newlib.git/binutils-2_23-branch@e9a210b" -out="`get_source ${in}`" -if test x"${out}" = x"http://git.linaro.org/git/toolchain/newlib.git~binutils-2_23-branch@e9a210b"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: git repository with ~ branch and commit" -in="newlib.git~binutils-2_23-branch@e9a210b" -out="`get_source ${in}`" -if test x"${out}" = x"http://git.linaro.org/git/toolchain/newlib.git~binutils-2_23-branch@e9a210b"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: <repo>.git@commit" -in="newlib.git@e9a210b" -out="`get_source ${in}`" -if test x"${out}" = x"http://git.linaro.org/git/toolchain/newlib.git@e9a210b"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: tar.bz2 archive" -in="gcc-linaro-4.8-2013.09.tar.xz" -out="`get_source ${in}`" -if test x"${out}" = x"gcc-linaro-4.8-2013.09.tar.xz"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned \"${out}\"" -fi - -testing="get_source: Too many snapshot matches." -in="gcc-linaro" -out="`get_source ${in} 2>/dev/null`" -if test $? -eq 1; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: Non-git direct url" -in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch" -out="`get_source ${in}`" -if test x"${out}" = x"svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -for transport in ssh git http; do - testing="get_source: git direct url not ending in .git (${transport})" - in="${transport}://git.linaro.org/toolchain/eglibc" - out="`get_source ${in}`" - if test x"${out}" = x"${transport}://git.linaro.org/toolchain/eglibc"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi - - testing="get_source: git direct url not ending in .git with revision returns bogus url. (${transport})" - in="${transport}://git.linaro.org/git/toolchain/eglibc/branch@1234567" - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - if test x"${out}" = x"${transport}://git.linaro.org/git/toolchain/eglibc/branch@1234567"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -done - -# These aren't valid if testing from a build directory. -testing="get_source: full url with <repo>.git with no matching source.conf entry should fail." -if test ! -e "${PWD}/host.conf"; then - in="http://git.linaro.org/git/toolchain/foo.git" - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - if test x"${out}" = x"http://git.linaro.org/git/toolchain/foo.git"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -# These aren't valid if testing from a build directory. -testing="get_source: <repo>.git identifier with no matching source.conf entry should fail." -if test ! -e "${PWD}/host.conf"; then - in="nomatch.git" - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - if test x"${out}" = x""; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -# These aren't valid if testing from a build directory. -testing="get_source: <repo>.git@<revision> identifier with no matching source.conf entry should fail." -if test ! -e "${PWD}/host.conf"; then - in="nomatch.git@12345" - - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - - if test x"${out}" = x""; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -testing="get_source: tag matching an svn repo in ${sources_conf}" -in="gcc-4.8-" -out="`get_source ${in} 2>/dev/null`" -if test x"${out}" = x"svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch"; then - xpass "${testing}" -else - # This currently is expected to fail because passing in gcc-4.8 is assumed - # to be a tarball in md5sums, and so it;s never looked up in sources.conf. - # Not sure if this is a bug or an edge case, as specifying more unique - # URL for svn works correctly. - xfail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: <repo>.git matches non .git suffixed url." -in="foo.git" -if test ! -e "${PWD}/host.conf"; then - out="`get_source ${in} 2>/dev/null`" - if test x"${out}" = x"git://testingrepository/foo"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -testing="get_source: <repo>.git/<branch> matches non .git suffixed url." -in="foo.git/bar" -if test ! -e "${PWD}/host.conf"; then - out="`get_source ${in} 2>/dev/null`" - if test x"${out}" = x"git://testingrepository/foo~bar"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -testing="get_source: <repo>.git/<branch>@<revision> matches non .git suffixed url." -in="foo.git/bar@12345" -if test ! -e "${PWD}/host.conf"; then - out="`get_source ${in} 2>/dev/null`" - if test x"${out}" = x"git://testingrepository/foo~bar@12345"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -in="foo.git@12345" -testing="get_source: ${sources_conf}:${in} matching no .git in <repo>@<revision>." -if test ! -e "${PWD}/host.conf"; then - out="`get_source ${in} 2>/dev/null`" - if test x"${out}" = x"git://testingrepository/foo@12345"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -else - untested "${testing}" -fi - -testing="get_source: partial match in snapshots, latest not set." -latest='' -in="gcc-linaro-4.8" -out="`get_source ${in} 2>/dev/null`" -if test x"${out}" = x""; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -testing="get_source: too many matches in snapshots, latest set." -latest="gcc-linaro-4.8-2013.09.tar.xz" -in="gcc-linaro-4.8" -out="`get_source ${in} 2>/dev/null`" -if test x"${out}" = x"gcc-linaro-4.8-2013.09.tar.xz"; then - pass "${testing}" -else - fail "${testing}" - fixme "get_source returned ${out}" -fi - -latest=${saved_latest} - -for transport in ssh git http; do - testing="get_source: git direct url with a ~ branch designation. (${transport})" - in="${transport}://git.linaro.org/toolchain/eglibc.git~branch@1234567" - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - if test x"${out}" = x"${transport}://git.linaro.org/toolchain/eglibc.git~branch@1234567"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi - - testing="get_source: git direct url with a ~ branch designation. (${transport})" - in="$transport://git.savannah.gnu.org/dejagnu.git~linaro" - if test x"${debug}" = x"yes"; then - out="`get_source ${in}`" - else - out="`get_source ${in} 2>/dev/null`" - fi - if test x"${out}" = x"${transport}://git.savannah.gnu.org/dejagnu.git~linaro"; then - pass "${testing}" - else - fail "${testing}" - fixme "get_source returned ${out}" - fi -done - - - - -# ---------------------------------------------------------------------------------- - -echo "========= create_release_tag() tests ============" - -testing="create_release_tag: repository with branch and revision" -date="`date +%Y%m%d`" -in="gcc.git/gcc-4.8-branch@12345abcde" -out="`create_release_tag ${in} | grep -v TRACE`" -toolname="`echo ${out} | cut -d ' ' -f 1`" -branch="`echo ${out} | cut -d ' ' -f 2`" -revision="`echo ${out} | cut -d ' ' -f 3`" -if test x"${out}" = x"gcc.git~gcc-4.8-branch@12345abcde-${date}"; then - pass "${testing}" -else - fail "${testing}" - fixme "create_release_tag returned ${out}" -fi - -branch= -revision= -testing="create_release_tag: repository branch empty" -if test -d ${srcdir}; then - in="gcc.git" - out="`create_release_tag ${in} | grep -v TRACE`" - if test "`echo ${out} | grep -c "gcc.git-${date}"`" -gt 0; then - pass "${testing}" - else - fail "${testing}" - fixme "create_release_tag returned ${out}" - fi -else - untested "${testing}" -fi - -testing="create_release_tag: tarball" -in="gcc-linaro-4.8-2013.09.tar.xz" -out="`create_release_tag ${in} | grep -v TRACE`" -if test x"${out}" = x"gcc-linaro-4.8-${date}"; then - xpass "${testing}" -else - # This fails because the tarball name fails to extract the version. This - # behavious isn't used by Cbuildv, it was an early feature to have some - # compatability with cbuildv1, which used tarballs. Cbuildv2 produces the - # tarballs, it doesn't need to import them anymore. - xfail "${testing}" - fixme "create_release_tag returned ${out}" -fi - -# ---------------------------------------------------------------------------------- -echo "============= checkout () tests ================" -echo " Checking out sources into ${local_snapshots}" -echo " Please be patient while sources are checked out...." -echo "================================================" - -# These can be painfully slow so test small repos. - -test_checkout () -{ - local should="$1" - local testing="$2" - local package="$3" - local branch="$4" - local revision="$5" - - #in="${package}${branch:+/${branch}}${revision:+@${revision}}" - in="${package}${branch:+~${branch}}${revision:+@${revision}}" - - local gitinfo= - gitinfo="`get_URL ${in}`" - - local tag= - tag="`get_git_url ${gitinfo}`" - tag="${tag}${branch:+~${branch}}${revision:+@${revision}}" - - # We also support / designated branches, but want to move to ~ mostly. - #tag="${tag}${branch:+~${branch}}${revision:+@${revision}}" - - if test x"${debug}" = x"yes"; then - out="`(cd ${local_snapshots} && checkout ${tag})`" - else - out="`(cd ${local_snapshots} && checkout ${tag} 2>/dev/null)`" - fi - - local srcdir= - srcdir="`get_srcdir "${tag}"`" - - local branch_test= - if test ! -d ${srcdir}; then - branch_test=0 - elif test x"${branch}" = x -a x"${revision}" = x; then - branch_test=`(cd ${srcdir} && git branch | grep -c "^\* master$")` - else - branch_test=`(cd ${srcdir} && git branch | grep -c "^\* ${branch:+${branch}${revision:+_}}${revision:+${revision}}$")` - fi - - if test x"${branch_test}" = x1 -a x"${should}" = xpass; then - pass "${testing}" - return 0 - elif test x"${branch_test}" = x1 -a x"${should}" = xfail; then - fail "${testing}" - return 1 - elif test x"${branch_test}" = x0 -a x"${should}" = xfail; then - pass "${testing}" - return 0 - else - fail "${testing}" - return 1 - fi -} - -testing="checkout: http://git@<url>/<repo>.git" -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch='' - revision='' - should="pass" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -testing="checkout: http://git@<url>/<repo>.git/<branch>" -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch="gerrit" - revision='' - should="pass" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -testing="checkout: http://git@<url>/<repo>.git@<revision>" -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch='' - revision="9bcced554dfc" - should="pass" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -testing="checkout: http://git@<url>/<repo>.git/unusedbranchnanme@<revision>" -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch="unusedbranchname" - revision="9bcced554dfc" - should="pass" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -testing="checkout: http://git@<url>/<repo>.git/<nonexistentbranch> should fail." -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch="nonexistentbranch" - revision='' - should="fail" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -testing="checkout: http://git@<url>/<repo>.git@<nonexistentrevision> should fail." -if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" - branch='' - revision="123456bogusbranch" - should="fail" - test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -else - untested "${testing}" -fi - -echo "============= misc tests ================" -testing="pipefail" -out="`false | tee /dev/null`" -if test $? -ne 0; then - pass "${testing}" -else - fail "${testing}" -fi - -#Do not pollute env -testing="source_config" -depends="`depends= && source_config isl && echo ${depends}`" -static_link="`static_link= && source_config isl && echo ${static_link}`" -default_configure_flags="`default_configure_flags= && source_config isl && echo ${default_configure_flags}`" -if test x"${depends}" != xgmp; then - fail "${testing}" -elif test x"${static_link}" != xyes; then - fail "${testing}" -elif test x"${default_configure_flags}" != x"--with-gmp-prefix=${PWD}/${hostname}/${build}/depends"; then - fail "${testing}" -else - pass "${testing}" -fi -depends= -default_configure_flags= -static_link= - -testing="read_config one arg" -if test x"`read_config isl static_link`" = xyes; then - pass "${testing}" -else - fail "${testing}" -fi - -testing="read_config multiarg" -if test x"`read_config glib default_configure_flags`" = x"--disable-modular-tests --disable-dependency-tracking --cache-file=/tmp/glib.cache"; then - pass "${testing}" -else - fail "${testing}" -fi - -testing="read_config set then unset" -out="`default_makeflags=\`read_config binutils default_makeflags\` && default_makeflags=\`read_config newlib default_makeflags\` && echo ${default_makeflags}`" -if test $? -gt 0; then - fail "${testing}" -elif test x"${out}" != x; then - fail "${testing}" -else - pass "${testing}" -fi - -dryrun="yes" -tool="binutils" #this is a nice tool to use as it checks the substitution in make install, too -cmp_makeflags="`read_config ${tool} default_makeflags`" -testing="postfix make args (make_all)" -if test x"${cmp_makeflags}" = x; then - untested "${testing}" #implies that the config for this tool no longer contains default_makeflags -else - out="`. ${topdir}/config/${tool}.conf && make_all ${tool}.git 2>&1`" - if test x"${debug}" = x"yes"; then - echo "${out}" - fi - echo "${out}" | grep -- "${cmp_makeflags} 2>&1" > /dev/null - if test $? -eq 0; then - pass "${testing}" - else - fail "${testing}" - fi -fi -testing="postfix make args (make_install)" -cmp_makeflags="`echo ${cmp_makeflags} | sed -e 's:\ball-:install-:g'`" -if test x"${cmp_makeflags}" = x; then - untested "${testing}" #implies that the config for this tool no longer contains default_makeflags -else - out="`. ${topdir}/config/${tool}.conf && make_install ${tool}.git 2>&1`" - if test x"${debug}" = x"yes"; then - echo "${out}" - fi - echo "${out}" | grep -- "${cmp_makeflags} 2>&1" > /dev/null - if test $? -eq 0; then - pass "${testing}" - else - fail "${testing}" - fi -fi -cmp_makeflags= - -testing="configure" -tool="dejagnu" -configure="`grep ^configure= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" -if test x"${configure}" = xno; then - untested "${testing}" -else - out=`configure_build ${tool}.git 2>&1` - if test x"${debug}" = x"yes"; then - echo "${out}" - fi - echo "${out}" | grep -- '^DRYRUN: .*/configure ' > /dev/null - if test $? -eq 0; then - pass "${testing}" - else - fail "${testing}" - fi -fi -testing="copy instead of configure" -tool="eembc" -configure="`grep ^configure= ${topdir}/config/${tool}.conf | cut -d '\"' -f 2`" -if test \! x"${configure}" = xno; then - untested "${testing}" #implies that the tool's config no longer contains configure, or that it has a wrong value -elif test x"${configure}" = xno; then - out=`configure_build ${tool}.git 2>&1` - if test x"${debug}" = x"yes"; then - echo "${out}" - fi - echo "${out}" | grep -- '^DRYRUN: rsync -a --exclude=.git/ .\+/ ' > /dev/null - if test $? -eq 0; then - pass "${testing}" - else - fail "${testing}" - fi -fi -dryrun="no" - -testing="dryrun quote preservation (dryrun=no)" -out=`dryrun 'echo "enquoted"'` -if test x"${out}" = $'xRUN: echo "enquoted"\nenquoted'; then - pass "${testing}" -else - fail "${testing}" -fi -dryrun="yes" -testing="dryrun quote preservation (dryrun=yes)" -out=`dryrun 'echo "enquoted"' 2>&1` -if test x"${out}" = 'xDRYRUN: echo "enquoted"'; then - pass "${testing}" -else - fail "${testing}" -fi -dryrun="no" - -# TODO: Test checkout directly with a non URL. -# TODO: Test checkout with a multi-/ branch - -#testing="checkout: http://git@<url>/<repo>.git~multi/part/branch." -#if test ! -e "${PWD}/host.conf"; then -# package="glibc.git" -# branch='release/2.18/master' -# revision="" -# should="pass" -# test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" -#else -# untested "${testing}" -#fi - -. "${topdir}/testsuite/srcdir-tests.sh" - -# ---------------------------------------------------------------------------------- -# print the total of test results -totals - diff --git a/testsuite/test_sources.conf b/testsuite/test_sources.conf deleted file mode 100644 index 1115185..0000000 --- a/testsuite/test_sources.conf +++ /dev/null @@ -1,27 +0,0 @@ -# -# This is a table of URLs for checking out development sources. -# NOTE: use spaces instead of TABs -# -# For Testing Only - -gcc-svn-4.8 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch -gcc-svn-4.7 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch -gcc.git http://staging.git.linaro.org/git/toolchain/gcc.git -git_gcc.git http://git@staging.git.linaro.org/git/toolchain/gcc.git -user_gcc.git http://user.name@staging.git.linaro.org/git/toolchain/gcc.git -# gcc_tab.git has a tab between .git and git:// for testing. -gcc_tab.git http://staging.git.linaro.org/git/toolchain/gcc.git -binutils.git git://git.linaro.org/toolchain/binutils.git -libgloss.git git://git.linaro.org/toolchain/newlib.git -newlib.git git://git.linaro.org/toolchain/newlib.git -cbuild2.git http://git@staging.git.linaro.org/git/toolchain/cbuild2.git -eglibc.git git://git.linaro.org/toolchain/eglibc.git -glibc.git git://git.linaro.org/toolchain/glibc.git -bitbake.git git://git.openembedded.org/bitbake -# nomatch.git don't uncomment and don't use this identifier. -foo.git git://testingrepository/foo -cortex-strings lp:cortex-strings -binutils-gdb.git git://git.linaro.org/toolchain/binutils-gdb.git -# Required for --dryrun builds. -dejagnu.git git://git.savannah.gnu.org/dejagnu.git -eembc.git ssh://server/path/eembc.git diff --git a/validate.sh b/validate.sh deleted file mode 100755 index dafc054..0000000 --- a/validate.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# load the configure file produced by configure -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -else - echo "Error: this script needs to be run from a configured Cbuild2 tree!" 1>&2 -fi - -if test $# -lt 4; then - echo "ERROR: No revisions to build!" - echo "validate.sh --target triplet 1111 2222 [3333...]" - exit -fi - -# For each revision we build the toolchain for this config triplet -if test `echo $* | grep -c target` -eq 0; then - echo "ERROR: No target to build!" - echo "validate.sh --target triplet 1111 2222 [3333...]" - exit -fi -shift -target=$1 -shift - -# load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" - -. "${topdir}/lib/diff.sh" || exit 1 - -# Get the list of revisions to build and compare -declare -a revisions=($*) - -# Get the path for the other scripts. -fullpath="`which $0`" -cbuild2="`dirname ${fullpath}`/cbuild2.sh" -tcwgweb="`dirname ${fullpath}`/tcwgweb.sh" - -# We'll move all the results to subdirectories under here -resultsdir="${local_builds}/test-results" -mkdir -p ${resultsdir} - -# Build all the specified revisions. -i=0 -while test $i -lt ${#revisions[@]}; do - stamps="`ls -C1 ${local_builds}/${build}/${target}/*-stage2-build.stamp`" - if test "`echo ${stamps} | grep -c ${revisions[$i]}`" -eq 0; then - ${cbuild2} --target ${target} --check gcc=gcc.git@${revisions[$i]} --build all - fi - sums="`find ${local_builds}/${build}/${target} -name \*.sum`" - if test x"${sums}" != x; then - mkdir -p ${resultsdir}/cbuild${revisions[$i]}/${build}-${target} - cp ${sums} ${resultsdir}/cbuild${revisions[$i]}/${build}-${target} - # We don't need these files leftover from the DejaGnu testsuite - # itself. - xz -f ${resultsdir}/cbuild${revisions[$i]}/${build}-${target}/*.sum - rm ${resultsdir}/cbuild${revisions[$i]}/${build}-${target}/{x,xXx,testrun}.sum - fi - i=`expr $i + 1` -done - -# Compare the test results. If we only have 2, just do those. If there -# is a series, do them all in the order they were specified on the -# command line. -if test ${#revisions[@]} -eq 2; then - difftwodirs ${resultsdir}/cbuild${revisions[0]} ${resultsdir}/cbuild${revisions[1]} -else - j=0 - while test $j -lt ${#revisions[@]}; do - first=cbuild${revisions[$j]}/${build}-${target} - j=`expr $j + 1` - second=cbuild${revisions[$j]}/${build}-${target} - if test x"${second}" = x; then - break - else - difftwodirs ${resultsdir}/${first} ${resultsdir}/${second} - fi - done -fi |