. * config-ml.in: Sync with gcc sources.
* config.guess: Likewise.
* config.sub: Likewise.
* configure.ac: Likewise.
* configure: Regenerate.
config * Sync with GCC sources:
2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
* gcc-plugin.m4: Add support for MinGW.
2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
* cet.m4: New file.
2017-11-15 Alexandre Oliva <aoliva@redhat.com>
* bootstrap-debug-lean.mk (do-compare): Use the
contrib/compare-debug script.
2017-10-24 H.J. Lu <hongjiu.lu@intel.com>
* bootstrap-cet.mk: New file.
2017-06-19 Martin Liska <mliska@suse.cz>
* bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages.
* bootstrap-lto.mk: Likewise.
2017-06-03 Eric Botcazou <ebotcazou@adacore.com>
* mt-android: New file.
2017-02-13 Richard Biener <rguenther@suse.de>
* isl.m4: Remove support for ISL 0.14.
2017-01-19 Uros Bizjak <ubizjak@gmail.com>
PR target/78478
* ax_check_define.m4: New file.
2017-01-17 Jakub Jelinek <jakub@redhat.com>
PR other/79046
* acx.m4 (GCC_BASE_VER): New m4 function.
(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
--with-gcc-major-version-only use just major number from BASE-VER.
2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR go/78978
* hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
+2018-01-10 Nick Clifton <nickc@redhat.com>
+
+ * config-ml.in: Sync with gcc sources.
+ * config.guess: Likewise.
+ * config.sub: Likewise.
+ * configure.ac: Likewise.
+
2017-12-14 Nick Clifton <nickc@redhat.com>
* COPYING.LIBGLOSS: Update address of FSF in copyright notice.
+2018-01-10 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Note that it is now the configure.ac file and not
+ the configure.in file that needs to be kept in sync with gcc.
+ Add a note about sending patches for libiberty to gcc.
+
2018-01-03 Nick Clifton <nickc@redhat.com>
* objcopy.c (merge_gnu_build_notes): Add cast to maximum address
config-patches@gnu.org
and not to the binutils lists. Patches to the other top level
-configure files (configure, configure.in, config-ml.in) should
+configure files (configure, configure.ac, config-ml.in) should
be sent to the binutils lists, and copied to the gcc and gdb
lists as well (gcc-patches@gcc.gnu.org and
gdb-patches@sourceware.org).
+Patches to the libiberty sources should be sent to
+gcc-patches@gcc.gnu.org.
+
--------- Blanket Write Privs ---------
The following people have permission to check patches into the
ADAFLAGS="$(ADAFLAGS) $${flags}" \
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
- GCJFLAGS="$(GCJFLAGS) $${flags}" \
GOCFLAGS="$(GOCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
break
fi
done
- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
if [ "${with_target_subdir}" = "." ]; then
CC_=$CC' '
CXX_=$CXX' '
F77_=$F77' '
- GCJ_=$GCJ' '
GFORTRAN_=$GFORTRAN' '
GOC_=$GOC' '
else
esac
done
- GCJ_=
- for arg in ${GCJ}; do
- case $arg in
- -[BIL]"${ML_POPDIR}"/*)
- GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
- "${ML_POPDIR}"/*)
- GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
- *)
- GCJ_="${GCJ_}${arg} " ;;
- esac
- done
-
GFORTRAN_=
for arg in ${GFORTRAN}; do
case $arg in
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-03-22'
+timestamp='2018-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
# 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/>.
+# along with this program; if not, see <https://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
# 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
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 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."
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
exit ;;
+ *:MidnightBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
+ *:Redox:*:*)
+ echo ${UNAME_MACHINE}-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
- UNAME_PROCESSOR=x86_64 ;;
+ UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ i*86:*:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
+ NEO-*:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
+ NSR-*:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSX-?:NONSTOP_KERNEL:*:*)
+ NSX-*:NONSTOP_KERNEL:*:*)
echo nsx-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
exit ;;
esac
+echo "$0: unable to guess system type" >&2
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
cat >&2 <<EOF
-$0: unable to guess system type
This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ https://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
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-04-02'
+timestamp='2018-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
# 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/>.
+# along with this program; if not, see <https://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
# 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
+# https://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
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 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."
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
-psos*)
os=-psos
;;
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| wasm32 \
- | we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
basic_machine=rs6000-bull
os=-bosx
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
os=-sysv3
;;
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
-nextstep* )
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ x64)
+ basic_machine=x86_64-pc
+ ;;
xbox)
basic_machine=i686-pc
os=-mingw32
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases that might get confused
+ # with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
+ # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
-nova*)
os=-rtmk-nova
;;
- -ns2 )
+ -ns2)
os=-nextstep2
;;
-nsk*)
-dicos*)
os=-dicos
;;
+ -pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=-eabi
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
-nacl*)
;;
-ios)
m88k-omron*)
os=-luna
;;
- *-next )
+ *-next)
os=-nextstep
;;
*-sequent)
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
+2018-01-10 Nick Clifton <nickc@redhat.com>
+
+ * Sync with GCC sources:
+
+ 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
+
+ * gcc-plugin.m4: Add support for MinGW.
+
+ 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ * cet.m4: New file.
+
+ 2017-11-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * bootstrap-debug-lean.mk (do-compare): Use the
+ contrib/compare-debug script.
+
+ 2017-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bootstrap-cet.mk: New file.
+
+ 2017-06-19 Martin Liska <mliska@suse.cz>
+
+ * bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages.
+ * bootstrap-lto.mk: Likewise.
+
+ 2017-06-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * mt-android: New file.
+
+ 2017-02-13 Richard Biener <rguenther@suse.de>
+
+ * isl.m4: Remove support for ISL 0.14.
+
+ 2017-01-19 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/78478
+ * ax_check_define.m4: New file.
+
+ 2017-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/79046
+ * acx.m4 (GCC_BASE_VER): New m4 function.
+ (ACX_TOOL_DIRS): Require GCC_BASE_VER, for
+ --with-gcc-major-version-only use just major number from BASE-VER.
+
+ 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR go/78978
+ * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
+
2017-01-05 Alan Modra <amodra@gmail.com>
* picflag.m4: Import from gcc.
])
+dnl ####
+dnl # GCC_BASE_VER
+dnl # Determine GCC version number to use in compiler directories.
+
+AC_DEFUN([GCC_BASE_VER],
+[
+ get_gcc_base_ver="cat"
+ AC_ARG_WITH(gcc-major-version-only,
+ [AS_HELP_STRING([--with-gcc-major-version-only], [use only GCC major number in filesystem paths])],
+ [if test x$with_gcc_major_version_only = xyes ; then
+ changequote(,)dnl
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ changequote([,])dnl
+ fi
+ ])
+ AC_SUBST(get_gcc_base_ver)
+])
+
+
AC_DEFUN([ACX_TOOL_DIRS], [
AC_REQUIRE([ACX_PATH_SEP])
+AC_REQUIRE([GCC_BASE_VER])
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
gcc_cv_tool_prefix=$ac_default_prefix
# case, if there is no compiler in the tree nobody should use
# AS_FOR_TARGET and LD_FOR_TARGET.
if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
- gcc_version=`cat $srcdir/gcc/BASE-VER`
+ if test x$with_gcc_major_version_only = xyes ; then
+ changequote(,)dnl
+ gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
+ changequote([,])dnl
+ else
+ gcc_version=`cat $srcdir/gcc/BASE-VER`
+ fi
gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_define.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
+# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
+#
+# DESCRIPTION
+#
+# Complements AC_CHECK_FUNC but it does not check for a function but for a
+# define to exist. Consider a usage like:
+#
+# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 8
+
+AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
+AC_DEFUN([AC_CHECK_DEFINE],[
+AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
+AC_CACHE_CHECK([for $1 defined], ac_var,
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ #ifdef $1
+ int ok;
+ #else
+ choke me
+ #endif
+]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
+AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
+AS_VAR_POPDEF([ac_var])dnl
+])
+
+AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
+AC_DEFUN([AX_CHECK_DEFINE],[
+AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
+AC_CACHE_CHECK([for $2 defined in $1], ac_var,
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
+ #ifdef $2
+ int ok;
+ #else
+ choke me
+ #endif
+]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
+AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
+AS_VAR_POPDEF([ac_var])dnl
+])
+
+AC_DEFUN([AX_CHECK_FUNC],
+[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
+AC_CACHE_CHECK([for $2], ac_var,
+dnl AC_LANG_FUNC_LINK_TRY
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
+ #undef $2
+ char $2 ();],[
+ char (*f) () = $2;
+ return f != $2; ])],
+ [AS_VAR_SET(ac_var, yes)],
+ [AS_VAR_SET(ac_var, no)])])
+AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
+AS_VAR_POPDEF([ac_var])dnl
+])# AC_CHECK_FUNC
--- /dev/null
+# This option enables -fcf-protection -mcet for stage2 and stage3.
+
+STAGE2_CFLAGS += -fcf-protection -mcet
+STAGE3_CFLAGS += -fcf-protection -mcet
STAGE2_CFLAGS += -fcompare-debug=
STAGE3_CFLAGS += -fcompare-debug
+do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
-STAGEprofile_CFLAGS += -fno-lto
+STAGEprofile_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEtrain_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEfeedback_CFLAGS += -flto=jobserver -frandom-seed=1
STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1
STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1
-STAGEprofile_CFLAGS += -fno-lto
+STAGEprofile_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEtrain_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEfeedback_CFLAGS += -flto=jobserver -frandom-seed=1
# assumes the host supports the linker plugin
LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/
--- /dev/null
+dnl
+dnl GCC_CET_FLAGS
+dnl (SHELL-CODE_HANDLER)
+dnl
+AC_DEFUN([GCC_CET_FLAGS],[dnl
+GCC_ENABLE(cet, default, ,[enable Intel CET in target libraries],
+ permit yes|no|default)
+case "$host" in
+ i[[34567]]86-*-linux* | x86_64-*-linux*)
+ case "$enable_cet" in
+ default)
+ # Check if assembler supports CET.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [asm ("setssbsy");])],
+ [enable_cet=yes],
+ [enable_cet=no])
+ ;;
+ yes)
+ # Check if assembler supports CET.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [asm ("setssbsy");])],
+ [],
+ [AC_MSG_ERROR([assembler with CET support is required for --enable-cet])])
+ ;;
+ esac
+ ;;
+ *)
+ enable_cet=no
+ ;;
+esac
+if test x$enable_cet = xyes; then
+ $1="-fcf-protection -mcet"
+fi
+])
enable_plugin=yes; default_plugin=yes)
pluginlibs=
+ plugin_check=yes
case "${host}" in
+ *-*-mingw*)
+ # Since plugin support under MinGW is not as straightforward as on
+ # other platforms (e.g., we have to link import library, etc), we
+ # only enable it if explicitly requested.
+ if test x"$default_plugin" = x"yes"; then
+ enable_plugin=no
+ elif test x"$enable_plugin" = x"yes"; then
+ # Use make's target variable to derive import library name.
+ pluginlibs='-Wl,--export-all-symbols -Wl,--out-implib=[$]@.a'
+ plugin_check=no
+ fi
+ ;;
*-*-darwin*)
if test x$build = x$host; then
export_sym_check="nm${exeext} -g"
;;
esac
- if test x"$enable_plugin" = x"yes"; then
+ if test x"$enable_plugin" = x"yes" -a x"$plugin_check" = x"yes"; then
AC_MSG_CHECKING([for exported symbols])
if test "x$export_sym_check" != x; then
--- /dev/null
+dnl
+dnl Check if the assembler used supports disabling generation of hardware
+dnl capabilities. This is only supported by Solaris as at the moment.
+dnl
+dnl Defines:
+dnl HWCAP_CFLAGS='-Wa,-nH' if possible.
+dnl
+AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [
+ test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS=''
+
+ # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH
+ # with a different meaning.
+ case ${target_os} in
+ solaris2*)
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wa,-nH"
+
+ AC_MSG_CHECKING([for as that supports -Wa,-nH])
+ AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
+ if test "$ac_hwcap_flags" = "yes"; then
+ HWCAP_CFLAGS="-Wa,-nH $HWCAP_CFLAGS"
+ fi
+ AC_MSG_RESULT($ac_hwcap_flags)
+
+ CFLAGS="$ac_save_CFLAGS"
+ ;;
+ esac
+
+ AC_SUBST(HWCAP_CFLAGS)
+])
+
+
+dnl
+dnl Check if the linker used supports linker maps to clear hardware
+dnl capabilities. This is only supported on Solaris at the moment.
+dnl
+dnl Defines:
+dnl HWCAP_LDFLAGS=-mclear-hwcap if possible
+dnl LD (as a side effect of testing)
+dnl
+AC_DEFUN([GCC_CHECK_LINKER_HWCAP], [
+ test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
+ AC_REQUIRE([AC_PROG_LD])
+
+ ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LFLAGS -mclear-hwcap"
+
+ AC_MSG_CHECKING([for -mclear-hwcap])
+ AC_TRY_LINK([], [return 0;], [ac_hwcap_ldflags=yes],[ac_hwcap_ldflags=no])
+ if test "$ac_hwcap_ldflags" = "yes"; then
+ HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS"
+ fi
+ AC_MSG_RESULT($ac_hwcap_ldflags)
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+ AC_SUBST(HWCAP_LDFLAGS)
+
+ AM_CONDITIONAL(HAVE_HWCAP, test $ac_hwcap_ldflags != no)
+])
LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- 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 ());],
+ AC_MSG_CHECKING([for isl 0.15 or later])
+ AC_TRY_LINK([#include <isl/schedule.h>],
+ [isl_options_set_schedule_serialize_sccs (NULL, 0);],
[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])
+ AC_MSG_RESULT([required isl version is 0.15 or later])
fi
CFLAGS=$_isl_saved_CFLAGS
--- /dev/null
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE -fexceptions -frtti
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
-host_shared
stage2_werror_flag
stage1_checking
stage1_cflags
CFLAGS_FOR_TARGET
DEBUG_PREFIX_CFLAGS_FOR_TARGET
SYSROOT_CFLAGS_FOR_TARGET
+get_gcc_base_ver
extra_host_zlib_configure_flags
extra_host_libiberty_configure_flags
stage1_languages
+host_shared
extra_linker_plugin_flags
extra_linker_plugin_configure_flags
islinc
isllibs
-islver
poststage1_ldflags
poststage1_libs
stage1_ldflags
enable_lto
enable_linker_plugin_configure_flags
enable_linker_plugin_flags
+enable_host_shared
enable_stage1_languages
enable_objc_gc
with_target_bdw_gc
with_target_bdw_gc_include
with_target_bdw_gc_lib
+with_gcc_major_version_only
with_build_sysroot
with_debug_prefix_map
with_build_config
enable_maintainer_mode
enable_stage1_checking
enable_werror
-enable_host_shared
'
ac_precious_vars='build_alias
host_alias
--enable-linker-plugin-flags=FLAGS
additional flags for configuring and building linker
plugins [none]
+ --enable-host-shared build host code as shared libraries
--enable-stage1-languages[=all]
choose additional languages to build during stage1.
Mostly useful for compiler development
choose additional checking for stage1 of the
compiler
--enable-werror enable -Werror in bootstrap stage2 and later
- --enable-host-shared build host code as shared libraries
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
files
--with-target-bdw-gc-lib=PATHLIST
specify directories for installed bdw-gc library
+ --with-gcc-major-version-only
+ use only GCC major number in filesystem paths
--with-build-sysroot=SYSROOT
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
target-libgloss \
target-newlib \
target-libgomp \
- target-libcilkrts \
target-liboffloadmic \
+ target-libhsail-rt \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
+ | *-*-solaris2* | *-*-nto* | *-*-nacl*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)
;;
fi
fi
-# Disable libcilkrts on unsupported systems.
-if test -d ${srcdir}/libcilkrts; then
- if test x$enable_libcilkrts = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcilkrts support" >&5
-$as_echo_n "checking for libcilkrts support... " >&6; }
- if (srcdir=${srcdir}/libcilkrts; \
- . ${srcdir}/configure.tgt; \
- test -n "$UNSUPPORTED")
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- noconfigdirs="$noconfigdirs target-libcilkrts"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- fi
-fi
-
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
fi
fi
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+ if test x$enable_libhsail_rt = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhsail-rt support" >&5
+$as_echo_n "checking for libhsail-rt support... " >&6; }
+ if (srcdir=${srcdir}/libhsail-rt; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ unsupported_languages="$unsupported_languages brig"
+ # This implicitly disables also target-libhsail-rt as it won't
+ # get added to the build without BRIG FE.
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
# Disable libquadmath for some systems.
noconfigdirs="$noconfigdirs target-libffi"
;;
powerpc-*-aix*)
- # copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs target-libffi"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs target-libffi"
;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libffi"
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-mingw*)
unsupported_languages="$unsupported_languages go"
;;
esac
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
- *-*-aix*)
- noconfigdirs="$noconfigdirs target-libgo"
- ;;
esac
fi
LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16, 0.15, or deprecated 0.14" >&5
-$as_echo_n "checking for isl 0.16, 0.15, or deprecated 0.14... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.15 or later" >&5
+$as_echo_n "checking for isl 0.15 or later... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <isl/ctx.h>
+#include <isl/schedule.h>
int
main ()
{
-isl_ctx_get_max_operations (isl_ctx_alloc ());
+isl_options_set_schedule_serialize_sccs (NULL, 0);
;
return 0;
}
$as_echo "$gcc_cv_isl" >&6; }
if test "${gcc_cv_isl}" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&5
-$as_echo "recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16 or 0.15" >&5
-$as_echo_n "checking for isl 0.16 or 0.15... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <isl/schedule.h>
-int
-main ()
-{
-isl_options_set_schedule_serialize_sccs (NULL, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_has_isl_options_set_schedule_serialize_sccs=yes
-else
- ac_has_isl_options_set_schedule_serialize_sccs=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
-$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
-
- if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
- islver="0.15"
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: required isl version is 0.15 or later" >&5
+$as_echo "required isl version is 0.15 or later" >&6; }
fi
CFLAGS=$_isl_saved_CFLAGS
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
+ *-apple-darwin[912]* | *-cygwin* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
+# Enable --enable-host-shared.
+# Checked early to determine whether jit is an 'all' language
+# Check whether --enable-host-shared was given.
+if test "${enable_host_shared+set}" = set; then :
+ enableval=$enable_host_shared; host_shared=$enableval
+else
+ host_shared=no
+fi
+
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
enable_languages="${LANGUAGES}"
echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
- enable_languages=all
+ enable_languages=default
fi
else
if test x"${enable_languages}" = x ||
language=
lang_requires=
lang_requires_boot_languages=
- . ${lang_frag}
+ # set srcdir during sourcing lang_frag to the gcc dir.
+ # Sadly overriding srcdir on the . line doesn't work in plain sh as it
+ # polutes this shell
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
for other in ${lang_requires} ${lang_requires_boot_languages}; do
case ,${enable_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*,$language,*)
echo " \`$other' language required by \`$language'; enabling" 1>&2
if test "$other" != "c"; then
case ,${enable_stage1_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*)
case ,${enable_languages}, in
esac
fi
- missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ missing_languages=`echo ",$enable_languages," | sed -e s/,default,/,/ -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
enabled_target_libs=
subdir_requires=
boot_language=no
build_by_default=yes
- . ${lang_frag}
+ # set srcdir during sourcing. See above about save & restore
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
if test x${language} = x; then
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
fi
add_this_lang=no
- case ,${enable_languages}, in
- *,${language},*)
- # Language was explicitly selected; include it
- # unless it is C, which is enabled by default.
- if test "$language" != "c"; then
+ # C is always enabled, so no need to add it again
+ if test "$language" != "c"; then
+ case ,${enable_languages}, in
+ *,${language},*)
+ # Language was explicitly selected; include it
add_this_lang=yes
- fi
- ;;
- *,all,*)
- # 'all' was selected, select it if it is a default language
- if test "$language" != "c"; then
+ ;;
+ *,all,*)
+ # All languages are enabled
+ add_this_lang=all
+ ;;
+ *,default,*)
+ # 'default' was selected, select it if it is a default language
add_this_lang=${build_by_default}
- fi
- ;;
- esac
+ ;;
+ esac
+ fi
# Disable languages that need other directories if these aren't available.
for i in $subdir_requires; do
test -f "$srcdir/gcc/$i/config-lang.in" && continue
- case ,${enable_languages}, in
- *,${language},*)
+ case ${add_this_lang} in
+ yes)
# Specifically requested language; tell them.
as_fn_error "The gcc/$i directory contains parts of $language but is missing" "$LINENO" 5
;;
+ all)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The gcc/$i directory contains parts of $language but is missing" >&5
+$as_echo "$as_me: WARNING: The gcc/$i directory contains parts of $language but is missing" >&2;}
+ add_this_lang=unsupported
+ ;;
*)
# Silently disable.
add_this_lang=unsupported
done
# Disable Ada if no preexisting GNAT is available.
- case ,${enable_languages},:${language}:${have_gnat} in
- *,${language},*:ada:no)
+ case ${add_this_lang}:${language}:${have_gnat} in
+ yes:ada:no)
# Specifically requested language; tell them.
as_fn_error "GNAT is required to build $language" "$LINENO" 5
;;
+ all:ada:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNAT is required to build $language" >&5
+$as_echo "$as_me: WARNING: GNAT is required to build $language" >&2;}
+ add_this_lang=unsupported
+ ;;
*:ada:no)
# Silently disable.
add_this_lang=unsupported
;;
esac
- # Disable a language that is unsupported by the target.
- case " $unsupported_languages " in
- *" $language "*)
+ # Disable jit if -enable-host-shared not specified
+ case ${add_this_lang}:${language}:${host_shared} in
+ yes:jit:no)
+ # PR jit/64780: explicitly specify --enable-host-shared
+ as_fn_error "
+Enabling language \"jit\" requires --enable-host-shared.
+
+--enable-host-shared typically slows the rest of the compiler down by
+a few %, so you must explicitly enable it.
+
+If you want to build both the jit and the regular compiler, it is often
+best to do this via two separate configure/builds, in separate
+directories, to avoid imposing the performance cost of
+--enable-host-shared on the regular compiler." "$LINENO" 5
+ ;;
+ all:jit:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-host-shared required to build $language" >&5
+$as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2;}
+ add_this_lang=unsupported
+ ;;
+ *:jit:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+
+ # Disable a language that is unsupported by the target.
+ case "${add_this_lang}: $unsupported_languages " in
+ no:*) ;;
+ unsupported:*) ;;
+ *:*" $language "*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${language} not supported for this target" >&5
+$as_echo "$as_me: WARNING: ${language} not supported for this target" >&2;}
add_this_lang=unsupported
;;
esac
noconfigdirs="$noconfigdirs $lang_dirs"
potential_languages="${potential_languages}${language},"
;;
- yes)
+ all|yes)
new_enable_languages="${new_enable_languages}${language},"
potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
fi
esac
-# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
+# Disable libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
*,c++,*)
- # Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
+ # Disable libitm, libsanitizer if we're not building libstdc++
case "${noconfigdirs}" in
*target-libstdc++-v3*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
+ noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
;;
*) ;;
esac
;;
*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
+ noconfigdirs="$noconfigdirs target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac
fi
+ get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+ withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ fi
+
+fi
+
+
+
+
+
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
# case, if there is no compiler in the tree nobody should use
# AS_FOR_TARGET and LD_FOR_TARGET.
if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
- gcc_version=`cat $srcdir/gcc/BASE-VER`
+ if test x$with_gcc_major_version_only = xyes ; then
+ gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
+ else
+ gcc_version=`cat $srcdir/gcc/BASE-VER`
+ fi
gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
nios2-*-elf*)
target_makefile_frag="config/mt-nios2-elf"
;;
+ *-*-linux-android*)
+ target_makefile_frag="config/mt-android"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror;
-else
- if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
- enable_werror=yes
-else
- enable_werror=no
-fi
-fi
-
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
esac
-
-# Enable --enable-host-shared.
-# Check whether --enable-host-shared was given.
-if test "${enable_host_shared+set}" = set; then :
- enableval=$enable_host_shared; host_shared=$enableval
else
- host_shared=no
-fi
+if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ stage2_werror_flag="--enable-werror-always" ;;
+ "")
+ stage2_werror_flag="--enable-werror-always" ;;
+ esac
+fi
+fi
-# PR jit/64780: Require the user to explicitly specify
-# --enable-host-shared if the jit is enabled, hinting
-# that they might want to do a separate configure/build of
-# the jit, to avoid users from slowing down the rest of the
-# compiler by enabling the jit.
-if test ${host_shared} = "no" ; then
- case "${enable_languages}" in
- *jit*)
- as_fn_error "
-Enabling language \"jit\" requires --enable-host-shared.
---enable-host-shared typically slows the rest of the compiler down by
-a few %, so you must explicitly enable it.
-If you want to build both the jit and the regular compiler, it is often
-best to do this via two separate configure/builds, in separate
-directories, to avoid imposing the performance cost of
---enable-host-shared on the regular compiler." "$LINENO" 5
- ;;
- *)
- ;;
- esac
-fi
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
case "$target" in
hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;;
+ hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/* | gcc/function-tests.o" ;;
powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;;
esac
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
-# 2014, 2015, 2016, 2017 Free Software Foundation, Inc.
+# 2014, 2015, 2016 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
target-libgloss \
target-newlib \
target-libgomp \
- target-libcilkrts \
target-liboffloadmic \
+ target-libhsail-rt \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
+ | *-*-solaris2* | *-*-nto* | *-*-nacl*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)
;;
fi
fi
-# Disable libcilkrts on unsupported systems.
-if test -d ${srcdir}/libcilkrts; then
- if test x$enable_libcilkrts = x; then
- AC_MSG_CHECKING([for libcilkrts support])
- if (srcdir=${srcdir}/libcilkrts; \
- . ${srcdir}/configure.tgt; \
- test -n "$UNSUPPORTED")
- then
- AC_MSG_RESULT([no])
- noconfigdirs="$noconfigdirs target-libcilkrts"
- else
- AC_MSG_RESULT([yes])
- fi
- fi
-fi
-
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
fi
fi
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+ if test x$enable_libhsail_rt = x; then
+ AC_MSG_CHECKING([for libhsail-rt support])
+ if (srcdir=${srcdir}/libhsail-rt; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ unsupported_languages="$unsupported_languages brig"
+ # This implicitly disables also target-libhsail-rt as it won't
+ # get added to the build without BRIG FE.
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
# Disable libquadmath for some systems.
noconfigdirs="$noconfigdirs target-libffi"
;;
powerpc-*-aix*)
- # copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs target-libffi"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs target-libffi"
;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libffi"
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-mingw*)
unsupported_languages="$unsupported_languages go"
;;
esac
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
- *-*-aix*)
- noconfigdirs="$noconfigdirs target-libgo"
- ;;
esac
fi
build_lto_plugin=yes
],[if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
+ *-apple-darwin[[912]]* | *-cygwin* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
extra_linker_plugin_flags=)
AC_SUBST(extra_linker_plugin_flags)
+# Enable --enable-host-shared.
+# Checked early to determine whether jit is an 'all' language
+AC_ARG_ENABLE(host-shared,
+[AS_HELP_STRING([--enable-host-shared],
+ [build host code as shared libraries])],
+[host_shared=$enableval], [host_shared=no])
+AC_SUBST(host_shared)
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
enable_languages="${LANGUAGES}"
echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
- enable_languages=all
+ enable_languages=default
fi
else
if test x"${enable_languages}" = x ||
language=
lang_requires=
lang_requires_boot_languages=
- . ${lang_frag}
+ # set srcdir during sourcing lang_frag to the gcc dir.
+ # Sadly overriding srcdir on the . line doesn't work in plain sh as it
+ # polutes this shell
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
for other in ${lang_requires} ${lang_requires_boot_languages}; do
case ,${enable_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*,$language,*)
echo " \`$other' language required by \`$language'; enabling" 1>&2
if test "$other" != "c"; then
case ,${enable_stage1_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*)
case ,${enable_languages}, in
esac
fi
- missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ missing_languages=`echo ",$enable_languages," | sed -e s/,default,/,/ -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
enabled_target_libs=
subdir_requires=
boot_language=no
build_by_default=yes
- . ${lang_frag}
+ # set srcdir during sourcing. See above about save & restore
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
if test x${language} = x; then
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
fi
add_this_lang=no
- case ,${enable_languages}, in
- *,${language},*)
- # Language was explicitly selected; include it
- # unless it is C, which is enabled by default.
- if test "$language" != "c"; then
+ # C is always enabled, so no need to add it again
+ if test "$language" != "c"; then
+ case ,${enable_languages}, in
+ *,${language},*)
+ # Language was explicitly selected; include it
add_this_lang=yes
- fi
- ;;
- *,all,*)
- # 'all' was selected, select it if it is a default language
- if test "$language" != "c"; then
+ ;;
+ *,all,*)
+ # All languages are enabled
+ add_this_lang=all
+ ;;
+ *,default,*)
+ # 'default' was selected, select it if it is a default language
add_this_lang=${build_by_default}
- fi
- ;;
- esac
+ ;;
+ esac
+ fi
# Disable languages that need other directories if these aren't available.
for i in $subdir_requires; do
test -f "$srcdir/gcc/$i/config-lang.in" && continue
- case ,${enable_languages}, in
- *,${language},*)
+ case ${add_this_lang} in
+ yes)
# Specifically requested language; tell them.
AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing])
;;
+ all)
+ AC_MSG_WARN([The gcc/$i directory contains parts of $language but is missing])
+ add_this_lang=unsupported
+ ;;
*)
# Silently disable.
add_this_lang=unsupported
done
# Disable Ada if no preexisting GNAT is available.
- case ,${enable_languages},:${language}:${have_gnat} in
- *,${language},*:ada:no)
+ case ${add_this_lang}:${language}:${have_gnat} in
+ yes:ada:no)
# Specifically requested language; tell them.
AC_MSG_ERROR([GNAT is required to build $language])
;;
+ all:ada:no)
+ AC_MSG_WARN([GNAT is required to build $language])
+ add_this_lang=unsupported
+ ;;
*:ada:no)
# Silently disable.
add_this_lang=unsupported
;;
esac
- # Disable a language that is unsupported by the target.
- case " $unsupported_languages " in
- *" $language "*)
+ # Disable jit if -enable-host-shared not specified
+ case ${add_this_lang}:${language}:${host_shared} in
+ yes:jit:no)
+ # PR jit/64780: explicitly specify --enable-host-shared
+ AC_MSG_ERROR([
+Enabling language "jit" requires --enable-host-shared.
+
+--enable-host-shared typically slows the rest of the compiler down by
+a few %, so you must explicitly enable it.
+
+If you want to build both the jit and the regular compiler, it is often
+best to do this via two separate configure/builds, in separate
+directories, to avoid imposing the performance cost of
+--enable-host-shared on the regular compiler.])
+ ;;
+ all:jit:no)
+ AC_MSG_WARN([--enable-host-shared required to build $language])
+ add_this_lang=unsupported
+ ;;
+ *:jit:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+
+ # Disable a language that is unsupported by the target.
+ case "${add_this_lang}: $unsupported_languages " in
+ no:*) ;;
+ unsupported:*) ;;
+ *:*" $language "*)
+ AC_MSG_WARN([${language} not supported for this target])
add_this_lang=unsupported
;;
esac
noconfigdirs="$noconfigdirs $lang_dirs"
potential_languages="${potential_languages}${language},"
;;
- yes)
+ all|yes)
new_enable_languages="${new_enable_languages}${language},"
potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
fi
esac
-# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
+# Disable libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
*,c++,*)
- # Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
+ # Disable libitm, libsanitizer if we're not building libstdc++
case "${noconfigdirs}" in
*target-libstdc++-v3*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
+ noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
;;
*) ;;
esac
;;
*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
+ noconfigdirs="$noconfigdirs target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac
nios2-*-elf*)
target_makefile_frag="config/mt-nios2-elf"
;;
+ *-*-linux-android*)
+ target_makefile_frag="config/mt-android"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
# Enable -Werror in bootstrap stage2 and later.
AC_ARG_ENABLE(werror,
[AS_HELP_STRING([--enable-werror],
- [enable -Werror in bootstrap stage2 and later])], [],
-[if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
- enable_werror=yes
-else
- enable_werror=no
-fi])
+ [enable -Werror in bootstrap stage2 and later])],
+[
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
esac
-AC_SUBST(stage2_werror_flag)
-
-# Enable --enable-host-shared.
-AC_ARG_ENABLE(host-shared,
-[AS_HELP_STRING([--enable-host-shared],
- [build host code as shared libraries])],
-[host_shared=$enableval], [host_shared=no])
-AC_SUBST(host_shared)
-
-# PR jit/64780: Require the user to explicitly specify
-# --enable-host-shared if the jit is enabled, hinting
-# that they might want to do a separate configure/build of
-# the jit, to avoid users from slowing down the rest of the
-# compiler by enabling the jit.
-if test ${host_shared} = "no" ; then
- case "${enable_languages}" in
- *jit*)
- AC_MSG_ERROR([
-Enabling language "jit" requires --enable-host-shared.
-
---enable-host-shared typically slows the rest of the compiler down by
-a few %, so you must explicitly enable it.
-
-If you want to build both the jit and the regular compiler, it is often
-best to do this via two separate configure/builds, in separate
-directories, to avoid imposing the performance cost of
---enable-host-shared on the regular compiler.])
- ;;
- *)
- ;;
+],
+[
+if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ stage2_werror_flag="--enable-werror-always" ;;
+ "")
+ stage2_werror_flag="--enable-werror-always" ;;
esac
fi
+])
+
+AC_SUBST(stage2_werror_flag)
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
case "$target" in
hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;;
+ hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/* | gcc/function-tests.o" ;;
powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;;
esac
AC_SUBST(compare_exclusions)