[Midnightbsd-cvs] [MidnightBSD/mports] cf1c2e: lang/dotnet: fix MidnightBSD native build detectio...
Lucas Holt
noreply at github.com
Fri Jul 10 20:53:25 EDT 2026
Branch: refs/heads/lang/dotnet
Home: https://github.com/MidnightBSD/mports
Commit: cf1c2e6f68a92175b840fa1d3aa4122923e4fdec
https://github.com/MidnightBSD/mports/commit/cf1c2e6f68a92175b840fa1d3aa4122923e4fdec
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-07-10 (Fri, 10 Jul 2026)
Changed paths:
M lang/dotnet/Makefile
Log Message:
-----------
lang/dotnet: fix MidnightBSD native build detection gates
The .NET source build's runtime repo could not build on MidnightBSD: the
VMR vendors a per-repo copy of the native build scripts that only know
FreeBSD, and the LLVM toolchain the port depends on was not discovered.
These changes clear every build-blocking gate through the start of the
CoreCLR native compile (hostfxr/hostpolicy and the managed libraries
build successfully).
post-patch:
- Apply the MidnightBSD handling that the top-level patches add to EVERY
vendored eng/common/native/init-os-and-arch.sh (OSName midnightbsd ->
freebsd) and init-distro-rid.sh (freebsd-version -> midnightbsd-version)
copy. Without this, runtime aborts with
"Unsupported OS midnightbsd detected!" and cannot read the OS version
(/bin/freebsd-version does not exist; /bin/midnightbsd-version does).
- Normalize CLR_CMAKE_HOST_OS midnightbsd -> freebsd in the vendored
configureplatform.cmake copies. CMAKE_SYSTEM_NAME is "MidnightBSD"
(uname -s), so host arch detection was skipped and cmake died with
"'amd64' is an unsupported architecture". clang defines __FreeBSD__, so
the C/C++ sources build unchanged once the OS is recognized.
DOTNET_ENV:
- Set CLR_CC/CLR_CXX to ${LLVM_PREFIX}/bin/clang[++] so the runtime's
compiler search does not pick up the broken /usr/local/bin/clangNN ->
bugpointNN symlinks (clangNN -dumpversion runs bugpoint and fails).
- Prepend ${LLVM_PREFIX}/bin to PATH so configuretools.cmake finds
llvm-ar/nm/ranlib/strings/link/objdump/readelf/objcopy and lld; the
versioned copies in ${LOCALBASE}/bin are broken bugpoint symlinks.
Note: a full end-to-end build was not completed locally. The parallel
CoreCLR compile at -maxcpucount:${MAKE_JOBS_NUMBER} (16 on the test box)
exhausts memory on a 32 GB machine; capping job count is a likely
follow-up. The fixes here are validated up to and during the native
compile.
AI-Assisted-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <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/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list