Skip to content

Add support for *BSD to makefiles#6

Closed
snake66 wants to merge 5 commits intoopenjdk:bsd-portfrom
snake66:makefile-ports-1
Closed

Add support for *BSD to makefiles#6
snake66 wants to merge 5 commits intoopenjdk:bsd-portfrom
snake66:makefile-ports-1

Conversation

@snake66
Copy link
Copy Markdown
Collaborator

@snake66 snake66 commented Mar 19, 2026

Updates the makefiles to set up for compilation and building for *BSD.
This is a cleaned up diff towards the existing BSD port from the
battleblow/jdk repository.

Some parts have been held back for later PRs, mainly because I expect
them to require more thorough review. (Some is also probably outdated,
and we'll go through those first.)

This work is sponsored by The FreeBSD Foundation.

Co-authored-by: @battleblow
Co-authored-by: @bsdkurt


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/bsd-port.git pull/6/head:pull/6
$ git checkout pull/6

Update a local copy of the PR:
$ git checkout pull/6
$ git pull https://git.openjdk.org/bsd-port.git pull/6/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6

View PR using the GUI difftool:
$ git pr show -t 6

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/bsd-port/pull/6.diff

Using Webrev

Link to Webrev Comment

snake66 and others added 2 commits March 19, 2026 11:00
We're not supporting 32 bit x86 builds anyway, so we don't need this
change.

This work was sponsored by The FreeBSD Foundation
Updates the makefiles to set up for compilation and building for *BSD.
This is a cleaned up diff towards the existing BSD port from the
battleblow/jdk repository.

Some parts have been held back for later PRs, mainly because I expect
them to require more thorough review. (Some is also probably outdated,
and we'll go through those first.)

This work is sponsored by The FreeBSD Foundation.

Co-authored-by: Greg Lewis <glewis@openjdk.org>
Co-authored-by: Kurt Miller <bsdkurt@openjdk.org>
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 19, 2026

👋 Welcome back haraldei! A progress list of the required criteria for merging this PR into bsd-port will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 19, 2026

@snake66 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

Add support for *BSD to makefiles

Reviewed-by: erikj, kurt

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the bsd-port branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the bsd-port branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 19, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 19, 2026

Webrevs

endif
endif
ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.netbsd)
/usr/sbin/paxctl +m $$@
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what this tool is, but in general we prefer looking up tools in configure and using them through a variable. This allows for a uniform way of overriding any tool at configure time.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in latest patch by adding it to make/autoconf/basic_tools.m4, and use variable for access.

include lib/ClientLibraries.gmk

ifeq ($(call isTargetOs, aix), false)
ifneq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use isTargetOsEnv?

Also please fix indentation of the block.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in latest version of the patch.

EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
endif

ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use macro? Same below.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in latest version of the patch.

ifeq ($(call isTargetOs, linux), true)
SCTP_SUPPORTED=true
endif
ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.freebsd)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use $(call Or,...) to avoid duplication.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in latest version of the patch.

BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libInheritedChannel := java.base:libjava
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -pthread
endif
ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macro

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in latest version of the patch.

OPENJDK_TARGET_OS := linux
else ifeq ($(UNAME_OS), Darwin)
OPENJDK_TARGET_OS := macosx
else ifneq ($(findstring BSD,$(UNAME_OS)),)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer space after comma when possible. https://openjdk.org/groups/build/doc/code-conventions.html

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that's nicer. Changed in latest version of the patch.

@snake66 snake66 requested a review from erikj79 March 25, 2026 09:36
SCTP_SUPPORTED=true
endif
ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.freebsd)
ifeq ($(call Or $(call isTargetOs, linux) $(call isTargetOsEnv, bsd.freebsd)), true)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma after Or.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed now. Seemed to work without it too, but not sure why.
Looks like it's the first non-test use of this macro :)

@snake66 snake66 requested a review from erikj79 March 26, 2026 10:31
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 27, 2026
@snake66
Copy link
Copy Markdown
Collaborator Author

snake66 commented Mar 27, 2026

Thanks a lot for the reviews!

@snake66
Copy link
Copy Markdown
Collaborator Author

snake66 commented Mar 27, 2026

/integrate

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 27, 2026

Going to push as commit bb48416.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 27, 2026
@openjdk openjdk bot closed this Mar 27, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 27, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 27, 2026

@snake66 Pushed as commit bb48416.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants