openbios fails to build with gcc-16 (powerpc code)

Michael Tokarev <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
Hi!

Since debian switch from gcc-15 to gcc-16, qemu fails to build openbios-powerpc:

powerpc-linux-gnu-gcc -m32 -mcpu=604 ...\
  roms/openbios/arch/ppc/qemu/start.S

roms/openbios/arch/ppc/qemu/start.S:292: Error: unrecognized opcode: `clrldi'
roms/openbios/arch/ppc/qemu/start.S:293: Error: unrecognized opcode: `mtmsrd'
roms/openbios/arch/ppc/qemu/start.S:178: Error: unrecognized opcode: `std'
[a lot of other similar errors]

I know nothing about powerpc assembler.  Google tells me mtmsrd is a 64bit-only
instruction which can't be used in 32bit mode (which is in effect here).

It feels like start.S uses the wrong assembly?  I wonder how it worked before..

Additionally, there's this new error (due to -Werror being in effect),
but it is easy to deal with:

In file included from /build/pkg/build/roms/openbios/kernel/bootstrap.c:28:
roms/openbios/kernel/bootstrap.c: In function ‘write_dictionary’:
roms/openbios/kernel/include/dict.h:12:16: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ 
attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
    12 | #define DICTID "OpenBIOS"
       |                ^~~~~~~~~~
roms/openbios/kernel/bootstrap.c:170:35: note: in expansion of macro ‘DICTID’
   170 |                 .signature      = DICTID,
       |                                   ^~~~~~


FWIW,

/mjt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.