Add FreeBSD support#307
Conversation
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (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. |
|
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. |
|
This change looks good. Once your OCA is approved, I'll integrate it. |
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
mxcurrently handles Unix-like hosts.sys.platform.startswith("freebsd")as canonical OS namefreebsdmx.is_freebsd()through the same compatibility path as the existing platform helpers/usr/local/openjdkas the default FreeBSD system JDK locationmxlauncher to find common versioned Python 3 executables such aspython3.11mxversion to7.83.2Testing
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 --checkNotes
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.