Skip to content

Add FreeBSD support#307

Open
djberg96 wants to merge 2 commits into
graalvm:masterfrom
djberg96:freebsd_support
Open

Add FreeBSD support#307
djberg96 wants to merge 2 commits into
graalvm:masterfrom
djberg96:freebsd_support

Conversation

@djberg96

@djberg96 djberg96 commented Jul 6, 2026

Copy link
Copy Markdown

Add FreeBSD support

I ripped Ubuntu off my laptop and replaced it with FreeBSD. So, I would like to add support for it here. Ultimately my goal is to get Truffleruby + Graalvm going, but hopefully this helps other projects as well.

This PR was created using Codex (ChatGPT 5.5).

Summary

This PR adds first-class FreeBSD platform detection and wires it through the places where mx currently handles Unix-like hosts.

  • Recognizes sys.platform.startswith("freebsd") as canonical OS name freebsd
  • Exposes mx.is_freebsd() through the same compatibility path as the existing platform helpers
  • Treats FreeBSD like other Unix-like hosts for native library prefixes and suffixes
  • Uses /usr/local/openjdk as the default FreeBSD system JDK location
  • Includes FreeBSD in IntelliJ SDK discovery and native debug-prefix-map handling
  • Marks bundled platform resources without FreeBSD archives as optional rather than trying to consume Linux binaries
  • Updates the mx launcher to find common versioned Python 3 executables such as python3.11
  • Adds a focused regression test for FreeBSD platform detection and library naming
  • Bumps mx version to 7.83.2

Testing

Ran on FreeBSD 15.1 amd64:

./mx --version
./mx --java-home /usr/local/openjdk21 version
/usr/local/bin/python3.11 -m py_compile src/mx/_impl/support/system.py src/mx/_impl/legacy.py src/mx/_impl/mx.py src/mx/_impl/mx_ide_intellij.py src/mx/_impl/mx_fetchjdk.py src/mx/_impl/mx_native.py src/mx/mx_version.py tests/os_arch_tests.py
PYTHONPATH=/home/dberger/Dev/mx/src:/home/dberger/Dev/mx /usr/local/bin/python3.11 -c "from tests import os_arch_tests; os_arch_tests.tests(); print('os_arch_tests ok')"
git diff --check

Notes

Some bundled dependencies, such as Ninja and Eclipse, do not currently publish FreeBSD archives in this suite. Those entries are marked optional for FreeBSD so the platform can bootstrap with locally installed tools instead of failing on unavailable packaged binaries.

@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 6, 2026
@djberg96

djberg96 commented Jul 7, 2026

Copy link
Copy Markdown
Author

I've put in a request for an OCA. I thought I had an Oracle account from years ago, but maybe they deleted it because it was stale since I hadn't logged into it in years. Anyway, I have a new one. No clue how long it takes to get approval.

@dougxc

dougxc commented Jul 8, 2026

Copy link
Copy Markdown
Member

This change looks good. Once your OCA is approved, I'll integrate it.

@dougxc dougxc self-assigned this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants