From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A46E3857438; Tue, 17 Oct 2023 13:12:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A46E3857438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697548325; bh=n05fHJ2JEETqMZh1L+y/vALtmowuuLbK50P9ZavU+v8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YV5lpGT0eUpyoPntlMinYm8TLEul9kix2tQ7ctsmg6eN7sYGzdOaLKJ0S0l1K9Xcp 3ISv2N5jtCWP9IS12q2yl51+NxHgWeVJ4k+Upwd3Ty4dnaDHdTy4HrHzzzzyKga8yw zWHoRcHPwYShfnui4VyeZtSKltkQn5NeoEq8XpyM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/111756] Re-building all-gcc after source changes fails to link Date: Tue, 17 Oct 2023 13:12:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111756 --- Comment #5 from CVS Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:ef6696af08a888b53e0e21b17c0a1f87ffdfc3c6 commit r14-4683-gef6696af08a888b53e0e21b17c0a1f87ffdfc3c6 Author: Gaius Mulley Date: Tue Oct 17 14:11:24 2023 +0100 PR modula2/111756: Re-building all-gcc after source changes fails to li= nk When having modula-2 enabled in a development tree and there are any changes that trigger rebuilds in m2/ doing a 'make all-gcc' in the build directory might fail due to lack of dependency tracking. This patch introduces build dependencies into gcc/m2/Make-lang.in using -M* options. The patch also introduces all -M* options to cc1gm2 and gm2. gcc/m2/ChangeLog: PR modula2/111756 * Make-lang.in (CM2DEP): New define conditionally set if ($(CXXDEPMODE),depmode=3Dgcc3). (GM2_1): Use $(CM2DEP). (m2/gm2-gcc/%.o): Ensure $(@D)/$(DEPDIR) is created. Add $(CM2DEP) to the $(COMPILER) command and use $(POSTCOMPILE). (m2/gm2-gcc/m2configure.o): Ditto. (m2/gm2-lang.o): Ditto. (m2/m2pp.o): Ditto. (m2/gm2-gcc/rtegraph.o): Ditto. (m2/mc-boot/$(SRC_PREFIX)%.o): Ditto. (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto. (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto. (m2/mc-boot/main.o): Ditto. (mcflex.o): Ditto. (m2/gm2-libs-boot/M2RTS.o): Ditto. (m2/gm2-libs-boot/%.o): Ditto. (m2/gm2-libs-boot/%.o): Ditto. (m2/gm2-libs-boot/RTcodummy.o): Ditto. (m2/gm2-libs-boot/RTintdummy.o): Ditto. (m2/gm2-libs-boot/wrapc.o): Ditto. (m2/gm2-libs-boot/UnixArgs.o): Ditto. (m2/gm2-libs-boot/choosetemp.o): Ditto. (m2/gm2-libs-boot/errno.o): Ditto. (m2/gm2-libs-boot/dtoa.o): Ditto. (m2/gm2-libs-boot/ldtoa.o): Ditto. (m2/gm2-libs-boot/termios.o): Ditto. (m2/gm2-libs-boot/SysExceptions.o): Ditto. (m2/gm2-libs-boot/SysStorage.o): Ditto. (m2/gm2-compiler-boot/M2GCCDeclare.o): Ditto. (m2/gm2-compiler-boot/M2Error.o): Ditto. (m2/gm2-compiler-boot/%.o): Ditto. (m2/gm2-compiler-boot/%.o): Ditto. (m2/gm2-compiler-boot/m2flex.o): Ditto. (m2/gm2-compiler/%.o): Ditto. (m2/gm2-compiler/m2flex.o): Ditto. (m2/gm2-libs-iso/%.o): Ditto. (m2/gm2-libs/%.o): Ditto. (m2/gm2-libs/%.o): Ditto. (m2/gm2-libs/choosetemp.o): Ditto. (m2/boot-bin/mklink$(exeext)): Ditto. (m2/pge-boot/%.o): Ditto. (m2/pge-boot/%.o): Ditto. (m2/gm2-compiler/%.o): Ensure $(@D)/$(DEPDIR) is created and use $(POSTCOMPILE). (m2/gm2-compiler/%.o): Ditto. (m2/gm2-libs-iso/%.o): Ditto. (m2/gm2-libs/%.o): Ditto. * README: Purge out of date info. * gm2-compiler/M2Comp.mod (MakeSaveTempsFileNameExt): Import. (OnExitDelete): Import. (GetModuleDefImportStatementList): Import. (GetModuleModImportStatementList): Import. (GetImportModule): Import. (IsImportStatement): Import. (IsImport): Import. (GetImportStatementList): Import. (File): Import. (Close): Import. (EOF): Import. (IsNoError): Import. (WriteLine): Import. (WriteChar): Import. (FlushOutErr): Import. (WriteS): Import. (OpenToRead): Import. (OpenToWrite): Import. (ReadS): Import. (WriteS): Import. (GetM): Import. (GetMM): Import. (GetDepTarget): Import. (GetMF): Import. (GetMP): Import. (GetObj): Import. (GetMD): Import. (GetMMD): Import. (GenerateDefDependency): New procedure. (GenerateDependenciesFromImport): New procedure. (GenerateDependenciesFromList): New procedure. (GenerateDependencies): New procedure. (Compile): Re-write. (compile): Re-format. (CreateFileStem): New procedure function. (DoPass0): Re-write. (IsLibrary): New procedure function. (IsUnique): New procedure function. (Append): New procedure. (MergeDep): New procedure. (GetRuleTarget): New procedure function. (ReadDepContents): New procedure function. (WriteDep): New procedure. (WritePhonyDep): New procedure. (WriteDepContents): New procedure. (CreateDepFilename): New procedure function. (Pass0CheckDef): New procedure function. (Pass0CheckMod): New procedure function. (DoPass0): Re-write. (DepContent): New variable. (DepOutput): New variable. (BaseName): New procedure function. * gm2-compiler/M2GCCDeclare.mod (PrintTerse): Handle IsImport. Replace IsGnuAsmVolatile with IsGnuAsm. * gm2-compiler/M2Options.def (EXPORT QUALIFIED): Remove list. (SetM): New procedure. (GetM): New procedure function. (SetMM): New procedure. (GetMM): New procedure function. (SetMF): New procedure. (GetMF): New procedure function. (SetPPOnly): New procedure. (GetB): New procedure function. (SetMD): New procedure. (GetMD): New procedure function. (SetMMD): New procedure. (GetMMD): New procedure function. (SetMQ): New procedure. (SetMT): New procedure. (GetMT): New procedure function. (GetDepTarget): New procedure function. (SetMP): New procedure. (GetMP): New procedure function. (SetObj): New procedure. (SetSaveTempsDir): New procedure. * gm2-compiler/M2Options.mod (SetM): New procedure. (GetM): New procedure function. (SetMM): New procedure. (GetMM): New procedure function. (SetMF): New procedure. (GetMF): New procedure function. (SetPPOnly): New procedure. (GetB): New procedure function. (SetMD): New procedure. (GetMD): New procedure function. (SetMMD): New procedure. (GetMMD): New procedure function. (SetMQ): New procedure. (SetMT): New procedure. (GetMT): New procedure function. (GetDepTarget): New procedure function. (SetMP): New procedure. (GetMP): New procedure function. (SetObj): New procedure. (SetSaveTempsDir): New procedure. * gm2-compiler/M2Preprocess.def (PreprocessModule): New paramet= ers topSource and outputDep. Re-write. (MakeSaveTempsFileNameExt): New procedure function. (OnExitDelete): New procedure function. * gm2-compiler/M2Preprocess.mod (GetM): Import. (GetMM): Import. (OnExitDelete): Add debugging message. (RemoveFile): Add debugging message. (BaseName): Remove. (BuildCommandLineExecute): New procedure function. * gm2-compiler/M2Search.def (SetDefExtension): Remove unnecessa= ry spacing. * gm2-compiler/SymbolTable.mod (GetSymName): Handle ImportSym a= nd ImportStatementSym. * gm2-gcc/m2options.h (M2Options_SetMD): New function. (M2Options_GetMD): New function. (M2Options_SetMMD): New function. (M2Options_GetMMD): New function. (M2Options_SetM): New function. (M2Options_GetM): New function. (M2Options_SetMM): New function. (M2Options_GetMM): New function. (M2Options_GetMQ): New function. (M2Options_SetMF): New function. (M2Options_GetMF): New function. (M2Options_SetMT): New function. (M2Options_SetMP): New function. (M2Options_GetMP): New function. (M2Options_GetDepTarget): New function. * gm2-lang.cc (gm2_langhook_init): Correct comment case. (gm2_langhook_init_options): Add case OPT_M and OPT_MM. (gm2_langhook_post_options): Add case OPT_MF, OPT_MT, OPT_MD and OPT_MMD. * lang-specs.h (M2CPP): Pass though MF option. (MDMMD): New define. Add MDMMD to "@modula-2". Signed-off-by: Gaius Mulley =