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

            Bug ID: 82175
           Summary: -march=native fails on armv7 big/little system
                    armv7l-unknown-linux-gnueabihf with gcc 8.0.0
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrewm.roberts at sky dot com
  Target Milestone: ---

gcc-7.2.0 is ok on this target, but gcc-8.0.0 fails to detect native target.

cat > test.c
#include <stdio.h>

int main(void)
{
printf("Hello World\n");
return 0;
}
^D
/usr/local/gcc-8.0.0/bin/gcc -march=native -o test800 test.c
gcc: error: unrecognized -march target: native
gcc: note: valid arguments are: armv2 armv2a armv3 armv3m armv4 armv4t armv5
armv5t armv5e armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk
armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a
armv8.1-a armv8.2-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2
gcc: error: unrecognized -march target: native
gcc: note: valid arguments are: armv2 armv2a armv3 armv3m armv4 armv4t armv5
armv5t armv5e armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk
armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a
armv8.1-a armv8.2-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2
gcc: error: missing argument to ‘-march=’

But --help=target gives a result, but seems to use armv8 syntax.
/usr/local/gcc-8.0.0/bin/gcc -Q --help=target  |& grep march
  -march=                               armv7-a+fp

gcc-7.2.0 gives:
/usr/local/gcc-7.2.0/bin/gcc -Q --help=target  |& grep march
  -march=                               armv7-a

Both versions of gcc configured identically apart from --prefix=
/usr/local/gcc-8.0.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-8.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-8.0.0/libexec/gcc/armv7l-unknown-linux-gnueab
ihf/8.0.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.0.0
--program-
suffix= --disable-werror --enable-shared --enable-threads=posix
--enable-checkin
g=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exception
s --enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=g
nu --enable-plugin --enable-gnu-indirect-function --enable-lto --with-isl
--enab
le-languages=c,c++,fortran,lto --disable-libgcj --enable-clocale=gnu
--disable-l
ibstdcxx-pch --enable-install-libiberty --disable-multilib --disable-libssp
--en
able-default-pie --enable-default-ssp --host=armv7l-unknown-linux-gnueabihf
--bu
ild=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard
--with-
fpu=vfpv3-d16 --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20170910 (experimental) (GCC) 


Target/Host system is a ODroid-XU4 with 8 cores:
Cores 0..3: ARM Cortex-A7 rev 3 (0x4100c070)
Cores 4..7: ARM Cortex-A15 rev 3 (0x4100c0f0)
cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 18.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 3
...
processor       : 4
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 18.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc0f
CPU revision    : 3
...

Reply via email to