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]

[PATCH] Fix profiledbootstrap with Ada


Hi!

make profiledbootstrap ATM fails on trunk if Ada is enabled, when linking
gnatbind (or gnat1).  The problem is that while many objects linked into
these 2 programs were compiled with -fprofile-generate, this flag isn't
passed to gcc when linking, which means -lgcov isn't linked in.

The patch below fixes that; bootstrapped/regtested with make
profiledbootstrap on {i686,x86_64,ppc}-linux, ok for trunk?

2007-12-14  Jakub Jelinek  <jakub@redhat.com>

	* Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.

--- gcc/ada/Make-lang.in.jj	2007-12-07 14:47:58.000000000 +0100
+++ gcc/ada/Make-lang.in	2007-12-14 13:20:46.000000000 +0100
@@ -286,11 +286,11 @@ TARGET_ADA_SRCS =
 # Since the RTL should be built with the latest compiler, remove the
 #  stamp target in the parent directory whenever gnat1 is rebuilt
 gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBDEPS)
-	$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBS) $(SYSLIBS)
+	$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS)
 	$(RM) stamp-gnatlib2 stamp-tools
 
 gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
-	$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(LIBS) $(SYSLIBS)
+	$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS)
 
 # use cross-gcc
 gnat-cross: force

	Jakub


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