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

Sergei Trofimovich slyfox@inbox.ru
Sat Nov 14 21:59:45 GMT 2020


I'm passing through ia64 test failure hoping to probably un-obsolete
it's support at least for linux target.

One of simple set of failures is caused by the gcc's driver difference.

An example:

  ok:
    $ echo 'int main() {}' | ia64-unknown-linux-gnu-gcc -x c -c - -o a.o
  bad:
    $ echo 'int main() {}' | ia64-unknown-linux-gnu-gcc -x c -S - -o - | ia64-unknown-linux-gnu-as - -o a.o
    {standard input}: Assembler messages:
    {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.

As a result about 5-10 tests fail to extra warnings for
--target=ia64-unknown-linux-gnu:

  $ ../binutils-gdb/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=ia64-unknown-linux-gnu --enable-obsolete
  $ make check -k RUNTESTFLAGS='elf.exp'
  Running binutils-gdb/ld/testsuite/ld-elf/elf.exp ...
  FAIL: Build pr26391-5.o
  FAIL: Build pr26391-6.o

What would be the best way to handle test failures?

1. Should 'gcc' explicitly emit '.explicit' directive to avoid guessing?
2. Or maybe individual failed tests should explicitly pass '-x' to gas? How?
3. Or maybe add warning regex suppression for ia64?
4. Or maybe somehow use 'gcc -c' directly for link tests?

The problem does not seem to be very specific to ia64. I wonder if
there already a bit of infrastructure around it.

Thanks!

-- 

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 981 bytes
Desc: Цифровая подпись OpenPGP
URL: <https://sourceware.org/pipermail/binutils/attachments/20201114/aa33dbfd/attachment.sig>


More information about the Binutils mailing list