Another fix to profile-build on gcc 4.6
authorMarco Costalba <mcostalba@gmail.com>
Wed, 9 Nov 2011 04:03:46 +0000 (05:03 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 9 Nov 2011 04:20:35 +0000 (05:20 +0100)
Oliver reports profile builds error with new gcc 4.6, he says:

"We need to add -lgov with profile-generate AND profile-use.
So it has to be added to the second stage of building too.

The problem occurred first with the introduction of gcc4.6 and
I think this is because the previous version did find the gcov
library automatically. gcc4.6 needs more precise options and
does less guesses. I have seen it in debian, Ubuntu and also with
mingw on Windows. And all use gcc4.6."

This patch fixes the issue.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile

index 7e51d5045bffd6df033fbbcd3ad8d9bc4dc106c9..9650c7f615d39fbca602894ba32075306650f93a 100644 (file)
@@ -492,6 +492,7 @@ gcc-profile-make:
 gcc-profile-use:
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
        EXTRACXXFLAGS='-fprofile-use' \
+       EXTRALDFLAGS='-lgcov' \
        all
 
 gcc-profile-clean: