mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-26 04:25:51 +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
271 lines
5.7 KiB
Bash
Executable File
271 lines
5.7 KiB
Bash
Executable File
#! /bin/sh
|
|
# Wrapper for Microsoft lib.exe
|
|
|
|
me=ar-lib
|
|
scriptversion=2012-03-01.08; # UTC
|
|
|
|
# Copyright (C) 2010-2017 Free Software Foundation, Inc.
|
|
# Written by Peter Rosin <peda@lysator.liu.se>.
|
|
#
|
|
# 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,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# As a special exception to the GNU General Public License, if you
|
|
# distribute this file as part of a program that contains a
|
|
# configuration script generated by Autoconf, you may include it under
|
|
# the same distribution terms that you use for the rest of that program.
|
|
|
|
# This file is maintained in Automake, please report
|
|
# bugs to <bug-automake@gnu.org> or send patches to
|
|
# <automake-patches@gnu.org>.
|
|
|
|
|
|
# func_error message
|
|
func_error ()
|
|
{
|
|
echo "$me: $1" 1>&2
|
|
exit 1
|
|
}
|
|
|
|
file_conv=
|
|
|
|
# func_file_conv build_file
|
|
# Convert a $build file to $host form and store it in $file
|
|
# Currently only supports Windows hosts.
|
|
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 in
|
|
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_at_file at_file operation archive
|
|
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
|
# for each of them.
|
|
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
|
# since the user would need to supply preconverted file names to
|
|
# binutils ar, at least for MinGW.
|
|
func_at_file ()
|
|
{
|
|
operation=$2
|
|
archive=$3
|
|
at_file_contents=`cat "$1"`
|
|
eval set x "$at_file_contents"
|
|
shift
|
|
|
|
for member
|
|
do
|
|
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
|
done
|
|
}
|
|
|
|
case $1 in
|
|
'')
|
|
func_error "no command. Try '$0 --help' for more information."
|
|
;;
|
|
-h | --h*)
|
|
cat <<EOF
|
|
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
|
|
|
Members may be specified in a file named with @FILE.
|
|
EOF
|
|
exit $?
|
|
;;
|
|
-v | --v*)
|
|
echo "$me, version $scriptversion"
|
|
exit $?
|
|
;;
|
|
esac
|
|
|
|
if test $# -lt 3; then
|
|
func_error "you must specify a program, an action and an archive"
|
|
fi
|
|
|
|
AR=$1
|
|
shift
|
|
while :
|
|
do
|
|
if test $# -lt 2; then
|
|
func_error "you must specify a program, an action and an archive"
|
|
fi
|
|
case $1 in
|
|
-lib | -LIB \
|
|
| -ltcg | -LTCG \
|
|
| -machine* | -MACHINE* \
|
|
| -subsystem* | -SUBSYSTEM* \
|
|
| -verbose | -VERBOSE \
|
|
| -wx* | -WX* )
|
|
AR="$AR $1"
|
|
shift
|
|
;;
|
|
*)
|
|
action=$1
|
|
shift
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
orig_archive=$1
|
|
shift
|
|
func_file_conv "$orig_archive"
|
|
archive=$file
|
|
|
|
# strip leading dash in $action
|
|
action=${action#-}
|
|
|
|
delete=
|
|
extract=
|
|
list=
|
|
quick=
|
|
replace=
|
|
index=
|
|
create=
|
|
|
|
while test -n "$action"
|
|
do
|
|
case $action in
|
|
d*) delete=yes ;;
|
|
x*) extract=yes ;;
|
|
t*) list=yes ;;
|
|
q*) quick=yes ;;
|
|
r*) replace=yes ;;
|
|
s*) index=yes ;;
|
|
S*) ;; # the index is always updated implicitly
|
|
c*) create=yes ;;
|
|
u*) ;; # TODO: don't ignore the update modifier
|
|
v*) ;; # TODO: don't ignore the verbose modifier
|
|
*)
|
|
func_error "unknown action specified"
|
|
;;
|
|
esac
|
|
action=${action#?}
|
|
done
|
|
|
|
case $delete$extract$list$quick$replace,$index in
|
|
yes,* | ,yes)
|
|
;;
|
|
yesyes*)
|
|
func_error "more than one action specified"
|
|
;;
|
|
*)
|
|
func_error "no action specified"
|
|
;;
|
|
esac
|
|
|
|
if test -n "$delete"; then
|
|
if test ! -f "$orig_archive"; then
|
|
func_error "archive not found"
|
|
fi
|
|
for member
|
|
do
|
|
case $1 in
|
|
@*)
|
|
func_at_file "${1#@}" -REMOVE "$archive"
|
|
;;
|
|
*)
|
|
func_file_conv "$1"
|
|
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
|
;;
|
|
esac
|
|
done
|
|
|
|
elif test -n "$extract"; then
|
|
if test ! -f "$orig_archive"; then
|
|
func_error "archive not found"
|
|
fi
|
|
if test $# -gt 0; then
|
|
for member
|
|
do
|
|
case $1 in
|
|
@*)
|
|
func_at_file "${1#@}" -EXTRACT "$archive"
|
|
;;
|
|
*)
|
|
func_file_conv "$1"
|
|
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
|
;;
|
|
esac
|
|
done
|
|
else
|
|
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
|
do
|
|
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
|
done
|
|
fi
|
|
|
|
elif test -n "$quick$replace"; then
|
|
if test ! -f "$orig_archive"; then
|
|
if test -z "$create"; then
|
|
echo "$me: creating $orig_archive"
|
|
fi
|
|
orig_archive=
|
|
else
|
|
orig_archive=$archive
|
|
fi
|
|
|
|
for member
|
|
do
|
|
case $1 in
|
|
@*)
|
|
func_file_conv "${1#@}"
|
|
set x "$@" "@$file"
|
|
;;
|
|
*)
|
|
func_file_conv "$1"
|
|
set x "$@" "$file"
|
|
;;
|
|
esac
|
|
shift
|
|
shift
|
|
done
|
|
|
|
if test -n "$orig_archive"; then
|
|
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
|
else
|
|
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
|
fi
|
|
|
|
elif test -n "$list"; then
|
|
if test ! -f "$orig_archive"; then
|
|
func_error "archive not found"
|
|
fi
|
|
$AR -NOLOGO -LIST "$archive" || exit $?
|
|
fi
|