From 6f132578cdf708439c29bfb6a7e810724e23c5e3 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 16 Oct 2017 17:16:35 +0000 Subject: [PATCH] * Merge of several fixes for ppudump tests used in regular tests for ppudump output. ------------------------------------------------------------------------ r37206 | pierre | 2017-09-14 15:41:06 +0200 (Thu, 14 Sep 2017) | 1 line Fix failures in rtlppulogs ------------------------------------------------------------------------ r37208 | pierre | 2017-09-14 17:57:25 +0200 (Thu, 14 Sep 2017) | 1 line Use installed ppudump instead of trying to recompile it, to be able to test cross-compiled RTL units ------------------------------------------------------------------------ r37210 | pierre | 2017-09-15 13:24:06 +0200 (Fri, 15 Sep 2017) | 1 line Fix the RTL directory for old OSes that use OS_TARGET only for rtlppulogs rule ------------------------------------------------------------------------ r37219 | pierre | 2017-09-15 22:24:06 +0200 (Fri, 15 Sep 2017) | 1 line Also use in path ppudump for ppulogs rule ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_0@37476 - --- compiler/Makefile | 8 ++-- compiler/Makefile.fpc | 9 ++-- compiler/utils/ppuutils/ppudump.pp | 22 +++++----- packages/Makefile | 66 ++++-------------------------- packages/Makefile.fpc | 11 +++-- 5 files changed, 37 insertions(+), 79 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index a0704744a1..87276dd065 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -4083,7 +4083,7 @@ PPUDIR=$(COMPILER_UNITTARGETDIR) ALLPPUDIR=$(CPU_TARGET)/units/* PPULIST=$(wildcard $(PPUDIR)/*.ppu) PPULOGLIST=$(subst .ppu,.log-ppu,$(PPULIST)) -RTLPPUDIR=../rtl/units/$(FULL_TARGET) +RTLPPUDIR=../rtl/units/$(TARGETSUFFIX) RTLPPULIST=$(wildcard $(RTLPPUDIR)/*.ppu) RTLPPULOGLIST=$(subst .ppu,.log-ppu,$(RTLPPULIST)) .PHONY : ppulogs cleanppulogs rtlppulogs cleanrtlppulogs testppudump @@ -4091,13 +4091,15 @@ ppulogs : $(PPULOGLIST) rtlppulogs : $(RTLPPULOGLIST) vpath %.ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR) vpath %.log-ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR) -%.log-ppu : %.ppu ./utils/ppudump$(EXEEXT) - .$(PATHSEP)utils$(PATHSEP)ppudump -VA -M $< > $@ +%.log-ppu : %.ppu + ppudump -VA -M $< > $@ ./utils/ppudump$(EXEEXT): $(MAKE) -C $(COMPILERUTILSDIR) ppudump$(EXEEXT) ppuinfo : echo PPU list is "$(PPULIST)" echo PPULOG list is "$(PPULOGLIST)" + echo RTLPPUDIR is "$(RTLPPUDIR)" + echo RTLPPU list is "$(RTLPPULIST)" cleanppulogs : -$(RMPROG) $(PPULOGLIST) cleanrtlppulogs : diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc index 6e1b1bf12c..f5135d364a 100644 --- a/compiler/Makefile.fpc +++ b/compiler/Makefile.fpc @@ -842,7 +842,7 @@ ALLPPUDIR=$(CPU_TARGET)/units/* PPULIST=$(wildcard $(PPUDIR)/*.ppu) PPULOGLIST=$(subst .ppu,.log-ppu,$(PPULIST)) -RTLPPUDIR=../rtl/units/$(FULL_TARGET) +RTLPPUDIR=../rtl/units/$(TARGETSUFFIX) RTLPPULIST=$(wildcard $(RTLPPUDIR)/*.ppu) RTLPPULOGLIST=$(subst .ppu,.log-ppu,$(RTLPPULIST)) @@ -855,8 +855,9 @@ rtlppulogs : $(RTLPPULOGLIST) vpath %.ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR) vpath %.log-ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR) -%.log-ppu : %.ppu ./utils/ppudump$(EXEEXT) - .$(PATHSEP)utils$(PATHSEP)ppudump -VA -M $< > $@ +# Use installed ppudump +%.log-ppu : %.ppu + ppudump -VA -M $< > $@ ./utils/ppudump$(EXEEXT): @@ -865,6 +866,8 @@ vpath %.log-ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR) ppuinfo : echo PPU list is "$(PPULIST)" echo PPULOG list is "$(PPULOGLIST)" + echo RTLPPUDIR is "$(RTLPPUDIR)" + echo RTLPPU list is "$(RTLPPULIST)" cleanppulogs : -$(RMPROG) $(PPULOGLIST) diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 0eed7fa1bf..c59a2fe67d 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -2644,6 +2644,7 @@ procedure readdefinitions(const s:string; ParentDef: TPpuContainerDef); { type tvarianttype is in symconst unit } var b : byte; + otb : byte; { object type byte, needed later } l,j : longint; calloption : tproccalloption; procoptions : tprocoptions; @@ -3075,9 +3076,9 @@ begin writeln([space,' Import lib/pkg : ',getstring]); write ([space,' Options : ']); readobjectdefoptions(objdef); - b:=getbyte; + otb:=getbyte; write ([space,' Type : ']); - case tobjecttyp(b) of + case tobjecttyp(otb) of odt_class : writeln('class'); odt_object : writeln('object'); odt_interfacecom : writeln('interfacecom'); @@ -3092,7 +3093,7 @@ begin odt_interfacejava : writeln('Java interface'); else WriteWarning('Invalid object type: ' + IntToStr(b)); end; - case tobjecttyp(b) of + case tobjecttyp(otb) of odt_class, odt_cppclass, odt_objcclass, odt_javaclass: objdef.ObjType:=otClass; odt_object: @@ -3112,7 +3113,7 @@ begin write ([space, ' Ancestor Class : ']); readderef('',objdef.Ancestor); - if tobjecttyp(b) in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then + if tobjecttyp(otb) in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then begin { IIDGUID } for j:=1to 16 do @@ -3123,7 +3124,7 @@ begin writeln([space,' Abstract methods : ',getlongint]); - if tobjecttyp(b)=odt_helper then + if tobjecttyp(otb)=odt_helper then begin write([space,' Helper parent : ']); readderef('',objdef.HelperParent); @@ -3139,7 +3140,7 @@ begin readvisibility; end; - if tobjecttyp(b) in [odt_class,odt_objcclass,odt_objcprotocol,odt_javaclass,odt_interfacejava] then + if tobjecttyp(otb) in [odt_class,odt_objcclass,odt_objcprotocol,odt_javaclass,odt_interfacejava] then begin l:=getlongint; writeln([space,' Impl Intf Count : ',l]); @@ -3159,11 +3160,8 @@ begin Include(objdef.Options, ooCopied); writeln(' Copy of def: '); readderef('',objdef.Ancestor); - end; - - if not EndOfEntry then - HasMoreInfos; - if not(df_copied_def in current_defoptions) then + end + else begin {read the record definitions and symbols} space:=' '+space; @@ -3171,6 +3169,8 @@ begin readsymtable('fields',objdef); Delete(space,1,4); end; + if not EndOfEntry then + HasMoreInfos; end; ibfiledef : diff --git a/packages/Makefile b/packages/Makefile index 781a8b16fb..28feb98c98 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -1,11 +1,11 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2016-11-06 rev 34805] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2017-02-04 rev 35393] # 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 i386-nativent i386-iphonesim i386-android i386-aros 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 powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-aros x86_64-dragonfly arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin +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 i386-nativent i386-iphonesim i386-android i386-aros 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 powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-dragonfly arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-msdos BSDs = freebsd netbsd openbsd darwin dragonfly UNIXs = linux $(BSDs) solaris qnx haiku aix -LIMIT83fs = go32v2 os2 emx watcom msdos win16 +LIMIT83fs = go32v2 os2 emx watcom msdos OSNeedsComspecToRunBatch = go32v2 watcom FORCE: .PHONY: FORCE @@ -184,12 +184,6 @@ $(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t endif override FPCOPT+=-Cp$(SUBARCH) endif -ifeq ($(FULL_TARGET),avr-embedded) -ifeq ($(SUBARCH),) -$(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined) -endif -override FPCOPT+=-Cp$(SUBARCH) -endif ifeq ($(FULL_TARGET),mipsel-embedded) ifeq ($(SUBARCH),) $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined) @@ -758,21 +752,6 @@ STATICLIBPREFIX= STATICLIBEXT=.a SHORTSUFFIX=d16 endif -ifeq ($(OS_TARGET),embedded) -ifeq ($(CPU_TARGET),i8086) -STATICLIBPREFIX= -STATICLIBEXT=.a -else -EXEEXT=.bin -endif -SHORTSUFFIX=emb -endif -ifeq ($(OS_TARGET),win16) -STATICLIBPREFIX= -STATICLIBEXT=.a -SHAREDLIBEXT=.dll -SHORTSUFFIX=w16 -endif ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) FPCMADE=fpcmade.$(SHORTSUFFIX) ZIPSUFFIX=$(SHORTSUFFIX) @@ -1187,12 +1166,6 @@ endif ifeq ($(FULL_TARGET),x86_64-embedded) REQUIRE_PACKAGES_RTL=1 endif -ifeq ($(FULL_TARGET),x86_64-iphonesim) -REQUIRE_PACKAGES_RTL=1 -endif -ifeq ($(FULL_TARGET),x86_64-aros) -REQUIRE_PACKAGES_RTL=1 -endif ifeq ($(FULL_TARGET),x86_64-dragonfly) REQUIRE_PACKAGES_RTL=1 endif @@ -1223,9 +1196,6 @@ endif ifeq ($(FULL_TARGET),arm-android) REQUIRE_PACKAGES_RTL=1 endif -ifeq ($(FULL_TARGET),arm-aros) -REQUIRE_PACKAGES_RTL=1 -endif ifeq ($(FULL_TARGET),powerpc64-linux) REQUIRE_PACKAGES_RTL=1 endif @@ -1265,21 +1235,9 @@ endif ifeq ($(FULL_TARGET),jvm-android) REQUIRE_PACKAGES_RTL=1 endif -ifeq ($(FULL_TARGET),i8086-embedded) -REQUIRE_PACKAGES_RTL=1 -endif ifeq ($(FULL_TARGET),i8086-msdos) REQUIRE_PACKAGES_RTL=1 endif -ifeq ($(FULL_TARGET),i8086-win16) -REQUIRE_PACKAGES_RTL=1 -endif -ifeq ($(FULL_TARGET),aarch64-linux) -REQUIRE_PACKAGES_RTL=1 -endif -ifeq ($(FULL_TARGET),aarch64-darwin) -REQUIRE_PACKAGES_RTL=1 -endif ifdef REQUIRE_PACKAGES_RTL PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) ifneq ($(PACKAGEDIR_RTL),) @@ -1330,7 +1288,6 @@ endif ifeq ($(OS_SOURCE),openbsd) override FPCOPT+=-FD$(NEW_BINUTILS_PATH) override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH) -override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH) endif ifndef CROSSBOOTSTRAP ifneq ($(BINUTILSPREFIX),) @@ -1343,7 +1300,6 @@ endif ifndef CROSSCOMPILE ifneq ($(BINUTILSPREFIX),) override FPCMAKEOPT+=-XP$(BINUTILSPREFIX) -override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX) endif endif ifdef UNITDIR @@ -1443,9 +1399,6 @@ endif ifdef OPT override FPCOPT+=$(OPT) endif -ifdef FPMAKEBUILDOPT -override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT) -endif ifdef FPCOPTDEF override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) endif @@ -1563,10 +1516,6 @@ endif ifdef DEBUGSYMEXT -$(DEL) *$(DEBUGSYMEXT) endif -ifdef LOCALFPMAKEBIN - -$(DEL) $(LOCALFPMAKEBIN) - -$(DEL) $(FPMAKEBINOBJ) -endif fpc_distclean: cleanall .PHONY: fpc_baseinfo override INFORULES+=fpc_baseinfo @@ -1762,21 +1711,22 @@ else endif PPULIST:=$(wildcard */units/*/*.ppu) PPULOGLIST:=$(subst .ppu,.log-ppu,$(PPULIST)) -RMPPULOGLIST:=$(subst .ppu,.rm-log-ppu,$(PPULIST)) +RMPPULOGLIST:=$(subst .log-ppu,.rm-log-ppu,$(wildcard $(PPULOGLIST))) .PHONY : ppulogs cleanppulogs testppudump $(RMPPULOGLIST) ppulogs : $(PPULOGLIST) vpath %.ppu $(ALLPPUDIRS) vpath %.log-ppu $(ALLPPUDIRS) vpath %.rm-log-ppu $(ALLPPUDIRS) -%.log-ppu : %.ppu ../compiler/utils/ppudump$(EXEEXT) - ..$(PATHSEP)compiler$(PATHSEP)utils$(PATHSEP)ppudump -VA -M $< > $@ -%.rm-log-ppu : %.ppu ../compiler/utils/ppudump$(EXEEXT) +%.log-ppu : %.ppu + ppudump -VA -M $< > $@ +%.rm-log-ppu : %.ppu -$(RMPROG) $< ../compiler/utils/ppudump$(EXEEXT): $(MAKE) -C $(COMPILERDIR)/utils ppudump$(EXEEXT) ppuinfo : echo PPU list is "$(PPULIST)" echo PPULOG list is "$(PPULOGLIST)" + echo RMPPULOG list is "$(RMPPULOGLIST)" cleanppulogs : $(RMPPULOGLIST) testppudump : $(MAKE) cleanppulogs ppulogs diff --git a/packages/Makefile.fpc b/packages/Makefile.fpc index 3174426c81..c4dca55172 100644 --- a/packages/Makefile.fpc +++ b/packages/Makefile.fpc @@ -141,7 +141,8 @@ endif PPULIST:=$(wildcard */units/*/*.ppu) PPULOGLIST:=$(subst .ppu,.log-ppu,$(PPULIST)) -RMPPULOGLIST:=$(subst .ppu,.rm-log-ppu,$(PPULIST)) +# Only remove existing log-ppu files +RMPPULOGLIST:=$(subst .log-ppu,.rm-log-ppu,$(wildcard $(PPULOGLIST))) .PHONY : ppulogs cleanppulogs testppudump $(RMPPULOGLIST) @@ -151,10 +152,11 @@ vpath %.ppu $(ALLPPUDIRS) vpath %.log-ppu $(ALLPPUDIRS) vpath %.rm-log-ppu $(ALLPPUDIRS) -%.log-ppu : %.ppu ../compiler/utils/ppudump$(EXEEXT) - ..$(PATHSEP)compiler$(PATHSEP)utils$(PATHSEP)ppudump -VA -M $< > $@ +# Do not try to recompile ppudump, as this does not work if trying to test cross-compiled units +%.log-ppu : %.ppu + ppudump -VA -M $< > $@ -%.rm-log-ppu : %.ppu ../compiler/utils/ppudump$(EXEEXT) +%.rm-log-ppu : %.ppu -$(RMPROG) $< @@ -164,6 +166,7 @@ vpath %.rm-log-ppu $(ALLPPUDIRS) ppuinfo : echo PPU list is "$(PPULIST)" echo PPULOG list is "$(PPULOGLIST)" + echo RMPPULOG list is "$(RMPPULOGLIST)" cleanppulogs : $(RMPPULOGLIST)