public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux
[not found] <bug-70210-4@http.gcc.gnu.org/bugzilla/>
@ 2020-11-02 20:30 ` Viktor.Engelmann at googlemail dot com
2020-11-03 9:22 ` ktkachov at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Viktor.Engelmann at googlemail dot com @ 2020-11-02 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210
Viktor Engelmann <Viktor.Engelmann at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Viktor.Engelmann@googlemail
| |.com
--- Comment #3 from Viktor Engelmann <Viktor.Engelmann at googlemail dot com> ---
I see a (probably related) problem in gcc 9.3 on docker image alpine:latest on
raspberry pi 3. There, Makefiles generated by autoconf pass -mcpu=armv7l.
And you can't just force it to use a different cpu by passing --host= to
./configure in your Dockerfile, because that would break the Dockerfiles'
cross-platform compatibility. This breaks all autoconf projects in docker on
raspberry pi 3.
This shouldn't be that hard IMHO, because -mcpu=armv7l only needs to be
reinterpreted as -mcpu=cortex-a53.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux
[not found] <bug-70210-4@http.gcc.gnu.org/bugzilla/>
2020-11-02 20:30 ` [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux Viktor.Engelmann at googlemail dot com
@ 2020-11-03 9:22 ` ktkachov at gcc dot gnu.org
2020-11-03 15:02 ` Viktor.Engelmann at googlemail dot com
2020-11-03 15:34 ` ktkachov at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-03 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org
--- Comment #4 from ktkachov at gcc dot gnu.org ---
(In reply to Viktor Engelmann from comment #3)
> I see a (probably related) problem in gcc 9.3 on docker image alpine:latest
> on raspberry pi 3. There, Makefiles generated by autoconf pass -mcpu=armv7l.
> And you can't just force it to use a different cpu by passing --host= to
> ./configure in your Dockerfile, because that would break the Dockerfiles'
> cross-platform compatibility. This breaks all autoconf projects in docker on
> raspberry pi 3.
>
> This shouldn't be that hard IMHO, because -mcpu=armv7l only needs to be
> reinterpreted as -mcpu=cortex-a53.
That's not correct usage though. -mcpu isn't documented to accepted
architecture names (see
https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gcc/ARM-Options.html#ARM-Options for
the accepted list of arguments accepted by mcpu/mtune)
There is the option -march that accepts architecture names, but armv7l isn't a
valid architecture either. I'm not familiar with what Docker does here, but
from the aarch32 GCC backend perspective the architecture for Cortex-A53 is
-march=armv8-a+crc+simd
BTW, I believe the original bug in this report has been fixed for some time.
All currently supported GCC versions (GCC 8.4 onwards) have the right part
number for Cortex-A53
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux
[not found] <bug-70210-4@http.gcc.gnu.org/bugzilla/>
2020-11-02 20:30 ` [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux Viktor.Engelmann at googlemail dot com
2020-11-03 9:22 ` ktkachov at gcc dot gnu.org
@ 2020-11-03 15:02 ` Viktor.Engelmann at googlemail dot com
2020-11-03 15:34 ` ktkachov at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: Viktor.Engelmann at googlemail dot com @ 2020-11-03 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210
--- Comment #5 from Viktor Engelmann <Viktor.Engelmann at googlemail dot com> ---
Hmmm the problem isn't related to docker - I get the same problem when I run
gcc on the raspberry directly with -mcpu=armv7l as autoconf does in docker.
When I run gcc manually with -mcpu=cortex-a53, everything is fine.
lscpu says
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 4
Model name: Cortex-A53
Stepping: r0p4
CPU max MHz: 1200.0000
CPU min MHz: 600.0000
BogoMIPS: 38.40
Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva
idivt vfpd32 lpae evtstrm crc32
and /proc/cpuinfo is basically the same as the one Andrew Roberts had posted.
Maybe it's a problem in autoconf for passing armv7l (the "Architecture:" line)
to -mcpu.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux
[not found] <bug-70210-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-11-03 15:02 ` Viktor.Engelmann at googlemail dot com
@ 2020-11-03 15:34 ` ktkachov at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-03 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210
--- Comment #6 from ktkachov at gcc dot gnu.org ---
(In reply to Viktor Engelmann from comment #5)
> Hmmm the problem isn't related to docker - I get the same problem when I run
> gcc on the raspberry directly with -mcpu=armv7l as autoconf does in docker.
>
yep, armv7l is not a valid argument to -mcpu by design.
> When I run gcc manually with -mcpu=cortex-a53, everything is fine.
> lscpu says
>
> Architecture: armv7l
> Byte Order: Little Endian
> CPU(s): 4
> On-line CPU(s) list: 0-3
> Thread(s) per core: 1
> Core(s) per socket: 4
> Socket(s): 1
> Vendor ID: ARM
> Model: 4
> Model name: Cortex-A53
> Stepping: r0p4
> CPU max MHz: 1200.0000
> CPU min MHz: 600.0000
> BogoMIPS: 38.40
> Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva
> idivt vfpd32 lpae evtstrm crc32
>
> and /proc/cpuinfo is basically the same as the one Andrew Roberts had posted.
> Maybe it's a problem in autoconf for passing armv7l (the "Architecture:"
> line) to -mcpu.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-03 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-70210-4@http.gcc.gnu.org/bugzilla/>
2020-11-02 20:30 ` [Bug target/70210] -march=native and -mcpu=native do not detect ARM cortex-a53 in 32 bit mode on Linux Viktor.Engelmann at googlemail dot com
2020-11-03 9:22 ` ktkachov at gcc dot gnu.org
2020-11-03 15:02 ` Viktor.Engelmann at googlemail dot com
2020-11-03 15:34 ` ktkachov 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).