svn commit: r322915 - head/contrib/compiler-rt/lib/builtins
John Baldwin
jhb at freebsd.org
Sat Aug 26 00:26:22 UTC 2017
On Saturday, August 26, 2017 12:17:57 AM John Baldwin wrote:
> Author: jhb
> Date: Sat Aug 26 00:17:57 2017
> New Revision: 322915
> URL: https://svnweb.freebsd.org/changeset/base/322915
>
> Log:
> Extend the workaround for LLVM bug 11663 to MIPS N32.
>
> This fixes infinite recursion in /sbin/init for MIPS N32.
>
> Submitted by: Robert M. Kovacsics <rmk35 at cam.ac.uk>
> MFC after: 1 week
> Sponsored by: DARPA / AFRL
With this fix (and some minor changes in the kernel to fix int-to-pointer-cast
warnings) I was able to boot a MALTAN32 kernel with an n32 world (built with
GCC 4.2.1) under qemu-system-mips64. I'm going to test external GCC next before
seeing what kind of carnage clang wreaks.
FYI, I've run into a few issues getting o32 built with clang to boot. I first
tried to use in-tree ld.bfd which while it linked a full world, the /bin/sh
binary was corrupted (in some places it had 'jal 0' rather than than a jump to
a real symbol, in particular in __start() in crt1.c where it tries to call
'atexit(cleanup)'). Using external ld.bfd fixed that, but the resulting /bin/sh
binary uses additional relocations (that N64 curiously doesn't), including
R_MIPS_COPY. The /bin/sh binary also has a .pltrel which rtld doesn't currently
grok, but I'm working on.
--
John Baldwin
More information about the freebsd-mips
mailing list