Skip to content

Commit 161d7ce

Browse files
authored
Merge pull request #491 from pshipton/closedj9
Add support to build with closedj9 when present
2 parents 173c7cb + b3ddffe commit 161d7ce

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

closed/OpenJ9.gmk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ $(call GetVersion, openjdk, OPENJDK_SHA, $(TOPDIR), required)
6565
$(call GetVersion, openj9, OPENJ9_SHA, $(OPENJ9_TOPDIR), required)
6666
$(call GetVersion, omr, OPENJ9OMR_SHA, $(OPENJ9OMR_TOPDIR), required)
6767
$(call GetVersion, openssl, OPENSSL_SHA, $(OPENSSL_DIR))
68+
$(call GetVersion, closedj9, CLOSEDJ9_SHA, $(CLOSEDJ9_TOPDIR))
6869

6970
# Find OpenJ9 tag associated with current commit (suppressing stderr in case there is no such tag).
7071
OPENJ9_TAG := $(shell $(GIT) -C $(OPENJ9_TOPDIR) describe --exact-match HEAD 2>/dev/null)
@@ -197,6 +198,7 @@ $(foreach file, \
197198
$(eval $(call openj9_test_image_rules, $(file)))))
198199

199200
OPENJ9_VERSION_VARS := \
201+
CLOSEDJ9_SHA \
200202
COMPANY_NAME \
201203
CXX_VERSION_STRING \
202204
DEBUG_LEVEL \
@@ -216,6 +218,7 @@ OPENJ9_VERSION_VARS := \
216218
#
217219

218220
OPENJ9_VERSION_SCRIPT := \
221+
$(if $(CLOSEDJ9_SHA),,-e '/ VENDOR_SHA /d') \
219222
$(foreach var,$(OPENJ9_VERSION_VARS),-e 's|@$(var)@|$(value $(var))|g')
220223

221224
$(OPENJ9_VM_BUILD_DIR)/include/openj9_version_info.h : $(TOPDIR)/closed/openj9_version_info.h.in
@@ -258,6 +261,10 @@ CMAKE_ARGS := \
258261
-DOPENJ9_SHA=$(OPENJ9_SHA) \
259262
#
260263

264+
ifneq (,$(CLOSEDJ9_SHA))
265+
CMAKE_ARGS += -DJ9VM_VENDOR_DIR=$(CLOSEDJ9_TOPDIR)
266+
endif
267+
261268
ifeq ($(call isTargetOs, windows), true)
262269
CMAKE_ARGS += -DOPENJDK_VERSION_NUMBER_FOUR_POSITIONS=$(VERSION_NUMBER_FOUR_POSITIONS)
263270
else

closed/autoconf/custom-hook.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
2222
[
2323
# Where are the OpenJ9 sources.
24+
CLOSEDJ9_TOPDIR="$TOPDIR/closedj9"
2425
OPENJ9OMR_TOPDIR="$TOPDIR/omr"
2526
OPENJ9_TOPDIR="$TOPDIR/openj9"
2627
@@ -32,9 +33,9 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
3233
AC_MSG_ERROR(["Cannot locate the path to OMR sources: $OPENJ9OMR_TOPDIR! Try 'bash get_source.sh' and restart configure"])
3334
fi
3435
36+
AC_SUBST(CLOSEDJ9_TOPDIR)
3537
AC_SUBST(OPENJ9OMR_TOPDIR)
3638
AC_SUBST(OPENJ9_TOPDIR)
37-
AC_SUBST(CONFIG_SHELL)
3839
3940
OPENJ9_BASIC_SETUP_FUNDAMENTAL_TOOLS
4041
OPENJ9_PLATFORM_SETUP

closed/autoconf/custom-spec.gmk.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ define IncludeCustomExtension
3232
endif
3333
endef
3434

35+
CLOSEDJ9_TOPDIR := @CLOSEDJ9_TOPDIR@
3536
OPENJ9_TOPDIR := @OPENJ9_TOPDIR@
3637
OPENJ9OMR_TOPDIR := @OPENJ9OMR_TOPDIR@
3738

closed/custom/ReleaseFile.gmk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved
2+
# (c) Copyright IBM Corp. 2017, 2025 All Rights Reserved
33
# ===========================================================================
44
# This code is free software; you can redistribute it and/or modify it
55
# under the terms of the GNU General Public License version 2 only, as
@@ -24,3 +24,7 @@ SOURCE_REVISION += OMR:$(shell $(GIT) -C $(OPENJ9OMR_TOPDIR) rev-parse --short H
2424
ifeq (true,$(BUILD_OPENJCEPLUS))
2525
SOURCE_REVISION += OpenJCEPlus:$(shell $(GIT) -C $(OPENJCEPLUS_TOPDIR) rev-parse --short HEAD)
2626
endif
27+
28+
ifneq (,$(wildcard $(CLOSEDJ9_TOPDIR)))
29+
SOURCE_REVISION += IBM:$(shell $(GIT) -C $(CLOSEDJ9_TOPDIR) rev-parse --short HEAD)
30+
endif

closed/openj9_version_info.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define OPENJ9_TAG "@OPENJ9_TAG@"
3737
#define J9JDK_EXT_VERSION "@J9JDK_EXT_VERSION@"
3838
#define J9JDK_EXT_NAME "@J9JDK_EXT_NAME@"
39+
#define VENDOR_SHA "@CLOSEDJ9_SHA@"
3940
#define JAVA_VENDOR "@COMPANY_NAME@"
4041

4142
#define JDK_DEBUG_LEVEL "@DEBUG_LEVEL@"

0 commit comments

Comments
 (0)