Sync toplevel with upstream GCC.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-03-22 10:25:20 +01:00
parent 445036bb98
commit fe508576ef
84 changed files with 12618 additions and 7022 deletions

View File

@ -1,112 +1,127 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, 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 library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
[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
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 Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
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, 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.
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
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 library, or if you modify it.
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 a program 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
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.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
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.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
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, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
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, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary 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.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
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.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
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.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
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, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LIBRARY GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
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
@ -123,8 +138,8 @@ 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.
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
@ -133,7 +148,7 @@ 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
@ -255,7 +270,7 @@ 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 compile or
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
@ -282,23 +297,31 @@ of these things:
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) 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.
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) If distribution of the work is made by offering access to copy
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.
d) Verify that the user has already received a copy of these
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 source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
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.
@ -347,7 +370,7 @@ 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 to
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
@ -363,9 +386,10 @@ 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.
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
@ -383,14 +407,14 @@ 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.
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 Library General Public License from time to time.
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.
@ -411,7 +435,7 @@ 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
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.
@ -434,49 +458,53 @@ 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
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
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).
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.
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 Library General Public
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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
Library General Public License for more details.
Lesser General Public License for more details.
You should have received a copy of the GNU Library 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
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 St, 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:
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.
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!

View File

@ -1,3 +1,7 @@
2016-03-22 Corinna Vinschen <corinna@vinschen.de>
* Sync toplevel with upstream GCC.
2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
* COPYING.LIBGLOSS: Add Synopsys license.

View File

