public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug demangler/111570] New: -march=generic prints error
@ 2023-09-24 12:03 brjd_epdjq36 at kygur dot com
  2023-09-25  8:48 ` [Bug target/111570] " redi at gcc dot gnu.org
  2023-09-25 17:01 ` brjd_epdjq36 at kygur dot com
  0 siblings, 2 replies; 3+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2023-09-24 12:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111570
           Summary: -march=generic prints error
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: demangler
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brjd_epdjq36 at kygur dot com
  Target Milestone: ---

When compiling, it prints out an error: 'generic' CPU can be used only for
'-mtune=' switch. 


However, the compiler help prints out:

Known valid arguments for -march= option:
    i386 i486 i586 pentium ... generic native


Not sure if this is a bug or it means something else.

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

* [Bug target/111570] -march=generic prints error
  2023-09-24 12:03 [Bug demangler/111570] New: -march=generic prints error brjd_epdjq36 at kygur dot com
@ 2023-09-25  8:48 ` redi at gcc dot gnu.org
  2023-09-25 17:01 ` brjd_epdjq36 at kygur dot com
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-09-25  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-09-25
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html is very clear:

"There is no -march=generic option because -march indicates the instruction set
the compiler can use, and there is no generic instruction set applicable to all
processors. In contrast, -mtune indicates the processor (or, in this case,
collection of processors) for which the code is optimized."

This is just a bug in the list of valid arguments printed.

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

* [Bug target/111570] -march=generic prints error
  2023-09-24 12:03 [Bug demangler/111570] New: -march=generic prints error brjd_epdjq36 at kygur dot com
  2023-09-25  8:48 ` [Bug target/111570] " redi at gcc dot gnu.org
@ 2023-09-25 17:01 ` brjd_epdjq36 at kygur dot com
  1 sibling, 0 replies; 3+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2023-09-25 17:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Brjd <brjd_epdjq36 at kygur dot com> ---
Thank you and I also read this guide. My point is that the generic arch might
be  possible in theory. If the gcc builds for the oldest CPU with x86_64, is it
possible that code will run on all modern CPU since their subset includes also
that of their predecessor. 

How about making it default to that generic or baseline build for that limited
CPU?

If I could ask you also more questions, let me ask you about this problem. The
guide doesn't mention anything about the specific arch. If -march=cpu what is
better -mtune=cpu where cpu is the same as in arch or -mtune=generic so that
the code tunes to all CPU kinds of this family.If the tune is empty, is it
default generic or native and the arch is not clear either.

One question more, I am not able to find a guide about the gcc build and no
information whether the gcc may be built in targets like LLVM and clang. For
example, is it possible to build first only the LLVM, then stop and resume with
clang etc. or first, gcc's only c modiule and its submodules, then stop and
resume with its g++  module and submodules, next with libgcc, libstdc++ etc.? 

It would be great, especially for long bootstraps and stage 2, but I find only
make all-gcc, target-libgcc which however build almost all of the compiler.

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

end of thread, other threads:[~2023-09-25 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-24 12:03 [Bug demangler/111570] New: -march=generic prints error brjd_epdjq36 at kygur dot com
2023-09-25  8:48 ` [Bug target/111570] " redi at gcc dot gnu.org
2023-09-25 17:01 ` brjd_epdjq36 at kygur dot com

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).