How to avoid assembler warnings in testsuite in 'gcc -c' / 'gcc -s' mismatch

Nick Clifton nickc@redhat.com
Mon Nov 16 12:24:31 GMT 2020


Hi Sergei,

> $ echo 'int main() {}' | ia64-unknown-linux-gnu-gcc -x c -S - -o - | ia64-unknown-linux-gnu-as - -o a.o
   
This seems to be a very strange way to create a test object file.
Is there a reason for breaking out the assembly step into an explicit command ?


>      {standard input}:14: Warning: Explicit stops are ignored in auto mode
> 
> Warning happens because normally gcc passes '-x' argument to 'gas'.
> '-x' explicitly sets the style of instruction assignments to instruction
> bundles. Otherwise binutils does a bit of guessing and complains about it.

> What would be the best way to handle test failures?

I know that you already have one solution to this problem, but I thought
that it would be worth mentioning this:

> 1. Should 'gcc' explicitly emit '.explicit' directive to avoid guessing?

This would be my preferred option.  Telling the assembler exactly what is
needed and helping it to avoid guesswork is a good thing.

Cheers
   Nick




More information about the Binutils mailing list