Bug#1142174: sh4-linux-gnu-gcc does not produce big-endian binaries
Michael Tokarev <[email protected]> Sat, 18 Jul 2026 07:03:48 +0300
| Newsgroups | gmane.linux.debian.devel.gcc |
|---|---|
| Message-ID | <9dab307c-66d9-48b8-b356-a792d1055ff0__19886.2479229987$1784347538$gmane$org@tls.msk.ru> |
On 7/17/26 22:42, Rob Landley wrote: > On 7/16/26 03:22, Michael Tokarev wrote: >> Package: gcc-15-sh4-linux-gnu >> Version: 15.3.0-1cross1 >> Severity: normal >> X-Debbugs-Cc: [email protected] >> User: [email protected] >> Usertags: sh4 >> >> When trying to build an sh4eb binary, there's a failure at the link stage: >> >> sh4-linux-gnu-gcc -mb vdso.S [other options] >> ... >> sh4-linux-gnu-ld.bfd: unrecognised emulation mode: shelf_linux >> Supported emulations: shlelf_linux shlelf_fd > > I built big endian binaries fine with 15.1. The problem here is different. You built a separate compiler (or whole toolchain) especially for sh4eb. However, this bug report says about sh4-linux-gnu-gcc, not sh4eb-*. As documented, this compiler has -mb option, to produce big-endian code. And this option does not work, with very minor omission which prevents it from working. Everything else seems to be here, just filling small gap will let things work, without the need to build separate toolchain especially for sh4beb. Maybe I should retitle this bug report somehow to make this clear. Thanks, /mjt