From nobody Mon Dec 06 16:33:27 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 6A40318B3C5D; Mon, 6 Dec 2021 16:33:31 +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 4J78BJ557Zz3CCs; Mon, 6 Dec 2021 16:33:28 +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 83D3872A0; Mon, 6 Dec 2021 16:33:27 +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 1B6GXRbO087714; Mon, 6 Dec 2021 16:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6GXR3q087713; Mon, 6 Dec 2021 16:33:27 GMT (envelope-from git) Date: Mon, 6 Dec 2021 16:33:27 GMT Message-Id: <202112061633.1B6GXR3q087713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d08adc0e1cb3 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: d08adc0e1cb3a66a4351222066de3d5d319606ea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638808409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lefLwN+JSRe5eBHXgwn7GzZEM1O/MSTfC+v+/J0KtZc=; b=Dl6dQXSVgHqmnNUoCr6ISgu/Nz5kIX2Mz9/VmKm+qWXttc5gMdNsrbKvdvHMETx9Xt3+J2 ep68ScucbH8nxuQOhYnpKvoQ02KmfYS/gTFNtcP3mkM0qSAbTev+VihQVTbhstkWgQM1gb f0rXq+hsDExHCr8vJf5iWpthRl4qQ0i/QiO4rhYNuKygFgf8ek6tQ74uSWWh25oz4+ZNFv We/Ga9Wup8e41d3el4ZdQyuNKEgTKit5OoEPKPi5O1/XuaPoITUZ8PAHT3pR562V6kY050 HfRX2Vq6rAS44S6QTzX+3DGeuBf/MQwjD91DmYeeHyGOIET+BVKiQD+GWb54Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638808409; a=rsa-sha256; cv=none; b=Dptsbmz+gUyrd8/8AV4GU616+SzeMn2lohvmZ8YXrAJDbojWkJ3jmrwjVDMv5E9PekS6qy V2xjKcP7qH9zeNHSLZzlOFhtaLNKGDiY533qTo+PiOfBHUD3tkfPxR5wCuzYgqfpqRpEBe FhDstlHZN0lbMRHdfTy+okme2JJlgYPlObUBEfgwRUnqHqGGqIRjKz2S+URqV7ROLrOCJo so2/bQXSdggpD9fAtK46Vk+HaIclhG0q4mQqNYhyCf58dLbt0vwGDsNGnZpV9Z/Prx26Hf uSxdsz3rRLf2vTF77b729nSozS0ycS2X/zzahX8l4vTG72WheR4p5s2Sc/tmgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d08adc0e1cb3a66a4351222066de3d5d319606ea commit d08adc0e1cb3a66a4351222066de3d5d319606ea Author: Jessica Clarke AuthorDate: 2021-11-11 18:28:24 +0000 Commit: Dimitry Andric CommitDate: 2021-12-06 16:30:10 +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 (cherry picked from commit a2fa290024e73107a214e37c257ce93a3f131a41) --- 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