This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Add make autoprofiledbootstrap
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>, Richard Biener <rguenther at suse dot de>, Andi Kleen <andi at firstfloor dot org>
- Cc: gcc-patches at gcc dot gnu dot org, hubicka at ucw dot cz, bschmidt at redhat dot com, bonzini at gnu dot org, dj at redhat dot com, Ralf dot Wildenhues at gmx dot de, Andi Kleen <ak at linux dot intel dot com>
- Date: Fri, 24 Jun 2016 20:36:02 +0200
- Subject: Re: [PATCH 3/3] Add make autoprofiledbootstrap
- Authentication-results: sourceware.org; auth=none
- References: <20160622123706 dot 16343-1-andi at firstfloor dot org> <20160622123706 dot 16343-2-andi at firstfloor dot org> <20160622123706 dot 16343-3-andi at firstfloor dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jun 22, 2016 at 05:37:06AM -0700, Andi Kleen wrote:
> gcc/cp/:
>
> 2016-06-22 Andi Kleen <ak@linux.intel.com>
>
> * Make-lang.in: Add support for autofdo.
...
This results in annoying errors in stderr each time make is
performed in non-bootstrapped build (3 times even for each case).
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
2016-06-24 Jakub Jelinek <jakub@redhat.com>
* Makefile.in: Don't cat ../stage_current if it does not exist.
c/
* Make-lang.in: Don't cat ../stage_current if it does not exist.
cp/
* Make-lang.in: Don't cat ../stage_current if it does not exist.
lto/
* Make-lang.in: Don't cat ../stage_current if it does not exist.
--- gcc/Makefile.in.jj 2016-06-24 12:59:28.000000000 +0200
+++ gcc/Makefile.in 2016-06-24 14:44:35.861407698 +0200
@@ -1569,7 +1569,8 @@ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OB
# for anything that is shared use the cc1plus profile data, as that
# is likely the most exercised during the build
-ifeq ($(shell cat ../stage_current),stageautofeedback)
+ifeq ($(if $(wildcard ../stage_current),$(shell cat \
+ ../stage_current)),stageautofeedback)
$(ALL_HOST_BACKEND_OBJS): ALL_COMPILERFLAGS += -fauto-profile=cc1plus.fda
$(ALL_HOST_BACKEND_OBJS): cc1plus.fda
endif
--- gcc/c/Make-lang.in.jj 2016-06-24 12:59:22.000000000 +0200
+++ gcc/c/Make-lang.in 2016-06-24 14:45:57.115410249 +0200
@@ -60,7 +60,8 @@ c_OBJS = $(C_OBJS) cc1-checksum.o c/gccs
# Use strict warnings for this front end.
c-warn = $(STRICT_WARN)
-ifeq ($(shell cat ../stage_current),stageautofeedback)
+ifeq ($(if $(wildcard ../stage_current),$(shell cat \
+ ../stage_current)),stageautofeedback)
$(C_OBJS): ALL_COMPILERFLAGS += -fauto-profile=cc1.fda
$(C_OBJS): cc1.fda
endif
--- gcc/cp/Make-lang.in.jj 2016-06-24 12:59:22.000000000 +0200
+++ gcc/cp/Make-lang.in 2016-06-24 14:46:26.392050859 +0200
@@ -81,7 +81,8 @@ CXX_AND_OBJCXX_OBJS = cp/call.o cp/decl.
cp/vtable-class-hierarchy.o cp/constexpr.o cp/cp-ubsan.o \
cp/constraint.o cp/logic.o $(CXX_C_OBJS)
-ifeq ($(shell cat ../stage_current),stageautofeedback)
+ifeq ($(if $(wildcard ../stage_current),$(shell cat \
+ ../stage_current)),stageautofeedback)
$(CXX_AND_OBJCXX_OBJS): CFLAGS += -fauto-profile=cc1plus.fda
$(CXX_AND_OBJCXX_OBJS): cc1plus.fda
endif
--- gcc/lto/Make-lang.in.jj 2016-06-24 12:59:27.000000000 +0200
+++ gcc/lto/Make-lang.in 2016-06-24 14:47:04.387584437 +0200
@@ -29,7 +29,8 @@ lto_OBJS = $(LTO_OBJS)
# now. Should reenable after this is fixed, but only when LTO bootstrap
# is enabled.
-#ifeq ($(shell cat ../stage_current),stageautofeedback)
+#ifeq ($(if $(wildcard ../stage_current),$(shell cat \
+# ../stage_current)),stageautofeedback)
#$(LTO_OBJS): CFLAGS += -fauto-profile=lto1.fda
#$(LTO_OBJS): lto1.fda
#endif
Jakub