Compare commits

..
Author SHA1 Message Date
Carlos O'Donell b2a77206b3 Add generic C.UTF-8 locale (Bug 17318)
We add a new C.UTF-8 locale.  This locale is not builtin to glibc, but
is provided as a distinct locale.  The locale provides full support
for UTF-8 and this includes full code point sorting via strcmp-based
collation.

The collation uses a new keyword 'strcmp_collation' which drops all
collation rules and generates an empty zero rules collation to enable
strcmp usage in collation. This ensures that we get full code point
sorting for C.UTF-8 with a minimal 92 bytes of overhead (LC_COLLATE
structure information).

The new locale is added to SUPPORTED.  Minimal test data for specific
code points (minus those not supported by collate-test) is provided
in C.UTF-8.in, and this verifies code point sorting is working
reasonably across the range.  The locale was tested manually with the
full set of code points without failure.

The locale is harmonized with locales already shipping in Gentoo,
Debian, Ubuntu, Fedora, CentOS Stream, and RHEL. A new tst-iconv9 test
is added which verifies the C.UTF-8 locale is generally usable.

Testing for fnmatch, regexec, and recomp is provided by extending
bug-regex1, bugregex19, bug-regex4, bug-regex6, transbug, tst-fnmatch,
tst-regcomp-truncated, and tst-regex to use C.UTF-8.

Tested on x86_64 or i686 without regression.
2021-07-29 01:31:39 -04:00
Carlos O'Donell 7de41f96a1 Add 'strcmp_collation' support for LC_COLLATE.
Support a new directive 'strcmp_collation' in the LC_COLLATE
section of a locale source file. This new directive causes all
collation rules to be dropped and instead 'strcmp' is used for
collation of the input character set. This is required to allow
for a C.UTF-8 that contains zero collation rules (minimal size)
and sorts using code point sorting.

Tested on x86_64 and i686 without regression.
2021-07-29 01:22:55 -04:00
Carlos O'Donell 52d5eb7e06 Add support for locales with zero collation rules.
While there is code to handle 'nrules == 0' in various locations
within posix/fnmatch_loop.c, posix/regcomp.c and posix/regexec.c,
these conditionals do not work.  The only collation with zero
rules in effect today is the builtin C/POSIX locale which is
built by hand, and despite have zero rules it has a collseqmb
and collseqwc tables stored in the locale data. These tables are
simple identity tables which are not actually required and could
be removed at a later date after this change.  The changes are in
order to prepare for C.UTF-8 which has zero rules and has no
collation sequence tables (multibyte or widechar).

