public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link
@ 2023-10-10  7:09 rguenth at gcc dot gnu.org
  2023-10-11 20:12 ` [Bug modula2/111756] " gaius at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-10  7:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

            Bug ID: 111756
           Summary: Re-building all-gcc after source changes fails to link
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

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
will end up with

make[1]: Entering directory '/spc/abuild/rguenther/gcc13-g/gcc'
test -d m2/stage1 || /bin/sh
/space/rguenther/src/gcc-13-branch/gcc/../mkinstalldirs m2/stage1
g++ -no-pie   -g   -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes  -Wold-style-definition
-Wc++-compat -fno-common  -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o
m2/stage1/cc1gm2 m2/gm2-lang.o m2/m2pp.o m2/gm2-gcc/m2assert.o
m2/gm2-gcc/m2block.o m2/gm2-gcc/m2builtins.o m2/gm2-gcc/m2except.o
m2/gm2-gcc/m2color.o m2/gm2-gcc/m2configure.o m2/gm2-gcc/m2convert.o
m2/gm2-gcc/m2decl.o m2/gm2-gcc/m2expr.o m2/gm2-gcc/m2linemap.o
m2/gm2-gcc/m2statement.o m2/gm2-gcc/m2type.o m2/gm2-gcc/m2tree.o
m2/gm2-gcc/m2treelib.o m2/gm2-gcc/m2top.o m2/gm2-gcc/m2misc.o m2/gm2-gcc/init.o
m2/gm2-compiler-boot/m2flex.o \
                            attribs.o \
                             m2/gm2-compiler-boot/gm2.a
m2/gm2-libs-boot/libgm2.a  m2/mc-boot-ch/Glibc.o m2/mc-boot-ch/Gmcrts.o \
                             m2/gm2-gcc/rtegraph.o \
                             libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr
-lgmp -rdynamic -ldl  -L./../zlib -lz -lzstd 
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
m2/gm2-compiler-boot/gm2.a(P3Build.o): in function `AsmStatement(unsigned int,
unsigned int, unsigned int)':
/abuild/rguenther/gcc13-g/gcc/m2/gm2-compiler-boot/P3Build.c:8848:(.text+0xa387):
undefined reference to `M2Quads_BuildInline'
collect2: error: ld returned 1 exit status
make[1]: *** [/space/rguenther/src/gcc-13-branch/gcc/m2/Make-lang.in:554:
m2/stage1/cc1gm2] Error 1
make[1]: Leaving directory '/spc/abuild/rguenther/gcc13-g/gcc'
make: *** [Makefile:4629: all-gcc] Error 2

this looks like a dependency issue, maybe triggered by the change renaming
BuildInline to BuildAsm.

When I remove P3Build.[co] it seems to work.  How's dependency tracking (not)
working here?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
@ 2023-10-11 20:12 ` gaius at gcc dot gnu.org
  2023-10-15  1:29 ` gaius at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-11 20:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2023-10-11
     Ever confirmed|0                           |1

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the report.  I'll add -M and friends (-MM, -MF, etc) support to
gm2 and cc1gm2.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
  2023-10-11 20:12 ` [Bug modula2/111756] " gaius at gcc dot gnu.org
@ 2023-10-15  1:29 ` gaius at gcc dot gnu.org
  2023-10-16 17:19 ` gaius at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-15  1:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 56114
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56114&action=edit
Proposed patch implementing the dependency options for gm2/cc1gm2

This proposed patch implements -M, -MM, -MF, -MT, -MQ.

It probably also needs -MP, -MD, -MMD (to be done in the next patch).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
  2023-10-11 20:12 ` [Bug modula2/111756] " gaius at gcc dot gnu.org
  2023-10-15  1:29 ` gaius at gcc dot gnu.org
@ 2023-10-16 17:19 ` gaius at gcc dot gnu.org
  2023-10-17 10:18 ` gaius at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-16 17:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56114|0                           |1
        is obsolete|                            |

--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 56122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56122&action=edit
Proposed patches v4 (implement all -M flags).  No Make-lang.in changes yet
though.

This patch implements all the -M* options.  It seems to work on small projects
outside GCC.  The next patch will include the changes to gcc/m2/Make-lang.in.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-10-16 17:19 ` gaius at gcc dot gnu.org
@ 2023-10-17 10:18 ` gaius at gcc dot gnu.org
  2023-10-17 13:12 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-17 10:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56122|0                           |1
        is obsolete|                            |

--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 56132
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56132&action=edit
Proposed fix v6, Make-lang.in uses -M and friends, gm2 and cc1gm2 implement -M*

Here is a proposed fix and patch, the Make-lang.in now uses dependencies and
gm2 cc1gm2 understands all the -M* options.  Bootstrapped on x86_64 and
powerpc64le with no extra regression failures.

