diff options
author | Yiran Wang <yiran@google.com> | 2015-06-23 15:33:17 -0700 |
---|---|---|
committer | Yiran Wang <yiran@google.com> | 2015-06-29 10:56:28 -0700 |
commit | 1d9fec7937f45dde5e04cac966a2d9a12f2fc15a (patch) | |
tree | 3fbcd18a379a05fd6d43491a107e1f36bc61b185 /gcc-4.9/gcc/configure.ac | |
parent | f378ebf14df0952eae870c9865bab8326aa8f137 (diff) | |
download | toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.gz toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.bz2 toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.zip |
Synchronize with google/gcc-4_9 to r224707 (from r214835)
Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
Diffstat (limited to 'gcc-4.9/gcc/configure.ac')
-rw-r--r-- | gcc-4.9/gcc/configure.ac | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/configure.ac b/gcc-4.9/gcc/configure.ac index 0918ff324..a871103ff 100644 --- a/gcc-4.9/gcc/configure.ac +++ b/gcc-4.9/gcc/configure.ac @@ -4709,6 +4709,49 @@ if test x"$gcc_cv_ld_pie" = xyes; then fi AC_MSG_RESULT($gcc_cv_ld_pie) +AC_MSG_CHECKING(linker PIE support with copy reloc) +gcc_cv_ld_pie_copyreloc=no +if test $gcc_cv_ld_pie = yes ; then + if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 25 -o "$gcc_cv_gld_major_version" -gt 2; then + gcc_cv_ld_pie_copyreloc=yes + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + # Check if linker supports -pie option with copy reloc + case "$target" in + i?86-*-linux* | x86_64-*-linux*) + cat > conftest1.s <<EOF + .globl a_glob + .data + .type a_glob, @object + .size a_glob, 4 +a_glob: + .long 2 +EOF + cat > conftest2.s <<EOF + .text + .globl main + .type main, @function +main: + movl %eax, a_glob(%rip) + .size main, .-main +EOF + if $gcc_cv_as --64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ + && $gcc_cv_ld -shared -melf_x86_64 -o conftest1.so conftest1.o > /dev/null 2>&1 \ + && $gcc_cv_as --64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ + && $gcc_cv_ld -pie -melf_x86_64 -o conftest conftest2.o conftest1.so > /dev/null 2>&1; then + gcc_cv_ld_pie_copyreloc=yes + fi + rm -f conftest conftest1.so conftest1.o conftest2.o conftest1.s conftest2.s + ;; + esac + fi +fi +AC_DEFINE_UNQUOTED(HAVE_LD_PIE_COPYRELOC, + [`if test x"$gcc_cv_ld_pie_copyreloc" = xyes; then echo 1; else echo 0; fi`], + [Define 0/1 if your linker supports -pie option with copy reloc.]) +AC_MSG_RESULT($gcc_cv_ld_pie_copyreloc) + AC_MSG_CHECKING(linker EH-compatible garbage collection of sections) gcc_cv_ld_eh_gc_sections=no if test $in_tree_ld = yes ; then @@ -5569,8 +5612,31 @@ AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG]) AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files]) if test "x${CLOOGLIBS}" != "x" ; then AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.]) + + # Check whether isl_schedule_constraints_compute_schedule is available; + # it's new in ISL-0.13. + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ISLINC" + saved_LIBS="$LIBS" + LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS" + + AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule]) + AC_TRY_LINK([#include <isl/schedule.h>], + [isl_schedule_constraints_compute_schedule (NULL);], + [ac_has_isl_schedule_constraints_compute_schedule=yes], + [ac_has_isl_schedule_constraints_compute_schedule=no]) + AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule) + + LIBS="$saved_LIBS" + CFLAGS="$saved_CFLAGS" + + if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then + AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1, + [Define if isl_schedule_constraints_compute_schedule exists.]) + fi fi + # Check for plugin support AC_ARG_ENABLE(plugin, [AS_HELP_STRING([--enable-plugin], [enable plugin support])], |