https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91034
--- Comment #2 from Andrew Roberts <andrewm.roberts at sky dot com> --- Building 9.1.0 with gmp 6.1.2 using "-v -save-temps" gives: gcc -v -save-temps -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 gcc: warning: -pipe ignored because -save-temps specified Using built-in specs. COLLECT_GCC=gcc 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) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '../../../gcc-9.1.0/gmp/mpn' '-I' '..' '-D' '__GMP_WITHIN_GMP' '-I' '../../../gcc-9.1.0/gmp' '-D' 'OPERATION_divrem_1' '-D' 'NO_ASM' '-O2' '-g' '-pipe' '-o' 'divrem_1.o' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' '-marm' '-march=armv6+fp' as --gdwarf2 -v -I . -I ../../../gcc-9.1.0/gmp/mpn -I .. -I ../../../gcc-9.1.0/gmp -march=armv6 -mfloat-abi=hard -mfpu=vfp -meabi=5 --noexecstack -o divrem_1.o tmp-divrem_1.s GNU assembler version 2.31.1 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Raspbian) 2.31.1 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 Whereas building gmp 6.1.2 standalone (./configure ; make) using -v -save-temps gives: gcc -v -save-temps -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 Using built-in specs. COLLECT_GCC=gcc 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) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '..' '-D' '__GMP_WITHIN_GMP' '-I' '..' '-D' 'OPERATION_divrem_1' '-O2' '-Wpedantic' '-fomit-frame-pointer' '-mfloat-abi=hard' '-mfpu=neon' '-mtune=cortex-a72' '-fPIC' '-D' 'PIC' '-o' '.libs/divrem_1.o' '-mtls-dialect=gnu' '-marm' '-march=armv8-a+simd' as -v -I . -I .. -I .. -march=armv8-a -mfloat-abi=hard -mfpu=neon -meabi=5 --noexecstack -o .libs/divrem_1.o tmp-divrem_1.s GNU assembler version 2.31.1 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Raspbian) 2.31.1 COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/ LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '..' '-D' '__GMP_WITHIN_GMP' '-I' '..' '-D' 'OPERATION_divrem_1' '-O2' '-Wpedantic' '-fomit-frame-pointer' '-mfloat-abi=hard' '-mfpu=neon' '-mtune=cortex-a72' '-fPIC' '-D' 'PIC' '-o' '.libs/divrem_1.o' '-mtls-dialect=gnu' '-marm' '-march=armv8-a+simd' Interestingly if I try to use CFLAGS to set -v (or just an empty string), the standalone build of gmp also fails at an earlier stage with assembler errors. So is it possible the gcc build is setting CFLAGS when building gmp?