@ -30,6 +30,8 @@ build_modules= { module= flex; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
build_modules= { module= fixincludes; };
build_modules= { module= libcpp;
extra_configure_flags='--disable-nls am_cv_func_iconv=no';};
host_modules= { module= bfd; bootstrap=true; };
host_modules= { module= opcodes; bootstrap=true; };
@ -39,14 +41,15 @@ host_modules= { module= cgen; };
host_modules= { module= dejagnu; };
host_modules= { module= etc; };
host_modules= { module= fastjar; no_check_cross= true; };
host_modules= { module= fixincludes;
host_modules= { module= fixincludes; bootstrap=true;
missing= TAGS; };
host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
host_modules= { module= gcc; bootstrap=true;
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared';
// Work around in-tree gmp configure bug with missing flex.
extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
no_install= true;
// none-*-* disables asm optimizations, bootstrap-testing
// the compiler more thoroughly.
@ -56,6 +59,7 @@ host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
target="none-${host_vendor}-${host_os}"; };
host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
extra_make_flags='AM_CFLAGS="-DNO_ASM"';
no_install= true; };
host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
@ -64,11 +68,6 @@ host_modules= { module= isl; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@';
extra_make_flags='V=1';
no_install= true; };
host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared --with-gmp=system --with-bits=gmp --with-isl=system';
extra_exports='CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; ';
extra_make_flags='CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1';
no_install= true; };
host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true; };
@ -85,11 +84,22 @@ host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
host_modules= { module= libiberty; bootstrap=true;
extra_configure_flags='@extra_host_libiberty_configure_flags@';};
// Linker plugins may need their own build of libiberty; see
// gcc/doc/install.texi. We take care that this build of libiberty doesn't get
// installed. It's a helper library for linker plugins, so we pay attention to
// @extra_linker_plugin_flags@ and @extra_linker_plugin_configure_flags@.
host_modules= { module= libiberty-linker-plugin; bootstrap=true;
module_srcdir=libiberty;
extra_configure_flags='@extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
extra_make_flags='@extra_linker_plugin_flags@'; };
// We abuse missing to avoid installing anything for libiconv.
host_modules= { module= libiconv;
bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true;
missing= install-info;
missing= pdf;
missing= html;
missing= info;
missing= install-pdf;
missing= install-html;
missing= install-info; };
@ -98,7 +108,9 @@ host_modules= { module= readline; };
host_modules= { module= sid; };
host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; };
host_modules= { module= zlib; no_install=true; no_check=true;
bootstrap=true;
extra_configure_flags='@extra_host_zlib_configure_flags@';};
host_modules= { module= gdb; };
host_modules= { module= expect; };
host_modules= { module= guile; };
@ -111,21 +123,31 @@ host_modules= { module= libtermcap; no_check=true;
host_modules= { module= utils; no_check=true; };
host_modules= { module= gnattools; };
host_modules= { module= lto-plugin; bootstrap=true;
extra_configure_flags=--enable-shared; };
extra_configure_flags='--enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
extra_make_flags='@extra_linker_plugin_flags@'; };
host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
host_modules= { module= gotools; };
target_modules = { module= libstdc++-v3;
bootstrap=true;
lib_path=src/.libs;
raw_cxx=true; };
target_modules = { module= libmudflap; lib_path=.libs; };
target_modules = { module= libsanitizer;
bootstrap=true;
lib_path=.libs;
raw_cxx=true; };
target_modules = { module= libmpx;
bootstrap=true;
lib_path=.libs; };
target_modules = { module= libvtv;
bootstrap=true;
lib_path=.libs;
raw_cxx=true; };
target_modules = { module= libcilkrts;
lib_path=.libs; };
target_modules = { module= liboffloadmic;
lib_path=.libs;
extra_configure_flags='@extra_liboffloadmic_configure_flags@'; };
target_modules = { module= libssp; lib_path=.libs; };
target_modules = { module= newlib; };
target_modules = { module= libgcc; bootstrap=true; no_check=true; };
@ -270,6 +292,7 @@ flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= OBJDUMP_FOR_TARGET ; };
flags_to_pass = { flag= OBJCOPY_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
flags_to_pass = { flag= READELF_FOR_TARGET ; };
flags_to_pass = { flag= STRIP_FOR_TARGET ; };
@ -291,26 +314,32 @@ dependencies = { module=all-build-flex; on=all-build-m4; };
dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
dependencies = { module=all-build-m4; on=all-build-texinfo; };
dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
dependencies = { module=all-build-libcpp; on=all-build-libiberty; };
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
dependencies = { module=configure-gcc; on=all-gmp; };
dependencies = { module=configure-gcc; on=all-mpfr; };
dependencies = { module=configure-gcc; on=all-mpc; };
dependencies = { module=configure-gcc; on=all-isl; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
dependencies = { module=configure-gcc; on=all-libiconv; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-mpc; };
dependencies = { module=all-gcc; on=all-cloog; };
dependencies = { module=all-gcc; on=all-isl; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
dependencies = { module=all-gcc; on=all-build-flex; };
dependencies = { module=all-gcc; on=all-build-libiberty; };
dependencies = { module=all-gcc; on=all-build-fixincludes; };
dependencies = { module=all-gcc; on=all-build-libcpp; };
dependencies = { module=all-gcc; on=all-zlib; };
dependencies = { module=all-gcc; on=all-libbacktrace; hard=true; };
dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
@ -318,6 +347,7 @@ dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
dependencies = { module=all-gcc; on=all-libiberty; };
dependencies = { module=all-gcc; on=all-fixincludes; };
dependencies = { module=all-gcc; on=all-lto-plugin; };
dependencies = { module=all-gcc; on=all-libiconv; };
dependencies = { module=info-gcc; on=all-build-libiberty; };
dependencies = { module=dvi-gcc; on=all-build-libiberty; };
dependencies = { module=pdf-gcc; on=all-build-libiberty; };
@ -329,22 +359,33 @@ dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
dependencies = { module=configure-libcpp; on=configure-intl; };
dependencies = { module=configure-libcpp; on=all-libiconv; };
dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
dependencies = { module=all-libcpp; on=all-intl; };
dependencies = { module=all-libcpp; on=all-libiconv; };
dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; };
// Depending on the specific configuration, the LTO plugin will either use the
// generic libiberty build or the specific build for linker plugins.
dependencies = { module=all-lto-plugin; on=all-libiberty; };
dependencies = { module=all-lto-plugin; on=all-libiberty-linker-plugin; };
dependencies = { module=configure-libcc1; on=configure-gcc; };
dependencies = { module=all-libcc1; on=all-gcc; };
dependencies = { module=all-gotools; on=all-target-libgo; };
dependencies = { module=all-utils; on=all-libiberty; };
dependencies = { module=configure-intl; on=all-libiconv; };
dependencies = { module=configure-mpfr; on=all-gmp; };
dependencies = { module=configure-mpc; on=all-mpfr; };
dependencies = { module=configure-isl; on=all-gmp; };
dependencies = { module=configure-cloog; on=all-isl; };
dependencies = { module=configure-cloog; on=all-gmp; };
dependencies = { module=all-intl; on=all-libiconv; };
// Host modules specific to gdb.
dependencies = { module=configure-gdb; on=all-intl; };
@ -373,6 +414,7 @@ dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
dependencies = { module=configure-bfd; on=configure-intl; };
dependencies = { module=all-bfd; on=all-libiberty; };
dependencies = { module=all-bfd; on=all-intl; };
dependencies = { module=all-bfd; on=all-zlib; };
dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; };
dependencies = { module=all-opcodes; on=all-libiberty; };
@ -417,6 +459,7 @@ dependencies = { module=all-ld; on=all-build-bison; };
dependencies = { module=all-ld; on=all-build-flex; };
dependencies = { module=all-ld; on=all-intl; };
dependencies = { module=all-ld; on=all-gas; };
dependencies = { module=all-ld; on=all-binutils; };
dependencies = { module=install-ld; on=install-gold; };
dependencies = { module=install-strip-ld; on=install-strip-gold; };
dependencies = { module=configure-gold; on=configure-intl; };
@ -492,6 +535,9 @@ dependencies = { module=all-m4; on=all-build-texinfo; };
// on libgcc and newlib/libgloss.
lang_env_dependencies = { module=libjava; cxx=true; };
lang_env_dependencies = { module=libitm; cxx=true; };
lang_env_dependencies = { module=libffi; cxx=true; };
lang_env_dependencies = { module=libcilkrts; cxx=true; };
lang_env_dependencies = { module=liboffloadmic; cxx=true; };
lang_env_dependencies = { module=newlib; no_c=true; };
lang_env_dependencies = { module=libgloss; no_c=true; };
lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
@ -518,12 +564,14 @@ dependencies = { module=all-target-libjava; on=all-target-libffi; };
dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; };
dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
dependencies = { module=configure-target-libvtv; on=all-target-libstdc++-v3; };
// parallel_list.o and parallel_settings.o depend on omp.h, which is
// generated by the libgomp configure. Unfortunately, due to the use of
// recursive make, we can't be that specific.
dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; };
dependencies = { module=all-target-liboffloadmic; on=all-target-libgomp; };
dependencies = { module=install-target-libgo; on=install-target-libatomic; };
dependencies = { module=install-target-libgfortran; on=install-target-libquadmath; };
@ -532,6 +580,10 @@ dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++
dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; };
dependencies = { module=install-target-libvtv; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-libvtv; on=install-target-libgcc; };
dependencies = { module=install-target-libcilkrts; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-libcilkrts; on=install-target-libgcc; };
dependencies = { module=install-target-liboffloadmic; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-liboffloadmic; on=install-target-libgcc; };
dependencies = { module=install-target-libjava; on=install-target-libgcc; };
dependencies = { module=install-target-libitm; on=install-target-libgcc; };
dependencies = { module=install-target-libobjc; on=install-target-libgcc; };
@ -547,11 +599,11 @@ dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
dependencies = { module=configure-target-newlib; on=all-binutils; };
dependencies = { module=configure-target-newlib; on=all-ld; };
dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; };
dependencies = { module=configure-target-libgfortran; on=all-target-libbacktrace; };
languages = { language=c; gcc-check-target=check-gcc; };
languages = { language=c++; gcc-check-target=check-c++;
lib-check-target=check-target-libstdc++-v3;
lib-check-target=check-target-libmudflap-c++;
lib-check-target=check-target-libitm-c++;
lib-check-target=check-target-libgomp-c++; };
languages = { language=fortran; gcc-check-target=check-fortran;

13066
Makefile.in

File diff suppressed because it is too large Load Diff

View File

@ -169,7 +169,7 @@ BUILD_EXPORTS = \
WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
# These variables must be set on the make command line for directories
# built for the build system to override those in BASE_FLAGS_TO_PASSS.
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
@ -216,17 +216,19 @@ HOST_EXPORTS = \
LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
ISLVER="$(HOST_ISLVER)"; export ISLVER; \
LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \
XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \
@if gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
@endif gcc-bootstrap
@ -242,9 +244,9 @@ POSTSTAGE1_CXX_EXPORT = \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
-I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
-I$$s/libstdc++-v3/libsupc++ \
`if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
`if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
`if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
export CXX; \
@ -259,6 +261,7 @@ POSTSTAGE1_HOST_EXPORTS = \
$(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
$(POSTSTAGE1_CXX_EXPORT) \
$(LTO_EXPORTS) \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \
HOST_LIBS="$(POSTSTAGE1_LIBS)"; export HOST_LIBS;
@ -288,6 +291,7 @@ BASE_TARGET_EXPORTS = \
LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@ -312,12 +316,10 @@ NORMAL_TARGET_EXPORTS = \
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@
# Where to find ISL
# Where to find isl
HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
# Where to find CLOOG
HOST_CLOOGLIBS = @clooglibs@
HOST_CLOOGINC = @clooginc@
HOST_ISLVER = @islver@
# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
@ -436,11 +438,9 @@ STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
[+ ENDFOR bootstrap-stage +]
# Only build the C compiler for stage1, because that is the only one that
# we can guarantee will build with the native compiler, and also it is the
# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
# overrideable (for a bootstrap build stage1 also builds gcc.info).
# By default, C and C++ are the only stage1 languages, because they are the
# only ones we require to build with the bootstrap compiler, and also the
# only ones useful for building stage2.
STAGE1_CFLAGS = @stage1_cflags@
STAGE1_CHECKING = @stage1_checking@
@ -451,8 +451,10 @@ STAGE1_LANGUAGES = @stage1_languages@
# the last argument when conflicting --enable arguments are passed.
# * Likewise, we force-disable coverage flags, since the installed
# compiler probably has never heard of them.
# * We also disable -Wformat, since older GCCs don't understand newer %s.
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \
--disable-build-format-warnings
STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
@ -487,6 +489,7 @@ LD_FOR_TARGET=@LD_FOR_TARGET@
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
@ -577,7 +580,9 @@ CXX_FOR_TARGET_FLAG_TO_PASS = \
$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
@endif target-libstdc++-v3
# Flags to pass down to all sub-makes.
# Flags to pass down to all sub-makes. STAGE*FLAGS,
# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
# overrideable (for a bootstrap build stage1 also builds gcc.info).
BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
"`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
"[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
@ -587,7 +592,8 @@ BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
$(CXX_FOR_TARGET_FLAG_TO_PASS) \
"TFLAGS=$(TFLAGS)" \
"CONFIG_SHELL=$(SHELL)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
$(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)")
# We leave this in just in case, but it is not needed anymore.
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
@ -629,8 +635,17 @@ POSTSTAGE1_FLAGS_TO_PASS = \
GNATBIND="$${GNATBIND}" \
LDFLAGS="$${LDFLAGS}" \
HOST_LIBS="$${HOST_LIBS}" \
$(LTO_FLAGS_TO_PASS) \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
@if gcc-bootstrap
EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \
$(POSTSTAGE1_HOST_EXPORTS) \
fi;
EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS"
@endif gcc-bootstrap
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@ -641,7 +656,9 @@ EXTRA_TARGET_FLAGS = \
'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
$$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
@ -654,11 +671,14 @@ EXTRA_TARGET_FLAGS = \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'OBJCOPY=$$(OBJCOPY_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
"TFLAGS=$$TFLAGS"
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
@ -777,9 +797,9 @@ do-info: maybe-all-texinfo
install-info: do-install-info dir.info
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if [ -f dir.info ] ; then \
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
else true ; fi
if [ -f dir.info ]; then \
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info; \
else true; fi
install-pdf: do-install-pdf
@ -861,6 +881,27 @@ mail-report-with-warnings.log: warning.log
chmod +x $@
echo If you really want to send e-mail, run ./$@ now
# Local Vim config
$(srcdir)/.local.vimrc:
$(LN_S) contrib/vimrc $@
$(srcdir)/.lvimrc:
$(LN_S) contrib/vimrc $@
vimrc: $(srcdir)/.local.vimrc $(srcdir)/.lvimrc
.PHONY: vimrc
# clang-format config
$(srcdir)/.clang-format:
$(LN_S) contrib/clang-format $@
clang-format: $(srcdir)/.clang-format
.PHONY: clang-format
# Installation targets.
.PHONY: install uninstall
@ -893,14 +934,14 @@ uninstall:
.PHONY: install.all
install.all: install-no-fixedincludes
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}` ; export r ; \
@if [ -f ./gcc/Makefile ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
$(MAKE) $(FLAGS_TO_PASS) install-headers); \
else \
true ; \
true; \
fi
# install-no-fixedincludes is used to allow the elaboration of binary packages
@ -940,10 +981,10 @@ installdirs: mkinstalldirs
$(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
dir.info: do-install-info
if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
$(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
mv -f dir.info.new dir.info ; \
else true ; \
if [ -f $(srcdir)/texinfo/gen-info-dir ]; then \
$(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new; \
mv -f dir.info.new dir.info; \
else true; \
fi
dist:
@ -978,8 +1019,8 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
[+ IF check_multilibs
+]echo "Checking multilib configuration for [+module+]..."; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
if test -r [+subdir+]/[+module+]/multilib.out; then \
if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
rm -f [+subdir+]/[+module+]/multilib.tmp; \
@ -991,7 +1032,7 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
fi; \
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
[+exports+] [+extra_exports+] \
echo Configuring in [+subdir+]/[+module+]; \
cd "[+subdir+]/[+module+]" || exit 1; \
@ -1000,12 +1041,13 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
*) topdir=`echo [+subdir+]/[+module+]/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
libsrcdir="$$s/[+module+]"; \
module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
[+ IF no-config-site +]rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) \
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
[+args+] --build=${build_alias} --host=[+host_alias+] \
--target=[+target_alias+] $${srcdiroption} [+extra_configure_flags+] \
--target=[+target_alias+] [+extra_configure_flags+] \
|| exit 1
@endif [+prefix+][+module+]
@ -1023,7 +1065,7 @@ configure-stage[+id+]-[+prefix+][+module+]:
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
[+ IF check_multilibs
+]echo "Checking multilib configuration for [+module+]..."; \
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
if test -r [+subdir+]/[+module+]/multilib.out; then \
if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
rm -f [+subdir+]/[+module+]/multilib.tmp; \
@ -1045,20 +1087,20 @@ configure-stage[+id+]-[+prefix+][+module+]:
LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+
ENDIF prefix +] [+extra_exports+] \
echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
echo Configuring stage [+id+] in [+subdir+]/[+module+]; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
cd [+subdir+]/[+module+] || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo [+subdir+]/[+module+]/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
libsrcdir="$$s/[+module+]"; \
$(SHELL) $${libsrcdir}/configure \
module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
$(SHELL) $$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
[+args+] --build=${build_alias} --host=[+host_alias+] \
--target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
--with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
--target=[+target_alias+] \
[+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
$(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
[+extra_configure_flags+][+ ENDIF extra_configure_flags +]
@endif [+prefix+][+module+]-bootstrap
@ -1179,21 +1221,25 @@ check-[+module+]:
# This module is only tested in a native toolchain.
check-[+module+]:
@: $(MAKE); $(unstage)
@if [ '$(host)' = '$(target)' ] ; then \
@if [ '$(host)' = '$(target)' ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
$(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+
ENDIF bootstrap +] \
(cd $(HOST_SUBDIR)/[+module+] && \
$(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check); \
$(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+
IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check)
fi
[+ ELSE check +]
check-[+module+]:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
$(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+
ENDIF bootstrap +] \
(cd $(HOST_SUBDIR)/[+module+] && \
$(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check)
$(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+
IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check)
[+ ENDIF no_check +]
@endif [+module+]
@ -1253,7 +1299,7 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing [+make_target+] in [+module+]" ; \
echo "Doing [+make_target+] in [+module+]"; \
(cd $(HOST_SUBDIR)/[+module+] && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@ -1380,7 +1426,7 @@ maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
[+depend+]-target-[+module+] [+
ENDFOR depend +]
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
@[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
IF raw_cxx +]
@ -1388,7 +1434,7 @@ IF raw_cxx +]
ELSE normal_cxx +]
$(NORMAL_TARGET_EXPORTS) \[+
ENDIF raw_cxx +]
echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@ -1404,13 +1450,6 @@ ENDIF raw_cxx +]
[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
@if target-libmudflap
.PHONY: check-target-libmudflap-c++
check-target-libmudflap-c++:
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
@endif target-libmudflap
@if target-libgomp
.PHONY: check-target-libgomp-c++
check-target-libgomp-c++:
@ -1438,7 +1477,7 @@ cross: all-build all-gas all-ld
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Building runtime libraries"; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
@endif gcc-no-bootstrap
@ -1522,31 +1561,31 @@ objext = .o
stage[+id+]-start::
@: $(MAKE); $(stage); \
echo stage[+id+] > stage_current ; \
echo stage[+id+] > stage_current; \
echo stage[+id+] > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+
FOR host_modules +][+ IF bootstrap +]
@if [+ module +]
@cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
mkdir stage[+id+]-[+module+]; \
mv stage[+id+]-[+module+] [+module+] [+ IF prev +] ; \
mv stage[+id+]-[+module+] [+module+][+ IF prev +]; \
mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +]
@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
@[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \
mkdir stage[+id+]-$(TARGET_SUBDIR); \
mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR) [+ IF prev +] ; \
mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR)[+ IF prev +]; \
mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF prev +]
stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +]
@if [+ module +]
@if test -d $(HOST_SUBDIR)/[+module+] ; then \
cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+] [+ IF prev +]; \
mv prev-[+module+] stage[+prev+]-[+module+] ; : [+ ENDIF prev +] ; \
@if test -d $(HOST_SUBDIR)/[+module+]; then \
cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+][+ IF prev +]; \
mv prev-[+module+] stage[+prev+]-[+module+]; : [+ ENDIF prev +]; \
fi
@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
@if test -d $(TARGET_SUBDIR) ; then \
mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR) [+ IF prev +] ; \
mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR) ; : [+ ENDIF prev +] ; \
@if test -d $(TARGET_SUBDIR); then \
mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR)[+ IF prev +]; \
mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR); : [+ ENDIF prev +]; \
fi
rm -f stage_current
@ -1558,13 +1597,13 @@ stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage[+id+]-lean [+
IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
echo Skipping rebuild of stage[+id+] ; \
IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +]; then \
echo Skipping rebuild of stage[+id+]; \
else \
$(MAKE) stage[+id+]-start; \[+IF lean +]
if $(LEAN); then \
rm -rf stage[+lean+]-* ; \
$(STAMP) stage[+lean+]-lean ; \
rm -rf stage[+lean+]-*; \
$(STAMP) stage[+lean+]-lean; \
fi; \[+ ENDIF lean +]
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
fi[+ IF compare-target +]
@ -1581,16 +1620,16 @@ do-clean: clean-stage[+id+]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage[+prev+]-lean; then \
echo Cannot compare object files as stage [+prev+] was deleted. ; \
exit 0 ; \
echo Cannot compare object files as stage [+prev+] was deleted.; \
exit 0; \
fi; \
: $(MAKE); $(stage); \
rm -f .bad_compare ; \
echo Comparing stages [+prev+] and [+id+] ; \
rm -f .bad_compare; \
echo Comparing stages [+prev+] and [+id+]; \
sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
files=`find stage[+id+]-* -name "*$(objext)" -print | \
sed -n s,^stage$$sed-,,p` ; \
for file in $${files} ; do \
sed -n s,^stage$$sed-,,p`; \
for file in $${files}; do \
f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
if test ! -f $$f1; then continue; fi; \
$(do-[+compare-target+]) > /dev/null 2>&1; \
@ -1600,16 +1639,16 @@ do-clean: clean-stage[+id+]
echo warning: $$file differs ;; \
*) \
echo $$file differs >> .bad_compare ;; \
esac ; \
fi ; \
done ; \
esac; \
fi; \
done; \
if [ -f .bad_compare ]; then \
echo "Bootstrap comparison failure!"; \
cat .bad_compare; \
exit 1; \
else \
echo Comparison successful.; \
fi ; \
fi; \
$(STAMP) [+compare-target+][+ IF prev +]
if $(LEAN); then \
rm -rf stage[+prev+]-*; \
@ -1675,10 +1714,10 @@ stagefeedback-start::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
for i in prev-*; do \
j=`echo $$i | sed s/^prev-//` ; \
j=`echo $$i | sed s/^prev-//`; \
cd $$r/$$i && \
{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
{ find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \
{ find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \
done
@if gcc-bootstrap

236
compile
View File

@ -1,10 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2009-04-28.21; # UTC
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -29,21 +28,224 @@ scriptversion=2009-04-28.21; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@ -53,11 +255,13 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
eat=
for arg
do
@ -66,8 +270,8 @@ do
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
@ -94,10 +298,10 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
@ -106,7 +310,7 @@ fi
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
@ -124,9 +328,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"

View File

@ -2,7 +2,7 @@
# wanting multilib support.
#
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008, 2010, 2011, 2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -31,7 +31,7 @@
# user select which libraries s/he really wants.
#
# Subdirectories wishing to use multilib should put the following lines
# in the "post-target" section of configure.in.
# in the "post-target" section of configure.ac.
#
# if [ "${srcdir}" = "." ] ; then
# if [ "${with_target_subdir}" != "." ] ; then
@ -105,31 +105,34 @@ ml_realsrcdir=${srcdir}
# Scan all the arguments and set all the ones we need.
ml_verbose=--verbose
for option in ${ac_configure_args}
do
# strip single quotes surrounding individual options
case $option in
\'*\') eval option=$option ;;
esac
scan_arguments ()
{
ml_verbose=--verbose
for option
do
# Strip single quotes surrounding individual options, that is, remove one
# level of shell quoting for these.
case $option in
\'*\') eval option=$option ;;
esac
case $option in
--*) ;;
-*) option=-$option ;;
esac
case $option in
--*) ;;
-*) option=-$option ;;
esac
case $option in
--*=*)
case $option in
--*=*)
optarg=`echo $option | sed -e 's/^[^=]*=//'`
;;
esac
esac
case $option in
--disable-*)
case $option in
--disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
eval $enableopt=no
;;
--enable-*)
--enable-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
@ -139,32 +142,37 @@ do
# Don't undo its work.
case $enableopt in
enable_shared | enable_static) ;;
*) eval $enableopt="$optarg" ;;
*) eval $enableopt='$optarg' ;;
esac
;;
--norecursion | --no-recursion)
--norecursion | --no-recursion)
ml_norecursion=yes
;;
--silent | --sil* | --quiet | --q*)
--silent | --sil* | --quiet | --q*)
ml_verbose=--silent
;;
--verbose | --v | --verb*)
--verbose | --v | --verb*)
ml_verbose=--verbose
;;
--with-*)
--with-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
eval $withopt="$optarg"
eval $withopt='$optarg'
;;
--without-*)
--without-*)
withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
eval $withopt=no
;;
esac
done
esac
done
}
# Use eval to properly handle configure arguments such as
# --enable-foo='--enable-a=1 --enable-b=2 --enable-c=3'.
eval scan_arguments "${ac_configure_args}"
unset scan_arguments
# Only do this if --enable-multilib.
if [ "${enable_multilib}" = yes ]; then
@ -174,8 +182,8 @@ if [ "${enable_multilib}" = yes ]; then
# ${with_multisubdir} tells us we're in the right branch, but we could be
# in a subdir of that.
# ??? The previous version could void this test by separating the process into
# two files: one that only the library's toplevel configure.in ran (to
# configure the multilib subdirs), and another that all configure.in's ran to
# two files: one that only the library's toplevel configure.ac ran (to
# configure the multilib subdirs), and another that all configure.ac's ran to
# update the Makefile. It seemed reasonable to collapse all multilib support
# into one file, but it does leave us with having to perform this test.
ml_toplevel_p=no
@ -860,7 +868,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
"${ac_configure_args}" ${ml_config_env} ${ml_srcdiroption} ; then
true
else
exit 1

17
config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-09-14'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -27,7 +27,7 @@ timestamp='2015-09-14'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1123,7 +1123,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@ -1393,6 +1393,9 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
@ -1402,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

16
config.sub vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-08-20'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -33,7 +33,7 @@ timestamp='2015-08-20'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@ -53,8 +53,7 @@ timestamp='2015-08-20'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -521,7 +520,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
asmjs)
basic_machine=asmjs-unknown
;;
aux)
@ -1399,7 +1398,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)

View File

@ -1,7 +1,167 @@
2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
LSAN_OPTIONS=detect_leaks.
2015-08-24 Yaakov Selkowitz <yselkowi@redhat.com>
* iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present.
2015-07-24 Micahel Darling <darlingm@gmail.com>
PR other/66259
* gettext.m4: Reflects renaming of configure.in to configure.ac
* po.m4: Likewise
* stdint.m4: Likewise
* tcl.m4: Likewise
2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
* zlib.m4: Sync with binutils-gdb.
2015-06-30 H.J. Lu <hongjiu.lu@intel.com>
* dfp.m4 (enable_decimal_float): Also set to yes for
i?86*-*-elfiamcu target.
2015-05-27 Jason Merrill <jason@redhat.com>
PR bootstrap/66304
* warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
(ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
(ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
(ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
(ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
* sjlj.m4: New file.
2015-05-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bitfields.m4: Change int to long long, and use bitfields of
width 1 instead of 0.
2015-05-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bitfields.m4: New file.
2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
* bootstrap-mpx.mk: New file.
2015-04-10 Jakub Jelinek <jakub@redhat.com>
Iain Sandoe <iain@codesourcery.com>
PR target/65351
* mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the
compiler in use supports -mno-dynamic-no-pic.
* picflag.m4: Only append -mno-dynamic-no-pic for Darwin when
-mdynamic-no-pic is present in CFLAGS.
2015-04-07 Jakub Jelinek <jakub@redhat.com>
Iain Sandoe <iain@codesourcery.com>
PR target/65351
* picflag.m4: Append -mno-dynamic-no-pic for Darwin.
2015-03-25 Uros Bizjak <ubizjak@gmail.com>
PR bootstrap/65537
* bootstrap-lto-noplugin.mk: New build configuration.
2015-02-18 Thomas Schwinge <thomas@codesourcery.com>
* elf.m4 (ACX_ELF_TARGET_IFELSE): nvptx-*-none isn't ELF.
2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
* mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
overwriting.
(CXXFLAGS_FOR_TARGET): Similarly.
2014-11-17 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/63888
* bootstrap-asan.mk (ASAN_OPTIONS): Export "detect_leaks=0".
2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com>
* target-posix: New file.
2014-11-11 Tobias Burnus <burnus@net-b.de>
* cloog.m4: Remove.
2014-10-27 Tom Tromey <tromey@redhat.com>
* gcc-plugin.m4: New file.
2014-09-01 Andi Kleen <ak@linux.intel.com>
* bootstrap-lto.mk: Implement slim bootstrap.
2014-08-21 Bin Cheng <bin.cheng@arm.com>
* isl.m4 (ISL_CHECK_VERSION): Check link of isl library
for cross_compiling.
2014-08-19 Alan Modra <amodra@gmail.com>
* plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to
LIBS via AC_SEARCH_LIBS.
2014-08-18 Roman Gareev <gareevroman@gmail.com>
* cloog.m4: Remove the path to isllibs from clooglibs.
* isl.m4: Add paths to islinc, isllibs.
2014-08-14 Alan Modra <amodra@gmail.com>
* plugins.m4: Test for dlfcn.h or windows.h here to set default
for --enable-plugins. Report error if someone tries to enable
plugins on a host we don't support.
2014-07-26 Uros Bizjak <ubizjak@gmail.com>
PR target/47230
* mh-alpha-linux: New file.
2014-05-14 Sandra Loosemore <sandra@codesourcery.com>
* mt-nios2-elf: New file.
2014-04-25 Marc Glisse <marc.glisse@inria.fr>
PR target/43538
* mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
2013-12-07 Mike Frysinger <vapier@gentoo.org>
* acinclude.m4: Remove +x file mode.
2013-11-29 Marek Polacek <polacek@redhat.com>
* bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.
Add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
* bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
2013-11-19 Marek Polacek <polacek@redhat.com>
* bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl.
2013-11-18 Jan Hubicka <jh@suse.cz>
* bootstrap-lto.mk: Use -ffat-lto-objects.
2013-11-15 Andreas Schwab <schwab@linux-m68k.org>
* picflag.m4 (m68k-*-*): Use default PIC flag.
2013-09-29 Iain Sandoe <iain@codesourcery.com>
* mh-darwin (BOOT_CFLAGS): Only add -mdynamic-no-pic for m32 hosts.
@ -22,6 +182,10 @@
* bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.
2013-01-23 Shenghou Ma <minux.ma@gmail.com>
* isl.m4: don't echo $CFLAGS for ISL_CHECK_VERSION.
2013-01-15 Richard Biener <rguenther@suse.de>
PR other/55973

0
config/acinclude.m4 Executable file → Normal file
View File

25
config/bitfields.m4 Normal file
View File

@ -0,0 +1,25 @@
dnl Copyright (C) 2015 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
# alignment.
AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
[
AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
[
AC_TRY_COMPILE(
[struct foo1 { char x; char y:1; char z; };
struct foo2 { char x; long long int y:1; char z; };
int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
[], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
])
if test $gt_cv_bitfield_type_matters = yes; then
AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
[Define if the type of bitfields effects alignment.])
fi
])

View File

@ -1,7 +1,11 @@
# This option enables -fsanitize=address for stage2 and stage3.
# Suppress LeakSanitizer in bootstrap.
export LSAN_OPTIONS="detect_leaks=0"
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address
POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs

View File

@ -0,0 +1,6 @@
# This option enables LTO for stage2 and stage3 on
# hosts without linker plugin support.
STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
STAGEprofile_CFLAGS += -fno-lto

View File

@ -1,5 +1,13 @@
# This option enables LTO for stage2 and stage3.
# This option enables LTO for stage2 and stage3 in slim mode
STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1
STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1
STAGEprofile_CFLAGS += -fno-lto
# assumes the host supports the linker plugin
LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/
LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/
LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \
RANLIB="$(LTO_RANLIB)"; export RANLIB;
LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)"

9
config/bootstrap-mpx.mk Normal file
View File

@ -0,0 +1,9 @@
# This option enables -fcheck-pointer-bounds -mmpx for stage2 and stage3.
STAGE2_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
STAGE3_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
POSTSTAGE1_LDFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 \
-static-libmpx -static-libmpxwrappers \
-B$$r/prev-$(TARGET_SUBDIR)/libmpx \
-B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxrt/.libs \
-B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxwrap/.libs

View File

@ -2,6 +2,7 @@
STAGE2_CFLAGS += -fsanitize=undefined
STAGE3_CFLAGS += -fsanitize=undefined
POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lpthread \
POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs

View File

@ -21,7 +21,7 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
[
case $1 in
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-elfiamcu | i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2010, 2011 Free Software Foundation, Inc.
dnl Copyright (C) 2010, 2011, 2015 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
@ -7,6 +7,8 @@ dnl the same distribution terms as the rest of that program.
dnl From Paolo Bonzini.
dnl Is this an ELF target supporting the LTO plugin?
dnl usage: ACX_ELF_TARGET_IFELSE([if-elf], [if-not-elf])
AC_DEFUN([ACX_ELF_TARGET_IFELSE], [
AC_REQUIRE([AC_CANONICAL_TARGET])
@ -15,7 +17,8 @@ target_elf=no
case $target in
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux*)
alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux* | \
nvptx-*-none)
target_elf=no
;;
*)

113
config/gcc-plugin.m4 Normal file
View File

@ -0,0 +1,113 @@
# gcc-plugin.m4 -*- Autoconf -*-
# Check whether GCC is able to be built with plugin support.
dnl Copyright (C) 2014 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# Check for plugin support.
# Respects --enable-plugin.
# Sets the shell variables enable_plugin and pluginlibs.
AC_DEFUN([GCC_ENABLE_PLUGINS],
[# Check for plugin support
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
enable_plugin=$enableval,
enable_plugin=yes; default_plugin=yes)
pluginlibs=
case "${host}" in
*-*-darwin*)
if test x$build = x$host; then
export_sym_check="nm${exeext} -g"
elif test x$host = x$target; then
export_sym_check="$gcc_cv_nm -g"
else
export_sym_check=
fi
;;
*)
if test x$build = x$host; then
export_sym_check="objdump${exeext} -T"
elif test x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
else
export_sym_check=
fi
;;
esac
if test x"$enable_plugin" = x"yes"; then
AC_MSG_CHECKING([for exported symbols])
if test "x$export_sym_check" != x; then
echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1
if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
: # No need to use a flag
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for -rdynamic])
${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1
if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
plugin_rdynamic=yes
pluginlibs="-rdynamic"
else
plugin_rdynamic=no
enable_plugin=no
fi
AC_MSG_RESULT([$plugin_rdynamic])
fi
else
AC_MSG_RESULT([unable to check])
fi
# Check -ldl
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([dlopen], [dl])
if test x"$ac_cv_search_dlopen" = x"-ldl"; then
pluginlibs="$pluginlibs -ldl"
fi
LIBS="$saved_LIBS"
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS"
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
CFLAGS="$CFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
AC_MSG_CHECKING([for -fPIC -shared])
AC_TRY_LINK(
[extern int X;],[return X == 0;],
[AC_MSG_RESULT([yes]); have_pic_shared=yes],
[AC_MSG_RESULT([no]); have_pic_shared=no])
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
pluginlibs=
enable_plugin=no
fi
LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
if test x"$default_plugin" != x"yes"; then
AC_MSG_ERROR([
Building GCC with plugin support requires a host that supports
-fPIC, -shared, -ldl and -rdynamic.])
fi
fi
fi
])

View File

@ -81,7 +81,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
@ -303,7 +303,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
dnl For backward compatibility. Some configure.ins may be using this.
dnl For backward compatibility. Some configure.acs may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=

View File

@ -7,6 +7,7 @@ dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl From Bruno Haible.
dnl with modifications to support building with in-tree libiconv
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
[
@ -28,24 +29,51 @@ AC_DEFUN([AM_ICONV_LINK],
dnl accordingly.
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
dnl Add $INCICONV to CPPFLAGS before performing the first check,
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. This first
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
am_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
CPPFLAGS="$am_save_CPPFLAGS"
if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
for _libs in .libs _libs; do
am_save_CPPFLAGS="$CPPFLAGS"
am_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS -I../libiconv/include"
LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
INCICONV="-I../libiconv/include"
LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
CPPFLAGS="$am_save_CPPFLAGS"
LIBS="$am_save_LIBS"
if test "$am_cv_func_iconv" = "yes"; then
break
fi
done
fi
if test "$am_cv_func_iconv" != yes; then
am_save_CPPFLAGS="$CPPFLAGS"
am_save_LIBS="$LIBS"
CPPFLAGS="$LIBS $INCICONV"
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
@ -54,6 +82,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
CPPFLAGS="$am_save_CPPFLAGS"
LIBS="$am_save_LIBS"
fi
])
@ -61,12 +90,10 @@ AC_DEFUN([AM_ICONV_LINK],
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([$LIBICONV])
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi

View File

@ -19,23 +19,23 @@
# ISL_INIT_FLAGS ()
# -------------------------
# Provide configure switches for ISL support.
# Provide configure switches for isl support.
# Initialize isllibs/islinc according to the user input.
AC_DEFUN([ISL_INIT_FLAGS],
[
AC_ARG_WITH([isl-include],
[AS_HELP_STRING(
[--with-isl-include=PATH],
[Specify directory for installed ISL include files])])
[Specify directory for installed isl include files])])
AC_ARG_WITH([isl-lib],
[AS_HELP_STRING(
[--with-isl-lib=PATH],
[Specify the directory for the installed ISL library])])
[Specify the directory for the installed isl library])])
AC_ARG_ENABLE(isl-version-check,
[AS_HELP_STRING(
[--disable-isl-version-check],
[disable check for ISL version])],
[disable check for isl version])],
ENABLE_ISL_CHECK=$enableval,
ENABLE_ISL_CHECK=yes)
@ -58,22 +58,24 @@ AC_DEFUN([ISL_INIT_FLAGS],
if test "x${with_isl_lib}" != x; then
isllibs="-L$with_isl_lib"
fi
dnl If no --with-isl flag was specified and there is in-tree ISL
dnl If no --with-isl flag was specified and there is in-tree isl
dnl source, set up flags to use that and skip any version tests
dnl as we cannot run them before building ISL.
dnl as we cannot run them before building isl.
if test "x${islinc}" = x && test "x${isllibs}" = x \
&& test -d ${srcdir}/isl; then
isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
ENABLE_ISL_CHECK=no
AC_MSG_WARN([using in-tree ISL, disabling version check])
AC_MSG_WARN([using in-tree isl, disabling version check])
fi
isllibs="${isllibs} -lisl"
]
)
# ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
# ----------------------------------------------------
# Provide actions for failed ISL detection.
# Provide actions for failed isl detection.
AC_DEFUN([ISL_REQUESTED],
[
AC_REQUIRE([ISL_INIT_FLAGS])
@ -90,20 +92,9 @@ AC_DEFUN([ISL_REQUESTED],
]
)
# _ISL_CHECK_CT_PROG(MAJOR, MINOR)
# --------------------------------------------
# Helper for verifying ISL compile time version.
m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
[#include <isl/version.h>
#include <string.h>],
[if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0)
return 1;
])])
# ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR)
# ISL_CHECK_VERSION ISL_CHECK_VERSION ()
# ----------------------------------------------------------------
# Test the found ISL to be exact of version MAJOR.MINOR and at least
# REVISION.
# Test whether isl contains functionality added to the minimum expected version.
AC_DEFUN([ISL_CHECK_VERSION],
[
if test "${ENABLE_ISL_CHECK}" = yes ; then
@ -112,16 +103,32 @@ AC_DEFUN([ISL_CHECK_VERSION],
_isl_saved_LIBS=$LIBS
CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
LIBS="${_isl_saved_LIBS} -lisl"
LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
LIBS="${_isl_saved_LIBS} -lisl -lgmp"
AC_MSG_CHECKING([for version $1.$2 of ISL])
AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
[gcc_cv_isl=yes],
[gcc_cv_isl=no],
[gcc_cv_isl=yes])
AC_MSG_CHECKING([for isl 0.16, 0.15, or deprecated 0.14])
AC_TRY_LINK([#include <isl/ctx.h>],
[isl_ctx_get_max_operations (isl_ctx_alloc ());],
[gcc_cv_isl=yes],
[gcc_cv_isl=no])
AC_MSG_RESULT([$gcc_cv_isl])
if test "${gcc_cv_isl}" = no ; then
AC_MSG_RESULT([recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated])
fi
AC_MSG_CHECKING([for isl 0.16 or 0.15])
AC_TRY_LINK([#include <isl/schedule.h>],
[isl_options_set_schedule_serialize_sccs (NULL, 0);],
[ac_has_isl_options_set_schedule_serialize_sccs=yes],
[ac_has_isl_options_set_schedule_serialize_sccs=no])
AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
islver="0.15"
AC_SUBST([islver])
fi
CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS

3
config/mh-alpha-linux Normal file
View File

@ -0,0 +1,3 @@
# Prevent GPREL16 relocation truncation
LDFLAGS += -Wl,--no-relax
BOOT_LDFLAGS += -Wl,--no-relax

View File

@ -1,18 +1,29 @@
# The -mdynamic-no-pic ensures that the compiler executable is built without
# position-independent-code -- the usual default on Darwin. This fix speeds
# compiles by 3-5%.
BOOT_CFLAGS += \
# compiles by 3-5%. Don't add it if the compiler doesn't also support
# -mno-dynamic-no-pic to undo it.
DARWIN_MDYNAMIC_NO_PIC := \
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
echo -mdynamic-no-pic ;; esac;`
$(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
&& echo -mdynamic-no-pic ;; esac`
DARWIN_GCC_MDYNAMIC_NO_PIC := \
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
$(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
|| echo -mdynamic-no-pic ;; esac`
# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
# gcc components, since it is incompatible with our pch implementation.
BOOT_LDFLAGS += \
`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
BOOT_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
BOOT_LDFLAGS += $(DARWIN_NO_PIE)
# Similarly, for cross-compilation.
STAGE1_CFLAGS += \
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*)\
echo -mdynamic-no-pic ;; esac;`
STAGE1_LDFLAGS += \
`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
STAGE1_LDFLAGS += $(DARWIN_NO_PIE)
# Without -mno-dynamic-no-pic support, add -mdynamic-no-pic just to later
# stages when we know it is built with gcc.
STAGE2_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
STAGE3_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
STAGE4_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)

View File

@ -1 +1 @@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE

View File

@ -1,3 +1,3 @@
# Build libraries optimizing for space, not speed.
CFLAGS_FOR_TARGET = -g -Os
CXXFLAGS_FOR_TARGET = -g -Os
CFLAGS_FOR_TARGET += -g -Os
CXXFLAGS_FOR_TARGET += -g -Os

View File

@ -7,9 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [
case "${$2}" in
# PIC is the default on some targets or must not be used.
*-*-darwin*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
$1=-fno-common
# For darwin, common symbols are not allowed in MH_DYLIB files
case "${CFLAGS}" in
# If we are using a compiler supporting mdynamic-no-pic
# and the option has been tested as safe to add, then cancel
# it here, since the code generated is incompatible with shared
# libs.
*-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;;
*) $1=-fno-common ;;
esac
;;
alpha*-dec-osf5*)
# PIC is the default.
@ -50,9 +56,6 @@ case "${$2}" in
i[[34567]]86-*-* | x86_64-*-*)
$1=-fpic
;;
m68k-*-*)
$1=-fpic
;;
# FIXME: Override -fPIC default in libgcc only?
sh-*-linux* | sh[[2346lbe]]*-*-linux*)
$1=-fpic

