Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
Add support for buildspec linux_arm_docker
Browse files Browse the repository at this point in the history
Added a new buildspec for OpenJDK compiles on ARM (since
the old buildspec is likely still needed for compiling IBM SDK
and I couldn't see how to add conditional blocks to a buildspec).

Signed-off-by: James Kingdon <[email protected]>
  • Loading branch information
JamesKingdon committed Dec 1, 2017
1 parent 6fefe60 commit 3dffa4c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ ifeq (,$(BUILD_ID))
BUILD_ID := 000000
endif

# 64 bit compressedrefs builds put some of the libraries in lib/compressedrefs.
# What's the appropriate directory for a 32 bit build? I've opted for 'default'.
ifeq (1,$(OPENJDK_DOCKER_CC_ARM)) # condition should be more specific to 32bit
# 64 bit compressedrefs builds put some of the libraries in lib/compressedrefs
# where as for 32 bit they should go in lib/default.
ifeq (xr32,$(OPENJ9_PLATFORM_CODE))
LIB_SUBDIR=default
else
LIB_SUBDIR=compressedrefs
Expand Down Expand Up @@ -172,7 +172,7 @@ endef
# ----------------------
# param 1 = The jdk/jre directory name
# param 2 = The jdk/jre directory to add openj9 content
ifeq (1,$(OPENJDK_DOCKER_CC_ARM))
ifeq (xr32,$(OPENJ9_PLATFORM_CODE))
define generated_target_rules
.PHONY : stage_openj9_$1
$(foreach file,$(OPENJ9_SHARED_LIBRARIES),$(eval $(call openj9_copy_file,$2/$(OPENJ9_LIBS_OUTPUT_DIR)/$(LIB_SUBDIR)/$(file),$(OUTPUT_ROOT)/vm/$(file))))
Expand Down Expand Up @@ -250,7 +250,7 @@ define openj9_copy_tree_impl
endef

# Temporary fix until we work out how to handle the build_jdk for cross compiles
ifeq (1,$(OPENJDK_DOCKER_CC_ARM))
ifeq (xr32,$(OPENJ9_PLATFORM_CODE))
$(info Cross compilation detected, skipping generated_target_rules_build)
else
$(eval $(call generated_target_rules_build,build_jdk,$(BUILD_JDK)))
Expand Down
2 changes: 1 addition & 1 deletion closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ AC_DEFUN_ONCE([OPENJ9_PLATFORM_SETUP],
OPENJ9_PLATFORM_CODE=ap64
elif test "x$OPENJ9_CPU" = xarm; then
OPENJ9_PLATFORM_CODE=xr32
OPENJ9_BUILDSPEC=linux_arm
OPENJ9_BUILDSPEC=linux_arm_docker
else
AC_MSG_ERROR([Unsupported OpenJ9 cpu ${OPENJ9_CPU}, contact support team!])
fi
Expand Down
6 changes: 3 additions & 3 deletions closed/make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ j9vm-build :
+($(CD) $(SRC_ROOT)/closed && $(MAKE) -f OpenJ9.gmk SPEC=$(SPEC) VERSION_MAJOR=$(VERSION_MAJOR) build-j9)

j9vm-compose-buildjvm : j9vm-build
ifeq ($(OPENJDK_DOCKER_CC_ARM),1)
@$(ECHO) Cross compile detected, skipping stage_openj9_build_jdk
else
ifeq ($(OPENJDK_BUILD_CPU),$(OPENJDK_TARGET_CPU))
+($(CD) $(SRC_ROOT)/closed && $(MAKE) -f OpenJ9.gmk SPEC=$(SPEC) stage_openj9_build_jdk)
else
@$(ECHO) Cross compile detected, skipping stage_openj9_build_jdk
endif

product-images : openj9-jdk-image openj9-jre-image
Expand Down
3 changes: 3 additions & 0 deletions common/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,9 @@ var getJibProfilesDependencies = function (input, common) {
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
: "arm-linaro-4.7+1.0")
linux_arm_docker: (input.profile != null && input.profile.indexOf("hflt") >= 0
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
: "arm-linaro-4.7+1.0")
};

var devkit_platform = (input.target_cpu == "x86"
Expand Down

0 comments on commit 3dffa4c

Please sign in to comment.