No regressions on x86_64 or i686.
2021-07-29 01:16:54 -04:00
18170 changed files with 495204 additions and 1491446 deletions
-4
View File
@@ -1,4 +0,0 @@
[b4]
midmask = https://inbox.sourceware.org/%s
linkmask = https://inbox.sourceware.org/%s
send-series-to = libc-alpha@sourceware.org
-156
View File
@@ -1,156 +0,0 @@
# clang-format file for GLIBC
# Copyright (C) 2022-2026 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# The GNU C Library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <https://www.gnu.org/licenses/>.
#
# Requires clang-format version >= 11.0
#
# For more information, see:
#
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# There are some known cases that this doesn't produce the desired
# style (i.e Preprocessor Directives are over-indented and not
# auto-commented). As a result, this is meant to be a utility to make
# formatting easier, not a definitive standard.
#
# To format the current git diff inplace (-i) the follow command can
# be used:
# $> git diff -U0 --no-color HEAD^ | clang-format-diff -i -p1
#
# To just view the diff clang-format would generate:
# $> git diff -U0 --no-color HEAD^ | clang-format-diff -p1
#
# NB: clang-format-diff, along with other clang-format related tools,
# can be found at: /path/to/llvm-project/clang/tools/clang-format/
#
#
# Based on autogenerated format from:
# $> clang-format --style=GNU -dump-config
---
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: GNU
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakStringLiterals: true
ColumnLimit: 79
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentWidth: 2
IndentPPDirectives: AfterHash
IndentExternBlock: AfterExternBlock
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Always
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Always
ForEachMacros:
- 'FOR_EACH_IMPL'
- 'list_for_each'
- 'list_for_each_prev'
- 'list_for_each_prev_safe'
...
-10387
View File
File diff suppressed because it is too large Load Diff
+339
View File
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-501
View File
@@ -1,501 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Moe Ghoul>, 1 April 1990
Moe Ghoul, President of Vice
That's all there is to it!
-1
View File
@@ -1 +0,0 @@
COPYING.LESSERv2
+502
View File
@@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-338
View File
@@ -1,338 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-674
View File
@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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
<https://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
<https://www.gnu.org/licenses/why-not-lgpl.html>.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+138 -119
View File
@@ -7,7 +7,8 @@ and describes problems you may experience with compilation and
installation.
You will need recent versions of several GNU tools: definitely GCC
and GNU Make, and possibly others. See Tools for Compilation, below.
and GNU Make, and possibly others. *Note Tools for Compilation::,
below.
Configuring and compiling the GNU C Library
===========================================
@@ -48,12 +49,6 @@ if 'CFLAGS' is specified it must enable optimization. For example:
$ ../glibc-VERSION/configure CC="gcc -m32" CFLAGS="-O3"
To test the GNU C Library with a different set of C and C++
compilers, 'TEST_CC=COMPILER' and 'TEST_CXX=COMPILER' arguments can be
passed to 'configure'. For example:
$ ../glibc-VERSION/configure TEST_CC="gcc-6.4.1" TEST_CXX="g++-6.4.1"
The following list describes all of the available options for
'configure':
@@ -111,32 +106,21 @@ passed to 'configure'. For example:
particular case and potentially change debugging information and
metadata only).
'--with-rtld-early-cflags=CFLAGS'
Use additional compiler flags CFLAGS to build the early startup
code of the dynamic linker. These flags can be used to enable
early dynamic linker diagnostics to run on CPUs which are not
compatible with the rest of the GNU C Library, for example, due to
compiler flags which target a later instruction set architecture
(ISA).
'--with-timeoutfactor=NUM'
Specify an integer NUM to scale the timeout of test programs. This
factor can be changed at run time using 'TIMEOUTFACTOR' environment
variable.
'--disable-shared'
Don't build shared libraries even if it is possible. Not all
systems support shared libraries; you need ELF support and
(currently) the GNU linker.
'--disable-default-pie'
Don't build glibc programs and the testsuite as position
independent executables (PIE). By default, glibc programs and tests
are created as position independent executables on targets that
support it. If the toolchain and architecture support it, static
executables are built as static PIE and the resulting glibc can be
used with the GCC option, -static-pie, which is available with GCC
8 or above, to create static PIE.
'--enable-static-pie'
Enable static position independent executable (static PIE) support.
Static PIE is similar to static executable, but can be loaded at
any address without help from a dynamic linker. All static
programs as well as static tests are built as static PIE, except
for those marked with no-pie. The resulting glibc can be used with
the GCC option, -static-pie, which is available with GCC 8 or
above, to create static PIE. This option also implies that glibc
programs and tests are created as dynamic position independent
executables (PIE) by default.
'--enable-cet'
'--enable-cet=permissive'
@@ -146,25 +130,49 @@ passed to 'configure'. For example:
indirect branch tracking (IBT) and shadow stack (SHSTK). When CET
is enabled, the GNU C Library is compatible with all existing
executables and shared libraries. This feature is currently
supported on x86_64 and x32 with GCC 8 and binutils 2.29 or later.
With '--enable-cet', it is an error to dlopen a non CET enabled
shared library in CET enabled application. With
'--enable-cet=permissive', CET is disabled when dlopening a non CET
enabled shared library in CET enabled application.
supported on i386, x86_64 and x32 with GCC 8 and binutils 2.29 or
later. Note that when CET is enabled, the GNU C Library requires
CPUs capable of multi-byte NOPs, like x86-64 processors as well as
Intel Pentium Pro or newer. With '--enable-cet', it is an error to
dlopen a non CET enabled shared library in CET enabled application.
With '--enable-cet=permissive', CET is disabled when dlopening a
non CET enabled shared library in CET enabled application.
NOTE: '--enable-cet' is only supported on x86_64 and x32.
NOTE: '--enable-cet' has been tested for i686, x86_64 and x32 on
non-CET processors. '--enable-cet' has been tested for i686,
x86_64 and x32 on CET processors.
'--enable-memory-tagging'
Enable memory tagging support if the architecture supports it.
When the GNU C Library is built with this option then the resulting
library will be able to control the use of tagged memory when
hardware support is present by use of the tunable
'glibc.mem.tagging'. This includes the generation of tagged memory
when using the 'malloc' APIs.
At present only AArch64 platforms with MTE provide this
functionality, although the library will still operate (without
memory tagging) on older versions of the architecture.
The default is to disable support for memory tagging.
'--disable-profile'
Don't build libraries with profiling information. You may want to
use this option if you don't plan to do profiling.
'--enable-static-nss'
Compile static versions of the NSS (Name Service Switch) libraries.
This is not recommended because it defeats the purpose of NSS; a
program linked statically with the NSS libraries cannot be
dynamically reconfigured to use a different name database.
'--enable-hardcoded-path-in-tests'
By default, dynamic tests are linked to run with the installed C
library. This option hardcodes the newly built C library path in
dynamic tests so that they can be invoked directly.
'--disable-timezone-tools'
By default, time zone related utilities ('zic', 'zdump', and
By default, timezone related utilities ('zic', 'zdump', and
'tzselect') are installed with the GNU C Library. If you are
building these independently (e.g. by using the 'tzcode' package),
then this option will allow disabling the install of these.
@@ -192,8 +200,8 @@ passed to 'configure'. For example:
slightly increased program load times.
'--enable-pt_chown'
The file 'pt_chown' is a helper binary for 'grantpt' (see
Pseudo-Terminals: Allocation) that is installed setuid root to fix
The file 'pt_chown' is a helper binary for 'grantpt' (*note
Pseudo-Terminals: Allocation.) that is installed setuid root to fix
up pseudo-terminal ownership on GNU/Hurd. It is not required on
GNU/Linux, and the GNU C Library will not use the installed
'pt_chown' program when configured with '--enable-pt_chown'.
@@ -209,22 +217,41 @@ passed to 'configure'. For example:
By default for x86_64, the GNU C Library is built with the vector
math library. Use this option to disable the vector math library.
'--disable-static-c++-tests'
By default, if the C++ toolchain lacks support for static linking,
configure fails to find the C++ header files and the glibc build
fails. '--disable-static-c++-link-check' allows the glibc build to
finish, but static C++ tests will fail if the C++ toolchain doesn't
have the necessary static C++ libraries. Use this option to skip
the static C++ tests. This option implies
'--disable-static-c++-link-check'.
'--enable-tunables'
Tunables support allows additional library parameters to be
customized at runtime. This feature is enabled by default. This
option can take the following values:
'--disable-static-c++-link-check'
By default, if the C++ toolchain lacks support for static linking,
configure fails to find the C++ header files and the glibc build
fails. Use this option to disable the static C++ link check so
that the C++ header files can be located. The newly built libc.a
can be used to create static C++ tests if the C++ toolchain has the
necessary static C++ libraries.
'yes'
This is the default if no option is passed to configure. This
enables tunables and selects the default frontend (currently
'valstring').
'no'
This option disables tunables.
'valstring'
This enables tunables and selects the 'valstring' frontend for
tunables. This frontend allows users to specify tunables as a
colon-separated list in a single environment variable
'GLIBC_TUNABLES'.
'--disable-crypt'
Do not install the passphrase-hashing library 'libcrypt' or the
header file 'crypt.h'. 'unistd.h' will still declare the function
'crypt'. Using this option does not change the set of programs
that may need to be linked with '-lcrypt'; it only means that the
GNU C Library will not provide that library.
This option is for hackers and distributions experimenting with
independently-maintained implementations of libcrypt. It may
become the default in a future release.
'--disable-experimental-malloc'
By default, a per-thread cache is enabled in 'malloc'. While this
cache can be disabled on a per-application basis using tunables
(set glibc.malloc.tcache_count to zero), this option can be used to
remove it from the build completely.
'--disable-scv'
Disable using 'scv' instruction for syscalls. All syscalls will
@@ -263,22 +290,6 @@ passed to 'configure'. For example:
the GNU C Library. The default value refers to the main
bug-reporting information for the GNU C Library.
'--enable-fortify-source'
'--enable-fortify-source=LEVEL'
Use -D_FORTIFY_SOURCE='LEVEL' to control hardening in the GNU C
Library. If not provided, 'LEVEL' defaults to highest possible
value supported by the build compiler.
Default is to disable fortification.
'--enable-sframe'
Experimental option supported by some architectures, where the GNU
C Library is built with '-Wa,--gsframe' if 'binutils' supports it.
Currently this is only supported on x86_64 and aarch64. The option
enables SFrame support on 'backtrace'.
Default is to disable SFrame support.
To build the library and related programs, type 'make'. This will
produce a lot of output, some of which may look like errors from 'make'
but aren't. Look for error messages from 'make' containing '***'.
@@ -296,10 +307,10 @@ an appropriate numeric parameter to 'make'. You need a recent GNU
To build and run test programs which exercise some of the library
facilities, type 'make check'. If it does not complete successfully, do
not use the built library, and report a bug after verifying that the
problem is not already known. See Reporting Bugs, for instructions on
reporting bugs. Note that some of the tests assume they are not being
run by 'root'. We recommend you compile and test the GNU C Library as
an unprivileged user.
problem is not already known. *Note Reporting Bugs::, for instructions
on reporting bugs. Note that some of the tests assume they are not
being run by 'root'. We recommend you compile and test the GNU C
Library as an unprivileged user.
Before reporting bugs make sure there is no problem with your system.
The tests (and later installation) use some pre-existing files of the
@@ -427,9 +438,9 @@ a pseudoterminal so it can be used by the calling process. If you are
using a Linux kernel with the 'devpts' filesystem enabled and mounted at
'/dev/pts', you don't need this program.
After installation you should configure the time zone ruleset and
install locales for your system. The time zone ruleset ensures that
timestamps are processed correctly for your location. The locales
After installation you should configure the timezone and install
locales for your system. The time zone configuration ensures that your
system time matches the time for your current timezone. The locales
ensure that the display of information on your system matches the
expectations of your language and geographic region.
@@ -455,11 +466,11 @@ root use 'DESTDIR' e.g. 'make localedata/install-locale-files
DESTDIR=/opt/glibc', but note that this does not change the configured
prefix.
To configure the time zone ruleset, set the 'TZ' environment
To configure the locally used timezone, set the 'TZ' environment
variable. The script 'tzselect' helps you to select the right value.
As an example, for Germany, 'tzselect' would tell you to use
'TZ='Europe/Berlin''. For a system wide installation (the given paths
are for an installation with '--prefix=/usr'), link the time zone file
are for an installation with '--prefix=/usr'), link the timezone file
which is in '/usr/share/zoneinfo' to the file '/etc/localtime'. For
Germany, you might execute 'ln -s /usr/share/zoneinfo/Europe/Berlin
/etc/localtime'.
@@ -472,17 +483,30 @@ build the GNU C Library:
* GNU 'make' 4.0 or newer
As of release time, GNU 'make' 4.4.1 is the newest verified to work
to build the GNU C Library.
As of relase time, GNU 'make' 4.3 is the newest verified to work to
build the GNU C Library.
* GCC 12.1 or newer
* GCC 6.2 or newer
GCC 12.1 or higher is required. In general it is recommended to
use the newest version of the compiler that is known to work for
GCC 6.2 or higher is required. In general it is recommended to use
the newest version of the compiler that is known to work for
building the GNU C Library, as newer compilers usually produce
better code. As of release time, GCC 15.2.1 is the newest compiler
better code. As of release time, GCC 10.2 is the newest compiler
verified to work to build the GNU C Library.
For PowerPC 64-bits little-endian (powerpc64le), a GCC version with
support for '-mno-gnu-attribute', '-mabi=ieeelongdouble', and
'-mabi=ibmlondouble' is required. Likewise, the compiler must also
support passing '-mlong-double-128' with the preceding options. As
of release, this implies GCC 7.4 and newer (excepting GCC 7.5.0,
see GCC PR94200). These additional features are required for
building the GNU C Library with support for IEEE long double.
For ARC architecture builds, GCC 8.3 or higher is needed.
For s390x architecture builds, GCC 7.1 or higher is needed (See gcc
Bug 98269).
For multi-arch support it is recommended to use a GCC which has
been built with support for GNU indirect functions. This ensures
that correct debugging information is generated for functions
@@ -498,20 +522,27 @@ build the GNU C Library:
Check the FAQ for any special compiler issues on particular
platforms.
* GNU 'binutils' 2.39 or later
* GNU 'binutils' 2.25 or later
You must use GNU 'binutils' (as and ld) to build the GNU C Library.
No other assembler or linker has the necessary functionality at the
moment. As of release time, GNU 'binutils' 2.45.1 is the newest
moment. As of release time, GNU 'binutils' 2.35.1 is the newest
verified to work to build the GNU C Library.
For PowerPC 64-bits little-endian (powerpc64le), 'objcopy' is
required to support '--update-section'. This option requires
binutils 2.26 or newer.
ARC architecture needs 'binutils' 2.32 or higher for TLS related
fixes.
* GNU 'texinfo' 4.7 or later
To correctly translate and install the Texinfo documentation you
need this version of the 'texinfo' package. Earlier versions do
not understand all the tags used in the document, and the
installation mechanism for the info files is not present or works
differently. As of release time, 'texinfo' 7.2 is the newest
differently. As of release time, 'texinfo' 6.7 is the newest
verified to work to build the GNU C Library.
* GNU 'awk' 3.1.2, or higher
@@ -519,36 +550,32 @@ build the GNU C Library:
'awk' is used in several places to generate files. Some 'gawk'
extensions are used, including the 'asorti' function, which was
introduced in version 3.1.2 of 'gawk'. As of release time, 'gawk'
version 5.3.2 is the newest verified to work to build the GNU C
version 5.1 is the newest verified to work to build the GNU C
Library.
Testing the GNU C Library requires 'gawk' to be compiled with
support for high precision arithmetic via the 'MPFR'
multiple-precision floating-point computation library.
* GNU 'bison' 2.7 or later
'bison' is used to generate the 'yacc' parser code in the 'intl'
subdirectory. As of release time, 'bison' version 3.8.2 is the
subdirectory. As of release time, 'bison' version 3.7.4 is the
newest verified to work to build the GNU C Library.
* Perl 5
Perl is not required, but if present it is used in some tests and
the 'mtrace' program, to build the GNU C Library manual. As of
release time 'perl' version 5.42.0 is the newest verified to work
release time 'perl' version 5.32.0 is the newest verified to work
to build the GNU C Library.
* GNU 'sed' 3.02 or newer
'Sed' is used in several places to generate files. Most scripts
work with any version of 'sed'. As of release time, 'sed' version
4.9 is the newest verified to work to build the GNU C Library.
4.8 is the newest verified to work to build the GNU C Library.
* Python 3.4 or later
Python is required to build the GNU C Library. As of release time,
Python 3.14.0 is the newest verified to work for building and
Python 3.8.6 is the newest verified to work for building and
testing the GNU C Library.
* PExpect 4.0
@@ -556,23 +583,16 @@ build the GNU C Library:
The pretty printer tests drive GDB through test programs and
compare its output to the printers'. PExpect is used to capture
the output of GDB, and should be compatible with the Python version
in your system. As of release time PExpect 4.9.0 is the newest
in your system. As of release time PExpect 4.8 is the newest
verified to work to test the pretty printers.
* The Python 'abnf' module.
This module is optional and used to verify some ABNF grammars in
the manual. Version 2.2.0 has been confirmed to work as expected.
A missing 'abnf' module does not reduce the test coverage of the
library itself.
* GDB 7.8 or later with support for Python 3.4 or later
* GDB 7.8 or later with support for Python 2.7/3.4 or later
GDB itself needs to be configured with Python support in order to
use the pretty printers. Notice that your system having Python
available doesn't imply that GDB supports it, nor that your
system's Python and GDB's have the same version. As of release
time GNU 'debugger' 14.2 is the newest verified to work to test the
time GNU 'debugger' 10.1 is the newest verified to work to test the
pretty printers.
Unless Python, PExpect and GDB with Python support are present, the
@@ -582,13 +602,13 @@ build the GNU C Library:
If you change any of the 'configure.ac' files you will also need
* GNU 'autoconf' 2.72 (exactly)
* GNU 'autoconf' 2.69 (exactly)
and if you change any of the message translation files you will need
* GNU 'gettext' 0.10.36 or later
As of release time, GNU 'gettext' version 0.23.2 is the newest
As of release time, GNU 'gettext' version 0.21 is the newest
version verified to work to build the GNU C Library.
You may also need these packages if you upgrade your source tree using
@@ -599,13 +619,15 @@ Specific advice for GNU/Linux systems
If you are installing the GNU C Library on GNU/Linux systems, you need
to have the header files from a 3.2 or newer kernel around for
reference. These headers must be installed using 'make
headers_install'; the headers present in the kernel source directory are
not suitable for direct use by the GNU C Library. You do not need to
use that kernel, just have its headers installed where the GNU C Library
can access them, referred to here as INSTALL-DIRECTORY. The easiest way
to do this is to unpack it in a directory such as
'/usr/src/linux-VERSION'. In that directory, run 'make headers_install
reference. (For the ia64 architecture, you need version 3.2.18 or newer
because this is the first version with support for the 'accept4' system
call.) These headers must be installed using 'make headers_install';
the headers present in the kernel source directory are not suitable for
direct use by the GNU C Library. You do not need to use that kernel,
just have its headers installed where the GNU C Library can access them,
referred to here as INSTALL-DIRECTORY. The easiest way to do this is to
unpack it in a directory such as '/usr/src/linux-VERSION'. In that
directory, run 'make headers_install
INSTALL_HDR_PATH=INSTALL-DIRECTORY'. Finally, configure the GNU C
Library with the option '--with-headers=INSTALL-DIRECTORY/include'. Use
the most recent kernel you can get your hands on. (If you are
@@ -634,9 +656,6 @@ components of the GNU C Library installation to be in '/lib' and some in
Library with '--prefix=/usr'. If you set some other prefix or allow it
to default to '/usr/local', then all the components are installed there.
As of release time, Linux version 6.12 is the newest stable version
verified to work to build the GNU C Library.
Reporting Bugs
==============
@@ -662,8 +681,8 @@ Unix C libraries permit things that we don't, such as closing a file
twice.
If you think you have found some way in which the GNU C Library does
not conform to the ISO and POSIX standards (see Standards and
Portability), that is definitely a bug. Report it!
not conform to the ISO and POSIX standards (*note Standards and
Portability::), that is definitely a bug. Report it!
Once you're sure you've found a bug, try to narrow it down to the
smallest test case that reproduces the problem. In the case of a C
+38 -47
View File
@@ -165,8 +165,44 @@ The file if_ppp.h is under the following CMU license:
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The files nss/getnameinfo.c and nss/getaddrinfo.c are copyright (C) by
Craig Metz and are distributed under the following license:
The following license covers the files from Intel's "Highly Optimized
Mathematical Functions for Itanium" collection:
Intel License Agreement
Copyright (c) 2000, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The name of Intel Corporation may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright
(C) by Craig Metz and are distributed under the following license:
/* The Inner Net License, Version 2.00
@@ -353,48 +389,3 @@ Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see
<https://www.gnu.org/licenses/>. */
Copyright (c) 1995 IBM Corporation
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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Various files in sysdeps/ieee754/flt-32, taken from the CORE-MATH project
<https://core-math.gitlabpages.inria.fr/>, are distributed under the
following license:
Copyright (c) 2022-2024 Alexei Sibidanov. Paul Zimmermann.
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
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+109 -212
View File
@@ -1,5 +1,4 @@
# Copyright (C) 1991-2026 Free Software Foundation, Inc.
# Copyright The GNU Toolchain Authors.
# Copyright (C) 1991-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -43,22 +42,6 @@ else
$(error objdir must be defined by the build-directory Makefile)
endif
# Did we request 'make -s' run? "yes" or "no".
# Starting from make-4.4 MAKEFLAGS now contains long
# options like '--shuffle'. To detect presence of 's'
# we pick first word with short options. Long options
# are guaranteed to come after whitespace. We use '-'
# prefix to always have a word before long options
# even if no short options were passed.
# Typical MAKEFLAGS values to watch for:
# "rs --shuffle=42" (silent)
# " --shuffle" (not silent)
ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),)
silent-make := no
else
silent-make := yes
endif
# Root of the sysdeps tree.
sysdep_dir := $(..)sysdeps
export sysdep_dir := $(sysdep_dir)
@@ -360,8 +343,6 @@ whole-archive = -Wl,--whole-archive
# Installed name of the startup code.
# The ELF convention is that the startfile is called crt1.o
start-installed-name = crt1.o
# Similar to crt1.o, but without _IO_stdin_used.
start-name-2.0 = crt1-2.0.o
# On systems that do not need a special startfile for statically linked
# binaries, simply set it to the normal name.
ifndef static-start-installed-name
@@ -376,38 +357,38 @@ else
real-static-start-installed-name = $(static-start-installed-name)
endif
ifeq (yesyes,$(build-shared)$(have-z-combreloc))
combreloc-LDFLAGS = -Wl,-z,combreloc
LDFLAGS.so += $(combreloc-LDFLAGS)
LDFLAGS-rtld += $(combreloc-LDFLAGS)
endif
relro-LDFLAGS = -Wl,-z,relro
LDFLAGS.so += $(relro-LDFLAGS)
LDFLAGS-rtld += $(relro-LDFLAGS)
# Linker options to enable and disable DT_RELR.
ifeq ($(have-dt-relr),yes)
dt-relr-ldflag = -Wl,-z,pack-relative-relocs
no-dt-relr-ldflag = -Wl,-z,nopack-relative-relocs
else
dt-relr-ldflag =
no-dt-relr-ldflag =
ifeq (yes,$(have-hash-style))
# For the time being we unconditionally use 'both'. At some time we
# should declare statically linked code as 'out of luck' and compile
# with --hash-style=gnu only.
hashstyle-LDFLAGS = -Wl,--hash-style=both
LDFLAGS.so += $(hashstyle-LDFLAGS)
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
endif
ifeq (no,$(build-pie-default))
pie-default = $(no-pie-ccflag)
else # build-pie-default
ifeq (yes,$(enable-static-pie))
pic-default = -DPIC
# Compile libc.a and libc_p.a with -fPIE/-fpie for static PIE.
pie-default = $(pie-ccflag)
ifeq (yes,$(enable-static-pie))
static-pie-dt-relr-ldflag = $(dt-relr-ldflag)
ifeq (yes,$(have-static-pie))
static-pie-ldflag = -static-pie
default-pie-ldflag = -static-pie
else
# Static PIE can't have dynamic relocations in read-only segments since
# static PIE is mapped into memory by kernel. --eh-frame-hdr is needed
# for PIE to support exception.
static-pie-ldflag = -Wl,-pie,--no-dynamic-linker,--eh-frame-hdr,-z,text
endif # have-static-pie
endif # enable-static-pie
endif # build-pie-default
default-pie-ldflag = -Wl,-pie,--no-dynamic-linker,--eh-frame-hdr,-z,text
endif
endif
# If lazy relocations are disabled, add the -z now flag. Use
# LDFLAGS-lib.so instead of LDFLAGS.so, to avoid adding the flag to
@@ -431,19 +412,16 @@ link-extra-libs-tests = $(libsupport)
# Command for linking PIE programs with the C library.
ifndef +link-pie
+link-pie-before-inputs = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
$(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(dt-relr-ldflag)) \
-Wl,-O1 -nostdlib -nostartfiles \
+link-pie-before-libc = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
-Wl,-O1 -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \
$(+preinit) $(+prectorS)
+link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \
$(+preinit) $(+prectorS) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
S$(start-installed-name))\
$(+preinit) $(link-extra-libs) \
$(common-objpfx)libc% $(+postinit) \
$(+nolink-deps),$^) \
$(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs)
+link-pie-after-libc = $(+postctorS) $(+postinit)
define +link-pie
@@ -464,18 +442,15 @@ endef
endif
# Command for statically linking programs with the C library.
ifndef +link-static
+link-static-before-inputs = -nostdlib -nostartfiles -static \
$(if $($(@F)-no-pie),$(no-pie-ldflag),$(static-pie-ldflag)) \
$(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(static-pie-dt-relr-ldflag)) \
+link-static-before-libc = -nostdlib -nostartfiles -static -o $@ \
$(if $($(@F)-no-pie),$(no-pie-ldflag),$(default-pie-ldflag)) \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(real-static-start-installed-name)) \
$(+preinit) $(+prectorT)
+link-static-before-libc = -o $@ $(+link-static-before-inputs) \
$(+preinit) $(+prectorT) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
$(start-installed-name))\
$(+preinit) $(link-extra-libs-static) \
$(common-objpfx)libc% $(+postinit) \
$(+nolink-deps), $^) \
$(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs-static)
+link-static-after-libc = $(+postctorT) $(+postinit)
define +link-static
@@ -498,21 +473,17 @@ endif
ifeq (yes,$(build-pie-default))
+link = $(+link-pie)
+link-tests = $(+link-pie-tests)
+link-tests-before-inputs = $(+link-pie-before-inputs) $(rtld-tests-LDFLAGS)
+link-tests-after-inputs = $(link-libc-tests) $(+link-pie-after-libc)
+link-printers-tests = $(+link-pie-printers-tests)
else # not build-pie-default
+link-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \
+link-before-libc = -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \
$(+preinit) $(+prector)
+link-before-libc = -o $@ $(+link-before-inputs) \
$(+preinit) $(+prector) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
$(start-installed-name))\
$(+preinit) $(link-extra-libs) \
$(common-objpfx)libc% $(+postinit) \
$(+nolink-deps),$^) \
$(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs)
+link-after-libc = $(+postctor) $(+postinit)
define +link
@@ -520,8 +491,6 @@ $(CC) $(link-libc-rpath-link) $(+link-before-libc) $(rtld-LDFLAGS) \
$(link-extra-flags) $(link-libc) $(+link-after-libc)
$(call after-link,$@)
endef
+link-tests-before-inputs = $(+link-before-inputs) $(rtld-tests-LDFLAGS)
+link-tests-after-inputs = $(link-libc-tests) $(+link-after-libc)
define +link-tests
$(CC) $(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(+link-after-libc)
@@ -536,45 +505,22 @@ endif # build-pie-default
else # build-static
+link = $(+link-static)
+link-tests = $(+link-static-tests)
+link-tests-before-inputs = $(+link-static-before-inputs)
+link-tests-after-inputs = $(link-libc-static-tests) $(+link-static-after-libc)
+link-printers-tests = $(+link-static-tests)
endif # build-shared
endif # +link
# Command for linking test programs with crt1.o from glibc 2.0.
+link-2.0-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-name-2.0)) \
$(+preinit) $(+prector)
+link-2.0-before-libc = -o $@ $(+link-2.0-before-inputs) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
$(start-name-2.0))\
$(+preinit) $(link-extra-libs) \
$(common-objpfx)libc% $(+postinit) \
$(+nolink-deps),$^) \
$(link-extra-libs)
+link-after-libc = $(+postctor) $(+postinit)
define +link-2.0-tests
$(CC) $(+link-2.0-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(+link-after-libc)
$(call after-link,$@)
endef
# The pretty printer test programs need to be compiled without optimizations
# so they won't confuse gdb. We could use either the 'GCC optimize' pragma
# or the 'optimize' function attribute to achieve this; however, at least on
# ARM, gcc always produces different debugging symbols when invoked with
# a -O greater than 0 than when invoked with -O0, regardless of anything else
# we're using to suppress optimizations. Therefore, we need to explicitly pass
# -O0 to it through CFLAGS. As a result, any fortification needs to be disabled
# as it needs -O greater than 0.
# -O0 to it through CFLAGS.
# Additionally, the build system will try to -include $(common-objpfx)/config.h
# when compiling the tests, which will throw an error if some special macros
# (such as __OPTIMIZE__ and IS_IN_build) aren't defined. To avoid this, we
# tell gcc to define IS_IN_build.
CFLAGS-printers-tests := -O0 -ggdb3 -DIS_IN_build $(no-fortify-source)
CFLAGS-printers-tests := -O0 -ggdb3 -DIS_IN_build
ifeq (yes,$(build-shared))
# These indicate whether to link using the built ld.so or the installed one.
@@ -611,16 +557,11 @@ link-libc-rpath-link = -Wl,-rpath-link=$(rpath-link)
# before the expansion of LDLIBS-* variables).
# Tests use -Wl,-rpath instead of -Wl,-rpath-link for
# build-hardcoded-path-in-tests. Add -Wl,--disable-new-dtags to force
# DT_RPATH instead of DT_RUNPATH which only applies to DT_NEEDED entries
# in the executable and doesn't applies to DT_NEEDED entries in shared
# libraries which are loaded via DT_NEEDED entries in the executable.
# build-hardcoded-path-in-tests.
ifeq (yes,$(build-hardcoded-path-in-tests))
link-libc-tests-rpath-link = $(link-libc-rpath) -Wl,--disable-new-dtags
link-test-modules-rpath-link = $(link-libc-rpath) -Wl,--disable-new-dtags
link-libc-tests-rpath-link = $(link-libc-rpath)
else
link-libc-tests-rpath-link = $(link-libc-rpath-link)
link-test-modules-rpath-link =
endif # build-hardcoded-path-in-tests
link-libc-between-gnulib = $(common-objpfx)libc.so$(libc.so-version) \
@@ -637,9 +578,9 @@ link-libc-printers-tests = $(link-libc-rpath) \
$(link-libc-tests-after-rpath-link)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv mathvec support misc debug
rpath-dirs = math elf dlfcn nss nis rt resolv mathvec support
rpath-link = \
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%))):$(gnulib-extralibdir)
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
else # build-static
link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests)
@@ -696,11 +637,6 @@ link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnuli
# some cases and it is preferable to link with libgcc_eh or libgcc_s
# so that the testing is as similar as possible to how programs will
# be built with the installed glibc.
# This leads to moderate difficulties, also since distributions may
# install libgcc_s.so in directories only found via ld.so.conf, e.g.
# to be able to switch between gcc versions. We need to add the
# corresponding directory to the library search path to make sure
# our test programs can find it.
#
# Some architectures have architecture-specific systems for exception
# handling that may involve undefined references to
@@ -711,29 +647,24 @@ link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnuli
ifndef gnulib
ifneq ($(have-cc-with-libunwind),yes)
libunwind =
ifeq ($(have-libgcc_s),yes)
libgcc_s = -lgcc_s
endif
else
libunwind = -lunwind $(libgcc-name)
libgcc_s = $(libunwind)
libunwind = -lunwind
endif
libgcc_eh := -Wl,--as-needed $(libgcc_s) -Wl,--no-as-needed
libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
gnulib-arch =
gnulib = $(libgcc-name) $(gnulib-arch)
gnulib-tests := $(libgcc-name) $(libgcc_eh)
gnulib-extralibdir = $(dir $(shell $(CC) -print-file-name=libgcc_s.so$(libgcc_s.so-version)))
gnulib = -lgcc $(gnulib-arch)
gnulib-tests := -lgcc $(libgcc_eh)
static-gnulib-arch =
# By default, elf/static-stubs.o, instead of -lgcc_eh, is used to
# statically link programs. When --disable-shared is used, we use
# -lgcc_eh since elf/static-stubs.o isn't sufficient.
ifeq (yes,$(build-shared))
static-gnulib = $(libgcc-name) $(static-gnulib-arch)
static-gnulib = -lgcc $(static-gnulib-arch)
else
static-gnulib = $(libgcc-name) $(libgcc_eh-name) $(static-gnulib-arch)
static-gnulib = -lgcc -lgcc_eh $(static-gnulib-arch)
endif
static-gnulib-tests := $(libgcc-name) $(libgcc_eh-name) $(libunwind)
libc.so-gnulib := $(libgcc-name)
static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
libc.so-gnulib := -lgcc
endif
+preinit = $(addprefix $(csu-objpfx),crti.o)
+postinit = $(addprefix $(csu-objpfx),crtn.o)
@@ -743,15 +674,13 @@ endif
+prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
+postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
# Variants of the two previous definitions for statically linking programs.
static-prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
static-postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
ifeq (yes,$(enable-static-pie))
# Static PIE must use PIE variants.
+prectorT = $(if $($(@F)-no-pie),$(static-prector),$(+prectorS))
+postctorT = $(if $($(@F)-no-pie),$(static-postctor),$(+postctorS))
+prectorT = $(+prectorS)
+postctorT = $(+postctorS)
else
+prectorT = $(static-prector)
+postctorT =$(static-postctor)
+prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
+postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
endif
csu-objpfx = $(common-objpfx)csu/
elf-objpfx = $(common-objpfx)elf/
@@ -782,11 +711,6 @@ run-built-tests = yes
endif
endif
# Whether to build the static math tests
ifndef build-math-static-tests
build-math-static-tests = no
endif
# Whether to stop immediately when a test fails. Nonempty means to
# stop, empty means not to stop.
ifndef stop-on-test-failure
@@ -795,12 +719,10 @@ endif
# How to run a program we just linked with our library.
# The program binary is assumed to be $(word 2,$^).
# We may require additional libraries from gcc (e.g. libgcc_s.so for exception
# handling), which unfortunately somewhat breaks the isolation.
built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
rtld-prefix = $(elf-objpfx)$(rtld-installed-name) \
--library-path \
$(rpath-link)$(patsubst %,:%,$(sysdep-library-path)):$(gnulib-extralibdir)
$(rpath-link)$(patsubst %,:%,$(sysdep-library-path))
ifeq (yes,$(build-shared))
comma = ,
sysdep-library-path = \
@@ -904,12 +826,16 @@ host-test-program-cmd = $(host-built-program-cmd)
endif
# Extra flags to pass to GCC.
+gccwarn := -Wall -Wwrite-strings -Wundef $(cc-option-wimplicit-fallthrough)
ifeq ($(all-warnings),yes)
+gccwarn := -Wall -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
else
+gccwarn := -Wall -Wwrite-strings
endif
+gccwarn += -Wundef
ifeq ($(enable-werror),yes)
+gccwarn += -Werror
endif
+gccwarn-c = -Wstrict-prototypes -Wold-style-definition \
$(cc-option-wfree-labels) $(cc-option-wmissing-parameter-name)
+gccwarn-c = -Wstrict-prototypes -Wold-style-definition
# We do not depend on the address of constants in different files to be
# actually different, so allow the compiler to merge them all.
@@ -920,21 +846,10 @@ endif
# disable any optimization that assume default rounding mode.
+math-flags = -frounding-math
# We have to assume that glibc functions might generate user-visible traps.
+math-flags += -ftrapping-math
# Logically only "libnldbl", "nonlib" and "testsuite" should be using
# -fno-math-errno. However due to GCC bug #88576, only "libm" and
# "libmvec" can use -fno-math-errno.
+extra-math-flags = $(if $(filter libmvec libm,$(in-module)),\
-fno-math-errno,-fmath-errno)
# Use 64 bit time_t support for installed programs
installed-modules = nonlib nscd ldconfig locale_programs \
iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \
libutil libpcprofile libnsl
+extra-time-flags = $(if $(filter $(installed-modules),\
$(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64)
# -fno-math-errno. However due to GCC bug #88576, only "libm" can use
# -fno-math-errno.
+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno)
# We might want to compile with some stack-protection flag.
ifneq ($(stack-protector),)
@@ -949,16 +864,13 @@ define elide-stack-protector
$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector))
endef
# We might want to compile with fortify-source
ifneq ($(fortify-source),)
+fortify-source=$(fortify-source)
# This is the program that generates makefile dependencies from C source files.
# The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy
# targets for headers so that removed headers don't break the build.
ifndef +mkdep
+mkdep = $(CC) -M -MP
endif
# Some routine can't be fortified like the ones used by fortify
define elide-fortify-source
$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-fortify-source))
endef
# The program that makes Emacs-style TAGS files.
ETAGS := etags
@@ -991,7 +903,7 @@ endif
# umpteen zillion filenames along with it (we use `...' instead)
# but we don't want this echoing done when the user has said
# he doesn't want to see commands echoed by using -s.
ifeq ($(silent-make),yes) # if -s
ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
+cmdecho := echo >/dev/null
else # not -s
+cmdecho := echo
@@ -1019,30 +931,6 @@ endif # $(+cflags) == ""
$(+stack-protector) -fno-common
+gcc-nowarn := -w
# We must filter out elf because the early bootstrap of the dynamic loader
# cannot be fortified. Likewise we exclude dlfcn because it is entangled
# with the loader. We must filter out csu because early startup, like the
# loader, cannot be fortified. Lastly debug is the fortification routines
# themselves and they cannot be fortified.
do-fortify = $(filter-out elf dlfcn csu debug,$(subdir))
ifeq ($(do-fortify),$(subdir))
+cflags += $(+fortify-source)
else
+cflags += $(no-fortify-source)
endif
# Filter out LFS flags if compiler defines it by default.
+cflags += $(no-file-offset-bits-source)
# Filter out 64 bit time_t flags if compiler defines it by default.
+cflags += $(no-time-bits-source)
# Enable SFrame while compiling for stack backtracing.
ifeq ($(enable-gsframe),yes)
as-sframe = -Wa,--gsframe
endif
+cflags += $(as-sframe)
# Each sysdeps directory can contain header files that both will be
# used to compile and will be installed. Each can also contain an
# include/ subdirectory, whose header files will be used to compile
@@ -1057,18 +945,17 @@ endif
# current directory.
+includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
$(+sysdep-includes) $(includes) \
$(patsubst %/,-I%,$(..)) $(libio-include) \
$(if $($(<F)-no-include-dot),,-I.) $(sysincludes)
$(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
# Since libio has several internal header files, we use a -I instead
# of many little headers in the include directory.
libio-include = -I$(..)libio
# List of non-library modules that we build.
built-modules = iconvprogs iconvdata ldconfig libmemusage \
libpcprofile librpcsvc locale-programs \
built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \
libSegFault libpcprofile librpcsvc locale-programs \
memusagestat nonlib nscd extramodules libnldbl libsupport \
testsuite testsuite-internal
testsuite
in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
$(libof-$(<F)) \
@@ -1093,19 +980,22 @@ module-cppflags = $(if $(filter %.mk.i %.v.i,$(@F)),,$(module-cppflags-real))
# Note that we can't use -std=* in CPPFLAGS, because it overrides
# the implicit -lang-asm and breaks cpp behavior for .S files--notably
# it causes cpp to stop predefining __ASSEMBLER__.
CPPFLAGS = $(config-extra-cppflags) $(CPPFLAGS-config) \
CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \
$($(subdir)-CPPFLAGS) \
$(+includes) $(defines) $(module-cppflags) \
-include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
$(CPPFLAGS-$(suffix $@)) \
$(foreach lib,$(libof-$(basename $(@F))) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) \
-DTOP_NAMESPACE=glibc
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
ifneq (no,$(have-tunables))
CPPFLAGS += -DTOP_NAMESPACE=glibc
endif
override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(+extra-math-flags) $(+extra-time-flags) \
$(+extra-math-flags) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
$(CFLAGS-$(@F)) $(tls-model) \
$(foreach lib,$(libof-$(basename $(@F))) \
@@ -1132,19 +1022,14 @@ object-suffixes :=
CPPFLAGS-.o = $(pic-default)
# libc.a must be compiled with -fPIE/-fpie for static PIE.
CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default)
CFLAGS-.o += $(call elide-fortify-source,.o,$(routines_no_fortify))
CFLAGS-.o += $(call elide-fortify-source,_chk.o,$(routines_no_fortify))
libtype.o := lib%.a
object-suffixes += .o
ifeq (yes,$(build-shared))
# Under --enable-shared, we will build a shared library of PIC objects.
# The PIC object files are named foo.os.
object-suffixes += .os
pic-cppflags = -DPIC -DSHARED
CPPFLAGS-.os = $(pic-cppflags)
CPPFLAGS-.os = -DPIC -DSHARED
CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
CFLAGS-.os += $(call elide-fortify-source,.os,$(routines_no_fortify))
CFLAGS-.os += $(call elide-fortify-source,_chk.os,$(routines_no_fortify))
libtype.os := lib%_pic.a
# This can be changed by a sysdep makefile
pic-ccflag = -fPIC
@@ -1152,8 +1037,7 @@ pic-ccflag = -fPIC
PIC-ccflag = -fPIC
endif
# This can be changed by a sysdep makefile
pie-ccflag = -fPIE
no-pie-ccflag = -fno-pie
pie-ccflag = -fpie
# This one should always stay like this unless there is a very good reason.
PIE-ccflag = -fPIE
ifeq (yes,$(build-profile))
@@ -1164,8 +1048,6 @@ object-suffixes += .op
CPPFLAGS-.op = -DPROF $(pic-default)
# libc_p.a must be compiled with -fPIE/-fpie for static PIE.
CFLAGS-.op = -pg $(pie-default)
CFLAGS-.op += $(call elide-fortify-source,.op,$(routines_no_fortify))
CFLAGS-.op += $(call elide-fortify-source,_chk.op,$(routines_no_fortify))
libtype.op = lib%_p.a
endif
@@ -1189,9 +1071,13 @@ endif
# The assembler can generate debug information too.
ifndef ASFLAGS
ASFLAGS := $(filter -g% -fdebug-prefix-map=% -m%,$(CFLAGS))
ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
endif
override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
ifndef BUILD_CC
BUILD_CC = $(CC)
endif
override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu) $(as-sframe)
move-if-change = $(SHELL) $(..)scripts/move-if-change
@@ -1285,6 +1171,7 @@ endif
# Build the tunables list header early since it could be used by any module in
# glibc.
ifneq (no,$(have-tunables))
before-compile += $(common-objpfx)dl-tunable-list.h
common-generated += dl-tunable-list.h dl-tunable-list.stmp
@@ -1294,18 +1181,10 @@ $(common-objpfx)dl-tunable-list.stmp: \
$(..)elf/dl-tunables.list \
$(wildcard $(subdirs:%=$(..)%/dl-tunables.list)) \
$(wildcard $(sysdirs:%=%/dl-tunables.list))
LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
$(AWK) -f $^ > ${@:stmp=T}
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
touch $@
# Dump the GCC macros used by the default compiler flags to a header
# file, so that they can be inspected when using different compiler
# flags. Add the GCCMACRO prefix to make these macro names unique.
$(common-objpfx)gcc-macros.h.in: $(common-objpfx)config.status
$(CC) $(CFLAGS) $(CPPFLAGS) -E -dM -x c -o $@ /dev/null
$(common-objpfx)gcc-macros.h: $(common-objpfx)gcc-macros.h.in
sed 's/^#define /#define GCCMACRO/' < $< > $@
before-compile += $(common-objpfx)gcc-macros.h
endif
# Generate version maps, but wait until sysdep-subdirs is known
ifeq ($(sysd-sorted-done),t)
@@ -1413,11 +1292,16 @@ endif
# dependencies and generate sorted-subdirs dynamically.
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
stdlib stdio-common libio malloc string wcsmbs time dirent \
posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual po argp \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow gshadow po argp \
localedata timezone rt conform debug mathvec support \
dlfcn elf
ifeq ($(build-crypt),yes)
all-subdirs += crypt
rpath-dirs += crypt
endif
ifndef avoid-generated
# sysd-sorted itself will contain rules making the sysd-sorted target
# depend on Depend files. But if you just added a Depend file to an
@@ -1456,6 +1340,19 @@ endif
sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
$(firstword $(subst :, ,$p))))
# $(libpthread-routines-var) and $(librt-routines-var) are the make
# variable to which pthread routines need to be added to land in the
# right library.
ifeq ($(pthread-in-libc),yes)
libpthread-routines-var = routines
librt-routines-var = routines
libanl-routines-var = routines
else
libpthread-routines-var = libpthread-routines
librt-routines-var = librt-routines
libanl-routines-var = libanl-routines
endif
# A sysdeps Makeconfig fragment may set libc-reentrant to yes.
ifeq (yes,$(libc-reentrant))
defines += -D_LIBC_REENTRANT
+19 -84
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2026 Free Software Foundation, Inc.
# Copyright (C) 1991-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -141,10 +141,8 @@ usage () {
cat << EOF
Usage: $$0 [OPTIONS] <program> [ARGUMENTS...]
--tool=TOOL Run with the specified TOOL. It can be strace, rpctrace,
valgrind or container. The container will run within
support/test-container. For strace and valgrind,
additional arguments can be passed after the tool name.
--tool=TOOL Run with the specified TOOL. It can be strace, valgrind or
container. The container will run within support/test-container.
EOF
exit 1
@@ -175,16 +173,12 @@ case "$$toolname" in
exec $(subst $(common-objdir),"$${builddir}", $(test-program-prefix)) \
$${1+"$$@"}
;;
strace*)
exec $$toolname $(patsubst %, -E%, $(run-program-env)) \
strace)
exec strace $(patsubst %, -E%, $(run-program-env)) \
$(test-via-rtld-prefix) $${1+"$$@"}
;;
rpctrace)
exec rpctrace $(patsubst %, -E%, $(run-program-env)) \
$(test-via-rtld-prefix) $${1+"$$@"}
;;
valgrind*)
exec env $(run-program-env) $$toolname $(test-via-rtld-prefix) $${1+"$$@"}
valgrind)
exec env $(run-program-env) valgrind $(test-via-rtld-prefix) $${1+"$$@"}
;;
container)
exec env $(run-program-env) $(test-via-rtld-prefix) \
@@ -518,10 +512,7 @@ mostlyclean: parent-mostlyclean
@$(MAKE) subdir_mostlyclean no_deps=t
-rm -f $(postclean)
# Remove test artifacts from the whole glibc build.
# do-tests-clean removes test artifacts from top-level directory, and
# subdir_testclean removes them from individual sub-directories.
tests-clean: do-tests-clean
tests-clean:
@$(MAKE) subdir_testclean no_deps=t
ifneq (,$(CXX))
@@ -545,9 +536,8 @@ tests-special += $(objpfx)check-installed-headers-c.out
libof-check-installed-headers-c := testsuite
$(objpfx)check-installed-headers-c.out: \
scripts/check-installed-headers.sh $(headers)
$(SHELL) $(..)scripts/check-installed-headers.sh c $(supported-fortify) \
"$(CC) $(test-config-cflags-finput-charset-ascii) \
$(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
$(SHELL) $(..)scripts/check-installed-headers.sh c \
"$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
$(headers) > $@; \
$(evaluate-test)
@@ -556,9 +546,8 @@ tests-special += $(objpfx)check-installed-headers-cxx.out
libof-check-installed-headers-cxx := testsuite
$(objpfx)check-installed-headers-cxx.out: \
scripts/check-installed-headers.sh $(headers)
$(SHELL) $(..)scripts/check-installed-headers.sh c++ $(supported-fortify) \
"$(CXX) $(test-config-cxxflags-finput-charset-ascii) \
$(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
$(SHELL) $(..)scripts/check-installed-headers.sh c++ \
"$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
$(headers) > $@; \
$(evaluate-test)
endif # $(CXX)
@@ -569,60 +558,11 @@ $(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers)
--generated $(common-generated) > $@; $(evaluate-test)
endif # $(headers)
# Lint all Makefiles; including this one. Pass `pwd` as the source
# directory since the top-level Makefile is in the root of the source
# tree and these tests are run from there. We add light-weight linting
# to the 'check' target to support the existing developer workflow of:
# edit -> make -> make check; without needing an additional step.
tests-special += $(objpfx)lint-makefiles.out
$(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh
$(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \
$(evaluate-test)
# Link libc.a as a whole to verify that it does not contain multiple
# definitions of any symbols.
tests-special += $(objpfx)link-static-libc.out
$(objpfx)link-static-libc.out:
$(LINK.o) $(whole-archive) -nostdlib -nostartfiles -r \
$(objpfx)libc.a -o /dev/null > $@ 2>&1; \
$(evaluate-test)
# Print test summary for tests in $1 .sum file;
# $2 is optional test identifier.
# Fail if there are unexpected failures in the test results.
define summarize-tests
@grep -E '^[A-Z]+:' $(objpfx)$1 | grep -E -v '^(PASS|XFAIL):' || true
@echo " === Summary of results$2 ==="
@sed -e '/:.*/!d' -e 's/:.*//' < $(objpfx)$1 | sort | uniq -c
@{ \
grep -E '^[A-Z]+:' $(objpfx)$1 | \
grep -E -v '^(X?PASS|XFAIL|UNSUPPORTED):' | \
( \
if ! test -f $(..)allowed-failures.txt; then \
read -r _; exit $$(( $$? == 0 )); \
fi; \
status=0; \
while IFS= read -r line; do \
case "$$line" in \
FAIL:*) \
name=$${line#FAIL: }; \
escaped_name=`printf '%s' "$$name" | sed 's/[.+]/\\&/g'`; \
if grep -Eq -- "^$${escaped_name}[[:space:]]*#" \
$(..)allowed-failures.txt; then \
echo "Ignoring allowed FAIL: $${name}"; \
continue; \
fi; \
echo "Unallowed FAIL: $${name}"; \
status=1; \
;; \
*) \
status=1; \
;; \
esac; \
done; \
exit $$status; \
); \
}
@egrep -v '^(PASS|XFAIL):' $(objpfx)$1 || true
@echo "Summary of test results$2:"
@sed 's/:.*//' < $(objpfx)$1 | sort | uniq -c
@! egrep -q -v '^(X?PASS|XFAIL|UNSUPPORTED):' $(objpfx)$1
endef
# The intention here is to do ONE install of our build into the
@@ -662,15 +602,10 @@ $(objpfx)testroot.pristine/install.stamp :
cp $(objpfx)support/shell-container $(objpfx)testroot.pristine/bin/sh
cp $(objpfx)support/echo-container $(objpfx)testroot.pristine/bin/echo
cp $(objpfx)support/true-container $(objpfx)testroot.pristine/bin/true
# We need to be able to load extra language libraries.
mkdir -p $(objpfx)testroot.pristine/etc/ld.so.conf.d
echo 'include ld.so.conf.d/*.conf' > $(objpfx)testroot.pristine/etc/ld.so.conf
echo $(gnulib-extralibdir) >> $(objpfx)testroot.pristine/etc/ld.so.conf
echo '# file without content' > $(objpfx)testroot.pristine/etc/ld.so.conf.d/999-empty.conf
ifeq ($(run-built-tests),yes)
# Copy these DSOs first so we can overwrite them with our own.
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
$(rtld-prefix) --inhibit-cache \
$(rtld-prefix) \
$(objpfx)testroot.pristine/bin/sh \
| sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\
do \
@@ -679,7 +614,7 @@ ifeq ($(run-built-tests),yes)
$(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
done
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
$(rtld-prefix) --inhibit-cache \
$(rtld-prefix) \
$(objpfx)support/$(LINKS_DSO_PROGRAM) \
| sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\
do \
@@ -780,7 +715,7 @@ endif
INSTALL: manual/install-plain.texi manual/macros.texi \
$(common-objpfx)manual/pkgvers.texi manual/install.texi
makeinfo --no-validate --plaintext --no-number-sections \
--disable-encoding -I$(common-objpfx)manual $< -o $@-tmp
-I$(common-objpfx)manual $< -o $@-tmp
$(AWK) 'NF == 0 { ++n; next } \
NF != 0 { while (n-- > 0) print ""; n = 0; print }' \
< $@-tmp > $@-tmp2
+1 -5
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2026 Free Software Foundation, Inc.
# Copyright (C) 2019-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -33,10 +33,6 @@ test
Note that this will rebuild the test if needed, but will not
rebuild what "make all" would have rebuilt.
build-math-static-tests
Enable extra math tests for static linking. Use like this:
make test t=math/test-float-exp10-static build-math-static-tests=yes
--
Other useful hints:
+4 -24
View File
@@ -1,16 +1,5 @@
srcdir = @srcdir@
TEST_CC = @TEST_CC@
TEST_CXX = @TEST_CXX@
test-cc-option-wimplicit-fallthrough = @libc_cv_test_cc_wimplicit_fallthrough@
test-config-cflags-mprefer-vector-width = @libc_cv_test_cc_mprefer_vector_width@
test-config-cflags-signaling-nans = @libc_cv_test_cc_signaling_nans@
test-cc-option-wfree-labels = @libc_cv_test_cc_wfree_labels@
test-cc-option-wmissing-parameter-name = @libc_cv_test_cc_wmissing_parameter_name@
test-enable-cet = @test_enable_cet@
test-have-static-pie = @libc_cv_test_static_pie@
test-supported-fortify = @libc_cv_test_supported_fortify_source@
# Uncomment the line below if you want to do parallel build.
# PARALLELMFLAGS = -j 4
@@ -19,22 +8,13 @@ test-supported-fortify = @libc_cv_test_supported_fortify_source@
all .DEFAULT:
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
check xcheck test:
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) \
CC="$(TEST_CC)" CXX="$(TEST_CXX)" \
cc-option-wimplicit-fallthrough="$(test-cc-option-wimplicit-fallthrough)" \
config-cflags-mprefer-vector-width="$(test-config-cflags-mprefer-vector-width)" \
config-cflags-signaling-nans="$(test-config-cflags-signaling-nans)" \
cc-option-wfree-labels="$(test-cc-option-wfree-labels)" \
cc-option-wmissing-parameter-name="$(test-cc-option-wmissing-parameter-name)" \
enable-cet="$(test-enable-cet)" \
have-static-pie="$(test-have-static-pie)" \
supported-fortify="$(test-supported-fortify)" \
objdir=`pwd` $@
install:
LC_ALL=C; export LC_ALL; \
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
bench bench-clean bench-build:
$(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
# Convenience target to rebuild ULPs for all math tests.
regen-ulps:
$(MAKE) -C $(srcdir)/math $(PARALLELMFLAGS) objdir=`pwd` $@
+142 -57
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2026 Free Software Foundation, Inc.
# Copyright (C) 1991-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -200,7 +200,7 @@ endif
ifndef subdir
# If a makefile needs to do something conditional on something that
# can only be figured out from headers, write a FOO.make.c input
# file that uses cpp constructs and contains @@@ LINE @@@ for each LINE
# file that uses cpp contructs and contains @@@ LINE @@@ for each LINE
# to emit in the generated makefile, and use -include $(common-objpfx)FOO.make.
#
# We only generate these in the top-level makefile, to avoid any weirdness
@@ -424,12 +424,6 @@ $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
define o-iterator-doit
$(objpfx)%$o: $(objpfx)%.cc $(before-compile); $$(compile-command.cc)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
endif
# Generate .dT files as we compile.
@@ -447,12 +441,10 @@ native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT $@
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
$(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
$(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
# We need this for the output to go in the right place. It will default to
# empty if make was configured to work with a cc that can't grok -c and -o
@@ -467,16 +459,20 @@ compile-stdin.c = $(COMPILE.c) -o $@ -x c - $(compile-mkdep-flags)
# get the wrong predefines.
S-CPPFLAGS = -DASSEMBLER $(asm-CPPFLAGS)
define +make-deps
$(make-target-directory)
$(+mkdep) $< $(if $(filter %.c,$<),$(CFLAGS)) \
$(CPPFLAGS) $($(patsubst .%,%,$(suffix $(<F)))-CPPFLAGS) | sed -e\
's,$(subst .,\.,$(@F:.d=.o)),$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
$(sed-remove-objpfx) $(sed-remove-dotdot) > $(@:.d=.T)
mv -f $(@:.d=.T) $@ $(generate-md5)
endef
ifneq (,$(objpfx))
# Continuation lines here are dangerous because they introduce spaces!
# Also remove the /usr/include/tgmath.h dependency generated by Clang
# even though Clang never reads /usr/include/tgmath.h.
# https://github.com/llvm/llvm-project/issues/120891
define sed-remove-objpfx
-e 's@ $(subst .,\.,$(subst @,\@,$(common-objpfx)))@ $$(common-objpfx)@g' \
-e 's@^$(subst .,\.,$(subst @,\@,$(common-objpfx)))@$$(common-objpfx)@g' \
-e 's@/usr/include/tgmath.h:@@' \
-e 's@ /usr/include/tgmath.h@@'
-e 's@^$(subst .,\.,$(subst @,\@,$(common-objpfx)))@$$(common-objpfx)@g'
endef
endif
@@ -508,9 +504,7 @@ ifeq ($(build-shared),yes)
map-file = $(firstword $($(@F:.so=-map)) \
$(addprefix $(common-objpfx), \
$(filter $(@F:.so=.map),$(version-maps))))
# The map version is created with multiple symbols that might not be
# exported depending of the ABI.
load-map-file = $(map-file:%=-Wl,--version-script=%) $(have-undefined-version)
load-map-file = $(map-file:%=-Wl,--version-script=%)
endif
# Compiler arguments to use to link a shared object with libc and
@@ -545,7 +539,6 @@ lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(link-libc-deps)
define build-shlib-helper
$(LINK.o) -shared -static-libgcc -Wl,-O1 $(sysdep-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(rtld-LDFLAGS) \
$(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(dt-relr-ldflag)) \
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
@@ -553,20 +546,61 @@ $(LINK.o) -shared -static-libgcc -Wl,-O1 $(sysdep-LDFLAGS) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
ifeq (yes,$(use-default-link))
# If the linker is good enough, we can let it use its default linker script.
shlib-lds =
shlib-lds-flags =
else
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
$(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
$(LINK.o) -shared -Wl,-O1 \
-nostdlib -nostartfiles \
$(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
-Wl,--verbose 2>/dev/null | \
sed > $@T \
-e '/^=========/,/^=========/!d;/^=========/d' \
$(if $(filter yes,$(have-hash-style)), \
-e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
-e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
-e '/DATA_SEGMENT_ALIGN/{H;g}' \
, \
-e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
) \
-e 's/^.*\*(\.dynbss).*$$/& \
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-e 's@^.*\*(\.jcr).*$$@& \
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
PROVIDE(__start___libc_atexit = .);\
__libc_atexit : { *(__libc_atexit) }\
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_IO_vtables = .);\
__libc_IO_vtables : { *(__libc_IO_vtables) }\
PROVIDE(__stop___libc_IO_vtables = .);\
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
test -s $@T
mv -f $@T $@
common-generated += shlib.lds
shlib-lds = $(common-objpfx)shlib.lds
shlib-lds-flags = -T $(shlib-lds)
endif
define build-shlib
$(build-shlib-helper) -o $@ \
$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
endef
define build-module-helper
$(LINK.o) -shared -static-libgcc $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
$(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(dt-relr-ldflag)) \
-B$(csu-objpfx) $(load-map-file) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
$(link-test-modules-rpath-link) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
$(libgcc_eh)
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
# This macro is similar to build-shlib but it does not define a soname
@@ -574,12 +608,12 @@ endef
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
define build-module
$(build-module-helper) -o $@ \
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-module-objlist) $(link-libc-args)
$(call after-link,$@)
endef
define build-module-asneeded
$(build-module-helper) -o $@ \
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
$(link-libc-args)
@@ -590,7 +624,7 @@ endef
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \
$(elf-objpfx)sofini.os $(+nolink-deps) \
$(elf-objpfx)sofini.os \
$(link-libc-deps),$^))
build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
@@ -606,11 +640,16 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
LDLIBS-c.so += $(libc.so-gnulib)
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
# Pre-link the objects of libc_pic.a for .gnu.glibc-stub.* processing.
# Pre-link the objects of libc_pic.a so that we can locally resolve
# COMMON symbols before we link against ld.so. This is because ld.so
# contains some of libc_pic.a already, which will prevent the COMMONs
# from being allocated in libc.so, which introduces evil dependencies
# between libc.so and ld.so, which can make it impossible to upgrade.
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) $(whole-archive) $^ -o $@
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@
ifeq (,$(strip $(shlib-lds-flags)))
# Generate a list of -R options to excise .gnu.glibc-stub.* sections.
$(common-objpfx)libc_pic.opts: $(common-objpfx)libc_pic.os
$(OBJDUMP) -h $< | \
@@ -624,6 +663,7 @@ $(common-objpfx)libc_pic.os.clean: $(common-objpfx)libc_pic.opts \
generated += libc_pic.opts libc_pic.os.clean
libc_pic_clean := .clean
endif
# Build a possibly-modified version of libc_pic.a for use in building
# linkobj/libc.so.
@@ -653,14 +693,16 @@ $(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
$(common-objpfx)libc.so: $(common-objpfx)libc_pic.os$(libc_pic_clean) \
$(elf-objpfx)sofini.os \
$(elf-objpfx)interp.os \
$(elf-objpfx)ld.so
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
$(call after-link,$@)
$(common-objpfx)linkobj/libc.so: $(common-objpfx)linkobj/libc_pic.a \
$(elf-objpfx)sofini.os \
$(elf-objpfx)interp.os \
$(elf-objpfx)ld.so
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
$(call after-link,$@)
@@ -721,7 +763,7 @@ endif
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
$(objpfx)%.os $(link-libs-deps)
$(objpfx)%.os $(shlib-lds) $(link-libs-deps)
$(build-module)
endif
@@ -730,7 +772,6 @@ endif
$(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \
$(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
$(addsuffix .d,$(tests) $(tests-internal) $(xtests) \
$(tests-container) $(tests-printers) \
$(test-srcs) $(tests-time64) $(xtests-time64))
ifeq ($(build-programs),yes)
+depfiles += $(addsuffix .d,$(others) $(sysdep-others))
@@ -763,7 +804,7 @@ endif
# Maximize efficiency by minimizing the number of rules.
.SUFFIXES: # Clear the suffix list. We don't use suffix rules.
# Don't define any builtin rules.
MAKEFLAGS := $(MAKEFLAGS) -r
MAKEFLAGS := $(MAKEFLAGS)r
# Generic rule for making directories.
%/:
@@ -780,7 +821,7 @@ MAKEFLAGS := $(MAKEFLAGS) -r
.PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
# Use the verbose option of ar and tar when not running silently.
ifeq ($(silent-make),no) # if not -s
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
verbose := v
else # -s
verbose :=
@@ -1132,6 +1173,8 @@ $(inst_includedir)/%.h: $(common-objpfx)%.h $(+force)
$(do-install)
$(inst_includedir)/%.h: %.h $(+force)
$(do-install)
$(inst_includedir)/%.h: $(..)include/%.h $(+force)
$(do-install)
headers-nonh := $(filter-out %.h,$(headers))
ifdef headers-nonh
$(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
@@ -1191,9 +1234,6 @@ check: tests
.PHONY: xcheck
xcheck: xtests
# Also handle test inputs in sysdeps.
vpath %.input $(sysdirs)
# Handle tests-time64 and xtests-time64 that should built with LFS
# and 64-bit time support.
include $(o-iterator)
@@ -1220,22 +1260,14 @@ lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
all-nonlib := $(strip $(others) $(others-extras))
all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
$(others) $(others-extras))
ifneq (,$(all-nonlib))
cpp-srcs-left = $(all-nonlib)
lib := nonlib
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
# All internal tests use testsuite-internal module since for 64 bit time
# support is set as default for MODULE_NAME=nonlib (which include some
# installed programs).
all-testsuite-internal := $(strip $(tests-internal) $(test-internal-extras))
ifneq (,$(all-testsuite-internal))
cpp-srcs-left = $(all-testsuite-internal)
lib := testsuite-internal
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
ifeq ($(build-shared),yes)
# Generate normalized lists of symbols, versions, and data sizes.
@@ -1329,6 +1361,46 @@ endif
endif
# These will have been set by sysdeps/posix/Makefile.
L_tmpnam ?= 1
TMP_MAX ?= 0
L_ctermid ?= 1
L_cuserid ?= 1
stdio_lim = $(common-objpfx)bits/stdio_lim.h
$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @:
$(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
$(common-objpfx)config.make
$(make-target-directory)
{ echo '#include "$(..)posix/bits/posix1_lim.h"'; \
} | \
$(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \
$(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT)
sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
$(@:st=dT) > $(@:st=dt)
mv -f $(@:st=dt) $(@:st=d)
fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \
filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \
fopen_max=$${fopen_max:-16}; \
filename_max=$${filename_max:-1024}; \
sed -e "s/@FOPEN_MAX@/$$fopen_max/" \
-e "s/@FILENAME_MAX@/$$filename_max/" \
-e "s/@L_tmpnam@/$(L_tmpnam)/" \
-e "s/@TMP_MAX@/$(TMP_MAX)/" \
-e "s/@L_ctermid@/$(L_ctermid)/" \
-e "s/@L_cuserid@/$(L_cuserid)/" \
$< > $(@:st=h.new)
$(move-if-change) $(@:st=h.new) $(@:st=h)
# Remove these last so that they can be examined if something went wrong.
rm -f $(@:st=hT) $(@:st=dT) $(@:st=dt)
touch $@
# Get dependencies.
ifndef no_deps
-include $(stdio_lim:h=d)
endif
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
FORCE:
.PHONY: echo-headers
@@ -1345,13 +1417,18 @@ echo-headers:
clean: common-clean
mostlyclean: common-mostlyclean
# Remove test artifacts from a given directory
do-tests-clean:
-find $(objpfx) -name '*.out' -delete
-find $(objpfx) -name '*.test-result' -delete
-rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) \
$(tests-internal) \
$(xtests) \
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
$(tests-internal) \
$(xtests) \
$(test-srcs)))
# Remove the object files.
common-mostlyclean: do-tests-clean
common-mostlyclean:
-rm -f $(addprefix $(objpfx),$(tests) $(tests-internal) $(xtests) \
$(test-srcs) \
$(others) $(sysdep-others) stubs \
@@ -1360,7 +1437,15 @@ common-mostlyclean: do-tests-clean
$(xtests) \
$(test-srcs) \
$(others) \
$(sysdep-others)))
$(sysdep-others)) \
$(addsuffix .out,$(tests) \
$(tests-internal) \
$(xtests) \
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
$(tests-internal) \
$(xtests) \
$(test-srcs)))
-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
$(install-lib) $(install-lib.so) \
$(install-lib.so:%.so=%_pic.a))
@@ -1403,7 +1488,7 @@ endif
ifneq (,$(strip $(gpl2lgpl)))
ifneq (,$(wildcard $(..)gpl2lgpl.sed))
# Snarf from the original source and frob the copying notice.
# Snarf from the master source and frob the copying notice.
$(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
sed -f $^ > $@-tmp
# So I don't edit them by mistake.
+31 -2211
View File
File diff suppressed because it is too large Load Diff
+6 -7
View File
@@ -12,7 +12,7 @@ implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu and x86_64-gnu.
GNU/Hurd system, using configurations i[4567]86-*-gnu.
When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.
@@ -30,14 +30,14 @@ The GNU C Library supports these configurations for using Linux kernels:
hppa-*-linux-gnu
i[4567]86-*-linux-gnu
x86_64-*-linux-gnu Can build either x86_64 or x32
loongarch64-*-linux-gnu Hardware floating point, LE only.
ia64-*-linux-gnu
m68k-*-linux-gnu
microblaze*-*-linux-gnu
mips-*-linux-gnu
mips64-*-linux-gnu
or1k-*-linux-gnu
powerpc-*-linux-gnu Hardware or software floating point, BE only.
powerpc64*-*-linux-gnu Big-endian and little-endian.
s390-*-linux-gnu
s390x-*-linux-gnu
riscv32-*-linux-gnu
riscv64-*-linux-gnu
@@ -62,10 +62,9 @@ following the bug-reporting instructions below. Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.
Please see https://sourceware.org/glibc/wiki/Bugzilla%20Procedures for bug
reporting information. We are now using the Bugzilla system to track all
bug reports. This web page gives detailed information on how to report
bugs properly.
Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information. We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.
The GNU C Library is free software. See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
+25 -127
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2026 Free Software Foundation, Inc.
# Copyright (C) 1991-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -60,6 +60,9 @@ ifneq "$(findstring env,$(origin common-generated))" ""
common-generated :=
endif
# See below. This must be set before Makerules processes it.
before-compile += $(common-objpfx)bits/stdio_lim.h
include $(..)Makerules
.PHONY: subdir_lib
@@ -85,9 +88,8 @@ tests-special += $(objpfx)check-installed-headers-c.out
libof-check-installed-headers-c := testsuite
$(objpfx)check-installed-headers-c.out: \
$(..)scripts/check-installed-headers.sh $(headers)
$(SHELL) $(..)scripts/check-installed-headers.sh c $(supported-fortify) \
"$(CC) $(test-config-cflags-finput-charset-ascii) \
$(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
$(SHELL) $(..)scripts/check-installed-headers.sh c \
"$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
$(headers) > $@; \
$(evaluate-test)
@@ -98,9 +100,8 @@ tests-special += $(objpfx)check-installed-headers-cxx.out
libof-check-installed-headers-cxx := testsuite
$(objpfx)check-installed-headers-cxx.out: \
$(..)scripts/check-installed-headers.sh $(headers)
$(SHELL) $(..)scripts/check-installed-headers.sh c++ $(supported-fortify) \
"$(CXX) $(test-config-cxxflags-finput-charset-ascii) \
$(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
$(SHELL) $(..)scripts/check-installed-headers.sh c++ \
"$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
$(headers) > $@; \
$(evaluate-test)
endif # $(CXX)
@@ -145,72 +146,47 @@ endif
others: $(py-const)
ifeq ($(run-built-tests),no)
# The $(xtests) dependency ensures that xtests are always built.
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
$(tests) $(tests-internal) $(xtests) \
$(tests-container) \
$(tests-mcheck:%=%-mcheck) \
$(tests-malloc-check:%=%-malloc-check) \
$(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \
$(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) \
$(tests-malloc-largetcache:%=%-malloc-largetcache)) \
$(tests) $(tests-internal) \
$(tests-container)) \
$(test-srcs)) $(tests-special) \
$(tests-printers-programs)
xtests: tests $(xtests-special)
else # $(run-built-tests) != no
# The $(xtests) dependency ensures that xtests are always built.
else
tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
$(addprefix $(objpfx),$(filter-out $(tests-unsupported), $(xtests))) \
$(tests-container:%=$(objpfx)%.out) \
$(tests-mcheck:%=$(objpfx)%-mcheck.out) \
$(tests-malloc-check:%=$(objpfx)%-malloc-check.out) \
$(tests-malloc-hugetlb1:%=$(objpfx)%-malloc-hugetlb1.out) \
$(tests-malloc-hugetlb2:%=$(objpfx)%-malloc-hugetlb2.out) \
$(tests-malloc-largetcache:%=$(objpfx)%-malloc-largetcache.out) \
$(tests-special) $(tests-printers-out)
xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special)
endif # $(run-built-tests) != no
endif
tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
xtests-special-notdir = $(patsubst $(objpfx)%, %, $(xtests-special))
ifeq ($(run-built-tests),no)
tests-expected =
xtests-expected =
else # $(run-built-tests) != no
else
tests-expected = $(tests) $(tests-internal) $(tests-printers) \
$(tests-container) $(tests-malloc-check:%=%-malloc-check) \
$(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \
$(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) \
$(tests-malloc-largetcache:%=%-malloc-largetcache) \
$(tests-mcheck:%=%-mcheck)
xtests-expected = $(xtests)
endif # $(run-built-tests) != no
endif
tests:
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
$(sort $(tests-expected) $(tests-special-notdir:.out=)) \
> $(objpfx)subdir-tests.sum
xtests:
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
$(sort $(xtests-expected) $(xtests-special-notdir:.out=)) \
$(sort $(xtests) $(xtests-special-notdir:.out=)) \
> $(objpfx)subdir-xtests.sum
ifeq ($(build-programs),yes)
ifeq (yes,$(have-libgcc_s))
# NB: Build programs in $(others-noinstall) like tests only if libgcc_s is
# available. Otherwise, "build-many-glibcs.py compilers" will fail to
# build the initial glibc with the initial limited gcc due to the missing
# libgcc_s.
all-notests = $(others-noinstall)
endif
binaries-all-notests = $(filter-out $(all-notests), \
$(others) $(sysdep-others))
binaries-all-notests = $(others) $(sysdep-others)
binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) \
$(tests-container) $(all-notests)
$(tests-container)
binaries-all = $(binaries-all-notests) $(binaries-all-tests)
binaries-static-notests = $(others-static)
binaries-static-tests = $(tests-static) $(xtests-static)
binaries-static = $(binaries-static-notests) $(binaries-static-tests)
binaries-shared-2.0-tests = $(tests-2.0)
ifeq (yesyes,$(have-fpie)$(build-shared))
binaries-pie-tests = $(tests-pie) $(xtests-pie)
binaries-pie-notests = $(others-pie)
@@ -220,9 +196,6 @@ binaries-pie-notests =
endif
binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck)
binaries-malloc-check-tests = $(tests-malloc-check:%=%-malloc-check)
binaries-malloc-hugetlb1-tests = $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1)
binaries-malloc-hugetlb2-tests = $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2)
binaries-malloc-largetcache-tests = $(tests-malloc-largetcache:%=%-malloc-largetcache)
else
binaries-all-notests =
binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs)
@@ -234,14 +207,10 @@ binaries-pie-tests =
binaries-pie-notests =
binaries-mcheck-tests =
binaries-malloc-check-tests =
binaries-malloc-hugetlb1-tests =
binaries-malloc-hugetlb2-tests =
binaries-malloc-largetcache-tests =
endif
binaries-pie = $(binaries-pie-tests) $(binaries-pie-notests)
binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static) \
$(binaries-shared-2.0-tests), \
binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static), \
$(binaries-all-tests))
binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
$(binaries-all-notests))
@@ -254,22 +223,13 @@ $(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o \
endif
ifneq "$(strip $(binaries-shared-tests))" ""
$(addprefix $(objpfx),$(sort $(binaries-shared-tests))): %: %.o \
$(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-tests)
endif
# Linking test programs with crt1.o from glibc 2.0.
ifneq "$(strip $(binaries-shared-2.0-tests))" ""
$(addprefix $(objpfx),$(binaries-shared-2.0-tests)): %: %.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-2.0-tests)
endif
ifneq "$(strip $(binaries-mcheck-tests))" ""
$(addprefix $(objpfx),$(binaries-mcheck-tests)): %-mcheck: %.o \
$(link-extra-libs-tests) \
@@ -287,32 +247,6 @@ $(addprefix $(objpfx),$(binaries-malloc-check-tests)): %-malloc-check: %.o \
$(+link-tests)
endif
ifneq "$(strip $(binaries-malloc-hugetlb1-tests))" ""
$(addprefix $(objpfx),$(binaries-malloc-hugetlb1-tests)): \
%-malloc-hugetlb1: %-malloc-hugetlb1.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-tests)
endif
ifneq "$(strip $(binaries-malloc-hugetlb2-tests))" ""
$(addprefix $(objpfx),$(binaries-malloc-hugetlb2-tests)): \
%-malloc-hugetlb2: %-malloc-hugetlb2.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-tests)
endif
ifneq "$(strip $(binaries-malloc-largetcache-tests))" ""
$(addprefix $(objpfx),$(binaries-malloc-largetcache-tests)): %-malloc-largetcache: %.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-tests)
endif
ifneq "$(strip $(binaries-pie-tests))" ""
$(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \
$(link-extra-libs-tests) \
@@ -350,55 +284,19 @@ $(1)-malloc-check-ENV = MALLOC_CHECK_=3 \
endef
$(foreach t,$(tests-malloc-check),$(eval $(call malloc-check-ENVS,$(t))))
# Generate environment variable GLIBC_TUNABLES to be appended to
# the test environment, appending tunables specifically added for
# each test to the ambient GLIBC_TUNABLES environment variable.
# The *-TUNABLES-only can be used by a test to override any ambient
# tunables.
define test-tun-joined
$(subst $(empty) ,:,$(strip $($*-TUNABLES)))
endef
define test-tunables-all
$(if $($*-TUNABLES),$(if $(GLIBC_TUNABLES),GLIBC_TUNABLES=$(GLIBC_TUNABLES):$(test-tun-joined),GLIBC_TUNABLES=$(test-tun-joined)),)
endef
define test-tunables-only
GLIBC_TUNABLES=$(subst $(empty) ,:,$(strip $($*-TUNABLES-only)))
endef
define test-tunables
$(if $($*-TUNABLES-only),$(test-tunables-only),$(test-tunables-all))
endef
# All malloc-hugetlb1 tests will be run with GLIBC_TUNABLES=glibc.malloc.hugetlb=1
define malloc-hugetlb1-ENVS
$(1)-malloc-hugetlb1-TUNABLES += glibc.malloc.hugetlb=1
endef
$(foreach t,$(tests-malloc-hugetlb1),$(eval $(call malloc-hugetlb1-ENVS,$(t))))
# All malloc-hugetlb2 tests will be run with GLIBC_TUNABLE=glibc.malloc.hugetlb=2
define malloc-hugetlb2-ENVS
$(1)-malloc-hugetlb2-TUNABLES += glibc.malloc.hugetlb=2
endef
$(foreach t,$(tests-malloc-hugetlb2),$(eval $(call malloc-hugetlb2-ENVS,$(t))))
# All malloc-largetcache tests will be run with GLIBC_TUNABLE=glibc.malloc.tcache_max=1048576
define malloc-largetcache-ENVS
$(1)-malloc-largetcache-TUNABLES += glibc.malloc.tcache_max=1048576
endef
$(foreach t,$(tests-malloc-largetcache),$(eval $(call malloc-largetcache-ENVS,$(t))))
# mcheck tests need the debug DSO to support -lmcheck.
define mcheck-ENVS
$(1)-mcheck-ENV = LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
endef
$(foreach t,$(tests-mcheck),$(eval $(call mcheck-ENVS,$(t))))
ifneq "$(strip $(tests) $(tests-container) $(tests-internal) $(xtests) $(test-srcs))" ""
ifneq "$(strip $(tests) $(tests-internal) $(xtests) $(test-srcs))" ""
# These are the implicit rules for making test outputs
# from the test programs and whatever input files are present.
define make-test-out
$(if $($*-ENV-only),$(test-wrapper-env-only) $($*-ENV-only) $(test-tunables),\
$(test-wrapper-env) $(run-program-env) $($*-ENV) $(test-tunables)) \
$(if $($*-ENV-only),$(test-wrapper-env-only) $($*-ENV-only),\
$(test-wrapper-env) $(run-program-env) $($*-ENV)) \
$(host-test-program-cmd) $($*-ARGS)
endef
$(objpfx)%.out: %.input $(objpfx)%
@@ -413,8 +311,8 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
# and pid namespaces) in which to run, should be added to
# tests-container.
$(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
$(test-wrapper-env) $(run-program-env) $(test-via-rtld-prefix) \
$(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) $(test-tunables) \
$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \
$(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \
$(host-test-program-cmd) $($*-ARGS) > $@; \
$(evaluate-test)
-176
View File
@@ -1,176 +0,0 @@
# The GNU C Library Security Policy
This document describes the policy followed by the GNU C Library maintainers
to handle bugs that may have a security impact. This includes determining if a
bug has a security impact, reporting such bugs to the community and handling
such bugs all the way to resolution. This policy may evolve over time, so if
you're reading this from a release tarball, be sure to check the latest copy of
the [SECURITY.md in the
repository](https://sourceware.org/git/?p=glibc.git;a=blob;f=SECURITY.md),
especially for instructions on reporting issues privately.
## What is a security bug?
Most security vulnerabilities in the GNU C Library materialize only after an
application uses functionality in a specific way. Therefore, it is sometimes
difficult to determine if a defect in the GNU C Library constitutes a
vulnerability as such. The follow guidelines can help with a decision.
* Buffer overflows should be treated as security bugs if it is conceivable that
the data triggering them can come from an untrusted source.
* Other bugs that cause memory corruption which is likely exploitable should be
treated as security bugs.
* Information disclosure can be security bugs, especially if exposure through
applications can be determined.
* Memory leaks and races are security bugs if they cause service breakage.
* Stack overflow through unbounded alloca calls or variable-length arrays are
security bugs if it is conceivable that the data triggering the overflow
could come from an untrusted source.
* Stack overflow through deep recursion and other crashes are security bugs if
they cause service breakage.
* Bugs that cripple the whole system (so that it doesn't even boot or does not
run most applications) are not security bugs because they will not be
exploitable in practice, due to general system instability.
* Bugs that crash `nscd` are generally security bugs, except if they can only
be triggered by a trusted data source (DNS is not trusted, but NIS and LDAP
probably are).
* The [Security Exceptions](#SecurityExceptions) section below describes
subsystems for which determining the security status of bugs is especially
complicated.
* For consistency, if the bug has received a CVE name attributing it to the GNU
C library, it should be flagged `security+`.
* Duplicates of security bugs (flagged with `security+`) should be flagged
`security-`, to avoid cluttering the reporting.
In this context, _service breakage_ means client-side privilege escalation
(code execution) or server-side denial of service or privilege escalation
through actual, concrete, non-synthetic applications. Or put differently, if
the GNU C Library causes a security bug in an application (and the application
uses the library in a standard-conforming manner or according to the manual),
the GNU C Library bug should be treated as security-relevant.
### Security Exceptions
It may be especially complicated to determine the security status of bugs in
some subsystems in the GNU C Library. This subsection describes such
subsystems and the special considerations applicable during security bug
classification in them.
#### Regular expression processing
Regular expression processing comes in two parts, compilation (through regcomp)
and execution (through regexec).
Implementing regular expressions efficiently, in a standard-conforming way, and
without denial-of-service vulnerabilities is very difficult and impossible for
Basic Regular Expressions. Most implementation strategies have issues dealing
with certain classes of patterns.
Consequently, certain issues which can be triggered only with crafted patterns
(either during compilation or execution) are treated as regular bugs and not
security issues. Examples of such issues would include (but is not limited
to):
* Running out of memory through valid use of malloc
* Quadratic or exponential behaviour resulting in slow execution time
* Stack overflows due to recursion when processing patterns
Crashes, infinite loops (and not merely exponential behavior), buffer overflows
and overreads, memory leaks and other bugs resulting from the regex
implementation relying on undefined behavior should be treated as security
vulnerabilities.
#### wordexp patterns
`wordexp` inherently has exponential memory consumption in terms of the input
size. This means that denial of service flaws from crafted patterns are not
security issues (even if they lead to other issues, such as NULL pointer
dereferences).
#### Asynchronous I/O
The GNU C Library tries to implement asynchronous I/O without kernel support,
which means that several operations are not fully standard conforming. Several
known races can cause crashes and resource leaks. Such bugs are only treated
as security bugs if applications (as opposed to synthetic test cases) have
security exposures due to these bugs.
#### Asynchronous cancellation
The implementation of asynchronous cancellation is not fully
standard-conforming and has races and leaks. Again, such bugs are only treated
as security bugs if applications (as opposed to synthetic test cases) have
security exposures due to these bugs.
#### Crafted binaries and ldd
The `ldd` tool is not expected to be used with untrusted executables.
#### Post-exploitation countermeasures
Certain features have been added to the library only to make exploitation of
security bugs (mainly for code execution) more difficult. Examples includes
the stack smashing protector, function pointer obfuscation, vtable validation
for stdio stream handles, and various heap consistency checks. Failure of such
countermeasures to stop exploitation of a different vulnerability is not a
security vulnerability in itself. By their nature, these countermeasures are
based on heuristics and will never offer complete protection, so the original
vulnerability needs to be fixed anyway.
## Reporting security bugs
The process to report security bugs is documented on the glibc [security
page](https://sourceware.org/glibc/security.html). In general, most security
bugs may be reported publicly in the [glibc
bugzilla](https://sourceware.org/glibc/bugs.html), but if in doubt, please feel
free to report security issues privately first.
## Triaging security bugs
This section is aimed at developers, not reporters.
Security-relevant bugs should be marked with `security+`, as per the [Bugzilla
security flag
documentation](https://sourceware.org/glibc/wiki/Bugzilla%20Procedures#security),
following the guidelines above. If you set the `security+` flag, you should
make sure the following information is included in the bug (usually in a bug
comment):
* The first glibc version which includes the vulnerable code. If the
vulnerability was introduced before glibc 2.4 (released in 2006), this
information is not necessary.
* The commit or commits (identified by hash) that fix this vulnerability in the
master branch, and (for historic security bugs) the first release that
includes this fix.
* The summary should include the CVE names (if any), in parentheses at the end.
* If there is a single CVE name assigned to this bug, it should be set as an
alias.
The following links are helpful for finding untriaged bugs:
* [Unprocessed bugs](https://sourceware.org/bugzilla/buglist.cgi?f1=flagtypes.name&o1=notsubstring&product=glibc&query_format=advanced&v1=security)
* [`security?` review requests](https://sourceware.org/bugzilla/buglist.cgi?f1=flagtypes.name&o1=substring&product=glibc&query_format=advanced&v1=security%3f)
* [Open `security+` bugs](https://sourceware.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=VERIFIED&f1=flagtypes.name&o1=substring&product=glibc&query_format=advanced&v1=security%2B)
## Fixing security bugs
For changes to master, the regular [consensus-driven
process](https://sourceware.org/glibc/wiki/Consensus) must be followed. It
makes sense to obtain consensus in private, to ensure that the patch is likely
in a committable state, before disclosing an emboargoed vulnerability.
Security backports to release branches need to follow the
[release process](https://sourceware.org/glibc/wiki/Release#General_policy).
Contact the [website
maintainers](https://sourceware.org/glibc/wiki/MAINTAINERS#Maintainers_for_the_website)
and have them draft a news entry for the website frontpage to direct users to
the bug, the fix, or the mailing list discussions.
## CVE assignment
Security bugs flagged with `security+` should have [CVE
identifiers](https://www.cve.org/About/Overview). Please reach out to the glibc
security team using the documented [security
process](https://sourceware.org/glibc/security.html) and they work on getting a
CVE number.
-855
View File
@@ -1,855 +0,0 @@
# Files shared with other projects. Pass a file path to the
# get_glibc_shared_code() function in the python library
# scripts/glibc_shared_code.py to get a dict object with this information. See
# the library sources for more information.
# The headers on most of these files indicate that glibc is the canonical
# source for these files, although in many cases there seem to be useful
# changes in the gnulib versions that could be merged back in. Not all gnulib
# files contain such a header and it is not always consistent in its format, so
# it would be useful to make sure that all gnulib files that are using glibc as
# upstream have a greppable header.
#
# These files are quite hard to find without a header to grep for and each file
# has to be compared manually so this list is likely incomplete or may contain
# errors.
gnulib:
COPYINGv2
COPYINGv3
COPYING.LESSERv2
doc/fdl-1.3.texi
argp/argp-ba.c
argp/argp-ba.c
argp/argp-eexst.c
argp/argp-fmtstream.c
argp/argp-fmtstream.h
argp/argp-fs-xinl.c
argp/argp-help.c
argp/argp-namefrob.h
argp/argp-parse.c
argp/argp-pv.c
argp/argp-pvh.c
argp/argp-xinl.c
argp/argp.h
dirent/alphasort.c
dirent/scandir.c
# Merged from gnulib 2025-10-29 (gnulib commit 1790ef25d8)
include/intprops.h
include/intprops-internal.h
# Merged from gnulib 2026-02-16
include/assure.h
include/flexmember.h
include/hash.h
include/next-prime.h
include/xalloc-oversized.h
# Merged from gnulib 2021-09-21
include/regex.h
# Merged from gnulib 2026-02-16
io/cycle-check.c
io/cycle-check.h
io/dev-ino.h
io/fts-cycle.c
io/fts-common.c
io/i-ring.c
io/same-inode.h
locale/programs/3level.h
# Merged from gnulib 2014-6-23
malloc/obstack.c
# Merged from gnulib 2014-6-23
malloc/obstack.h
# Merged from gnulib 2014-07-10
misc/error.c
misc/error.h
misc/getpass.c
misc/hash.c
misc/mkdtemp.c
misc/next-prime.c
# Merged from gnulib 2021-09-21
misc/sys/cdefs.h
posix/fnmatch_loop.c
# Intended to be the same. Gnulib copy contains glibc changes.
posix/getopt.c
# Intended to be the same. Gnulib copy contains glibc changes.
posix/getopt1.c
# Intended to be the same. Gnulib copy contains glibc changes.
posix/getopt_int.h
posix/glob.c
# Merged from gnulib 2021-09-21
posix/regcomp.c
# Merged from gnulib 2021-09-21
posix/regex.c
# Merged from gnulib 2021-09-21
posix/regex.h
# Merged from gnulib 2021-09-21
posix/regex_internal.c
# Merged from gnulib 2021-09-21
posix/regex_internal.h
# Merged from gnulib 2021-09-21
posix/regexec.c
posix/spawn.c
posix/spawn_faction_addclose.c
posix/spawn_faction_adddup2.c
posix/spawn_faction_addopen.c
posix/spawn_faction_destroy.c
posix/spawn_faction_init.c
posix/spawn_int.h
posix/spawnattr_destroy.c
posix/spawnattr_getdefault.c
posix/spawnattr_getflags.c
posix/spawnattr_getpgroup.c
posix/spawnattr_getschedparam.c
posix/spawnattr_getschedpolicy.c
posix/spawnattr_getsigmask.c
posix/spawnattr_init.c
posix/spawnattr_setdefault.c
posix/spawnattr_setflags.c
posix/spawnattr_setpgroup.c
posix/spawnattr_setschedparam.c
posix/spawnattr_setschedpolicy.c
posix/spawnattr_setsigmask.c
posix/spawnp.c
stdlib/atoll.c
stdlib/getsubopt.c
stdlib/setenv.c
stdlib/strtoll.c
stdlib/strtoul.c
stdlib/tst-stdc_rotate_left.c
stdlib/tst-stdc_rotate_right.c
# Merged from gnulib 2014-6-26, needs merge back
string/memchr.c
string/memcmp.c
string/memmem.c
string/mempcpy.c
string/memrchr.c
string/rawmemchr.c
string/stpcpy.c
string/stpncpy.c
string/str-two-way.h
string/strcasestr.c
string/strcspn.c
string/strdup.c
string/strndup.c
string/strpbrk.c
string/strsignal.c
string/strstr.c
string/strtok_r.c
string/strverscmp.c
# Merged from gnulib 2024-04-08 (gnulib commit 3238349628)
stdio-common/tmpdir.c
stdio-common/tmpdir.h
sysdeps/generic/pty-private.h
sysdeps/generic/siglist.h
sysdeps/posix/euidaccess.c
sysdeps/posix/gai_strerror.c
sysdeps/posix/getcwd.c
sysdeps/posix/pwrite.c
sysdeps/posix/spawni.c
# Merged from gnulib 2024-04-08 (gnulib commit 3238349628)
sysdeps/posix/tempname.c
# Merged from gnulib 2014-6-27
time/mktime.c
time/mktime-internal.h
time/strptime.c
time/timegm.c
# Synced with GNU gettext 1.0 (2026-05-18), through gettext commit 2ebbdd0e2.
#
# This commit was omitted from the merge as it does not appear to be compatible
# with how glibc expects things to work:
#
# commit 279b57fc367251666f00e8e2b599b83703451afb
# Author: Bruno Haible <bruno@clisp.org>
# Date: Fri Jun 14 12:03:49 2002 +0000
#
# Make absolute pathnames inside $LANGUAGE work.
gettext:
intl/bindtextdom.c
intl/dcgettext.c
intl/dcigettext.c
intl/dcngettext.c
intl/dgettext.c
intl/dngettext.c
intl/eval-plural.h
intl/explodename.c
intl/finddomain.c
intl/gettext.c
intl/gettextP.h
intl/gmo.h
intl/hash-string.c
intl/hash-string.h
intl/l10nflist.c
intl/loadinfo.h
intl/loadmsgcat.c
intl/locale.alias
intl/localealias.c
intl/ngettext.c
intl/plural-exp.c
intl/plural-exp.h
intl/plural.y
intl/textdomain.c
# The following files are bundled from upstream Linux 6.10 for FUSE testing
# support.
linux:
support/bundled/linux/COPYING
support/bundled/linux/LICENSES
support/bundled/linux/LICENSES/exceptions/Linux-syscall-note
support/bundled/linux/LICENSES/preferred/GPL-2.0
support/bundled/linux/include/uapi/linux/fuse.h
# The following files are shared with the upstream Unicode project and must be
# updated regularly to stay in sync with the upstream unicode releases.
#
# Merged from Unicode 17.0.0 release (2025 September 9)
unicode:
localedata/unicode-gen/UnicodeData.txt
localedata/unicode-gen/unicode-license.txt
localedata/unicode-gen/DerivedCoreProperties.txt
localedata/unicode-gen/EastAsianWidth.txt
localedata/unicode-gen/HangulSyllableType.txt
# The following files are shared with the upstream tzcode project and must be
# updated regularly to stay in sync with the upstream releases.
#
# Currently synced to TZDB 2026b, distributed at:
# https://github.com/eggert/tz/releases/tag/2026b
# https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz
tzcode:
timezone/private.h
timezone/tzfile.h
timezone/tzselect.ksh
timezone/version
timezone/zdump.c
timezone/zic.c
# The following files are shared with the upstream tzdata project but is not
# synchronized regularly. The data files themselves are used only for testing
# purposes and their data is never used to generate any output. We synchronize
# them only to stay on top of newer data that might help with testing.
#
# Currently synced to tzcode 2009i, announced and distributed here:
# https://mm.icann.org/pipermail/tz/2009-June/040697.html
# https://data.iana.org/time-zones/releases/tzdata2009i.tar.gz
tzdata:
timezone/africa
timezone/antarctica
timezone/asia
timezone/australasia
timezone/europe
timezone/northamerica
timezone/southamerica
timezone/pacificnew
timezone/etcetera
timezone/factory
timezone/backward
timezone/systemv
timezone/solar87
timezone/solar88
timezone/solar89
timezone/iso3166.tab
timezone/zone.tab
timezone/leapseconds
# This is yearistype.sh in the parent project
timezone/yearistype
# The following files are imported from the CORE-MATH project, with
# adjustments made to follow glibc code style, to utilize internal error
# handling functions, and to implement minor fixes for ABIs with
# FLT_EVAL_METHOD equal to 2 (i386). Additionally, extra optimizations
# are applied to share the internal data table across different
# implementations.
#
# The project is distribute here:
# https://gitlab.inria.fr/core-math/core-math/
core-math:
# src/binary64/acosh/acosh.c, revision 887cab6f
sysdeps/ieee754/dbl-64/e_acosh.c
# src/binary64/atanh/atanh.c, revision 532e37dc
sysdeps/ieee754/dbl-64/e_atanh.c
# src/binary64/cosh/cosh.c, revision 5d0c89d5
sysdeps/ieee754/dbl-64/e_cosh.c
# src/binary64/tgamma/tgamma.c, revision 0f185e23
sysdeps/ieee754/dbl-64/e_gamma_r.c
# src/binary64/lgamma/lgamma.c, revision 0413bb7e
sysdeps/ieee754/dbl-64/e_lgamma_r.c
# src/binary64/sinh/sinh.c, revision 8127b7ac
sysdeps/ieee754/dbl-64/e_sinh.c
# src/binary64/asinh/asinh.c, revision cd653cf7
sysdeps/ieee754/dbl-64/s_asinh.c
# src/binary64/erf/erf.c, revision 384ed01d
sysdeps/ieee754/dbl-64/s_erf.c
# src/binary64/erfc/erfc.c, revision 55e9869e
sysdeps/ieee754/dbl-64/s_erfc.c
# src/binary64/tanh/tanh.c, revision 8ea8ea35
sysdeps/ieee754/dbl-64/s_tanh.c
# src/binary32/acos/acosf.c, revision 56dd347
sysdeps/ieee754/flt-32/e_acosf.c
# src/binary32/acosh/acoshf.c, revision d0b9ddd
sysdeps/ieee754/flt-32/e_acoshf.c
# file src/binary32/cosh/coshf.c, revision de59ecfb
sysdeps/ieee754/flt-32/e_coshf.c
# src/binary32/tgamma/tgammaf.c, revision 8ea8ea35
sysdeps/ieee754/flt-32/e_gammaf_r.c
# src/binary32/lgamma/lgammaf.c, revision 8ea8ea35
sysdeps/ieee754/flt-32/e_lgammaf_r.c
# src/binary32/log10/log10f.c, revision ebff4c43
sysdeps/ieee754/flt-32/e_log10f.c
# src/binary32/sinh/sinhf.c, revision bbfabd99
sysdeps/ieee754/flt-32/e_sinhf.c
# src/binary32/acospi/acospif.c, revision 1a6a9ab
sysdeps/ieee754/flt-32/s_acospif.c
# src/binary32/asinpi/asinpif.c, revision 6ee58266
sysdeps/ieee754/flt-32/s_asinpif.c
# src/binary32/atan2pi/atan2pif.c, revision dbebee1
sysdeps/ieee754/flt-32/s_atan2pif.c
# src/binary32/atanpi/atanpif.c, revision e02000e
sysdeps/ieee754/flt-32/s_atanpif.c
# src/binary32/cbrt/cbrtf.c, revision f7c7408d
sysdeps/ieee754/flt-32/s_cbrtf.c
# src/binary32/cospi/cospif.c, revision bbfabd99
sysdeps/ieee754/flt-32/s_cospif.c
# src/binary32/erfc/erfcf.c revision d0a2be20
sysdeps/ieee754/flt-32/s_erfcf.c
# src/binary32/erf/erff.c revision bc385c2
sysdeps/ieee754/flt-32/s_erff.c
# src/binary32/exp10m1/exp10m1f.c, revision c46b85b
sysdeps/ieee754/flt-32/s_exp10m1f.c
# src/binary32/exp2m1/exp2m1f.c, revision baf5f6b
sysdeps/ieee754/flt-32/s_exp2m1f.c
# src/binary32/expm1/expm1f.c, revision bc385c2
sysdeps/ieee754/flt-32/s_expm1f.c
# src/binary32/log10p1/log10p1f.c revision eb28456b
sysdeps/ieee754/flt-32/s_log10p1f.c
# src/binary32/log1p/log1pf.c revision 24ef43a1
sysdeps/ieee754/flt-32/s_log1pf.c
# src/binary32/log2p1/log2p1f.c revision 3fbe16be
sysdeps/ieee754/flt-32/s_log2p1f.c
# src/binary32/sinpi/sinpif.c, revision bbfabd99d
sysdeps/ieee754/flt-32/s_sinpif.c
# src/binary32/tan/tanf.c, revision 59d21d7
sysdeps/ieee754/flt-32/s_tanf.c
# src/binary32/tanh/tanhf.c, revision b1ecd83
sysdeps/ieee754/flt-32/s_tanhf.c
# src/binary32/tanpi/tanpif.c, revision 3bbf907
sysdeps/ieee754/flt-32/s_tanpif.c
# The following files are imported from the Arm Optimized-Routines project,
# with adjustments made to follow glibc code style and integrate with
# glibc-specific infrastructure where needed.
#
# The project is distributed here:
# https://github.com/ARM-software/optimized-routines/
arm-optimized-routines:
# Math routines
# math/math_config.h, revision 712aa21
sysdeps/ieee754/flt-32/math_config.h
# math/math_config.h, revision 712aa21
sysdeps/ieee754/dbl-64/math_config.h
# math/math_err.c, revision 189dfef
sysdeps/ieee754/dbl-64/math_err.c
# math/math_errf.c, revision 189dfef
sysdeps/ieee754/flt-32/math_errf.c
# math/cosf.c, revision aec783d
sysdeps/ieee754/flt-32/s_cosf.c
# math/exp2f.c, revision 712aa21
sysdeps/ieee754/flt-32/e_exp2f.c
# math/exp2f_data.c, revision 189dfef
sysdeps/ieee754/flt-32/e_exp2f_data.c
# math/expf.c, revision 712aa21
sysdeps/ieee754/flt-32/e_expf.c
# math/log2f.c, revision 712aa21
sysdeps/ieee754/flt-32/e_log2f.c
# math/log2f_data.c, revision 189dfef
sysdeps/ieee754/flt-32/e_log2f_data.c
# math/logf.c, revision 712aa21
sysdeps/ieee754/flt-32/e_logf.c
# math/logf_data.c, revision c0136f1
sysdeps/ieee754/flt-32/e_logf_data.c
# math/powf.c, revision 712aa21
sysdeps/ieee754/flt-32/e_powf.c
# math/powf_log2_data.c, revision 189dfef
sysdeps/ieee754/flt-32/e_powf_log2_data.c
# math/sincosf.c, revision af29d39
sysdeps/ieee754/flt-32/s_sincosf.c
# math/sincosf.h, revision aed553c
sysdeps/ieee754/flt-32/s_sincosf.h
# math/sincosf_data.c, revision 189dfef
sysdeps/ieee754/flt-32/s_sincosf_data.c
# math/sinf.c, revision aec783d
sysdeps/ieee754/flt-32/s_sinf.c
# math/exp.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_exp.c
# math/exp10.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_exp10.c
# math/exp2.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_exp2.c
# math/exp_data.c, revision c013701
sysdeps/ieee754/dbl-64/e_exp_data.c
# math/log.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_log.c
# math/log2.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_log2.c
# math/log2_data.c, revision 189dfef
sysdeps/ieee754/dbl-64/e_log2_data.c
# math/log_data.c, revision 189dfef
sysdeps/ieee754/dbl-64/e_log_data.c
# math/pow.c, revision 712aa21
sysdeps/ieee754/dbl-64/e_pow.c
# math/pow_log_data.c, revision 189dfef
sysdeps/ieee754/dbl-64/e_pow_log_data.c
# Mathvec routines
# math/math_config.h, revision 712aa21
sysdeps/aarch64/fpu/vecmath_config.h
# math/aarch64/v_erf_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/erf_data.c
# math/aarch64/v_erfc_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/erfc_data.c
# math/aarch64/v_erfcf_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/erfcf_data.c
# math/aarch64/v_erff_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/erff_data.c
# math/aarch64/v_exp_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_exp_data.c
# math/aarch64/v_exp_tail_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_exp_tail_data.c
# math/aarch64/v_log10_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_log10_data.c
# math/aarch64/v_log2_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_log2_data.c
# math/aarch64/v_log_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_log_data.c
# math/aarch64/v_pow_exp_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_pow_exp_data.c
# math/aarch64/v_pow_log_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_pow_log_data.c
# math/aarch64/v_powf_data.c, revision 0a6ab6d
sysdeps/aarch64/fpu/v_powf_data.c
# math/aarch64/sve/acos.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/acos.c
# math/aarch64/sve/acosf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/acosf.c
# math/aarch64/sve/acosh.c, revision 8b665af
sysdeps/aarch64/fpu/sve/acosh.c
# math/aarch64/sve/acoshf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/acoshf.c
# math/aarch64/sve/acospi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/acospi.c
# math/aarch64/sve/acospif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/acospif.c
# math/aarch64/sve/asin.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/asin.c
# math/aarch64/sve/asinf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/asinf.c
# math/aarch64/sve/asinh.c, revision 9bf4cfc
sysdeps/aarch64/fpu/sve/asinh.c
# math/aarch64/sve/asinhf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/asinhf.c
# math/aarch64/sve/asinpi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/asinpi.c
# math/aarch64/sve/asinpif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/asinpif.c
# math/aarch64/sve/atan.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atan.c
# math/aarch64/sve/atan2.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atan2.c
# math/aarch64/sve/atan2f.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atan2f.c
# math/aarch64/sve/atan2pi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atan2pi.c
# math/aarch64/sve/atan2pif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atan2pif.c
# math/aarch64/sve/atanf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atanf.c
# math/aarch64/sve/atanh.c, revision 29c7342
sysdeps/aarch64/fpu/sve/atanh.c
# math/aarch64/sve/atanhf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atanhf.c
# math/aarch64/sve/atanpi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atanpi.c
# math/aarch64/sve/atanpif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/atanpif.c
# math/aarch64/sve/cbrt.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/cbrt.c
# math/aarch64/sve/cbrtf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/cbrtf.c
# math/aarch64/sve/cos.c, revision 99cbbad
sysdeps/aarch64/fpu/sve/cos.c
# math/aarch64/sve/cosf.c, revision 25aa012
sysdeps/aarch64/fpu/sve/cosf.c
# math/aarch64/sve/cosh.c, revision 242a017
sysdeps/aarch64/fpu/sve/cosh.c
# math/aarch64/sve/coshf.c, revision 2fff60c
sysdeps/aarch64/fpu/sve/coshf.c
# math/aarch64/sve/cospi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/cospi.c
# math/aarch64/sve/cospif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/cospif.c
# math/aarch64/sve/erf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/erf.c
# math/aarch64/sve/erfc.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/erfc.c
# math/aarch64/sve/erfcf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/erfcf.c
# math/aarch64/sve/erff.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/erff.c
# math/aarch64/sve/exp.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp.c
# math/aarch64/sve/exp10.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp10.c
# math/aarch64/sve/exp10f.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp10f.c
# math/aarch64/sve/exp10m1.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp10m1.c
# math/aarch64/sve/exp10m1f.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp10m1f.c
# math/aarch64/sve/exp2.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp2.c
# math/aarch64/sve/exp2f.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp2f.c
# math/aarch64/sve/exp2m1.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp2m1.c
# math/aarch64/sve/exp2m1f.c, revision d664b69
sysdeps/aarch64/fpu/sve/exp2m1f.c
# math/aarch64/sve/expf.c, revision 47044a5
sysdeps/aarch64/fpu/sve/expf.c
# math/aarch64/sve/expm1.c, revision d664b69
sysdeps/aarch64/fpu/sve/expm1.c
# math/aarch64/sve/expm1f.c, revision d664b69
sysdeps/aarch64/fpu/sve/expm1f.c
# math/aarch64/sve/hypot.c, revision 74d699d
sysdeps/aarch64/fpu/sve/hypot.c
# math/aarch64/sve/hypotf.c, revision 74d699d
sysdeps/aarch64/fpu/sve/hypotf.c
# math/aarch64/sve/log.c, revision 91b052e
sysdeps/aarch64/fpu/sve/log.c
# math/aarch64/sve/log10.c, revision 91b052e
sysdeps/aarch64/fpu/sve/log10.c
# math/aarch64/sve/log10f.c, revision 8ca4cc0
sysdeps/aarch64/fpu/sve/log10f.c
# math/aarch64/sve/log10p1.c, revision 166744d
sysdeps/aarch64/fpu/sve/log10p1.c
# math/aarch64/sve/log10p1f.c, revision 8124d30
sysdeps/aarch64/fpu/sve/log10p1f.c
# math/aarch64/sve/log1p.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/log1p.c
# math/aarch64/sve/log1pf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/log1pf.c
# math/aarch64/sve/log2.c, revision 91b052e
sysdeps/aarch64/fpu/sve/log2.c
# math/aarch64/sve/log2f.c, revision 8ca4cc0
sysdeps/aarch64/fpu/sve/log2f.c
# math/aarch64/sve/log2p1.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/log2p1.c
# math/aarch64/sve/log2p1f.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/log2p1f.c
# math/aarch64/sve/logf.c, revision 8ca4cc0
sysdeps/aarch64/fpu/sve/logf.c
# math/aarch64/sve/pow.c, revision 2c38e83
sysdeps/aarch64/fpu/sve/pow.c
# math/aarch64/sve/powf.c, revision 2c38e83
sysdeps/aarch64/fpu/sve/powf.c
# math/aarch64/sve/powr.c, revision 30da949
sysdeps/aarch64/fpu/sve/powr.c
# math/aarch64/sve/powrf.c, revision e2bca42
sysdeps/aarch64/fpu/sve/powrf.c
# math/aarch64/sve/rsqrt.c, revision 4fc7374
sysdeps/aarch64/fpu/sve/rsqrt.c
# math/aarch64/sve/rsqrtf.c, revision b1bc8ba
sysdeps/aarch64/fpu/sve/rsqrtf.c
# math/aarch64/sve/sin.c, revision 99cbbad
sysdeps/aarch64/fpu/sve/sin.c
# math/aarch64/sve/sinf.c, revision 25aa012
sysdeps/aarch64/fpu/sve/sinf.c
# math/aarch64/sve/sinh.c, revision 242a017
sysdeps/aarch64/fpu/sve/sinh.c
# math/aarch64/sve/sinhf.c, revision 2fff60c
sysdeps/aarch64/fpu/sve/sinhf.c
# math/aarch64/sve/sinpi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/sinpi.c
# math/aarch64/sve/sinpif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/sinpif.c
# math/aarch64/sve/tan.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/tan.c
# math/aarch64/sve/tanf.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/tanf.c
# math/aarch64/sve/tanh.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/tanh.c
# math/aarch64/sve/tanhf.c, revision 2fff60c
sysdeps/aarch64/fpu/sve/tanhf.c
# math/aarch64/sve/tanpi.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/tanpi.c
# math/aarch64/sve/tanpif.c, revision 1aad38d
sysdeps/aarch64/fpu/sve/tanpif.c
# math/aarch64/sve/sv_exp_special_inline.h, revision d664b69
sysdeps/aarch64/fpu/sve/sv_exp_special_inline.h
# math/aarch64/sve/sv_expf_inline.h, revision ba35b32
sysdeps/aarch64/fpu/sve/sv_expf_inline.h
# math/aarch64/sve/sv_expf_special_inline.h, revision d664b69
sysdeps/aarch64/fpu/sve/sv_expf_special_inline.h
# math/aarch64/sve/sv_expm1f_inline.h, revision 78cd003
sysdeps/aarch64/fpu/sve/sv_expm1f_inline.h
# math/aarch64/sve/sv_log1p_inline.h, revision 7d08237
sysdeps/aarch64/fpu/sve/sv_log1p_inline.h
# math/aarch64/sve/sv_log1pf_inline.h, revision a386525
sysdeps/aarch64/fpu/sve/sv_log1pf_inline.h
# math/aarch64/sve/sv_pow_inline.h, revision 30da949
sysdeps/aarch64/fpu/sve/sv_pow_inline.h
# math/aarch64/sve/sv_powf_inline.h, revision 30da949
sysdeps/aarch64/fpu/sve/sv_powf_inline.h
# math/aarch64/sve/sv_poly_f32.h, revision 5d5e6e6
sysdeps/aarch64/fpu/sve/poly_sve_f32.h
# math/aarch64/sve/sv_poly_f64.h, revision 5d5e6e6
sysdeps/aarch64/fpu/sve/poly_sve_f64.h
# math/aarch64/sve/sv_poly_generic.h, revision 5d5e6e6
sysdeps/aarch64/fpu/sve/poly_sve_generic.h
# math/aarch64/sve/sv_math.h, revision 7361ef6
sysdeps/aarch64/fpu/sve/sv_math.h
# math/aarch64/sve/sv_trig_fallback.h, revision 99cbbad
sysdeps/aarch64/fpu/sve/sv_trig_fallback.h
# math/aarch64/sve/sv_trigf_fallback.h, revision 25aa012
sysdeps/aarch64/fpu/sve/sv_trigf_fallback.h
# math/aarch64/advsimd/acos.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/acos.c
# math/aarch64/advsimd/acosf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/acosf.c
# math/aarch64/advsimd/acosh.c, revision 188e75a
sysdeps/aarch64/fpu/advsimd/acosh.c
# math/aarch64/advsimd/acoshf.c, revision af3851e
sysdeps/aarch64/fpu/advsimd/acoshf.c
# math/aarch64/advsimd/acospi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/acospi.c
# math/aarch64/advsimd/acospif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/acospif.c
# math/aarch64/advsimd/asin.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/asin.c
# math/aarch64/advsimd/asinf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/asinf.c
# math/aarch64/advsimd/asinh.c, revision bac1b4f
sysdeps/aarch64/fpu/advsimd/asinh.c
# math/aarch64/advsimd/asinhf.c, revision af3851e
sysdeps/aarch64/fpu/advsimd/asinhf.c
# math/aarch64/advsimd/asinpi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/asinpi.c
# math/aarch64/advsimd/asinpif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/asinpif.c
# math/aarch64/advsimd/atan.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atan.c
# math/aarch64/advsimd/atan2.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atan2.c
# math/aarch64/advsimd/atan2f.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atan2f.c
# math/aarch64/advsimd/atan2pi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atan2pi.c
# math/aarch64/advsimd/atan2pif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atan2pif.c
# math/aarch64/advsimd/atanf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atanf.c
# math/aarch64/advsimd/atanh.c, revision 281cb3a
sysdeps/aarch64/fpu/advsimd/atanh.c
# math/aarch64/advsimd/atanhf.c, revision d852158
sysdeps/aarch64/fpu/advsimd/atanhf.c
# math/aarch64/advsimd/atanpi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atanpi.c
# math/aarch64/advsimd/atanpif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/atanpif.c
# math/aarch64/advsimd/cbrt.c, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/cbrt.c
# math/aarch64/advsimd/cbrtf.c, revision 6c74650
sysdeps/aarch64/fpu/advsimd/cbrtf.c
# math/aarch64/advsimd/cos.c, revision 677a12b
sysdeps/aarch64/fpu/advsimd/cos.c
# math/aarch64/advsimd/cosf.c, revision 15c35d9
sysdeps/aarch64/fpu/advsimd/cosf.c
# math/aarch64/advsimd/cosh.c, revision 447bbaa
sysdeps/aarch64/fpu/advsimd/cosh.c
# math/aarch64/advsimd/coshf.c, revision 45237ba
sysdeps/aarch64/fpu/advsimd/coshf.c
# math/aarch64/advsimd/cospi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/cospi.c
# math/aarch64/advsimd/cospif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/cospif.c
# math/aarch64/advsimd/erf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/erf.c
# math/aarch64/advsimd/erfc.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/erfc.c
# math/aarch64/advsimd/erfcf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/erfcf.c
# math/aarch64/advsimd/erff.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/erff.c
# math/aarch64/advsimd/exp.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/exp.c
# math/aarch64/advsimd/exp10.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/exp10.c
# math/aarch64/advsimd/exp10f.c, revision 69d38dd
sysdeps/aarch64/fpu/advsimd/exp10f.c
# math/aarch64/advsimd/exp10m1.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/exp10m1.c
# math/aarch64/advsimd/exp10m1f.c, revision a5092e8
sysdeps/aarch64/fpu/advsimd/exp10m1f.c
# math/aarch64/advsimd/exp2.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/exp2.c
# math/aarch64/advsimd/exp2f.c, revision 69d38dd
sysdeps/aarch64/fpu/advsimd/exp2f.c
# math/aarch64/advsimd/exp2m1.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/exp2m1.c
# math/aarch64/advsimd/exp2m1f.c, revision a5092e8
sysdeps/aarch64/fpu/advsimd/exp2m1f.c
# math/aarch64/advsimd/expf.c, revision 69d38dd
sysdeps/aarch64/fpu/advsimd/expf.c
# math/aarch64/advsimd/expm1.c, revision dce5dab
sysdeps/aarch64/fpu/advsimd/expm1.c
# math/aarch64/advsimd/expm1f.c, revision a5092e8
sysdeps/aarch64/fpu/advsimd/expm1f.c
# math/aarch64/advsimd/hypot.c, revision 09f8d05
sysdeps/aarch64/fpu/advsimd/hypot.c
# math/aarch64/advsimd/hypotf.c, revision 99dff4f
sysdeps/aarch64/fpu/advsimd/hypotf.c
# math/aarch64/advsimd/log.c, revision 0345857
sysdeps/aarch64/fpu/advsimd/log.c
# math/aarch64/advsimd/log10.c, revision 77aff35
sysdeps/aarch64/fpu/advsimd/log10.c
# math/aarch64/advsimd/log10f.c, revision ff1596f
sysdeps/aarch64/fpu/advsimd/log10f.c
# math/aarch64/advsimd/log10p1.c, revision 7fc8510
sysdeps/aarch64/fpu/advsimd/log10p1.c
# math/aarch64/advsimd/log10p1f.c, revision 58cd796
sysdeps/aarch64/fpu/advsimd/log10p1f.c
# math/aarch64/advsimd/log1p.c, revision 355a985
sysdeps/aarch64/fpu/advsimd/log1p.c
# math/aarch64/advsimd/log1pf.c, revision 5cf8408
sysdeps/aarch64/fpu/advsimd/log1pf.c
# math/aarch64/advsimd/log2.c, revision b8deb33
sysdeps/aarch64/fpu/advsimd/log2.c
# math/aarch64/advsimd/log2f.c, revision b98f80d
sysdeps/aarch64/fpu/advsimd/log2f.c
# math/aarch64/advsimd/log2p1.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/log2p1.c
# math/aarch64/advsimd/log2p1f.c, revision 58cd796
sysdeps/aarch64/fpu/advsimd/log2p1f.c
# math/aarch64/advsimd/logf.c, revision 1b15b12
sysdeps/aarch64/fpu/advsimd/logf.c
# math/aarch64/advsimd/finite_pow.h, revision 30da949
sysdeps/aarch64/fpu/advsimd/finite_pow.h
# math/pow_common.h, revision 30da949
sysdeps/aarch64/fpu/pow_common.h
# math/powf_common.h, revision 30da949
sysdeps/aarch64/fpu/powf_common.h
# math/aarch64/advsimd/pow.c, revision 30da949
sysdeps/aarch64/fpu/advsimd/pow.c
# math/aarch64/advsimd/powf.c, revision 30da949
sysdeps/aarch64/fpu/advsimd/powf.c
# math/aarch64/advsimd/powr.c, revision 30da949
sysdeps/aarch64/fpu/advsimd/powr.c
# math/aarch64/advsimd/powrf.c, revision e2bca42
sysdeps/aarch64/fpu/advsimd/powrf.c
# math/aarch64/advsimd/rsqrt.c, revision 0945eab
sysdeps/aarch64/fpu/advsimd/rsqrt.c
# math/aarch64/advsimd/rsqrtf.c, revision 88e9cc9
sysdeps/aarch64/fpu/advsimd/rsqrtf.c
# math/aarch64/advsimd/sin.c, revision 677a12b
sysdeps/aarch64/fpu/advsimd/sin.c
# math/aarch64/advsimd/sinf.c, revision 15c35d9
sysdeps/aarch64/fpu/advsimd/sinf.c
# math/aarch64/advsimd/sinh.c, revision 447bbaa
sysdeps/aarch64/fpu/advsimd/sinh.c
# math/aarch64/advsimd/sinhf.c, revision 45237ba
sysdeps/aarch64/fpu/advsimd/sinhf.c
# math/aarch64/advsimd/sinpi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/sinpi.c
# math/aarch64/advsimd/sinpif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/sinpif.c
# math/aarch64/advsimd/tan.c, revision a8bbb87
sysdeps/aarch64/fpu/advsimd/tan.c
# math/aarch64/advsimd/tanf.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/tanf.c
# math/aarch64/advsimd/tanh.c, revision 447bbaa
sysdeps/aarch64/fpu/advsimd/tanh.c
# math/aarch64/advsimd/tanhf.c, revision 45237ba
sysdeps/aarch64/fpu/advsimd/tanhf.c
# math/aarch64/advsimd/tanpi.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/tanpi.c
# math/aarch64/advsimd/tanpif.c, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/tanpif.c
# math/aarch64/advsimd/v_exp_special_case_inline.h, revision dce5dab
sysdeps/aarch64/fpu/advsimd/v_exp_special_case_inline.h
# math/aarch64/advsimd/v_expf_inline.h, revision 747e0e1
sysdeps/aarch64/fpu/advsimd/v_expf_inline.h
# math/aarch64/advsimd/v_expf_special_inline.h, revision a5092e8
sysdeps/aarch64/fpu/advsimd/v_expf_special_inline.h
# math/aarch64/advsimd/v_expm1_inline.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/v_expm1_inline.h
# math/aarch64/advsimd/v_expm1f_inline.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/v_expm1f_inline.h
# math/aarch64/advsimd/v_log1p_inline.h, revision 1aad38d
sysdeps/aarch64/fpu/advsimd/v_log1p_inline.h
# math/aarch64/advsimd/v_log1pf_inline.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/v_log1pf_inline.h
# math/aarch64/advsimd/v_pow_inline.h, revision efde0c7
sysdeps/aarch64/fpu/advsimd/v_pow_inline.h
# math/aarch64/advsimd/v_powf_inline.h, revision 5b06a16
sysdeps/aarch64/fpu/advsimd/v_powf_inline.h
# math/aarch64/advsimd/v_powrf_inline.h, revision 30da949
sysdeps/aarch64/fpu/advsimd/v_powrf_inline.h
# math/aarch64/advsimd/v_poly_f32.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/poly_advsimd_f32.h
# math/aarch64/advsimd/v_poly_f64.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/poly_advsimd_f64.h
# math/poly_generic.h, revision 0a6ab6d
sysdeps/aarch64/fpu/advsimd/poly_generic.h
# math/aarch64/advsimd/v_math.h, revision 1829557
sysdeps/aarch64/fpu/advsimd/v_math.h
# math/aarch64/advsimd/v_trig_fallback.h, revision 677a12b
sysdeps/aarch64/fpu/advsimd/v_trig_fallback.h
# math/aarch64/advsimd/v_trigf_fallback.h, revision 15c35d9
sysdeps/aarch64/fpu/advsimd/v_trigf_fallback.h
# String routines
# string/aarch64/__mtag_tag_region.S, revision 41e5ae5
sysdeps/aarch64/__mtag_tag_region.S
# string/aarch64/__mtag_tag_zero_region.S, revision 41e5ae5
sysdeps/aarch64/__mtag_tag_zero_region.S
# string/aarch64/memchr-mte.S, revision 41e5ae5
sysdeps/aarch64/memchr.S
# string/aarch64/memcmp.S, revision 41e5ae5
sysdeps/aarch64/memcmp.S
# string/aarch64/memcpy-advsimd.S, revision 41e5ae5
sysdeps/aarch64/memcpy.S
# string/aarch64/memcpy-mops.S, revision 41e5ae5
sysdeps/aarch64/multiarch/memcpy_mops.S
# string/aarch64/memcpy-sve.S, revision 71e3640
sysdeps/aarch64/multiarch/memcpy_sve.S
# string/aarch64/memmove-mops.S, revision 41e5ae5
sysdeps/aarch64/multiarch/memmove_mops.S
# string/aarch64/memrchr.S, revision 41e5ae5
sysdeps/aarch64/memrchr.S
# string/aarch64/memset-mops.S, revision 41e5ae5
sysdeps/aarch64/multiarch/memset_mops.S
# string/aarch64/memset-sve.S, revision 0f71101
sysdeps/aarch64/multiarch/memset_sve_zva64.S
# string/aarch64/memset.S, revision 098df8c
sysdeps/aarch64/memset.S
# string/aarch64/stpcpy.S, revision 189dfef
sysdeps/aarch64/stpcpy.S
# string/aarch64/strchr-mte.S, revision 41e5ae5
sysdeps/aarch64/strchr.S
# string/aarch64/strchrnul-mte.S, revision 41e5ae5
sysdeps/aarch64/strchrnul.S
# string/aarch64/strcmp.S, revision 41e5ae5
sysdeps/aarch64/strcmp.S
# string/aarch64/strcpy.S, revision 41e5ae5
sysdeps/aarch64/strcpy.S
# string/aarch64/strlen-mte.S, revision 41e5ae5
sysdeps/aarch64/strlen.S
# string/aarch64/strncmp.S, revision 41e5ae5
sysdeps/aarch64/strncmp.S
# string/aarch64/strnlen.S, revision 41e5ae5
sysdeps/aarch64/strnlen.S
# string/aarch64/strrchr-mte.S, revision 41e5ae5
sysdeps/aarch64/strrchr.S
# string/arm/memchr.S, revision 1eb5d7c
sysdeps/arm/armv6t2/memchr.S
# string/arm/memcpy.S, revision 1eb5d7c
sysdeps/arm/armv7/multiarch/memcpy_impl.S
# string/arm/strcmp.S, revision 1eb5d7c
sysdeps/arm/armv7/strcmp.S
# string/arm/strlen-armv6t2.S, revision 1eb5d7c
sysdeps/arm/armv6t2/strlen.S
Vendored
+32 -286
View File
@@ -2,7 +2,7 @@ dnl We require that everyone use exactly the same Autoconf version so that
dnl the internal functions defined and used by the main configure script
dnl match those expected by the fragments. When changing this version,
dnl install.texi also needs to be updated.
m4_define([GLIBC_AUTOCONF_VERSION], [2.72])
m4_define([GLIBC_AUTOCONF_VERSION], [2.69])
m4_if(m4_defn([AC_AUTOCONF_VERSION]), GLIBC_AUTOCONF_VERSION, [],
[m4_fatal(m4_flatten(
Exactly version GLIBC_AUTOCONF_VERSION of Autoconf is required but you have
@@ -114,41 +114,26 @@ if test -n "$path_binutils"; then
path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
CC="$CC -B$path_binutils"
fi
case "$CC" in
*fuse-ld=lld*) LDNAME=ld.lld;;
*) LDNAME=ld;;
esac
if test -z "$LD"; then
LD=`$CC -print-prog-name=$LDNAME`
fi
if test -z "$AR"; then
AR=`$CC -print-prog-name=ar`
fi
AS=`$CC -print-prog-name=as`
LD=`$CC -print-prog-name=ld`
AR=`$CC -print-prog-name=ar`
AC_SUBST(AR)
if test -z "$OBJCOPY"; then
OBJCOPY=`$CC -print-prog-name=objcopy`
fi
AC_SUBST(OBJCOPY)
if test -z "$GPROF"; then
GPROF=`$CC -print-prog-name=gprof`
fi
AC_SUBST(GPROF)
if test -z "$READELF"; then
READELF=`$CC -print-prog-name=readelf`
fi
AC_SUBST(READELF)
if test -z "$OBJDUMP"; then
OBJDUMP=`$CC -print-prog-name=objdump`
fi
OBJDUMP=`$CC -print-prog-name=objdump`
AC_SUBST(OBJDUMP)
if test -z "$NM"; then
NM=`$CC -print-prog-name=nm`
fi
AC_SUBST(NM)
if test -z "$STRIP"; then
STRIP=`$CC -print-prog-name=strip`
fi
AC_SUBST(STRIP)
OBJCOPY=`$CC -print-prog-name=objcopy`
AC_SUBST(OBJCOPY)
GPROF=`$CC -print-prog-name=gprof`
AC_SUBST(GPROF)
# Determine whether we are using GNU binutils.
AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
[LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)])
rm -f a.out
gnu_as=$libc_cv_prog_as_gnu
AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu,
[LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)])
gnu_ld=$libc_cv_prog_ld_gnu
])
dnl Run a static link test with -nostdlib -nostartfiles.
@@ -171,12 +156,6 @@ AC_DEFUN([LIBC_TRY_CC_OPTION],
[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
[$2], [$3])])
dnl Test a C++ compiler option or options with an empty input file.
dnl LIBC_TRY_CXX_OPTION([options], [action-if-true], [action-if-false])
AC_DEFUN([LIBC_TRY_CXX_OPTION],
[AS_IF([AC_TRY_COMMAND([${CXX-c++} $1 -xc++ /dev/null -S -o /dev/null])],
[$2], [$3])])
dnl Find and source sysdeps/*/preconfigure.
dnl LIBC_PRECONFIGURE([$srcdir], [for])
AC_DEFUN([LIBC_PRECONFIGURE], [dnl
@@ -244,23 +223,22 @@ dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-f
AC_DEFUN([LIBC_LINKER_FEATURE],
[AC_MSG_CHECKING([for linker that supports $1])
libc_linker_feature=no
cat > conftest.c <<EOF
if test x"$gnu_ld" = x"yes"; then
libc_linker_check=`$LD -v --help 2>/dev/null | grep "\$1"`
if test -n "$libc_linker_check"; then
cat > conftest.c <<EOF
int _start (void) { return 42; }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
$2 -nostdlib -nostartfiles
-fPIC -shared -o conftest.so conftest.c
1>&AS_MESSAGE_LOG_FD])
then
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \
-nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \
| grep "warning: $1 ignored" > /dev/null 2>&1; then
true
else
libc_linker_feature=yes
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
$2 -nostdlib -nostartfiles
-fPIC -shared -o conftest.so conftest.c
1>&AS_MESSAGE_LOG_FD])
then
libc_linker_feature=yes
fi
rm -f conftest*
fi
fi
rm -f conftest*
if test $libc_linker_feature = yes; then
$3
else
@@ -268,38 +246,6 @@ else
fi
AC_MSG_RESULT($libc_linker_feature)])
dnl Check linker option support.
dnl LIBC_TEST_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-false])
AC_DEFUN([LIBC_TEST_LINKER_FEATURE],
[AC_MSG_CHECKING([for linker that supports $1])
libc_linker_feature=no
cat > conftest.c <<EOF
int _start (void) { return 42; }
EOF
saved_CC="$CC"
CC="$TEST_CC"
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
$2 -nostdlib -nostartfiles
-fPIC -shared -o conftest.so conftest.c
1>&AS_MESSAGE_LOG_FD])
then
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \
-nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \
| grep "warning: $1 ignored" > /dev/null 2>&1; then
true
else
libc_linker_feature=yes
fi
fi
rm -f conftest*
if test $libc_linker_feature = yes; then
$3
else
$4
fi
CC="$saved_CC"
AC_MSG_RESULT($libc_linker_feature)])
dnl Add a makefile variable, with value set from a shell string
dnl (expanded by the shell inside double quotes), to config.make.
dnl LIBC_CONFIG_VAR(make-variable, shell-value)
@@ -327,7 +273,7 @@ int _start (void) { $2 return 0; }
EOF
if ! AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
$3 -nostdlib -nostartfiles
-S conftest.c -o - | grep -F "$1"
-S conftest.c -o - | fgrep "$1"
1>&AS_MESSAGE_LOG_FD])
then
libc_compiler_builtin_inlined=yes
@@ -357,203 +303,3 @@ case "$prefix" in
fi
;;
esac])
dnl Test a CC compiler option or options with an input file.
dnl LIBC_TRY_CC_COMMAND([message], [code], [options],
dnl [CC-cache-id], [CC-action-if-true], [CC-action-if-false])
AC_DEFUN([LIBC_TRY_CC_COMMAND],
[
cat > conftest.c <<EOF
$2
EOF
AC_CACHE_CHECK([$1], $4, [dnl
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $3 conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
then
[$5]
else
[$6]
fi])
rm -f conftest*])
dnl Run a test with TEST_CC.
dnl LIBC_CHECK_TEST_CC([commands])
AC_DEFUN([LIBC_CHECK_TEST_CC],
[
saved_CC="$CC"
CC="$TEST_CC"
[$1]
CC="$saved_CC"
])
dnl Run a test with TEST_CXX.
dnl LIBC_CHECK_TEST_CXX([commands])
AC_DEFUN([LIBC_CHECK_TEST_CXX],
[
saved_CXX="$CXX"
CXX="$TEST_CXX"
[$1]
CXX="$saved_CXX"
])
dnl Test a CC and TEST_CC compiler option or options with an empty input
dnl file.
dnl LIBC_TRY_CC_AND_TEST_CC_OPTION([message], [options],
dnl [CC-cache-id], [CC-action-if-true], [CC-action-if-false]
dnl [TEST_CC-cache-id], [TEST_CC-action-if-true], [TEST_CC-action-if-false])
AC_DEFUN([LIBC_TRY_CC_AND_TEST_CC_OPTION],
[
AC_CACHE_CHECK([$1], $3,
[LIBC_TRY_CC_OPTION([$2], [$4], [$5])])
if test "$TEST_CC" = "$CC"; then
$6=$[$3]
else
LIBC_CHECK_TEST_CC(
AC_CACHE_CHECK([$1 in testing], $6,
[LIBC_TRY_CC_OPTION([$2], [$7], [$8])])
)
fi
])
dnl Test a CC and TEST_CC compiler option or options with an input file.
dnl LIBC_TRY_CC_AND_TEST_CC_COMMAND([message], [code], [options],
dnl [CC-cache-id], [CC-action-if-true], [CC-action-if-false]
dnl [TEST_CC-cache-id], [TEST_CC-action-if-true], [TEST_CC-action-if-false])
AC_DEFUN([LIBC_TRY_CC_AND_TEST_CC_COMMAND],
[
cat > conftest.c <<EOF
$2
EOF
AC_CACHE_CHECK([$1], $4, [dnl
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $3 conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
then
[$5]
else
[$6]
fi
])
if test "$TEST_CC" = "$CC"; then
$7=$[$4]
else
LIBC_CHECK_TEST_CC(
AC_CACHE_CHECK([$1 in testing], $7, [dnl
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $3 conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
then
[$8]
else
[$9]
fi])
)
fi
rm -f conftest*])
dnl Test if CC and TEST_CC can link with an input file.
dnl LIBC_TRY_CC_AND_TEST_LINK([message], [code],
dnl [CC-cache-id], [CC-action-if-true], [CC-action-if-false]
dnl [TEST_CC-cache-id], [TEST_CC-action-if-true], [TEST_CC-action-if-false])
AC_DEFUN([LIBC_TRY_CC_AND_TEST_LINK],
[
AC_CACHE_CHECK([$1], $3, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$2])],
[$4], [$5])
])
if test "$TEST_CC" = "$CC"; then
$6=$[$3]
else
LIBC_CHECK_TEST_CC(
AC_CACHE_CHECK([$1 in testing], $6, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$2])],
[$7], [$8])
])
)
fi
])
dnl Test a TEST_CC compiler option or options with an input file.
dnl LIBC_TRY_TEST_CC_COMMAND([message], [code], [options],
dnl [TEST_CC-cache-id], [TEST_CC-action-if-true], [TEST_CC-action-if-false])
AC_DEFUN([LIBC_TRY_TEST_CC_COMMAND],
[
cat > conftest.c <<EOF
$2
EOF
LIBC_CHECK_TEST_CC(
AC_CACHE_CHECK([$1 in testing], $4, [dnl
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $3 conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
then
[$5]
else
[$6]
fi])
)
rm -f conftest*])
dnl Test a TEST_CXX compiler option or options with an input file.
dnl LIBC_TRY_TEST_CXX_COMMAND([message], [code], [options],
dnl [TEST_CXX-cache-id], [TEST_CXX-action-if-true],
dnl [TEST_CXX-action-if-false])
AC_DEFUN([LIBC_TRY_TEST_CXX_COMMAND],
[
cat > conftest.cc <<EOF
$2
EOF
LIBC_CHECK_TEST_CXX(
AC_CACHE_CHECK([$1 in testing], $4, [dnl
if AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS $3 conftest.cc -o conftest 1>&AS_MESSAGE_LOG_FD])
then
[$5]
else
[$6]
fi])
)
rm -f conftest*])
dnl Test a TEST_CC compiler option or options with an empty input file.
dnl LIBC_TRY_TEST_CC_OPTION([message], [options],
dnl [TEST_CC-cache-id], [TEST_CC-action-if-true], [TEST_CC-action-if-false])
AC_DEFUN([LIBC_TRY_TEST_CC_OPTION],
[
LIBC_CHECK_TEST_CC(
AC_CACHE_CHECK([$1 in testing], $3,
[LIBC_TRY_CC_OPTION([$2], [$4], [$5])])
)
])
dnl Test a TEST_CXX compiler option or options with an empty input file.
dnl LIBC_TRY_TEST_CXX_OPTION([message], [options],
dnl [TEST_CXX-cache-id], [TEST_CXX-action-if-true],
dnl [TEST_CXX-action-if-false])
AC_DEFUN([LIBC_TRY_TEST_CXX_OPTION],
[
LIBC_CHECK_TEST_CXX(
AC_CACHE_CHECK([$1 in testing], $3,
[LIBC_TRY_CXX_OPTION([$2], [$4], [$5])])
)
])
dnl Check if toolchain supports generating binaries with the required
dnl ELF marking as checked by readelf.
dnl LIBC_CHECK_ELF_PROPERTY([message], [pattern], [action-if-true], [action-if-false])
AC_DEFUN([LIBC_CHECK_ELF_PROPERTY],
[AC_MSG_CHECKING([$1])
libc_elf_property=no
cat > conftest.c <<EOF
int foo (void) { return 42; }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-fPIC -shared -o conftest.so conftest.c
1>&AS_MESSAGE_LOG_FD])
then
if AC_TRY_COMMAND([LC_ALL=C $READELF -n --wide conftest.so | grep "$2" 1>&AS_MESSAGE_LOG_FD])
then
libc_elf_property=yes
else
libc_elf_property=no
fi
fi
rm -f conftest*
if test $libc_elf_property = yes; then
$3
else
$4
fi
AC_MSG_RESULT($libc_elf_property)])
-14
View File
@@ -1,14 +0,0 @@
printf: incorrect output for integers with thousands separator and width field
When the printf family of functions is called with a format specifier
that uses an <apostrophe> (enable grouping) and a minimum width
specifier, the resulting output could be larger than reasonably expected
by a caller that computed a tight bound on the buffer size. The
resulting larger than expected output could result in a buffer overflow
in the printf family of functions.
CVE-Id: CVE-2023-25139
Public-Date: 2023-02-02
Vulnerable-Commit: e88b9f0e5cc50cab57a299dc7efe1a4eb385161d (2.37)
Fix-Commit: c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 (2.38)
Fix-Commit: 07b9521fc6369d000216b96562ff7c0ed32a16c4 (2.37-4)
-15
View File
@@ -1,15 +0,0 @@
getaddrinfo: Stack read overflow in no-aaaa mode
If the system is configured in no-aaaa mode via /etc/resolv.conf,
getaddrinfo is called for the AF_UNSPEC address family, and a DNS
response is received over TCP that is larger than 2048 bytes,
getaddrinfo may potentially disclose stack contents via the returned
address data, or crash.
CVE-Id: CVE-2023-4527
Public-Date: 2023-09-12
Vulnerable-Commit: f282cdbe7f436c75864e5640a409a10485e9abb2 (2.36)
Fix-Commit: bd77dd7e73e3530203be1c52c8a29d08270cb25d (2.39)
Fix-Commit: 4ea972b7edd7e36610e8cde18bf7a8149d7bac4f (2.36-113)
Fix-Commit: b7529346025a130fee483d42178b5c118da971bb (2.37-38)
Fix-Commit: b25508dd774b617f99419bdc3cf2ace4560cd2d6 (2.38-19)
-15
View File
@@ -1,15 +0,0 @@
getaddrinfo: Potential use-after-free
When an NSS plugin only implements the _gethostbyname2_r and
_getcanonname_r callbacks, getaddrinfo could use memory that was freed
during buffer resizing, potentially causing a crash or read or write to
arbitrary memory.
CVE-Id: CVE-2023-4806
Public-Date: 2023-09-12
Fix-Commit: 973fe93a5675c42798b2161c6f29c01b0e243994 (2.39)
Fix-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420)
Fix-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270)
Fix-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115)
Fix-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39)
Fix-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20)
-16
View File
@@ -1,16 +0,0 @@
tunables: local privilege escalation through buffer overflow
If a tunable of the form NAME=NAME=VAL is passed in the environment of a
setuid program and NAME is valid, it may result in a buffer overflow,
which could be exploited to achieve escalated privileges. This flaw was
introduced in glibc 2.34.
CVE-Id: CVE-2023-4911
Public-Date: 2023-10-03
Vulnerable-Commit: 2ed18c5b534d9e92fc006202a5af0df6b72e7aca (2.34)
Fix-Commit: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa (2.39)
Fix-Commit: dcc367f148bc92e7f3778a125f7a416b093964d9 (2.34-423)
Fix-Commit: c84018a05aec80f5ee6f682db0da1130b0196aef (2.35-274)
Fix-Commit: 22955ad85186ee05834e47e665056148ca07699c (2.36-118)
Fix-Commit: b4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3 (2.37-45)
Fix-Commit: 750a45a783906a19591fb8ff6b7841470f1f5701 (2.38-27)
-18
View File
@@ -1,18 +0,0 @@
getaddrinfo: DoS due to memory leak
The fix for CVE-2023-4806 introduced a memory leak when an application
calls getaddrinfo for AF_INET6 with AI_CANONNAME, AI_ALL and AI_V4MAPPED
flags set.
CVE-Id: CVE-2023-5156
Public-Date: 2023-09-25
Vulnerable-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420)
Vulnerable-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270)
Vulnerable-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115)
Vulnerable-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39)
Vulnerable-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20)
Fix-Commit: 8006457ab7e1cd556b919f477348a96fe88f2e49 (2.34-421)
Fix-Commit: 17092c0311f954e6f3c010f73ce3a78c24ac279a (2.35-272)
Fix-Commit: 856bac55f98dc840e7c27cfa82262b933385de90 (2.36-116)
Fix-Commit: 4473d1b87d04b25cdd0e0354814eeaa421328268 (2.37-42)
Fix-Commit: 5ee59ca371b99984232d7584fe2b1a758b4421d3 (2.38-24)
-15
View File
@@ -1,15 +0,0 @@
syslog: Heap buffer overflow in __vsyslog_internal
__vsyslog_internal did not handle a case where printing a SYSLOG_HEADER
containing a long program name failed to update the required buffer
size, leading to the allocation and overflow of a too-small buffer on
the heap.
CVE-Id: CVE-2023-6246
Public-Date: 2024-01-30
Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
Fix-Commit: 6bd0e4efcc78f3c0115e5ea9739a1642807450da (2.39)
Fix-Commit: 23514c72b780f3da097ecf33a793b7ba9c2070d2 (2.38-42)
Fix-Commit: 97a4292aa4a2642e251472b878d0ec4c46a0e59a (2.37-57)
Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
Fix-Commit: d1a83b6767f68b3cb5b4b4ea2617254acd040c82 (2.36-126)
-15
View File
@@ -1,15 +0,0 @@
syslog: Heap buffer overflow in __vsyslog_internal
__vsyslog_internal used the return value of snprintf/vsnprintf to
calculate buffer sizes for memory allocation. If these functions (for
any reason) failed and returned -1, the resulting buffer would be too
small to hold output.
CVE-Id: CVE-2023-6779
Public-Date: 2024-01-30
Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
Fix-Commit: 7e5a0c286da33159d47d0122007aac016f3e02cd (2.39)
Fix-Commit: d0338312aace5bbfef85e03055e1212dd0e49578 (2.38-43)
Fix-Commit: 67062eccd9a65d7fda9976a56aeaaf6c25a80214 (2.37-58)
Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
Fix-Commit: 2bc9d7c002bdac38b5c2a3f11b78e309d7765b83 (2.36-127)
-13
View File
@@ -1,13 +0,0 @@
syslog: Integer overflow in __vsyslog_internal
__vsyslog_internal calculated a buffer size by adding two integers, but
did not first check if the addition would overflow.
CVE-Id: CVE-2023-6780
Public-Date: 2024-01-30
Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
Fix-Commit: ddf542da94caf97ff43cc2875c88749880b7259b (2.39)
Fix-Commit: d37c2b20a4787463d192b32041c3406c2bd91de0 (2.38-44)
Fix-Commit: 2b58cba076e912961ceaa5fa58588e4b10f791c0 (2.37-59)
Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
Fix-Commit: b9b7d6a27aa0632f334352fa400771115b3c69b7 (2.36-128)
-28
View File
@@ -1,28 +0,0 @@
ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence
The iconv() function in the GNU C Library versions 2.39 and older may
overflow the output buffer passed to it by up to 4 bytes when converting
strings to the ISO-2022-CN-EXT character set, which may be used to
crash an application or overwrite a neighbouring variable.
ISO-2022-CN-EXT uses escape sequences to indicate character set changes
(as specified by RFC 1922). While the SOdesignation has the expected
bounds checks, neither SS2designation nor SS3designation have its;
allowing a write overflow of 1, 2, or 3 bytes with fixed values:
'$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'.
CVE-Id: CVE-2024-2961
Public-Date: 2024-04-17
Vulnerable-Commit: 755104edc75c53f4a0e7440334e944ad3c6b32fc (2.1.93-169)
Fix-Commit: f9dc609e06b1136bb0408be9605ce7973a767ada (2.40)
Fix-Commit: 31da30f23cddd36db29d5b6a1c7619361b271fb4 (2.39-31)
Fix-Commit: e1135387deded5d73924f6ca20c72a35dc8e1bda (2.38-66)
Fix-Commit: 89ce64b269a897a7780e4c73a7412016381c6ecf (2.37-89)
Fix-Commit: 4ed98540a7fd19f458287e783ae59c41e64df7b5 (2.36-164)
Fix-Commit: 36280d1ce5e245aabefb877fe4d3c6cff95dabfa (2.35-315)
Fix-Commit: a8b0561db4b9847ebfbfec20075697d5492a363c (2.34-459)
Fix-Commit: ed4f16ff6bed3037266f1fa682ebd32a18fce29c (2.33-263)
Fix-Commit: 682ad4c8623e611a971839990ceef00346289cc9 (2.32-140)
Fix-Commit: 3703c32a8d304c1ee12126134ce69be965f38000 (2.31-154)
Reported-By: Charles Fol
-22
View File
@@ -1,22 +0,0 @@
nscd: Stack-based buffer overflow in netgroup cache
If the Name Service Cache Daemon's (nscd) fixed size cache is exhausted
by client requests then a subsequent client request for netgroup data
may result in a stack-based buffer overflow. This flaw was introduced
in glibc 2.15 when the cache was added to nscd.
This vulnerability is only present in the nscd binary.
CVE-Id: CVE-2024-33599
Public-Date: 2024-04-23
Vulnerable-Commit: 684ae515993269277448150a1ca70db3b94aa5bd (2.15)
Fix-Commit: 69c58d5ef9f584ea198bd00f7964d364d0e6b921 (2.31-155)
Fix-Commit: a77064893bfe8a701770e2f53a4d33805bc47a5a (2.32-141)
Fix-Commit: 5c75001a96abcd50cbdb74df24c3f013188d076e (2.33-264)
Fix-Commit: 52f73e5c4e29b14e79167272297977f360ae1e97 (2.34-460)
Fix-Commit: 7a95873543ce225376faf13bb71c43dea6d24f86 (2.35-316)
Fix-Commit: caa3151ca460bdd9330adeedd68c3112d97bffe4 (2.36-165)
Fix-Commit: f75c298e747b2b8b41b1c2f551c011a52c41bfd1 (2.37-91)
Fix-Commit: 5968aebb86164034b8f8421b4abab2f837a5bdaf (2.38-72)
Fix-Commit: 1263d583d2e28afb8be53f8d6922f0842036f35d (2.39-35)
Fix-Commit: 87801a8fd06db1d654eea3e4f7626ff476a9bdaa (2.40)
-32
View File
@@ -1,32 +0,0 @@
nscd: Null pointer crash after notfound response
If the Name Service Cache Daemon's (nscd) cache fails to add a not-found
netgroup response to the cache, the client request can result in a null
pointer dereference. This flaw was introduced in glibc 2.15 when the
cache was added to nscd.
This vulnerability is only present in the nscd binary.
CVE-Id: CVE-2024-33600
Public-Date: 2024-04-24
Vulnerable-Commit: 684ae515993269277448150a1ca70db3b94aa5bd (2.15)
Fix-Commit: b048a482f088e53144d26a61c390bed0210f49f2 (2.40)
Fix-Commit: 7835b00dbce53c3c87bbbb1754a95fb5e58187aa (2.40)
Fix-Commit: c99f886de54446cd4447db6b44be93dabbdc2f8b (2.39-37)
Fix-Commit: 5a508e0b508c8ad53bd0d2fb48fd71b242626341 (2.39-36)
Fix-Commit: 2ae9446c1b7a3064743b4a51c0bbae668ee43e4c (2.38-74)
Fix-Commit: 541ea5172aa658c4bd5c6c6d6fd13903c3d5bb0a (2.38-73)
Fix-Commit: a8070b31043c7585c36ba68a74298c4f7af075c3 (2.37-93)
Fix-Commit: 5eea50c4402e39588de98aa1d4469a79774703d4 (2.37-92)
Fix-Commit: f205b3af56740e3b014915b1bd3b162afe3407ef (2.36-167)
Fix-Commit: c34f470a615b136170abd16142da5dd0c024f7d1 (2.36-166)
Fix-Commit: bafadc589fbe21ae330e8c2af74db9da44a17660 (2.35-318)
Fix-Commit: 4370bef52b0f3f3652c6aa13d7a9bb3ac079746d (2.35-317)
Fix-Commit: 1f94122289a9bf7dba573f5d60327aaa2b85cf2e (2.34-462)
Fix-Commit: 966d6ac9e40222b84bb21674cc4f83c8d72a5a26 (2.34-461)
Fix-Commit: e3eef1b8fbdd3a7917af466ca9c4b7477251ca79 (2.33-266)
Fix-Commit: f20a8d696b13c6261b52a6434899121f8b19d5a7 (2.33-265)
Fix-Commit: be602180146de37582a3da3a0caa4b719645de9c (2.32-143)
Fix-Commit: 394eae338199078b7961b051c191539870742d7b (2.32-142)
Fix-Commit: 8d7949183760170c61e55def723c1d8050187874 (2.31-157)
Fix-Commit: 304ce5fe466c4762b21b36c26926a4657b59b53e (2.31-156)
-28
View File
@@ -1,28 +0,0 @@
nscd: netgroup cache may terminate daemon on memory allocation failure
The Name Service Cache Daemon's (nscd) netgroup cache uses xmalloc or
xrealloc and these functions may terminate the process due to a memory
allocation failure resulting in a denial of service to the clients. The
flaw was introduced in glibc 2.15 when the cache was added to nscd.
This vulnerability is only present in the nscd binary.
Subsequent refactoring of the netgroup cache only added more uses of
xmalloc and xrealloc. Uses of xmalloc and xrealloc in other parts of
nscd only occur during startup of the daemon and so are not affected by
client requests that could trigger an out of memory followed by
termination.
CVE-Id: CVE-2024-33601
Public-Date: 2024-04-24
Vulnerable-Commit: 684ae515993269277448150a1ca70db3b94aa5bd (2.15)
Fix-Commit: c04a21e050d64a1193a6daab872bca2528bda44b (2.40)
Fix-Commit: a9a8d3eebb145779a18d90e3966009a1daa63cd8 (2.39-38)
Fix-Commit: 71af8ca864345d39b746d5cee84b94b430fad5db (2.38-75)
Fix-Commit: 6e106dc214d6a033a4e945d1c6cf58061f1c5f1f (2.37-94)
Fix-Commit: b6742463694b1dfdd5120b91ee21cf05d15ec2e2 (2.36-168)
Fix-Commit: 7a5864cac60e06000394128a5a2817b03542f5a3 (2.35-319)
Fix-Commit: 86f1d5f4129c373ac6fb6df5bcf38273838843cb (2.34-463)
Fix-Commit: 4d27d4b9a188786fc6a56745506cec2acfc51f83 (2.33-267)
Fix-Commit: 3ed195a8ec89da281e3c4bf887a13d281b72d8f4 (2.32-144)
Fix-Commit: bbf5a58ccb55679217f94de706164d15372fbbc0 (2.31-158)
-26
View File
@@ -1,26 +0,0 @@
nscd: netgroup cache assumes NSS callback uses in-buffer strings
The Name Service Cache Daemon's (nscd) netgroup cache can corrupt memory
when the NSS callback does not store all strings in the provided buffer.
The flaw was introduced in glibc 2.15 when the cache was added to nscd.
This vulnerability is only present in the nscd binary.
There is no guarantee from the NSS callback API that the returned
strings are all within the buffer. However, the netgroup cache code
assumes that the NSS callback uses in-buffer strings and if it doesn't
the buffer resizing logic could lead to potential memory corruption.
CVE-Id: CVE-2024-33602
Public-Date: 2024-04-24
Vulnerable-Commit: 684ae515993269277448150a1ca70db3b94aa5bd (2.15)
Fix-Commit: c04a21e050d64a1193a6daab872bca2528bda44b (2.40)
Fix-Commit: a9a8d3eebb145779a18d90e3966009a1daa63cd8 (2.39-38)
Fix-Commit: 71af8ca864345d39b746d5cee84b94b430fad5db (2.38-75)
Fix-Commit: 6e106dc214d6a033a4e945d1c6cf58061f1c5f1f (2.37-94)
Fix-Commit: b6742463694b1dfdd5120b91ee21cf05d15ec2e2 (2.36-168)
Fix-Commit: 7a5864cac60e06000394128a5a2817b03542f5a3 (2.35-319)
Fix-Commit: 86f1d5f4129c373ac6fb6df5bcf38273838843cb (2.34-463)
Fix-Commit: 4d27d4b9a188786fc6a56745506cec2acfc51f83 (2.33-267)
Fix-Commit: 3ed195a8ec89da281e3c4bf887a13d281b72d8f4 (2.32-144)
Fix-Commit: bbf5a58ccb55679217f94de706164d15372fbbc0 (2.31-158)
-40
View File
@@ -1,40 +0,0 @@
assert: Buffer overflow when printing assertion failure message
When the assert() function fails, it does not allocate enough space for the
assertion failure message string and size information, which may lead to a
buffer overflow if the message string size aligns to page size.
This bug can be triggered when an assertion in a program fails. The assertion
failure message is allocated to allow developers to see this failure in core
dumps and it typically includes, in addition to the invariant assertion
string and function name, the name of the program. If the name of the failing
program is user controlled, for example on a local system, this could allow an
attacker to control the assertion failure to trigger this buffer overflow.
The only viable vector for exploitation of this bug is local, if a setuid
program exists that has an existing bug that results in an assertion failure.
No such program has been discovered at the time of publishing this advisory,
but the presence of custom setuid programs, although strongly discouraged as a
security practice, cannot be discounted.
CVE-Id: CVE-2025-0395
Public-Date: 2025-01-22
Vulnerable-Commit: f8a3b5bf8fa1d0c43d2458e03cc109a04fdef194 (2.13-175)
Fix-Commit: 68ee0f704cb81e9ad0a78c644a83e1e9cd2ee578 (2.41)
Fix-Commit: cdb9ba84191ce72e86346fb8b1d906e7cd930ea2 (2.42)
Fix-Commit: 69fda28279b497bd405fdd442a6d8e4d3d5f681b (2.41-7)
Fix-Commit: 7d4b6bcae91f29d7b4daf15bab06b66cf1d2217c (2.40-66)
Fix-Commit: d6c156c326999f144cb5b73d29982108d549ad8a (2.40-71)
Fix-Commit: 808a84a8b81468b517a4d721fdc62069cb8c211f (2.39-146)
Fix-Commit: f6d48470aef9264d2d56f4c4533eb76db7f9c2e4 (2.39-150)
Fix-Commit: c32fd59314c343db88c3ea4a203870481d33c3d2 (2.38-122)
Fix-Commit: f984e2d7e8299726891a1a497a3c36cd5542a0bf (2.38-124)
Fix-Commit: a3d7865b098a3a67c44f7812208d9ce4718873ba (2.37-143)
Fix-Commit: b989519fe1683c204ac24ec92830e3fe3bfaccad (2.37-146)
Fix-Commit: 7971add7ee4171fdd8dfd17e7c04c4ed77a18845 (2.36-216)
Fix-Commit: 0487893d5c5bc6710d83d7c3152d888a0339559e (2.36-219)
Fix-Commit: 8b5d4be762419c4f6176261c6fea40ac559b88dc (2.35-370)
Fix-Commit: 8b3d09dc0d350191985f9d291cc30ce96f034b49 (2.35-373)
Fix-Commit: df4e1f4a5096b385c9bcc94424cf2eaa227b3761 (2.34-500)
Fix-Commit: 31eb872cb21449832ab47ad5db83281d240e1d03 (2.34-503)
Reported-By: Qualys Security Advisory
-23
View File
@@ -1,23 +0,0 @@
elf: static setuid binary dlopen may incorrectly search LD_LIBRARY_PATH
A statically linked setuid binary that calls dlopen (including internal
dlopen calls after setlocale or calls to NSS functions such as getaddrinfo)
may incorrectly search LD_LIBRARY_PATH to determine which library to load,
leading to the execution of library code that is attacker controlled.
The only viable vector for exploitation of this bug is local, if a static
setuid program exists, and that program calls dlopen, then it may search
LD_LIBRARY_PATH to locate the SONAME to load. No such program has been
discovered at the time of publishing this advisory, but the presence of
custom setuid programs, although strongly discouraged as a security
practice, cannot be discounted.
CVE-Id: CVE-2025-4802
Public-Date: 2025-05-16
Vulnerable-Commit: 10e93d968716ab82931d593bada121c17c0a4b93 (2.27)
Fix-Commit: 5451fa962cd0a90a0e2ec1d8910a559ace02bba0 (2.39)
Fix-Commit: 3be3728df2f1912c80abd3288bc6e3a25ad679e4 (2.38-132)
Fix-Commit: 7403ede2d7752e59e0c47d5d33d73c2bf850e7be (2.37-154)
Fix-Commit: 2ef7850279b2931caf6d6d6743ebaa91839e1cf7 (2.36-227)
Fix-Commit: 621c65ccf12ddd415ceeb2234423bd1acd0fabb3 (2.35-387)
Fix-Commit: 35018c0fd20eac9ceaf60060fed2745b3177359d (2.34-517)
-30
View File
@@ -1,30 +0,0 @@
power10: strcmp fails to save and restore nonvolatile vector registers
The Power 10 implementation of strcmp in
sysdeps/powerpc/powerpc64/le/power10/strcmp.S failed to save/restore
nonvolatile vector registers in the 32-byte aligned loop path. This
results in callers reading content from those registers in a different
context, potentially altering program logic.
There could be a program context where a user controlled string could
leak through strcmp into program code, thus altering its logic. There
is also a potential for sensitive strings passed into strcmp leaking
through the clobbered registers into parts of the calling program that
should otherwise not have had access to those strings.
The impact of this flaw is limited to applications running on Power 10
hardware that use the nonvolatile vector registers, i.e. v20 to v31
assuming that they have been treated in accordance with the OpenPower
psABI. It is possible to work around the issue for those specific
applications by setting the glibc.cpu.hwcaps tunable to "-arch_3_1" like
so:
export GLIBC_TUNABLES=glibc.cpu.hwcaps=-arch_3_1
CVE-Id: CVE-2025-5702
Public-Date: 2025-06-04
Vulnerable-Commit: 3367d8e180848030d1646f088759f02b8dfe0d6f (2.39)
Fix-Commit: 15808c77b35319e67ee0dc8f984a9a1a434701bc (2.42)
Fix-Commit: 0c76c951620f9e12df2a89b2c684878b55bb6795 (2.41-60)
Fix-Commit: 7e12550b8e3a11764a4a9090ce6bd3fc23fc8a8e (2.40-139)
Fix-Commit: 06a70769fd0b2e1f2a3085ad50ab620282bd77b3 (2.39-209)
-29
View File
@@ -1,29 +0,0 @@
power10: strncmp fails to save and restore nonvolatile vector registers
The Power 10 implementation of strncmp in
sysdeps/powerpc/powerpc64/le/power10/strncmp.S failed to save/restore
nonvolatile vector registers in the 32-byte aligned loop path. This
results in callers reading content from those registers in a different
context, potentially altering program logic.
There could be a program context where a user controlled string could
leak through strncmp into program code, thus altering its logic. There
is also a potential for sensitive strings passed into strncmp leaking
through the clobbered registers into parts of the calling program that
should otherwise not have had access to those strings.
The impact of this flaw is limited to applications running on Power 10
hardware that use the nonvolatile vector registers, i.e. v20 to v31
assuming that they have been treated in accordance with the OpenPower
psABI. It is possible to work around the issue for those specific
applications by setting the glibc.cpu.hwcaps tunable to "-arch_3_1" like
so:
export GLIBC_TUNABLES=glibc.cpu.hwcaps=-arch_3_1
CVE-Id: CVE-2025-5745
Public-Date: 2025-06-05
Vulnerable-Commit: 23f0d81608d0ca6379894ef81670cf30af7fd081 (2.40)
Fix-Commit: 63c60101ce7c5eac42be90f698ba02099b41b965 (2.42)
Fix-Commit: 84bdbf8a6f2fdafd3661489dbb7f79835a52da82 (2.41-57)
Fix-Commit: 42a5a940c974d02540c8da26d6374c744d148cb9 (2.40-136)
-14
View File
@@ -1,14 +0,0 @@
posix: Fix double-free after allocation failure in regcomp
The regcomp function in the GNU C library version from 2.4 to 2.41 is
subject to a double free if some previous allocation fails. It can be
accomplished either by a malloc failure or by using an interposed
malloc that injects random malloc failures. The double free can allow
buffer manipulation depending of how the regex is constructed.
This issue affects all architectures and ABIs supported by the GNU C
library.
CVE-Id: CVE-2025-8058
Public-Date: 2025-07-22
Vulnerable-Commit: 963d8d782fc98fb6dc3a66f0068795f9920c269d (2.3.3-1596)
Fix-Commit: 7ea06e994093fa0bcca0d0ee2c1db271d8d7885d (2.42)
-41
View File
@@ -1,41 +0,0 @@
Integer overflow in memalign leads to heap corruption
Passing too large an alignment to the memalign suite of functions
(memalign, posix_memalign, aligned_alloc) in the GNU C Library version
2.30 to 2.42 may result in an integer overflow, which could consequently
result in a heap corruption.
Note that the attacker must have control over both, the size as well as
the alignment arguments of the memalign function to be able to exploit
this. The size parameter must be close enough to PTRDIFF_MAX so as to
overflow size_t along with the large alignment argument. This limits
the malicious inputs for the alignment for memalign to the range [1<<62
+ 1, 1<<63] and exactly 1<<63 for posix_memalign and aligned_alloc.
Typically the alignment argument passed to such functions is a known
constrained quantity (e.g. page size, block size, struct sizes) and is
not attacker controlled, because of which this may not be easily
exploitable in practice. An application bug could potentially result in
the input alignment being too large, e.g. due to a different buffer
overflow or integer overflow in the application or its dependent
libraries, but that is again an uncommon usage pattern given typical
sources of alignments.
CVE-Id: CVE-2026-0861
Public-Date: 2026-01-14
Vulnerable-Commit: 9bf8e29ca136094f73f69f725f15c51facc97206 (2.30)
Fix-Commit: c9188d333717d3ceb7e3020011651f424f749f93 (2.43)
Fix-Commit: 7f19ef14fbce095d4c77395e258320cad2ea2b28 (2.30-153)
Fix-Commit: f18446d7b4a423090ee5e328c36b3c2a0f26041c (2.31-166)
Fix-Commit: 8aef9e7a7af9565c0324b4ecb38b30dfa3782fd8 (2.32-151)
Fix-Commit: 011293b4fd748cdd6f95874ba2b6aba9a3df8bff (2.33-275)
Fix-Commit: 2c77e52108a58956c9f674b36e1f59a4e3fdcf4d (2.34-525)
Fix-Commit: 499d1ccafccfe64df1b88deea2fa84d8180e8e8f (2.35-399)
Fix-Commit: fb6b8822175769b5794fb6ea04f2895483a29b61 (2.36-244)
Fix-Commit: 7b913d41a07836def826f2164c52541a9835f324 (2.37-172)
Fix-Commit: 744b63026a29f7eedbbc8e3a01a7f48a6eb0a085 (2.38-212)
Fix-Commit: fb22fd3f5b415dd4cd6f7b5741c2f0412374e242 (2.39-286)
Fix-Commit: bfc4dd9e526eacf3017dd8864ba0848e9d045dd4 (2.40-216)
Fix-Commit: 1e2c1ea4307197ccece0cda574bcfebf9080894c (2.41-121)
Fix-Commit: b0ec8fb689df862171f0f78994a3bdeb51313545 (2.42-49)
Reported-by: Igor Morgenstern, Aisle Research
-36
View File
@@ -1,36 +0,0 @@
getnetbyaddr and getnetbyaddr_r leak stack contents to DNS resovler
Calling getnetbyaddr or getnetbyaddr_r with a configured nsswitch.conf
that specifies the library's DNS backend for networks and queries for a
zero-valued network in the GNU C Library version 2.0 to version 2.42
can leak stack contents to the configured DNS resolver.
A defect in the _nss_dns_getnetbyaddr_r function which implements
getnetbyaddr and getnetbyaddr_r in the dns-based network database can
pass stack contents unmodified to the configured DNS resolver as part of
the network DNS query when the network queried is the default network
i.e. net == 0x0. This stack contents leaking in the query is considered
a loss of confidentiality for the host making the query. Typically it
is rare to call these APIs with a net value of zero, and if an attacker
can control the net value it can only leak adjacent stack, and so loss
of confidentiality is spatially limited. The leak might be used to
accelerate an ASLR bypass by knowing pointer values, but also requires
network adjacent access to snoop between the application and the
DNS server; making the attack complexity higher.
CVE-Id: CVE-2026-0915
Public-Date: 2026-01-15
Vulnerable-Commit: 5f0e6fc702296840d2daa39f83f6cb1e40073d58 (1.92-1)
Fix-Commit: e56ff82d5034ec66c6a78f517af6faa427f65b0b (2.43)
Fix-Commit: 453e6b8dbab935257eb0802b0c97bca6b67ba30e (2.42-50)
Fix-Commit: 15c9839a0b853f552b4ed9047841b6223f3c104d (2.41-122)
Fix-Commit: 329c775788b2c9ff3da774ccf59fba7b6b8ff08e (2.40-217)
Fix-Commit: 831f63b94ceb92fb14c0d1a7ddad35a0d1404c71 (2.39-287)
Fix-Commit: 49125ffc8e1674dc2a100dfdc5b78796f22e16f2 (2.38-213)
Fix-Commit: ddcaed5dfb05b2c1a6ea842fd6b643501365450a (2.37-173)
Fix-Commit: a6bf47887f24b2b394acb301a3189fda04bd4d4d (2.36-245)
Fix-Commit: 66f0cb057c9b4fb1249a5fec6ef4a63511a37899 (2.35-400)
Fix-Commit: 96863dee262225cfb79f9fe45e06fd188319c7b8 (2.34-526)
Fix-Commit: d210011f1536c8322157cbb4fe4229b35c834c08 (2.33-276)
Fix-Commit: 1bc1832cfc74c2a601220969f36e789a5e9f0ebe (2.32-152)
Reported-by: Igor Morgenstern, Aisle Research
-36
View File
@@ -1,36 +0,0 @@
wordexp with WRDE_REUSE and WRDE_APPEND may return uninitialized memory
Calling wordexp with WRDE_REUSE in conjunction with WRDE_APPEND in the
GNU C Library version 2.0 to version 2.42 may cause the interface to
return uninitialized memory in the we_wordv member, which on subsequent
calls to wordfree may abort the process.
The implementation of WRDE_REUSE in conjunction with WRDE_APPEND fails
to clear the we_wordc member of the structure, and as such, when new
words are added internally, a leading we_wordc count number of entries
are skipped since they are assumed initialized. These skipped entries
are not initialized, but are the contents of a realloc-expanded array of
pointers. If the caller inspects the we_wordv array, it will
dereference invalid pointers and crash. If the caller calls wordfree,
the malloc implementation may detect the invalid pointers and abort the
process. Calls to wordexp using WRDE_REUSE and WRDE_APPEND have never
worked correctly and thus the existence of applications that make use of
this feature is unlikely.
CVE-Id: CVE-2025-15281
Public-Date: 2026-01-20
Vulnerable-Commit: 8f2ece695d8822e9ecc63ecd157e90bf17a6fe65 (1.93-260)
Fix-Commit: 80cc58ea2de214f85b0a1d902a3b668ad2ecb302 (2.43)
Fix-Commit: cbf39c26b25801e9bc88499b4fd361ac172d4125 (2.42-51)
Fix-Commit: fb4db64a04ad6c96cd1fbb7e02eb59323b1f2ac2 (2.41-123)
Fix-Commit: 9fe8576664d43b87ca19401fb6a975e217e47623 (2.40-218)
Fix-Commit: ce65d944e38a20cb70af2a48a4b8aa5d8fabe1cc (2.39-288)
Fix-Commit: d5409a1be010699794264162c551ba60f05ee6c3 (2.38-214)
Fix-Commit: ff2b172803f6bbd897755d2ce83ec4323a1a15b3 (2.37-174)
Fix-Commit: e97cfe2293ed097eb3d0b4c18274d22855e65130 (2.36-246)
Fix-Commit: bb59339d02faebac534a87eea50c83c948f35b77 (2.35-401)
Fix-Commit: 2b656ff94d72f93c84d8da2e7c76456c1994f02e (2.34-527)
Fix-Commit: 1d8ed2067a8a5d162a07670d0d063429679f17a0 (2.33-277)
Fix-Commit: 3a56c4ee4ea49b8f2391a2d8d6220013c4160a79 (2.32-153)
Fix-Commit: 28eb5caf895ced5d895cb02757e109004a2d33e5 (2.31-167)
Reported-by: Vitaly Simonovich
-30
View File
@@ -1,30 +0,0 @@
nscd client crash on x86_64 under high nscd load
Calling NSS-backed functions that support caching via nscd may call the
nscd client side code and in the GNU C Library version 2.36 under high
load on x86_64 systems, the client may call memcmp on inputs that are
concurrently modified by other processes or threads and crash.
The nscd client in the GNU C Library uses the memcmp function with
inputs that may be concurrently modified by another thread, potentially
resulting in spurious cache misses, which in itself is not a security
issue. However in the GNU C Library version 2.36 an optimized
implementation of memcmp was introduced for x86_64 which could crash
when invoked with such undefined behaviour, turning this into a
potential crash of the nscd client and the application that uses it.
This implementation was backported to the 2.35 branch, making the nscd
client in that branch vulnerable as well. Subsequently, the fix for
this issue was backported to all vulnerable branches in the GNU C
Library repository.
It is advised that distributions that may have cherry-picked the memcpy
SSE2 optimization in their copy of the GNU C Library, also apply the fix
to avoid the potential crash in the nscd client.
CVE-Id: CVE-2026-3904
Public-Date: 2026-03-11
Vulnerable-Commit: 8804157ad9da39631703b92315460808eac86b0c (2.36)
Vulnerable-Commit: 5a8df6485c584e2b0e957ec6b9070437a724911a (2.35-89)
Fix-Commit: b712be52645282c706a5faa038242504feb06db5 (2.37)
Fix-Commit: 93967a2a7bbdcedb73e0b246713580c7c84d001e (2.36-84)
Fix-Commit: 6bcd5d8e3668d52388a6e0580611749f93e6871f (2.35-230)
-37
View File
@@ -1,37 +0,0 @@
gethostbyaddr and gethostbyaddr_r may incorrectly handle DNS response
Calling gethostbyaddr or gethostbyaddr_r with a configured nsswitch.conf
that specifies the library's DNS backend in the GNU C Library version
2.34 to version 2.43 could, with a crafted response from the configured
DNS server, result in a violation of the DNS specification that causes
the application to treat a non-answer section of the DNS response as a
valid answer.
A defect in the getanswer_ptr function, which implements the iteration
and extraction of the answer from the DNS response, can cause it to
incorrectly transition from the answer section to the next section while
still treating it as an answer to the question. This can happen when
the answer contains only skipped records, and the subsequent section
contains a semantically invalid T_PTR record. This is considered a
security issue because it is a violation of the DNS specification that
leads to incorrect behaviour that could result in the wrong hostname
being returned to the caller. At the time of publication, no known
affected DNS server returns results that would be incorrectly
interpreted by the library. An attacker would either need to be network
adjacent or have compromised the DNS server to use this defect to hide
returned reverse DNS results from intrusion detection systems. Even
then, the inbound connection from the attacker, or the outbound
connection from the application, would be visible to the intrusion
detection system. At best, the defect can be used to obfuscate and
delay analysis of the evolving threat.
CVE-Id: CVE-2026-4437
Public-Date: 2026-03-20
Vulnerable-Commit: 32e5db37684ffcbc6ae34fcc6cdcf28670506baa (2.34-323)
Vulnerable-Commit: def97e7f71a07517810f7263213d607e08ad21f1 (2.35-188)
Vulnerable-Commit: 77f523c473878ec0051582ef15161c6982879095 (2.36-30)
Vulnerable-Commit: e32547d661a43da63368e488b6cfa9c53b4dcf92 (2.37)
Fix-Commit: 5c6fca0c62ce5bd6e68e259f138097756cbafd4d (2.43-16)
Fix-Commit: 9f5f18aab40ec6b61fa49a007615e6077e9a979b (2.44)
Reported-by: Antonio Maini (0rbitingZer0) - 0rbitingZer0@proton.me
Reported-by: Kevin Farrell
-27
View File
@@ -1,27 +0,0 @@
gethostbyaddr and gethostbyaddr_r return invalid DNS hostnames
Calling gethostbyaddr or gethostbyaddr_r with a configured nsswitch.conf
that specifies the library's DNS backend in the GNU C library version
2.34 to version 2.43 could result in an invalid DNS hostname being
returned to the caller in violation of the DNS specification.
A defect in the getanswer_ptr function, which implements the iteration
and extraction of the answer from a DNS response, can cause it to accept
an invalid DNS hostname that can contain shell metacharacters. An
application that uses the returned hostname in a shell, without guarding
for shell expansion, may be subject to shell injection attacks. At the
time of publication, no known affected DNS server returns results with
shell metacharacters in the results. An attacker would either need to
be network adjacent or have compromised the DNS server to use this
defect for shell injection. No known vulnerable application has been
identified.
CVE-Id: CVE-2026-4438
Public-Date: 2026-03-20
Vulnerable-Commit: 32e5db37684ffcbc6ae34fcc6cdcf28670506baa (2.34-323)
Vulnerable-Commit: def97e7f71a07517810f7263213d607e08ad21f1 (2.35-188)
Vulnerable-Commit: 77f523c473878ec0051582ef15161c6982879095 (2.36-30)
Vulnerable-Commit: e32547d661a43da63368e488b6cfa9c53b4dcf92 (2.37)
Fix-Commit: dd9945c0ba40d2dbc9eb7c99291ba6b69bd66718 (2.43-17)
Fix-Commit: e10977481f4db4b2a3ce34fa4c3a1e26651ae312 (2.44)
Reported-by: Antonio Maini (0rbitingZer0) - 0rbitingZer0@proton.me
-15
View File
@@ -1,15 +0,0 @@
iconv crash due to assertion failure with untrusted input
The iconv() function in the GNU C Library versions 2.43 and earlier may
crash due to an assertion failure when converting inputs from the
IBM1390 or IBM1399 character sets, which may be used to remotely crash
an application.
This vulnerability can be trivially mitigated by removing the IBM1390
and IBM1399 character sets from systems that do not need them.
CVE-Id: CVE-2026-4046
Public-Date: 2026-03-12
Vulnerable-Commit: 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (2.3.3-1501)
Fix-Commit: d6f08d1cf027f4eb2ba289a6cc66853722d4badc (2.44)
Reported-by: Rocket Ma
-22
View File
@@ -1,22 +0,0 @@
REJECTED: Static buffer overflow in deprecated nis_local_principal
REJECTED: CVE-2026-5358 is rejected for two reasons. Firstly it has been
discovered that no NIS+ client or server was ever released for any
Linux-based OS distributions and as such this makes the API provisional
and unused. Secondly it has been discovered that the NIS+ cold start
cache (/var/nis/NIS_COLD_START) cannot be bypassed and as such the API
can only be called with a trusted server from the pre-populated cache.
The use of a trusted server means no trust boundary is crossed and this
is therefore considered a normal bug.
NIS+ support in the GNU C Library was never officially supported even
though an incomplete implementation of the APIs was made pulibc. To the
best knowledge of the glibc security team no open-source NIS+ server
implementations were ever released for use with this API. Applications
should not use any of the NIS+ APIs and should move to modern identity
and access management services.
CVE-Id: CVE-2026-5358
Public-Date: 2026-04-10
Rejected-Date: 2026-04-33
Reported-by: Rahul Hoysala
-23
View File
@@ -1,23 +0,0 @@
scanf %mc off-by-one heap buffer overflow
Calling the scanf family of functions with a %mc (malloc'd character
match) in the GNU C Library version 2.7 to version 2.43 with a format
width specifier with an explicit width greater than 1024 could result in
a one byte heap buffer overflow.
The bug is in the buffer growth formula in __vfscanf_internal, which
under-allocates by one byte during realloc expansion, allowing a
controlled single-byte overwrite past the end of the heap buffer.
The impact is limited by the fact that to execute the overwrite you need
both user controlled input data and a specific choice of maximum width
that yields a smaller than needed allocation. The latter point has to
take into account malloc's particular chunk size rounding process. The
"%[width]mc" format specifier does not appear to have notable use in
major Linux-based OS distributions, due to which the real world impact
may be limited to bespoke use cases.
CVE-Id: CVE-2026-5450
Public-Date: 2026-03-19
Vulnerable-Commit: 874aa52349cc111d1f6ea5dff24bb14c306714e0 (2.7)
Reported-by: Rocket Ma
-24
View File
@@ -1,24 +0,0 @@
Potential buffer under-read in ungetwc
Calling the ungetwc function on a FILE stream with wide characters
encoded in a character set that has overlaps between its single byte and
multi-byte character encodings, in the GNU C Library version 2.43 or
earlier, may result in an attempt to read bytes before an allocated
buffer, potentially resulting in unintentional disclosure of neighboring
data in the heap, or a program crash.
A bug in the wide character pushback implementation
(_IO_wdefault_pbackfail in libio/wgenops.c) causes ungetwc() to operate
on the regular character buffer (fp->_IO_read_ptr) instead of the actual
wide-stream read pointer (fp->_wide_data->_IO_read_ptr). The program
crash may happen in cases where fp->_IO_read_ptr is not initialized and
hence points to NULL. The buffer under-read requires a special situation
where the input character encoding is such that there are overlaps
between single byte representations and multibyte representations in
that encoding, resulting in spurious matches. The spurious match case
is not possible in the standard Unicode character sets.
CVE-Id: CVE-2026-5928
Public-Date: 2026-03-17
Reported-by: Rocket Ma
Vulnerable-Commit: d64b6ad07585b8a37e5fecc9a47fcee766d52ede (2.1.1-89)
-24
View File
@@ -1,24 +0,0 @@
Potential buffer overflow in ns_sprintrrf TSIG handling path
The deprecated functions ns_printrrf, ns_printrr and fp_nquery in the
GNU C Library version 2.2 and newer fail to enforce the caller-supplied
buffer length, and can result in an out-of-bounds write when printing
TSIG records.
A defect in the TSIG case handling within ns_sprintrrf performs a
formatted write using sprintf without checking the remaining buffer
length, and may write up to 6 bytes past the end of the buffer. If the
library is compiled with assertions, and the out-of-bounds write doesn't
terminate the process, then a subsequent check for "len <= *buflen" will
trigger an assertion failure.
These functions are for application debugging only and hence not in the
path of code executed by the DNS resolver. Further, they have been
deprecated since version 2.34 (2021-08-02) and should not be used by any
new applications. Applications should consider porting away from these
interfaces since they may be removed in future versions.
CVE-Id: CVE-2026-5435
Public-Date: 2026-04-02
Vulnerable-Commit: b43b13ac2544b11f35be301d1589b51a8473e32b (2.2)
Reported-by: shinobu
-18
View File
@@ -1,18 +0,0 @@
Buffer overread in ns_printrrf with corrupted RDATA field
The deprecated functions ns_printrrf, ns_printrr and fp_nquery in the
GNU C Library version 2.0.1 to version 2.43 fail to validate the RDATA
content against the RDATA length in a DNS response when processing A6,
CERT, LOC, TKEY or TSIG records, which may allow an attacker to craft a
DNS response, causing a target application to crash or read
uninitialized memory.
These functions are for application debugging only and hence not in the
path of code executed by the DNS resolver. Further, they have been
deprecated since version 2.34 and should not be used by any new
applications. Applications should consider porting away from these
interfaces since they may be removed in future versions.
CVE-Id: CVE-2026-6238
Public-Date: 2026-04-11
Vulnerable-Commit: ee188d555b8c32ad9704a7440cab400af967292f (1.90)
-20
View File
@@ -1,20 +0,0 @@
Potential stack-based buffer clash during tilde expansion in wordexp
Calling wordexp with a tilde (~) followed by an overly long username
in the GNU C Library version 2.2.3 to 2.43 may lead to a stack buffer
clash.
When expanding paths that begin with a tilde (~) followed by a username, the
internal parse_tilde function extracts the username to determine the user's
home directory. The implementation allocates memory for this username directly
on the stack using the strndupa macro. Because the size of this allocation
was determined by the length of the user-supplied input without any bounds
checks, passing an excessively long username e.g. thousands of characters,
forces the thread to exhaust its stack space. Thus if an application passes
untrusted, attacker-controlled input to the wordexp function, an attacker
can trigger a stack clash.
CVE-Id: CVE-2026-6791
Public-Date: 2026-06-22
Vulnerable-Commit: 344af000e1d6e9c7882b9bc48e71cb3f1b5fc03c (2.2.3-114)
Reported-by: storm
-92
View File
@@ -1,92 +0,0 @@
GNU C Library Security Advisory Format
======================================
Security advisories in this directory follow a simple git commit log
format, with a heading and free-format description augmented with tags
to allow parsing key information. References to code changes are
specific to the glibc repository and follow a specific format:
Tag-name: <commit-ref> (release-version)
The <commit-ref> indicates a specific commit in the repository. The
release-version indicates the publicly consumable release in which this
commit is known to exist. The release-version is derived from the
git-describe format, (i.e. stripped out from glibc-2.34.NNN-gxxxx) and
is of the form 2.34-NNN. If the -NNN suffix is absent, it means that
the change is in that release tarball, otherwise the change is on the
release/2.YY/master branch and not in any released tarball.
The following tags are currently being used:
CVE-Id:
This is the CVE-Id assigned under the CVE Program
(https://www.cve.org/).
Public-Date:
The date this issue became publicly known.
Rejected-Date:
The most recent date the assigned advisory was rejected. If the advisory
is ever published again the Rejected-Date tag should be removed.
Vulnerable-Commit:
The commit that introduced this vulnerability. There could be multiple
entries, one for each release branch in the glibc repository; the
release-version portion of this tag should tell you which branch this is
on.
Fix-Commit:
The commit that fixed this vulnerability. There could be multiple
entries for each release branch in the glibc repository, indicating that
all of those commits contributed to fixing that issue in each of those
branches.
Reported-By:
The entity that reported this issue. There could be multiple entries, one for
each reporter.
Adding an Advisory
------------------
An advisory for a CVE needs to be added on the master branch in two steps:
1. Add the text of the advisory without any Fix-Commit tags along with
the fix for the CVE. Add the Vulnerable-Commit tag, if applicable.
The advisories directory does not exist in release branches, so keep
the advisory text commit distinct from the code changes, to ease
backports. Ask for the GLIBC-SA advisory number from the security
team.
2. Finish all backports on release branches and then back on the msater
branch, add all commit refs to the advisory using the Fix-Commit
tags. Don't bother adding the release-version subscript since the
next step will overwrite it.
3. Run the process-advisories.sh script in the scripts directory on the
advisory:
scripts/process-advisories.sh update GLIBC-SA-YYYY-NNNN
(replace YYYY-NNNN with the actual advisory number).
4. Verify the updated advisory and push the result.
Rejecting an Advisory
---------------------
Rejecting an advisory on the master branch can be done in one step:
1. Mark the advisory as rejected. Add the text "REJECTED: " as a prefix
to any short-form description. Add a new paragraph that starts with
"REJECTED: " and explains the reason for the rejection including
justification for why it no longer has security impact. Lastly add
a Rejected-Date tag to the advisory.
Getting a NEWS snippet from advisories
--------------------------------------
Run:
scripts/process-advisories.sh news
and copy the content into the NEWS file.
+6 -24
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1997-2026 Free Software Foundation, Inc.
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,30 +22,12 @@ subdir := argp
include ../Makeconfig
headers = \
argp.h \
bits/argp-ldbl.h \
# headers
routines = \
argp-ba \
argp-eexst \
argp-fmtstream \
argp-fs-xinl \
argp-help \
argp-parse \
argp-pv \
argp-pvh \
argp-xinl \
# routines
headers = argp.h bits/argp-ldbl.h
routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
pvh xinl eexst)
tests = \
argp-test \
bug-argp1 \
bug-argp2 \
tst-argp1 \
tst-argp2 \
tst-ldbl-argp \
# tests
tests = argp-test tst-argp1 bug-argp1 tst-argp2 bug-argp2 \
tst-ldbl-argp
CFLAGS-argp-help.c += $(uses-callbacks) -fexceptions
CFLAGS-argp-parse.c += $(uses-callbacks)
+1 -1
View File
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
+1 -1
View File
@@ -1,5 +1,5 @@
/* Default definition for ARGP_ERR_EXIT_STATUS
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
+2 -2
View File
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -74,7 +74,7 @@ __argp_make_fmtstream (FILE *stream,
if (! fs->buf)
{
free (fs);
fs = NULL;
fs = 0;
}
else
{
+7 -13
View File
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams.
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -107,22 +107,19 @@ __BEGIN_DECLS
extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
size_t __lmargin,
size_t __rmargin,
ssize_t __wmargin)
attribute_hidden;
ssize_t __wmargin);
extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
size_t __lmargin,
size_t __rmargin,
ssize_t __wmargin);
/* Flush __FS to its stream, and free it (but don't close the stream). */
extern void __argp_fmtstream_free (argp_fmtstream_t __fs)
attribute_hidden;
extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
extern void argp_fmtstream_free (argp_fmtstream_t __fs);
extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
const char *__fmt, ...)
__attribute__ ((__format__ (printf, 2, 3)))
attribute_hidden;
__attribute__ ((__format__ (printf, 2, 3)));
extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
const char *__fmt, ...)
__attribute__ ((__format__ (printf, 2, 3)));
@@ -134,8 +131,7 @@ extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
extern int argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
const char *__str, size_t __len)
attribute_hidden;
const char *__str, size_t __len);
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
const char *__str, size_t __len);
@@ -171,11 +167,9 @@ extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
/* Internal routines. */
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
extern void __argp_fmtstream_update (argp_fmtstream_t __fs)
attribute_hidden;
extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount)
attribute_hidden;
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#ifdef __OPTIMIZE__
/* Inline versions of above routines. */
+1 -1
View File
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
+22 -22
View File
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing help output
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -210,9 +210,9 @@ fill_in_uparams (const struct argp_state *state)
}
else if (isdigit ((unsigned char) *arg))
{
char *ep;
val = strtol (arg, &ep, 10);
arg = ep;
val = atoi (arg);
while (isdigit ((unsigned char) *arg))
arg++;
SKIPWS (arg);
}
@@ -443,7 +443,7 @@ make_hol (const struct argp *argp, struct hol_cluster *cluster)
assert (hol);
hol->num_entries = 0;
hol->clusters = NULL;
hol->clusters = 0;
if (opts)
{
@@ -615,7 +615,7 @@ static char
hol_entry_first_short (const struct hol_entry *entry)
{
return hol_entry_short_iterate (entry, until_short,
entry->argp->argp_domain, NULL);
entry->argp->argp_domain, 0);
}
/* Returns the first valid long option in ENTRY, or NULL if there is none. */
@@ -627,7 +627,7 @@ hol_entry_first_long (const struct hol_entry *entry)
for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
if (opt->name && ovisible (opt))
return opt->name;
return NULL;
return 0;
}
/* Returns the entry in HOL with the long option name NAME, or NULL if there is
@@ -652,7 +652,7 @@ hol_find_entry (struct hol *hol, const char *name)
entry++;
}
return NULL;
return 0;
}
/* If an entry with the long option NAME occurs in HOL, set it's special
@@ -926,7 +926,7 @@ hol_append (struct hol *hol, struct hol *more)
while (*cl_end)
cl_end = &(*cl_end)->next;
*cl_end = more->clusters;
more->clusters = NULL;
more->clusters = 0;
/* Merge entries. */
if (more->num_entries > 0)
@@ -1299,7 +1299,7 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
{
const char *tstr = real->doc ? dgettext (state == NULL ? NULL
: state->root_argp->argp_domain,
real->doc) : NULL;
real->doc) : 0;
const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
if (fstr && *fstr)
{
@@ -1339,7 +1339,7 @@ hol_help (struct hol *hol, const struct argp_state *state,
{
unsigned num;
struct hol_entry *entry;
struct hol_help_state hhstate = { NULL, 0, 0 };
struct hol_help_state hhstate = { 0, 0, 0 };
for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
hol_entry_help (entry, state, stream, &hhstate);
@@ -1351,7 +1351,7 @@ hol_help (struct hol *hol, const struct argp_state *state,
Mandatory or optional arguments to long options are also mandatory or \
optional for any corresponding short options.");
const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
state ? state->root_argp : NULL, state);
state ? state->root_argp : 0, state);
if (fstr && *fstr)
{
__argp_fmtstream_putc (stream, '\n');
@@ -1511,7 +1511,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
char *our_level = *levels;
int multiple = 0;
const struct argp_child *child = argp->children;
const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = NULL;
const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
if (fdoc)
@@ -1560,7 +1560,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
}
/* Print the documentation for ARGP to STREAM; if POST is false, then
everything preceding a `\v' character in the documentation strings (or
everything preceeding a `\v' character in the documentation strings (or
the whole string, for those with none) is printed, otherwise, everything
following the `\v' character (nothing for strings without). Each separate
bit of documentation is separated a blank line, and if PRE_BLANK is true,
@@ -1573,7 +1573,7 @@ argp_doc (const struct argp *argp, const struct argp_state *state,
{
const char *text;
const char *inp_text;
void *input = NULL;
void *input = 0;
int anything = 0;
size_t inp_text_limit = 0;
const char *doc = dgettext (argp->argp_domain, argp->doc);
@@ -1582,11 +1582,11 @@ argp_doc (const struct argp *argp, const struct argp_state *state,
if (doc)
{
char *vt = strchr (doc, '\v');
inp_text = post ? (vt ? vt + 1 : NULL) : doc;
inp_text = post ? (vt ? vt + 1 : 0) : doc;
inp_text_limit = (!post && vt) ? (vt - doc) : 0;
}
else
inp_text = NULL;
inp_text = 0;
if (argp->help_filter)
/* We have to filter the doc strings. */
@@ -1628,7 +1628,7 @@ argp_doc (const struct argp *argp, const struct argp_state *state,
if (post && argp->help_filter)
/* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */
{
text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, NULL, input);
text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
if (text)
{
if (anything || pre_blank)
@@ -1661,7 +1661,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
unsigned flags, char *name)
{
int anything = 0; /* Whether we've output anything. */
struct hol *hol = NULL;
struct hol *hol = 0;
argp_fmtstream_t fs;
if (! stream)
@@ -1684,7 +1684,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
{
hol = argp_hol (argp, NULL);
hol = argp_hol (argp, 0);
/* If present, these options always come last. */
hol_set_group (hol, "help", -1);
@@ -1801,7 +1801,7 @@ Try `%s --help' or `%s --usage' for more information.\n"),
void __argp_help (const struct argp *argp, FILE *stream,
unsigned flags, char *name)
{
_help (argp, NULL, stream, flags, name);
_help (argp, 0, stream, flags, name);
}
#ifdef weak_alias
weak_alias (__argp_help, argp_help)
@@ -1843,7 +1843,7 @@ __argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
if (state && (state->flags & ARGP_LONG_ONLY))
flags |= ARGP_HELP_LONG_ONLY;
_help (state ? state->root_argp : NULL, state, stream, flags,
_help (state ? state->root_argp : 0, state, stream, flags,
state ? state->name : __argp_short_program_name ());
if (!state || ! (state->flags & ARGP_NO_EXIT))
+6 -1
View File
@@ -1,5 +1,5 @@
/* Name frobnication for compiling argp outside of glibc
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -76,6 +76,11 @@
#undef __argp_fmtstream_wmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
#include "mempcpy.h"
#include "strcase.h"
#include "strchrnul.h"
#include "strndup.h"
/* normal libc functions we call */
#undef __flockfile
#define __flockfile flockfile
+54 -44
View File
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -21,6 +21,21 @@
#include <config.h>
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -83,13 +98,13 @@ static volatile int _argp_hang;
static const struct argp_option argp_default_options[] =
{
{"help", '?', NULL, 0, N_("Give this help list"), -1},
{"usage", OPT_USAGE, NULL, 0, N_("Give a short usage message")},
{"help", '?', 0, 0, N_("Give this help list"), -1},
{"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
{"program-name",OPT_PROGNAME, N_("NAME"), OPTION_HIDDEN,
N_("Set the program name")},
{"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
N_("Hang for SECS seconds (default 3600)")},
{NULL, 0}
{0, 0}
};
static error_t
@@ -132,7 +147,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state)
break;
case OPT_HANG:
_argp_hang = arg ? strtol (arg, NULL, 10) : 3600;
_argp_hang = atoi (arg ? arg : "3600");
while (_argp_hang-- > 0)
__sleep (1);
break;
@@ -149,8 +164,8 @@ static const struct argp argp_default_argp =
static const struct argp_option argp_version_options[] =
{
{"version", 'V', NULL, 0, N_("Print program version"), -1},
{NULL, 0}
{"version", 'V', 0, 0, N_("Print program version"), -1},
{0, 0}
};
static error_t
@@ -213,7 +228,7 @@ struct group
particular short options is from. */
char *short_end;
/* The number of non-option args successfully handled by this parser. */
/* The number of non-option args sucessfully handled by this parser. */
unsigned args_processed;
/* This group's parser's parent's group. */
@@ -341,7 +356,7 @@ convert_options (const struct argp *argp,
? optional_argument
: required_argument)
: no_argument);
cvt->long_end->flag = NULL;
cvt->long_end->flag = 0;
/* we add a disambiguating code to all the user's
values (which is removed before we actually call
the function to parse the value); this means that
@@ -364,9 +379,9 @@ convert_options (const struct argp *argp,
group->args_processed = 0;
group->parent = parent;
group->parent_index = parent_index;
group->input = NULL;
group->hook = NULL;
group->child_inputs = NULL;
group->input = 0;
group->hook = 0;
group->child_inputs = 0;
if (children)
/* Assign GROUP's CHILD_INPUTS field some space from
@@ -382,7 +397,7 @@ convert_options (const struct argp *argp,
parent = group++;
}
else
parent = NULL;
parent = 0;
if (children)
{
@@ -417,7 +432,7 @@ parser_convert (struct parser *parser, const struct argp *argp, int flags)
parser->argp = argp;
if (argp)
parser->egroup = convert_options (argp, NULL, 0, parser->groups, &cvt);
parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
else
parser->egroup = parser->groups; /* No parsers at all! */
}
@@ -530,7 +545,7 @@ parser_init (struct parser *parser, const struct argp *argp,
makes very simple wrapper argps more convenient). */
group->child_inputs[0] = group->input;
err = group_parse (group, &parser->state, ARGP_KEY_INIT, NULL);
err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
}
if (err == EBADKEY)
err = 0; /* Some parser didn't understand. */
@@ -582,11 +597,11 @@ parser_finalize (struct parser *parser,
group < parser->egroup && (!err || err==EBADKEY);
group++)
if (group->args_processed == 0)
err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, NULL);
err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
for (group = parser->egroup - 1;
group >= parser->groups && (!err || err==EBADKEY);
group--)
err = group_parse (group, &parser->state, ARGP_KEY_END, NULL);
err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
if (err == EBADKEY)
err = 0; /* Some parser didn't understand. */
@@ -625,7 +640,7 @@ parser_finalize (struct parser *parser,
/* Since we didn't exit, give each parser an error indication. */
for (group = parser->groups; group < parser->egroup; group++)
group_parse (group, &parser->state, ARGP_KEY_ERROR, NULL);
group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
}
else
/* Notify parsers of success, and propagate back values from parsers. */
@@ -636,14 +651,14 @@ parser_finalize (struct parser *parser,
for (group = parser->egroup - 1
; group >= parser->groups && (!err || err == EBADKEY)
; group--)
err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, NULL);
err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
if (err == EBADKEY)
err = 0; /* Some parser didn't understand. */
}
/* Call parsers once more, to do any final cleanup. Errors are ignored. */
for (group = parser->egroup - 1; group >= parser->groups; group--)
group_parse (group, &parser->state, ARGP_KEY_FINI, NULL);
group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
if (err == EBADKEY)
err = EINVAL;
@@ -682,7 +697,7 @@ parser_parse_arg (struct parser *parser, char *val)
{
parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
key = ARGP_KEY_ARGS;
err = group_parse (group, &parser->state, key, NULL);
err = group_parse (group, &parser->state, key, 0);
}
}
@@ -735,15 +750,12 @@ parser_parse_opt (struct parser *parser, int opt, char *val)
}
}
else
/* A long option. Preserve the sign in the user key, without
invoking undefined behavior. Assume two's complement. */
{
int user_key =
((opt & (1 << (USER_BITS - 1))) ? ~USER_MASK : 0) | (opt & USER_MASK);
err =
group_parse (&parser->groups[group_key - 1], &parser->state,
user_key, parser->opt_data.optarg);
}
/* A long option. We use shifts instead of masking for extracting
the user value in order to preserve the sign. */
err =
group_parse (&parser->groups[group_key - 1], &parser->state,
(opt << GROUP_BITS) >> GROUP_BITS,
parser->opt_data.optarg);
if (err == EBADKEY)
/* At least currently, an option not recognized is an error in the
@@ -795,11 +807,11 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
parser->opt_data.optopt = KEY_END;
if (parser->state.flags & ARGP_LONG_ONLY)
opt = _getopt_long_only_r (parser->state.argc, parser->state.argv,
parser->short_opts, parser->long_opts, NULL,
parser->short_opts, parser->long_opts, 0,
&parser->opt_data);
else
opt = _getopt_long_r (parser->state.argc, parser->state.argv,
parser->short_opts, parser->long_opts, NULL,
parser->short_opts, parser->long_opts, 0,
&parser->opt_data);
/* And see what getopt did. */
parser->state.next = parser->opt_data.optind;
@@ -872,9 +884,6 @@ __argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
error_t err;
struct parser parser;
struct argp_child child[4];
struct argp top_argp;
/* If true, then err == EBADKEY is a result of a non-option argument failing
to be parsed (which in some cases isn't actually an error). */
int arg_ebadkey = 0;
@@ -882,23 +891,24 @@ __argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
if (! (flags & ARGP_NO_HELP))
/* Add our own options. */
{
int child_index = 0;
struct argp_child *child = alloca (4 * sizeof (struct argp_child));
struct argp *top_argp = alloca (sizeof (struct argp));
/* TOP_ARGP has no options, it just serves to group the user & default
argps. */
memset (&top_argp, 0, sizeof (struct argp));
top_argp.children = child;
memset (top_argp, 0, sizeof (*top_argp));
top_argp->children = child;
memset (child, 0, 4 * sizeof (struct argp_child));
if (argp)
child[child_index++].argp = argp;
child[child_index++].argp = &argp_default_argp;
(child++)->argp = argp;
(child++)->argp = &argp_default_argp;
if (argp_program_version || argp_program_version_hook)
child[child_index++].argp = &argp_version_argp;
child[child_index].argp = NULL;
(child++)->argp = &argp_version_argp;
child->argp = 0;
argp = &top_argp;
argp = top_argp;
}
/* Construct a parser for these arguments. */
@@ -933,7 +943,7 @@ __argp_input (const struct argp *argp, const struct argp_state *state)
return group->input;
}
return NULL;
return 0;
}
#ifdef weak_alias
weak_alias (__argp_input, _argp_input)
+1 -1
View File
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
+1 -1
View File
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
+5 -6
View File
@@ -1,6 +1,7 @@
/* Test program for argp argument parser
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -25,8 +26,6 @@
#include <string.h>
#include <argp.h>
#include <support/support.h>
const char *argp_program_version = "argp-test 1.0";
struct argp_option sub_options[] =
@@ -180,12 +179,12 @@ help_filter (int key, const char *text, void *input)
if (key == ARGP_KEY_HELP_POST_DOC && text)
{
time_t now = time (0);
new_text = xasprintf (text, ctime (&now));
asprintf (&new_text, text, ctime (&now));
}
else if (key == 'f')
/* Show the default for the --foonly option. */
new_text = xasprintf ("%s (ZOT defaults to %x)",
text, params->foonly_default);
asprintf (&new_text, "%s (ZOT defaults to %x)",
text, params->foonly_default);
else
new_text = (char *)text;
+9 -25
View File
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h
Copyright (C) 1997-2026 Free Software Foundation, Inc.
Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -25,35 +25,19 @@
# include <features.h>
#endif
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
#define ARGP_EI
#undef __OPTIMIZE__
#define __OPTIMIZE__ 1
#include <argp.h>
#ifdef _LIBC
/* Add weak aliases. */
#if _LIBC - 0 && defined (weak_alias)
void
__argp_usage (const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
weak_alias (__argp_usage, argp_usage)
int
__option_is_short (const struct argp_option *__opt)
{
if (__opt->flags & OPTION_DOC)
return 0;
else
{
int __key = __opt->key;
return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
}
}
weak_alias (__option_is_short, _option_is_short)
int
__option_is_end (const struct argp_option *__opt)
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
}
weak_alias (__option_is_end, _option_is_end)
#endif
+8 -4
View File
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -518,13 +518,17 @@ extern void *__argp_input (const struct argp *__restrict __argp,
# define __option_is_end _option_is_end
# endif
__extern_inline void
# ifndef ARGP_EI
# define ARGP_EI __extern_inline
# endif
ARGP_EI void
__argp_usage (const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
__extern_inline int
ARGP_EI int
__NTH (__option_is_short (const struct argp_option *__opt))
{
if (__opt->flags & OPTION_DOC)
@@ -536,7 +540,7 @@ __NTH (__option_is_short (const struct argp_option *__opt))
}
}
__extern_inline int
ARGP_EI int
__NTH (__option_is_end (const struct argp_option *__opt))
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+1 -1
View File
@@ -1,5 +1,5 @@
/* Redirections for argp functions for -mlong-double-64.
Copyright (C) 2019-2026 Free Software Foundation, Inc.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
+3 -2
View File
@@ -1,5 +1,6 @@
/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -30,7 +31,7 @@
static const struct argp_option test_options[] =
{
{ NULL, 0, NULL, 0, "\
This is a test for threads so we allow the user to select the number of \
This is a test for threads so we allow ther user to selection the number of \
threads which are used at any one time. Independently the total number of \
rounds can be selected. This is the total number of threads which will have \
run when the process terminates:" },
+2 -1
View File
@@ -1,5 +1,6 @@
/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
+1 -1
View File
@@ -1,5 +1,5 @@
/* Testing of long double conversions in argp.h functions.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
+5 -33
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2026 Free Software Foundation, Inc.
# Copyright (C) 1991-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,46 +22,18 @@ subdir := assert
include ../Makeconfig
headers := \
assert.h
# headers
headers := assert.h
routines := \
__assert \
__libc_assert_fail \
assert \
assert-perr \
# routines
tests := \
test-assert \
test-assert-2 \
test-assert-c++-variadic \
test-assert-c99 \
test-assert-gnu99 \
test-assert-perr \
test-assert-variadic \
tst-assert-c++ \
tst-assert-g++ \
tst-assert-sa-2025-0001 \
# tests
CFLAGS-test-assert-c99.c += -std=c99
CFLAGS-test-assert-gnu99.c += -std=gnu99
routines := assert assert-perr __assert
tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++
ifeq ($(have-cxx-thread_local),yes)
CFLAGS-test-assert-c++-variadic.o = $(test-config-cxxflags-stdcxx26)
LDLIBS-test-assert-c++-variadic = -lstdc++
CFLAGS-tst-assert-c++.o = -std=c++11
LDLIBS-tst-assert-c++ = -lstdc++
CFLAGS-tst-assert-g++.o = -std=gnu++11
LDLIBS-tst-assert-g++ = -lstdc++
else
tests-unsupported += \
test-assert-c++-variadic \
tst-assert-c++ \
tst-assert-g++ \
# tests-unsupported
tests-unsupported += tst-assert-c++ tst-assert-g++
endif
include ../Rules
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
-34
View File
@@ -1,34 +0,0 @@
/* libc-internal assert that calls __libc_message.
Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <_itoa.h>
#include <array_length.h>
#include <intprops.h>
#include <stdio.h>
void
__libc_assert_fail (const char *assertion, const char *file, unsigned int line,
const char *function)
{
char linebuf[INT_BUFSIZE_BOUND (unsigned int)];
array_end (linebuf)[-1] = '\0';
char *linestr = _itoa_word (line, array_end (linebuf) - 1, 10, 0);
__libc_assert (
"Fatal glibc error: %s:%s (%s): assertion failed: %s\n", file, linestr,
function, assertion);
}
+4 -20
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1994-2026 Free Software Foundation, Inc.
/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,15 +15,10 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <_itoa.h>
#include <array_length.h>
#include <assert.h>
#include <intprops.h>
#include <libintl.h>
#include <string.h>
#include <stdio.h>
extern const char *__progname;
/* This function, when passed an error number, a filename, and a line
number, prints a message on the standard error stream of the form:
@@ -36,19 +31,8 @@ __assert_perror_fail (int errnum,
{
char errbuf[1024];
const char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
char linebuf[INT_BUFSIZE_BOUND (unsigned int)];
array_end (linebuf)[-1] = '\0';
char *linestr = _itoa_word (line, array_end (linebuf) - 1, 10, 0);
__libc_message (_("%s%s%s:%s: %s%sUnexpected error: %s.\n"),
__progname,
__progname[0] ? ": " : "",
file,
linestr,
function ? function : "",
function ? ": " : "",
e);
char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
__assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n%n"),
e, file, line, function);
}
libc_hidden_def (__assert_perror_fail)
+75 -16
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,31 +15,90 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <array_length.h>
#include <intprops.h>
#include <assert.h>
#include <atomic.h>
#include <ldsodefs.h>
#include <libc-pointer-arith.h>
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sysdep.h>
#include <unistd.h>
#include <sys/mman.h>
extern const char *__progname;
#include <wchar.h>
#include <libio/iolibio.h>
#define fflush(s) _IO_fflush (s)
/* This function, when passed a string containing an asserted
expression, a filename, and a line number, prints a message
on the standard error stream of the form:
a.c:10: foobar: Assertion `a == b' failed.
It then aborts program execution via a call to `abort'. */
#ifdef FATAL_PREPARE_INCLUDE
# include FATAL_PREPARE_INCLUDE
#endif
void
__assert_fail_base (const char *fmt, const char *assertion, const char *file,
unsigned int line, const char *function)
{
char *str;
#ifdef FATAL_PREPARE
FATAL_PREPARE;
#endif
int total;
if (__asprintf (&str, fmt,
__progname, __progname[0] ? ": " : "",
file, line,
function ? function : "", function ? ": " : "",
assertion, &total) >= 0)
{
/* Print the message. */
(void) __fxprintf (NULL, "%s", str);
(void) fflush (stderr);
total = (total + 1 + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1);
struct abort_msg_s *buf = __mmap (NULL, total, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
if (__glibc_likely (buf != MAP_FAILED))
{
buf->size = total;
strcpy (buf->msg, str);
/* We have to free the old buffer since the application might
catch the SIGABRT signal. */
struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg, buf);
if (old != NULL)
__munmap (old, old->size);
}
free (str);
}
else
{
/* At least print a minimal message. */
static const char errstr[] = "Unexpected error.\n";
__libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
}
abort ();
}
#undef __assert_fail
void
__assert_fail (const char *assertion, const char *file, unsigned int line,
const char *function)
{
char linebuf[INT_BUFSIZE_BOUND (unsigned int)];
array_end (linebuf)[-1] = '\0';
char *linestr = _itoa_word (line, array_end (linebuf) - 1, 10, 0);
__libc_assert (_("%s%s%s:%s: %s%sAssertion `%s' failed.\n"),
__progname,
__progname[0] ? ": " : "",
file,
linestr,
function ? function : "",
function ? ": " : "",
assertion);
__assert_fail_base (_("%s%s%s:%u: %s%sAssertion `%s' failed.\n%n"),
assertion, file, line, function);
}
hidden_def(__assert_fail)
+10 -87
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,35 +34,12 @@
#define _ASSERT_H 1
#include <features.h>
#if __GLIBC_USE (ISOC23)
# ifndef __STDC_VERSION_ASSERT_H__
# define __STDC_VERSION_ASSERT_H__ 202311L
# endif
#endif
#if defined __cplusplus && __GNUC_PREREQ (2,95)
# define __ASSERT_VOID_CAST static_cast<void>
#else
# define __ASSERT_VOID_CAST (void)
#endif
/* C23 makes assert a variadic macro so that expressions with a comma
not between parentheses, but that would still be valid as a single
function argument, such as those involving compound literals with a
comma in the initializer list, can be passed to assert. This
depends on support for variadic macros (added in C99 and GCC 2.95),
and on support for _Bool (added in C99 and GCC 3.0) in order to
validate that only a single expression is passed as an argument. */
#if ((__GLIBC_USE (ISOC23) \
&& (defined __GNUC__ \
? __GNUC_PREREQ (3, 0) \
: defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) \
|| (defined __cplusplus && __cplusplus > 202302L))
# define __ASSERT_VARIADIC 1
#else
# define __ASSERT_VARIADIC 0
#endif
/* void assert (int expression);
If NDEBUG is defined, do nothing.
@@ -70,11 +47,7 @@
#ifdef NDEBUG
# if __ASSERT_VARIADIC
# define assert(...) (__ASSERT_VOID_CAST (0))
# else
# define assert(expr) (__ASSERT_VOID_CAST (0))
# endif
# define assert(expr) (__ASSERT_VOID_CAST (0))
/* void assert_perror (int errnum);
@@ -93,94 +66,48 @@ __BEGIN_DECLS
/* This prints an "Assertion failed" message and aborts. */
extern void __assert_fail (const char *__assertion, const char *__file,
unsigned int __line, const char *__function)
__THROW __attribute__ ((__noreturn__)) __COLD;
__THROW __attribute__ ((__noreturn__));
/* Likewise, but prints the error text for ERRNUM. */
extern void __assert_perror_fail (int __errnum, const char *__file,
unsigned int __line, const char *__function)
__THROW __attribute__ ((__noreturn__)) __COLD;
__THROW __attribute__ ((__noreturn__));
/* The following is not at all used here but needed for standard
compliance. */
extern void __assert (const char *__assertion, const char *__file, int __line)
__THROW __attribute__ ((__noreturn__)) __COLD;
__THROW __attribute__ ((__noreturn__));
# if __ASSERT_VARIADIC && !defined __cplusplus
/* This function is not defined and is not called outside of an
unevaluated sizeof, but serves to verify that the argument to
assert is a single expression. */
extern _Bool __assert_single_arg (_Bool);
# endif
__END_DECLS
/* When possible, define assert so that it does not add extra
parentheses around EXPR. Otherwise, those added parentheses would
suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
# if defined __cplusplus
# if defined __has_builtin
# if __has_builtin (__builtin_FILE)
# define __ASSERT_FILE __builtin_FILE ()
# define __ASSERT_LINE __builtin_LINE ()
# endif
# endif
# if !defined __ASSERT_FILE
# define __ASSERT_FILE __FILE__
# define __ASSERT_LINE __LINE__
# endif
# if __ASSERT_VARIADIC
/* The first test of __VA_ARGS__ evaluates it without converting scoped
enumeration values to bool, and the second test checks that it is a
single expression without evaluating it. */
# define assert(...) \
((__VA_ARGS__) \
? void (1 ? 1 : bool (__VA_ARGS__)) \
: __assert_fail (#__VA_ARGS__, __ASSERT_FILE, __ASSERT_LINE, \
__ASSERT_FUNCTION))
# else
# define assert(expr) \
# define assert(expr) \
(static_cast <bool> (expr) \
? void (0) \
: __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \
__ASSERT_FUNCTION))
# endif
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# elif !defined __GNUC__ || defined __STRICT_ANSI__
# if __ASSERT_VARIADIC
# define assert(...) \
(((void) sizeof (__assert_single_arg (__VA_ARGS__)), __VA_ARGS__) \
? __ASSERT_VOID_CAST (0) \
: __assert_fail (#__VA_ARGS__, __FILE__, __LINE__, __ASSERT_FUNCTION))
# else
# define assert(expr) \
# define assert(expr) \
((expr) \
? __ASSERT_VOID_CAST (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# endif
# else
# if __ASSERT_VARIADIC
# define assert(...) \
((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
if (__VA_ARGS__) \
; /* empty */ \
else \
__assert_fail (#__VA_ARGS__, __FILE__, __LINE__, __ASSERT_FUNCTION); \
}))
# else
/* The first occurrence of EXPR is not evaluated due to the sizeof,
but will trigger any pedantic warnings masked by the __extension__
for the second occurrence. The ternary operator is required to
support function pointers and bit fields in this context, and to
suppress the evaluation of variable length arrays. */
# define assert(expr) \
# define assert(expr) \
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
if (expr) \
; /* empty */ \
else \
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
}))
# endif
# endif
# ifdef __USE_GNU
@@ -208,11 +135,7 @@ __END_DECLS
#endif /* NDEBUG. */
#if (defined __USE_ISOC11 \
&& (!defined __STDC_VERSION__ \
|| __STDC_VERSION__ <= 201710L \
|| !__GNUC_PREREQ (13, 0)) \
&& !defined __cplusplus)
#if defined __USE_ISOC11 && !defined __cplusplus
# undef static_assert
# define static_assert _Static_assert
#endif
-157
View File
@@ -1,157 +0,0 @@
/* Test assert's compliance with POSIX requirements.
Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* This test verifies that a failed assertion acts in accordance with
the POSIX requirements, despite any internal failures. We do so by
calling test routines via fork() and monitoring their exit codes
and stderr, while possibly forcing internal functions (malloc) to
fail. */
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#undef NDEBUG
#include <assert.h>
#include <support/check.h>
#include <support/support.h>
#include <support/capture_subprocess.h>
#include <support/xstdio.h>
/* We need to be able to make malloc() "fail" so that __asprintf
fails. */
void * (*next_malloc)(size_t sz) = 0;
static volatile bool fail_malloc = 0;
void *
malloc (size_t sz)
{
if (fail_malloc)
return NULL;
if (next_malloc == 0)
next_malloc = dlsym (RTLD_NEXT, "malloc");
if (next_malloc == 0)
return NULL;
return next_malloc (sz);
}
/* We can tell if abort() is called by looking for the custom return
value. */
void
abort_handler(int s)
{
_exit(5);
}
static int do_lineno;
static const char *do_funcname;
/* Hack to get the line of the assert. */
#define GET_INFO_1(l) \
if (closure != NULL) \
{ \
do_lineno = l; \
do_funcname = __func__; \
return; \
}
#define GET_INFO() GET_INFO_1(__LINE__+1)
/* These are the two test cases. */
static void
test_assert_normal (void *closure)
{
if (closure == NULL)
signal (SIGABRT, abort_handler);
GET_INFO ();
assert (1 == 2);
}
static void
test_assert_nomalloc (void *closure)
{
if (closure == NULL)
{
signal (SIGABRT, abort_handler);
fail_malloc = 1;
}
GET_INFO ();
assert (1 == 2);
}
static void
check_posix (const char *buf, int rv, int line,
const char *funcname, const char *testarg)
{
/* POSIX requires that a failed assertion write a diagnostic to
stderr and call abort. The diagnostic must include the filename,
line number, and function where the assertion failed, along with
the text of the assert() argument.
*/
char linestr[100];
sprintf (linestr, "%d", line);
/* If abort is called, our handler will return 5. */
TEST_VERIFY (rv == 5);
TEST_VERIFY (strstr (buf, __FILE__) != NULL);
TEST_VERIFY (strstr (buf, linestr) != NULL);
TEST_VERIFY (strstr (buf, funcname) != NULL);
TEST_VERIFY (strstr (buf, testarg) != NULL);
}
static void
one_test (void (*func)(void *))
{
struct support_capture_subprocess sp;
int rv;
func (&do_lineno);
printf("running test for %s, line %d\n", do_funcname, do_lineno);
sp = support_capture_subprocess (func, NULL);
rv = WEXITSTATUS (sp.status);
check_posix (sp.err.buffer, rv, do_lineno, do_funcname, "1 == 2");
TEST_VERIFY (strstr (sp.err.buffer, "failed.\n") != NULL);
support_capture_subprocess_free (&sp);
}
static int
do_test(void)
{
one_test (test_assert_normal);
one_test (test_assert_nomalloc);
return 0;
}
#include <support/test-driver.c>
-120
View File
@@ -1,120 +0,0 @@
/* Test assert as a variadic macro for C++ code snippets.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* This test requires C++26, and is compiled with -std=c++26
if GCC version supports that, and no additional options
otherwise. */
#if defined __cplusplus && __cplusplus > 202302L
#undef NDEBUG
#include <assert.h>
template <typename T1, typename T2>
bool
foo ()
{ return true; }
struct C
{
C (int p, int r) : x (p + r) {}
int x;
};
int
func ()
{
return 1;
}
static void
test_enabled ()
{
{
assert (foo <int, float> ());
}
{
assert (C {1, 2}.x > 0);
}
{
int x = 10, y = 20;
assert ([x, y] { return x < y; } ());
}
{
/* Ill-formed, not an assigment expression. */
// assert (func (), func ());
assert ((func (), func ()));
}
}
/* GCC PR118629 fixed the handling of assert inside requires clause. */
#if __GNUC_PREREQ (14, 3) || defined __clang__
template <typename Ts>
constexpr bool
assert_works ()
{
return requires (Ts ts) {
assert (ts);
};
}
enum OE { oe };
enum TE : int { te };
enum class SE : int { se };
static_assert ( assert_works <OE> ());
static_assert ( assert_works <TE> ());
static_assert (!assert_works <SE> ());
#endif /* __GNUC_PREREQ (14, 3) || defined __clang__ */
#define NDEBUG
#include <assert.h>
static void
test_disabled ()
{
/* Assert is variadic, but ignores arguments */
assert(1, 2);
assert(+, 1, -, 2, *, 30);
}
static int
do_test ()
{
test_enabled ();
test_disabled ();
return 0;
}
#else
#include <support/test-driver.h>
static int
do_test ()
{
return EXIT_UNSUPPORTED;
}
#endif
#include <support/test-driver.c>
-3
View File
@@ -1,3 +0,0 @@
#undef _GNU_SOURCE
#include <test-assert.c>
-3
View File
@@ -1,3 +0,0 @@
#undef _GNU_SOURCE
#include <test-assert.c>
+3 -5
View File
@@ -11,8 +11,6 @@
#include <string.h>
#include <setjmp.h>
#include <support/xstdio.h>
jmp_buf rec;
char buf[160];
@@ -72,15 +70,15 @@ main(void)
failed = 1; /* should not happen */
rewind (stderr);
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (!strstr(buf, strerror (1)))
failed = 1;
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (strstr (buf, strerror (0)))
failed = 1;
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (strstr (buf, strerror (2)))
failed = 1;
-50
View File
@@ -1,50 +0,0 @@
/* Test assert as a variadic macro.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#undef NDEBUG
#include <assert.h>
static void
test1 (void)
{
/* This is two macro arguments, but one function argument, so must
be accepted for C23. */
assert ((int [2]) { 0, 1 }[1]);
}
#define NDEBUG
#include <assert.h>
static void
test2 (void)
{
/* With NDEBUG, arbitrary sequences of tokens are valid as assert
arguments; they do not need to form a single expression. */
assert (1, 2, 3, *);
assert ();
}
static int
do_test (void)
{
test1 ();
test2 ();
return 0;
}
#include <support/test-driver.c>
+3 -5
View File
@@ -11,8 +11,6 @@
#include <string.h>
#include <setjmp.h>
#include <support/xstdio.h>
jmp_buf rec;
char buf[160];
@@ -74,15 +72,15 @@ main (void)
failed = 1; /* should not happen */
rewind (stderr);
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (!strstr (buf, "1 == 2"))
failed = 1;
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (strstr (buf, "1 == 1"))
failed = 1;
xfgets (buf, 160, stderr);
fgets (buf, 160, stderr);
if (strstr (buf, "2 == 3"))
failed = 1;
+1 -47
View File
@@ -1,5 +1,5 @@
/* Tests for interactions between C++ and assert.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,12 +21,6 @@
#undef NDEBUG
#include <assert.h>
#if __GNUC_PREREQ (5, 0)
template <typename> struct is_void { static const bool value = false; };
template <> struct is_void <void> { static const bool value = true; };
static_assert(is_void <decltype (assert (""))>::value, "type is void");
/* The C++ standard requires that if the assert argument is a constant
subexpression, then the assert itself is one, too. */
constexpr int
@@ -68,15 +62,6 @@ struct bool_and_int
template <class T> bool operator!= (T) const; /* No definition. */
};
/* Scoped enumerations are not contextually convertible to bool. */
enum class E { e1 = 1 };
int&
preincrement (int& i)
{
return ++i;
}
static int
do_test ()
{
@@ -90,38 +75,7 @@ do_test ()
assert (value);
}
{
assert ([] { return true; } ());
}
{
assert (bool (E::e1));
/* Ill-formed, E::e1 is not contextually convertible to bool. */
// assert (E::e1);
}
{
int i = 0;
assert (preincrement (i) > 0);
if (i != 1)
return 1;
}
return 0;
}
#define NDEBUG
#include <assert.h>
static_assert(is_void <decltype (assert (""))>::value, "type is void with NDEBUG");
#else
#include <support/test-driver.h>
static int
do_test ()
{
return EXIT_UNSUPPORTED;
}
#endif
#include <support/test-driver.c>
+1 -1
View File
@@ -1,5 +1,5 @@
/* Tests for interactions between C++ and assert. GNU C++11 version.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
-92
View File
@@ -1,92 +0,0 @@
/* Test for CVE-2025-0395.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* Test that a large enough __progname does not result in a buffer overflow
when printing an assertion failure. This was CVE-2025-0395. */
#include <assert.h>
#include <inttypes.h>
#include <signal.h>
#include <stdbool.h>
#include <string.h>
#include <sys/mman.h>
#include <support/check.h>
#include <support/support.h>
#include <support/xstdio.h>
#include <support/xunistd.h>
extern const char *__progname;
int
do_test (int argc, char **argv)
{
support_need_proc ("Reads /proc/self/maps to add guards to writable maps.");
ignore_stderr ();
/* XXX assumes that the assert is on a 2 digit line number. */
const char *prompt = ": %s:99: do_test: Assertion `argc < 1' failed.\n";
int ret = fprintf (stderr, prompt, __FILE__);
if (ret < 0)
FAIL_EXIT1 ("fprintf failed: %m\n");
size_t pagesize = getpagesize ();
size_t namesize = pagesize - 1 - ret;
/* Alter the progname so that the assert message fills the entire page. */
char progname[namesize];
memset (progname, 'A', namesize - 1);
progname[namesize - 1] = '\0';
__progname = progname;
FILE *f = xfopen ("/proc/self/maps", "r");
char *line = NULL;
size_t len = 0;
uintptr_t prev_to = 0;
/* Pad the beginning of every writable mapping with a PROT_NONE map. This
ensures that the mmap in the assert_fail path never ends up below a
writable map and will terminate immediately in case of a buffer
overflow. */
while (xgetline (&line, &len, f))
{
uintptr_t from, to;
char perm[4];
sscanf (line, "%" SCNxPTR "-%" SCNxPTR " %c%c%c%c ",
&from, &to,
&perm[0], &perm[1], &perm[2], &perm[3]);
bool writable = (memchr (perm, 'w', 4) != NULL);
if (prev_to != 0 && from - prev_to > pagesize && writable)
xmmap ((void *) from - pagesize, pagesize, PROT_NONE,
MAP_ANONYMOUS | MAP_PRIVATE, 0);
prev_to = to;
}
xfclose (f);
assert (argc < 1);
return 0;
}
#define EXPECTED_SIGNAL SIGABRT
#define TEST_FUNCTION_ARGV do_test
#include <support/test-driver.c>
+63 -408
View File
@@ -1,5 +1,4 @@
# Copyright (C) 2013-2026 Free Software Foundation, Inc.
# Copyright The GNU Toolchain Authors.
# Copyright (C) 2013-2021 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,258 +21,45 @@
subdir := benchtests
include ../Makeconfig
bench-math := \
acos \
acosf \
acosh \
acoshf \
acospi \
acospif \
asin \
asinf \
asinh \
asinhf \
asinpi \
asinpif \
atan \
atan2 \
atan2f \
atan2pi \
atan2pif \
atanf \
atanh \
atanhf \
atanpi \
atanpif \
cbrt \
cbrtf \
ceil \
ceilf \
cos \
cosf \
cosh \
coshf \
cospi \
cospif \
erf \
erfc \
erfcf \
erff \
exp \
exp10 \
exp10f \
exp10m1 \
exp10m1f \
exp2 \
exp2f \
exp2m1 \
exp2m1f \
expf \
expl \
expm1 \
expm1f \
floor \
floorf \
fma \
fmaf \
fmal \
fmax \
fmaxf \
fmin \
fminf \
fmod \
fmodf \
frexp \
frexpf \
frexpl \
hypot \
hypotf \
ilogb \
ilogbf \
isfinite \
isinf \
isnan \
j0 \
j1 \
lgamma \
lgammaf \
lgammaf_r \
llrint \
llrintf \
log \
log10 \
log10f \
log10p1 \
log10p1f \
log1p \
log1pf \
log2 \
log2f \
log2l \
log2p1 \
log2p1f \
logb \
logbf \
logf \
lrint \
lrintf \
modf \
modff \
nearbyint \
nearbyintf \
pow \
powf \
powl \
remainder \
remainderf \
rint \
rintf \
roundeven \
roundevenf \
rsqrt \
rsqrtf \
sin \
sincos \
sincosf \
sinf \
sinh \
sinhf \
sinpi \
sinpif \
sqrt \
tan \
tanf \
tanh \
tanhf \
tanpi \
tanpif \
tgamma \
tgammaf \
trunc \
truncf \
y0 \
y1 \
# bench-math
bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
fmaxf powf trunc truncf roundeven roundevenf expf exp2f logf \
log2f sincosf sinf cosf isnan isinf isfinite hypot logb logbf \
exp10f ilogb ilogbf cbrt erf erfc exp10 expm1 j0 j1 lgamma \
log10 log1p tgamma y0 y1 atan2
ifneq (,$(filter yes,$(float96-fcts)))
bench-math += \
cbrtl \
# bench-math
bench-math += cbrtl
endif
ifneq (,$(filter yes,$(float128-fcts) $(float128-alias-fcts)))
bench-math += \
expf128 \
ilogbf128 \
powf128 \
sinf128 \
# bench-math
bench-math += expf128 powf128 sinf128 ilogbf128
endif
bench-pthread := \
pthread-locks \
pthread-mutex-lock \
pthread-mutex-trylock \
pthread-mutex-trylock-recursive-throughput \
pthread-mutex-trylock-throughput \
pthread-spin-lock \
pthread-spin-trylock \
pthread_once \
thread_create \
# bench-pthread
bench-pthread := pthread_once thread_create pthread-locks
bench-resolv := \
inet_ntop_ipv4 \
inet_ntop_ipv6 \
# bench-resolv
bench-string := ffs ffsll
LDLIBS-bench-pthread-mutex-lock += -lm
LDLIBS-bench-pthread-mutex-trylock += -lm
LDLIBS-bench-pthread-mutex-trylock-recursive-throughput += -lm
LDLIBS-bench-pthread-mutex-trylock-throughput += -lm
LDLIBS-bench-pthread-spin-lock += -lm
LDLIBS-bench-pthread-spin-trylock += -lm
bench-string := \
ffs \
ffsll \
# bench-string
ifeq (${BENCHSET},)
bench := $(bench-math) $(bench-pthread) $(bench-string)
else
bench := $(foreach B,$(filter bench-%,${BENCHSET}), ${${B}})
endif
# String function benchmarks.
string-benchset := \
bzero \
bzero-large \
memccpy \
memchr \
memcmp \
memcmpeq \
memcpy \
memcpy-large \
memcpy-random \
memmem \
memmove \
memmove-large \
mempcpy \
memrchr \
memset \
memset-large \
memset-random \
memset-zero \
memset-zero-large \
rawmemchr \
stpcpy \
stpcpy_chk \
stpncpy \
strcasecmp \
strcasestr \
strcat \
strchr \
strchrnul \
strcmp \
strcoll \
strcpy \
strcpy_chk \
strcspn \
strlen \
strlen-random \
strncasecmp \
strncat \
strncmp \
strncpy \
strnlen \
strpbrk \
strrchr \
strsep \
strspn \
strstr \
strtok \
# string-benchset
string-benchset := memccpy memchr memcmp memcpy memmem memmove \
mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
strcat strchr strchrnul strcmp strcpy strcspn strlen \
strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok \
strcoll memcpy-large memcpy-random memmove-large memset-large \
memcpy-walk memset-walk memmove-walk
# Build and run locale-dependent benchmarks only if we're building natively.
ifeq (no,$(cross-compiling))
wcsmbs-benchset := \
wcpcpy \
wcpncpy \
wcrtomb \
wcscat \
wcschr \
wcschrnul \
wcscmp \
wcscpy \
wcscspn \
wcslen \
wcsncat \
wcsncmp \
wcsncpy \
wcsnlen \
wcspbrk \
wcsrchr \
wcsspn \
wmemchr \
wmemcmp \
wmemset \
# wcsmbs-benchset
wcsmbs-benchset := wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat \
wcscmp wcsncmp wcschr wcschrnul wcsrchr wcsspn wcspbrk wcscspn \
wmemchr wmemset wmemcmp
else
wcsmbs-benchset :=
endif
@@ -282,65 +68,23 @@ string-benchset-all := $(string-benchset) ${wcsmbs-benchset}
ifeq (no,$(cross-compiling))
# We have to generate locales
LOCALES := \
ar_SA.UTF-8 \
cs_CZ.UTF-8 \
da_DK.UTF-8 \
el_GR.UTF-8 \
en_GB.UTF-8 \
en_US.UTF-8 \
es_ES.UTF-8 \
fa_IR.UTF-8 \
fr_FR.UTF-8 \
he_IL.UTF-8 \
hi_IN.UTF-8 \
hu_HU.UTF-8 \
is_IS.UTF-8 \
it_IT.UTF-8 \
ja_JP.UTF-8 \
pl_PL.UTF-8 \
pt_PT.UTF-8 \
ru_RU.UTF-8 \
si_LK.UTF-8 \
sr_RS.UTF-8 \
sv_SE.UTF-8 \
tr_TR.UTF-8 \
vi_VN.UTF-8 \
zh_CN.UTF-8 \
# LOCALES
LOCALES := en_US.UTF-8 tr_TR.UTF-8 cs_CZ.UTF-8 fa_IR.UTF-8 fr_FR.UTF-8 \
ja_JP.UTF-8 si_LK.UTF-8 en_GB.UTF-8 vi_VN.UTF-8 ar_SA.UTF-8 \
da_DK.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 el_GR.UTF-8 ru_RU.UTF-8 \
he_IL.UTF-8 is_IS.UTF-8 es_ES.UTF-8 hi_IN.UTF-8 sv_SE.UTF-8 \
hu_HU.UTF-8 it_IT.UTF-8 sr_RS.UTF-8 zh_CN.UTF-8
include ../gen-locales.mk
endif
hash-benchset := \
dl-elf-hash \
dl-new-hash \
nss-hash \
# hash-benchset
stdlib-benchset := \
arc4random \
bsearch \
random-lock \
strtod \
# stdlib-benchset
stdio-benchset := \
fclose \
# stdio-benchset
stdlib-benchset := strtod
stdio-common-benchset := sprintf
math-benchset := math-inlines
ifeq (${BENCHSET},)
benchset := \
$(hash-benchset) \
$(math-benchset) \
$(stdio-benchset) \
$(stdio-common-benchset) \
$(stdlib-benchset) \
$(string-benchset-all) \
# benchset
benchset := $(string-benchset-all) $(stdlib-benchset) $(stdio-common-benchset) \
$(math-benchset)
else
benchset := $(foreach B,$(filter %-benchset,${BENCHSET}), ${${B}})
endif
@@ -350,59 +94,27 @@ CFLAGS-bench-ffsll.c += -fno-builtin
CFLAGS-bench-sqrt.c += -fno-builtin
CFLAGS-bench-fmin.c += -fno-builtin
CFLAGS-bench-fminf.c += -fno-builtin
CFLAGS-bench-fma.c += -fno-builtin
CFLAGS-bench-fmaf.c += -fno-builtin
CFLAGS-bench-fmax.c += -fno-builtin
CFLAGS-bench-fmaxf.c += -fno-builtin
CFLAGS-bench-trunc.c += -fno-builtin
CFLAGS-bench-truncf.c += -fno-builtin
CFLAGS-bench-fmod.c += -fno-builtin
CFLAGS-bench-fmodf.c += -fno-builtin
CFLAGS-bench-frexp.c += -fno-builtin
CFLAGS-bench-frexpf.c += -fno-builtin
CFLAGS-bench-frexpl.c += -fno-builtin
CFLAGS-bench-remainder.c += -fno-builtin
CFLAGS-bench-remainderf.c += -fno-builtin
CFLAGS-bench-roundeven.c += -fno-builtin
CFLAGS-bench-roundevenf.c += -fno-builtin
CFLAGS-bench-isnan.c += $(config-cflags-signaling-nans)
CFLAGS-bench-isinf.c += $(config-cflags-signaling-nans)
CFLAGS-bench-isfinite.c += $(config-cflags-signaling-nans)
CFLAGS-bench-isnan.c += -fsignaling-nans
CFLAGS-bench-isinf.c += -fsignaling-nans
CFLAGS-bench-isfinite.c += -fsignaling-nans
ifeq (${BENCHSET},)
bench-malloc := \
calloc-simple \
calloc-tcache \
calloc-thread \
malloc-simple \
malloc-tcache \
malloc-thread \
# bench-malloc
bench-malloc := malloc-thread malloc-simple
else
bench-malloc := $(filter malloc-%,${BENCHSET})
bench-malloc += $(filter calloc-%,${BENCHSET})
endif
ifeq (${STATIC-BENCHTESTS},yes)
+link-benchtests = $(+link-static-tests)
link-libc-benchtests = $(link-libc-static)
libm-benchtests = $(common-objpfx)math/libm.a
thread-library-benchtests = $(static-thread-library)
else
link-libc-benchtests = $(link-libc)
+link-benchtests = $(+link-tests)
thread-library-benchtests = $(shared-thread-library)
libm-benchtests = $(libm)
endif
$(addprefix $(objpfx)bench-,$(bench-math)): $(libm-benchtests)
$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm-benchtests)
$(addprefix $(objpfx)bench-,$(bench-pthread)): $(thread-library-benchtests)
$(addprefix $(objpfx)bench-,$(bench-malloc)): $(thread-library-benchtests)
$(addprefix $(objpfx)bench-,pthread-locks): $(libm-benchtests)
$(addprefix $(objpfx)bench-,pthread-mutex-locks): $(libm-benchtests)
$(addprefix $(objpfx)bench-,malloc-thread): $(libm-benchtests)
$(addprefix $(objpfx)bench-,calloc-thread): $(libm-benchtests)
$(addprefix $(objpfx)bench-,$(bench-math)): $(libm)
$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm)
$(addprefix $(objpfx)bench-,$(bench-pthread)): $(shared-thread-library)
$(addprefix $(objpfx)bench-,$(bench-malloc)): $(shared-thread-library)
$(addprefix $(objpfx)bench-,pthread-locks): $(libm)
@@ -418,6 +130,12 @@ bench-extra-objs = json-lib.o
extra-objs += $(bench-extra-objs)
others-extras = $(bench-extra-objs)
include ../Rules
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
# The default duration: 1 seconds.
ifndef BENCH_DURATION
BENCH_DURATION := 1
@@ -447,43 +165,14 @@ bench-deps := bench-skeleton.c bench-timing.h Makefile
run-bench = $(test-wrapper-env) \
$(run-program-env) \
$($*-ENV) $(test-tunables) $(test-via-rtld-prefix) $${run}
$($*-ENV) $(test-via-rtld-prefix) $${run}
timing-type := $(objpfx)bench-timing-type
extra-objs += bench-timing-type.o
include ../Rules
bench-math += $(bench-libmvec)
ifeq (${BENCHSET},)
bench := \
$(bench-math) \
$(bench-pthread) \
$(bench-resolv) \
$(bench-string) \
# bench
else
bench := $(foreach B,$(filter bench-%,${BENCHSET}), ${${B}})
endif
# NB: Use "=" instead of ":=" since sysdeps Makefiles may add more
# benches.
binaries-bench = $(addprefix $(objpfx)bench-,$(bench))
extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
binaries-benchset = $(addprefix $(objpfx)bench-,$(benchset))
extra-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))
# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
# for all these modules.
cpp-srcs-left := \
$(binaries-bench-malloc:=.c) \
$(binaries-bench:=.c) \
$(binaries-benchset:=.c) \
$(timing-type:=.c) \
# cpp-srcs-left
cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
$(binaries-bench-malloc:=.c) $(timing-type:=.c)
lib := nonlib
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
@@ -496,26 +185,9 @@ bench-clean:
# Validate the passed in BENCHSET
ifneq ($(strip ${BENCHSET}),)
VALIDBENCHSETNAMES := \
bench-math \
bench-pthread \
bench-resolv \
bench-string \
calloc-simple \
calloc-tcache \
calloc-thread \
hash-benchset \
malloc-simple \
malloc-tcache \
malloc-thread \
math-benchset \
stdio-benchset \
stdio-common-benchset \
stdlib-benchset \
string-benchset \
wcsmbs-benchset \
# VALIDBENCHSETNAMES
VALIDBENCHSETNAMES := bench-pthread bench-math bench-string string-benchset \
wcsmbs-benchset stdlib-benchset stdio-common-benchset math-benchset \
malloc-thread malloc-simple
INVALIDBENCHSETNAMES := $(filter-out ${VALIDBENCHSETNAMES},${BENCHSET})
ifneq (${INVALIDBENCHSETNAMES},)
$(info The following values in BENCHSET are invalid: ${INVALIDBENCHSETNAMES})
@@ -545,16 +217,11 @@ bench-set: $(binaries-benchset)
bench-malloc: $(binaries-bench-malloc)
for run in $^; do \
echo "$${run}"; \
if basename $${run} | grep -q "bench-[cm]alloc-thread"; then \
if [ `basename $${run}` = "bench-malloc-thread" ]; then \
for thr in 1 8 16 32; do \
echo "Running $${run} $${thr}"; \
$(run-bench) $${thr} > $${run}-$${thr}.out; \
done;\
elif basename $${run} | grep -q "bench-[cm]alloc-tcache"; then \
for thr in 64 512 1024; do \
echo "Running $${run} $${thr}"; \
$(run-bench) $${thr} > $${run}-$${thr}.out; \
done;\
else \
for thr in 8 16 32 64 128 256 512 1024 2048 4096; do \
echo "Running $${run} $${thr}"; \
@@ -576,23 +243,11 @@ bench-func: $(binaries-bench)
echo "{\"timing_type\": \"$${timing_type}\","; \
echo " \"functions\": {"; \
for run in $^; do \
op=$$($(run-bench) $(DETAILED_OPT)); \
ret=$$?; \
case "$${ret}" in \
77) \
echo "UNSUPPORTED $${run}: $${op}" >&2; \
;; \
0) \
echo "Running $${run}" >&2; \
if [ "$${run}" != "$<" ]; then \
echo ","; \
fi; \
echo "$${op}"; \
;; \
*) \
echo "FAILED $${run}" >&2; \
;; \
esac; \
if ! [ "x$${run}" = "x$<" ]; then \
echo ","; \
fi; \
echo "Running $${run}" >&2; \
$(run-bench) $(DETAILED_OPT); \
done; \
echo; \
echo " }"; \
@@ -615,9 +270,9 @@ bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \
$(bench-link-targets): %: %.o $(objpfx)json-lib.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc-benchtests))) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-benchtests)
$(+link-tests)
$(bench-link-targets): LDFLAGS += $(link-bench-bind-now)
+4 -16
View File
@@ -62,16 +62,6 @@ otherwise the above command may try to build the benchmark again. Benchmarks
that require generated code to be executed during the build are skipped when
cross-building.
Building benchmarks as static executables:
=========================================
To build benchmarks as static executables, on the build system, run:
$ make STATIC-BENCHTESTS=yes bench-build
You can copy benchmark executables to another machine and run them
without copying the source nor build directories.
Running subsets of benchmarks:
==============================
@@ -84,14 +74,12 @@ where BENCHSET may be a space-separated list of the following values:
bench-math
bench-pthread
bench-string
hash-benchset
malloc-thread
math-benchset
stdio-benchset
stdio-common-benchset
stdlib-benchset
string-benchset
wcsmbs-benchset
stdlib-benchset
stdio-common-benchset
math-benchset
malloc-thread
Adding a function to benchtests:
===============================

Some files were not shown because too many files have changed in this diff Show More