This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH 1/n] OpenMP 4.0 offloading infrastructure


On Fri, Feb 20, 2015 at 15:50:53 +0100, Jakub Jelinek wrote:
> On Fri, Feb 20, 2015 at 03:41:40PM +0100, Thomas Schwinge wrote:
> > Well, but users (like Jakub, for example) ;-) may decide to build the
> > offloading compilers without specifying --enable-languages, and that'll
> > then default to include Java, and you'll end up with:
> 
> Yeah.  We can perhaps tweak what languages we include by default for
> the --enable-as-accelerator-for= configurations, but if the user decides
> to explicitly add some language, we should still support that.

Here is the patch.
Build and install seems to be working both for accel and regular modes, with
--enable-languages=c,c++,fortran,go,java,jit,lto,objc,obj-c++
OK for trunk?


gcc/ada/
	* gcc-interface/Make-lang.in (ada.install-common): Do not install for
	the offloading compiler.
gcc/go/
	* Make-lang.in (go.install-common): Do not install for the offloading
	compiler.
gcc/java/
	* Make-lang.in (java.install-common): Do not install for the offloading
	compiler.
gcc/jit/
	* Make-lang.in (jit.install-common): Do not install for the offloading
	compiler.
	

diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 4696203..81fd80a 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -754,25 +754,27 @@ doc/gnat-style.pdf: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi
 # vxaddr2line is only used for cross VxWorks ports (it calls the underlying
 # cross addr2line).
 ada.install-common:
-	$(MKDIR) $(DESTDIR)$(bindir)
-	-if [ -f gnat1$(exeext) ] ; \
-	then \
-	  for tool in $(ADA_TOOLS) ; do \
-	    install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
-	    $(RM) $(DESTDIR)$(bindir)/$$install_name; \
-	    if [ -f $$tool-cross$(exeext) ] ; \
+	-if test "$(enable_as_accelerator)" != "yes" ; then \
+	  $(MKDIR) $(DESTDIR)$(bindir); \
+	  if [ -f gnat1$(exeext) ] ; \
+	  then \
+	    for tool in $(ADA_TOOLS) ; do \
+	      install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
+	      $(RM) $(DESTDIR)$(bindir)/$$install_name; \
+	      if [ -f $$tool-cross$(exeext) ] ; \
+	      then \
+	        $(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
+	      else \
+	        $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
+	      fi ; \
+	    done; \
+	    $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
+	    $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
+	    if [ -f vxaddr2line$(exeext) ] ; \
 	    then \
-	      $(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
-	    else \
-	      $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
+	      $(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
+	      $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
 	    fi ; \
-	  done; \
-	  $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
-	  $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
-	  if [ -f vxaddr2line$(exeext) ] ; \
-	  then \
-	    $(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
-	    $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
 	  fi ; \
 	fi
 
diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in
index 6c5968a..891b610 100644
--- a/gcc/go/Make-lang.in
+++ b/gcc/go/Make-lang.in
@@ -136,15 +136,17 @@ check_go_parallelize = 10
 # Install hooks.
 
 go.install-common: installdirs
-	-rm -f $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
-	$(INSTALL_PROGRAM) gccgo$(exeext) $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
-	-if test -f go1$(exeext); then \
-	  if test -f gccgo-cross$(exeext); then \
-	    :; \
-	  else \
-	    rm -f $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext); \
-	    ( cd $(DESTDIR)$(bindir) && \
-	      $(LN) $(GCCGO_INSTALL_NAME)$(exeext) $(GCCGO_TARGET_INSTALL_NAME)$(exeext) ); \
+	-if test "$(enable_as_accelerator)" != "yes" ; then \
+	  rm -f $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) gccgo$(exeext) $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext); \
+	  if test -f go1$(exeext); then \
+	    if test -f gccgo-cross$(exeext); then \
+	      :; \
+	    else \
+	      rm -f $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext); \
+	      ( cd $(DESTDIR)$(bindir) && \
+	        $(LN) $(GCCGO_INSTALL_NAME)$(exeext) $(GCCGO_TARGET_INSTALL_NAME)$(exeext) ); \
+	    fi; \
 	  fi; \
 	fi
 
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index e8f2340..1746508 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -156,26 +156,28 @@ check-java-subtargets :
 
 # Install gcj as well as the target-independent tools.
 java.install-common: installdirs
-	-if [ -f $(XGCJ)$(exeext) ]; then \
-	  rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
-	  $(INSTALL_PROGRAM) $(XGCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
-	  chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
-	  if [ -f $(XGCJ)-cross$(exeext) ]; then \
-	    true; \
-	  else \
-	    rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \
-	    ( cd $(DESTDIR)$(bindir) && \
-	      $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
+	-if test "$(enable_as_accelerator)" != "yes" ; then \
+	  if [ -f $(XGCJ)$(exeext) ]; then \
+	    rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+	    $(INSTALL_PROGRAM) $(XGCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+	    chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+	    if [ -f $(XGCJ)-cross$(exeext) ]; then \
+	      true; \
+	    else \
+	      rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \
+	      ( cd $(DESTDIR)$(bindir) && \
+	        $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
+	    fi ; \
 	  fi ; \
-	fi ; \
-        for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
-	  tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
-          if [ -f $$tool$(exeext) ]; then \
-	    rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
-	    $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
-          fi ; \
-       done
+          for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
+	    tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
+            if [ -f $$tool$(exeext) ]; then \
+	      rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
+	      $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
+	      chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
+            fi ; \
+          done ; \
+	fi
 
 java.install-plugin:
 java.install-man:
diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 44d0750..6a2c80e 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -260,18 +260,20 @@ check_jit_parallelize = 10
 #
 # Install hooks:
 jit.install-common: installdirs
-	$(INSTALL_PROGRAM) $(LIBGCCJIT_FILENAME) \
-	  $(DESTDIR)/$(libdir)/$(LIBGCCJIT_FILENAME)
-	ln -sf \
-	  $(LIBGCCJIT_FILENAME) \
-	  $(DESTDIR)/$(libdir)/$(LIBGCCJIT_SONAME_SYMLINK)
-	ln -sf \
-	  $(LIBGCCJIT_SONAME_SYMLINK)\
-	  $(DESTDIR)/$(libdir)/$(LIBGCCJIT_LINKER_NAME_SYMLINK)
-	$(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit.h \
-	  $(DESTDIR)/$(includedir)/libgccjit.h
-	$(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit++.h \
-	  $(DESTDIR)/$(includedir)/libgccjit++.h
+	-if test "$(enable_as_accelerator)" != "yes" ; then \
+	  $(INSTALL_PROGRAM) $(LIBGCCJIT_FILENAME) \
+	    $(DESTDIR)/$(libdir)/$(LIBGCCJIT_FILENAME); \
+	  ln -sf \
+	    $(LIBGCCJIT_FILENAME) \
+	    $(DESTDIR)/$(libdir)/$(LIBGCCJIT_SONAME_SYMLINK); \
+	  ln -sf \
+	    $(LIBGCCJIT_SONAME_SYMLINK)\
+	    $(DESTDIR)/$(libdir)/$(LIBGCCJIT_LINKER_NAME_SYMLINK); \
+	  $(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit.h \
+	    $(DESTDIR)/$(includedir)/libgccjit.h; \
+	  $(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit++.h \
+	    $(DESTDIR)/$(includedir)/libgccjit++.h; \
+	fi
 
 jit.install-man:
 

  -- Ilya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]