]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: Fix build of kernel.tramp.bin after upstream merge
authorJessica Clarke <jrtc27@jrtc27.com>
Thu, 11 Nov 2021 18:28:24 +0000 (19:28 +0100)
committerDimitry Andric <dim@FreeBSD.org>
Sat, 13 Nov 2021 20:52:26 +0000 (21:52 +0100)
commita2fa290024e73107a214e37c257ce93a3f131a41
tree1d80ab250512ed703827db05c630d2134ac84cda
parent397a8ba05313cc3815d219c9d1b2de1372fcb561
mips: Fix build of kernel.tramp.bin after upstream merge

Since the upstream merge we end up with the compiler generating calls to
memcpy (and it appears upstream LLVM does too, so this will probably
also be a problem upstream when the LLVM 13 import is finished). Like
the kernel we should just compile this file with -ffreestanding to avoid
such surprises.

Note that elf_trampoline.c does actually provide a memcpy, but it's
static. That's a bit weird, and means by the time the memcpy calls are
generated by the compiler the explicit ones have already been inlined
and the function itself GC'ed, but since using -ffreestanding is the
right thing to do for this kind of code anyway, that doesn't actually
matter.

Obtained from: https://github.com/CTSRD-CHERI/cheribsd/commit/219ddb6293c
sys/conf/Makefile.mips