From 46d5fff01fbeafdf822e440231845363ba979f09 Mon Sep 17 00:00:00 2001 From: mstembera Date: Fri, 19 Dec 2014 03:56:00 +0800 Subject: [PATCH] Change profile-build options to produce 1% to 2% faster executables. The "@rm ucioption.gc*" line is necessary to avoid a gcc 4.7.x bug. Confirmed for gcc 4.7.4, 4.8.1, and 4.9.1 Suggested by Kiran Panditrao on fishcooking forum. https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/AY8gN53nG18 No functional change. Resolves #160 --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 80867feb..b641747a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -373,6 +373,9 @@ profile-build: @$(PGOBENCH) > /dev/null @echo "" @echo "Step 3/4. Building final executable ..." +# Deleting corrupt ucioption.gc* profile files is necessary to avoid an +# "internal compiler error" for gcc versions 4.7.x + @rm ucioption.gc* @touch *.cpp *.h syzygy/*.cpp syzygy/*.h $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use) @echo "" @@ -439,13 +442,13 @@ gcc-profile-prepare: gcc-profile-make: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ - EXTRACXXFLAGS='-fprofile-generate' \ + EXTRACXXFLAGS='-fprofile-arcs' \ EXTRALDFLAGS='-lgcov' \ all gcc-profile-use: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ - EXTRACXXFLAGS='-fprofile-use' \ + EXTRACXXFLAGS='-fbranch-probabilities' \ EXTRALDFLAGS='-lgcov' \ all -- 2.39.2