View File

@ -1,11 +1,21 @@
AC_DEFUN([AC_PLUGINS],
[
AC_ARG_ENABLE([plugins],
AS_HELP_STRING([--enable-plugins], [Enable support for plugins (defaults no)]),
[case "${enableval}" in
yes | "") plugins=yes ;;
no) plugins=no ;;
*) plugins=yes ;;
esac],
[plugins=no])
maybe_plugins=no
AC_CHECK_HEADERS([dlfcn.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([windows.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
AC_ARG_ENABLE([plugins],
AS_HELP_STRING([--enable-plugins], [Enable support for plugins]),
[case "${enableval}" in
no) plugins=no ;;
*) plugins=yes
if test "$maybe_plugins" != "yes" ; then
AC_MSG_ERROR([Building with plugin support requires a host that supports dlopen.])
fi ;;
esac],
[plugins=$maybe_plugins]
)
if test "$plugins" = "yes"; then
AC_SEARCH_LIBS([dlopen], [dl])
fi
])

View File

@ -117,14 +117,14 @@ AC_DEFUN([AM_PO_SUBDIRS],
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
if test -n "$OBSOLETE_ALL_LINGUAS"; then
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
# Hide the ALL_LINGUAS assigment from automake.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# The set of available languages was given in configure.in.
# The set of available languages was given in configure.ac.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
case "$ac_given_srcdir" in

12
config/sjlj.m4 Normal file
View File

@ -0,0 +1,12 @@
dnl Check if the compiler is configured for setjmp/longjmp exceptions.
AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS],
[AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp exceptions],
ac_cv_sjlj_exceptions,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifdef __USING_SJLJ_EXCEPTIONS__
this will fail
#endif]],
[[int i;]])],
[ac_cv_sjlj_exceptions=no],
[ac_cv_sjlj_exceptions=yes])])])

View File

@ -39,7 +39,7 @@ dnl If your installed header files require the stdint-types you will want to
dnl create an installable file mylib-int.h that all your other installable
dnl header may include. So, for a library package named "mylib", just use
dnl GCC_HEADER_STDINT(mylib-int.h)
dnl in configure.in and install that header file in Makefile.am along with
dnl in configure.ac and install that header file in Makefile.am along with
dnl the other headers (mylib.h). The mylib-specific headers can simply
dnl use "#include <mylib-int.h>" to obtain the stdint-types.
dnl

12
config/target-posix Normal file
View File

@ -0,0 +1,12 @@
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
;;
*-*-solaris2* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
;;
*)
UNSUPPORTED=1 ;;
esac

View File

@ -2136,7 +2136,7 @@ dnl # preprocessing tests use only CPPFLAGS.
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
fi
dnl Not at all clear what this was doing in Tcl's configure.in
dnl Not at all clear what this was doing in Tcl's configure.ac
dnl or why it was needed was needed. In any event, this sort of
dnl things needs to be done in the big loop above.
dnl REMOVE THIS BLOCK LATER! (mdejong)
@ -3235,7 +3235,7 @@ AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
# created. Accumulates.
#
# Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
# of configure.in (right before AC_OUTPUT).
# of configure.ac (right before AC_OUTPUT).
#
#--------------------------------------------------------------------

View File

@ -18,11 +18,12 @@
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS])
# Sets @VARIABLE@ to the subset of the given options which the
# compiler accepts.
AC_DEFUN([ACX_PROG_CC_WARNING_OPTS],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@ -48,6 +49,7 @@ for real_option in $1; do
done
CFLAGS="$save_CFLAGS"
m4_popdef([acx_Var])dnl
AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_OPTS
# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl
# and accepts all of those options simultaneously, otherwise to nothing.
AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
AS_VAR_POPDEF([acx_Pedantic])dnl
m4_popdef([acx_Woptions])dnl
m4_popdef([acx_Var])dnl
AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
AS_VAR_POPDEF([acx_GCCvers])])
m4_popdef([acx_Var])dnl
AC_LANG_POP(C)
])# ACX_PROG_CC_WARNINGS_ARE_ERRORS
# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CXXFLAGS])
# Sets @VARIABLE@ to the subset of the given options which the
# compiler accepts.
AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_LANG_PUSH(C++)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
],m4_quote(acx_Var=))dnl
save_CXXFLAGS="$CXXFLAGS"
for real_option in $1; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
case $real_option in
-Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
*) option=$real_option ;;
esac
AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption,
[CXXFLAGS="$option"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[AS_VAR_SET(acx_Woption, yes)],
[AS_VAR_SET(acx_Woption, no)])
])
AS_IF([test AS_VAR_GET(acx_Woption) = yes],
[acx_Var="$acx_Var${acx_Var:+ }$real_option"])
AS_VAR_POPDEF([acx_Woption])dnl
done
CXXFLAGS="$save_CXXFLAGS"
m4_popdef([acx_Var])dnl
AC_LANG_POP(C++)
])# ACX_PROG_CXX_WARNING_OPTS
# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
# Append to VARIABLE "-pedantic" + the argument, if the compiler is G++
# and accepts all of those options simultaneously, otherwise to nothing.
AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_LANG_PUSH(C++)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
],m4_quote(acx_Var=))dnl
# Do the check with the no- prefix removed from the warning options
# since gcc silently accepts any -Wno-* option on purpose
m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl
AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl
AS_IF([test "$GXX" = yes],
[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic,
[save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-pedantic acx_Woptions"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[AS_VAR_SET(acx_Pedantic, yes)],
[AS_VAR_SET(acx_Pedantic, no)])
CXXFLAGS="$save_CXXFLAGS"])
AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
[acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
])
AS_VAR_POPDEF([acx_Pedantic])dnl
m4_popdef([acx_Woptions])dnl
m4_popdef([acx_Var])dnl
AC_LANG_POP(C++)
])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC
# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
# sets @VARIABLE@ to "-Werror" if the compiler is G++ >=x.y.z, or if
# --enable-werror-always was given on the command line, otherwise
# to nothing.
# If the argument is the word "manual" instead of a version number,
# then @VARIABLE@ will be set to -Werror only if --enable-werror-always
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_LANG_PUSH(C++)
m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
],m4_quote(acx_Var=))dnl
AC_ARG_ENABLE(werror-always,
AS_HELP_STRING([--enable-werror-always],
[enable -Werror despite compiler version]),
[], [enable_werror_always=no])
AS_IF([test $enable_werror_always = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
m4_if($1, [manual],,
[AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl
AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers,
[set fnord `echo $1 | tr '.' ' '`
shift
AC_PREPROC_IFELSE(
[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \
< [$]1 * 10000 + [$]2 * 100 + [$]3
#error insufficient
#endif],
[AS_VAR_SET(acx_GXXvers, yes)],
[AS_VAR_SET(acx_GXXvers, no)])])
AS_IF([test AS_VAR_GET(acx_GXXvers) = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
AS_VAR_POPDEF([acx_GXXvers])])
m4_popdef([acx_Var])dnl
AC_LANG_POP(C++)
])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS

View File

@ -1,18 +1,19 @@
dnl A function to check for zlib availability. zlib is used by default
dnl unless the user configured with --disable-nls.
dnl A function to check if the system's zlib library should be used. The
dnl builtin zlib dnl is used by default unless the user configured with
dnl --with-system-zlib.
AC_DEFUN([AM_ZLIB],
[
# See if the user specified whether he wants zlib support or not.
AC_ARG_WITH(zlib,
[ --with-zlib include zlib support (auto/yes/no) [default=auto]],
[], [with_zlib=auto])
if test "$with_zlib" != "no"; then
AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
AC_MSG_ERROR([zlib (libz) library was explicitly requested but not found])
fi
# Use the system's zlib library.
zlibdir="-L\$(top_builddir)/../zlib"
zlibinc="-I\$(top_srcdir)/../zlib"
AC_ARG_WITH(system-zlib,
[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
if test x$with_system_zlib = xyes ; then
zlibdir=
zlibinc=
fi
)
AC_SUBST(zlibdir)
AC_SUBST(zlibinc)
])

1327
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

538
depcomp
View File

@ -1,10 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@ -40,11 +39,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@ -57,6 +56,66 @@ EOF
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@ -80,18 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
@ -114,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@ -123,13 +198,17 @@ gcc3)
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@ -137,31 +216,31 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well.
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -172,59 +251,21 @@ hp)
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@ -237,9 +278,7 @@ aix)
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@ -248,44 +287,100 @@ aix)
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@ -297,8 +392,8 @@ icc)
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -309,9 +404,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@ -322,8 +416,7 @@ hp2)
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@ -333,77 +426,107 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
@ -422,7 +545,7 @@ dashmstdout)
shift
fi
# Remove `-o $object'.
# Remove '-o $object'.
IFS=" "
for arg
do
@ -442,18 +565,18 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -503,12 +626,15 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@ -525,7 +651,7 @@ cpp)
shift
fi
# Remove `-o $object'.
# Remove '-o $object'.
IFS=" "
for arg
do
@ -544,10 +670,10 @@ cpp)
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@ -579,23 +705,23 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;

View File

