diff options
author | Nick Clifton <nickc@redhat.com> | 2018-01-10 15:29:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-01-10 15:29:21 +0000 |
commit | bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16 (patch) | |
tree | be4f62c520eb0b0652899b45cac10b2d9e92db0f /config | |
parent | 2a8ae7146cacb006105e2e9c6f4635aca543e7ec (diff) | |
download | fsf-binutils-gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.zip fsf-binutils-gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.gz fsf-binutils-gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.bz2 |
Update top level configure files by synchronizing them with gcc.
. * 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.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 51 | ||||
-rw-r--r-- | config/acx.m4 | 28 | ||||
-rw-r--r-- | config/ax_check_define.m4 | 92 | ||||
-rw-r--r-- | config/bootstrap-cet.mk | 4 | ||||
-rw-r--r-- | config/bootstrap-debug-lean.mk | 1 | ||||
-rw-r--r-- | config/bootstrap-lto-noplugin.mk | 4 | ||||
-rw-r--r-- | config/bootstrap-lto.mk | 4 | ||||
-rw-r--r-- | config/cet.m4 | 38 | ||||
-rw-r--r-- | config/gcc-plugin.m4 | 15 | ||||
-rw-r--r-- | config/hwcaps.m4 | 60 | ||||
-rw-r--r-- | config/isl.m4 | 20 | ||||
-rw-r--r-- | config/mt-android | 1 |
12 files changed, 298 insertions, 20 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 01d24e3..5e75dc3 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,54 @@ +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. diff --git a/config/acx.m4 b/config/acx.m4 index ab42972..aa1d34b 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -235,8 +235,28 @@ fi ]) +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 @@ -251,7 +271,13 @@ fi # 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" diff --git a/config/ax_check_define.m4 b/config/ax_check_define.m4 new file mode 100644 index 0000000..4bc6948 --- /dev/null +++ b/config/ax_check_define.m4 @@ -0,0 +1,92 @@ +# =========================================================================== +# 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 diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk new file mode 100644 index 0000000..f09193a --- /dev/null +++ b/config/bootstrap-cet.mk @@ -0,0 +1,4 @@ +# This option enables -fcf-protection -mcet for stage2 and stage3. + +STAGE2_CFLAGS += -fcf-protection -mcet +STAGE3_CFLAGS += -fcf-protection -mcet diff --git a/config/bootstrap-debug-lean.mk b/config/bootstrap-debug-lean.mk index e215280..5f2db80 100644 --- a/config/bootstrap-debug-lean.mk +++ b/config/bootstrap-debug-lean.mk @@ -9,3 +9,4 @@ STAGE2_CFLAGS += -fcompare-debug= STAGE3_CFLAGS += -fcompare-debug +do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2 diff --git a/config/bootstrap-lto-noplugin.mk b/config/bootstrap-lto-noplugin.mk index a507336..0ca8ee2 100644 --- a/config/bootstrap-lto-noplugin.mk +++ b/config/bootstrap-lto-noplugin.mk @@ -3,4 +3,6 @@ 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 diff --git a/config/bootstrap-lto.mk b/config/bootstrap-lto.mk index 9e065e1..50b86ef 100644 --- a/config/bootstrap-lto.mk +++ b/config/bootstrap-lto.mk @@ -2,7 +2,9 @@ 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/ diff --git a/config/cet.m4 b/config/cet.m4 new file mode 100644 index 0000000..715f4bd --- /dev/null +++ b/config/cet.m4 @@ -0,0 +1,38 @@ +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 +]) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index dd06a58..38b2ae6 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -19,8 +19,21 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], 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" @@ -41,7 +54,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], ;; 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 diff --git a/config/hwcaps.m4 b/config/hwcaps.m4 new file mode 100644 index 0000000..ff352fd --- /dev/null +++ b/config/hwcaps.m4 @@ -0,0 +1,60 @@ +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) +]) diff --git a/config/isl.m4 b/config/isl.m4 index 92524af..bbb973e 100644 --- a/config/isl.m4 +++ b/config/isl.m4 @@ -106,27 +106,15 @@ AC_DEFUN([ISL_CHECK_VERSION], 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 diff --git a/config/mt-android b/config/mt-android new file mode 100644 index 0000000..0db854f --- /dev/null +++ b/config/mt-android @@ -0,0 +1 @@ +CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE -fexceptions -frtti |