I've also seen it re-build with the BuildInline procedure introduced to
M2Quads.mod (rebuild).  Introduce BuildInline into M2Quads.def and P3Build.bnf.
Rebuild (seeing M2Quads.mod rebuild due to dependencies).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-10-17 10:18 ` gaius at gcc dot gnu.org
@ 2023-10-17 13:12 ` cvs-commit at gcc dot gnu.org
  2023-10-17 13:13 ` gaius at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-17 13:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:ef6696af08a888b53e0e21b17c0a1f87ffdfc3c6

commit r14-4683-gef6696af08a888b53e0e21b17c0a1f87ffdfc3c6
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Tue Oct 17 14:11:24 2023 +0100

    PR modula2/111756: Re-building all-gcc after source changes fails to link

    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=gcc3).
            (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 parameters
            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 unnecessary
            spacing.
            * gm2-compiler/SymbolTable.mod (GetSymName): Handle ImportSym and
            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 <gaiusmod2@gmail.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-10-17 13:12 ` cvs-commit at gcc dot gnu.org
@ 2023-10-17 13:13 ` gaius at gcc dot gnu.org
  2023-10-17 13:15 ` gaius at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-17 13:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing now that the patch has been applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-10-17 13:13 ` gaius at gcc dot gnu.org
@ 2023-10-17 13:15 ` gaius at gcc dot gnu.org
  2023-10-18  2:06 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-17 13:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #7 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Will close once it has been applied to the gcc-13.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-10-17 13:15 ` gaius at gcc dot gnu.org
@ 2023-10-18  2:06 ` gaius at gcc dot gnu.org
  2023-10-18  2:10 ` cvs-commit at gcc dot gnu.org
  2023-10-18  2:11 ` gaius at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-18  2:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #8 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 56135
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56135&action=edit
Proposed fix for gcc-13

This is a patch for gcc-13 adding dependency checking within
gcc/m2/Make-lang.in.  This patch does not include the implementation of the -M
options for gm2/cc1gm2 (unlike the gcc-14 version of the patch).  Ironically
the implementation of the -M options (within gm2/cc1gm2) were not necessary to
fix this PR as m2/stage1/cc1gm2 is built by translating the m2 sources into
c++.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-10-18  2:06 ` gaius at gcc dot gnu.org
@ 2023-10-18  2:10 ` cvs-commit at gcc dot gnu.org
  2023-10-18  2:11 ` gaius at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-18  2:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Gaius Mulley
<gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:bdf4b6f9f2847b7abba5392e271e30f55541935e

commit r13-7960-gbdf4b6f9f2847b7abba5392e271e30f55541935e
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Wed Oct 18 03:09:29 2023 +0100

    PR modula2/111756: Re-building all-gcc after source changes fails to link

    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.

    gcc/m2/ChangeLog:

            PR modula2/111756
            * Make-lang.in (CM2DEP): New define conditionally set if
            ($(CXXDEPMODE),depmode=gcc3).
            (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/m2flex.o): Ditto.
            (m2/gm2-libs/choosetemp.o): Ditto.
            (m2/boot-bin/mklink$(exeext)): Ditto.
            (m2/pge-boot/%.o): Ditto.
            (m2/pge-boot/%.o): Ditto.
            * README: Remove out of date info.
            * gm2-compiler/M2Quads.mod (BuildStringAdrParam): Correct
            procedure end name.
            * gm2-compiler/SymbolTable.mod (GetVarPointerCheck): Add
            default FALSE return value.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug modula2/111756] Re-building all-gcc after source changes fails to link
  2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-10-18  2:10 ` cvs-commit at gcc dot gnu.org
@ 2023-10-18  2:11 ` gaius at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-10-18  2:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111756

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing now that the patch on gcc-13 has been applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-10-18  2:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10  7:09 [Bug modula2/111756] New: Re-building all-gcc after source changes fails to link rguenth at gcc dot gnu.org
2023-10-11 20:12 ` [Bug modula2/111756] " gaius at gcc dot gnu.org
2023-10-15  1:29 ` gaius at gcc dot gnu.org
2023-10-16 17:19 ` gaius at gcc dot gnu.org
2023-10-17 10:18 ` gaius at gcc dot gnu.org
2023-10-17 13:12 ` cvs-commit at gcc dot gnu.org
2023-10-17 13:13 ` gaius at gcc dot gnu.org
2023-10-17 13:15 ` gaius at gcc dot gnu.org
2023-10-18  2:06 ` gaius at gcc dot gnu.org
2023-10-18  2:10 ` cvs-commit at gcc dot gnu.org
2023-10-18  2:11 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).