[Bug bootstrap/91034] New: In tree build of gmp fails on Raspberry Pi4 (ARM Cortex A72) with `mls r1,r4,r8,r11' not supported in ARM mode

andrewm.roberts at sky dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 29 13:55:00 GMT 2019


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

            Bug ID: 91034
           Summary: In tree build of gmp fails on Raspberry Pi4 (ARM
                    Cortex A72) with `mls r1,r4,r8,r11' not supported in
                    ARM mode
           Product: gcc
           Version: 9.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrewm.roberts at sky dot com
  Target Milestone: ---

When building gcc 9.1.0 (or 8.3.0) on Raspberry Pi 4 (ARM Cortex A72 in 32 bit
mode)
in tree build of gmp 6.1.2 (or 6.1.0) fails to build with:

tmp-divrem_1.s:129: Error: selected processor does not support `mls
r1,r4,r8,r11' in ARM mode

gmp 6.1.2 builds fine outside of gcc, thus its not a straight binutils issue,
but something to do with how gcc is configuring/building gmp.

The same configurations and version builds gcc-9.1.0/8.3.0 fine on Raspberry Pi
Zero and Pi 3b etc.

/proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 108.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

uname -a
Linux raspberrypi 4.19.50-v7l+ #895 SMP Thu Jun 20 16:03:42 BST 2019 armv7l
GNU/Linux

OS: Raspbian GNU/Linux 10 (buster)

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp
--with-float=hard --disable-werror --enable-checking=release
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)

gcc -march=native -Q --help=target
The following options are target specific:
  -mabi=                                aapcs-linux
  -mabort-on-noreturn                   [disabled]
  -mandroid                             [disabled]
  -mapcs                                [disabled]
  -mapcs-frame                          [disabled]
  -mapcs-reentrant                      [disabled]
  -mapcs-stack-check                    [disabled]
  -march=                               armv8-a+crc+simd
  -marm                                 [enabled]
  -masm-syntax-unified                  [disabled]
  -mbe32                                [enabled]
  -mbe8                                 [disabled]
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
  -mbranch-cost=                        -1
  -mcallee-super-interworking           [disabled]
  -mcaller-super-interworking           [disabled]
  -mcmse                                [disabled]
  -mcpu=
  -mfix-cortex-m3-ldrd                  [disabled]
  -mflip-thumb                          [disabled]
  -mfloat-abi=                          hard
  -mfp16-format=                        none
  -mfpu=                                vfp
  -mglibc                               [enabled]
  -mhard-float
  -mlittle-endian                       [enabled]
  -mlong-calls                          [disabled]
  -mmusl                                [disabled]
  -mneon-for-64bits                     [disabled]
  -mpic-data-is-text-relative           [enabled]
  -mpic-register=
  -mpoke-function-name                  [disabled]
  -mprint-tune-info                     [disabled]
  -mpure-code                           [disabled]
  -mrestrict-it                         [disabled]
  -msched-prolog                        [enabled]
  -msingle-pic-base                     [disabled]
  -mslow-flash-data                     [disabled]
  -msoft-float
  -mstructure-size-boundary=            8
  -mthumb                               [disabled]
  -mthumb-interwork                     [disabled]
  -mtls-dialect=                        gnu
  -mtp=                                 cp15
  -mtpcs-frame                          [disabled]
  -mtpcs-leaf-frame                     [disabled]
  -mtune=
  -muclibc                              [disabled]
  -munaligned-access                    [enabled]
  -mvectorize-with-neon-double          [disabled]
  -mvectorize-with-neon-quad            [enabled]
  -mword-relocations                    [disabled]

  Known ARM ABIs (for use with the -mabi= option):
    aapcs aapcs-linux apcs-gnu atpcs iwmmxt

  Known __fp16 formats (for use with the -mfp16-format= option):
    alternative ieee none

  Known ARM FPUs (for use with the -mfpu= option):
    auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon
    neon-fp-armv8 neon-fp16 neon-vfpv3 neon-vfpv4 vfp vfp3 vfpv2 vfpv3
vfpv3-d16
    vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16

  Valid arguments to -mtp=:
    auto cp15 soft

  Known floating-point ABIs (for use with the -mfloat-abi= option):
    hard soft softfp

  TLS dialect to use:
    gnu gnu2


ld -v
GNU ld (GNU Binutils for Raspbian) 2.31.1

m4 --version
m4 (GNU M4) 1.4.18

gcc 9.1.0 build with in-tree gmp 6.1.2 fails here (while building gmp):

m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_divrem_1 -DNO_ASM
divrem_1.asm >tmp-divrem_1.s
 arm-linux-gnueabihf-gcc -c -DHAVE_CONFIG_H -I. -I../../../gcc-9.1.0/gmp/mpn
-I.. -D__GMP_WITHIN_GMP -I../../../gcc-9.1.0/gmp -DOPERATION_divrem_1 -DNO_ASM
-O2 -g -pipe -Wa,--noexecstack tmp-divrem_1.s -o divrem_1.o
tmp-divrem_1.s: Assembler messages:
tmp-divrem_1.s:129: Error: selected processor does not support `mls
r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:145: Error: selected processor does not support `mls
r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:158: Error: selected processor does not support `mls
r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:175: Error: selected processor does not support `mls
r1,r4,r3,r8' in ARM mode
tmp-divrem_1.s:209: Error: selected processor does not support `mls
r11,r4,r12,r3' in ARM mode
make[4]: *** [Makefile:768: divrem_1.lo] Error 1
make[4]: Leaving directory '/home/pi/gcc/gcc-build/gmp/mpn'
make[3]: *** [Makefile:956: all-recursive] Error 1

If gmp 6.1.2 is built stand alone (using its own ./configure ; make) it
compiles ok:

m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_divrem_1 -DPIC divrem_1.asm
>tmp-divrem_1.s
 gcc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_divrem_1
-O2 -pedantic -fomit-frame-pointer -march=armv8-a -mfloat-abi=hard -mfpu=neon
-mtune=cortex-a72 -Wa,--noexecstack tmp-divrem_1.s -fPIC -DPIC -o
.libs/divrem_1.o


More information about the Gcc-bugs mailing list