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
201 lines
5.3 KiB
Plaintext
201 lines
5.3 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT([GNU Vtable Verification Runtime Library], 1.0,,[libvtv])
|
|
#AC_INIT(package-unused, version-unused, libvtv)
|
|
AC_CONFIG_SRCDIR([vtv_rts.h])
|
|
|
|
AM_ENABLE_MULTILIB(, ..)
|
|
|
|
# -------
|
|
# Options
|
|
# -------
|
|
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
|
|
AC_ARG_ENABLE(version-specific-runtime-libs,
|
|
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
|
|
[case "$enableval" in
|
|
yes) version_specific_libs=yes ;;
|
|
no) version_specific_libs=no ;;
|
|
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
|
|
esac],
|
|
[version_specific_libs=no])
|
|
AC_MSG_RESULT($version_specific_libs)
|
|
|
|
# Do not delete or change the following two lines. For why, see
|
|
# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
|
|
AC_CANONICAL_SYSTEM
|
|
target_alias=${target_alias-$host_alias}
|
|
AC_SUBST(target_alias)
|
|
GCC_LIBSTDCXX_RAW_CXX_FLAGS
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
|
|
AC_MSG_CHECKING([for --enable-vtable-verify])
|
|
AC_ARG_ENABLE(vtable-verify,
|
|
[ --enable-vtable-verify Enable vtable verification feature ],
|
|
[case "$enableval" in
|
|
yes) enable_vtable_verify=yes ;;
|
|
no) enable_vtable_verify=no ;;
|
|
*) enable_vtable_verify=no;;
|
|
esac],
|
|
[enable_vtable_verify=no])
|
|
AC_MSG_RESULT($enable_vtable_verify)
|
|
|
|
# See if supported.
|
|
unset VTV_SUPPORTED
|
|
AC_MSG_CHECKING([for host support for vtable verification])
|
|
. ${srcdir}/configure.tgt
|
|
case ${host} in
|
|
*-*-solaris2*)
|
|
# libvtv requires init priority support, which depends on the linker
|
|
# used on Solaris.
|
|
AC_CACHE_CHECK(for init priority support, libvtv_cv_init_priority, [
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
|
|
[[void ip (void) __attribute__ ((constructor (1)));]])],
|
|
[libgcc_cv_init_priority=yes],[libgcc_cv_init_priority=no])])
|
|
if test x$libvtv_cv_init_priority = xno; then
|
|
VTV_SUPPORTED=no
|
|
fi
|
|
# FIXME: Maybe check for dl_iterate_phdr, too? Should be covered by
|
|
# configure.tgt restricting to libvtv to Solaris 11+.
|
|
;;
|
|
esac
|
|
AC_MSG_RESULT($VTV_SUPPORTED)
|
|
|
|
# Decide if it's usable.
|
|
use_vtable_verify=no
|
|
if test "x$VTV_SUPPORTED" = "xyes"; then
|
|
if test "x$enable_vtable_verify" = "xyes"; then
|
|
use_vtable_verify=yes
|
|
AC_MSG_NOTICE(using vtable verification)
|
|
fi
|
|
fi
|
|
AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $use_vtable_verify = yes)
|
|
|
|
AM_INIT_AUTOMAKE(foreign no-dist)
|
|
AM_MAINTAINER_MODE
|
|
|
|
LIBVTV_CONFIGURE
|
|
|
|
# Calculate toolexeclibdir
|
|
# Also toolexecdir, though it's only used in toolexeclibdir
|
|
case ${version_specific_libs} in
|
|
yes)
|
|
# Need the gcc compiler version to know where to install libraries
|
|
# and header files if --enable-version-specific-runtime-libs option
|
|
# is selected.
|
|
toolexecdir='$(libdir)/gcc/$(target_alias)'
|
|
toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
|
|
;;
|
|
no)
|
|
if test -n "$with_cross_host" &&
|
|
test x"$with_cross_host" != x"no"; then
|
|
# Install a library built with a cross compiler in tooldir, not libdir.
|
|
toolexecdir='$(exec_prefix)/$(target_alias)'
|
|
toolexeclibdir='$(toolexecdir)/lib'
|
|
else
|
|
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
|
|
toolexeclibdir='$(libdir)'
|
|
fi
|
|
multi_os_directory=`$CC -print-multi-os-directory`
|
|
case $multi_os_directory in
|
|
.) ;; # Avoid trailing /.
|
|
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
esac
|
|
;;
|
|
esac
|
|
AC_SUBST(toolexecdir)
|
|
AC_SUBST(toolexeclibdir)
|
|
|
|
AC_GNU_SOURCE
|
|
AC_CHECK_FUNCS([__secure_getenv])
|
|
|
|
AC_GNU_SOURCE
|
|
AC_CHECK_FUNCS([secure_getenv])
|
|
|
|
AC_CHECK_FUNCS([getexecname __fortify_fail])
|
|
|
|
# Check for programs.
|
|
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
|
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
|
AC_PROG_CC
|
|
AC_PROG_CXX
|
|
m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_SUBST(CFLAGS)
|
|
AC_SUBST(CXXFLAGS)
|
|
|
|
# Newer automakes demand CCAS and CCASFLAGS.
|
|
: ${CCAS='$(CC)'}
|
|
: ${CCASFLAGS='$(CFLAGS)'}
|
|
AC_SUBST(CCAS)
|
|
AC_SUBST(CCASFLAGS)
|
|
|
|
AC_CHECK_TOOL(AS, as)
|
|
AC_CHECK_TOOL(AR, ar)
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|
|
|
# Configure libtool
|
|
AC_LIBTOOL_DLOPEN
|
|
AM_PROG_LIBTOOL
|
|
ACX_LT_HOST_FLAGS
|
|
AC_SUBST(enable_shared)
|
|
AC_SUBST(enable_static)
|
|
|
|
# For libtool versioning info, format is CURRENT:REVISION:AGE
|
|
libtool_VERSION=1:0:0
|
|
AC_SUBST(libtool_VERSION)
|
|
|
|
XCFLAGS="-D_GNU_SOURCE -Wall -Wextra -fno-exceptions"
|
|
|
|
# Add CET specific flags if Intel CET is enabled.
|
|
GCC_CET_FLAGS(CET_FLAGS)
|
|
XCFLAGS="$XCFLAGS $CET_FLAGS"
|
|
|
|
AC_SUBST(XCFLAGS)
|
|
|
|
if test "${multilib}" = "yes"; then
|
|
multilib_arg="--enable-multilib"
|
|
else
|
|
multilib_arg=
|
|
fi
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
if test "x$VTV_SUPPORTED" = "xyes"; then
|
|
AC_CONFIG_FILES(AC_FOREACH([DIR], [testsuite], [DIR/Makefile ]),
|
|
[cat > vpsed$$ << \_EOF
|
|
s!`test -f '$<' || echo '$(srcdir)/'`!!
|
|
_EOF
|
|
sed -f vpsed$$ $ac_file > tmp$$
|
|
mv tmp$$ $ac_file
|
|
rm vpsed$$
|
|
echo 'MULTISUBDIR =' >> $ac_file
|
|
ml_norecursion=yes
|
|
. ${multi_basedir}/config-ml.in
|
|
AS_UNSET([ml_norecursion])
|
|
])
|
|
fi
|
|
|
|
case "$target_os" in
|
|
cygwin*|mingw32*)
|
|
vtv_cygmin="yes"
|
|
;;
|
|
*)
|
|
vtv_cygmin="no"
|
|
;;
|
|
esac
|
|
|
|
AM_CONDITIONAL(VTV_CYGMIN, test $vtv_cygmin = yes)
|
|
|
|
AC_CHECK_FUNCS([_obstack_begin])
|
|
AM_CONDITIONAL(VTV_NO_OBSTACK, test $ac_cv_func__obstack_begin = no)
|
|
|
|
# Determine what GCC version number to use in filesystem paths.
|
|
GCC_BASE_VER
|
|
|
|
AC_OUTPUT
|