Skip to content

Commit 85974bf

Browse files
committed
fix build for evansport
- force cross compilation
1 parent 65ef45d commit 85974bf

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Diff for: cross/java-21-openjdk/Makefile

+11-7
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ PKG_DIR = $(JAVA_REPO_NAME)-$(JAVA_NAME)-$(JAVA_VERSION)-$(JAVA_RELEASE)
1212
# build instructions:
1313
# https://openjdk.java.net/groups/build/doc/building.html
1414

15-
# debian patches
16-
# https://udd.debian.org/patches.cgi?src=openjdk-21&version=21.0.5%2B11-1
17-
1815
BUILD_DEPENDS = native/openjdk-21
1916
# Dependencies required at build time only:
2017
BUILD_DEPENDS += cross/cups
@@ -45,7 +42,7 @@ LICENSE = GPLv2 with the Classpath Exception
4542

4643
PRE_CONFIGURE_TARGET = java-21-openjdk_pre_configure
4744
PRE_COMPILE_TARGET = java-21-openjdk_pre_compile
48-
POST_INSTALL_TARGET = java-21-openjdk_post_compile
45+
POST_INSTALL_TARGET = java-21-openjdk_post_install
4946

5047
CONFIGURE_ARGS = --openjdk-target=$(TC_TARGET)
5148
CONFIGURE_ARGS += --with-boot-jdk=$(WORK_DIR)/../../../native/openjdk-21/work-native/jdk-21
@@ -93,6 +90,8 @@ CONFIGURE_ARGS += OBJDUMP=$(OBJDUMP)
9390
# Build images twice, second time with newly built JDK
9491
COMPILE_MAKE_OPTIONS += product-images
9592

93+
# debian patches
94+
# https://udd.debian.org/patches.cgi?src=openjdk-21&version=21.0.5%2B11-1
9695
PATCHES_LEVEL = 1
9796

9897
# Filter out any -jN since java's configure will autodetect number of CPU's
@@ -102,9 +101,14 @@ COMPILE_MAKE_OPTIONS += JOBS=$(NCPUS)
102101

103102
include ../../mk/spksrc.cross-cc.mk
104103

104+
ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
105+
# force cross compilation
106+
CONFIGURE_ARGS += --build=x86_64-pc-linux-gnu
107+
PLIST_TRANSFORM = sed -e '/lib\/libjsvml/d' -e '/lib\/server\/classes/d' -e '/jmods\/jdk.internal.vm/d'
108+
105109
# ABI profile for ARM builds:
106110
# arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt, aarch64
107-
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
111+
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
108112
CONFIGURE_ARGS += --with-abi-profile=aarch64
109113
PLIST_TRANSFORM = sed -e '/lib\/libjsvml/d' -e '/lib\/server\/classes/d'
110114
else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
@@ -122,8 +126,8 @@ java-21-openjdk_pre_compile:
122126
@$(MSG) "- Force openjdk to install into the package install folder"
123127
@sed -i -e "s|\$$(INSTALL_PREFIX)|$(STAGING_INSTALL_PREFIX)|g" $(WORK_DIR)/$(PKG_DIR)/make/Install.gmk
124128

125-
.PHONY: java-21-openjdk_post_compile
126-
java-21-openjdk_post_compile:
129+
.PHONY: java-21-openjdk_post_install
130+
java-21-openjdk_post_install:
127131
@$(MSG) "- Link binaries into bin folder"
128132
@cd $(STAGING_INSTALL_PREFIX)/bin && ln -sf ../jvm/openjdk-$(JAVA_VERSION)/bin/* .
129133
@$(MSG) "- Add license files"

0 commit comments

Comments
 (0)