This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch pulls in the missing pieces from GCC's ./config directory. It consists of these changes: 2014-04-25 Marc Glisse <marc.glisse@inria.fr> PR target/43538 * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. 2014-05-14 Sandra Loosemore <sandra@codesourcery.com> * mt-nios2-elf: New file. 2014-07-26 Uros Bizjak <ubizjak@gmail.com> PR target/47230 * mh-alpha-linux: New file. ommit acd57ca65c08b77f6054c5b58602f6db5861f017 uthor: romangareev <romangareev@138bc75d-0d04-0410-961f-82ee72b054a4> ate: Mon Aug 18 15:42:11 2014 +0000 * configure.ac: Eliminate ClooG installation dependency. * configure: Regenerate. * Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS. * Makefile.in: Regenerate. [config/] * cloog.m4: Remove the path to isllibs from clooglibs. * isl.m4: Add paths to islinc, isllibs. [gcc/] * Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS. * config.in: Add undef of HAVE_isl. * configure: Regenerate. * configure.ac: Add definition of HAVE_isl. * graphite-blocking.c: Add checking of HAVE_isl. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * toplev.c: Replace the checking of HAVE_cloog with the checking of HAVE_isl. 2014-08-21 Bin Cheng <bin.cheng@arm.com> * isl.m4 (ISL_CHECK_VERSION): Check link of isl library for cross_compiling. 2014-09-01 Andi Kleen <ak@linux.intel.com> * bootstrap-lto.mk: Implement slim bootstrap. 2014-10-27 Tom Tromey <tromey@redhat.com> * gcc-plugin.m4: New file. 2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com> * target-posix: New file. 2014-11-17 H.J. Lu <hongjiu.lu@intel.com> PR bootstrap/63888 * bootstrap-asan.mk (ASAN_OPTIONS): Export "detect_leaks=0". 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk> * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than overwriting. (CXXFLAGS_FOR_TARGET): Similarly. --- config/bootstrap-asan.mk | 3 + config/bootstrap-lto.mk | 16 +++-- config/cloog.m4 | 152 ----------------------------------------------- config/gcc-plugin.m4 | 113 +++++++++++++++++++++++++++++++++++ config/isl.m4 | 25 +++----- config/mh-alpha-linux | 3 + config/mt-gnu | 2 +- config/mt-ospace | 4 +- config/target-posix | 12 ++++ 9 files changed, 153 insertions(+), 177 deletions(-) delete mode 100644 config/cloog.m4 create mode 100644 config/gcc-plugin.m4 create mode 100644 config/mh-alpha-linux create mode 100644 config/target-posix diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk index fbef021..52ef30e 100644 --- a/config/bootstrap-asan.mk +++ b/config/bootstrap-asan.mk @@ -1,5 +1,8 @@ # This option enables -fsanitize=address for stage2 and stage3. +# Suppress LeakSanitizer in bootstrap. +export ASAN_OPTIONS="detect_leaks=0" + STAGE2_CFLAGS += -fsanitize=address STAGE3_CFLAGS += -fsanitize=address POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \ diff --git a/config/bootstrap-lto.mk b/config/bootstrap-lto.mk index 27bad15..9e065e1 100644 --- a/config/bootstrap-lto.mk +++ b/config/bootstrap-lto.mk @@ -1,7 +1,13 @@ -# This option enables LTO for stage2 and stage3. -# FIXME: Our build system is not yet able to use gcc-ar wrapper, so we need -# to go with -ffat-lto-objects. +# This option enables LTO for stage2 and stage3 in slim mode -STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects -STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects +STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 +STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 STAGEprofile_CFLAGS += -fno-lto + +# assumes the host supports the linker plugin +LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ +LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ + +LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ + RANLIB="$(LTO_RANLIB)"; export RANLIB; +LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" diff --git a/config/cloog.m4 b/config/cloog.m4 deleted file mode 100644 index 670cd65..0000000 --- a/config/cloog.m4 +++ /dev/null @@ -1,152 +0,0 @@ -# This file is part of GCC. -# -# GCC 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, or (at your option) any later -# version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -# Contributed by Andreas Simbuerger <simbuerg@fim.uni-passau.de> - -# CLOOG_INIT_FLAGS () -# ------------------------- -# Provide configure switches for CLooG support. -# Initialize clooglibs/clooginc according to the user input. -AC_DEFUN([CLOOG_INIT_FLAGS], -[ - AC_ARG_WITH([cloog-include], - [AS_HELP_STRING( - [--with-cloog-include=PATH], - [Specify directory for installed CLooG include files])]) - AC_ARG_WITH([cloog-lib], - [AS_HELP_STRING( - [--with-cloog-lib=PATH], - [Specify the directory for the installed CLooG library])]) - - AC_ARG_ENABLE(cloog-version-check, - [AS_HELP_STRING( - [--disable-cloog-version-check], - [disable check for CLooG version])], - ENABLE_CLOOG_CHECK=$enableval, - ENABLE_CLOOG_CHECK=yes) - - # Initialize clooglibs and clooginc. - case $with_cloog in - no) - clooglibs= - clooginc= - ;; - "" | yes) - ;; - *) - clooglibs="-L$with_cloog/lib" - clooginc="-I$with_cloog/include" - ;; - esac - if test "x${with_cloog_include}" != x ; then - clooginc="-I$with_cloog_include" - fi - if test "x${with_cloog_lib}" != x; then - clooglibs="-L$with_cloog_lib" - fi - dnl If no --with-cloog flag was specified and there is in-tree CLooG - dnl source, set up flags to use that and skip any version tests - dnl as we cannot run them reliably before building CLooG - if test "x${clooginc}" = x && test "x${clooglibs}" = x \ - && test -d ${srcdir}/cloog; then - clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' ' - clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -I'${srcdir}'/cloog/include ' - ENABLE_CLOOG_CHECK=no - AC_MSG_WARN([using in-tree CLooG, disabling version check]) - fi - - clooginc="-DCLOOG_INT_GMP ${clooginc}" - clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl" -] -) - -# CLOOG_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) -# ---------------------------------------------------- -# Provide actions for failed CLooG detection. -AC_DEFUN([CLOOG_REQUESTED], -[ - AC_REQUIRE([CLOOG_INIT_FLAGS]) - - if test "x${with_cloog}" = xno; then - $2 - elif test "x${with_cloog}" != x \ - || test "x${with_cloog_include}" != x \ - || test "x${with_cloog_lib}" != x ; then - $1 - else - $2 - fi -] -) - -# _CLOOG_CHECK_CT_PROG(MAJOR, MINOR, REVISION) -# -------------------------------------------- -# Helper for verifying CLooG's compile time version. -m4_define([_CLOOG_CHECK_CT_PROG],[AC_LANG_PROGRAM( - [#include "cloog/version.h"], - [#if CLOOG_VERSION_MAJOR != $1 \ - || CLOOG_VERSION_MINOR != $2 \ - || CLOOG_VERSION_REVISION < $3 - choke me - #endif])]) - -# CLOOG_CHECK_VERSION CLOOG_CHECK_VERSION (MAJOR, MINOR, REVISION) -# ---------------------------------------------------------------- -# Test the found CLooG to be exact of version MAJOR.MINOR and at least -# REVISION. -AC_DEFUN([CLOOG_CHECK_VERSION], -[ - AC_REQUIRE([CLOOG_INIT_FLAGS]) - - if test "${ENABLE_CLOOG_CHECK}" = yes ; then - _cloog_saved_CFLAGS=$CFLAGS - _cloog_saved_LDFLAGS=$LDFLAGS - - CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${islinc} ${gmpinc}" - LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${isllibs} ${gmplib}" - - AC_MSG_CHECKING([for version $1.$2.$3 of CLooG]) - AC_COMPILE_IFELSE([_CLOOG_CHECK_CT_PROG($1,$2,$3)], - [gcc_cv_cloog=yes], - [gcc_cv_cloog=no]) - AC_MSG_RESULT([$gcc_cv_cloog]) - - CFLAGS=$_cloog_saved_CFLAGS - LDFLAGS=$_cloog_saved_LDFLAGS - fi -] -) - -# CLOOG_IF_FAILED (ACTION-IF-FAILED) -# ---------------------------------- -# Executes ACTION-IF-FAILED, if GRAPHITE was requested and -# the checks failed. -AC_DEFUN([CLOOG_IF_FAILED], -[ - CLOOG_REQUESTED([graphite_requested=yes], [graphite_requested=no]) - - if test "${gcc_cv_cloog}" = no ; then - clooglibs= - clooginc= - fi - - if test "${graphite_requested}" = yes \ - && test "x${clooglibs}" = x \ - && test "x${clooginc}" = x ; then - $1 - fi -] -) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 new file mode 100644 index 0000000..dd06a58 --- /dev/null +++ b/config/gcc-plugin.m4 @@ -0,0 +1,113 @@ +# gcc-plugin.m4 -*- Autoconf -*- +# Check whether GCC is able to be built with plugin support. + +dnl Copyright (C) 2014 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# Check for plugin support. +# Respects --enable-plugin. +# Sets the shell variables enable_plugin and pluginlibs. +AC_DEFUN([GCC_ENABLE_PLUGINS], + [# Check for plugin support + AC_ARG_ENABLE(plugin, + [AS_HELP_STRING([--enable-plugin], [enable plugin support])], + enable_plugin=$enableval, + enable_plugin=yes; default_plugin=yes) + + pluginlibs= + + case "${host}" in + *-*-darwin*) + if test x$build = x$host; then + export_sym_check="nm${exeext} -g" + elif test x$host = x$target; then + export_sym_check="$gcc_cv_nm -g" + else + export_sym_check= + fi + ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" + elif test x$host = x$target; then + export_sym_check="$gcc_cv_objdump -T" + else + export_sym_check= + fi + ;; + esac + + if test x"$enable_plugin" = x"yes"; then + + AC_MSG_CHECKING([for exported symbols]) + if test "x$export_sym_check" != x; then + echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c + ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then + : # No need to use a flag + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([for -rdynamic]) + ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then + plugin_rdynamic=yes + pluginlibs="-rdynamic" + else + plugin_rdynamic=no + enable_plugin=no + fi + AC_MSG_RESULT([$plugin_rdynamic]) + fi + else + AC_MSG_RESULT([unable to check]) + fi + + # Check -ldl + saved_LIBS="$LIBS" + AC_SEARCH_LIBS([dlopen], [dl]) + if test x"$ac_cv_search_dlopen" = x"-ldl"; then + pluginlibs="$pluginlibs -ldl" + fi + LIBS="$saved_LIBS" + + # Check that we can build shared objects with -fPIC -shared + saved_LDFLAGS="$LDFLAGS" + saved_CFLAGS="$CFLAGS" + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` + CFLAGS="$CFLAGS -fPIC" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) + CFLAGS="$CFLAGS -fPIC" + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac + AC_MSG_CHECKING([for -fPIC -shared]) + AC_TRY_LINK( + [extern int X;],[return X == 0;], + [AC_MSG_RESULT([yes]); have_pic_shared=yes], + [AC_MSG_RESULT([no]); have_pic_shared=no]) + if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then + pluginlibs= + enable_plugin=no + fi + LDFLAGS="$saved_LDFLAGS" + CFLAGS="$saved_CFLAGS" + + # If plugin support had been requested but not available, fail. + if test x"$enable_plugin" = x"no" ; then + if test x"$default_plugin" != x"yes"; then + AC_MSG_ERROR([ + Building GCC with plugin support requires a host that supports + -fPIC, -shared, -ldl and -rdynamic.]) + fi + fi + fi +]) diff --git a/config/isl.m4 b/config/isl.m4 index f45854d..0eece37 100644 --- a/config/isl.m4 +++ b/config/isl.m4 @@ -68,6 +68,9 @@ AC_DEFUN([ISL_INIT_FLAGS], ENABLE_ISL_CHECK=no AC_MSG_WARN([using in-tree ISL, disabling version check]) fi + + islinc="-DCLOOG_INT_GMP ${islinc}" + isllibs="${isllibs} -lisl" ] ) @@ -90,20 +93,9 @@ AC_DEFUN([ISL_REQUESTED], ] ) -# _ISL_CHECK_CT_PROG(MAJOR, MINOR) -# -------------------------------------------- -# Helper for verifying ISL compile time version. -m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM( - [#include <isl/version.h> - #include <string.h>], - [if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0) - return 1; - ])]) - -# ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR) +# ISL_CHECK_VERSION ISL_CHECK_VERSION () # ---------------------------------------------------------------- -# Test the found ISL to be exact of version MAJOR.MINOR and at least -# REVISION. +# Test that ISL contains functionality added to the minimum expected version. AC_DEFUN([ISL_CHECK_VERSION], [ if test "${ENABLE_ISL_CHECK}" = yes ; then @@ -115,11 +107,10 @@ AC_DEFUN([ISL_CHECK_VERSION], LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" LIBS="${_isl_saved_LIBS} -lisl" - AC_MSG_CHECKING([for version $1.$2 of ISL]) - AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)], + AC_MSG_CHECKING([for compatible ISL]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])], [gcc_cv_isl=yes], - [gcc_cv_isl=no], - [gcc_cv_isl=yes]) + [gcc_cv_isl=no]) AC_MSG_RESULT([$gcc_cv_isl]) CFLAGS=$_isl_saved_CFLAGS diff --git a/config/mh-alpha-linux b/config/mh-alpha-linux new file mode 100644 index 0000000..9a9244b --- /dev/null +++ b/config/mh-alpha-linux @@ -0,0 +1,3 @@ +# Prevent GPREL16 relocation truncation +LDFLAGS += -Wl,--no-relax +BOOT_LDFLAGS += -Wl,--no-relax diff --git a/config/mt-gnu b/config/mt-gnu index 15bf417..5c696f5 100644 --- a/config/mt-gnu +++ b/config/mt-gnu @@ -1 +1 @@ -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE +CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE diff --git a/config/mt-ospace b/config/mt-ospace index 7f09104..ce29ff4 100644 --- a/config/mt-ospace +++ b/config/mt-ospace @@ -1,3 +1,3 @@ # Build libraries optimizing for space, not speed. - CFLAGS_FOR_TARGET = -g -Os - CXXFLAGS_FOR_TARGET = -g -Os + CFLAGS_FOR_TARGET += -g -Os + CXXFLAGS_FOR_TARGET += -g -Os diff --git a/config/target-posix b/config/target-posix new file mode 100644 index 0000000..2fba066 --- /dev/null +++ b/config/target-posix @@ -0,0 +1,12 @@ +case "${target}" in + *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) + ;; + *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) + ;; + *-*-solaris2* | *-*-hpux11*) + ;; + *-*-darwin* | *-*-aix*) + ;; + *) + UNSUPPORTED=1 ;; + esac -- 1.8.3.2
Attachment:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |