[Midnightbsd-cvs] [MidnightBSD/mports] b0e15c: devel/cmake-core: add MidnightBSD linker platform ...

Lucas Holt noreply at github.com
Mon Sep 7 00:15:34 EDT 2026


  Branch: refs/heads/devel/cmake-core
  Home:   https://github.com/MidnightBSD/mports
  Commit: b0e15cf0c9e3c1bdbff659473dc401c9d51a61b5
      https://github.com/MidnightBSD/mports/commit/b0e15cf0c9e3c1bdbff659473dc401c9d51a61b5
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-07 (Mon, 07 Sep 2026)

  Changed paths:
    M devel/cmake-core/Makefile
    A devel/cmake-core/files/Linker/MidnightBSD-ASM.cmake
    A devel/cmake-core/files/Linker/MidnightBSD-C.cmake
    A devel/cmake-core/files/Linker/MidnightBSD-CXX.cmake
    A devel/cmake-core/files/Linker/MidnightBSD-Fortran.cmake
    M devel/cmake-core/pkg-plist

  Log Message:
  -----------
  devel/cmake-core: add MidnightBSD linker platform modules

CMake 3.29 moved link-feature handling into per-linker platform modules
under Modules/Platform/Linker/<OS>-<Linker>-<Lang>.cmake. Upstream ships
FreeBSD-GNU-* and FreeBSD-LLD-* but nothing for MidnightBSD, so features
declared through the $<LINK_LIBRARY> generator expression are undefined
here. Modules/Platform/MidnightBSD.cmake already includes Platform/FreeBSD,
but that predates the Linker/ split and does not cover it.

The visible symptom is any port using $<LINK_LIBRARY:WHOLE_ARCHIVE,...>
failing at generate time, e.g. ai/pytorch 2.13.0:

  CMake Error at caffe2/CMakeLists.txt:804 (add_library):
    Feature 'WHOLE_ARCHIVE', specified through generator-expression
    '$<LINK_LIBRARY>' to link target 'torch_cpu', is not supported for the
    'CXX' link language.

Adds files/Linker/MidnightBSD-{ASM,C,CXX,Fortran}.cmake, each delegating to
its FreeBSD counterpart, mirroring what Platform/MidnightBSD.cmake already
does. The FreeBSD modules pick between the GNU and LLD variants themselves
via Platform/Linker/BSD-Linker-Initialize, so no linker detection is
duplicated here.

Verified by configuring ai/pytorch 2.13.0, which now reaches
"Generating done" instead of failing on WHOLE_ARCHIVE.

This is an upstream CMake gap and should be reported there as well.

Built, staged, packaged and installed on MidnightBSD 4.2 amd64.

AI-Assisted-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkHF8bn8Ehit2aSoWjCshm
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