From nobody Sat Nov 13 20:57:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6998D1850235; Sat, 13 Nov 2021 20:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hs77J4BL2z3pYq; Sat, 13 Nov 2021 20:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3D361A3A6; Sat, 13 Nov 2021 20:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ADKvFMG017607; Sat, 13 Nov 2021 20:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ADKvFRi017606; Sat, 13 Nov 2021 20:57:15 GMT (envelope-from git) Date: Sat, 13 Nov 2021 20:57:15 GMT Message-Id: <202111132057.1ADKvFRi017606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: a2fa290024e7 - main - mips: Fix build of kernel.tramp.bin after upstream merge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2fa290024e73107a214e37c257ce93a3f131a41 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a2fa290024e73107a214e37c257ce93a3f131a41 commit a2fa290024e73107a214e37c257ce93a3f131a41 Author: Jessica Clarke AuthorDate: 2021-11-11 18:28:24 +0000 Commit: Dimitry Andric CommitDate: 2021-11-13 20:52:26 +0000 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/Makefile.mips b/sys/conf/Makefile.mips index add27c1752a1..e8dd61d10a1d 100644 --- a/sys/conf/Makefile.mips +++ b/sys/conf/Makefile.mips @@ -57,6 +57,8 @@ TRAMP_ARCH_FLAGS?=$(ARCH_FLAGS) TRAMP_EXTRA_FLAGS=${EXTRA_FLAGS} ${TRAMP_ARCH_FLAGS} # Kernel code is always compiled with soft-float on MIPS TRAMP_EXTRA_FLAGS+=-msoft-float +# No standard library available +TRAMP_EXTRA_FLAGS+=-ffreestanding .if ${MACHINE_ARCH:Mmips64*} != "" TRAMP_ELFSIZE=64 .else