[Midnightbsd-cvs] [MidnightBSD/src] 2306b2: Makefile.inc1: define __MidnightBSD__ for external...
Lucas Holt
noreply at github.com
Fri Sep 25 14:30:50 EDT 2026
Branch: refs/heads/fix-cross-build-midnightbsd-define
Home: https://github.com/MidnightBSD/src
Commit: 2306b2f4e895556a42f8049d1388547cf347d752
https://github.com/MidnightBSD/src/commit/2306b2f4e895556a42f8049d1388547cf347d752
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
M Makefile.inc1
Log Message:
-----------
Makefile.inc1: define __MidnightBSD__ for external cross compilers
An external toolchain (upstream clang on Linux/macOS CI) is driven with
-target *-unknown-freebsd13.4 and predefines __FreeBSD__ but not
__MidnightBSD__. The tree keys on __MidnightBSD__ throughout the kernel
(ACPICA's acenv.h, netmap, ipfilter, dtrace, sys/param.h, ...), so the
cross build died in the first ACPICA header:
contrib/dev/acpica/include/platform/acenv.h:365:2: error: Unknown target environment
When bsd.compiler.mk reports the external compiler does not know
__MidnightBSD_cc_version, add -D__MidnightBSD__=<N> to XCFLAGS, using the
same value our own clang derives from the triple's OS major version.
AI-Assisted-by: Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list