Skip to content

Allow building on FreeBSD/i386 #114705

Open
Open
@UnitedMarsupials

Description

@UnitedMarsupials

Generally, I don't think, explicitly prohibiting build on a platform is wise. If it fails -- it fails, but it should not be prevented from trying...

In particular, the below patch allows build to be attempted on FreeBSD/i386 -- setting the already used CLR_CMAKE_HOST_UNIX_X86:

--- eng/native/configureplatform.cmake	2025-03-13 17:40:22.000000000 -0400
+++ eng/native/configureplatform.cmake	2025-04-15 11:53:10.858273000 -0400
@@ -168,4 +168,6 @@
     elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
         set(CLR_CMAKE_HOST_UNIX_ARM64 1)
+    elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL i386)
+        set(CLR_CMAKE_HOST_UNIX_X86 1)
     else()
         clr_unknown_arch()
--- eng/native/configurecompiler.cmake	2025-03-13 17:40:22.000000000 -0400
+++ eng/native/configurecompiler.cmake	2025-04-15 11:55:26.890280000 -0400
@@ -429,4 +429,6 @@
     elseif(CLR_CMAKE_HOST_UNIX_AMD64)
       message("Detected FreeBSD amd64")
+    elseif(CLR_CMAKE_HOST_UNIX_X86)
+      message("Detected FreeBSD i386")
     else()
       message(FATAL_ERROR "Unsupported FreeBSD architecture")

With the above changes, I was able to build the dotnet-executable on my FreeBSD-14/i386 here using the lang/dotnet-host port.

Maybe, if this is merged, the boostrap binaries -- which our lang/dotnet port is using -- will eventually appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions