From nobody Tue Jan 04 23:18:34 2022 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 96BBF19326CA; Tue, 4 Jan 2022 23:18:35 +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 4JT7pM1LScz3Gxg; Tue, 4 Jan 2022 23:18:35 +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 0DD2F21D86; Tue, 4 Jan 2022 23:18:35 +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 204NIY9P042370; Tue, 4 Jan 2022 23:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 204NIYOr042369; Tue, 4 Jan 2022 23:18:34 GMT (envelope-from git) Date: Tue, 4 Jan 2022 23:18:34 GMT Message-Id: <202201042318.204NIYOr042369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 81ec547fbd3f - main - bsd.endian.mk: Allow for the cross building case 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81ec547fbd3f7b9840df2af86a01aeb0c4baf37e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641338315; 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=wPf8gz9LyKqM0mtPCPnwzl2AB1m+cr0d5iw7ER3wNWU=; b=DUMsKvqfVVc6DtrjS7HuwJHt7AZ4d/gGUJ7JyP12p8KRF90CQ4gsWVv23R3loVV1iWXYet Eba4k5yUYR9fSgrdw8LLyRLXd6xROl0uWKa4NG8Msst/WQooiSCHio2JfOsSi5gEpEPPvY Zh/oXyCaRXYfzQ04IXKyaXtgIcEoc7KKX25j2x22jY4f2ZQuOalvUlDwosNutwcvHUswVK 0+UsN8CTnp7uAe7oful8mBiRf+553G6Upegw3qimQCrw3C3y5VrwPUCxjHHUqlrh72R12w djIXDRGWJW8gcN/L1c+rGhXGtV1saDB6q0gH1LNe+RxbgXPi4AAZWw95mfVJOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641338315; a=rsa-sha256; cv=none; b=RlvEw3NJUyy8Bo2bk4UnwPbDpgW7B8XM7ZPWQDReCiS4DIOYHPkNGC9Pe/R4j5wPwVXOAt LL3JwbIOdhlAidQEwq1rJNh/xOgYJeeITUAiVX3TT35wBzaUMEAppUOtSxqSOy+ma/MDz/ nJXZrP8B2Q85Z1arIRtISxY18wG/pknu4uYBGuaqFbGqV2pxvuu6P8IQBsqo4WrAkmQR0w ARNQpCjgAbltfOjwcCqQNEJlTyeqvosA6kIlwDpEjcQiqGIK7UjRKmFsyxeMytlJUzsJtZ /dYnEctoZF1PWVFJMVrJK4dg9u6oM+fDF43Zn77C2F5wGHgg87iT73pAqZ52CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=81ec547fbd3f7b9840df2af86a01aeb0c4baf37e commit 81ec547fbd3f7b9840df2af86a01aeb0c4baf37e Author: Warner Losh AuthorDate: 2022-01-04 23:17:17 +0000 Commit: Warner Losh CommitDate: 2022-01-04 23:17:17 +0000 bsd.endian.mk: Allow for the cross building case We need to include bsd.endian.mk from bsd.compiler.mk to enable compressed symbols only on FreeBSD little endian targets. However, since we include bsd.compiler.mk from Makefile.inc1 and from the build tools makefiles, it has to work on Linux and osx. Make the error condition only when we're building natively (so that we are forced to add a new architecture to the list). Otherwise, define bogus, poisoned values and leave TARGET_ENDIANNESS undefined. Since we don't actually use TARGET_ENDIANNESS for anything in the cross building phase, these values are a failsafe agianst their use. The one place in the build phase that detects endian is appropriately protected. Sponsored by: Netflix Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D33742 --- share/mk/bsd.endian.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk index a6c66ef7f961..61a71add062d 100644 --- a/share/mk/bsd.endian.mk +++ b/share/mk/bsd.endian.mk @@ -15,6 +15,16 @@ LOCALEDEF_ENDIAN= -l TARGET_ENDIANNESS= 4321 CAP_MKDB_ENDIAN= -b LOCALEDEF_ENDIAN= -b -.else +.elif ${.MAKE.OS} == "FreeBSD" .error "Don't know the endian of this architecture" +.else +# +# During bootstrapping on !FreeBSD OSes, we need to define some value. Short of +# having an exhaustive list for all variants of Linux and MacOS we simply do not +# set TARGET_ENDIANNESS and poison the other variables. They should be unused +# during the bootstrap phases (apart from one place that's adequately protected +# in bsd.compiler.mk) where we're building the bootstrap tools. +# +CAP_MKDB_ENDIAN= -B # Poisoned value, invalid flags for both cap_mkdb +LOCALEDEF_ENDIAN= -B # and localedef. .endif