public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Ada PATCH: Fix ada/58239 by linking with xg++, not xgcc
@ 2013-08-25 22:55 Gabriel Dos Reis
  2013-08-30 10:15 ` Rainer Orth
  2013-08-31 21:42 ` Eric Botcazou
  0 siblings, 2 replies; 7+ messages in thread
From: Gabriel Dos Reis @ 2013-08-25 22:55 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches


Hi,

My earlier patch that formally desclared pretty_printer as polymorphic
uncovered a latent bug in the existing build machinery of the Ada
component.  It had been using xgcc to link against C++ source files.  It
should use xg++ instead.

This patch fixes that by introducing GXX_LINK which is GCC_LINK except
that CXX (e.g. xg++) instead of CC (e.g. xgcc) is invoked.

Eric, are there other executables that need to be linked with GXX_LINK
too but aren't triggered yet? 

Thanks,

-- Gaby

ada/
2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* gcc-interface/Makefile.in (GXX_LINK): New.  Same as GCC_LINK but
	with xgcc replaced with xgcc.
	(common-tools): Use it.
	(../../gnatmake$(exeext)): Likewise.
	(../../gnatlink$(exeext)): Likewise.

Index: ada/gcc-interface/Makefile.in
===================================================================
--- ada/gcc-interface/Makefile.in	(revision 201977)
+++ ada/gcc-interface/Makefile.in	(working copy)
@@ -2398,6 +2398,7 @@
 	"GNATBIND=$(GNATBIND)"
 
 GCC_LINK=$(CC) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
+GXX_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
 
 # Build directory for the tools. Let's copy the target-dependent
 # sources using the same mechanism as for gnatlib. The other sources are
@@ -2462,23 +2463,23 @@
 	  gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
 	  gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
 	$(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 	$(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+		--GCC="$(GXX_LINK)" $(TOOLS_LIBS)
 
 ../../gnatsym$(exeext): ../stamp-tools
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
@@ -2519,11 +2520,11 @@
 
 # Likewise for the tools
 ../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
-	+$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
+	+$(GXX_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
 		    $(TOOLS_LIBS)
 
 ../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
-	+$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
+	+$(GXX_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
 		    $(TOOLS_LIBS)
 
 ../stamp-gnatlib-$(RTSDIR):

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-01 17:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-25 22:55 Ada PATCH: Fix ada/58239 by linking with xg++, not xgcc Gabriel Dos Reis
2013-08-30 10:15 ` Rainer Orth
2013-08-31 21:42 ` Eric Botcazou
2013-08-31 21:46   ` Gabriel Dos Reis
2013-09-01  9:31     ` Iain Sandoe
2013-09-01 16:52       ` Eric Botcazou
2013-09-01 17:11         ` Gabriel Dos Reis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).