I'm catching a compile failure under ARM with some inline assembler:
g++ -DNDEBUG -g2 -O2 -pipe -c sha.cpp
{standard input}: Assembler messages:
{standard input}:779: Error: ARM register expected -- `ror [sp,#20],#31'
{standard input}:799: Error: ARM register expected -- `ror [sp],#31'
{standard input}:848: Error: ARM register expected -- `ror [sp,#4],#31'
While not obvious, the code above can be choking on one of four rotates, depending on the CPU features, like if thumb is in effect.
"standard input" is not very helpful, and I'm trying to get GCC to provide more information on the offending lines in the source code. --verbose to both the compiler driver and assembler does not produce it:
g++ --verbose -Wa,--verbose -DNDEBUG -g2 -O2 -pipe -c sha.cpp
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
Target: arm-linux-gnueabi
...
COLLECT_GCC_OPTIONS='-v' '-D' 'NDEBUG' '-g2' '-O2' '-pipe' '-c' '-shared-libgcc'
'-march=armv4t' '-mfloat-abi=soft' '-mtls-dialect=gnu'
/usr/lib/gcc/arm-linux-gnueabi/5/cc1plus -quiet -v -imultilib . -imultiarch arm-linux-gnueabi
-D_GNU_SOURCE -D NDEBUG sha.cpp -quiet -dumpbase sha.cpp -march=armv4t -mfloat-abi=soft
-mtls-dialect=gnu -auxbase sha -g2 -O2 -version -o - |
as -v -march=armv4t -mfloat-abi=soft -meabi=5 --verbose -o sha.o
GNU assembler version 2.25.1 (arm-linux-gnueabi) using BFD version (GNU Binutils for Debian)
...
ignoring duplicate directory "/usr/include/arm-linux-gnueabi/c++/5"
ignoring nonexistent directory "/usr/local/include/arm-linux-gnueabi"
...
Compiler executable checksum: e1a12b8fe77987e69c757712d6e0213e
{standard input}: Assembler messages:
{standard input}:779: Error: ARM register expected -- `ror [sp,#20],#31'
{standard input}:799: Error: ARM register expected -- `ror [sp],#31'
{standard input}:848: Error: ARM register expected -- `ror [sp,#4],#31'
How can I get GCC to print more information, like relevant line numbers?
Thanks in advance.