summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-11-13 13:28:56 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-11-13 13:28:56 +0000
commit85c64bbee96e9a877a0138a509c42ad6feb4d189 (patch)
tree9e4005cf276444e5ba35ec3bd2b90e585f503eab /lto-plugin
parente8864c8522f08528685762e6e3611da1354c31c2 (diff)
downloadgcc-85c64bbee96e9a877a0138a509c42ad6feb4d189.tar.gz
[PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate. * configure.ac (--enable-as-accelerator-for) (--enable-offload-targets): New configure options. gcc/ * Makefile.in (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): New variables substituted by configure. (libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of being configured as an offload compiler. (DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and ACCEL_DIR_SUFFIX. (install-cpp, install-common, install_driver, install-gcc-ar): Do not install for the offload compiler. * config.in: Regenerate. * configure: Regenerate. * configure.ac (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): Compute new variables. (ACCEL_COMPILER): Define if the compiler is built as the accel compiler. (OFFLOAD_TARGETS): List of target names suitable for offloading. (ENABLE_OFFLOADING): Define if list of offload targets is not empty. gcc/cp/ * Make-lang.in (c++.install-common): Do not install for the offload compiler. gcc/doc/ * install.texi (Options specification): Document --enable-as-accelerator-for and --enable-offload-targets. gcc/fortran/ * Make-lang.in (fortran.install-common): Do not install for the offload compiler. libgcc/ * Makefile.in (crtoffloadbegin$(objext)): New rule. (crtoffloadend$(objext)): Likewise. * configure: Regenerate. * configure.ac (accel_dir_suffix): Compute new variable. (extra_parts): Add crtoffloadbegin.o and crtoffloadend.o if enable_offload_targets is not empty. * offloadstuff.c: New file. libgomp/ * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for libdl, required for plugin support. (PLUGIN_SUPPORT): Define if plugins are supported. (enable_offload_targets): Support Intel MIC targets. (OFFLOAD_TARGETS): List of target names suitable for offloading. lto-plugin/ * Makefile.am (libexecsubdir): Tweak for the possibility of being configured for offload compiler. (accel_dir_suffix, real_target_noncanonical): New variables substituted by configure. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new variables. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r217485
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog14
-rw-r--r--lto-plugin/Makefile.am2
-rw-r--r--lto-plugin/Makefile.in4
-rwxr-xr-xlto-plugin/configure16
-rw-r--r--lto-plugin/configure.ac10
5 files changed, 42 insertions, 4 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 0bb13540db0..195ab453a4a 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,17 @@
+2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+
+ * Makefile.am (libexecsubdir): Tweak for the possibility of being
+ configured for offload compiler.
+ (accel_dir_suffix, real_target_noncanonical): New variables substituted
+ by configure.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
+ variables.
+
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index 93ea6498c55..c637ecb5743 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = no-dependencies
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
target_noncanonical := @target_noncanonical@
-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
AM_CFLAGS = @ac_lto_plugin_warn_cflags@
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index b15d90197dc..4bd943bdb01 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -167,6 +167,7 @@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_lto_plugin_ldflags = @ac_lto_plugin_ldflags@
ac_lto_plugin_warn_cflags = @ac_lto_plugin_warn_cflags@
+accel_dir_suffix = @accel_dir_suffix@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -209,6 +210,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+real_target_noncanonical = @real_target_noncanonical@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -227,7 +229,7 @@ with_libiberty = @with_libiberty@
ACLOCAL_AMFLAGS = -I .. -I ../config
AUTOMAKE_OPTIONS = no-dependencies
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
AM_CFLAGS = @ac_lto_plugin_warn_cflags@
AM_LDFLAGS = @ac_lto_plugin_ldflags@
diff --git a/lto-plugin/configure b/lto-plugin/configure
index 5f3dd222020..9d1b09440d7 100755
--- a/lto-plugin/configure
+++ b/lto-plugin/configure
@@ -622,6 +622,8 @@ EGREP
GREP
SED
LIBTOOL
+real_target_noncanonical
+accel_dir_suffix
gcc_build_dir
ac_lto_plugin_ldflags
ac_lto_plugin_warn_cflags
@@ -4135,6 +4137,16 @@ else
fi
+# Used for constructing correct paths for offload compilers.
+accel_dir_suffix=
+real_target_noncanonical=${target_noncanonical}
+if test x"$enable_as_accelerator_for" != x; then
+ accel_dir_suffix=/accel/${target_noncanonical}
+ real_target_noncanonical=${enable_as_accelerator_for}
+fi
+
+
+
case `pwd` in
*\ * | *\ *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -10607,7 +10619,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10610 "configure"
+#line 10622 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10713,7 +10725,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10716 "configure"
+#line 10728 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index c3ae93e12a7..db5b6cd64c8 100644
--- a/lto-plugin/configure.ac
+++ b/lto-plugin/configure.ac
@@ -34,6 +34,16 @@ else
fi
AC_SUBST(gcc_build_dir)
+# Used for constructing correct paths for offload compilers.
+accel_dir_suffix=
+real_target_noncanonical=${target_noncanonical}
+if test x"$enable_as_accelerator_for" != x; then
+ accel_dir_suffix=/accel/${target_noncanonical}
+ real_target_noncanonical=${enable_as_accelerator_for}
+fi
+AC_SUBST(accel_dir_suffix)
+AC_SUBST(real_target_noncanonical)
+
AM_PROG_LIBTOOL
ACX_LT_HOST_FLAGS
AC_SUBST(target_noncanonical)