Skip to content

Commit 45892bf

Browse files
committed
Build: adjustment for iOS CI
1 parent 90b3327 commit 45892bf

File tree

4 files changed

+56
-7
lines changed

4 files changed

+56
-7
lines changed

.github/workflows/build.yml

+39
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,45 @@ jobs:
5151
name: "jre8-debuginfo-${{matrix.arch}}"
5252
path: dizout
5353

54+
build_iosport:
55+
name: "Build for iOS aarch64"
56+
runs-on: MacStadium
57+
continue-on-error: true
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v2
61+
62+
- name: set up JDK 1.7
63+
uses: actions/setup-java@v1
64+
with:
65+
java-version: 1.7
66+
67+
- name: Build with CI build script
68+
run: |
69+
export BUILD_IOS=1
70+
#brew install awk
71+
#echo "/opt/procursus/bin:/opt/procursus/local/bin:/Users/eilionoir/.local/bin:/opt/homebrew/bin:/Users/eilionoir/Library/Python/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/procursus/games" > $GITHUB_PATH
72+
export PATH=/opt/procursus/bin:/opt/homebrew/bin:$PATH
73+
bash "ci_build_arch_aarch64.sh"
74+
75+
- name: Upload JDK build output
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: "jdk8-ios-aarch64"
79+
path: jdk8*.tar.xz
80+
81+
- name: Upload JRE build output
82+
uses: actions/upload-artifact@v2
83+
with:
84+
name: 'jre8-ios-aarch64'
85+
path: jre8*.tar.xz
86+
87+
- name: Upload JRE debuginfo build output
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: "jre8-ios-debuginfo-aarch64"
91+
path: dizout
92+
5493
pojav:
5594
needs: build_android
5695
runs-on: ubuntu-22.04

buildjdk.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ else
4444
platform_args="--with-toolchain-type=clang SDKNAME=iphoneos"
4545
# --disable-precompiled-headers
4646
AUTOCONF_x11arg="--with-x=/opt/X11/include/X11 --prefix=/usr/lib"
47-
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=11.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
47+
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
4848
export CFLAGS+=" $sameflags"
4949
export CXXFLAGS="$sameflags"
50-
export LDFLAGS+=" -miphoneos-version-min=11.0"
50+
export LDFLAGS+=" -miphoneos-version-min=14.0"
5151

5252
HOMEBREW_NO_AUTO_UPDATE=1 brew install ldid xquartz
5353
fi

macos-host-cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ else
88
args=$@
99
fi
1010
args=${args/"-isysroot $thesysroot"/}
11-
args=${args/"-miphoneos-version-min=11.0"/}
11+
args=${args/"-miphoneos-version-min=14.0"/}
1212
$thecxx $args --stdlib=libc++ -isysroot $themacsysroot

patches/jdk8u_ios.diff

+14-4
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ index 8fc6adb3..8b5369a8 100644
269269

270270
return true;
271271
diff --git a/hotspot/make/bsd/makefiles/gcc.make b/hotspot/make/bsd/makefiles/gcc.make
272-
index b45dd47a..2cd90ea9 100644
272+
index b45dd47a..fd94ee45 100644
273273
--- a/hotspot/make/bsd/makefiles/gcc.make
274274
+++ b/hotspot/make/bsd/makefiles/gcc.make
275275
@@ -248,7 +248,8 @@ endif
@@ -291,14 +291,24 @@ index b45dd47a..2cd90ea9 100644
291291
else
292292
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
293293
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
294-
@@ -350,8 +351,8 @@ ifeq ($(OS_VENDOR), Darwin)
294+
@@ -348,10 +349,17 @@ ifeq ($(OS_VENDOR), Darwin)
295+
MACOSX_VERSION_MIN=10.7.0
296+
endif
295297
# The macro takes the version with no dots, ex: 1070
296-
CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
298+
- CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
299+
+ CFLAGS_TMP = -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
297300
-DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
298301
- -mmacosx-version-min=$(MACOSX_VERSION_MIN)
299302
- LFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
300303
+ -miphoneos-version-min=$(MACOSX_VERSION_MIN)
301-
+ LFLAGS += -miphoneos-version-min=$(MACOSX_VERSION_MIN)
304+
+ LFLAGS_TMP = -miphoneos-version-min=$(MACOSX_VERSION_MIN)
305+
+ ifdef CROSS_COMPILE_ARCH
306+
+ HOSTCC += $(CFLAGS_TMP)
307+
+ HOSTCXX += $(CFLAGS_TMP)
308+
+ else
309+
+ CFLAGS += $(CFLAGS_TMP)
310+
+ LFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
311+
+ endif
302312
endif
303313

304314

0 commit comments

Comments
 (0)