xref: /netbsd-src/external/gpl3/gcc/dist/gcc/COPYING (revision 4fee23f98c45552038ad6b5bd05124a41302fb01)
1*4fee23f9Smrg		    GNU GENERAL PUBLIC LICENSE
2*4fee23f9Smrg		       Version 2, June 1991
3*4fee23f9Smrg
4*4fee23f9Smrg Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5*4fee23f9Smrg     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
6*4fee23f9Smrg Everyone is permitted to copy and distribute verbatim copies
7*4fee23f9Smrg of this license document, but changing it is not allowed.
8*4fee23f9Smrg
9*4fee23f9Smrg			    Preamble
10*4fee23f9Smrg
11*4fee23f9Smrg  The licenses for most software are designed to take away your
12*4fee23f9Smrgfreedom to share and change it.  By contrast, the GNU General Public
13*4fee23f9SmrgLicense is intended to guarantee your freedom to share and change free
14*4fee23f9Smrgsoftware--to make sure the software is free for all its users.  This
15*4fee23f9SmrgGeneral Public License applies to most of the Free Software
16*4fee23f9SmrgFoundation's software and to any other program whose authors commit to
17*4fee23f9Smrgusing it.  (Some other Free Software Foundation software is covered by
18*4fee23f9Smrgthe GNU Library General Public License instead.)  You can apply it to
19*4fee23f9Smrgyour programs, too.
20*4fee23f9Smrg
21*4fee23f9Smrg  When we speak of free software, we are referring to freedom, not
22*4fee23f9Smrgprice.  Our General Public Licenses are designed to make sure that you
23*4fee23f9Smrghave the freedom to distribute copies of free software (and charge for
24*4fee23f9Smrgthis service if you wish), that you receive source code or can get it
25*4fee23f9Smrgif you want it, that you can change the software or use pieces of it
26*4fee23f9Smrgin new free programs; and that you know you can do these things.
27*4fee23f9Smrg
28*4fee23f9Smrg  To protect your rights, we need to make restrictions that forbid
29*4fee23f9Smrganyone to deny you these rights or to ask you to surrender the rights.
30*4fee23f9SmrgThese restrictions translate to certain responsibilities for you if you
31*4fee23f9Smrgdistribute copies of the software, or if you modify it.
32*4fee23f9Smrg
33*4fee23f9Smrg  For example, if you distribute copies of such a program, whether
34*4fee23f9Smrggratis or for a fee, you must give the recipients all the rights that
35*4fee23f9Smrgyou have.  You must make sure that they, too, receive or can get the
36*4fee23f9Smrgsource code.  And you must show them these terms so they know their
37*4fee23f9Smrgrights.
38*4fee23f9Smrg
39*4fee23f9Smrg  We protect your rights with two steps: (1) copyright the software, and
40*4fee23f9Smrg(2) offer you this license which gives you legal permission to copy,
41*4fee23f9Smrgdistribute and/or modify the software.
42*4fee23f9Smrg
43*4fee23f9Smrg  Also, for each author's protection and ours, we want to make certain
44*4fee23f9Smrgthat everyone understands that there is no warranty for this free
45*4fee23f9Smrgsoftware.  If the software is modified by someone else and passed on, we
46*4fee23f9Smrgwant its recipients to know that what they have is not the original, so
47*4fee23f9Smrgthat any problems introduced by others will not reflect on the original
48*4fee23f9Smrgauthors' reputations.
49*4fee23f9Smrg
50*4fee23f9Smrg  Finally, any free program is threatened constantly by software
51*4fee23f9Smrgpatents.  We wish to avoid the danger that redistributors of a free
52*4fee23f9Smrgprogram will individually obtain patent licenses, in effect making the
53*4fee23f9Smrgprogram proprietary.  To prevent this, we have made it clear that any
54*4fee23f9Smrgpatent must be licensed for everyone's free use or not licensed at all.
55*4fee23f9Smrg
56*4fee23f9Smrg  The precise terms and conditions for copying, distribution and
57*4fee23f9Smrgmodification follow.
58*4fee23f9Smrg
59*4fee23f9Smrg		    GNU GENERAL PUBLIC LICENSE
60*4fee23f9Smrg   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61*4fee23f9Smrg
62*4fee23f9Smrg  0. This License applies to any program or other work which contains
63*4fee23f9Smrga notice placed by the copyright holder saying it may be distributed
64*4fee23f9Smrgunder the terms of this General Public License.  The "Program", below,
65*4fee23f9Smrgrefers to any such program or work, and a "work based on the Program"
66*4fee23f9Smrgmeans either the Program or any derivative work under copyright law:
67*4fee23f9Smrgthat is to say, a work containing the Program or a portion of it,
68*4fee23f9Smrgeither verbatim or with modifications and/or translated into another
69*4fee23f9Smrglanguage.  (Hereinafter, translation is included without limitation in
70*4fee23f9Smrgthe term "modification".)  Each licensee is addressed as "you".
71*4fee23f9Smrg
72*4fee23f9SmrgActivities other than copying, distribution and modification are not
73*4fee23f9Smrgcovered by this License; they are outside its scope.  The act of
74*4fee23f9Smrgrunning the Program is not restricted, and the output from the Program
75*4fee23f9Smrgis covered only if its contents constitute a work based on the
76*4fee23f9SmrgProgram (independent of having been made by running the Program).
77*4fee23f9SmrgWhether that is true depends on what the Program does.
78*4fee23f9Smrg
79*4fee23f9Smrg  1. You may copy and distribute verbatim copies of the Program's
80*4fee23f9Smrgsource code as you receive it, in any medium, provided that you
81*4fee23f9Smrgconspicuously and appropriately publish on each copy an appropriate
82*4fee23f9Smrgcopyright notice and disclaimer of warranty; keep intact all the
83*4fee23f9Smrgnotices that refer to this License and to the absence of any warranty;
84*4fee23f9Smrgand give any other recipients of the Program a copy of this License
85*4fee23f9Smrgalong with the Program.
86*4fee23f9Smrg
87*4fee23f9SmrgYou may charge a fee for the physical act of transferring a copy, and
88*4fee23f9Smrgyou may at your option offer warranty protection in exchange for a fee.
89*4fee23f9Smrg
90*4fee23f9Smrg  2. You may modify your copy or copies of the Program or any portion
91*4fee23f9Smrgof it, thus forming a work based on the Program, and copy and
92*4fee23f9Smrgdistribute such modifications or work under the terms of Section 1
93*4fee23f9Smrgabove, provided that you also meet all of these conditions:
94*4fee23f9Smrg
95*4fee23f9Smrg    a) You must cause the modified files to carry prominent notices
96*4fee23f9Smrg    stating that you changed the files and the date of any change.
97*4fee23f9Smrg
98*4fee23f9Smrg    b) You must cause any work that you distribute or publish, that in
99*4fee23f9Smrg    whole or in part contains or is derived from the Program or any
100*4fee23f9Smrg    part thereof, to be licensed as a whole at no charge to all third
101*4fee23f9Smrg    parties under the terms of this License.
102*4fee23f9Smrg
103*4fee23f9Smrg    c) If the modified program normally reads commands interactively
104*4fee23f9Smrg    when run, you must cause it, when started running for such
105*4fee23f9Smrg    interactive use in the most ordinary way, to print or display an
106*4fee23f9Smrg    announcement including an appropriate copyright notice and a
107*4fee23f9Smrg    notice that there is no warranty (or else, saying that you provide
108*4fee23f9Smrg    a warranty) and that users may redistribute the program under
109*4fee23f9Smrg    these conditions, and telling the user how to view a copy of this
110*4fee23f9Smrg    License.  (Exception: if the Program itself is interactive but
111*4fee23f9Smrg    does not normally print such an announcement, your work based on
112*4fee23f9Smrg    the Program is not required to print an announcement.)
113*4fee23f9Smrg
114*4fee23f9SmrgThese requirements apply to the modified work as a whole.  If
115*4fee23f9Smrgidentifiable sections of that work are not derived from the Program,
116*4fee23f9Smrgand can be reasonably considered independent and separate works in
117*4fee23f9Smrgthemselves, then this License, and its terms, do not apply to those
118*4fee23f9Smrgsections when you distribute them as separate works.  But when you
119*4fee23f9Smrgdistribute the same sections as part of a whole which is a work based
120*4fee23f9Smrgon the Program, the distribution of the whole must be on the terms of
121*4fee23f9Smrgthis License, whose permissions for other licensees extend to the
122*4fee23f9Smrgentire whole, and thus to each and every part regardless of who wrote it.
123*4fee23f9Smrg
124*4fee23f9SmrgThus, it is not the intent of this section to claim rights or contest
125*4fee23f9Smrgyour rights to work written entirely by you; rather, the intent is to
126*4fee23f9Smrgexercise the right to control the distribution of derivative or
127*4fee23f9Smrgcollective works based on the Program.
128*4fee23f9Smrg
129*4fee23f9SmrgIn addition, mere aggregation of another work not based on the Program
130*4fee23f9Smrgwith the Program (or with a work based on the Program) on a volume of
131*4fee23f9Smrga storage or distribution medium does not bring the other work under
132*4fee23f9Smrgthe scope of this License.
133*4fee23f9Smrg
134*4fee23f9Smrg  3. You may copy and distribute the Program (or a work based on it,
135*4fee23f9Smrgunder Section 2) in object code or executable form under the terms of
136*4fee23f9SmrgSections 1 and 2 above provided that you also do one of the following:
137*4fee23f9Smrg
138*4fee23f9Smrg    a) Accompany it with the complete corresponding machine-readable
139*4fee23f9Smrg    source code, which must be distributed under the terms of Sections
140*4fee23f9Smrg    1 and 2 above on a medium customarily used for software interchange; or,
141*4fee23f9Smrg
142*4fee23f9Smrg    b) Accompany it with a written offer, valid for at least three
143*4fee23f9Smrg    years, to give any third party, for a charge no more than your
144*4fee23f9Smrg    cost of physically performing source distribution, a complete
145*4fee23f9Smrg    machine-readable copy of the corresponding source code, to be
146*4fee23f9Smrg    distributed under the terms of Sections 1 and 2 above on a medium
147*4fee23f9Smrg    customarily used for software interchange; or,
148*4fee23f9Smrg
149*4fee23f9Smrg    c) Accompany it with the information you received as to the offer
150*4fee23f9Smrg    to distribute corresponding source code.  (This alternative is
151*4fee23f9Smrg    allowed only for noncommercial distribution and only if you
152*4fee23f9Smrg    received the program in object code or executable form with such
153*4fee23f9Smrg    an offer, in accord with Subsection b above.)
154*4fee23f9Smrg
155*4fee23f9SmrgThe source code for a work means the preferred form of the work for
156*4fee23f9Smrgmaking modifications to it.  For an executable work, complete source
157*4fee23f9Smrgcode means all the source code for all modules it contains, plus any
158*4fee23f9Smrgassociated interface definition files, plus the scripts used to
159*4fee23f9Smrgcontrol compilation and installation of the executable.  However, as a
160*4fee23f9Smrgspecial exception, the source code distributed need not include
161*4fee23f9Smrganything that is normally distributed (in either source or binary
162*4fee23f9Smrgform) with the major components (compiler, kernel, and so on) of the
163*4fee23f9Smrgoperating system on which the executable runs, unless that component
164*4fee23f9Smrgitself accompanies the executable.
165*4fee23f9Smrg
166*4fee23f9SmrgIf distribution of executable or object code is made by offering
167*4fee23f9Smrgaccess to copy from a designated place, then offering equivalent
168*4fee23f9Smrgaccess to copy the source code from the same place counts as
169*4fee23f9Smrgdistribution of the source code, even though third parties are not
170*4fee23f9Smrgcompelled to copy the source along with the object code.
171*4fee23f9Smrg
172*4fee23f9Smrg  4. You may not copy, modify, sublicense, or distribute the Program
173*4fee23f9Smrgexcept as expressly provided under this License.  Any attempt
174*4fee23f9Smrgotherwise to copy, modify, sublicense or distribute the Program is
175*4fee23f9Smrgvoid, and will automatically terminate your rights under this License.
176*4fee23f9SmrgHowever, parties who have received copies, or rights, from you under
177*4fee23f9Smrgthis License will not have their licenses terminated so long as such
178*4fee23f9Smrgparties remain in full compliance.
179*4fee23f9Smrg
180*4fee23f9Smrg  5. You are not required to accept this License, since you have not
181*4fee23f9Smrgsigned it.  However, nothing else grants you permission to modify or
182*4fee23f9Smrgdistribute the Program or its derivative works.  These actions are
183*4fee23f9Smrgprohibited by law if you do not accept this License.  Therefore, by
184*4fee23f9Smrgmodifying or distributing the Program (or any work based on the
185*4fee23f9SmrgProgram), you indicate your acceptance of this License to do so, and
186*4fee23f9Smrgall its terms and conditions for copying, distributing or modifying
187*4fee23f9Smrgthe Program or works based on it.
188*4fee23f9Smrg
189*4fee23f9Smrg  6. Each time you redistribute the Program (or any work based on the
190*4fee23f9SmrgProgram), the recipient automatically receives a license from the
191*4fee23f9Smrgoriginal licensor to copy, distribute or modify the Program subject to
192*4fee23f9Smrgthese terms and conditions.  You may not impose any further
193*4fee23f9Smrgrestrictions on the recipients' exercise of the rights granted herein.
194*4fee23f9SmrgYou are not responsible for enforcing compliance by third parties to
195*4fee23f9Smrgthis License.
196*4fee23f9Smrg
197*4fee23f9Smrg  7. If, as a consequence of a court judgment or allegation of patent
198*4fee23f9Smrginfringement or for any other reason (not limited to patent issues),
199*4fee23f9Smrgconditions are imposed on you (whether by court order, agreement or
200*4fee23f9Smrgotherwise) that contradict the conditions of this License, they do not
201*4fee23f9Smrgexcuse you from the conditions of this License.  If you cannot
202*4fee23f9Smrgdistribute so as to satisfy simultaneously your obligations under this
203*4fee23f9SmrgLicense and any other pertinent obligations, then as a consequence you
204*4fee23f9Smrgmay not distribute the Program at all.  For example, if a patent
205*4fee23f9Smrglicense would not permit royalty-free redistribution of the Program by
206*4fee23f9Smrgall those who receive copies directly or indirectly through you, then
207*4fee23f9Smrgthe only way you could satisfy both it and this License would be to
208*4fee23f9Smrgrefrain entirely from distribution of the Program.
209*4fee23f9Smrg
210*4fee23f9SmrgIf any portion of this section is held invalid or unenforceable under
211*4fee23f9Smrgany particular circumstance, the balance of the section is intended to
212*4fee23f9Smrgapply and the section as a whole is intended to apply in other
213*4fee23f9Smrgcircumstances.
214*4fee23f9Smrg
215*4fee23f9SmrgIt is not the purpose of this section to induce you to infringe any
216*4fee23f9Smrgpatents or other property right claims or to contest validity of any
217*4fee23f9Smrgsuch claims; this section has the sole purpose of protecting the
218*4fee23f9Smrgintegrity of the free software distribution system, which is
219*4fee23f9Smrgimplemented by public license practices.  Many people have made
220*4fee23f9Smrggenerous contributions to the wide range of software distributed
221*4fee23f9Smrgthrough that system in reliance on consistent application of that
222*4fee23f9Smrgsystem; it is up to the author/donor to decide if he or she is willing
223*4fee23f9Smrgto distribute software through any other system and a licensee cannot
224*4fee23f9Smrgimpose that choice.
225*4fee23f9Smrg
226*4fee23f9SmrgThis section is intended to make thoroughly clear what is believed to
227*4fee23f9Smrgbe a consequence of the rest of this License.
228*4fee23f9Smrg
229*4fee23f9Smrg  8. If the distribution and/or use of the Program is restricted in
230*4fee23f9Smrgcertain countries either by patents or by copyrighted interfaces, the
231*4fee23f9Smrgoriginal copyright holder who places the Program under this License
232*4fee23f9Smrgmay add an explicit geographical distribution limitation excluding
233*4fee23f9Smrgthose countries, so that distribution is permitted only in or among
234*4fee23f9Smrgcountries not thus excluded.  In such case, this License incorporates
235*4fee23f9Smrgthe limitation as if written in the body of this License.
236*4fee23f9Smrg
237*4fee23f9Smrg  9. The Free Software Foundation may publish revised and/or new versions
238*4fee23f9Smrgof the General Public License from time to time.  Such new versions will
239*4fee23f9Smrgbe similar in spirit to the present version, but may differ in detail to
240*4fee23f9Smrgaddress new problems or concerns.
241*4fee23f9Smrg
242*4fee23f9SmrgEach version is given a distinguishing version number.  If the Program
243*4fee23f9Smrgspecifies a version number of this License which applies to it and "any
244*4fee23f9Smrglater version", you have the option of following the terms and conditions
245*4fee23f9Smrgeither of that version or of any later version published by the Free
246*4fee23f9SmrgSoftware Foundation.  If the Program does not specify a version number of
247*4fee23f9Smrgthis License, you may choose any version ever published by the Free Software
248*4fee23f9SmrgFoundation.
249*4fee23f9Smrg
250*4fee23f9Smrg  10. If you wish to incorporate parts of the Program into other free
251*4fee23f9Smrgprograms whose distribution conditions are different, write to the author
252*4fee23f9Smrgto ask for permission.  For software which is copyrighted by the Free
253*4fee23f9SmrgSoftware Foundation, write to the Free Software Foundation; we sometimes
254*4fee23f9Smrgmake exceptions for this.  Our decision will be guided by the two goals
255*4fee23f9Smrgof preserving the free status of all derivatives of our free software and
256*4fee23f9Smrgof promoting the sharing and reuse of software generally.
257*4fee23f9Smrg
258*4fee23f9Smrg			    NO WARRANTY
259*4fee23f9Smrg
260*4fee23f9Smrg  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261*4fee23f9SmrgFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
262*4fee23f9SmrgOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263*4fee23f9SmrgPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264*4fee23f9SmrgOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265*4fee23f9SmrgMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
266*4fee23f9SmrgTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
267*4fee23f9SmrgPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268*4fee23f9SmrgREPAIR OR CORRECTION.
269*4fee23f9Smrg
270*4fee23f9Smrg  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271*4fee23f9SmrgWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272*4fee23f9SmrgREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273*4fee23f9SmrgINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274*4fee23f9SmrgOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275*4fee23f9SmrgTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276*4fee23f9SmrgYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277*4fee23f9SmrgPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278*4fee23f9SmrgPOSSIBILITY OF SUCH DAMAGES.
279*4fee23f9Smrg
280*4fee23f9Smrg		     END OF TERMS AND CONDITIONS
281*4fee23f9Smrg
282*4fee23f9Smrg	    How to Apply These Terms to Your New Programs
283*4fee23f9Smrg
284*4fee23f9Smrg  If you develop a new program, and you want it to be of the greatest
285*4fee23f9Smrgpossible use to the public, the best way to achieve this is to make it
286*4fee23f9Smrgfree software which everyone can redistribute and change under these terms.
287*4fee23f9Smrg
288*4fee23f9Smrg  To do so, attach the following notices to the program.  It is safest
289*4fee23f9Smrgto attach them to the start of each source file to most effectively
290*4fee23f9Smrgconvey the exclusion of warranty; and each file should have at least
291*4fee23f9Smrgthe "copyright" line and a pointer to where the full notice is found.
292*4fee23f9Smrg
293*4fee23f9Smrg    <one line to give the program's name and a brief idea of what it does.>
294*4fee23f9Smrg    Copyright (C) <year>  <name of author>
295*4fee23f9Smrg
296*4fee23f9Smrg    This program is free software; you can redistribute it and/or modify
297*4fee23f9Smrg    it under the terms of the GNU General Public License as published by
298*4fee23f9Smrg    the Free Software Foundation; either version 2 of the License, or
299*4fee23f9Smrg    (at your option) any later version.
300*4fee23f9Smrg
301*4fee23f9Smrg    This program is distributed in the hope that it will be useful,
302*4fee23f9Smrg    but WITHOUT ANY WARRANTY; without even the implied warranty of
303*4fee23f9Smrg    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
304*4fee23f9Smrg    GNU General Public License for more details.
305*4fee23f9Smrg
306*4fee23f9Smrg    You should have received a copy of the GNU General Public License
307*4fee23f9Smrg    along with this program; if not, write to the Free Software
308*4fee23f9Smrg    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
309*4fee23f9Smrg
310*4fee23f9Smrg
311*4fee23f9SmrgAlso add information on how to contact you by electronic and paper mail.
312*4fee23f9Smrg
313*4fee23f9SmrgIf the program is interactive, make it output a short notice like this
314*4fee23f9Smrgwhen it starts in an interactive mode:
315*4fee23f9Smrg
316*4fee23f9Smrg    Gnomovision version 69, Copyright (C) year  name of author
317*4fee23f9Smrg    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318*4fee23f9Smrg    This is free software, and you are welcome to redistribute it
319*4fee23f9Smrg    under certain conditions; type `show c' for details.
320*4fee23f9Smrg
321*4fee23f9SmrgThe hypothetical commands `show w' and `show c' should show the appropriate
322*4fee23f9Smrgparts of the General Public License.  Of course, the commands you use may
323*4fee23f9Smrgbe called something other than `show w' and `show c'; they could even be
324*4fee23f9Smrgmouse-clicks or menu items--whatever suits your program.
325*4fee23f9Smrg
326*4fee23f9SmrgYou should also get your employer (if you work as a programmer) or your
327*4fee23f9Smrgschool, if any, to sign a "copyright disclaimer" for the program, if
328*4fee23f9Smrgnecessary.  Here is a sample; alter the names:
329*4fee23f9Smrg
330*4fee23f9Smrg  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331*4fee23f9Smrg  `Gnomovision' (which makes passes at compilers) written by James Hacker.
332*4fee23f9Smrg
333*4fee23f9Smrg  <signature of Ty Coon>, 1 April 1989
334*4fee23f9Smrg  Ty Coon, President of Vice
335*4fee23f9Smrg
336*4fee23f9SmrgThis General Public License does not permit incorporating your program into
337*4fee23f9Smrgproprietary programs.  If your program is a subroutine library, you may
338*4fee23f9Smrgconsider it more useful to permit linking proprietary applications with the
339*4fee23f9Smrglibrary.  If this is what you want to do, use the GNU Library General
340*4fee23f9SmrgPublic License instead of this License.
341