@ -1,3 +1,155 @@
2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
* gomp-constants.h (enum gomp_map_kind): Rename
GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE. Adjust all users.
2016-03-03 Than McIntosh <thanm@google.com>
* plugin-api.h: Add new hooks to the plugin transfer vector to
to support querying section alignment and section size.
(ld_plugin_get_input_section_alignment): New hook.
(ld_plugin_get_input_section_size): New hook.
(ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT
and LDPT_GET_INPUT_SECTION_SIZE.
(ld_plugin_tv): Add tv_get_input_section_alignment and
tv_get_input_section_size.
2016-03-03 Evgenii Stepanov <eugenis@google.com>
* plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3.
2016-01-19 Martin Jambor <mjambor@suse.cz>
* gomp-constants.h (GOMP_DEVICE_HSA): New macro.
(GOMP_VERSION_HSA): Likewise.
(GOMP_TARGET_ARG_DEVICE_MASK): Likewise.
(GOMP_TARGET_ARG_DEVICE_ALL): Likewise.
(GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise.
(GOMP_TARGET_ARG_ID_MASK): Likewise.
(GOMP_TARGET_ARG_NUM_TEAMS): Likewise.
(GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
(GOMP_TARGET_ARG_VALUE_SHIFT): Likewise.
(GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise.
2016-01-07 Mike Frysinger <vapier@gentoo.org>
* longlong.h: Change !__SHMEDIA__ to
(!defined (__SHMEDIA__) || !__SHMEDIA__).
Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__.
2016-01-05 Mike Frysinger <vapier@gentoo.org>
* libiberty.h (dupargv): Change arg to char * const *.
(writeargv, countargv): Likewise.
2015-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
__sparc__]: Define.
2015-11-12 James Norris <jnorris@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT
and GOMP_MAP_LINK.
2015-11-09 Alan Modra <amodra@gmail.com>
PR gdb/17133
* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
2015-11-09 Alan Modra <amodra@gmail.com>
PR gdb/17133
* obstack.h: Import current gnulib file.
2015-11-05 Jakub Jelinek <jakub@redhat.com>
Ilya Verbin <ilya.verbin@intel.com>
* gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_2): Define.
(GOMP_MAP_FLAG_ALWAYS): Remove.
(enum gomp_map_kind): Use GOMP_MAP_FLAG_SPECIAL_2 instead of
GOMP_MAP_FLAG_ALWAYS for GOMP_MAP_ALWAYS_TO, GOMP_MAP_ALWAYS_FROM,
GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT, GOMP_MAP_RELEASE.
Add GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
(GOMP_MAP_ALWAYS_P): Define.
(GOMP_TARGET_FLAG_NOWAIT): Adjust comment.
2015-10-27 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com>
Rich Felker <dalias@libc.org>
* longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH.
2015-10-18 Roland McGrath <roland@gnu.org>
PR other/63758
* environ.h: New file.
2015-10-13 Jakub Jelinek <jakub@redhat.com>
Ilya Verbin <ilya.verbin@intel.com>
* gomp-constants.h (GOMP_MAP_FLAG_ALWAYS): Define.
(enum gomp_map_kind): Add GOMP_MAP_FIRSTPRIVATE,
GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_USE_DEVICE_PTR,
GOMP_MAP_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_ALWAYS_TO,
GOMP_MAP_ALWAYS_FROM, GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT,
GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_DELETE,
GOMP_MAP_RELEASE, GOMP_MAP_FIRSTPRIVATE_POINTER.
(GOMP_MAP_ALWAYS_TO_P, GOMP_MAP_ALWAYS_FROM_P): Define.
(GOMP_TASK_FLAG_UNTIED, GOMP_TASK_FLAG_FINAL, GOMP_TASK_FLAG_MERGEABLE,
GOMP_TASK_FLAG_DEPEND, GOMP_TASK_FLAG_PRIORITY, GOMP_TASK_FLAG_UP,
GOMP_TASK_FLAG_GRAINSIZE, GOMP_TASK_FLAG_IF, GOMP_TASK_FLAG_NOGROUP,
GOMP_TARGET_FLAG_NOWAIT, GOMP_TARGET_FLAG_EXIT_DATA,
GOMP_TARGET_FLAG_UPDATE): Define.
2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
* gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment.
(GOMP_DIM_GANG, GOMP_DIM_WORKER, GOMP_DIM_VECTOR, GOMP_DIM_MAX,
GOMP_DIM_MASK): New.
(GOMP_LAUNCH_DIM, GOMP_LAUNCH_ASYNC, GOMP_LAUNCH_WAIT): New.
(GOMP_LAUNCH_CODE_SHIFT, GOMP_LAUNCH_DEVICE_SHIFT,
GOMP_LAUNCH_OP_SHIFT): New.
(GOMP_LAUNCH_PACK, GOMP_LAUNCH_CODE, GOMP_LAUNCH_DEVICE,
GOMP_LAUNCH_OP): New.
(GOMP_LAUNCH_OP_MAX): New.
2015-08-24 Nathan Sidwell <nathan@codesourcery.com>
* gomp-constants.h (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX,
GOMP_VERSION_INTEL_MIC): New.
(GOMP_VERSION_PACK, GOMP_VERSION_LIB, GOMP_VERSION_DEV): New.
2015-08-14 Pierre-Marie de Rodat <derodat@adacore.com>
* dwarf2.def (DW_AT_GNU_bias): New attribute.
2015-08-14 Pierre-Marie de Rodat <derodat@adacore.com>
* dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New
attributes.
2015-08-11 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* ansidecl.h (GCC_FINAL): New macro.
2015-08-10 Thomas Schwinge <thomas@codesourcery.com>
* gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove.
2015-05-22 Yunlian Jiang <yunlian@google.com>
* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
not defined.
2015-03-19 Richard Biener <rguenther@suse.de>
* partition.h (struct partition_elem): Re-order elements to
avoid padding.
2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
PR target/65261
@ -18,7 +170,7 @@
* gomp-constants.h: New file.
2015-12-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
2014-12-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* libiberty.h: Merge Copyright year update from Binutils.
@ -62,15 +214,16 @@
(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
(DW_AT_APPLE_property): New macros.
2014-11-11 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: New.
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
2014-11-11 Anthony Brandon <anthony.brandon@gmail.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR driver/36312
* filenames.h: Add prototype for canonical_filename_eq.
2014-11-11 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: New.
2014-10-28 Richard Henderson <rth@redhat.com>
* longlong.h [__alpha] (umul_ppmm): Disable for c++.

View File

@ -2674,12 +2674,6 @@ Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
to reflect reality as I know it.
Copyright (C) 1993-2003 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Local Variables:
mode: change-log
left-margin: 8

11
include/ChangeLog.jit Normal file
View File

@ -0,0 +1,11 @@
2014-09-25 David Malcolm <dmalcolm@redhat.com>
* libiberty.h (choose_tmpdir): New prototype.
* ChangeLog.jit: New.
Copyright (C) 2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,7 +1,5 @@
/* ANSI and traditional C compatability macros
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2013
Free Software Foundation, Inc.
Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@ -313,6 +311,15 @@ So instead we use the macro below and test it against specific values. */
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
#else
#define ENUM_BITFIELD(TYPE) unsigned int
#endif
/* This is used to mark a class or virtual function as final. */
#if __cplusplus >= 201103L
#define GCC_FINAL final
#elif GCC_VERSION >= 4007
#define GCC_FINAL __final
#else
#define GCC_FINAL
#endif
#ifdef __cplusplus

View File

@ -1,7 +1,6 @@
/* Defs for interface to demanglers.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 1992-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2, or
@ -144,10 +143,10 @@ cplus_mangle_opname (const char *opname, int options);
extern void
set_cplus_marker_for_demangling (int ch);
extern enum demangling_styles
extern enum demangling_styles
cplus_demangle_set_style (enum demangling_styles style);
extern enum demangling_styles
extern enum demangling_styles
cplus_demangle_name_to_style (const char *name);
/* Callback typedef for allocation-less demangler interfaces. */
@ -380,6 +379,10 @@ enum demangle_component_type
/* A typecast, represented as a unary operator. The one subtree is
the type to which the argument should be cast. */
DEMANGLE_COMPONENT_CAST,
/* A conversion operator, represented as a unary operator. The one
subtree is the type to which the argument should be converted
to. */
DEMANGLE_COMPONENT_CONVERSION,
/* A nullary expression. The left subtree is the operator. */
DEMANGLE_COMPONENT_NULLARY,
/* A unary expression. The left subtree is the operator, and the
@ -443,6 +446,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_PACK_EXPANSION,
/* A name with an ABI tag. */
DEMANGLE_COMPONENT_TAGGED_NAME,
/* A transaction-safe function type. */
DEMANGLE_COMPONENT_TRANSACTION_SAFE,
/* A cloned function. */
DEMANGLE_COMPONENT_CLONE
};

View File

@ -1,9 +1,7 @@
/* -*- c -*-
Declarations and definitions of codes relating to the DWARF2 and
DWARF3 symbolic debugging information formats.
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright (C) 1992-2015 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State University and Silicon Graphics Inc.
@ -406,6 +404,13 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */
DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
/* Rational constant extension.
See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator . */
DW_TAG (DW_AT_GNU_numerator, 0x2303)
DW_TAG (DW_AT_GNU_denominator, 0x2304)
/* Biased integer extension.
See https://gcc.gnu.org/wiki/DW_AT_GNU_bias . */
DW_TAG (DW_AT_GNU_bias, 0x2305)
/* UPC extension. */
DW_AT (DW_AT_upc_threads_scaled, 0x3210)
/* PGI (STMicroelectronics) extensions. */

View File

@ -1,8 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 and
DWARF3 symbolic debugging information formats.
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright (C) 1992-2015 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State University and Silicon Graphics Inc.

View File

@ -1,6 +1,5 @@
/* An abstract string datatype.
Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005, 2009
Free Software Foundation, Inc.
Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.

33
include/environ.h Normal file
View File

@ -0,0 +1,33 @@
/* Declare the environ system variable.
Copyright (C) 2015 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
Libiberty 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
/* On OSX, the environ variable can be used directly in the code of an
executable, but cannot be used in the code of a shared library (such as
GCC's liblto_plugin, which links in libiberty code). Instead, the
function _NSGetEnviron can be called to get the address of environ. */
#ifndef HAVE_ENVIRON_DECL
# ifdef __APPLE__
# include <crt_externs.h>
# define environ (*_NSGetEnviron ())
# else
extern char **environ;
# endif
# define HAVE_ENVIRON_DECL
#endif

View File

@ -1,6 +1,5 @@
/* A Fibonacci heap datatype.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009
Free Software Foundation, Inc.
Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Daniel Berlin (dan@cgsoftware.com).
This file is part of GCC.

View File

@ -5,7 +5,7 @@
use forward- and back-slash in path names interchangeably, and
some of them have case-insensitive file names.
Copyright 2000, 2001, 2007, 2010 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.

View File

@ -1,6 +1,5 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
Copyright 1991, 1994, 1995, 1997, 2000, 2003, 2005, 2010
Free Software Foundation, Inc.
Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of GDB.

View File

@ -1,4 +1,4 @@
/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.

View File

@ -1,6 +1,6 @@
/* Interface between GCC C FE and GDB -*- c -*-
Copyright (C) 2014 Free Software Foundation, Inc.
Copyright (C) 2014-2015 Free Software Foundation, Inc.
This file is part of GCC.

View File

@ -1,6 +1,6 @@
/* Interface between GCC C FE and GDB
Copyright (C) 2014 Free Software Foundation, Inc.
Copyright (C) 2014-2015 Free Software Foundation, Inc.
This file is part of GCC.

View File

@ -1,6 +1,6 @@
/* Generic interface between GCC and GDB
Copyright (C) 2014 Free Software Foundation, Inc.
Copyright (C) 2014-2015 Free Software Foundation, Inc.
This file is part of GCC.

View File

@ -1,5 +1,5 @@
/* Public attributes of the .gdb_index section.
Copyright 2012 Free Software Foundation, Inc.
Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of GDB.

View File

@ -1,6 +1,5 @@
/* Declarations for getopt.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000,
2002 Free Software Foundation, Inc.
Copyright (C) 1989-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.

View File

@ -39,6 +39,7 @@
/* Special map kinds, enumerated starting here. */
#define GOMP_MAP_FLAG_SPECIAL_0 (1 << 2)
#define GOMP_MAP_FLAG_SPECIAL_1 (1 << 3)
#define GOMP_MAP_FLAG_SPECIAL_2 (1 << 4)
#define GOMP_MAP_FLAG_SPECIAL (GOMP_MAP_FLAG_SPECIAL_1 \
| GOMP_MAP_FLAG_SPECIAL_0)
/* Flag to force a specific behavior (or else, trigger a run-time error). */
@ -66,10 +67,28 @@ enum gomp_map_kind
/* Must already be present. */
GOMP_MAP_FORCE_PRESENT = (GOMP_MAP_FLAG_SPECIAL_0 | 2),
/* Deallocate a mapping, without copying from device. */
GOMP_MAP_FORCE_DEALLOC = (GOMP_MAP_FLAG_SPECIAL_0 | 3),
GOMP_MAP_DELETE = (GOMP_MAP_FLAG_SPECIAL_0 | 3),
/* Is a device pointer. OMP_CLAUSE_SIZE for these is unused; is implicitly
POINTER_SIZE_UNITS. */
GOMP_MAP_FORCE_DEVICEPTR = (GOMP_MAP_FLAG_SPECIAL_1 | 0),
/* Do not map, copy bits for firstprivate instead. */
/* OpenACC device_resident. */
GOMP_MAP_DEVICE_RESIDENT = (GOMP_MAP_FLAG_SPECIAL_1 | 1),
/* OpenACC link. */
GOMP_MAP_LINK = (GOMP_MAP_FLAG_SPECIAL_1 | 2),
/* Allocate. */
GOMP_MAP_FIRSTPRIVATE = (GOMP_MAP_FLAG_SPECIAL | 0),
/* Similarly, but store the value in the pointer rather than
pointed by the pointer. */
GOMP_MAP_FIRSTPRIVATE_INT = (GOMP_MAP_FLAG_SPECIAL | 1),
/* Pointer translate host address into device address and copy that
back to host. */
GOMP_MAP_USE_DEVICE_PTR = (GOMP_MAP_FLAG_SPECIAL | 2),
/* Allocate a zero length array section. Prefer next non-zero length
mapping over previous non-zero length mapping over zero length mapping
at the address. If not already mapped, do nothing (and pointer translate
to NULL). */
GOMP_MAP_ZERO_LEN_ARRAY_SECTION = (GOMP_MAP_FLAG_SPECIAL | 3),
/* Allocate. */
GOMP_MAP_FORCE_ALLOC = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_ALLOC),
/* ..., and copy to device. */
@ -77,7 +96,44 @@ enum gomp_map_kind
/* ..., and copy from device. */
GOMP_MAP_FORCE_FROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_FROM),
/* ..., and copy to and from device. */
GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM)
GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM),
/* If not already present, allocate. And unconditionally copy to
device. */
GOMP_MAP_ALWAYS_TO = (GOMP_MAP_FLAG_SPECIAL_2 | GOMP_MAP_TO),
/* If not already present, allocate. And unconditionally copy from
device. */
GOMP_MAP_ALWAYS_FROM = (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_FROM),
/* If not already present, allocate. And unconditionally copy to and from
device. */
GOMP_MAP_ALWAYS_TOFROM = (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_TOFROM),
/* Map a sparse struct; the address is the base of the structure, alignment
it's required alignment, and size is the number of adjacent entries
that belong to the struct. The adjacent entries should be sorted by
increasing address, so it is easy to determine lowest needed address
(address of the first adjacent entry) and highest needed address
(address of the last adjacent entry plus its size). */
GOMP_MAP_STRUCT = (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_FLAG_SPECIAL | 0),
/* On a location of a pointer/reference that is assumed to be already mapped
earlier, store the translated address of the preceeding mapping.
No refcount is bumped by this, and the store is done unconditionally. */
GOMP_MAP_ALWAYS_POINTER = (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_FLAG_SPECIAL | 1),
/* Forced deallocation of zero length array section. */
GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION
= (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_FLAG_SPECIAL | 3),
/* Decrement usage count and deallocate if zero. */
GOMP_MAP_RELEASE = (GOMP_MAP_FLAG_SPECIAL_2
| GOMP_MAP_DELETE),
/* Internal to GCC, not used in libgomp. */
/* Do not map, but pointer assign a pointer instead. */
GOMP_MAP_FIRSTPRIVATE_POINTER = (GOMP_MAP_LAST | 1),
/* Do not map, but pointer assign a reference instead. */
GOMP_MAP_FIRSTPRIVATE_REFERENCE = (GOMP_MAP_LAST | 2)
};
#define GOMP_MAP_COPY_TO_P(X) \
@ -91,6 +147,15 @@ enum gomp_map_kind
#define GOMP_MAP_POINTER_P(X) \
((X) == GOMP_MAP_POINTER)
#define GOMP_MAP_ALWAYS_TO_P(X) \
(((X) == GOMP_MAP_ALWAYS_TO) || ((X) == GOMP_MAP_ALWAYS_TOFROM))
#define GOMP_MAP_ALWAYS_FROM_P(X) \
(((X) == GOMP_MAP_ALWAYS_FROM) || ((X) == GOMP_MAP_ALWAYS_TOFROM))
#define GOMP_MAP_ALWAYS_P(X) \
(GOMP_MAP_ALWAYS_TO_P (X) || ((X) == GOMP_MAP_ALWAYS_FROM))
/* Asynchronous behavior. Keep in sync with
libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_async_t. */
@ -101,16 +166,92 @@ enum gomp_map_kind
/* Device codes. Keep in sync with
libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_device_t as well as
libgomp/libgomp_target.h. */
libgomp/libgomp-plugin.h. */
#define GOMP_DEVICE_NONE 0
#define GOMP_DEVICE_DEFAULT 1
#define GOMP_DEVICE_HOST 2
#define GOMP_DEVICE_HOST_NONSHM 3
/* #define GOMP_DEVICE_HOST_NONSHM 3 removed. */
#define GOMP_DEVICE_NOT_HOST 4
#define GOMP_DEVICE_NVIDIA_PTX 5
#define GOMP_DEVICE_INTEL_MIC 6
#define GOMP_DEVICE_HSA 7
#define GOMP_DEVICE_ICV -1
#define GOMP_DEVICE_HOST_FALLBACK -2
/* GOMP_task/GOMP_taskloop* flags argument. */
#define GOMP_TASK_FLAG_UNTIED (1 << 0)
#define GOMP_TASK_FLAG_FINAL (1 << 1)
#define GOMP_TASK_FLAG_MERGEABLE (1 << 2)
#define GOMP_TASK_FLAG_DEPEND (1 << 3)
#define GOMP_TASK_FLAG_PRIORITY (1 << 4)
#define GOMP_TASK_FLAG_UP (1 << 8)
#define GOMP_TASK_FLAG_GRAINSIZE (1 << 9)
#define GOMP_TASK_FLAG_IF (1 << 10)
#define GOMP_TASK_FLAG_NOGROUP (1 << 11)
/* GOMP_target{_ext,update_ext,enter_exit_data} flags argument. */
#define GOMP_TARGET_FLAG_NOWAIT (1 << 0)
#define GOMP_TARGET_FLAG_EXIT_DATA (1 << 1)
/* Internal to libgomp. */
#define GOMP_TARGET_FLAG_UPDATE (1U << 31)
/* Versions of libgomp and device-specific plugins. */
#define GOMP_VERSION 0
#define GOMP_VERSION_NVIDIA_PTX 1
#define GOMP_VERSION_INTEL_MIC 0
#define GOMP_VERSION_HSA 0
#define GOMP_VERSION_PACK(LIB, DEV) (((LIB) << 16) | (DEV))
#define GOMP_VERSION_LIB(PACK) (((PACK) >> 16) & 0xffff)
#define GOMP_VERSION_DEV(PACK) ((PACK) & 0xffff)
#define GOMP_DIM_GANG 0
#define GOMP_DIM_WORKER 1
#define GOMP_DIM_VECTOR 2
#define GOMP_DIM_MAX 3
#define GOMP_DIM_MASK(X) (1u << (X))
/* Varadic launch arguments. End of list is marked by a zero. */
#define GOMP_LAUNCH_DIM 1 /* Launch dimensions, op = mask */
#define GOMP_LAUNCH_ASYNC 2 /* Async, op = cst val if not MAX */
#define GOMP_LAUNCH_WAIT 3 /* Waits, op = num waits. */
#define GOMP_LAUNCH_CODE_SHIFT 28
#define GOMP_LAUNCH_DEVICE_SHIFT 16
#define GOMP_LAUNCH_OP_SHIFT 0
#define GOMP_LAUNCH_PACK(CODE,DEVICE,OP) \
(((CODE) << GOMP_LAUNCH_CODE_SHIFT) \
| ((DEVICE) << GOMP_LAUNCH_DEVICE_SHIFT) \
| ((OP) << GOMP_LAUNCH_OP_SHIFT))
#define GOMP_LAUNCH_CODE(X) (((X) >> GOMP_LAUNCH_CODE_SHIFT) & 0xf)
#define GOMP_LAUNCH_DEVICE(X) (((X) >> GOMP_LAUNCH_DEVICE_SHIFT) & 0xfff)
#define GOMP_LAUNCH_OP(X) (((X) >> GOMP_LAUNCH_OP_SHIFT) & 0xffff)
#define GOMP_LAUNCH_OP_MAX 0xffff
/* Bitmask to apply in order to find out the intended device of a target
argument. */
#define GOMP_TARGET_ARG_DEVICE_MASK ((1 << 7) - 1)
/* The target argument is significant for all devices. */
#define GOMP_TARGET_ARG_DEVICE_ALL 0
/* Flag set when the subsequent element in the device-specific argument
values. */
#define GOMP_TARGET_ARG_SUBSEQUENT_PARAM (1 << 7)
/* Bitmask to apply to a target argument to find out the value identifier. */
#define GOMP_TARGET_ARG_ID_MASK (((1 << 8) - 1) << 8)
/* Target argument index of NUM_TEAMS. */
#define GOMP_TARGET_ARG_NUM_TEAMS (1 << 8)
/* Target argument index of THREAD_LIMIT. */
#define GOMP_TARGET_ARG_THREAD_LIMIT (2 << 8)
/* If the value is directly embeded in target argument, it should be a 16-bit
at most and shifted by this many bits. */
#define GOMP_TARGET_ARG_VALUE_SHIFT 16
/* HSA specific data structures. */
/* Identifiers of device-specific target arguments. */
#define GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES (1 << 8)
#endif

