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]

gcc 2.96: g++ driver installation -- a proposal


Hello,

 Unlike the gcc driver, the g++ one does not get installed under the
$(tooldir) tree when it's a crosscompiler and it does not get installed as
$(target_alias)-<name> when it's a native compiler.  It complicates
scripts unnecessarily which could otherwise assume the same rules to
access g++ as those which apply to gcc (e.g. set $PATH to ${tooldir} or
specify $GXX as ${target_alias}-g++ when invoking `configure'). 

 I've prepared the following patch to circumvent this inconveniece.

Tue Jun  6 16:40:16 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>

	* Make-lang.in (c++.install-common): Install g++-cross in
	$(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
	$(target_alias)-g++ and $(target_alias)-c++.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

diff -u --recursive --new-file gcc-2.95.2.macro/gcc/cp/Make-lang.in gcc-2.95.2/gcc/cp/Make-lang.in
--- gcc-2.95.2.macro/gcc/cp/Make-lang.in	Mon Apr 26 23:50:36 1999
+++ gcc-2.95.2/gcc/cp/Make-lang.in	Thu Nov 11 12:00:32 1999
@@ -219,12 +219,22 @@
 	    chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
 	    rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
 	    $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
+	    if [ -d $(gcc_tooldir)/bin/. ] ; then \
+	      rm -f $(gcc_tooldir)/bin/g++$(exeext); \
+	      $(INSTALL_PROGRAM) g++-cross$(exeext) $(gcc_tooldir)/bin/g++$(exeext); \
+	      rm -f $(gcc_tooldir)/bin/c++$(exeext); \
+	      $(LN) $(gcc_tooldir)/bin/g++$(exeext) $(gcc_tooldir)/bin/c++$(exeext); \
+	    else true; fi; \
 	  else \
 	    rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
 	    $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
 	    chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
 	    rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
 	    $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
+	    rm -f $(bindir)/$(target_alias)-g++$(exeext); \
+	    $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-g++$(exeext); \
+	    rm -f $(bindir)/$(target_alias)-c++$(exeext); \
+	    $(LN) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-c++$(exeext); \
 	  fi ; \
 	  if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \
 	    if [ -f g++-cross$(exeext) ] ; then \


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