public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc
@ 2023-12-02 14:23 rsandifo at gcc dot gnu.org
  2023-12-02 21:19 ` [Bug modula2/112825] " gaius at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-12-02 14:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112825
           Summary: Modula 2 builds target objects as part of all-gcc
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---

Normally, it's possible to do:

  ../src/configure --target=foo
  make -jN all-gcc

without having a full build environment (binutils, sysroot, etc.) for target
foo.  This is useful for sanity checks and investigating bugs on other targets.
 It's also useful for config-list.mk.

However, the Modula 2 build tries to build target objects as part of all-gcc. 
The specific route I see is:

          Considering target file 'm2.info'.
           File 'm2.info' does not exist.
            Considering target file 'doc/m2.info'.
             File 'doc/m2.info' does not exist.
              Considering target file '../../gcc/gcc/doc/gm2.texi'.
              File '../../gcc/gcc/doc/gm2.texi' was considered already.
              Considering target file 'm2/gm2-libs.texi'.
               File 'm2/gm2-libs.texi' does not exist.
                Considering target file 'gm2-libs.texi-check'.
                 File 'gm2-libs.texi-check' does not exist.
                  Considering target file 'm2/SYSTEM-pim.texi'.
                   File 'm2/SYSTEM-pim.texi' does not exist.
                    Considering target file 'SYSTEM-pim-texi-check'.
                     File 'SYSTEM-pim-texi-check' does not exist.
                      Considering target file
'.../gcc/git/tmp/gcc/m2/gm2-libs/SYSTEM.def'.
                       File '.../gcc/git/tmp/gcc/m2/gm2-libs/SYSTEM.def' does
not exist.
                        Pruning file 'gm2'.
                        Pruning file 'xgcc'.
                        Pruning file 'cc1gm2'.
                       Finished prerequisites of target file
'.../gcc/git/tmp/gcc/m2/gm2-libs/SYSTEM.def'.
                      Must remake target
'.../gcc/git/tmp/gcc/m2/gm2-libs/SYSTEM.def'.

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
@ 2023-12-02 21:19 ` gaius at gcc dot gnu.org
  2023-12-03 22:19 ` gaius at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-12-02 21:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2023-12-02
     Ever confirmed|0                           |1

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the bug report - I'm looking into this.

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
  2023-12-02 21:19 ` [Bug modula2/112825] " gaius at gcc dot gnu.org
@ 2023-12-03 22:19 ` gaius at gcc dot gnu.org
  2023-12-03 22:25 ` gaius at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-12-03 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Following up on commit: 301dec8533460152c4dd61f46c8e9276e169c49a.

Indeed m2 shouldn't attempt to generate target libraries when performing make
all-gcc.  Currently it generates build/gcc/m2/gm2-libs/SYSTSEM.def using the
script gcc/m2/tools-src/makeSystem.  makeSystem should exec gm2 with -S rather
than -c (and other flags) to generate the list of target data types which are
textually converted into SYSTEM.def.

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
  2023-12-02 21:19 ` [Bug modula2/112825] " gaius at gcc dot gnu.org
  2023-12-03 22:19 ` gaius at gcc dot gnu.org
@ 2023-12-03 22:25 ` gaius at gcc dot gnu.org
  2023-12-03 23:14 ` tschwinge at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-12-03 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gaius at gcc dot gnu.org

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

This patch changes all invocations of gm2 -c to gm2 -S to avoid invoking the
target assembler (which might not be present if make all-gcc is run).

Tested using:

cd gcc-src
mkdir build
cd build
../configure --target=aarch64-linux-gnu --enable-languages=m2
make all-gcc -j 30

on an x86_64 based gnu/linux box

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-12-03 22:25 ` gaius at gcc dot gnu.org
@ 2023-12-03 23:14 ` tschwinge at gcc dot gnu.org
  2023-12-04  1:36 ` cvs-commit at gcc dot gnu.org
  2023-12-04  1:39 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-12-03 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tschwinge at gcc dot gnu.org

--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I too, months ago, had run into this problem -- via the nvptx 'as' failing on
'-o /dev/null'... (which I'll fix anyway).  After a quick look at
'gcc/m2/tools-src/makeSystem' I did presume that the compiler is invoked there
only for some side effects (remember, '-o /dev/null'), and thus fixing this
might be...

(In reply to Gaius Mulley from comment #3)
> Created attachment 56782 [details]
> Proposed fix
> 
> This patch changes all invocations of gm2 -c to gm2 -S to avoid invoking the
> target assembler (which might not be present if make all-gcc is run).

... as simple as this.  (Then, of course, interrupted by higher-priority
things, and I never got back to this.)

Therefore, for what it's worth, conceptual ACK to this proposed change (which
I've not yet tested, but will, eventually).

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-12-03 23:14 ` tschwinge at gcc dot gnu.org
@ 2023-12-04  1:36 ` cvs-commit at gcc dot gnu.org
  2023-12-04  1:39 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-04  1:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC 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:4e5f5a8ae82c5f4f714102d2437175ec366f644c

commit r14-6100-g4e5f5a8ae82c5f4f714102d2437175ec366f644c
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Mon Dec 4 01:35:46 2023 +0000

    PR modula2/112825: modula2 builds target objects as part of all-gcc

    This patch fixes the PR modula2/112825 which fails if the target
    assembler is not present on the host.  This can be seen if the
    build invokes make all-gcc.  m2 should not attempt to generate
    target libraries when performing make all-gcc.

    Prior to this patch it generated build/gcc/m2/gm2-libs/SYSTSEM.def
    using the script gcc/m2/tools-src/makeSystem (and gm2 -c).
    makeSystem should exec gm2 -S instead (and other flags)
    to generate the list of target data types without requiring any
    target tools.  The target types emitted are textually converted
    into SYSTEM.def.

    gcc/m2/ChangeLog:

            PR modula2/112825
            * tools-src/makeSystem: Change all occurrences of -c to -S.

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

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

* [Bug modula2/112825] Modula 2 builds target objects as part of all-gcc
  2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-12-04  1:36 ` cvs-commit at gcc dot gnu.org
@ 2023-12-04  1:39 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-12-04  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Bootstrapped on x86_64.

Many thanks for the patch review - now git committed and pushed.
I'm optimistically closing this PR (feel free to re-open).

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

end of thread, other threads:[~2023-12-04  1:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-02 14:23 [Bug modula2/112825] New: Modula 2 builds target objects as part of all-gcc rsandifo at gcc dot gnu.org
2023-12-02 21:19 ` [Bug modula2/112825] " gaius at gcc dot gnu.org
2023-12-03 22:19 ` gaius at gcc dot gnu.org
2023-12-03 22:25 ` gaius at gcc dot gnu.org
2023-12-03 23:14 ` tschwinge at gcc dot gnu.org
2023-12-04  1:36 ` cvs-commit at gcc dot gnu.org
2023-12-04  1:39 ` 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).