View File

@ -1,6 +1,5 @@
/* An expandable hash tables datatype.
Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2009, 2010
Free Software Foundation, Inc.
Copyright (C) 1999-2015 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Utilities for reading leb128 values.
Copyright (C) 2012 Free Software Foundation, Inc.
Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or

View File

@ -80,7 +80,7 @@ extern void freeargv (char **);
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
extern char **dupargv (char **) ATTRIBUTE_MALLOC;
extern char **dupargv (char * const *) ATTRIBUTE_MALLOC;
/* Expand "@file" arguments in argv. */
@ -88,11 +88,11 @@ extern void expandargv (int *, char ***);
/* Write argv to an @-file, inserting necessary quoting. */
extern int writeargv (char **, FILE *);
extern int writeargv (char * const *, FILE *);
/* Return the number of elements in argv. */
extern int countargv (char**);
extern int countargv (char * const *);
/* Return the last component of a path name. Note that we can't use a
prototype here because the parameter is declared inconsistently
@ -621,7 +621,7 @@ extern int pexecute (const char *, char * const *, const char *,
extern int pwait (int, int *, int);
#if !HAVE_DECL_ASPRINTF
#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */

View File

@ -1,5 +1,5 @@
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
Copyright (C) 1991-2014 Free Software Foundation, Inc.
Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@ -1086,7 +1086,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
} while (0)
#endif
#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32
#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
#ifndef __sh1__
#define umul_ppmm(w1, w0, u, v) \
__asm__ ( \
@ -1102,6 +1102,33 @@ extern UDItype __umulsidi3 (USItype, USItype);
/* This is the same algorithm as __udiv_qrnnd_c. */
#define UDIV_NEEDS_NORMALIZATION 1
#ifdef __FDPIC__
/* FDPIC needs a special version of the asm fragment to extract the
code address from the function descriptor. __udiv_qrnnd_16 is
assumed to be local and not to use the GOT, so loading r12 is
not needed. */
#define udiv_qrnnd(q, r, n1, n0, d) \
do { \
extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
__attribute__ ((visibility ("hidden"))); \
/* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \
__asm__ ( \
"mov%M4 %4,r5\n" \
" swap.w %3,r4\n" \
" swap.w r5,r6\n" \
" mov.l @%5,r2\n" \
" jsr @r2\n" \
" shll16 r6\n" \
" swap.w r4,r4\n" \
" mov.l @%5,r2\n" \
" jsr @r2\n" \
" swap.w r1,%0\n" \
" or r1,%0" \
: "=r" (q), "=&z" (r) \
: "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
: "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
} while (0)
#else
#define udiv_qrnnd(q, r, n1, n0, d) \
do { \
extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
@ -1121,6 +1148,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
: "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
: "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
} while (0)
#endif /* __FDPIC__ */
#define UDIV_TIME 80
@ -1131,7 +1159,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif /* __sh__ */
#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32
#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
#define count_leading_zeros(count, x) \
do \

View File

@ -1,5 +1,5 @@
/* Data types used in the IL symbol table.
Copyright (C) 2009 Free Software Foundation, Inc.
Copyright (C) 2009-2015 Free Software Foundation, Inc.
Contributed by Rafael Espindola <espindola@google.com>
This file is part of GCC.

View File

@ -1,6 +1,6 @@
/* md5.h - Declaration of functions and data types used for MD5 sum
computing library functions.
Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

View File

@ -1,5 +1,5 @@
/* objalloc.h -- routines to allocate memory for objects
Copyright 1997-2012 Free Software Foundation, Inc.
Copyright (C) 1997-2015 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it

View File

@ -1,108 +1,102 @@
/* obstack.h - object stack macros
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
Free Software Foundation, Inc.
Copyright (C) 1988-2015 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.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
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 General Public License for more details.
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 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. */
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* Summary:
All the apparent functions defined here are macros. The idea
is that you would use these pre-tested macros to solve a
very specific set of problems, and they would run fast.
Caution: no side-effects in arguments please!! They may be
evaluated MANY times!!
All the apparent functions defined here are macros. The idea
is that you would use these pre-tested macros to solve a
very specific set of problems, and they would run fast.
Caution: no side-effects in arguments please!! They may be
evaluated MANY times!!
These macros operate a stack of objects. Each object starts life
small, and may grow to maturity. (Consider building a word syllable
by syllable.) An object can move while it is growing. Once it has
been "finished" it never changes address again. So the "top of the
stack" is typically an immature growing object, while the rest of the
stack is of mature, fixed size and fixed address objects.
These macros operate a stack of objects. Each object starts life
small, and may grow to maturity. (Consider building a word syllable
by syllable.) An object can move while it is growing. Once it has
been "finished" it never changes address again. So the "top of the
stack" is typically an immature growing object, while the rest of the
stack is of mature, fixed size and fixed address objects.
These routines grab large chunks of memory, using a function you
supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
by calling `obstack_chunk_free'. You must define them and declare
them before using any obstack macros.
These routines grab large chunks of memory, using a function you
supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
by calling 'obstack_chunk_free'. You must define them and declare
them before using any obstack macros.
Each independent stack is represented by a `struct obstack'.
Each of the obstack macros expects a pointer to such a structure
as the first argument.
Each independent stack is represented by a 'struct obstack'.
Each of the obstack macros expects a pointer to such a structure
as the first argument.
One motivation for this package is the problem of growing char strings
in symbol tables. Unless you are "fascist pig with a read-only mind"
--Gosper's immortal quote from HAKMEM item 154, out of context--you
would not like to put any arbitrary upper limit on the length of your
symbols.
One motivation for this package is the problem of growing char strings
in symbol tables. Unless you are "fascist pig with a read-only mind"
--Gosper's immortal quote from HAKMEM item 154, out of context--you
would not like to put any arbitrary upper limit on the length of your
symbols.
In practice this often means you will build many short symbols and a
few long symbols. At the time you are reading a symbol you don't know
how long it is. One traditional method is to read a symbol into a
buffer, realloc()ating the buffer every time you try to read a symbol
that is longer than the buffer. This is beaut, but you still will
want to copy the symbol from the buffer to a more permanent
symbol-table entry say about half the time.
In practice this often means you will build many short symbols and a
few long symbols. At the time you are reading a symbol you don't know
how long it is. One traditional method is to read a symbol into a
buffer, realloc()ating the buffer every time you try to read a symbol
that is longer than the buffer. This is beaut, but you still will
want to copy the symbol from the buffer to a more permanent
symbol-table entry say about half the time.
With obstacks, you can work differently. Use one obstack for all symbol
names. As you read a symbol, grow the name in the obstack gradually.
When the name is complete, finalize it. Then, if the symbol exists already,
free the newly read name.
With obstacks, you can work differently. Use one obstack for all symbol
names. As you read a symbol, grow the name in the obstack gradually.
When the name is complete, finalize it. Then, if the symbol exists already,
free the newly read name.
The way we do this is to take a large chunk, allocating memory from
low addresses. When you want to build a symbol in the chunk you just
add chars above the current "high water mark" in the chunk. When you
have finished adding chars, because you got to the end of the symbol,
you know how long the chars are, and you can create a new object.
Mostly the chars will not burst over the highest address of the chunk,
because you would typically expect a chunk to be (say) 100 times as
long as an average object.
The way we do this is to take a large chunk, allocating memory from
low addresses. When you want to build a symbol in the chunk you just
add chars above the current "high water mark" in the chunk. When you
have finished adding chars, because you got to the end of the symbol,
you know how long the chars are, and you can create a new object.
Mostly the chars will not burst over the highest address of the chunk,
because you would typically expect a chunk to be (say) 100 times as
long as an average object.
In case that isn't clear, when we have enough chars to make up
the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
so we just point to it where it lies. No moving of chars is
needed and this is the second win: potentially long strings need
never be explicitly shuffled. Once an object is formed, it does not
change its address during its lifetime.
In case that isn't clear, when we have enough chars to make up
the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
so we just point to it where it lies. No moving of chars is
needed and this is the second win: potentially long strings need
never be explicitly shuffled. Once an object is formed, it does not
change its address during its lifetime.
When the chars burst over a chunk boundary, we allocate a larger
chunk, and then copy the partly formed object from the end of the old
chunk to the beginning of the new larger chunk. We then carry on
accreting characters to the end of the object as we normally would.
When the chars burst over a chunk boundary, we allocate a larger
chunk, and then copy the partly formed object from the end of the old
chunk to the beginning of the new larger chunk. We then carry on
accreting characters to the end of the object as we normally would.
A special macro is provided to add a single char at a time to a
growing object. This allows the use of register variables, which
break the ordinary 'growth' macro.
A special macro is provided to add a single char at a time to a
growing object. This allows the use of register variables, which
break the ordinary 'growth' macro.
Summary:
We allocate large chunks.
We carve out one object at a time from the current chunk.
Once carved, an object never moves.
We are free to append data of any size to the currently
growing object.
Exactly one object is growing in an obstack at any one time.
You can run one obstack per control block.
You may have as many control blocks as you dare.
Because of the way we do it, you can `unwind' an obstack
back to a previous state. (You may remove objects much
as you would with a stack.)
*/
Summary:
We allocate large chunks.
We carve out one object at a time from the current chunk.
Once carved, an object never moves.
We are free to append data of any size to the currently
growing object.
Exactly one object is growing in an obstack at any one time.
You can run one obstack per control block.
You may have as many control blocks as you dare.
Because of the way we do it, you can "unwind" an obstack
back to a previous state. (You may remove objects much
as you would with a stack.)
*/
/* Don't do the contents of this file more than once. */
@ -110,144 +104,128 @@ Summary:
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
#ifndef _OBSTACK_INTERFACE_VERSION
# define _OBSTACK_INTERFACE_VERSION 2
#endif
#include <stddef.h> /* For size_t and ptrdiff_t. */
#include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
#if _OBSTACK_INTERFACE_VERSION == 1
/* For binary compatibility with obstack version 1, which used "int"
and "long" for these two types. */
# define _OBSTACK_SIZE_T unsigned int
# define _CHUNK_SIZE_T unsigned long
# define _OBSTACK_CAST(type, expr) ((type) (expr))
#else
/* Version 2 with sane types, especially for 64-bit hosts. */
# define _OBSTACK_SIZE_T size_t
# define _CHUNK_SIZE_T size_t
# define _OBSTACK_CAST(type, expr) (expr)
#endif
/* If B is the base of an object addressed by P, return the result of
aligning P to the next multiple of A + 1. B and P must be of type
char *. A + 1 must be a power of 2. */
#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
/* Similar to __BPTR_ALIGN (B, P, A), except optimize the common case
where pointers can be converted to integers, aligned as integers,
and converted back again. If ptrdiff_t is narrower than a
pointer (e.g., the AS/400), play it safe and compute the alignment
relative to B. Otherwise, use the faster strategy of computing the
alignment relative to 0. */
#define __PTR_ALIGN(B, P, A) \
__BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \
P, A)
#ifndef __attribute_pure__
# if defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2096
# define __attribute_pure__ __attribute__ ((__pure__))
# else
# define __attribute_pure__
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* We use subtraction of (char *) 0 instead of casting to int
because on word-addressable machines a simple cast to int
may ignore the byte-within-word field of the pointer. */
#ifndef __PTR_TO_INT
# define __PTR_TO_INT(P) ((P) - (char *) 0)
#endif
#ifndef __INT_TO_PTR
# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
available, include it and use ptrdiff_t. In traditional C, long is
the best that we can do. */
#ifdef __PTRDIFF_TYPE__
# define PTR_INT_TYPE __PTRDIFF_TYPE__
#else
# ifdef HAVE_STDDEF_H
# include <stddef.h>
# define PTR_INT_TYPE ptrdiff_t
# else
# define PTR_INT_TYPE long
# endif
#endif
#if defined _LIBC || defined HAVE_STRING_H
# include <string.h>
# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
# ifdef memcpy
# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
# else
# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
# endif
#endif
struct _obstack_chunk /* Lives at front of each chunk. */
struct _obstack_chunk /* Lives at front of each chunk. */
{
char *limit; /* 1 past end of this chunk */
struct _obstack_chunk *prev; /* address of prior chunk or NULL */
char contents[4]; /* objects begin here */
char *limit; /* 1 past end of this chunk */
struct _obstack_chunk *prev; /* address of prior chunk or NULL */
char contents[4]; /* objects begin here */
};
struct obstack /* control current object in current chunk */
struct obstack /* control current object in current chunk */
{
long chunk_size; /* preferred size to allocate chunks in */
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
char *object_base; /* address of object we are building */
char *next_free; /* where to add next char to current object */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
void (*freefun) (void *, struct _obstack_chunk *);
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
prevents freeing the chunk if we allocate
a bigger chunk to replace it. */
unsigned alloc_failed:1; /* No longer used, as we now call the failed
handler on error, but retained for binary
compatibility. */
_CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
char *object_base; /* address of object we are building */
char *next_free; /* where to add next char to current object */
char *chunk_limit; /* address of char after current chunk */
union
{
_OBSTACK_SIZE_T i;
void *p;
} temp; /* Temporary for some macros. */
_OBSTACK_SIZE_T alignment_mask; /* Mask of alignment for each object. */
/* These prototypes vary based on 'use_extra_arg'. */
union
{
void *(*plain) (size_t);
void *(*extra) (void *, size_t);
} chunkfun;
union
{
void (*plain) (void *);
void (*extra) (void *, void *);
} freefun;
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
unsigned use_extra_arg : 1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object : 1; /* There is a possibility that the current
chunk contains a zero-length object. This
prevents freeing the chunk if we allocate
a bigger chunk to replace it. */
unsigned alloc_failed : 1; /* No longer used, as we now call the failed
handler on error, but retained for binary
compatibility. */
};
/* Declare the external functions we use; they are in obstack.c. */
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_newchunk (struct obstack *, _OBSTACK_SIZE_T);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
void *(*) (long), void (*) (void *));
extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
extern int _obstack_memory_used (struct obstack *);
/* Do the function-declarations after the structs
but before defining the macros. */
extern int _obstack_begin (struct obstack *,
_OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
void *(*) (size_t), void (*) (void *));
extern int _obstack_begin_1 (struct obstack *,
_OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
void *(*) (void *, size_t),
void (*) (void *, void *), void *);
extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
__attribute_pure__;
void obstack_init (struct obstack *obstack);
void * obstack_alloc (struct obstack *obstack, int size);
void * obstack_copy (struct obstack *obstack, void *address, int size);
void * obstack_copy0 (struct obstack *obstack, void *address, int size);
void obstack_free (struct obstack *obstack, void *block);
void obstack_blank (struct obstack *obstack, int size);
void obstack_grow (struct obstack *obstack, void *data, int size);
void obstack_grow0 (struct obstack *obstack, void *data, int size);
void obstack_1grow (struct obstack *obstack, int data_char);
void obstack_ptr_grow (struct obstack *obstack, void *data);
void obstack_int_grow (struct obstack *obstack, int data);
void * obstack_finish (struct obstack *obstack);
int obstack_object_size (struct obstack *obstack);
int obstack_room (struct obstack *obstack);
void obstack_make_room (struct obstack *obstack, int size);
void obstack_1grow_fast (struct obstack *obstack, int data_char);
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
void obstack_int_grow_fast (struct obstack *obstack, int data);
void obstack_blank_fast (struct obstack *obstack, int size);
void * obstack_base (struct obstack *obstack);
void * obstack_next_free (struct obstack *obstack);
int obstack_alignment_mask (struct obstack *obstack);
int obstack_chunk_size (struct obstack *obstack);
int obstack_memory_used (struct obstack *obstack);
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
default action is to print a message and abort. */
/* Error handler called when 'obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
extern void (*obstack_alloc_failed_handler) (void);
/* Exit value used when `print_and_abort' is used. */
/* Exit value used when 'print_and_abort' is used. */
extern int obstack_exit_failure;
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
#define obstack_base(h) ((h)->object_base)
#define obstack_base(h) ((void *) (h)->object_base)
/* Size for allocating ordinary chunks. */
@ -255,203 +233,210 @@ extern int obstack_exit_failure;
/* Pointer to next byte not yet allocated in current chunk. */
#define obstack_next_free(h) ((h)->next_free)
#define obstack_next_free(h) ((void *) (h)->next_free)
/* Mask specifying low bits that should be clear in address of an object. */
#define obstack_alignment_mask(h) ((h)->alignment_mask)
/* To prevent prototype warnings provide complete argument list in
standard C version. */
# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
/* To prevent prototype warnings provide complete argument list. */
#define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
_OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
_OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
#define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
_OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
_OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
_OBSTACK_CAST (void *(*) (size_t), chunkfun), \
_OBSTACK_CAST (void (*) (void *), freefun))
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (void *, long)) (chunkfun), \
(void (*) (void *, void *)) (freefun), (arg))
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
_OBSTACK_CAST (void *(*) (void *, size_t), chunkfun), \
_OBSTACK_CAST (void (*) (void *, void *), freefun), arg)
# define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
#define obstack_chunkfun(h, newchunkfun) \
((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun)))
# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
#define obstack_freefun(h, newfreefun) \
((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun)))
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
#define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
#define obstack_blank_fast(h, n) ((void) ((h)->next_free += (n)))
#define obstack_memory_used(h) _obstack_memory_used (h)
#if defined __GNUC__ && defined __STDC__ && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
#if defined __GNUC__
# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
# define __extension__
# endif
/* For GNU C, if not -traditional,
we can define these macros to compute all args only once
without using a global variable.
Also, we can avoid using the `temp' slot, to make faster code. */
Also, we can avoid using the 'temp' slot, to make faster code. */
# define obstack_object_size(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->next_free - __o->object_base); })
# define obstack_object_size(OBSTACK) \
__extension__ \
({ struct obstack const *__o = (OBSTACK); \
(_OBSTACK_SIZE_T) (__o->next_free - __o->object_base); })
# define obstack_room(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->chunk_limit - __o->next_free); })
/* The local variable is named __o1 to avoid a shadowed variable
warning when invoked from other obstack macros. */
# define obstack_room(OBSTACK) \
__extension__ \
({ struct obstack const *__o1 = (OBSTACK); \
(_OBSTACK_SIZE_T) (__o1->chunk_limit - __o1->next_free); })
# define obstack_make_room(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
(void) 0; })
# define obstack_make_room(OBSTACK, length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
_OBSTACK_SIZE_T __len = (length); \
if (obstack_room (__o) < __len) \
_obstack_newchunk (__o, __len); \
(void) 0; })
# define obstack_empty_p(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
# define obstack_empty_p(OBSTACK) \
__extension__ \
({ struct obstack const *__o = (OBSTACK); \
(__o->chunk->prev == 0 \
&& __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
__o->chunk->contents, \
__o->alignment_mask)); })
# define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
_obstack_memcpy (__o->next_free, (where), __len); \
__o->next_free += __len; \
(void) 0; })
# define obstack_grow(OBSTACK, where, length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
_OBSTACK_SIZE_T __len = (length); \
if (obstack_room (__o) < __len) \
_obstack_newchunk (__o, __len); \
memcpy (__o->next_free, where, __len); \
__o->next_free += __len; \
(void) 0; })
# define obstack_grow0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
_obstack_memcpy (__o->next_free, (where), __len); \
__o->next_free += __len; \
*(__o->next_free)++ = 0; \
(void) 0; })
# define obstack_grow0(OBSTACK, where, length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
_OBSTACK_SIZE_T __len = (length); \
if (obstack_room (__o) < __len + 1) \
_obstack_newchunk (__o, __len + 1); \
memcpy (__o->next_free, where, __len); \
__o->next_free += __len; \
*(__o->next_free)++ = 0; \
(void) 0; })
# define obstack_1grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, 1); \
obstack_1grow_fast (__o, datum); \
(void) 0; })
# define obstack_1grow(OBSTACK, datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (obstack_room (__o) < 1) \
_obstack_newchunk (__o, 1); \
obstack_1grow_fast (__o, datum); })
/* These assume that the obstack alignment is good enough for pointers or ints,
and that the data added so far to the current object
/* These assume that the obstack alignment is good enough for pointers
or ints, and that the data added so far to the current object
shares that much alignment. */
# define obstack_ptr_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
obstack_ptr_grow_fast (__o, datum); })
# define obstack_ptr_grow(OBSTACK, datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (obstack_room (__o) < sizeof (void *)) \
_obstack_newchunk (__o, sizeof (void *)); \
obstack_ptr_grow_fast (__o, datum); })
# define obstack_int_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (int)); \
obstack_int_grow_fast (__o, datum); })
# define obstack_int_grow(OBSTACK, datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (obstack_room (__o) < sizeof (int)) \
_obstack_newchunk (__o, sizeof (int)); \
obstack_int_grow_fast (__o, datum); })
# define obstack_ptr_grow_fast(OBSTACK,aptr) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
*(const void **) __o1->next_free = (aptr); \
__o1->next_free += sizeof (const void *); \
(void) 0; })
# define obstack_ptr_grow_fast(OBSTACK, aptr) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *__p1 = __o1->next_free; \
*(const void **) __p1 = (aptr); \
__o1->next_free += sizeof (const void *); \
(void) 0; })
# define obstack_int_grow_fast(OBSTACK,aint) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
*(int *) __o1->next_free = (aint); \
__o1->next_free += sizeof (int); \
(void) 0; })
# define obstack_int_grow_fast(OBSTACK, aint) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *__p1 = __o1->next_free; \
*(int *) __p1 = (aint); \
__o1->next_free += sizeof (int); \
(void) 0; })
# define obstack_blank(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
obstack_blank_fast (__o, __len); \
(void) 0; })
# define obstack_blank(OBSTACK, length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
_OBSTACK_SIZE_T __len = (length); \
if (obstack_room (__o) < __len) \
_obstack_newchunk (__o, __len); \
obstack_blank_fast (__o, __len); })
# define obstack_alloc(OBSTACK,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_blank (__h, (length)); \
obstack_finish (__h); })
# define obstack_alloc(OBSTACK, length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_blank (__h, (length)); \
obstack_finish (__h); })
# define obstack_copy(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow (__h, (where), (length)); \
obstack_finish (__h); })
# define obstack_copy(OBSTACK, where, length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow (__h, (where), (length)); \
obstack_finish (__h); })
# define obstack_copy0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow0 (__h, (where), (length)); \
obstack_finish (__h); })
# define obstack_copy0(OBSTACK, where, length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow0 (__h, (where), (length)); \
obstack_finish (__h); })
/* The local variable is named __o1 to avoid a name conflict
when obstack_blank is called. */
# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *value; \
value = (void *) __o1->object_base; \
if (__o1->next_free == value) \
__o1->maybe_empty_object = 1; \
__o1->next_free \
= __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
& ~ (__o1->alignment_mask)); \
if (__o1->next_free - (char *)__o1->chunk \
> __o1->chunk_limit - (char *)__o1->chunk) \
__o1->next_free = __o1->chunk_limit; \
__o1->object_base = __o1->next_free; \
value; })
/* The local variable is named __o1 to avoid a shadowed variable
warning when invoked from other obstack macros, typically obstack_free. */
# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *__value = (void *) __o1->object_base; \
if (__o1->next_free == __value) \
__o1->maybe_empty_object = 1; \
__o1->next_free \
= __PTR_ALIGN (__o1->object_base, __o1->next_free, \
__o1->alignment_mask); \
if ((size_t) (__o1->next_free - (char *) __o1->chunk) \
> (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) \
__o1->next_free = __o1->chunk_limit; \
__o1->object_base = __o1->next_free; \
__value; })
# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
void *__obj = (void *) (OBJ); \
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
__o->next_free = __o->object_base = (char *) __obj; \
else (obstack_free) (__o, __obj); })
#else /* not __GNUC__ or not __STDC__ */
# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
void *__obj = (void *) (OBJ); \
if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) \
__o->next_free = __o->object_base = (char *) __obj; \
else \
_obstack_free (__o, __obj); })
# define obstack_object_size(h) \
(unsigned) ((h)->next_free - (h)->object_base)
#else /* not __GNUC__ */
# define obstack_room(h) \
(unsigned) ((h)->chunk_limit - (h)->next_free)
# define obstack_object_size(h) \
((_OBSTACK_SIZE_T) ((h)->next_free - (h)->object_base))
# define obstack_empty_p(h) \
((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
# define obstack_room(h) \
((_OBSTACK_SIZE_T) ((h)->chunk_limit - (h)->next_free))
# define obstack_empty_p(h) \
((h)->chunk->prev == 0 \
&& (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
(h)->chunk->contents, \
(h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
@ -459,87 +444,92 @@ __extension__ \
Casting the third operand to void was tried before,
but some compilers won't accept it. */
# define obstack_make_room(h,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
# define obstack_make_room(h, length) \
((h)->temp.i = (length), \
((obstack_room (h) < (h)->temp.i) \
? (_obstack_newchunk (h, (h)->temp.i), 0) : 0), \
(void) 0)
# define obstack_grow(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
_obstack_memcpy ((h)->next_free, (where), (h)->temp), \
(h)->next_free += (h)->temp)
# define obstack_grow(h, where, length) \
((h)->temp.i = (length), \
((obstack_room (h) < (h)->temp.i) \
? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
memcpy ((h)->next_free, where, (h)->temp.i), \
(h)->next_free += (h)->temp.i, \
(void) 0)
# define obstack_grow0(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
_obstack_memcpy ((h)->next_free, (where), (h)->temp), \
(h)->next_free += (h)->temp, \
*((h)->next_free)++ = 0)
# define obstack_grow0(h, where, length) \
((h)->temp.i = (length), \
((obstack_room (h) < (h)->temp.i + 1) \
? (_obstack_newchunk ((h), (h)->temp.i + 1), 0) : 0), \
memcpy ((h)->next_free, where, (h)->temp.i), \
(h)->next_free += (h)->temp.i, \
*((h)->next_free)++ = 0, \
(void) 0)
# define obstack_1grow(h,datum) \
( (((h)->next_free + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
obstack_1grow_fast (h, datum))
# define obstack_1grow(h, datum) \
(((obstack_room (h) < 1) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
obstack_1grow_fast (h, datum))
# define obstack_ptr_grow(h,datum) \
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
obstack_ptr_grow_fast (h, datum))
# define obstack_ptr_grow(h, datum) \
(((obstack_room (h) < sizeof (char *)) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
obstack_ptr_grow_fast (h, datum))
# define obstack_int_grow(h,datum) \
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
obstack_int_grow_fast (h, datum))
# define obstack_int_grow(h, datum) \
(((obstack_room (h) < sizeof (int)) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
obstack_int_grow_fast (h, datum))
# define obstack_ptr_grow_fast(h,aptr) \
(((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
# define obstack_ptr_grow_fast(h, aptr) \
(((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr), \
(void) 0)
# define obstack_int_grow_fast(h,aint) \
(((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
# define obstack_int_grow_fast(h, aint) \
(((int *) ((h)->next_free += sizeof (int)))[-1] = (aint), \
(void) 0)
# define obstack_blank(h,length) \
( (h)->temp = (length), \
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
obstack_blank_fast (h, (h)->temp))
# define obstack_blank(h, length) \
((h)->temp.i = (length), \
((obstack_room (h) < (h)->temp.i) \
? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
obstack_blank_fast (h, (h)->temp.i))
# define obstack_alloc(h,length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
# define obstack_alloc(h, length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
# define obstack_copy(h,where,length) \
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
# define obstack_copy(h, where, length) \
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
# define obstack_copy0(h,where,length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
# define obstack_copy0(h, where, length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
# define obstack_finish(h) \
( ((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
(h)->temp = __PTR_TO_INT ((h)->object_base), \
(h)->next_free \
= __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
& ~ ((h)->alignment_mask)), \
(((h)->next_free - (char *) (h)->chunk \
> (h)->chunk_limit - (char *) (h)->chunk) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
(void *) __INT_TO_PTR ((h)->temp))
# define obstack_finish(h) \
(((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
(h)->temp.p = (h)->object_base, \
(h)->next_free \
= __PTR_ALIGN ((h)->object_base, (h)->next_free, \
(h)->alignment_mask), \
(((size_t) ((h)->next_free - (char *) (h)->chunk) \
> (size_t) ((h)->chunk_limit - (char *) (h)->chunk)) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
(h)->temp.p)
# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk), 0) \
: ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0)))
# define obstack_free(h, obj) \
((h)->temp.p = (void *) (obj), \
(((h)->temp.p > (void *) (h)->chunk \
&& (h)->temp.p < (void *) (h)->chunk_limit) \
? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \
: _obstack_free ((h), (h)->temp.p)))
#endif /* not __GNUC__ or not __STDC__ */
#endif /* not __GNUC__ */
#ifdef __cplusplus
} /* C++ */
} /* C++ */
#endif
#endif /* obstack.h */
#endif /* _OBSTACK_H */

View File

@ -45,12 +45,12 @@ extern "C" {
struct partition_elem
{
/* The canonical element that represents the class containing this
element. */
int class_element;
/* The next element in this class. Elements in each class form a
circular list. */
struct partition_elem* next;
/* The canonical element that represents the class containing this
element. */
int class_element;
/* The number of elements in this class. Valid only if this is the
canonical element for its class. */
unsigned class_count;

View File

@ -1,6 +1,6 @@
/* plugin-api.h -- External linker plugin API. */
/* Copyright 2009, 2010 Free Software Foundation, Inc.
/* Copyright (C) 2009-2016 Free Software Foundation, Inc.
Written by Cary Coutant <ccoutant@google.com>.
This file is part of binutils.
@ -345,6 +345,26 @@ enum ld_plugin_status
const struct ld_plugin_section * section_list,
unsigned int num_sections);
/* The linker's interface for retrieving the section alignment requirement
of a specific section in an object. This interface should only be invoked in the
claim_file handler. This function sets *ADDRALIGN to the ELF sh_addralign
value of the input section. */
typedef
enum ld_plugin_status
(*ld_plugin_get_input_section_alignment) (const struct ld_plugin_section section,
unsigned int *addralign);
/* The linker's interface for retrieving the section size of a specific section
in an object. This interface should only be invoked in the claim_file handler.
This function sets *SECSIZE to the ELF sh_size
value of the input section. */
typedef
enum ld_plugin_status
(*ld_plugin_get_input_section_size) (const struct ld_plugin_section section,
uint64_t *secsize);
enum ld_plugin_level
{
LDPL_INFO,
@ -384,7 +404,10 @@ enum ld_plugin_tag
LDPT_ALLOW_SECTION_ORDERING = 24,
LDPT_GET_SYMBOLS_V2 = 25,
LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26,
LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27
LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27,
LDPT_GET_SYMBOLS_V3 = 28,
LDPT_GET_INPUT_SECTION_ALIGNMENT = 29,
LDPT_GET_INPUT_SECTION_SIZE = 30
};
/* The plugin transfer vector. */
@ -416,6 +439,8 @@ struct ld_plugin_tv
ld_plugin_allow_section_ordering tv_allow_section_ordering;
ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections;
ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections;
ld_plugin_get_input_section_alignment tv_get_input_section_alignment;
ld_plugin_get_input_section_size tv_get_input_section_size;
} tv_u;
};

View File

@ -1,6 +1,6 @@
/* <ctype.h> replacement macros.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.

View File

@ -1,7 +1,6 @@
/* Declarations of functions and data types used for SHA1 sum
library functions.
Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2010
Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the

View File

@ -1,5 +1,5 @@
/* simple-object.h -- simple routines to read and write object files
Copyright 2010 Free Software Foundation, Inc.
Copyright (C) 2010-2015 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/* Sorting algorithms.
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC.

View File

@ -1,6 +1,5 @@
/* A splay-tree datatype.
Copyright 1998, 1999, 2000, 2002, 2005, 2007, 2009, 2010
Free Software Foundation, Inc.
Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.

View File

@ -1,6 +1,6 @@
/* Symbol concatenation utilities.
Copyright (C) 1998, 2000, 2010 Free Software Foundation, Inc.
Copyright (C) 1998-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Basic struct timeval utilities.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or

View File

@ -1,5 +1,4 @@
/* Copyright (C) 2013
Free Software Foundation
/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of GCC.
@ -47,8 +46,12 @@ extern void __VLTChangePermission (int);
/* TODO - Replace '4096' below with correct big page size. */
#define VTV_PAGE_SIZE 4096
#else
#if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
#define VTV_PAGE_SIZE 8192
#else
#define VTV_PAGE_SIZE 4096
#endif
#endif

View File

@ -1,8 +1,7 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
1998, 2000, 2005 Free Software Foundation, Inc.
Copyright (C) 1985-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.

View File

@ -1,6 +1,5 @@
/* Xtensa configuration settings.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
Copyright (C) 2001-2015 Free Software Foundation, Inc.
Contributed by Bob Wilson (bob.wilson@acm.org) at Tensilica.
This program is free software; you can redistribute it and/or modify

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2009-04-28.21; # UTC
scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -35,25 +35,21 @@ scriptversion=2009-04-28.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" "" $nl"
IFS=" $tab$nl"
# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -137,42 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@ -186,6 +186,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
@ -194,13 +198,26 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@ -211,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw='% 200'
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw=,u+rw
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@ -228,9 +245,9 @@ fi
for src
do
# Protect names starting with `-'.
# Protect names problematic for 'test' and other utilities.
case $src in
-*) src=./$src;;
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
@ -252,51 +269,20 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@ -307,74 +293,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@ -384,53 +370,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set -f
set fnord $dstdir
shift
$posix_glob set +f
set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
@ -465,15 +449,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@ -486,24 +467,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1

12
libtool.m4 vendored
View File

@ -1006,7 +1006,7 @@ _LT_EOF
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
10.[[012]]*)
10.[[012]][[,.]]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@ -4230,7 +4230,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@ -4459,7 +4459,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
tmp_addflag=
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@ -4641,7 +4641,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@ -5525,8 +5525,8 @@ if test "$_lt_caught_CXX_error" != yes; then
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if test "$with_gnu_ld" = yes; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
_LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'

457
missing
View File

@ -1,11 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2009-04-28.21; # UTC
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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
@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Run the given program, remember its exit status.
"$@"; st=$?
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
fi
;;
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

View File

@ -81,9 +81,9 @@ case $dirmode in
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# On NextStep and OpenStep, the 'mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# directories to create, and then abort because '.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version

View File

@ -2,13 +2,13 @@
# Like mv $1 $2, but if the files are the same, just delete $1.
# Status is zero if successful, nonzero otherwise.
VERSION='2011-01-28 20:09'; # UTC
VERSION='2012-01-06 07:23'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@ If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
--help display this help and exit
--version output version information and exit
The variable CMPPROG can be used to specify an alternative to \`cmp'.
The variable CMPPROG can be used to specify an alternative to 'cmp'.
Report bugs to <bug-gnulib@gnu.org>."

198
ylwrap
View File

@ -1,10 +1,9 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
scriptversion=2009-04-28.21; # UTC
scriptversion=2013-01-12.17; # UTC
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
# 2007, 2009 Free Software Foundation, Inc.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# Written by Tom Tromey <tromey@cygnus.com>.
#
@ -30,9 +29,41 @@ scriptversion=2009-04-28.21; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
get_dirname ()
{
case $1 in
*/*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';;
# Otherwise, we want the empty string (not ".").
esac
}
# guard FILE
# ----------
# The CPP macro used to guard inclusion of FILE.
guard ()
{
printf '%s\n' "$1" \
| sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \
-e 's/__*/_/g'
}
# quote_for_sed [STRING]
# ----------------------
# Return STRING (or stdin) quoted to be used as a sed pattern.
quote_for_sed ()
{
case $# in
0) cat;;
1) printf '%s\n' "$1";;
esac \
| sed -e 's|[][\\.*]|\\&|g'
}
case "$1" in
'')
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
echo "$0: No files given. Try '$0 --help' for more information." 1>&2
exit 1
;;
--basedir)
@ -65,41 +96,62 @@ esac
# The input.
input="$1"
input=$1
shift
case "$input" in
# We'll later need for a correct munging of "#line" directives.
input_sub_rx=`get_dirname "$input" | quote_for_sed`
case $input in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
input="`pwd`/$input"
input=`pwd`/$input
;;
esac
input_rx=`get_dirname "$input" | quote_for_sed`
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
# The parser itself, the first file, is the destination of the .y.c
# rule in the Makefile.
parser=$1
# A sed program to s/FROM/TO/g for all the FROM/TO so that, for
# instance, we rename #include "y.tab.h" into #include "parse.h"
# during the conversion from y.tab.c to parse.c.
sed_fix_filenames=
# Also rename header guards, as Bison 2.7 for instance uses its header
# guard in its implementation file.
sed_fix_header_guards=
while test $# -ne 0; do
if test x"$1" = x"--"; then
shift
break
fi
pairlist="$pairlist $1"
from=$1
shift
to=$1
shift
sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;"
sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;"
done
# The program to run.
prog="$1"
prog=$1
shift
# Make any relative path in $prog absolute.
case "$prog" in
case $prog in
[\\/]* | ?:[\\/]*) ;;
*[\\/]*) prog="`pwd`/$prog" ;;
*[\\/]*) prog=`pwd`/$prog ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
mkdir $dirname || exit 1
cd $dirname
@ -111,98 +163,56 @@ esac
ret=$?
if test $ret -eq 0; then
set X $pairlist
shift
first=yes
# Since DOS filename conventions don't allow two dots,
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
y_tab_nodot="no"
if test -f y_tab.c || test -f y_tab.h; then
y_tab_nodot="yes"
fi
# The directory holding the input.
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
# Quote $INPUT_DIR so we can use it in a regexp.
# FIXME: really we should care about more than `.' and `\'.
input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
while test "$#" -ne 0; do
from="$1"
# Handle y_tab.c and y_tab.h output by DOS
if test $y_tab_nodot = "yes"; then
if test $from = "y.tab.c"; then
from="y_tab.c"
else
if test $from = "y.tab.h"; then
from="y_tab.h"
fi
fi
fi
for from in *
do
to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"`
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
[\\/]* | ?:[\\/]*) target="$2";;
*) target="../$2";;
# otherwise prepend '../'.
case $to in
[\\/]* | ?:[\\/]*) target=$to;;
*) target=../$to;;
esac
# We do not want to overwrite a header file if it hasn't
# changed. This avoid useless recompilations. However the
# parser itself (the first file) should always be updated,
# because it is the destination of the .y.c rule in the
# Makefile. Divert the output of all other files to a temporary
# file so we can compare them to existing versions.
if test $first = no; then
realtarget="$target"
target="tmp-`echo $target | sed s/.*[\\/]//g`"
# Do not overwrite unchanged header files to avoid useless
# recompilations. Always update the parser itself: it is the
# destination of the .y.c rule in the Makefile. Divert the
# output of all other files to a temporary file so we can
# compare them to existing versions.
if test $from != $parser; then
realtarget=$target
target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
fi
# Edit out `#line' or `#' directives.
#
# We don't want the resulting debug information to point at
# an absolute srcdir; it is better for it to just mention the
# .y file with no path.
#
# We want to use the real output file name, not yy.lex.c for
# instance.
#
# We want the include guards to be adjusted too.
FROM=`echo "$from" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
TARGET=`echo "$2" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
-e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
# Munge "#line" or "#" directives. Don't let the resulting
# debug information point at an absolute srcdir. Use the real
# output file name, not yy.lex.c for instance. Adjust the
# include guards too.
sed -e "/^#/!b" \
-e "s|$input_rx|$input_sub_rx|" \
-e "$sed_fix_filenames" \
-e "$sed_fix_header_guards" \
"$from" >"$target" || ret=$?
# Check whether header files must be updated.
if test $first = no; then
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
echo "$2" is unchanged
rm -f "$target"
else
echo updating "$2"
# Check whether files must be updated.
if test "$from" != "$parser"; then
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
echo "$to is unchanged"
rm -f "$target"
else
echo "updating $to"
mv -f "$target" "$realtarget"
fi
fi
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
# A missing file is only an error for the parser. This is a
# blatant hack to let us support using "yacc -d". If -d is not
# specified, don't fail when the header file is "missing".
if test "$from" = "$parser"; then
ret=1
fi
fi
shift
shift
first=no
done
else
ret=$?
fi
# Remove the directory.