* when RELEASE=1, also perform two compilations of the compiler/rtl with WPO

(and use the resulting compiler as final compiler to compile the rest of
     the source tree and to install)

   Note: this means that if you manually use "make cycle RELEASE=1", the RTL
     afterwards will not be usable, because it will have been compiled with
     WPO for the compiler; if you use "make all" in the root FPC dir, there
     is no problem since that makefile recompiles the RTL anyway.

git-svn-id: trunk@13560 -
This commit is contained in:
Jonas Maebe 2009-08-19 21:36:28 +00:00
parent c6b5038d5e
commit 6c948f0970
2 changed files with 63 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/08/02]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/08/14]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@ -394,6 +394,16 @@ endif
ifeq ($(PPC_TARGET),arm)
override LOCALOPT+=
endif
OPTWPOCOLLECT=-OWdevirtcalls,optvmts -FW$(BASEDIR)/pp1.wpo
OPTWPOPERFORM=-Owdevirtcalls,optvmts -Fw$(BASEDIR)/pp1.wpo
ifneq ($(findstring $(OS_TARGET),darwin linux freebsd solaris),)
ifdef LINKSMART
ifdef CREATESMART
OPTWPOCOLLECT+=-OWsymbolliveness
OPTWPOPERFORM+=-Owsymbolliveness
endif
endif
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_DIRS+=utils
endif
@ -3267,6 +3277,8 @@ PPCROSSNAME=ppcross$(CPUSUF)$(SRCEXEEXT)
TEMPNAME1=ppc1$(EXEEXT)
TEMPNAME2=ppc2$(EXEEXT)
TEMPNAME3=ppc3$(EXEEXT)
TEMPWPONAME1=ppcwpo1$(EXEEXT)
TEMPWPONAME2=ppcwpo2$(EXEEXT)
MAKEDEP=ppdep$(EXEEXT)
MSG2INC=./msg2inc$(EXEEXT)
ifdef CROSSINSTALL
@ -3343,6 +3355,20 @@ endif
$(MOVE) $(COMPILER_TARGETDIR)/$(PPEXENAME) $(EXENAME)
ifeq ($(CPU_SOURCE),$(PPC_TARGET))
ifeq ($(OS_SOURCE),$(OS_TARGET))
ifdef RELEASE
wpocycle:
$(RM) $(EXENAME)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(LOCALOPT) $(OPTWPOCOLLECT) -Xs-' compiler
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(RTLOPT) $(OPTWPOPERFORM)' rtlclean rtl
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(LOCALOPT) $(OPTWPOPERFORM) $(subst pp1.wpo,pp2.wpo,$(OPTWPOCOLLECT)) -Xs-' cycleclean compiler
$(MOVE) $(EXENAME) $(TEMPWPONAME1)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(RTLOPT) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM))' rtlclean rtl
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(LOCALOPT) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM))' cycleclean compiler
$(COPY) $(EXENAME) $(TEMPWPONAME2)
$(MAKE) echotime
else
wpocycle:
endif
ifdef DIFF
ifdef OLDFPC
ifneq ($(OS_TARGET),darwin)
@ -3383,6 +3409,7 @@ cycle:
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next
$(DIFF) $(TEMPNAME3) $(EXENAME)
$(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAME)'
$(MAKE) wpocycle
$(MAKE) echotime
else
cycle:

View File

@ -218,6 +218,20 @@ ifeq ($(PPC_TARGET),arm)
override LOCALOPT+=
endif
OPTWPOCOLLECT=-OWdevirtcalls,optvmts -FW$(BASEDIR)/pp1.wpo
OPTWPOPERFORM=-Owdevirtcalls,optvmts -Fw$(BASEDIR)/pp1.wpo
# symbol liveness WPO requires nm, smart linking and no stripping (the latter
# is forced by the Makefile when necessary)
ifneq ($(findstring $(OS_TARGET),darwin linux freebsd solaris),)
ifdef LINKSMART
ifdef CREATESMART
OPTWPOCOLLECT+=-OWsymbolliveness
OPTWPOPERFORM+=-Owsymbolliveness
endif
endif
endif
[rules]
#####################################################################
# Setup Targets
@ -266,6 +280,8 @@ PPCROSSNAME=ppcross$(CPUSUF)$(SRCEXEEXT)
TEMPNAME1=ppc1$(EXEEXT)
TEMPNAME2=ppc2$(EXEEXT)
TEMPNAME3=ppc3$(EXEEXT)
TEMPWPONAME1=ppcwpo1$(EXEEXT)
TEMPWPONAME2=ppcwpo2$(EXEEXT)
MAKEDEP=ppdep$(EXEEXT)
MSG2INC=./msg2inc$(EXEEXT)
ifdef CROSSINSTALL
@ -411,6 +427,24 @@ ifeq ($(OS_SOURCE),$(OS_TARGET))
# Normal cycle
#
ifdef RELEASE
# Two WPO cycles in case of RELEASE=1
wpocycle:
$(RM) $(EXENAME)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(LOCALOPT) $(OPTWPOCOLLECT) -Xs-' compiler
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(RTLOPT) $(OPTWPOPERFORM)' rtlclean rtl
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(LOCALOPT) $(OPTWPOPERFORM) $(subst pp1.wpo,pp2.wpo,$(OPTWPOCOLLECT)) -Xs-' cycleclean compiler
$(MOVE) $(EXENAME) $(TEMPWPONAME1)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(RTLOPT) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM))' rtlclean rtl
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(LOCALOPT) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM))' cycleclean compiler
$(COPY) $(EXENAME) $(TEMPWPONAME2)
$(MAKE) echotime
else
wpocycle:
endif
# Used to avoid unnecessary steps
ifdef DIFF
ifdef OLDFPC
@ -457,6 +491,7 @@ cycle:
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next
$(DIFF) $(TEMPNAME3) $(EXENAME)
$(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAME)'
$(MAKE) wpocycle
$(MAKE) echotime
else