mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-21 10:05:27 +08:00
22e0527251
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
117 lines
4.0 KiB
Plaintext
117 lines
4.0 KiB
Plaintext
dnl Fix Autoconf bugs by overriding broken internal Autoconf
|
|
dnl macros with backports of fixes from newer releases.
|
|
dnl
|
|
dnl The override bits of this file should be a no-op for the newest
|
|
dnl Autoconf version, which means they can be removed once the complete
|
|
dnl tree has moved to a new enough Autoconf version.
|
|
dnl
|
|
dnl The _GCC_AUTOCONF_VERSION_TEST ensures that exactly the desired
|
|
dnl Autoconf version is used. It should be kept for consistency.
|
|
|
|
dnl Use ifdef/ifelse over m4_ifdef/m4_ifelse to be clean for 2.13.
|
|
ifdef([m4_PACKAGE_VERSION], [
|
|
|
|
dnl Provide m4_copy_force and m4_rename_force for old Autoconf versions.
|
|
|
|
m4_ifndef([m4_copy_force],
|
|
[m4_define([m4_copy_force],
|
|
[m4_ifdef([$2], [m4_undefine([$2])])m4_copy($@)])])
|
|
|
|
m4_ifndef([m4_rename_force],
|
|
[m4_define([m4_rename_force],
|
|
[m4_ifdef([$2], [m4_undefine([$2])])m4_rename($@)])])
|
|
|
|
dnl AC_DEFUN a commonly used macro so this file is picked up.
|
|
m4_copy([AC_PREREQ], [_AC_PREREQ])
|
|
AC_DEFUN([AC_PREREQ], [frob])
|
|
m4_copy_force([_AC_PREREQ], [AC_PREREQ])
|
|
|
|
|
|
dnl Ensure exactly this Autoconf version is used
|
|
m4_ifndef([_GCC_AUTOCONF_VERSION],
|
|
[m4_define([_GCC_AUTOCONF_VERSION], [2.69])])
|
|
|
|
dnl Test for the exact version when AC_INIT is expanded.
|
|
dnl This allows to update the tree in steps (for testing)
|
|
dnl by putting
|
|
dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y])
|
|
dnl in configure.ac before AC_INIT,
|
|
dnl without rewriting this file.
|
|
dnl Or for updating the whole tree at once with the definition above.
|
|
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
|
|
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
|
|
m4_defn([m4_PACKAGE_VERSION]), [],
|
|
[m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
|
|
])
|
|
m4_define([AC_INIT], m4_defn([AC_INIT])[
|
|
_GCC_AUTOCONF_VERSION_CHECK
|
|
])
|
|
|
|
|
|
dnl Ensure we do not use a buggy M4.
|
|
m4_if(m4_index([..wi.d.], [.d.]), [-1],
|
|
[m4_fatal(m4_do([m4 with buggy strstr detected. Please install
|
|
GNU M4 1.4.16 or newer and set the M4 environment variable]))])
|
|
|
|
|
|
dnl Fix 2.64 cross compile detection for AVR and RTEMS
|
|
dnl by not trying to compile fopen.
|
|
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.64],
|
|
[m4_foreach([_GCC_LANG], [C, C++, Fortran, Fortran 77],
|
|
[m4_define([_AC_LANG_IO_PROGRAM(]_GCC_LANG[)], m4_defn([AC_LANG_PROGRAM(]_GCC_LANG[)]))])])
|
|
|
|
m4_version_prereq([2.66],, [
|
|
dnl We need AC_CHECK_DECL which works for overloaded C++ functions.
|
|
|
|
# _AC_CHECK_DECL_BODY
|
|
# -------------------
|
|
# Shell function body for AC_CHECK_DECL.
|
|
m4_define([_AC_CHECK_DECL_BODY],
|
|
[ AS_LINENO_PUSH([$[]1])
|
|
[as_decl_name=`echo $][2|sed 's/ *(.*//'`]
|
|
[as_decl_use=`echo $][2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`]
|
|
AC_CACHE_CHECK([whether $as_decl_name is declared], [$[]3],
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4],
|
|
[@%:@ifndef $[]as_decl_name
|
|
@%:@ifdef __cplusplus
|
|
(void) $[]as_decl_use;
|
|
@%:@else
|
|
(void) $[]as_decl_name;
|
|
@%:@endif
|
|
@%:@endif
|
|
])],
|
|
[AS_VAR_SET([$[]3], [yes])],
|
|
[AS_VAR_SET([$[]3], [no])])])
|
|
AS_LINENO_POP
|
|
])# _AC_CHECK_DECL_BODY
|
|
|
|
# _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
|
|
# INCLUDES)
|
|
# -------------------------------------------------------------
|
|
# Helper to AC_CHECK_DECLS, which generates the check for a single
|
|
# SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
|
|
# ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
|
|
m4_define([_AC_CHECK_DECLS],
|
|
[AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
|
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP(m4_bpatsubst(HAVE_DECL_[$1],[ *(.*])),
|
|
[$ac_have_decl],
|
|
[Define to 1 if you have the declaration of `$1',
|
|
and to 0 if you don't.])]dnl
|
|
[m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
|
|
|
|
])
|
|
|
|
dnl If flex/lex are not found, the top level configure sets LEX to
|
|
dnl "/path_to/missing flex". When AC_PROG_LEX tries to find the flex
|
|
dnl output file, it calls $LEX to do so, but the current lightweight
|
|
dnl "missing" won't create a file. This results in an error.
|
|
dnl Avoid calling the bulk of AC_PROG_LEX when $LEX is "missing".
|
|
AC_DEFUN_ONCE([AC_PROG_LEX],
|
|
[AC_CHECK_PROGS(LEX, flex lex, :)
|
|
case "$LEX" in
|
|
:|*"missing "*) ;;
|
|
*) _AC_PROG_LEX_YYTEXT_DECL ;;
|
|
esac])
|
|
|
|
])
|