r227088 - For NetBSD/ARM-EB, link with --be8. Support for the older BE32 is

Joerg Sonnenberger joerg at britannica.bec.de
Mon Jan 26 08:51:46 PST 2015


On Mon, Jan 26, 2015 at 07:49:49AM -0800, Tim Northover wrote:
> > It is required on NetBSD. GCC also uses it on ARMEB. Please note that
> > the change is in the NetBSD toolchain only, not the generic one.
> 
> Anything can be justified on those grounds (and sometimes is, not just
> by NetBSD), but using it to *add* legacy is extremely sketchy.
>
> In particular I think some change *should* be in the generic
> toolchain. My tests indicate that GCC's behaviour is to pass --be8 by
> default for v7 (& v6m), not for v5, and to require -Wl,--be in the
> middle.
> 
> I maintain this patch should not have been committed, at least without
> more thought and discussion.

A ARM-EB binary without --be8 is rejected by a NetBSD kernel running on
ARMv7. While there are some older Big Endian ARM systems around, there
are very hard to find, so motivation for supporting them is quite small.
I'm open to changes supporting pre-v7 BE, but the patch as is allows
creating working binaries and therefore makes it possible to get full
testing for NetBSD/ARM-EB done. That flag is not optional, so the test
case will ensure that no regressions are introduced by refactoring.

Joerg



More information about the cfe-commits mailing list