diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 13:28:56 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 13:28:56 +0000 |
commit | a3d93be396cc3e0202a1cd3259a482f5dd1f57f0 (patch) | |
tree | 9e4005cf276444e5ba35ec3bd2b90e585f503eab /gcc/Makefile.in | |
parent | 139e42e60a310dbf078532d3ed38bb82c92fc7d8 (diff) | |
download | gcc-a3d93be396cc3e0202a1cd3259a482f5dd1f57f0.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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r-- | gcc/Makefile.in | 95 |
1 files changed, 59 insertions, 36 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 88c3f8975ff..7c546832c0f 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -59,6 +59,11 @@ host=@host@ target=@target@ target_noncanonical:=@target_noncanonical@ +# Normally identical to target_noncanonical, except for compilers built +# as accelerator targets. +real_target_noncanonical:=@real_target_noncanonical@ +accel_dir_suffix = @accel_dir_suffix@ + # Sed command to transform gcc to installed name. program_transform_name := @program_transform_name@ @@ -363,6 +368,8 @@ enable_plugin = @enable_plugin@ enable_host_shared = @enable_host_shared@ +enable_as_accelerator = @enable_as_accelerator@ + CPPLIB = ../libcpp/libcpp.a CPPINC = -I$(srcdir)/../libcpp/include @@ -574,9 +581,9 @@ libexecdir = @libexecdir@ # -------- # Directory in which the compiler finds libraries etc. -libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version) +libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) # Directory in which the compiler finds executables -libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version) +libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) # Directory in which all plugin resources are installed plugin_resourcesdir = $(libsubdir)/plugin # Directory in which plugin headers are installed @@ -584,7 +591,11 @@ plugin_includedir = $(plugin_resourcesdir)/include # Directory in which plugin specific executables are installed plugin_bindir = $(libexecsubdir)/plugin # Used to produce a relative $(gcc_tooldir) in gcc.o +ifeq ($(enable_as_accelerator),yes) +unlibsubdir = ../../../../.. +else unlibsubdir = ../../.. +endif # $(prefix), expressed as a path relative to $(libsubdir). # # An explanation of the sed strings: @@ -1957,9 +1968,11 @@ DRIVER_DEFINES = \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \ -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ -DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \ + -DACCEL_DIR_SUFFIX=\"$(accel_dir_suffix)\" \ @TARGET_SYSTEM_ROOT_DEFINE@ \ $(VALGRIND_DRIVER_DEFINES) \ $(if $(SHLIB),$(if $(filter yes,@enable_shared@),-DENABLE_SHARED_LIBGCC)) \ @@ -3164,12 +3177,14 @@ install-strip: install # Handle cpp installation. install-cpp: installdirs cpp$(exeext) - -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) - -$(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) - -if [ x$(cpp_install_dir) != x ]; then \ - rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - else true; fi + -if test "$(enable_as_accelerator)" != "yes" ; then \ + rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ + if [ x$(cpp_install_dir) != x ]; then \ + rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + else true; fi; \ + fi # Create the installation directories. # $(libdir)/gcc/include isn't currently searched by cpp. @@ -3277,17 +3292,21 @@ install-common: native lang.install-common installdirs # otherwise override the specs built into the driver. rm -f $(DESTDIR)$(libsubdir)/specs # Install gcov if it was compiled. - -if [ -f gcov$(exeext) ]; \ - then \ + -if test "$(enable_as_accelerator)" != "yes" ; then \ + if [ -f gcov$(exeext) ]; \ + then \ rm -f $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ + fi; \ fi # Install gcov-tool if it was compiled. - -if [ -f gcov-tool$(exeext) ]; \ - then \ + -if test "$(enable_as_accelerator)" != "yes" ; then \ + if [ -f gcov-tool$(exeext) ]; \ + then \ rm -f $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) \ gcov-tool$(exeext) $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \ + fi; \ fi # Install the driver program as $(target_noncanonical)-gcc, @@ -3295,17 +3314,19 @@ install-common: native lang.install-common installdirs install-driver: installdirs xgcc$(exeext) -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) - -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \ - rm -f $(DESTDIR)$(bindir)/$(FULL_DRIVER_NAME); \ - ( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \ - fi - -if [ ! -f gcc-cross$(exeext) ] \ - && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ - rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ - ( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \ - mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ + -if test "$(enable_as_accelerator)" != "yes" ; then \ + if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \ + rm -f $(DESTDIR)$(bindir)/$(FULL_DRIVER_NAME); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \ + fi; \ + if [ ! -f gcc-cross$(exeext) ] \ + && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ + rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \ + mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ + fi; \ fi # Install the info files. @@ -3502,19 +3523,21 @@ install-lto-wrapper: lto-wrapper$(exeext) $(INSTALL_PROGRAM) lto-wrapper$(exeext) $(DESTDIR)$(libexecsubdir)/lto-wrapper$(exeext) install-gcc-ar: installdirs gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext) - for i in gcc-ar gcc-nm gcc-ranlib; do \ - install_name=`echo $$i|sed '$(program_transform_name)'` ;\ - target_install_name=$(target_noncanonical)-`echo $$i|sed '$(program_transform_name)'` ; \ - rm -f $(DESTDIR)$(bindir)/$$install_name$(exeext) ; \ - $(INSTALL_PROGRAM) $$i$(exeext) $(DESTDIR)$(bindir)/$$install_name$(exeext) ;\ - if test -f gcc-cross$(exeext); then \ - :; \ - else \ - rm -f $(DESTDIR)$(bindir)/$$target_install_name$(exeext); \ - ( cd $(DESTDIR)$(bindir) && \ - $(LN) $$install_name$(exeext) $$target_install_name$(exeext) ) ; \ - fi ; \ - done + if test "$(enable_as_accelerator)" != "yes" ; then \ + for i in gcc-ar gcc-nm gcc-ranlib; do \ + install_name=`echo $$i|sed '$(program_transform_name)'` ;\ + target_install_name=$(target_noncanonical)-`echo $$i|sed '$(program_transform_name)'` ; \ + rm -f $(DESTDIR)$(bindir)/$$install_name$(exeext) ; \ + $(INSTALL_PROGRAM) $$i$(exeext) $(DESTDIR)$(bindir)/$$install_name$(exeext) ;\ + if test -f gcc-cross$(exeext); then \ + :; \ + else \ + rm -f $(DESTDIR)$(bindir)/$$target_install_name$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $$install_name$(exeext) $$target_install_name$(exeext) ) ; \ + fi ; \ + done; \ + fi # Cancel installation by deleting the installed files. uninstall: lang.uninstall |